aclocal.m4 revision 08c70cfb
108c70cfbSmrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*-
208c70cfbSmrg
308c70cfbSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4602e473dSmrg
5602e473dSmrg# This file is free software; the Free Software Foundation
6602e473dSmrg# gives unlimited permission to copy and/or distribute it,
7602e473dSmrg# with or without modifications, as long as this notice is preserved.
8602e473dSmrg
9602e473dSmrg# This program is distributed in the hope that it will be useful,
10602e473dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11602e473dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12602e473dSmrg# PARTICULAR PURPOSE.
13602e473dSmrg
1408c70cfbSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15602e473dSmrgm4_ifndef([AC_AUTOCONF_VERSION],
16602e473dSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1708c70cfbSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
1808c70cfbSmrg[m4_warning([this file was generated for autoconf 2.68.
19602e473dSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20602e473dSmrgIf you have problems, you may need to regenerate the build system entirely.
2108c70cfbSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22602e473dSmrg
2308c70cfbSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc.
24602e473dSmrg#
2508c70cfbSmrg# This file is free software; the Free Software Foundation
2608c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
2708c70cfbSmrg# with or without modifications, as long as this notice is preserved.
2808c70cfbSmrg
2908c70cfbSmrg# AM_AUTOMAKE_VERSION(VERSION)
3008c70cfbSmrg# ----------------------------
3108c70cfbSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3208c70cfbSmrg# generated from the m4 files accompanying Automake X.Y.
3308c70cfbSmrg# (This private macro should not be called outside this file.)
3408c70cfbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3508c70cfbSmrg[am__api_version='1.13'
3608c70cfbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3708c70cfbSmrgdnl require some minimum version.  Point them to the right macro.
3808c70cfbSmrgm4_if([$1], [1.13.2], [],
3908c70cfbSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
4008c70cfbSmrg])
4108c70cfbSmrg
4208c70cfbSmrg# _AM_AUTOCONF_VERSION(VERSION)
4308c70cfbSmrg# -----------------------------
4408c70cfbSmrg# aclocal traces this macro to find the Autoconf version.
4508c70cfbSmrg# This is a private macro too.  Using m4_define simplifies
4608c70cfbSmrg# the logic in aclocal, which can simply ignore this definition.
4708c70cfbSmrgm4_define([_AM_AUTOCONF_VERSION], [])
4808c70cfbSmrg
4908c70cfbSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
5008c70cfbSmrg# -------------------------------
5108c70cfbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5208c70cfbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5308c70cfbSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5408c70cfbSmrg[AM_AUTOMAKE_VERSION([1.13.2])dnl
5508c70cfbSmrgm4_ifndef([AC_AUTOCONF_VERSION],
5608c70cfbSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5708c70cfbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5808c70cfbSmrg
5908c70cfbSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6008c70cfbSmrg
6108c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
62602e473dSmrg#
6308c70cfbSmrg# This file is free software; the Free Software Foundation
6408c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
6508c70cfbSmrg# with or without modifications, as long as this notice is preserved.
66602e473dSmrg
6708c70cfbSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6808c70cfbSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
6908c70cfbSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70602e473dSmrg#
7108c70cfbSmrg# Of course, Automake must honor this variable whenever it calls a
7208c70cfbSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7308c70cfbSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7408c70cfbSmrg# depending on how configure is run.  This is pretty annoying, since
7508c70cfbSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7608c70cfbSmrg# source directory, any form will work fine, but in subdirectories a
7708c70cfbSmrg# relative path needs to be adjusted first.
78602e473dSmrg#
7908c70cfbSmrg# $ac_aux_dir/missing
8008c70cfbSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8108c70cfbSmrg# $top_srcdir/$ac_aux_dir/missing
8208c70cfbSmrg#    fails if $ac_aux_dir is absolute,
8308c70cfbSmrg#    fails when called from a subdirectory in a VPATH build with
8408c70cfbSmrg#          a relative $ac_aux_dir
85602e473dSmrg#
8608c70cfbSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8708c70cfbSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
8808c70cfbSmrg# harmless because $srcdir is '.', but things will broke when you
8908c70cfbSmrg# start a VPATH build or use an absolute $srcdir.
90602e473dSmrg#
9108c70cfbSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9208c70cfbSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9308c70cfbSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9408c70cfbSmrg# and then we would define $MISSING as
9508c70cfbSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9608c70cfbSmrg# This will work as long as MISSING is not called from configure, because
9708c70cfbSmrg# unfortunately $(top_srcdir) has no meaning in configure.
9808c70cfbSmrg# However there are other variables, like CC, which are often used in
9908c70cfbSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
100602e473dSmrg#
10108c70cfbSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
10208c70cfbSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
10308c70cfbSmrg# configured tree to be moved without reconfiguration.
104602e473dSmrg
10508c70cfbSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10608c70cfbSmrg[dnl Rely on autoconf to set up CDPATH properly.
10708c70cfbSmrgAC_PREREQ([2.50])dnl
10808c70cfbSmrg# expand $ac_aux_dir to an absolute path
10908c70cfbSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
110602e473dSmrg])
111602e473dSmrg
11208c70cfbSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
113602e473dSmrg
11408c70cfbSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc.
11508c70cfbSmrg#
11608c70cfbSmrg# This file is free software; the Free Software Foundation
11708c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
11808c70cfbSmrg# with or without modifications, as long as this notice is preserved.
119602e473dSmrg
12008c70cfbSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12108c70cfbSmrg# -------------------------------------
12208c70cfbSmrg# Define a conditional.
12308c70cfbSmrgAC_DEFUN([AM_CONDITIONAL],
12408c70cfbSmrg[AC_PREREQ([2.52])dnl
12508c70cfbSmrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12608c70cfbSmrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12708c70cfbSmrgAC_SUBST([$1_TRUE])dnl
12808c70cfbSmrgAC_SUBST([$1_FALSE])dnl
12908c70cfbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13008c70cfbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13108c70cfbSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13208c70cfbSmrgif $2; then
13308c70cfbSmrg  $1_TRUE=
13408c70cfbSmrg  $1_FALSE='#'
13508c70cfbSmrgelse
13608c70cfbSmrg  $1_TRUE='#'
13708c70cfbSmrg  $1_FALSE=
13808c70cfbSmrgfi
13908c70cfbSmrgAC_CONFIG_COMMANDS_PRE(
14008c70cfbSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14108c70cfbSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14208c70cfbSmrgUsually this means the macro was only invoked conditionally.]])
14308c70cfbSmrgfi])])
144602e473dSmrg
14508c70cfbSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc.
14608c70cfbSmrg#
14708c70cfbSmrg# This file is free software; the Free Software Foundation
14808c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
14908c70cfbSmrg# with or without modifications, as long as this notice is preserved.
15021298544Smrg
151602e473dSmrg
15208c70cfbSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
15308c70cfbSmrg# written in clear, in which case automake, when reading aclocal.m4,
15408c70cfbSmrg# will think it sees a *use*, and therefore will trigger all it's
15508c70cfbSmrg# C support machinery.  Also note that it means that autoscan, seeing
15608c70cfbSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157602e473dSmrg
158602e473dSmrg
15908c70cfbSmrg# _AM_DEPENDENCIES(NAME)
16008c70cfbSmrg# ----------------------
16108c70cfbSmrg# See how the compiler implements dependency checking.
16208c70cfbSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
16308c70cfbSmrg# We try a few techniques and use that to set a single cache variable.
16408c70cfbSmrg#
16508c70cfbSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
16608c70cfbSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
16708c70cfbSmrg# dependency, and given that the user is not expected to run this macro,
16808c70cfbSmrg# just rely on AC_PROG_CC.
16908c70cfbSmrgAC_DEFUN([_AM_DEPENDENCIES],
17008c70cfbSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17108c70cfbSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17208c70cfbSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17308c70cfbSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
174602e473dSmrg
17508c70cfbSmrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
17608c70cfbSmrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
17708c70cfbSmrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
17808c70cfbSmrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
17908c70cfbSmrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
18008c70cfbSmrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18108c70cfbSmrg                    [depcc="$$1"   am_compiler_list=])
182602e473dSmrg
18308c70cfbSmrgAC_CACHE_CHECK([dependency style of $depcc],
18408c70cfbSmrg               [am_cv_$1_dependencies_compiler_type],
18508c70cfbSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18608c70cfbSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
18708c70cfbSmrg  # making bogus files that we don't know about and never remove.  For
18808c70cfbSmrg  # instance it was reported that on HP-UX the gcc test will end up
18908c70cfbSmrg  # making a dummy file named 'D' -- because '-MD' means "put the output
19008c70cfbSmrg  # in D".
19108c70cfbSmrg  rm -rf conftest.dir
19208c70cfbSmrg  mkdir conftest.dir
19308c70cfbSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19408c70cfbSmrg  # using a relative directory.
19508c70cfbSmrg  cp "$am_depcomp" conftest.dir
19608c70cfbSmrg  cd conftest.dir
19708c70cfbSmrg  # We will build objects and dependencies in a subdirectory because
19808c70cfbSmrg  # it helps to detect inapplicable dependency modes.  For instance
19908c70cfbSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
20008c70cfbSmrg  # side effect of compilation, but ICC will put the dependencies in
20108c70cfbSmrg  # the current directory while Tru64 will put them in the object
20208c70cfbSmrg  # directory.
20308c70cfbSmrg  mkdir sub
204602e473dSmrg
20508c70cfbSmrg  am_cv_$1_dependencies_compiler_type=none
20608c70cfbSmrg  if test "$am_compiler_list" = ""; then
20708c70cfbSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
20808c70cfbSmrg  fi
20908c70cfbSmrg  am__universal=false
21008c70cfbSmrg  m4_case([$1], [CC],
21108c70cfbSmrg    [case " $depcc " in #(
21208c70cfbSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21308c70cfbSmrg     esac],
21408c70cfbSmrg    [CXX],
21508c70cfbSmrg    [case " $depcc " in #(
21608c70cfbSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21708c70cfbSmrg     esac])
218602e473dSmrg
21908c70cfbSmrg  for depmode in $am_compiler_list; do
22008c70cfbSmrg    # Setup a source with many dependencies, because some compilers
22108c70cfbSmrg    # like to wrap large dependency lists on column 80 (with \), and
22208c70cfbSmrg    # we should not choose a depcomp mode which is confused by this.
22308c70cfbSmrg    #
22408c70cfbSmrg    # We need to recreate these files for each test, as the compiler may
22508c70cfbSmrg    # overwrite some of them when testing with obscure command lines.
22608c70cfbSmrg    # This happens at least with the AIX C compiler.
22708c70cfbSmrg    : > sub/conftest.c
22808c70cfbSmrg    for i in 1 2 3 4 5 6; do
22908c70cfbSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
23008c70cfbSmrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
23108c70cfbSmrg      # Solaris 10 /bin/sh.
23208c70cfbSmrg      echo '/* dummy */' > sub/conftst$i.h
23308c70cfbSmrg    done
23408c70cfbSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
235602e473dSmrg
23608c70cfbSmrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
23708c70cfbSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
23808c70cfbSmrg    # handle '-M -o', and we need to detect this.  Also, some Intel
23908c70cfbSmrg    # versions had trouble with output in subdirs.
24008c70cfbSmrg    am__obj=sub/conftest.${OBJEXT-o}
24108c70cfbSmrg    am__minus_obj="-o $am__obj"
24208c70cfbSmrg    case $depmode in
24308c70cfbSmrg    gcc)
24408c70cfbSmrg      # This depmode causes a compiler race in universal mode.
24508c70cfbSmrg      test "$am__universal" = false || continue
24608c70cfbSmrg      ;;
24708c70cfbSmrg    nosideeffect)
24808c70cfbSmrg      # After this tag, mechanisms are not by side-effect, so they'll
24908c70cfbSmrg      # only be used when explicitly requested.
25008c70cfbSmrg      if test "x$enable_dependency_tracking" = xyes; then
25108c70cfbSmrg	continue
25208c70cfbSmrg      else
25308c70cfbSmrg	break
25408c70cfbSmrg      fi
25508c70cfbSmrg      ;;
25608c70cfbSmrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
25708c70cfbSmrg      # This compiler won't grok '-c -o', but also, the minuso test has
25808c70cfbSmrg      # not run yet.  These depmodes are late enough in the game, and
25908c70cfbSmrg      # so weak that their functioning should not be impacted.
26008c70cfbSmrg      am__obj=conftest.${OBJEXT-o}
26108c70cfbSmrg      am__minus_obj=
26208c70cfbSmrg      ;;
26308c70cfbSmrg    none) break ;;
26408c70cfbSmrg    esac
26508c70cfbSmrg    if depmode=$depmode \
26608c70cfbSmrg       source=sub/conftest.c object=$am__obj \
26708c70cfbSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
26808c70cfbSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
26908c70cfbSmrg         >/dev/null 2>conftest.err &&
27008c70cfbSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27108c70cfbSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27208c70cfbSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27308c70cfbSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27408c70cfbSmrg      # icc doesn't choke on unknown options, it will just issue warnings
27508c70cfbSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
27608c70cfbSmrg      # that says an option was ignored or not supported.
27708c70cfbSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
27808c70cfbSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
27908c70cfbSmrg      # The diagnosis changed in icc 8.0:
28008c70cfbSmrg      #   icc: Command line remark: option '-MP' not supported
28108c70cfbSmrg      if (grep 'ignoring option' conftest.err ||
28208c70cfbSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28308c70cfbSmrg        am_cv_$1_dependencies_compiler_type=$depmode
28408c70cfbSmrg        break
28508c70cfbSmrg      fi
28608c70cfbSmrg    fi
28708c70cfbSmrg  done
288602e473dSmrg
28908c70cfbSmrg  cd ..
29008c70cfbSmrg  rm -rf conftest.dir
29108c70cfbSmrgelse
29208c70cfbSmrg  am_cv_$1_dependencies_compiler_type=none
29308c70cfbSmrgfi
29408c70cfbSmrg])
29508c70cfbSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29608c70cfbSmrgAM_CONDITIONAL([am__fastdep$1], [
29708c70cfbSmrg  test "x$enable_dependency_tracking" != xno \
29808c70cfbSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
29908c70cfbSmrg])
300602e473dSmrg
301602e473dSmrg
30208c70cfbSmrg# AM_SET_DEPDIR
30308c70cfbSmrg# -------------
30408c70cfbSmrg# Choose a directory name for dependency files.
30508c70cfbSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
30608c70cfbSmrgAC_DEFUN([AM_SET_DEPDIR],
30708c70cfbSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
30808c70cfbSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
30908c70cfbSmrg])
31021298544Smrg
311602e473dSmrg
31208c70cfbSmrg# AM_DEP_TRACK
31308c70cfbSmrg# ------------
31408c70cfbSmrgAC_DEFUN([AM_DEP_TRACK],
31508c70cfbSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl
31608c70cfbSmrgAS_HELP_STRING(
31708c70cfbSmrg  [--enable-dependency-tracking],
31808c70cfbSmrg  [do not reject slow dependency extractors])
31908c70cfbSmrgAS_HELP_STRING(
32008c70cfbSmrg  [--disable-dependency-tracking],
32108c70cfbSmrg  [speeds up one-time build])])
32208c70cfbSmrgif test "x$enable_dependency_tracking" != xno; then
32308c70cfbSmrg  am_depcomp="$ac_aux_dir/depcomp"
32408c70cfbSmrg  AMDEPBACKSLASH='\'
32508c70cfbSmrg  am__nodep='_no'
326602e473dSmrgfi
32708c70cfbSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32808c70cfbSmrgAC_SUBST([AMDEPBACKSLASH])dnl
32908c70cfbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
33008c70cfbSmrgAC_SUBST([am__nodep])dnl
33108c70cfbSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl
332602e473dSmrg])
333602e473dSmrg
33408c70cfbSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
335602e473dSmrg
33608c70cfbSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc.
33708c70cfbSmrg#
33808c70cfbSmrg# This file is free software; the Free Software Foundation
33908c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
34008c70cfbSmrg# with or without modifications, as long as this notice is preserved.
341602e473dSmrg
342602e473dSmrg
34308c70cfbSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
34408c70cfbSmrg# ------------------------------
34508c70cfbSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34608c70cfbSmrg[{
34708c70cfbSmrg  # Older Autoconf quotes --file arguments for eval, but not when files
34808c70cfbSmrg  # are listed without --file.  Let's play safe and only enable the eval
34908c70cfbSmrg  # if we detect the quoting.
35008c70cfbSmrg  case $CONFIG_FILES in
35108c70cfbSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
35208c70cfbSmrg  *)   set x $CONFIG_FILES ;;
35308c70cfbSmrg  esac
35408c70cfbSmrg  shift
35508c70cfbSmrg  for mf
35608c70cfbSmrg  do
35708c70cfbSmrg    # Strip MF so we end up with the name of the file.
35808c70cfbSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
35908c70cfbSmrg    # Check whether this is an Automake generated Makefile or not.
36008c70cfbSmrg    # We used to match only the files named 'Makefile.in', but
36108c70cfbSmrg    # some people rename them; so instead we look at the file content.
36208c70cfbSmrg    # Grep'ing the first line is not enough: some people post-process
36308c70cfbSmrg    # each Makefile.in and add a new line on top of each file to say so.
36408c70cfbSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
36508c70cfbSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
36608c70cfbSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36708c70cfbSmrg      dirpart=`AS_DIRNAME("$mf")`
36808c70cfbSmrg    else
36908c70cfbSmrg      continue
37008c70cfbSmrg    fi
37108c70cfbSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
37208c70cfbSmrg    # from the Makefile without running 'make'.
37308c70cfbSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37408c70cfbSmrg    test -z "$DEPDIR" && continue
37508c70cfbSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37608c70cfbSmrg    test -z "$am__include" && continue
37708c70cfbSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37808c70cfbSmrg    # Find all dependency output files, they are included files with
37908c70cfbSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
38008c70cfbSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
38108c70cfbSmrg    # expansion.
38208c70cfbSmrg    for file in `sed -n "
38308c70cfbSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38408c70cfbSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
38508c70cfbSmrg      # Make sure the directory exists.
38608c70cfbSmrg      test -f "$dirpart/$file" && continue
38708c70cfbSmrg      fdir=`AS_DIRNAME(["$file"])`
38808c70cfbSmrg      AS_MKDIR_P([$dirpart/$fdir])
38908c70cfbSmrg      # echo "creating $dirpart/$file"
39008c70cfbSmrg      echo '# dummy' > "$dirpart/$file"
39108c70cfbSmrg    done
39208c70cfbSmrg  done
39308c70cfbSmrg}
39408c70cfbSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
395602e473dSmrg
396602e473dSmrg
39708c70cfbSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39808c70cfbSmrg# -----------------------------
39908c70cfbSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
40008c70cfbSmrg#
40108c70cfbSmrg# This code is only required when automatic dependency tracking
40208c70cfbSmrg# is enabled.  FIXME.  This creates each '.P' file that we will
40308c70cfbSmrg# need in order to bootstrap the dependency handling code.
40408c70cfbSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
40508c70cfbSmrg[AC_CONFIG_COMMANDS([depfiles],
40608c70cfbSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
40708c70cfbSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
40808c70cfbSmrg])
409602e473dSmrg
41008c70cfbSmrg# Do all the work for Automake.                             -*- Autoconf -*-
411602e473dSmrg
41208c70cfbSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
41308c70cfbSmrg#
41408c70cfbSmrg# This file is free software; the Free Software Foundation
41508c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
41608c70cfbSmrg# with or without modifications, as long as this notice is preserved.
417602e473dSmrg
41808c70cfbSmrg# This macro actually does too much.  Some checks are only needed if
41908c70cfbSmrg# your package does certain things.  But this isn't really a big deal.
420602e473dSmrg
42108c70cfbSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
42208c70cfbSmrg# AM_INIT_AUTOMAKE([OPTIONS])
42308c70cfbSmrg# -----------------------------------------------
42408c70cfbSmrg# The call with PACKAGE and VERSION arguments is the old style
42508c70cfbSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
42608c70cfbSmrg# and VERSION should now be passed to AC_INIT and removed from
42708c70cfbSmrg# the call to AM_INIT_AUTOMAKE.
42808c70cfbSmrg# We support both call styles for the transition.  After
42908c70cfbSmrg# the next Automake release, Autoconf can make the AC_INIT
43008c70cfbSmrg# arguments mandatory, and then we can depend on a new Autoconf
43108c70cfbSmrg# release and drop the old call support.
43208c70cfbSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
43308c70cfbSmrg[AC_PREREQ([2.65])dnl
43408c70cfbSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
43508c70cfbSmrgdnl the ones we care about.
43608c70cfbSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
43708c70cfbSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
43808c70cfbSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
43908c70cfbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
44008c70cfbSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
44108c70cfbSmrg  # is not polluted with repeated "-I."
44208c70cfbSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
44308c70cfbSmrg  # test to see if srcdir already configured
44408c70cfbSmrg  if test -f $srcdir/config.status; then
44508c70cfbSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
44608c70cfbSmrg  fi
44708c70cfbSmrgfi
44821298544Smrg
44908c70cfbSmrg# test whether we have cygpath
45008c70cfbSmrgif test -z "$CYGPATH_W"; then
45108c70cfbSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
45208c70cfbSmrg    CYGPATH_W='cygpath -w'
45308c70cfbSmrg  else
45408c70cfbSmrg    CYGPATH_W=echo
45508c70cfbSmrg  fi
45608c70cfbSmrgfi
45708c70cfbSmrgAC_SUBST([CYGPATH_W])
45821298544Smrg
45908c70cfbSmrg# Define the identity of the package.
46008c70cfbSmrgdnl Distinguish between old-style and new-style calls.
46108c70cfbSmrgm4_ifval([$2],
46208c70cfbSmrg[AC_DIAGNOSE([obsolete],
46308c70cfbSmrg             [$0: two- and three-arguments forms are deprecated.])
46408c70cfbSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
46508c70cfbSmrg AC_SUBST([PACKAGE], [$1])dnl
46608c70cfbSmrg AC_SUBST([VERSION], [$2])],
46708c70cfbSmrg[_AM_SET_OPTIONS([$1])dnl
46808c70cfbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
46908c70cfbSmrgm4_if(
47008c70cfbSmrg  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
47108c70cfbSmrg  [ok:ok],,
47208c70cfbSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
47308c70cfbSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
47408c70cfbSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
47521298544Smrg
47608c70cfbSmrg_AM_IF_OPTION([no-define],,
47708c70cfbSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
47808c70cfbSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
47921298544Smrg
48008c70cfbSmrg# Some tools Automake needs.
48108c70cfbSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
48208c70cfbSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
48308c70cfbSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
48408c70cfbSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
48508c70cfbSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
48608c70cfbSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
48708c70cfbSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
48808c70cfbSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
48908c70cfbSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
49008c70cfbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
49108c70cfbSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
49208c70cfbSmrg# dies out for good.  For more background, see:
49308c70cfbSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
49408c70cfbSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
49508c70cfbSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
49608c70cfbSmrg# We need awk for the "check" target.  The system "awk" is bad on
49708c70cfbSmrg# some platforms.
49808c70cfbSmrgAC_REQUIRE([AC_PROG_AWK])dnl
49908c70cfbSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
50008c70cfbSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
50108c70cfbSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
50208c70cfbSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
50308c70cfbSmrg			     [_AM_PROG_TAR([v7])])])
50408c70cfbSmrg_AM_IF_OPTION([no-dependencies],,
50508c70cfbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
50608c70cfbSmrg		  [_AM_DEPENDENCIES([CC])],
50708c70cfbSmrg		  [m4_define([AC_PROG_CC],
50808c70cfbSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
50908c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
51008c70cfbSmrg		  [_AM_DEPENDENCIES([CXX])],
51108c70cfbSmrg		  [m4_define([AC_PROG_CXX],
51208c70cfbSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
51308c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51408c70cfbSmrg		  [_AM_DEPENDENCIES([OBJC])],
51508c70cfbSmrg		  [m4_define([AC_PROG_OBJC],
51608c70cfbSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
51708c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
51808c70cfbSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
51908c70cfbSmrg		  [m4_define([AC_PROG_OBJCXX],
52008c70cfbSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
52108c70cfbSmrg])
52208c70cfbSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
52308c70cfbSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
52408c70cfbSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
52508c70cfbSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
52608c70cfbSmrgAC_CONFIG_COMMANDS_PRE(dnl
52708c70cfbSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
52808c70cfbSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
52921298544Smrg])
53021298544Smrg
53108c70cfbSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
53208c70cfbSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
53308c70cfbSmrgdnl mangled by Autoconf and run in a shell conditional statement.
53408c70cfbSmrgm4_define([_AC_COMPILER_EXEEXT],
53508c70cfbSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
536602e473dSmrg
537602e473dSmrg
53808c70cfbSmrg# When config.status generates a header, we must update the stamp-h file.
53908c70cfbSmrg# This file resides in the same directory as the config header
54008c70cfbSmrg# that is generated.  The stamp files are numbered to have different names.
541602e473dSmrg
54208c70cfbSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
54308c70cfbSmrg# loop where config.status creates the headers, so we can generate
54408c70cfbSmrg# our stamp files there.
54508c70cfbSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
54608c70cfbSmrg[# Compute $1's index in $config_headers.
54708c70cfbSmrg_am_arg=$1
54808c70cfbSmrg_am_stamp_count=1
54908c70cfbSmrgfor _am_header in $config_headers :; do
55008c70cfbSmrg  case $_am_header in
55108c70cfbSmrg    $_am_arg | $_am_arg:* )
55208c70cfbSmrg      break ;;
55308c70cfbSmrg    * )
55408c70cfbSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55508c70cfbSmrg  esac
55608c70cfbSmrgdone
55708c70cfbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
558602e473dSmrg
55908c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
56008c70cfbSmrg#
56108c70cfbSmrg# This file is free software; the Free Software Foundation
56208c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
56308c70cfbSmrg# with or without modifications, as long as this notice is preserved.
564602e473dSmrg
56508c70cfbSmrg# AM_PROG_INSTALL_SH
56608c70cfbSmrg# ------------------
56708c70cfbSmrg# Define $install_sh.
56808c70cfbSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
56908c70cfbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57008c70cfbSmrgif test x"${install_sh}" != xset; then
57108c70cfbSmrg  case $am_aux_dir in
57208c70cfbSmrg  *\ * | *\	*)
57308c70cfbSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
57408c70cfbSmrg  *)
57508c70cfbSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
57608c70cfbSmrg  esac
57708c70cfbSmrgfi
57808c70cfbSmrgAC_SUBST([install_sh])])
579602e473dSmrg
58008c70cfbSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc.
58108c70cfbSmrg#
58208c70cfbSmrg# This file is free software; the Free Software Foundation
58308c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
58408c70cfbSmrg# with or without modifications, as long as this notice is preserved.
585602e473dSmrg
58608c70cfbSmrg# Check whether the underlying file-system supports filenames
58708c70cfbSmrg# with a leading dot.  For instance MS-DOS doesn't.
58808c70cfbSmrgAC_DEFUN([AM_SET_LEADING_DOT],
58908c70cfbSmrg[rm -rf .tst 2>/dev/null
59008c70cfbSmrgmkdir .tst 2>/dev/null
59108c70cfbSmrgif test -d .tst; then
59208c70cfbSmrg  am__leading_dot=.
59308c70cfbSmrgelse
59408c70cfbSmrg  am__leading_dot=_
59508c70cfbSmrgfi
59608c70cfbSmrgrmdir .tst 2>/dev/null
59708c70cfbSmrgAC_SUBST([am__leading_dot])])
598602e473dSmrg
59908c70cfbSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
600602e473dSmrg
60108c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
60208c70cfbSmrg#
60308c70cfbSmrg# This file is free software; the Free Software Foundation
60408c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
60508c70cfbSmrg# with or without modifications, as long as this notice is preserved.
606602e473dSmrg
60708c70cfbSmrg# AM_MAKE_INCLUDE()
60808c70cfbSmrg# -----------------
60908c70cfbSmrg# Check to see how make treats includes.
61008c70cfbSmrgAC_DEFUN([AM_MAKE_INCLUDE],
61108c70cfbSmrg[am_make=${MAKE-make}
61208c70cfbSmrgcat > confinc << 'END'
61308c70cfbSmrgam__doit:
61408c70cfbSmrg	@echo this is the am__doit target
61508c70cfbSmrg.PHONY: am__doit
61608c70cfbSmrgEND
61708c70cfbSmrg# If we don't find an include directive, just comment out the code.
61808c70cfbSmrgAC_MSG_CHECKING([for style of include used by $am_make])
61908c70cfbSmrgam__include="#"
62008c70cfbSmrgam__quote=
62108c70cfbSmrg_am_result=none
62208c70cfbSmrg# First try GNU make style include.
62308c70cfbSmrgecho "include confinc" > confmf
62408c70cfbSmrg# Ignore all kinds of additional output from 'make'.
62508c70cfbSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
62608c70cfbSmrg*the\ am__doit\ target*)
62708c70cfbSmrg  am__include=include
62808c70cfbSmrg  am__quote=
62908c70cfbSmrg  _am_result=GNU
63008c70cfbSmrg  ;;
63108c70cfbSmrgesac
63208c70cfbSmrg# Now try BSD make style include.
63308c70cfbSmrgif test "$am__include" = "#"; then
63408c70cfbSmrg   echo '.include "confinc"' > confmf
63508c70cfbSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
63608c70cfbSmrg   *the\ am__doit\ target*)
63708c70cfbSmrg     am__include=.include
63808c70cfbSmrg     am__quote="\""
63908c70cfbSmrg     _am_result=BSD
64008c70cfbSmrg     ;;
64108c70cfbSmrg   esac
64208c70cfbSmrgfi
64308c70cfbSmrgAC_SUBST([am__include])
64408c70cfbSmrgAC_SUBST([am__quote])
64508c70cfbSmrgAC_MSG_RESULT([$_am_result])
64608c70cfbSmrgrm -f confinc confmf
647602e473dSmrg])
648602e473dSmrg
64908c70cfbSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
650602e473dSmrg
65108c70cfbSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc.
65208c70cfbSmrg#
65308c70cfbSmrg# This file is free software; the Free Software Foundation
65408c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
65508c70cfbSmrg# with or without modifications, as long as this notice is preserved.
656602e473dSmrg
65708c70cfbSmrg# AM_MISSING_PROG(NAME, PROGRAM)
65808c70cfbSmrg# ------------------------------
65908c70cfbSmrgAC_DEFUN([AM_MISSING_PROG],
66008c70cfbSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
66108c70cfbSmrg$1=${$1-"${am_missing_run}$2"}
66208c70cfbSmrgAC_SUBST($1)])
663602e473dSmrg
66408c70cfbSmrg# AM_MISSING_HAS_RUN
66508c70cfbSmrg# ------------------
66608c70cfbSmrg# Define MISSING if not defined so far and test if it is modern enough.
66708c70cfbSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
66808c70cfbSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
66908c70cfbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
67008c70cfbSmrgAC_REQUIRE_AUX_FILE([missing])dnl
67108c70cfbSmrgif test x"${MISSING+set}" != xset; then
67208c70cfbSmrg  case $am_aux_dir in
67308c70cfbSmrg  *\ * | *\	*)
67408c70cfbSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
67508c70cfbSmrg  *)
67608c70cfbSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
67708c70cfbSmrg  esac
67808c70cfbSmrgfi
67908c70cfbSmrg# Use eval to expand $SHELL
68008c70cfbSmrgif eval "$MISSING --is-lightweight"; then
68108c70cfbSmrg  am_missing_run="$MISSING "
68208c70cfbSmrgelse
68308c70cfbSmrg  am_missing_run=
68408c70cfbSmrg  AC_MSG_WARN(['missing' script is too old or missing])
68508c70cfbSmrgfi
686602e473dSmrg])
687602e473dSmrg
68808c70cfbSmrg# Helper functions for option handling.                     -*- Autoconf -*-
689602e473dSmrg
69008c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
69108c70cfbSmrg#
69208c70cfbSmrg# This file is free software; the Free Software Foundation
69308c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
69408c70cfbSmrg# with or without modifications, as long as this notice is preserved.
695602e473dSmrg
69608c70cfbSmrg# _AM_MANGLE_OPTION(NAME)
69708c70cfbSmrg# -----------------------
69808c70cfbSmrgAC_DEFUN([_AM_MANGLE_OPTION],
69908c70cfbSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
700602e473dSmrg
70108c70cfbSmrg# _AM_SET_OPTION(NAME)
70208c70cfbSmrg# --------------------
70308c70cfbSmrg# Set option NAME.  Presently that only means defining a flag for this option.
70408c70cfbSmrgAC_DEFUN([_AM_SET_OPTION],
70508c70cfbSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
706602e473dSmrg
70708c70cfbSmrg# _AM_SET_OPTIONS(OPTIONS)
70808c70cfbSmrg# ------------------------
70908c70cfbSmrg# OPTIONS is a space-separated list of Automake options.
71008c70cfbSmrgAC_DEFUN([_AM_SET_OPTIONS],
71108c70cfbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
712602e473dSmrg
71308c70cfbSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
71408c70cfbSmrg# -------------------------------------------
71508c70cfbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
71608c70cfbSmrgAC_DEFUN([_AM_IF_OPTION],
71708c70cfbSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
718602e473dSmrg
71908c70cfbSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc.
72008c70cfbSmrg#
72108c70cfbSmrg# This file is free software; the Free Software Foundation
72208c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
72308c70cfbSmrg# with or without modifications, as long as this notice is preserved.
724602e473dSmrg
725602e473dSmrg
72608c70cfbSmrg# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
72708c70cfbSmrg# ---------------------------------------------------------------------------
72808c70cfbSmrg# Adds support for distributing Python modules and packages.  To
72908c70cfbSmrg# install modules, copy them to $(pythondir), using the python_PYTHON
73008c70cfbSmrg# automake variable.  To install a package with the same name as the
73108c70cfbSmrg# automake package, install to $(pkgpythondir), or use the
73208c70cfbSmrg# pkgpython_PYTHON automake variable.
733602e473dSmrg#
73408c70cfbSmrg# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
73508c70cfbSmrg# locations to install python extension modules (shared libraries).
73608c70cfbSmrg# Another macro is required to find the appropriate flags to compile
73708c70cfbSmrg# extension modules.
73808c70cfbSmrg#
73908c70cfbSmrg# If your package is configured with a different prefix to python,
74008c70cfbSmrg# users will have to add the install directory to the PYTHONPATH
74108c70cfbSmrg# environment variable, or create a .pth file (see the python
74208c70cfbSmrg# documentation for details).
74308c70cfbSmrg#
74408c70cfbSmrg# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
74508c70cfbSmrg# cause an error if the version of python installed on the system
74608c70cfbSmrg# doesn't meet the requirement.  MINIMUM-VERSION should consist of
74708c70cfbSmrg# numbers and dots only.
74808c70cfbSmrgAC_DEFUN([AM_PATH_PYTHON],
74908c70cfbSmrg [
75008c70cfbSmrg  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
75108c70cfbSmrg  dnl supported. (2.0 was released on October 16, 2000).
75208c70cfbSmrg  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
75308c70cfbSmrg[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
75408c70cfbSmrg python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
755602e473dSmrg
75608c70cfbSmrg  AC_ARG_VAR([PYTHON], [the Python interpreter])
757602e473dSmrg
75808c70cfbSmrg  m4_if([$1],[],[
75908c70cfbSmrg    dnl No version check is needed.
76008c70cfbSmrg    # Find any Python interpreter.
76108c70cfbSmrg    if test -z "$PYTHON"; then
76208c70cfbSmrg      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
76308c70cfbSmrg    fi
76408c70cfbSmrg    am_display_PYTHON=python
76508c70cfbSmrg  ], [
76608c70cfbSmrg    dnl A version check is needed.
76708c70cfbSmrg    if test -n "$PYTHON"; then
76808c70cfbSmrg      # If the user set $PYTHON, use it and don't search something else.
76908c70cfbSmrg      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
77008c70cfbSmrg      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
77108c70cfbSmrg			      [AC_MSG_RESULT([yes])],
77208c70cfbSmrg			      [AC_MSG_RESULT([no])
77308c70cfbSmrg			       AC_MSG_ERROR([Python interpreter is too old])])
77408c70cfbSmrg      am_display_PYTHON=$PYTHON
77508c70cfbSmrg    else
77608c70cfbSmrg      # Otherwise, try each interpreter until we find one that satisfies
77708c70cfbSmrg      # VERSION.
77808c70cfbSmrg      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
77908c70cfbSmrg	[am_cv_pathless_PYTHON],[
78008c70cfbSmrg	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
78108c70cfbSmrg	  test "$am_cv_pathless_PYTHON" = none && break
78208c70cfbSmrg	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
78308c70cfbSmrg	done])
78408c70cfbSmrg      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
78508c70cfbSmrg      if test "$am_cv_pathless_PYTHON" = none; then
78608c70cfbSmrg	PYTHON=:
78708c70cfbSmrg      else
78808c70cfbSmrg        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
78908c70cfbSmrg      fi
79008c70cfbSmrg      am_display_PYTHON=$am_cv_pathless_PYTHON
79108c70cfbSmrg    fi
79208c70cfbSmrg  ])
793602e473dSmrg
79408c70cfbSmrg  if test "$PYTHON" = :; then
79508c70cfbSmrg  dnl Run any user-specified action, or abort.
79608c70cfbSmrg    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
79708c70cfbSmrg  else
798602e473dSmrg
79908c70cfbSmrg  dnl Query Python for its version number.  Getting [:3] seems to be
80008c70cfbSmrg  dnl the best way to do this; it's what "site.py" does in the standard
80108c70cfbSmrg  dnl library.
802602e473dSmrg
80308c70cfbSmrg  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
80408c70cfbSmrg    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
80508c70cfbSmrg  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
806602e473dSmrg
80708c70cfbSmrg  dnl Use the values of $prefix and $exec_prefix for the corresponding
80808c70cfbSmrg  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
80908c70cfbSmrg  dnl distinct variables so they can be overridden if need be.  However,
81008c70cfbSmrg  dnl general consensus is that you shouldn't need this ability.
811602e473dSmrg
81208c70cfbSmrg  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
81308c70cfbSmrg  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
814602e473dSmrg
81508c70cfbSmrg  dnl At times (like when building shared libraries) you may want
81608c70cfbSmrg  dnl to know which OS platform Python thinks this is.
817602e473dSmrg
81808c70cfbSmrg  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
81908c70cfbSmrg    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
82008c70cfbSmrg  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
821602e473dSmrg
82208c70cfbSmrg  # Just factor out some code duplication.
82308c70cfbSmrg  am_python_setup_sysconfig="\
82408c70cfbSmrgimport sys
82508c70cfbSmrg# Prefer sysconfig over distutils.sysconfig, for better compatibility
82608c70cfbSmrg# with python 3.x.  See automake bug#10227.
82708c70cfbSmrgtry:
82808c70cfbSmrg    import sysconfig
82908c70cfbSmrgexcept ImportError:
83008c70cfbSmrg    can_use_sysconfig = 0
83108c70cfbSmrgelse:
83208c70cfbSmrg    can_use_sysconfig = 1
83308c70cfbSmrg# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
83408c70cfbSmrg# <https://github.com/pypa/virtualenv/issues/118>
83508c70cfbSmrgtry:
83608c70cfbSmrg    from platform import python_implementation
83708c70cfbSmrg    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
83808c70cfbSmrg        can_use_sysconfig = 0
83908c70cfbSmrgexcept ImportError:
84008c70cfbSmrg    pass"
841602e473dSmrg
84208c70cfbSmrg  dnl Set up 4 directories:
843602e473dSmrg
84408c70cfbSmrg  dnl pythondir -- where to install python scripts.  This is the
84508c70cfbSmrg  dnl   site-packages directory, not the python standard library
84608c70cfbSmrg  dnl   directory like in previous automake betas.  This behavior
84708c70cfbSmrg  dnl   is more consistent with lispdir.m4 for example.
84808c70cfbSmrg  dnl Query distutils for this directory.
84908c70cfbSmrg  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
85008c70cfbSmrg    [am_cv_python_pythondir],
85108c70cfbSmrg    [if test "x$prefix" = xNONE
85208c70cfbSmrg     then
85308c70cfbSmrg       am_py_prefix=$ac_default_prefix
85408c70cfbSmrg     else
85508c70cfbSmrg       am_py_prefix=$prefix
85608c70cfbSmrg     fi
85708c70cfbSmrg     am_cv_python_pythondir=`$PYTHON -c "
85808c70cfbSmrg$am_python_setup_sysconfig
85908c70cfbSmrgif can_use_sysconfig:
86008c70cfbSmrg    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
86108c70cfbSmrgelse:
86208c70cfbSmrg    from distutils import sysconfig
86308c70cfbSmrg    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
86408c70cfbSmrgsys.stdout.write(sitedir)"`
86508c70cfbSmrg     case $am_cv_python_pythondir in
86608c70cfbSmrg     $am_py_prefix*)
86708c70cfbSmrg       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
86808c70cfbSmrg       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
86908c70cfbSmrg       ;;
87008c70cfbSmrg     *)
87108c70cfbSmrg       case $am_py_prefix in
87208c70cfbSmrg         /usr|/System*) ;;
87308c70cfbSmrg         *)
87408c70cfbSmrg	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
87508c70cfbSmrg	  ;;
87608c70cfbSmrg       esac
87708c70cfbSmrg       ;;
87808c70cfbSmrg     esac
87908c70cfbSmrg    ])
88008c70cfbSmrg  AC_SUBST([pythondir], [$am_cv_python_pythondir])
881602e473dSmrg
88208c70cfbSmrg  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
88308c70cfbSmrg  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
88408c70cfbSmrg  dnl   more consistent with the rest of automake.
885602e473dSmrg
88608c70cfbSmrg  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
887602e473dSmrg
88808c70cfbSmrg  dnl pyexecdir -- directory for installing python extension modules
88908c70cfbSmrg  dnl   (shared libraries)
89008c70cfbSmrg  dnl Query distutils for this directory.
89108c70cfbSmrg  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
89208c70cfbSmrg    [am_cv_python_pyexecdir],
89308c70cfbSmrg    [if test "x$exec_prefix" = xNONE
89408c70cfbSmrg     then
89508c70cfbSmrg       am_py_exec_prefix=$am_py_prefix
89608c70cfbSmrg     else
89708c70cfbSmrg       am_py_exec_prefix=$exec_prefix
89808c70cfbSmrg     fi
89908c70cfbSmrg     am_cv_python_pyexecdir=`$PYTHON -c "
90008c70cfbSmrg$am_python_setup_sysconfig
90108c70cfbSmrgif can_use_sysconfig:
90208c70cfbSmrg    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
90308c70cfbSmrgelse:
90408c70cfbSmrg    from distutils import sysconfig
90508c70cfbSmrg    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
90608c70cfbSmrgsys.stdout.write(sitedir)"`
90708c70cfbSmrg     case $am_cv_python_pyexecdir in
90808c70cfbSmrg     $am_py_exec_prefix*)
90908c70cfbSmrg       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
91008c70cfbSmrg       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
91108c70cfbSmrg       ;;
91208c70cfbSmrg     *)
91308c70cfbSmrg       case $am_py_exec_prefix in
91408c70cfbSmrg         /usr|/System*) ;;
91508c70cfbSmrg         *)
91608c70cfbSmrg	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
91708c70cfbSmrg	   ;;
91808c70cfbSmrg       esac
91908c70cfbSmrg       ;;
92008c70cfbSmrg     esac
92108c70cfbSmrg    ])
92208c70cfbSmrg  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
923602e473dSmrg
92408c70cfbSmrg  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
92521298544Smrg
92608c70cfbSmrg  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
927602e473dSmrg
92808c70cfbSmrg  dnl Run any user-specified action.
92908c70cfbSmrg  $2
93008c70cfbSmrg  fi
931602e473dSmrg
932602e473dSmrg])
933602e473dSmrg
934602e473dSmrg
93508c70cfbSmrg# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
93608c70cfbSmrg# ---------------------------------------------------------------------------
93708c70cfbSmrg# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
93808c70cfbSmrg# Run ACTION-IF-FALSE otherwise.
93908c70cfbSmrg# This test uses sys.hexversion instead of the string equivalent (first
94008c70cfbSmrg# word of sys.version), in order to cope with versions such as 2.2c1.
94108c70cfbSmrg# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
94208c70cfbSmrgAC_DEFUN([AM_PYTHON_CHECK_VERSION],
94308c70cfbSmrg [prog="import sys
94408c70cfbSmrg# split strings by '.' and convert to numeric.  Append some zeros
94508c70cfbSmrg# because we need at least 4 digits for the hex conversion.
94608c70cfbSmrg# map returns an iterator in Python 3.0 and a list in 2.x
94708c70cfbSmrgminver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
94808c70cfbSmrgminverhex = 0
94908c70cfbSmrg# xrange is not present in Python 3.0 and range returns an iterator
95008c70cfbSmrgfor i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
95108c70cfbSmrgsys.exit(sys.hexversion < minverhex)"
95208c70cfbSmrg  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
953602e473dSmrg
95408c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
95508c70cfbSmrg#
95608c70cfbSmrg# This file is free software; the Free Software Foundation
95708c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
95808c70cfbSmrg# with or without modifications, as long as this notice is preserved.
959602e473dSmrg
96008c70cfbSmrg# AM_RUN_LOG(COMMAND)
96108c70cfbSmrg# -------------------
96208c70cfbSmrg# Run COMMAND, save the exit status in ac_status, and log it.
96308c70cfbSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
96408c70cfbSmrgAC_DEFUN([AM_RUN_LOG],
96508c70cfbSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
96608c70cfbSmrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
96708c70cfbSmrg   ac_status=$?
96808c70cfbSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
96908c70cfbSmrg   (exit $ac_status); }])
970602e473dSmrg
97108c70cfbSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
972602e473dSmrg
97308c70cfbSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
97408c70cfbSmrg#
97508c70cfbSmrg# This file is free software; the Free Software Foundation
97608c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
97708c70cfbSmrg# with or without modifications, as long as this notice is preserved.
978602e473dSmrg
97908c70cfbSmrg# AM_SANITY_CHECK
98008c70cfbSmrg# ---------------
98108c70cfbSmrgAC_DEFUN([AM_SANITY_CHECK],
98208c70cfbSmrg[AC_MSG_CHECKING([whether build environment is sane])
98308c70cfbSmrg# Reject unsafe characters in $srcdir or the absolute working directory
98408c70cfbSmrg# name.  Accept space and tab only in the latter.
98508c70cfbSmrgam_lf='
98608c70cfbSmrg'
98708c70cfbSmrgcase `pwd` in
98808c70cfbSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
98908c70cfbSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
99008c70cfbSmrgesac
99108c70cfbSmrgcase $srcdir in
99208c70cfbSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
99308c70cfbSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
99408c70cfbSmrgesac
995602e473dSmrg
99608c70cfbSmrg# Do 'set' in a subshell so we don't clobber the current shell's
99708c70cfbSmrg# arguments.  Must try -L first in case configure is actually a
99808c70cfbSmrg# symlink; some systems play weird games with the mod time of symlinks
99908c70cfbSmrg# (eg FreeBSD returns the mod time of the symlink's containing
100008c70cfbSmrg# directory).
100108c70cfbSmrgif (
100208c70cfbSmrg   am_has_slept=no
100308c70cfbSmrg   for am_try in 1 2; do
100408c70cfbSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
100508c70cfbSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
100608c70cfbSmrg     if test "$[*]" = "X"; then
100708c70cfbSmrg	# -L didn't work.
100808c70cfbSmrg	set X `ls -t "$srcdir/configure" conftest.file`
100908c70cfbSmrg     fi
101008c70cfbSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
101108c70cfbSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
101208c70cfbSmrg
101308c70cfbSmrg	# If neither matched, then we have a broken ls.  This can happen
101408c70cfbSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
101508c70cfbSmrg	# broken ls alias from the environment.  This has actually
101608c70cfbSmrg	# happened.  Such a system could not be considered "sane".
101708c70cfbSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
101808c70cfbSmrg  alias in your environment])
101908c70cfbSmrg     fi
102008c70cfbSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
102108c70cfbSmrg       break
102208c70cfbSmrg     fi
102308c70cfbSmrg     # Just in case.
102408c70cfbSmrg     sleep 1
102508c70cfbSmrg     am_has_slept=yes
102608c70cfbSmrg   done
102708c70cfbSmrg   test "$[2]" = conftest.file
102808c70cfbSmrg   )
102908c70cfbSmrgthen
103008c70cfbSmrg   # Ok.
103108c70cfbSmrg   :
103208c70cfbSmrgelse
103308c70cfbSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
103408c70cfbSmrgCheck your system clock])
103508c70cfbSmrgfi
103608c70cfbSmrgAC_MSG_RESULT([yes])
103708c70cfbSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
103808c70cfbSmrg# generated files are strictly newer.
103908c70cfbSmrgam_sleep_pid=
104008c70cfbSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
104108c70cfbSmrg  ( sleep 1 ) &
104208c70cfbSmrg  am_sleep_pid=$!
104308c70cfbSmrgfi
104408c70cfbSmrgAC_CONFIG_COMMANDS_PRE(
104508c70cfbSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
104608c70cfbSmrg   if test -n "$am_sleep_pid"; then
104708c70cfbSmrg     # Hide warnings about reused PIDs.
104808c70cfbSmrg     wait $am_sleep_pid 2>/dev/null
104908c70cfbSmrg   fi
105008c70cfbSmrg   AC_MSG_RESULT([done])])
105108c70cfbSmrgrm -f conftest.file
105208c70cfbSmrg])
1053602e473dSmrg
105408c70cfbSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc.
105508c70cfbSmrg#
105608c70cfbSmrg# This file is free software; the Free Software Foundation
105708c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
105808c70cfbSmrg# with or without modifications, as long as this notice is preserved.
1059602e473dSmrg
106008c70cfbSmrg# AM_SILENT_RULES([DEFAULT])
106108c70cfbSmrg# --------------------------
106208c70cfbSmrg# Enable less verbose build rules; with the default set to DEFAULT
106308c70cfbSmrg# ("yes" being less verbose, "no" or empty being verbose).
106408c70cfbSmrgAC_DEFUN([AM_SILENT_RULES],
106508c70cfbSmrg[AC_ARG_ENABLE([silent-rules], [dnl
106608c70cfbSmrgAS_HELP_STRING(
106708c70cfbSmrg  [--enable-silent-rules],
106808c70cfbSmrg  [less verbose build output (undo: "make V=1")])
106908c70cfbSmrgAS_HELP_STRING(
107008c70cfbSmrg  [--disable-silent-rules],
107108c70cfbSmrg  [verbose build output (undo: "make V=0")])dnl
107208c70cfbSmrg])
107308c70cfbSmrgcase $enable_silent_rules in @%:@ (((
107408c70cfbSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
107508c70cfbSmrg   no) AM_DEFAULT_VERBOSITY=1;;
107608c70cfbSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
107708c70cfbSmrgesac
107808c70cfbSmrgdnl
107908c70cfbSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
108008c70cfbSmrgdnl do not support nested variable expansions.
108108c70cfbSmrgdnl See automake bug#9928 and bug#10237.
108208c70cfbSmrgam_make=${MAKE-make}
108308c70cfbSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
108408c70cfbSmrg   [am_cv_make_support_nested_variables],
108508c70cfbSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
108608c70cfbSmrgBAR0=false
108708c70cfbSmrgBAR1=true
108808c70cfbSmrgV=1
108908c70cfbSmrgam__doit:
109008c70cfbSmrg	@$(TRUE)
109108c70cfbSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
109208c70cfbSmrg  am_cv_make_support_nested_variables=yes
109308c70cfbSmrgelse
109408c70cfbSmrg  am_cv_make_support_nested_variables=no
109508c70cfbSmrgfi])
109608c70cfbSmrgif test $am_cv_make_support_nested_variables = yes; then
109708c70cfbSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
109808c70cfbSmrg  AM_V='$(V)'
109908c70cfbSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
110008c70cfbSmrgelse
110108c70cfbSmrg  AM_V=$AM_DEFAULT_VERBOSITY
110208c70cfbSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1103602e473dSmrgfi
110408c70cfbSmrgAC_SUBST([AM_V])dnl
110508c70cfbSmrgAM_SUBST_NOTMAKE([AM_V])dnl
110608c70cfbSmrgAC_SUBST([AM_DEFAULT_V])dnl
110708c70cfbSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
110808c70cfbSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
110908c70cfbSmrgAM_BACKSLASH='\'
111008c70cfbSmrgAC_SUBST([AM_BACKSLASH])dnl
111108c70cfbSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
111208c70cfbSmrg])
1113602e473dSmrg
111408c70cfbSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
111508c70cfbSmrg#
111608c70cfbSmrg# This file is free software; the Free Software Foundation
111708c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
111808c70cfbSmrg# with or without modifications, as long as this notice is preserved.
1119602e473dSmrg
112008c70cfbSmrg# AM_PROG_INSTALL_STRIP
112108c70cfbSmrg# ---------------------
112208c70cfbSmrg# One issue with vendor 'install' (even GNU) is that you can't
112308c70cfbSmrg# specify the program used to strip binaries.  This is especially
112408c70cfbSmrg# annoying in cross-compiling environments, where the build's strip
112508c70cfbSmrg# is unlikely to handle the host's binaries.
112608c70cfbSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
112708c70cfbSmrg# always use install-sh in "make install-strip", and initialize
112808c70cfbSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
112908c70cfbSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
113008c70cfbSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
113108c70cfbSmrg# Installed binaries are usually stripped using 'strip' when the user
113208c70cfbSmrg# run "make install-strip".  However 'strip' might not be the right
113308c70cfbSmrg# tool to use in cross-compilation environments, therefore Automake
113408c70cfbSmrg# will honor the 'STRIP' environment variable to overrule this program.
113508c70cfbSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
113608c70cfbSmrgif test "$cross_compiling" != no; then
113708c70cfbSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
113808c70cfbSmrgfi
113908c70cfbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
114008c70cfbSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
1141602e473dSmrg
114208c70cfbSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc.
114308c70cfbSmrg#
114408c70cfbSmrg# This file is free software; the Free Software Foundation
114508c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
114608c70cfbSmrg# with or without modifications, as long as this notice is preserved.
1147602e473dSmrg
114808c70cfbSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
114908c70cfbSmrg# ---------------------------
115008c70cfbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
115108c70cfbSmrg# This macro is traced by Automake.
115208c70cfbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
1153602e473dSmrg
115408c70cfbSmrg# AM_SUBST_NOTMAKE(VARIABLE)
115508c70cfbSmrg# --------------------------
115608c70cfbSmrg# Public sister of _AM_SUBST_NOTMAKE.
115708c70cfbSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1158602e473dSmrg
115908c70cfbSmrg# Check how to create a tarball.                            -*- Autoconf -*-
1160602e473dSmrg
116108c70cfbSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc.
1162602e473dSmrg#
116308c70cfbSmrg# This file is free software; the Free Software Foundation
116408c70cfbSmrg# gives unlimited permission to copy and/or distribute it,
116508c70cfbSmrg# with or without modifications, as long as this notice is preserved.
1166602e473dSmrg
116708c70cfbSmrg# _AM_PROG_TAR(FORMAT)
116808c70cfbSmrg# --------------------
116908c70cfbSmrg# Check how to create a tarball in format FORMAT.
117008c70cfbSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
117108c70cfbSmrg#
117208c70cfbSmrg# Substitute a variable $(am__tar) that is a command
117308c70cfbSmrg# writing to stdout a FORMAT-tarball containing the directory
117408c70cfbSmrg# $tardir.
117508c70cfbSmrg#     tardir=directory && $(am__tar) > result.tar
117608c70cfbSmrg#
117708c70cfbSmrg# Substitute a variable $(am__untar) that extract such
117808c70cfbSmrg# a tarball read from stdin.
117908c70cfbSmrg#     $(am__untar) < result.tar
118008c70cfbSmrg#
118108c70cfbSmrgAC_DEFUN([_AM_PROG_TAR],
118208c70cfbSmrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
118308c70cfbSmrg# in the wild :-(  We should find a proper way to deprecate it ...
118408c70cfbSmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
1185602e473dSmrg
118608c70cfbSmrg# We'll loop over all known methods to create a tar archive until one works.
118708c70cfbSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1188602e473dSmrg
118908c70cfbSmrgm4_if([$1], [v7],
119008c70cfbSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
119108c70cfbSmrg
119208c70cfbSmrg  [m4_case([$1],
119308c70cfbSmrg    [ustar],
119408c70cfbSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
119508c70cfbSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
119608c70cfbSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
119708c70cfbSmrg      # and bug#13588).
119808c70cfbSmrg      am_max_uid=2097151 # 2^21 - 1
119908c70cfbSmrg      am_max_gid=$am_max_uid
120008c70cfbSmrg      # The $UID and $GID variables are not portable, so we need to resort
120108c70cfbSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
120208c70cfbSmrg      # below are definitely unexpected, so allow the users to see them
120308c70cfbSmrg      # (that is, avoid stderr redirection).
120408c70cfbSmrg      am_uid=`id -u || echo unknown`
120508c70cfbSmrg      am_gid=`id -g || echo unknown`
120608c70cfbSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
120708c70cfbSmrg      if test $am_uid -le $am_max_uid; then
120808c70cfbSmrg         AC_MSG_RESULT([yes])
120908c70cfbSmrg      else
121008c70cfbSmrg         AC_MSG_RESULT([no])
121108c70cfbSmrg         _am_tools=none
121208c70cfbSmrg      fi
121308c70cfbSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
121408c70cfbSmrg      if test $am_gid -le $am_max_gid; then
121508c70cfbSmrg         AC_MSG_RESULT([yes])
121608c70cfbSmrg      else
121708c70cfbSmrg        AC_MSG_RESULT([no])
121808c70cfbSmrg        _am_tools=none
121908c70cfbSmrg      fi],
1220602e473dSmrg
122108c70cfbSmrg  [pax],
122208c70cfbSmrg    [],
1223602e473dSmrg
122408c70cfbSmrg  [m4_fatal([Unknown tar format])])
1225602e473dSmrg
122608c70cfbSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
1227602e473dSmrg
122808c70cfbSmrg  # Go ahead even if we have the value already cached.  We do so because we
122908c70cfbSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
123008c70cfbSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1231602e473dSmrg
123208c70cfbSmrg  for _am_tool in $_am_tools; do
123308c70cfbSmrg    case $_am_tool in
123408c70cfbSmrg    gnutar)
123508c70cfbSmrg      for _am_tar in tar gnutar gtar; do
123608c70cfbSmrg        AM_RUN_LOG([$_am_tar --version]) && break
123708c70cfbSmrg      done
123808c70cfbSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
123908c70cfbSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
124008c70cfbSmrg      am__untar="$_am_tar -xf -"
124108c70cfbSmrg      ;;
124208c70cfbSmrg    plaintar)
124308c70cfbSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
124408c70cfbSmrg      # ustar tarball either.
124508c70cfbSmrg      (tar --version) >/dev/null 2>&1 && continue
124608c70cfbSmrg      am__tar='tar chf - "$$tardir"'
124708c70cfbSmrg      am__tar_='tar chf - "$tardir"'
124808c70cfbSmrg      am__untar='tar xf -'
124908c70cfbSmrg      ;;
125008c70cfbSmrg    pax)
125108c70cfbSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
125208c70cfbSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
125308c70cfbSmrg      am__untar='pax -r'
125408c70cfbSmrg      ;;
125508c70cfbSmrg    cpio)
125608c70cfbSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
125708c70cfbSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
125808c70cfbSmrg      am__untar='cpio -i -H $1 -d'
125908c70cfbSmrg      ;;
126008c70cfbSmrg    none)
126108c70cfbSmrg      am__tar=false
126208c70cfbSmrg      am__tar_=false
126308c70cfbSmrg      am__untar=false
126408c70cfbSmrg      ;;
126508c70cfbSmrg    esac
1266602e473dSmrg
126708c70cfbSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
126808c70cfbSmrg    # and am__untar set.
126908c70cfbSmrg    test -n "${am_cv_prog_tar_$1}" && break
127008c70cfbSmrg
127108c70cfbSmrg    # tar/untar a dummy directory, and stop if the command works.
127208c70cfbSmrg    rm -rf conftest.dir
127308c70cfbSmrg    mkdir conftest.dir
127408c70cfbSmrg    echo GrepMe > conftest.dir/file
127508c70cfbSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
127608c70cfbSmrg    rm -rf conftest.dir
127708c70cfbSmrg    if test -s conftest.tar; then
127808c70cfbSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
127908c70cfbSmrg      AM_RUN_LOG([cat conftest.dir/file])
128008c70cfbSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
128108c70cfbSmrg    fi
128208c70cfbSmrg  done
128308c70cfbSmrg  rm -rf conftest.dir
1284602e473dSmrg
128508c70cfbSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
128608c70cfbSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1287602e473dSmrg
128808c70cfbSmrgAC_SUBST([am__tar])
128908c70cfbSmrgAC_SUBST([am__untar])
129008c70cfbSmrg]) # _AM_PROG_TAR
1291602e473dSmrg
129208c70cfbSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
129308c70cfbSmrg#
129408c70cfbSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
129508c70cfbSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
129608c70cfbSmrg#                 Foundation, Inc.
129708c70cfbSmrg#   Written by Gordon Matzigkeit, 1996
129808c70cfbSmrg#
129908c70cfbSmrg# This file is free software; the Free Software Foundation gives
130008c70cfbSmrg# unlimited permission to copy and/or distribute it, with or without
130108c70cfbSmrg# modifications, as long as this notice is preserved.
1302602e473dSmrg
130308c70cfbSmrgm4_define([_LT_COPYING], [dnl
130408c70cfbSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
130508c70cfbSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
130608c70cfbSmrg#                 Foundation, Inc.
130708c70cfbSmrg#   Written by Gordon Matzigkeit, 1996
130808c70cfbSmrg#
130908c70cfbSmrg#   This file is part of GNU Libtool.
131008c70cfbSmrg#
131108c70cfbSmrg# GNU Libtool is free software; you can redistribute it and/or
131208c70cfbSmrg# modify it under the terms of the GNU General Public License as
131308c70cfbSmrg# published by the Free Software Foundation; either version 2 of
131408c70cfbSmrg# the License, or (at your option) any later version.
131508c70cfbSmrg#
131608c70cfbSmrg# As a special exception to the GNU General Public License,
131708c70cfbSmrg# if you distribute this file as part of a program or library that
131808c70cfbSmrg# is built using GNU Libtool, you may include this file under the
131908c70cfbSmrg# same distribution terms that you use for the rest of that program.
132008c70cfbSmrg#
132108c70cfbSmrg# GNU Libtool is distributed in the hope that it will be useful,
132208c70cfbSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
132308c70cfbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
132408c70cfbSmrg# GNU General Public License for more details.
132508c70cfbSmrg#
132608c70cfbSmrg# You should have received a copy of the GNU General Public License
132708c70cfbSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
132808c70cfbSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
132908c70cfbSmrg# obtained by writing to the Free Software Foundation, Inc.,
133008c70cfbSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
133108c70cfbSmrg])
1332602e473dSmrg
133308c70cfbSmrg# serial 57 LT_INIT
1334602e473dSmrg
1335602e473dSmrg
133608c70cfbSmrg# LT_PREREQ(VERSION)
133708c70cfbSmrg# ------------------
133808c70cfbSmrg# Complain and exit if this libtool version is less that VERSION.
133908c70cfbSmrgm4_defun([LT_PREREQ],
134008c70cfbSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
134108c70cfbSmrg       [m4_default([$3],
134208c70cfbSmrg		   [m4_fatal([Libtool version $1 or higher is required],
134308c70cfbSmrg		             63)])],
134408c70cfbSmrg       [$2])])
134521298544Smrg
134621298544Smrg
134708c70cfbSmrg# _LT_CHECK_BUILDDIR
134808c70cfbSmrg# ------------------
134908c70cfbSmrg# Complain if the absolute build directory name contains unusual characters
135008c70cfbSmrgm4_defun([_LT_CHECK_BUILDDIR],
135108c70cfbSmrg[case `pwd` in
135208c70cfbSmrg  *\ * | *\	*)
135308c70cfbSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
135408c70cfbSmrgesac
135508c70cfbSmrg])
1356602e473dSmrg
1357602e473dSmrg
135808c70cfbSmrg# LT_INIT([OPTIONS])
135908c70cfbSmrg# ------------------
136008c70cfbSmrgAC_DEFUN([LT_INIT],
136108c70cfbSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
136208c70cfbSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
136308c70cfbSmrgAC_BEFORE([$0], [LT_LANG])dnl
136408c70cfbSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
136508c70cfbSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
136608c70cfbSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
1367602e473dSmrg
136808c70cfbSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
136908c70cfbSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
137008c70cfbSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
137108c70cfbSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
137208c70cfbSmrgdnl unless we require an AC_DEFUNed macro:
137308c70cfbSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
137408c70cfbSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
137508c70cfbSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
137608c70cfbSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
137708c70cfbSmrgm4_require([_LT_PROG_LTMAIN])dnl
1378602e473dSmrg
137908c70cfbSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
138021298544Smrg
138108c70cfbSmrgdnl Parse OPTIONS
138208c70cfbSmrg_LT_SET_OPTIONS([$0], [$1])
1383602e473dSmrg
138408c70cfbSmrg# This can be used to rebuild libtool when needed
138508c70cfbSmrgLIBTOOL_DEPS="$ltmain"
1386602e473dSmrg
138708c70cfbSmrg# Always use our own libtool.
138808c70cfbSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
138908c70cfbSmrgAC_SUBST(LIBTOOL)dnl
1390602e473dSmrg
139108c70cfbSmrg_LT_SETUP
1392602e473dSmrg
139308c70cfbSmrg# Only expand once:
139408c70cfbSmrgm4_define([LT_INIT])
139508c70cfbSmrg])# LT_INIT
1396602e473dSmrg
139708c70cfbSmrg# Old names:
139808c70cfbSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
139908c70cfbSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
140008c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
140108c70cfbSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
140208c70cfbSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1403602e473dSmrg
1404602e473dSmrg
140508c70cfbSmrg# _LT_CC_BASENAME(CC)
140608c70cfbSmrg# -------------------
140708c70cfbSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
140808c70cfbSmrgm4_defun([_LT_CC_BASENAME],
140908c70cfbSmrg[for cc_temp in $1""; do
141008c70cfbSmrg  case $cc_temp in
141108c70cfbSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
141208c70cfbSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
141308c70cfbSmrg    \-*) ;;
141408c70cfbSmrg    *) break;;
141508c70cfbSmrg  esac
141608c70cfbSmrgdone
141708c70cfbSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
141808c70cfbSmrg])
1419602e473dSmrg
1420602e473dSmrg
142108c70cfbSmrg# _LT_FILEUTILS_DEFAULTS
142208c70cfbSmrg# ----------------------
142308c70cfbSmrg# It is okay to use these file commands and assume they have been set
142408c70cfbSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
142508c70cfbSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
142608c70cfbSmrg[: ${CP="cp -f"}
142708c70cfbSmrg: ${MV="mv -f"}
142808c70cfbSmrg: ${RM="rm -f"}
142908c70cfbSmrg])# _LT_FILEUTILS_DEFAULTS
1430602e473dSmrg
1431602e473dSmrg
143208c70cfbSmrg# _LT_SETUP
143308c70cfbSmrg# ---------
143408c70cfbSmrgm4_defun([_LT_SETUP],
143508c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
143608c70cfbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
143708c70cfbSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
143808c70cfbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1439602e473dSmrg
144008c70cfbSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
144108c70cfbSmrgdnl
144208c70cfbSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
144308c70cfbSmrg_LT_DECL([], [host], [0])dnl
144408c70cfbSmrg_LT_DECL([], [host_os], [0])dnl
144508c70cfbSmrgdnl
144608c70cfbSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
144708c70cfbSmrg_LT_DECL([], [build], [0])dnl
144808c70cfbSmrg_LT_DECL([], [build_os], [0])dnl
144908c70cfbSmrgdnl
145008c70cfbSmrgAC_REQUIRE([AC_PROG_CC])dnl
145108c70cfbSmrgAC_REQUIRE([LT_PATH_LD])dnl
145208c70cfbSmrgAC_REQUIRE([LT_PATH_NM])dnl
145308c70cfbSmrgdnl
145408c70cfbSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
145508c70cfbSmrgtest -z "$LN_S" && LN_S="ln -s"
145608c70cfbSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
145708c70cfbSmrgdnl
145808c70cfbSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
145908c70cfbSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
146008c70cfbSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
146108c70cfbSmrgdnl
146208c70cfbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
146308c70cfbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
146408c70cfbSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
146508c70cfbSmrgm4_require([_LT_CMD_RELOAD])dnl
146608c70cfbSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
146708c70cfbSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
146808c70cfbSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
146908c70cfbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
147008c70cfbSmrgm4_require([_LT_WITH_SYSROOT])dnl
147121298544Smrg
147208c70cfbSmrg_LT_CONFIG_LIBTOOL_INIT([
147308c70cfbSmrg# See if we are running on zsh, and set the options which allow our
147408c70cfbSmrg# commands through without removal of \ escapes INIT.
147508c70cfbSmrgif test -n "\${ZSH_VERSION+set}" ; then
147608c70cfbSmrg   setopt NO_GLOB_SUBST
147708c70cfbSmrgfi
1478602e473dSmrg])
147908c70cfbSmrgif test -n "${ZSH_VERSION+set}" ; then
148008c70cfbSmrg   setopt NO_GLOB_SUBST
148108c70cfbSmrgfi
1482602e473dSmrg
148308c70cfbSmrg_LT_CHECK_OBJDIR
1484602e473dSmrg
148508c70cfbSmrgm4_require([_LT_TAG_COMPILER])dnl
1486602e473dSmrg
148708c70cfbSmrgcase $host_os in
148808c70cfbSmrgaix3*)
148908c70cfbSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
149008c70cfbSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
149108c70cfbSmrg  # vanish in a puff of smoke.
149208c70cfbSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
149308c70cfbSmrg    COLLECT_NAMES=
149408c70cfbSmrg    export COLLECT_NAMES
149521298544Smrg  fi
149608c70cfbSmrg  ;;
149708c70cfbSmrgesac
1498602e473dSmrg
149908c70cfbSmrg# Global variables:
150008c70cfbSmrgofile=libtool
150108c70cfbSmrgcan_build_shared=yes
1502602e473dSmrg
150308c70cfbSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
150408c70cfbSmrg# which needs '.lib').
150508c70cfbSmrglibext=a
1506602e473dSmrg
150708c70cfbSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1508602e473dSmrg
150908c70cfbSmrgold_CC="$CC"
151008c70cfbSmrgold_CFLAGS="$CFLAGS"
151121298544Smrg
151208c70cfbSmrg# Set sane defaults for various variables
151308c70cfbSmrgtest -z "$CC" && CC=cc
151408c70cfbSmrgtest -z "$LTCC" && LTCC=$CC
151508c70cfbSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
151608c70cfbSmrgtest -z "$LD" && LD=ld
151708c70cfbSmrgtest -z "$ac_objext" && ac_objext=o
1518602e473dSmrg
151908c70cfbSmrg_LT_CC_BASENAME([$compiler])
1520602e473dSmrg
152108c70cfbSmrg# Only perform the check for file, if the check method requires it
152208c70cfbSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
152308c70cfbSmrgcase $deplibs_check_method in
152408c70cfbSmrgfile_magic*)
152508c70cfbSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
152608c70cfbSmrg    _LT_PATH_MAGIC
152708c70cfbSmrg  fi
152808c70cfbSmrg  ;;
152921298544Smrgesac
1530602e473dSmrg
153108c70cfbSmrg# Use C for the default configuration in the libtool script
153208c70cfbSmrgLT_SUPPORTED_TAG([CC])
153308c70cfbSmrg_LT_LANG_C_CONFIG
153408c70cfbSmrg_LT_LANG_DEFAULT_CONFIG
153508c70cfbSmrg_LT_CONFIG_COMMANDS
153608c70cfbSmrg])# _LT_SETUP
1537602e473dSmrg
1538602e473dSmrg
153908c70cfbSmrg# _LT_PREPARE_SED_QUOTE_VARS
154008c70cfbSmrg# --------------------------
154108c70cfbSmrg# Define a few sed substitution that help us do robust quoting.
154208c70cfbSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
154308c70cfbSmrg[# Backslashify metacharacters that are still active within
154408c70cfbSmrg# double-quoted strings.
154508c70cfbSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1546602e473dSmrg
154708c70cfbSmrg# Same as above, but do not quote variable references.
154808c70cfbSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
154921298544Smrg
155008c70cfbSmrg# Sed substitution to delay expansion of an escaped shell variable in a
155108c70cfbSmrg# double_quote_subst'ed string.
155208c70cfbSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
155321298544Smrg
155408c70cfbSmrg# Sed substitution to delay expansion of an escaped single quote.
155508c70cfbSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
155621298544Smrg
155708c70cfbSmrg# Sed substitution to avoid accidental globbing in evaled expressions
155808c70cfbSmrgno_glob_subst='s/\*/\\\*/g'
155908c70cfbSmrg])
156008c70cfbSmrg
156108c70cfbSmrg# _LT_PROG_LTMAIN
1562602e473dSmrg# ---------------
156308c70cfbSmrg# Note that this code is called both from `configure', and `config.status'
156408c70cfbSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
156508c70cfbSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
156608c70cfbSmrg# so we pass a copy along to make sure it has a sensible value anyway.
156708c70cfbSmrgm4_defun([_LT_PROG_LTMAIN],
156808c70cfbSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
156908c70cfbSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
157008c70cfbSmrgltmain="$ac_aux_dir/ltmain.sh"
157108c70cfbSmrg])# _LT_PROG_LTMAIN
1572602e473dSmrg
1573602e473dSmrg
1574602e473dSmrg
157508c70cfbSmrg# So that we can recreate a full libtool script including additional
157608c70cfbSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
157708c70cfbSmrg# in macros and then make a single call at the end using the `libtool'
157808c70cfbSmrg# label.
1579602e473dSmrg
1580602e473dSmrg
158108c70cfbSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
158208c70cfbSmrg# ----------------------------------------
158308c70cfbSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
158408c70cfbSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
158508c70cfbSmrg[m4_ifval([$1],
158608c70cfbSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
158708c70cfbSmrg                     [$1
158808c70cfbSmrg])])])
1589602e473dSmrg
159008c70cfbSmrg# Initialize.
159108c70cfbSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
159221298544Smrg
159321298544Smrg
159408c70cfbSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
159508c70cfbSmrg# ------------------------------
159608c70cfbSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
159708c70cfbSmrgm4_define([_LT_CONFIG_LIBTOOL],
159808c70cfbSmrg[m4_ifval([$1],
159908c70cfbSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
160008c70cfbSmrg                     [$1
160108c70cfbSmrg])])])
160221298544Smrg
160308c70cfbSmrg# Initialize.
160408c70cfbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
160521298544Smrg
1606602e473dSmrg
160708c70cfbSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
160808c70cfbSmrg# -----------------------------------------------------
160908c70cfbSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
161008c70cfbSmrg[_LT_CONFIG_LIBTOOL([$1])
161108c70cfbSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
161208c70cfbSmrg])
1613602e473dSmrg
1614602e473dSmrg
161508c70cfbSmrg# _LT_FORMAT_COMMENT([COMMENT])
161608c70cfbSmrg# -----------------------------
161708c70cfbSmrg# Add leading comment marks to the start of each line, and a trailing
161808c70cfbSmrg# full-stop to the whole comment if one is not present already.
161908c70cfbSmrgm4_define([_LT_FORMAT_COMMENT],
162008c70cfbSmrg[m4_ifval([$1], [
162108c70cfbSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
162208c70cfbSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
162308c70cfbSmrg)])
1624602e473dSmrg
162521298544Smrg
1626602e473dSmrg
1627602e473dSmrg
162808c70cfbSmrg
162908c70cfbSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
163008c70cfbSmrg# -------------------------------------------------------------------
163108c70cfbSmrg# CONFIGNAME is the name given to the value in the libtool script.
163208c70cfbSmrg# VARNAME is the (base) name used in the configure script.
163308c70cfbSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
163408c70cfbSmrg# VARNAME.  Any other value will be used directly.
163508c70cfbSmrgm4_define([_LT_DECL],
163608c70cfbSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
163708c70cfbSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
163808c70cfbSmrg	[m4_ifval([$1], [$1], [$2])])
163908c70cfbSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
164008c70cfbSmrg    m4_ifval([$4],
164108c70cfbSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
164208c70cfbSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
164308c70cfbSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
1644602e473dSmrg])
1645602e473dSmrg
1646602e473dSmrg
164708c70cfbSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
164808c70cfbSmrg# --------------------------------------------------------
164908c70cfbSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1650602e473dSmrg
1651602e473dSmrg
165208c70cfbSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
165308c70cfbSmrg# ------------------------------------------------
165408c70cfbSmrgm4_define([lt_decl_tag_varnames],
165508c70cfbSmrg[_lt_decl_filter([tagged?], [yes], $@)])
165608c70cfbSmrg
165708c70cfbSmrg
165808c70cfbSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
165908c70cfbSmrg# ---------------------------------------------------------
166008c70cfbSmrgm4_define([_lt_decl_filter],
166108c70cfbSmrg[m4_case([$#],
166208c70cfbSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
166308c70cfbSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
166408c70cfbSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
166508c70cfbSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
166608c70cfbSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1667602e473dSmrg])
1668602e473dSmrg
1669602e473dSmrg
167008c70cfbSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
167108c70cfbSmrg# --------------------------------------------------
167208c70cfbSmrgm4_define([lt_decl_quote_varnames],
167308c70cfbSmrg[_lt_decl_filter([value], [1], $@)])
1674602e473dSmrg
1675602e473dSmrg
167608c70cfbSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
167708c70cfbSmrg# ---------------------------------------------------
167808c70cfbSmrgm4_define([lt_decl_dquote_varnames],
167908c70cfbSmrg[_lt_decl_filter([value], [2], $@)])
1680602e473dSmrg
1681602e473dSmrg
168208c70cfbSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
168308c70cfbSmrg# ---------------------------------------------------
168408c70cfbSmrgm4_define([lt_decl_varnames_tagged],
168508c70cfbSmrg[m4_assert([$# <= 2])dnl
168608c70cfbSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
168708c70cfbSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
168808c70cfbSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
168908c70cfbSmrgm4_define([_lt_decl_varnames_tagged],
169008c70cfbSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1691602e473dSmrg
1692602e473dSmrg
169308c70cfbSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
169408c70cfbSmrg# ------------------------------------------------
169508c70cfbSmrgm4_define([lt_decl_all_varnames],
169608c70cfbSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
169708c70cfbSmrg     m4_if([$2], [],
169808c70cfbSmrg	   m4_quote(lt_decl_varnames),
169908c70cfbSmrg	m4_quote(m4_shift($@))))[]dnl
170008c70cfbSmrg])
170108c70cfbSmrgm4_define([_lt_decl_all_varnames],
170208c70cfbSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
170308c70cfbSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
170408c70cfbSmrg])
170521298544Smrg
1706602e473dSmrg
170708c70cfbSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
170808c70cfbSmrg# ------------------------------------
170908c70cfbSmrg# Quote a variable value, and forward it to `config.status' so that its
171008c70cfbSmrg# declaration there will have the same value as in `configure'.  VARNAME
171108c70cfbSmrg# must have a single quote delimited value for this to work.
171208c70cfbSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
171308c70cfbSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1714602e473dSmrg
1715602e473dSmrg
171608c70cfbSmrg# _LT_CONFIG_STATUS_DECLARATIONS
171708c70cfbSmrg# ------------------------------
171808c70cfbSmrg# We delimit libtool config variables with single quotes, so when
171908c70cfbSmrg# we write them to config.status, we have to be sure to quote all
172008c70cfbSmrg# embedded single quotes properly.  In configure, this macro expands
172108c70cfbSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
172208c70cfbSmrg#
172308c70cfbSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
172408c70cfbSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
172508c70cfbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
172608c70cfbSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
172721298544Smrg
172808c70cfbSmrg
172908c70cfbSmrg# _LT_LIBTOOL_TAGS
173008c70cfbSmrg# ----------------
173108c70cfbSmrg# Output comment and list of tags supported by the script
173208c70cfbSmrgm4_defun([_LT_LIBTOOL_TAGS],
173308c70cfbSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
173408c70cfbSmrgavailable_tags="_LT_TAGS"dnl
1735602e473dSmrg])
1736602e473dSmrg
1737602e473dSmrg
173808c70cfbSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
173908c70cfbSmrg# -----------------------------------
174008c70cfbSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
174108c70cfbSmrg# expand to a commented shell variable setting:
174208c70cfbSmrg#
174308c70cfbSmrg#    # Some comment about what VAR is for.
174408c70cfbSmrg#    visible_name=$lt_internal_name
174508c70cfbSmrgm4_define([_LT_LIBTOOL_DECLARE],
174608c70cfbSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
174708c70cfbSmrg					   [description])))[]dnl
174808c70cfbSmrgm4_pushdef([_libtool_name],
174908c70cfbSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
175008c70cfbSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
175108c70cfbSmrg    [0], [_libtool_name=[$]$1],
175208c70cfbSmrg    [1], [_libtool_name=$lt_[]$1],
175308c70cfbSmrg    [2], [_libtool_name=$lt_[]$1],
175408c70cfbSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
175508c70cfbSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
175608c70cfbSmrg])
1757602e473dSmrg
1758602e473dSmrg
175908c70cfbSmrg# _LT_LIBTOOL_CONFIG_VARS
176008c70cfbSmrg# -----------------------
176108c70cfbSmrg# Produce commented declarations of non-tagged libtool config variables
176208c70cfbSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
176308c70cfbSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
176408c70cfbSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
176508c70cfbSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
176608c70cfbSmrg[m4_foreach([_lt_var],
176708c70cfbSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
176808c70cfbSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1769602e473dSmrg
1770602e473dSmrg
177108c70cfbSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
177208c70cfbSmrg# -------------------------
177308c70cfbSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
177408c70cfbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
177508c70cfbSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1776602e473dSmrg
1777602e473dSmrg
177808c70cfbSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
177908c70cfbSmrg# ------------------------------
178008c70cfbSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1781602e473dSmrg
1782602e473dSmrg
178308c70cfbSmrg# _LT_CONFIG_COMMANDS
178408c70cfbSmrg# -------------------
178508c70cfbSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
178608c70cfbSmrg# variables for single and double quote escaping we saved from calls
178708c70cfbSmrg# to _LT_DECL, we can put quote escaped variables declarations
178808c70cfbSmrg# into `config.status', and then the shell code to quote escape them in
178908c70cfbSmrg# for loops in `config.status'.  Finally, any additional code accumulated
179008c70cfbSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
179108c70cfbSmrgm4_defun([_LT_CONFIG_COMMANDS],
179208c70cfbSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
179308c70cfbSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
179408c70cfbSmrg	dnl instead of duplicating it all over again into config.status,
179508c70cfbSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
179608c70cfbSmrg	dnl needs to know what name is stored there:
179708c70cfbSmrg        [AC_CONFIG_COMMANDS([libtool],
179808c70cfbSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
179908c70cfbSmrg    dnl If the libtool generation code is destined for config.status,
180008c70cfbSmrg    dnl expand the accumulated commands and init code now:
180108c70cfbSmrg    [AC_CONFIG_COMMANDS([libtool],
180208c70cfbSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
180308c70cfbSmrg])#_LT_CONFIG_COMMANDS
180421298544Smrg
180508c70cfbSmrg
180608c70cfbSmrg# Initialize.
180708c70cfbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
180808c70cfbSmrg[
180908c70cfbSmrg
181008c70cfbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
181108c70cfbSmrg# if CDPATH is set.
181208c70cfbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
181308c70cfbSmrg
181408c70cfbSmrgsed_quote_subst='$sed_quote_subst'
181508c70cfbSmrgdouble_quote_subst='$double_quote_subst'
181608c70cfbSmrgdelay_variable_subst='$delay_variable_subst'
181708c70cfbSmrg_LT_CONFIG_STATUS_DECLARATIONS
181808c70cfbSmrgLTCC='$LTCC'
181908c70cfbSmrgLTCFLAGS='$LTCFLAGS'
182008c70cfbSmrgcompiler='$compiler_DEFAULT'
182108c70cfbSmrg
182208c70cfbSmrg# A function that is used when there is no print builtin or printf.
182308c70cfbSmrgfunc_fallback_echo ()
1824602e473dSmrg{
182508c70cfbSmrg  eval 'cat <<_LTECHO_EOF
182608c70cfbSmrg\$[]1
182708c70cfbSmrg_LTECHO_EOF'
182808c70cfbSmrg}
1829602e473dSmrg
183008c70cfbSmrg# Quote evaled strings.
183108c70cfbSmrgfor var in lt_decl_all_varnames([[ \
183208c70cfbSmrg]], lt_decl_quote_varnames); do
183308c70cfbSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
183408c70cfbSmrg    *[[\\\\\\\`\\"\\\$]]*)
183508c70cfbSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
183608c70cfbSmrg      ;;
183708c70cfbSmrg    *)
183808c70cfbSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
183908c70cfbSmrg      ;;
184008c70cfbSmrg    esac
184108c70cfbSmrgdone
1842602e473dSmrg
184308c70cfbSmrg# Double-quote double-evaled strings.
184408c70cfbSmrgfor var in lt_decl_all_varnames([[ \
184508c70cfbSmrg]], lt_decl_dquote_varnames); do
184608c70cfbSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
184708c70cfbSmrg    *[[\\\\\\\`\\"\\\$]]*)
184808c70cfbSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
184908c70cfbSmrg      ;;
185008c70cfbSmrg    *)
185108c70cfbSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
185208c70cfbSmrg      ;;
1853602e473dSmrg    esac
185408c70cfbSmrgdone
1855602e473dSmrg
185608c70cfbSmrg_LT_OUTPUT_LIBTOOL_INIT
185708c70cfbSmrg])
1858602e473dSmrg
185908c70cfbSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
186008c70cfbSmrg# ------------------------------------
186108c70cfbSmrg# Generate a child script FILE with all initialization necessary to
186208c70cfbSmrg# reuse the environment learned by the parent script, and make the
186308c70cfbSmrg# file executable.  If COMMENT is supplied, it is inserted after the
186408c70cfbSmrg# `#!' sequence but before initialization text begins.  After this
186508c70cfbSmrg# macro, additional text can be appended to FILE to form the body of
186608c70cfbSmrg# the child script.  The macro ends with non-zero status if the
186708c70cfbSmrg# file could not be fully written (such as if the disk is full).
186808c70cfbSmrgm4_ifdef([AS_INIT_GENERATED],
186908c70cfbSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
187008c70cfbSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
187108c70cfbSmrg[m4_require([AS_PREPARE])]dnl
187208c70cfbSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
187308c70cfbSmrg[lt_write_fail=0
187408c70cfbSmrgcat >$1 <<_ASEOF || lt_write_fail=1
187508c70cfbSmrg#! $SHELL
187608c70cfbSmrg# Generated by $as_me.
187708c70cfbSmrg$2
187808c70cfbSmrgSHELL=\${CONFIG_SHELL-$SHELL}
187908c70cfbSmrgexport SHELL
188008c70cfbSmrg_ASEOF
188108c70cfbSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
188208c70cfbSmrgAS_SHELL_SANITIZE
188308c70cfbSmrg_AS_PREPARE
188408c70cfbSmrgexec AS_MESSAGE_FD>&1
188508c70cfbSmrg_ASEOF
188608c70cfbSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
188708c70cfbSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1888602e473dSmrg
188908c70cfbSmrg# LT_OUTPUT
189008c70cfbSmrg# ---------
189108c70cfbSmrg# This macro allows early generation of the libtool script (before
189208c70cfbSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
189308c70cfbSmrg# tests.
189408c70cfbSmrgAC_DEFUN([LT_OUTPUT],
189508c70cfbSmrg[: ${CONFIG_LT=./config.lt}
189608c70cfbSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
189708c70cfbSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
189808c70cfbSmrg[# Run this file to recreate a libtool stub with the current configuration.])
1899602e473dSmrg
190008c70cfbSmrgcat >>"$CONFIG_LT" <<\_LTEOF
190108c70cfbSmrglt_cl_silent=false
190208c70cfbSmrgexec AS_MESSAGE_LOG_FD>>config.log
190308c70cfbSmrg{
190408c70cfbSmrg  echo
190508c70cfbSmrg  AS_BOX([Running $as_me.])
190608c70cfbSmrg} >&AS_MESSAGE_LOG_FD
1907602e473dSmrg
190808c70cfbSmrglt_cl_help="\
190908c70cfbSmrg\`$as_me' creates a local libtool stub from the current configuration,
191008c70cfbSmrgfor use in further configure time tests before the real libtool is
191108c70cfbSmrggenerated.
1912602e473dSmrg
191308c70cfbSmrgUsage: $[0] [[OPTIONS]]
1914602e473dSmrg
191508c70cfbSmrg  -h, --help      print this help, then exit
191608c70cfbSmrg  -V, --version   print version number, then exit
191708c70cfbSmrg  -q, --quiet     do not print progress messages
191808c70cfbSmrg  -d, --debug     don't remove temporary files
1919602e473dSmrg
192008c70cfbSmrgReport bugs to <bug-libtool@gnu.org>."
1921602e473dSmrg
192208c70cfbSmrglt_cl_version="\
192308c70cfbSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
192408c70cfbSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
192508c70cfbSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
1926602e473dSmrg
192708c70cfbSmrgCopyright (C) 2011 Free Software Foundation, Inc.
192808c70cfbSmrgThis config.lt script is free software; the Free Software Foundation
192908c70cfbSmrggives unlimited permision to copy, distribute and modify it."
1930602e473dSmrg
193108c70cfbSmrgwhile test $[#] != 0
193208c70cfbSmrgdo
193308c70cfbSmrg  case $[1] in
193408c70cfbSmrg    --version | --v* | -V )
193508c70cfbSmrg      echo "$lt_cl_version"; exit 0 ;;
193608c70cfbSmrg    --help | --h* | -h )
193708c70cfbSmrg      echo "$lt_cl_help"; exit 0 ;;
193808c70cfbSmrg    --debug | --d* | -d )
193908c70cfbSmrg      debug=: ;;
194008c70cfbSmrg    --quiet | --q* | --silent | --s* | -q )
194108c70cfbSmrg      lt_cl_silent=: ;;
1942602e473dSmrg
194308c70cfbSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
194408c70cfbSmrgTry \`$[0] --help' for more information.]) ;;
1945602e473dSmrg
194608c70cfbSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
194708c70cfbSmrgTry \`$[0] --help' for more information.]) ;;
1948602e473dSmrg  esac
194908c70cfbSmrg  shift
195008c70cfbSmrgdone
1951602e473dSmrg
195208c70cfbSmrgif $lt_cl_silent; then
195308c70cfbSmrg  exec AS_MESSAGE_FD>/dev/null
1954602e473dSmrgfi
195508c70cfbSmrg_LTEOF
1956602e473dSmrg
195708c70cfbSmrgcat >>"$CONFIG_LT" <<_LTEOF
195808c70cfbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
195908c70cfbSmrg_LTEOF
1960602e473dSmrg
196108c70cfbSmrgcat >>"$CONFIG_LT" <<\_LTEOF
196208c70cfbSmrgAC_MSG_NOTICE([creating $ofile])
196308c70cfbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
196408c70cfbSmrgAS_EXIT(0)
196508c70cfbSmrg_LTEOF
196608c70cfbSmrgchmod +x "$CONFIG_LT"
1967602e473dSmrg
196808c70cfbSmrg# configure is writing to config.log, but config.lt does its own redirection,
196908c70cfbSmrg# appending to config.log, which fails on DOS, as config.log is still kept
197008c70cfbSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
197108c70cfbSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
197208c70cfbSmrglt_cl_success=:
197308c70cfbSmrgtest "$silent" = yes &&
197408c70cfbSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
197508c70cfbSmrgexec AS_MESSAGE_LOG_FD>/dev/null
197608c70cfbSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
197708c70cfbSmrgexec AS_MESSAGE_LOG_FD>>config.log
197808c70cfbSmrg$lt_cl_success || AS_EXIT(1)
197908c70cfbSmrg])# LT_OUTPUT
1980602e473dSmrg
1981602e473dSmrg
198208c70cfbSmrg# _LT_CONFIG(TAG)
198308c70cfbSmrg# ---------------
198408c70cfbSmrg# If TAG is the built-in tag, create an initial libtool script with a
198508c70cfbSmrg# default configuration from the untagged config vars.  Otherwise add code
198608c70cfbSmrg# to config.status for appending the configuration named by TAG from the
198708c70cfbSmrg# matching tagged config vars.
198808c70cfbSmrgm4_defun([_LT_CONFIG],
198908c70cfbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
199008c70cfbSmrg_LT_CONFIG_SAVE_COMMANDS([
199108c70cfbSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
199208c70cfbSmrg  m4_if(_LT_TAG, [C], [
199308c70cfbSmrg    # See if we are running on zsh, and set the options which allow our
199408c70cfbSmrg    # commands through without removal of \ escapes.
199508c70cfbSmrg    if test -n "${ZSH_VERSION+set}" ; then
199608c70cfbSmrg      setopt NO_GLOB_SUBST
199708c70cfbSmrg    fi
1998602e473dSmrg
199908c70cfbSmrg    cfgfile="${ofile}T"
200008c70cfbSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
200108c70cfbSmrg    $RM "$cfgfile"
2002602e473dSmrg
200308c70cfbSmrg    cat <<_LT_EOF >> "$cfgfile"
200408c70cfbSmrg#! $SHELL
2005602e473dSmrg
200608c70cfbSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
200708c70cfbSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
200808c70cfbSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
200908c70cfbSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
201008c70cfbSmrg#
201108c70cfbSmrg_LT_COPYING
201208c70cfbSmrg_LT_LIBTOOL_TAGS
2013602e473dSmrg
201408c70cfbSmrg# ### BEGIN LIBTOOL CONFIG
201508c70cfbSmrg_LT_LIBTOOL_CONFIG_VARS
201608c70cfbSmrg_LT_LIBTOOL_TAG_VARS
201708c70cfbSmrg# ### END LIBTOOL CONFIG
2018602e473dSmrg
201908c70cfbSmrg_LT_EOF
2020602e473dSmrg
202108c70cfbSmrg  case $host_os in
202208c70cfbSmrg  aix3*)
202308c70cfbSmrg    cat <<\_LT_EOF >> "$cfgfile"
202408c70cfbSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
202508c70cfbSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
202608c70cfbSmrg# vanish in a puff of smoke.
202708c70cfbSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
202808c70cfbSmrg  COLLECT_NAMES=
202908c70cfbSmrg  export COLLECT_NAMES
2030602e473dSmrgfi
203108c70cfbSmrg_LT_EOF
203208c70cfbSmrg    ;;
203308c70cfbSmrg  esac
2034602e473dSmrg
203508c70cfbSmrg  _LT_PROG_LTMAIN
2036602e473dSmrg
203708c70cfbSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
203808c70cfbSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
203908c70cfbSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
204008c70cfbSmrg  # is reportedly fixed, but why not run on old versions too?
204108c70cfbSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
204208c70cfbSmrg     || (rm -f "$cfgfile"; exit 1)
2043602e473dSmrg
204408c70cfbSmrg  _LT_PROG_REPLACE_SHELLFNS
2045602e473dSmrg
204608c70cfbSmrg   mv -f "$cfgfile" "$ofile" ||
204708c70cfbSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
204808c70cfbSmrg  chmod +x "$ofile"
204908c70cfbSmrg],
205008c70cfbSmrg[cat <<_LT_EOF >> "$ofile"
2051602e473dSmrg
205208c70cfbSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
205308c70cfbSmrgdnl in a comment (ie after a #).
205408c70cfbSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
205508c70cfbSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
205608c70cfbSmrg# ### END LIBTOOL TAG CONFIG: $1
205708c70cfbSmrg_LT_EOF
205808c70cfbSmrg])dnl /m4_if
205908c70cfbSmrg],
206008c70cfbSmrg[m4_if([$1], [], [
206108c70cfbSmrg    PACKAGE='$PACKAGE'
206208c70cfbSmrg    VERSION='$VERSION'
206308c70cfbSmrg    TIMESTAMP='$TIMESTAMP'
206408c70cfbSmrg    RM='$RM'
206508c70cfbSmrg    ofile='$ofile'], [])
206608c70cfbSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
206708c70cfbSmrg])# _LT_CONFIG
2068602e473dSmrg
2069602e473dSmrg
207008c70cfbSmrg# LT_SUPPORTED_TAG(TAG)
207108c70cfbSmrg# ---------------------
207208c70cfbSmrg# Trace this macro to discover what tags are supported by the libtool
207308c70cfbSmrg# --tag option, using:
207408c70cfbSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
207508c70cfbSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
2076602e473dSmrg
2077602e473dSmrg
207808c70cfbSmrg# C support is built-in for now
207908c70cfbSmrgm4_define([_LT_LANG_C_enabled], [])
208008c70cfbSmrgm4_define([_LT_TAGS], [])
2081602e473dSmrg
2082602e473dSmrg
208308c70cfbSmrg# LT_LANG(LANG)
208408c70cfbSmrg# -------------
208508c70cfbSmrg# Enable libtool support for the given language if not already enabled.
208608c70cfbSmrgAC_DEFUN([LT_LANG],
208708c70cfbSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
208808c70cfbSmrgm4_case([$1],
208908c70cfbSmrg  [C],			[_LT_LANG(C)],
209008c70cfbSmrg  [C++],		[_LT_LANG(CXX)],
209108c70cfbSmrg  [Go],			[_LT_LANG(GO)],
209208c70cfbSmrg  [Java],		[_LT_LANG(GCJ)],
209308c70cfbSmrg  [Fortran 77],		[_LT_LANG(F77)],
209408c70cfbSmrg  [Fortran],		[_LT_LANG(FC)],
209508c70cfbSmrg  [Windows Resource],	[_LT_LANG(RC)],
209608c70cfbSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
209708c70cfbSmrg    [_LT_LANG($1)],
209808c70cfbSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
209908c70cfbSmrg])# LT_LANG
2100602e473dSmrg
2101602e473dSmrg
210208c70cfbSmrg# _LT_LANG(LANGNAME)
210308c70cfbSmrg# ------------------
210408c70cfbSmrgm4_defun([_LT_LANG],
210508c70cfbSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
210608c70cfbSmrg  [LT_SUPPORTED_TAG([$1])dnl
210708c70cfbSmrg  m4_append([_LT_TAGS], [$1 ])dnl
210808c70cfbSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
210908c70cfbSmrg  _LT_LANG_$1_CONFIG($1)])dnl
211008c70cfbSmrg])# _LT_LANG
2111602e473dSmrg
211221298544Smrg
211308c70cfbSmrgm4_ifndef([AC_PROG_GO], [
211408c70cfbSmrg# NOTE: This macro has been submitted for inclusion into   #
211508c70cfbSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
211608c70cfbSmrg#  a released version of Autoconf we should remove this    #
211708c70cfbSmrg#  macro and use it instead.                               #
211808c70cfbSmrgm4_defun([AC_PROG_GO],
211908c70cfbSmrg[AC_LANG_PUSH(Go)dnl
212008c70cfbSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
212108c70cfbSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
212208c70cfbSmrg_AC_ARG_VAR_LDFLAGS()dnl
212308c70cfbSmrgAC_CHECK_TOOL(GOC, gccgo)
212408c70cfbSmrgif test -z "$GOC"; then
212508c70cfbSmrg  if test -n "$ac_tool_prefix"; then
212608c70cfbSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
212708c70cfbSmrg  fi
212808c70cfbSmrgfi
212908c70cfbSmrgif test -z "$GOC"; then
213008c70cfbSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
213108c70cfbSmrgfi
213208c70cfbSmrg])#m4_defun
213308c70cfbSmrg])#m4_ifndef
213421298544Smrg
213521298544Smrg
213608c70cfbSmrg# _LT_LANG_DEFAULT_CONFIG
213708c70cfbSmrg# -----------------------
213808c70cfbSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
213908c70cfbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
214008c70cfbSmrg  [LT_LANG(CXX)],
214108c70cfbSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2142602e473dSmrg
214308c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
214408c70cfbSmrg  [LT_LANG(F77)],
214508c70cfbSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2146602e473dSmrg
214708c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
214808c70cfbSmrg  [LT_LANG(FC)],
214908c70cfbSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2150602e473dSmrg
215108c70cfbSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
215208c70cfbSmrgdnl pulling things in needlessly.
215308c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
215408c70cfbSmrg  [LT_LANG(GCJ)],
215508c70cfbSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
215608c70cfbSmrg    [LT_LANG(GCJ)],
215708c70cfbSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
215808c70cfbSmrg      [LT_LANG(GCJ)],
215908c70cfbSmrg      [m4_ifdef([AC_PROG_GCJ],
216008c70cfbSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
216108c70cfbSmrg       m4_ifdef([A][M_PROG_GCJ],
216208c70cfbSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
216308c70cfbSmrg       m4_ifdef([LT_PROG_GCJ],
216408c70cfbSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2165602e473dSmrg
216608c70cfbSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
216708c70cfbSmrg  [LT_LANG(GO)],
216808c70cfbSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2169602e473dSmrg
217008c70cfbSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
217108c70cfbSmrg  [LT_LANG(RC)],
217208c70cfbSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
217308c70cfbSmrg])# _LT_LANG_DEFAULT_CONFIG
2174602e473dSmrg
217508c70cfbSmrg# Obsolete macros:
217608c70cfbSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
217708c70cfbSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
217808c70cfbSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
217908c70cfbSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
218008c70cfbSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
218108c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
218208c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
218308c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
218408c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
218508c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
218608c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
2187602e473dSmrg
2188602e473dSmrg
218908c70cfbSmrg# _LT_TAG_COMPILER
219008c70cfbSmrg# ----------------
219108c70cfbSmrgm4_defun([_LT_TAG_COMPILER],
219208c70cfbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
219321298544Smrg
219408c70cfbSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
219508c70cfbSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
219608c70cfbSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
219708c70cfbSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2198602e473dSmrg
219908c70cfbSmrg# If no C compiler was specified, use CC.
220008c70cfbSmrgLTCC=${LTCC-"$CC"}
2201602e473dSmrg
220208c70cfbSmrg# If no C compiler flags were specified, use CFLAGS.
220308c70cfbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2204602e473dSmrg
220508c70cfbSmrg# Allow CC to be a program name with arguments.
220608c70cfbSmrgcompiler=$CC
220708c70cfbSmrg])# _LT_TAG_COMPILER
2208602e473dSmrg
2209602e473dSmrg
221008c70cfbSmrg# _LT_COMPILER_BOILERPLATE
221108c70cfbSmrg# ------------------------
221208c70cfbSmrg# Check for compiler boilerplate output or warnings with
221308c70cfbSmrg# the simple compiler test code.
221408c70cfbSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
221508c70cfbSmrg[m4_require([_LT_DECL_SED])dnl
221608c70cfbSmrgac_outfile=conftest.$ac_objext
221708c70cfbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
221808c70cfbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
221908c70cfbSmrg_lt_compiler_boilerplate=`cat conftest.err`
222008c70cfbSmrg$RM conftest*
222108c70cfbSmrg])# _LT_COMPILER_BOILERPLATE
2222602e473dSmrg
2223602e473dSmrg
222408c70cfbSmrg# _LT_LINKER_BOILERPLATE
222508c70cfbSmrg# ----------------------
222608c70cfbSmrg# Check for linker boilerplate output or warnings with
222708c70cfbSmrg# the simple link test code.
222808c70cfbSmrgm4_defun([_LT_LINKER_BOILERPLATE],
222908c70cfbSmrg[m4_require([_LT_DECL_SED])dnl
223008c70cfbSmrgac_outfile=conftest.$ac_objext
223108c70cfbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
223208c70cfbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
223308c70cfbSmrg_lt_linker_boilerplate=`cat conftest.err`
223408c70cfbSmrg$RM -r conftest*
223508c70cfbSmrg])# _LT_LINKER_BOILERPLATE
2236602e473dSmrg
223708c70cfbSmrg# _LT_REQUIRED_DARWIN_CHECKS
223808c70cfbSmrg# -------------------------
223908c70cfbSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2240602e473dSmrg  case $host_os in
224108c70cfbSmrg    rhapsody* | darwin*)
224208c70cfbSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
224308c70cfbSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
224408c70cfbSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
224508c70cfbSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
224608c70cfbSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
224708c70cfbSmrg    _LT_DECL([], [DSYMUTIL], [1],
224808c70cfbSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
224908c70cfbSmrg    _LT_DECL([], [NMEDIT], [1],
225008c70cfbSmrg      [Tool to change global to local symbols on Mac OS X])
225108c70cfbSmrg    _LT_DECL([], [LIPO], [1],
225208c70cfbSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
225308c70cfbSmrg    _LT_DECL([], [OTOOL], [1],
225408c70cfbSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
225508c70cfbSmrg    _LT_DECL([], [OTOOL64], [1],
225608c70cfbSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
225708c70cfbSmrg
225808c70cfbSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
225908c70cfbSmrg      [lt_cv_apple_cc_single_mod=no
226008c70cfbSmrg      if test -z "${LT_MULTI_MODULE}"; then
226108c70cfbSmrg	# By default we will add the -single_module flag. You can override
226208c70cfbSmrg	# by either setting the environment variable LT_MULTI_MODULE
226308c70cfbSmrg	# non-empty at configure time, or by adding -multi_module to the
226408c70cfbSmrg	# link flags.
226508c70cfbSmrg	rm -rf libconftest.dylib*
226608c70cfbSmrg	echo "int foo(void){return 1;}" > conftest.c
226708c70cfbSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
226808c70cfbSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
226908c70cfbSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
227008c70cfbSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
227108c70cfbSmrg        _lt_result=$?
227208c70cfbSmrg	# If there is a non-empty error log, and "single_module"
227308c70cfbSmrg	# appears in it, assume the flag caused a linker warning
227408c70cfbSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
227508c70cfbSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
227608c70cfbSmrg	# Otherwise, if the output was created with a 0 exit code from
227708c70cfbSmrg	# the compiler, it worked.
227808c70cfbSmrg	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
227908c70cfbSmrg	  lt_cv_apple_cc_single_mod=yes
228008c70cfbSmrg	else
228108c70cfbSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
228208c70cfbSmrg	fi
228308c70cfbSmrg	rm -rf libconftest.dylib*
228408c70cfbSmrg	rm -f conftest.*
228508c70cfbSmrg      fi])
228608c70cfbSmrg
228708c70cfbSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
228808c70cfbSmrg      [lt_cv_ld_exported_symbols_list],
228908c70cfbSmrg      [lt_cv_ld_exported_symbols_list=no
229008c70cfbSmrg      save_LDFLAGS=$LDFLAGS
229108c70cfbSmrg      echo "_main" > conftest.sym
229208c70cfbSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
229308c70cfbSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
229408c70cfbSmrg	[lt_cv_ld_exported_symbols_list=yes],
229508c70cfbSmrg	[lt_cv_ld_exported_symbols_list=no])
229608c70cfbSmrg	LDFLAGS="$save_LDFLAGS"
229708c70cfbSmrg    ])
229808c70cfbSmrg
229908c70cfbSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
230008c70cfbSmrg      [lt_cv_ld_force_load=no
230108c70cfbSmrg      cat > conftest.c << _LT_EOF
230208c70cfbSmrgint forced_loaded() { return 2;}
230308c70cfbSmrg_LT_EOF
230408c70cfbSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
230508c70cfbSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
230608c70cfbSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
230708c70cfbSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
230808c70cfbSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
230908c70cfbSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
231008c70cfbSmrg      cat > conftest.c << _LT_EOF
231108c70cfbSmrgint main() { return 0;}
231208c70cfbSmrg_LT_EOF
231308c70cfbSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
231408c70cfbSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
231508c70cfbSmrg      _lt_result=$?
231608c70cfbSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
231708c70cfbSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
231808c70cfbSmrg      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
231908c70cfbSmrg	lt_cv_ld_force_load=yes
232008c70cfbSmrg      else
232108c70cfbSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
232208c70cfbSmrg      fi
232308c70cfbSmrg        rm -f conftest.err libconftest.a conftest conftest.c
232408c70cfbSmrg        rm -rf conftest.dSYM
232508c70cfbSmrg    ])
2326602e473dSmrg    case $host_os in
232708c70cfbSmrg    rhapsody* | darwin1.[[012]])
232808c70cfbSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
232908c70cfbSmrg    darwin1.*)
233008c70cfbSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
233108c70cfbSmrg    darwin*) # darwin 5.x on
233208c70cfbSmrg      # if running on 10.5 or later, the deployment target defaults
233308c70cfbSmrg      # to the OS version, if on x86, and 10.4, the deployment
233408c70cfbSmrg      # target defaults to 10.4. Don't you love it?
233508c70cfbSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
233608c70cfbSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
233708c70cfbSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
233808c70cfbSmrg	10.[[012]]*)
233908c70cfbSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
234008c70cfbSmrg	10.*)
234108c70cfbSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2342602e473dSmrg      esac
234308c70cfbSmrg    ;;
234408c70cfbSmrg  esac
234508c70cfbSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
234608c70cfbSmrg      _lt_dar_single_mod='$single_module'
234708c70cfbSmrg    fi
234808c70cfbSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
234908c70cfbSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
235008c70cfbSmrg    else
235108c70cfbSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
235208c70cfbSmrg    fi
235308c70cfbSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
235408c70cfbSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
235508c70cfbSmrg    else
235608c70cfbSmrg      _lt_dsymutil=
235708c70cfbSmrg    fi
235808c70cfbSmrg    ;;
235908c70cfbSmrg  esac
236008c70cfbSmrg])
236108c70cfbSmrg
236208c70cfbSmrg
236308c70cfbSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
236408c70cfbSmrg# ---------------------------------
236508c70cfbSmrg# Checks for linker and compiler features on darwin
236608c70cfbSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
236708c70cfbSmrg[
236808c70cfbSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
236908c70cfbSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
237008c70cfbSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
237108c70cfbSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
237208c70cfbSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
237308c70cfbSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
237408c70cfbSmrg    _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\"`'
237508c70cfbSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
237608c70cfbSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2377602e473dSmrg  else
237808c70cfbSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2379602e473dSmrg  fi
238008c70cfbSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
238108c70cfbSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
238208c70cfbSmrg  case $cc_basename in
238308c70cfbSmrg     ifort*) _lt_dar_can_shared=yes ;;
238408c70cfbSmrg     *) _lt_dar_can_shared=$GCC ;;
238508c70cfbSmrg  esac
238608c70cfbSmrg  if test "$_lt_dar_can_shared" = "yes"; then
238708c70cfbSmrg    output_verbose_link_cmd=func_echo_all
238808c70cfbSmrg    _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}"
238908c70cfbSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
239008c70cfbSmrg    _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}"
239108c70cfbSmrg    _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}"
239208c70cfbSmrg    m4_if([$1], [CXX],
239308c70cfbSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
239408c70cfbSmrg      _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}"
239508c70cfbSmrg      _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}"
239608c70cfbSmrg    fi
239708c70cfbSmrg],[])
239808c70cfbSmrg  else
239908c70cfbSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
240008c70cfbSmrg  fi
240108c70cfbSmrg])
2402602e473dSmrg
240308c70cfbSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
240408c70cfbSmrg# ----------------------------------
240508c70cfbSmrg# Links a minimal program and checks the executable
240608c70cfbSmrg# for the system default hardcoded library path. In most cases,
240708c70cfbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
240808c70cfbSmrg# the location of the communication and MPI libs are included too.
240908c70cfbSmrg# If we don't find anything, use the default library path according
241008c70cfbSmrg# to the aix ld manual.
241108c70cfbSmrg# Store the results from the different compilers for each TAGNAME.
241208c70cfbSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
241308c70cfbSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
241408c70cfbSmrg[m4_require([_LT_DECL_SED])dnl
241508c70cfbSmrgif test "${lt_cv_aix_libpath+set}" = set; then
241608c70cfbSmrg  aix_libpath=$lt_cv_aix_libpath
241708c70cfbSmrgelse
241808c70cfbSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
241908c70cfbSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
242008c70cfbSmrg  lt_aix_libpath_sed='[
242108c70cfbSmrg      /Import File Strings/,/^$/ {
242208c70cfbSmrg	  /^0/ {
242308c70cfbSmrg	      s/^0  *\([^ ]*\) *$/\1/
242408c70cfbSmrg	      p
242508c70cfbSmrg	  }
242608c70cfbSmrg      }]'
242708c70cfbSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
242808c70cfbSmrg  # Check for a 64-bit object if we didn't find anything.
242908c70cfbSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
243008c70cfbSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
243108c70cfbSmrg  fi],[])
243208c70cfbSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
243308c70cfbSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
243408c70cfbSmrg  fi
243508c70cfbSmrg  ])
243608c70cfbSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
243708c70cfbSmrgfi
243808c70cfbSmrg])# _LT_SYS_MODULE_PATH_AIX
2439602e473dSmrg
2440602e473dSmrg
244108c70cfbSmrg# _LT_SHELL_INIT(ARG)
244208c70cfbSmrg# -------------------
244308c70cfbSmrgm4_define([_LT_SHELL_INIT],
244408c70cfbSmrg[m4_divert_text([M4SH-INIT], [$1
244508c70cfbSmrg])])# _LT_SHELL_INIT
2446602e473dSmrg
2447602e473dSmrg
2448602e473dSmrg
244908c70cfbSmrg# _LT_PROG_ECHO_BACKSLASH
245008c70cfbSmrg# -----------------------
245108c70cfbSmrg# Find how we can fake an echo command that does not interpret backslash.
245208c70cfbSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
245308c70cfbSmrg# of the generated configure script which will find a shell with a builtin
245408c70cfbSmrg# printf (which we can use as an echo command).
245508c70cfbSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
245608c70cfbSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
245708c70cfbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
245808c70cfbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2459602e473dSmrg
246008c70cfbSmrgAC_MSG_CHECKING([how to print strings])
246108c70cfbSmrg# Test print first, because it will be a builtin if present.
246208c70cfbSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
246308c70cfbSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
246408c70cfbSmrg  ECHO='print -r --'
246508c70cfbSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
246608c70cfbSmrg  ECHO='printf %s\n'
246708c70cfbSmrgelse
246808c70cfbSmrg  # Use this function as a fallback that always works.
246908c70cfbSmrg  func_fallback_echo ()
247008c70cfbSmrg  {
247108c70cfbSmrg    eval 'cat <<_LTECHO_EOF
247208c70cfbSmrg$[]1
247308c70cfbSmrg_LTECHO_EOF'
247408c70cfbSmrg  }
247508c70cfbSmrg  ECHO='func_fallback_echo'
247608c70cfbSmrgfi
2477602e473dSmrg
247808c70cfbSmrg# func_echo_all arg...
247908c70cfbSmrg# Invoke $ECHO with all args, space-separated.
248008c70cfbSmrgfunc_echo_all ()
248108c70cfbSmrg{
248208c70cfbSmrg    $ECHO "$*" 
248308c70cfbSmrg}
2484602e473dSmrg
248508c70cfbSmrgcase "$ECHO" in
248608c70cfbSmrg  printf*) AC_MSG_RESULT([printf]) ;;
248708c70cfbSmrg  print*) AC_MSG_RESULT([print -r]) ;;
248808c70cfbSmrg  *) AC_MSG_RESULT([cat]) ;;
2489602e473dSmrgesac
2490602e473dSmrg
249108c70cfbSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
249208c70cfbSmrg[_AS_DETECT_SUGGESTED([
249308c70cfbSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
249408c70cfbSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
249508c70cfbSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
249608c70cfbSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
249708c70cfbSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
249808c70cfbSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
249908c70cfbSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2500602e473dSmrg
250108c70cfbSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
250208c70cfbSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
250308c70cfbSmrg])# _LT_PROG_ECHO_BACKSLASH
2504602e473dSmrg
2505602e473dSmrg
250608c70cfbSmrg# _LT_WITH_SYSROOT
250708c70cfbSmrg# ----------------
250808c70cfbSmrgAC_DEFUN([_LT_WITH_SYSROOT],
250908c70cfbSmrg[AC_MSG_CHECKING([for sysroot])
251008c70cfbSmrgAC_ARG_WITH([sysroot],
251108c70cfbSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
251208c70cfbSmrg                        (or the compiler's sysroot if not specified).],
251308c70cfbSmrg[], [with_sysroot=no])
2514602e473dSmrg
251508c70cfbSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
251608c70cfbSmrgdnl in case the user passed a directory name.
251708c70cfbSmrglt_sysroot=
251808c70cfbSmrgcase ${with_sysroot} in #(
251908c70cfbSmrg yes)
252008c70cfbSmrg   if test "$GCC" = yes; then
252108c70cfbSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
252208c70cfbSmrg   fi
252308c70cfbSmrg   ;; #(
252408c70cfbSmrg /*)
252508c70cfbSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
252608c70cfbSmrg   ;; #(
252708c70cfbSmrg no|'')
252808c70cfbSmrg   ;; #(
252908c70cfbSmrg *)
253008c70cfbSmrg   AC_MSG_RESULT([${with_sysroot}])
253108c70cfbSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
253208c70cfbSmrg   ;;
253308c70cfbSmrgesac
2534602e473dSmrg
253508c70cfbSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
253608c70cfbSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
253708c70cfbSmrg[dependent libraries, and in which our libraries should be installed.])])
2538602e473dSmrg
253908c70cfbSmrg# _LT_ENABLE_LOCK
254008c70cfbSmrg# ---------------
254108c70cfbSmrgm4_defun([_LT_ENABLE_LOCK],
254208c70cfbSmrg[AC_ARG_ENABLE([libtool-lock],
254308c70cfbSmrg  [AS_HELP_STRING([--disable-libtool-lock],
254408c70cfbSmrg    [avoid locking (might break parallel builds)])])
254508c70cfbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2546602e473dSmrg
254708c70cfbSmrg# Some flags need to be propagated to the compiler or linker for good
254808c70cfbSmrg# libtool support.
254908c70cfbSmrgcase $host in
255008c70cfbSmrgia64-*-hpux*)
255108c70cfbSmrg  # Find out which ABI we are using.
255208c70cfbSmrg  echo 'int i;' > conftest.$ac_ext
255308c70cfbSmrg  if AC_TRY_EVAL(ac_compile); then
255408c70cfbSmrg    case `/usr/bin/file conftest.$ac_objext` in
255508c70cfbSmrg      *ELF-32*)
255608c70cfbSmrg	HPUX_IA64_MODE="32"
255708c70cfbSmrg	;;
255808c70cfbSmrg      *ELF-64*)
255908c70cfbSmrg	HPUX_IA64_MODE="64"
256008c70cfbSmrg	;;
256108c70cfbSmrg    esac
2562602e473dSmrg  fi
256308c70cfbSmrg  rm -rf conftest*
256408c70cfbSmrg  ;;
256508c70cfbSmrg*-*-irix6*)
256608c70cfbSmrg  # Find out which ABI we are using.
256708c70cfbSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
256808c70cfbSmrg  if AC_TRY_EVAL(ac_compile); then
256908c70cfbSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
257008c70cfbSmrg      case `/usr/bin/file conftest.$ac_objext` in
257108c70cfbSmrg	*32-bit*)
257208c70cfbSmrg	  LD="${LD-ld} -melf32bsmip"
257308c70cfbSmrg	  ;;
257408c70cfbSmrg	*N32*)
257508c70cfbSmrg	  LD="${LD-ld} -melf32bmipn32"
257608c70cfbSmrg	  ;;
257708c70cfbSmrg	*64-bit*)
257808c70cfbSmrg	  LD="${LD-ld} -melf64bmip"
257908c70cfbSmrg	;;
258008c70cfbSmrg      esac
258108c70cfbSmrg    else
258208c70cfbSmrg      case `/usr/bin/file conftest.$ac_objext` in
258308c70cfbSmrg	*32-bit*)
258408c70cfbSmrg	  LD="${LD-ld} -32"
258508c70cfbSmrg	  ;;
258608c70cfbSmrg	*N32*)
258708c70cfbSmrg	  LD="${LD-ld} -n32"
258808c70cfbSmrg	  ;;
258908c70cfbSmrg	*64-bit*)
259008c70cfbSmrg	  LD="${LD-ld} -64"
259108c70cfbSmrg	  ;;
259208c70cfbSmrg      esac
259308c70cfbSmrg    fi
259408c70cfbSmrg  fi
259508c70cfbSmrg  rm -rf conftest*
259608c70cfbSmrg  ;;
2597602e473dSmrg
259808c70cfbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
259908c70cfbSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
260008c70cfbSmrg  # Find out which ABI we are using.
260108c70cfbSmrg  echo 'int i;' > conftest.$ac_ext
260208c70cfbSmrg  if AC_TRY_EVAL(ac_compile); then
260308c70cfbSmrg    case `/usr/bin/file conftest.o` in
260408c70cfbSmrg      *32-bit*)
260508c70cfbSmrg	case $host in
260608c70cfbSmrg	  x86_64-*kfreebsd*-gnu)
260708c70cfbSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
260808c70cfbSmrg	    ;;
260908c70cfbSmrg	  x86_64-*linux*)
261008c70cfbSmrg	    LD="${LD-ld} -m elf_i386"
261108c70cfbSmrg	    ;;
261208c70cfbSmrg	  ppc64-*linux*|powerpc64-*linux*)
261308c70cfbSmrg	    LD="${LD-ld} -m elf32ppclinux"
261408c70cfbSmrg	    ;;
261508c70cfbSmrg	  s390x-*linux*)
261608c70cfbSmrg	    LD="${LD-ld} -m elf_s390"
261708c70cfbSmrg	    ;;
261808c70cfbSmrg	  sparc64-*linux*)
261908c70cfbSmrg	    LD="${LD-ld} -m elf32_sparc"
262008c70cfbSmrg	    ;;
262108c70cfbSmrg	esac
262208c70cfbSmrg	;;
262308c70cfbSmrg      *64-bit*)
262408c70cfbSmrg	case $host in
262508c70cfbSmrg	  x86_64-*kfreebsd*-gnu)
262608c70cfbSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
262708c70cfbSmrg	    ;;
262808c70cfbSmrg	  x86_64-*linux*)
262908c70cfbSmrg	    LD="${LD-ld} -m elf_x86_64"
263008c70cfbSmrg	    ;;
263108c70cfbSmrg	  ppc*-*linux*|powerpc*-*linux*)
263208c70cfbSmrg	    LD="${LD-ld} -m elf64ppc"
263308c70cfbSmrg	    ;;
263408c70cfbSmrg	  s390*-*linux*|s390*-*tpf*)
263508c70cfbSmrg	    LD="${LD-ld} -m elf64_s390"
263608c70cfbSmrg	    ;;
263708c70cfbSmrg	  sparc*-*linux*)
263808c70cfbSmrg	    LD="${LD-ld} -m elf64_sparc"
263908c70cfbSmrg	    ;;
264008c70cfbSmrg	esac
2641602e473dSmrg	;;
264208c70cfbSmrg    esac
264308c70cfbSmrg  fi
264408c70cfbSmrg  rm -rf conftest*
264508c70cfbSmrg  ;;
264608c70cfbSmrg
264708c70cfbSmrg*-*-sco3.2v5*)
264808c70cfbSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
264908c70cfbSmrg  SAVE_CFLAGS="$CFLAGS"
265008c70cfbSmrg  CFLAGS="$CFLAGS -belf"
265108c70cfbSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
265208c70cfbSmrg    [AC_LANG_PUSH(C)
265308c70cfbSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
265408c70cfbSmrg     AC_LANG_POP])
265508c70cfbSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
265608c70cfbSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
265708c70cfbSmrg    CFLAGS="$SAVE_CFLAGS"
265808c70cfbSmrg  fi
265908c70cfbSmrg  ;;
266008c70cfbSmrg*-*solaris*)
266108c70cfbSmrg  # Find out which ABI we are using.
266208c70cfbSmrg  echo 'int i;' > conftest.$ac_ext
266308c70cfbSmrg  if AC_TRY_EVAL(ac_compile); then
266408c70cfbSmrg    case `/usr/bin/file conftest.o` in
266508c70cfbSmrg    *64-bit*)
266608c70cfbSmrg      case $lt_cv_prog_gnu_ld in
266708c70cfbSmrg      yes*)
266808c70cfbSmrg        case $host in
266908c70cfbSmrg        i?86-*-solaris*)
267008c70cfbSmrg          LD="${LD-ld} -m elf_x86_64"
267108c70cfbSmrg          ;;
267208c70cfbSmrg        sparc*-*-solaris*)
267308c70cfbSmrg          LD="${LD-ld} -m elf64_sparc"
267408c70cfbSmrg          ;;
267508c70cfbSmrg        esac
267608c70cfbSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
267708c70cfbSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
267808c70cfbSmrg          LD="${LD-ld}_sol2"
267908c70cfbSmrg        fi
268008c70cfbSmrg        ;;
2681602e473dSmrg      *)
268208c70cfbSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
268308c70cfbSmrg	  LD="${LD-ld} -64"
268408c70cfbSmrg	fi
2685602e473dSmrg	;;
2686602e473dSmrg      esac
268708c70cfbSmrg      ;;
268808c70cfbSmrg    esac
268908c70cfbSmrg  fi
269008c70cfbSmrg  rm -rf conftest*
269108c70cfbSmrg  ;;
269208c70cfbSmrgesac
2693602e473dSmrg
269408c70cfbSmrgneed_locks="$enable_libtool_lock"
269508c70cfbSmrg])# _LT_ENABLE_LOCK
2696602e473dSmrg
2697602e473dSmrg
269808c70cfbSmrg# _LT_PROG_AR
269908c70cfbSmrg# -----------
270008c70cfbSmrgm4_defun([_LT_PROG_AR],
270108c70cfbSmrg[AC_CHECK_TOOLS(AR, [ar], false)
270208c70cfbSmrg: ${AR=ar}
270308c70cfbSmrg: ${AR_FLAGS=cru}
270408c70cfbSmrg_LT_DECL([], [AR], [1], [The archiver])
270508c70cfbSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2706602e473dSmrg
270708c70cfbSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
270808c70cfbSmrg  [lt_cv_ar_at_file=no
270908c70cfbSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
271008c70cfbSmrg     [echo conftest.$ac_objext > conftest.lst
271108c70cfbSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
271208c70cfbSmrg      AC_TRY_EVAL([lt_ar_try])
271308c70cfbSmrg      if test "$ac_status" -eq 0; then
271408c70cfbSmrg	# Ensure the archiver fails upon bogus file names.
271508c70cfbSmrg	rm -f conftest.$ac_objext libconftest.a
271608c70cfbSmrg	AC_TRY_EVAL([lt_ar_try])
271708c70cfbSmrg	if test "$ac_status" -ne 0; then
271808c70cfbSmrg          lt_cv_ar_at_file=@
271908c70cfbSmrg        fi
272008c70cfbSmrg      fi
272108c70cfbSmrg      rm -f conftest.* libconftest.a
272208c70cfbSmrg     ])
272308c70cfbSmrg  ])
2724602e473dSmrg
272508c70cfbSmrgif test "x$lt_cv_ar_at_file" = xno; then
272608c70cfbSmrg  archiver_list_spec=
272708c70cfbSmrgelse
272808c70cfbSmrg  archiver_list_spec=$lt_cv_ar_at_file
272908c70cfbSmrgfi
273008c70cfbSmrg_LT_DECL([], [archiver_list_spec], [1],
273108c70cfbSmrg  [How to feed a file listing to the archiver])
273208c70cfbSmrg])# _LT_PROG_AR
2733602e473dSmrg
2734602e473dSmrg
273508c70cfbSmrg# _LT_CMD_OLD_ARCHIVE
273608c70cfbSmrg# -------------------
273708c70cfbSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
273808c70cfbSmrg[_LT_PROG_AR
2739602e473dSmrg
274008c70cfbSmrgAC_CHECK_TOOL(STRIP, strip, :)
274108c70cfbSmrgtest -z "$STRIP" && STRIP=:
274208c70cfbSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2743602e473dSmrg
274408c70cfbSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
274508c70cfbSmrgtest -z "$RANLIB" && RANLIB=:
274608c70cfbSmrg_LT_DECL([], [RANLIB], [1],
274708c70cfbSmrg    [Commands used to install an old-style archive])
2748602e473dSmrg
274908c70cfbSmrg# Determine commands to create old-style static archives.
275008c70cfbSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
275108c70cfbSmrgold_postinstall_cmds='chmod 644 $oldlib'
275208c70cfbSmrgold_postuninstall_cmds=
2753602e473dSmrg
275408c70cfbSmrgif test -n "$RANLIB"; then
275508c70cfbSmrg  case $host_os in
275608c70cfbSmrg  openbsd*)
275708c70cfbSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2758602e473dSmrg    ;;
2759602e473dSmrg  *)
276008c70cfbSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2761602e473dSmrg    ;;
2762602e473dSmrg  esac
276308c70cfbSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
276408c70cfbSmrgfi
2765602e473dSmrg
276608c70cfbSmrgcase $host_os in
276708c70cfbSmrg  darwin*)
276808c70cfbSmrg    lock_old_archive_extraction=yes ;;
276908c70cfbSmrg  *)
277008c70cfbSmrg    lock_old_archive_extraction=no ;;
277108c70cfbSmrgesac
277208c70cfbSmrg_LT_DECL([], [old_postinstall_cmds], [2])
277308c70cfbSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
277408c70cfbSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
277508c70cfbSmrg    [Commands used to build an old-style archive])
277608c70cfbSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
277708c70cfbSmrg    [Whether to use a lock for old archive extraction])
277808c70cfbSmrg])# _LT_CMD_OLD_ARCHIVE
2779602e473dSmrg
2780602e473dSmrg
278108c70cfbSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
278208c70cfbSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
278308c70cfbSmrg# ----------------------------------------------------------------
278408c70cfbSmrg# Check whether the given compiler option works
278508c70cfbSmrgAC_DEFUN([_LT_COMPILER_OPTION],
278608c70cfbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
278708c70cfbSmrgm4_require([_LT_DECL_SED])dnl
278808c70cfbSmrgAC_CACHE_CHECK([$1], [$2],
278908c70cfbSmrg  [$2=no
279008c70cfbSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
279108c70cfbSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
279208c70cfbSmrg   lt_compiler_flag="$3"
279308c70cfbSmrg   # Insert the option either (1) after the last *FLAGS variable, or
279408c70cfbSmrg   # (2) before a word containing "conftest.", or (3) at the end.
279508c70cfbSmrg   # Note that $ac_compile itself does not contain backslashes and begins
279608c70cfbSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
279708c70cfbSmrg   # The option is referenced via a variable to avoid confusing sed.
279808c70cfbSmrg   lt_compile=`echo "$ac_compile" | $SED \
279908c70cfbSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
280008c70cfbSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
280108c70cfbSmrg   -e 's:$: $lt_compiler_flag:'`
280208c70cfbSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
280308c70cfbSmrg   (eval "$lt_compile" 2>conftest.err)
280408c70cfbSmrg   ac_status=$?
280508c70cfbSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
280608c70cfbSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
280708c70cfbSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
280808c70cfbSmrg     # The compiler can only warn and ignore the option if not recognized
280908c70cfbSmrg     # So say no if there are warnings other than the usual output.
281008c70cfbSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
281108c70cfbSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
281208c70cfbSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
281308c70cfbSmrg       $2=yes
281408c70cfbSmrg     fi
281508c70cfbSmrg   fi
281608c70cfbSmrg   $RM conftest*
281708c70cfbSmrg])
2818602e473dSmrg
281908c70cfbSmrgif test x"[$]$2" = xyes; then
282008c70cfbSmrg    m4_if([$5], , :, [$5])
282108c70cfbSmrgelse
282208c70cfbSmrg    m4_if([$6], , :, [$6])
282308c70cfbSmrgfi
282408c70cfbSmrg])# _LT_COMPILER_OPTION
2825602e473dSmrg
282608c70cfbSmrg# Old name:
282708c70cfbSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
282808c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
282908c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2830602e473dSmrg
2831602e473dSmrg
283208c70cfbSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
283308c70cfbSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
283408c70cfbSmrg# ----------------------------------------------------
283508c70cfbSmrg# Check whether the given linker option works
283608c70cfbSmrgAC_DEFUN([_LT_LINKER_OPTION],
283708c70cfbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
283808c70cfbSmrgm4_require([_LT_DECL_SED])dnl
283908c70cfbSmrgAC_CACHE_CHECK([$1], [$2],
284008c70cfbSmrg  [$2=no
284108c70cfbSmrg   save_LDFLAGS="$LDFLAGS"
284208c70cfbSmrg   LDFLAGS="$LDFLAGS $3"
284308c70cfbSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
284408c70cfbSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
284508c70cfbSmrg     # The linker can only warn and ignore the option if not recognized
284608c70cfbSmrg     # So say no if there are warnings
284708c70cfbSmrg     if test -s conftest.err; then
284808c70cfbSmrg       # Append any errors to the config.log.
284908c70cfbSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
285008c70cfbSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
285108c70cfbSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
285208c70cfbSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
285308c70cfbSmrg         $2=yes
285408c70cfbSmrg       fi
285508c70cfbSmrg     else
285608c70cfbSmrg       $2=yes
285708c70cfbSmrg     fi
285808c70cfbSmrg   fi
285908c70cfbSmrg   $RM -r conftest*
286008c70cfbSmrg   LDFLAGS="$save_LDFLAGS"
286108c70cfbSmrg])
286208c70cfbSmrg
286308c70cfbSmrgif test x"[$]$2" = xyes; then
286408c70cfbSmrg    m4_if([$4], , :, [$4])
286508c70cfbSmrgelse
286608c70cfbSmrg    m4_if([$5], , :, [$5])
286708c70cfbSmrgfi
286808c70cfbSmrg])# _LT_LINKER_OPTION
286908c70cfbSmrg
287008c70cfbSmrg# Old name:
287108c70cfbSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
287208c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
287308c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
287408c70cfbSmrg
287508c70cfbSmrg
287608c70cfbSmrg# LT_CMD_MAX_LEN
287708c70cfbSmrg#---------------
287808c70cfbSmrgAC_DEFUN([LT_CMD_MAX_LEN],
287908c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
288008c70cfbSmrg# find the maximum length of command line arguments
288108c70cfbSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
288208c70cfbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
288308c70cfbSmrg  i=0
288408c70cfbSmrg  teststring="ABCD"
288508c70cfbSmrg
288608c70cfbSmrg  case $build_os in
288708c70cfbSmrg  msdosdjgpp*)
288808c70cfbSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
288908c70cfbSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
289008c70cfbSmrg    # during glob expansion).  Even if it were fixed, the result of this
289108c70cfbSmrg    # check would be larger than it should be.
289208c70cfbSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2893602e473dSmrg    ;;
289408c70cfbSmrg
289508c70cfbSmrg  gnu*)
289608c70cfbSmrg    # Under GNU Hurd, this test is not required because there is
289708c70cfbSmrg    # no limit to the length of command line arguments.
289808c70cfbSmrg    # Libtool will interpret -1 as no limit whatsoever
289908c70cfbSmrg    lt_cv_sys_max_cmd_len=-1;
2900602e473dSmrg    ;;
290108c70cfbSmrg
290208c70cfbSmrg  cygwin* | mingw* | cegcc*)
290308c70cfbSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
290408c70cfbSmrg    # about 5 minutes as the teststring grows exponentially.
290508c70cfbSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
290608c70cfbSmrg    # you end up with a "frozen" computer, even though with patience
290708c70cfbSmrg    # the test eventually succeeds (with a max line length of 256k).
290808c70cfbSmrg    # Instead, let's just punt: use the minimum linelength reported by
290908c70cfbSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
291008c70cfbSmrg    lt_cv_sys_max_cmd_len=8192;
2911602e473dSmrg    ;;
291208c70cfbSmrg
291308c70cfbSmrg  mint*)
291408c70cfbSmrg    # On MiNT this can take a long time and run out of memory.
291508c70cfbSmrg    lt_cv_sys_max_cmd_len=8192;
2916602e473dSmrg    ;;
291708c70cfbSmrg
291808c70cfbSmrg  amigaos*)
291908c70cfbSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
292008c70cfbSmrg    # So we just punt and use a minimum line length of 8192.
292108c70cfbSmrg    lt_cv_sys_max_cmd_len=8192;
2922602e473dSmrg    ;;
292308c70cfbSmrg
292408c70cfbSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
292508c70cfbSmrg    # This has been around since 386BSD, at least.  Likely further.
292608c70cfbSmrg    if test -x /sbin/sysctl; then
292708c70cfbSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
292808c70cfbSmrg    elif test -x /usr/sbin/sysctl; then
292908c70cfbSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
293008c70cfbSmrg    else
293108c70cfbSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
293208c70cfbSmrg    fi
293308c70cfbSmrg    # And add a safety zone
293408c70cfbSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
293508c70cfbSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2936602e473dSmrg    ;;
2937602e473dSmrg
293808c70cfbSmrg  interix*)
293908c70cfbSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
294008c70cfbSmrg    lt_cv_sys_max_cmd_len=196608
294108c70cfbSmrg    ;;
294221298544Smrg
294308c70cfbSmrg  os2*)
294408c70cfbSmrg    # The test takes a long time on OS/2.
294508c70cfbSmrg    lt_cv_sys_max_cmd_len=8192
294608c70cfbSmrg    ;;
294708c70cfbSmrg
294808c70cfbSmrg  osf*)
294908c70cfbSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
295008c70cfbSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
295108c70cfbSmrg    # nice to cause kernel panics so lets avoid the loop below.
295208c70cfbSmrg    # First set a reasonable default.
295308c70cfbSmrg    lt_cv_sys_max_cmd_len=16384
295408c70cfbSmrg    #
295508c70cfbSmrg    if test -x /sbin/sysconfig; then
295608c70cfbSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
295708c70cfbSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
295808c70cfbSmrg      esac
295908c70cfbSmrg    fi
296008c70cfbSmrg    ;;
296108c70cfbSmrg  sco3.2v5*)
296208c70cfbSmrg    lt_cv_sys_max_cmd_len=102400
296308c70cfbSmrg    ;;
296408c70cfbSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
296508c70cfbSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
296608c70cfbSmrg    if test -n "$kargmax"; then
296708c70cfbSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
296821298544Smrg    else
296908c70cfbSmrg      lt_cv_sys_max_cmd_len=32768
297008c70cfbSmrg    fi
297108c70cfbSmrg    ;;
297208c70cfbSmrg  *)
297308c70cfbSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
297408c70cfbSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
297508c70cfbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
297608c70cfbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
297708c70cfbSmrg    else
297808c70cfbSmrg      # Make teststring a little bigger before we do anything with it.
297908c70cfbSmrg      # a 1K string should be a reasonable start.
298008c70cfbSmrg      for i in 1 2 3 4 5 6 7 8 ; do
298108c70cfbSmrg        teststring=$teststring$teststring
298208c70cfbSmrg      done
298308c70cfbSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
298408c70cfbSmrg      # If test is not a shell built-in, we'll probably end up computing a
298508c70cfbSmrg      # maximum length that is only half of the actual maximum length, but
298608c70cfbSmrg      # we can't tell.
298708c70cfbSmrg      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
298808c70cfbSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
298908c70cfbSmrg	      test $i != 17 # 1/2 MB should be enough
299008c70cfbSmrg      do
299108c70cfbSmrg        i=`expr $i + 1`
299208c70cfbSmrg        teststring=$teststring$teststring
299308c70cfbSmrg      done
299408c70cfbSmrg      # Only check the string length outside the loop.
299508c70cfbSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
299608c70cfbSmrg      teststring=
299708c70cfbSmrg      # Add a significant safety factor because C++ compilers can tack on
299808c70cfbSmrg      # massive amounts of additional arguments before passing them to the
299908c70cfbSmrg      # linker.  It appears as though 1/2 is a usable value.
300008c70cfbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
300121298544Smrg    fi
300221298544Smrg    ;;
300321298544Smrg  esac
300408c70cfbSmrg])
300508c70cfbSmrgif test -n $lt_cv_sys_max_cmd_len ; then
300608c70cfbSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
300708c70cfbSmrgelse
300808c70cfbSmrg  AC_MSG_RESULT(none)
300921298544Smrgfi
301008c70cfbSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
301108c70cfbSmrg_LT_DECL([], [max_cmd_len], [0],
301208c70cfbSmrg    [What is the maximum length of a command?])
301308c70cfbSmrg])# LT_CMD_MAX_LEN
301421298544Smrg
301508c70cfbSmrg# Old name:
301608c70cfbSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
301708c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
301808c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3019602e473dSmrg
3020602e473dSmrg
302108c70cfbSmrg# _LT_HEADER_DLFCN
302208c70cfbSmrg# ----------------
302308c70cfbSmrgm4_defun([_LT_HEADER_DLFCN],
302408c70cfbSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
302508c70cfbSmrg])# _LT_HEADER_DLFCN
3026602e473dSmrg
302708c70cfbSmrg
302808c70cfbSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
302908c70cfbSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
303008c70cfbSmrg# ----------------------------------------------------------------
303108c70cfbSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
303208c70cfbSmrg[m4_require([_LT_HEADER_DLFCN])dnl
303308c70cfbSmrgif test "$cross_compiling" = yes; then :
303408c70cfbSmrg  [$4]
3035602e473dSmrgelse
303608c70cfbSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
303708c70cfbSmrg  lt_status=$lt_dlunknown
303808c70cfbSmrg  cat > conftest.$ac_ext <<_LT_EOF
303908c70cfbSmrg[#line $LINENO "configure"
304008c70cfbSmrg#include "confdefs.h"
304108c70cfbSmrg
304208c70cfbSmrg#if HAVE_DLFCN_H
304308c70cfbSmrg#include <dlfcn.h>
304408c70cfbSmrg#endif
304508c70cfbSmrg
304608c70cfbSmrg#include <stdio.h>
304708c70cfbSmrg
304808c70cfbSmrg#ifdef RTLD_GLOBAL
304908c70cfbSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
305008c70cfbSmrg#else
305108c70cfbSmrg#  ifdef DL_GLOBAL
305208c70cfbSmrg#    define LT_DLGLOBAL		DL_GLOBAL
305308c70cfbSmrg#  else
305408c70cfbSmrg#    define LT_DLGLOBAL		0
305508c70cfbSmrg#  endif
305608c70cfbSmrg#endif
305708c70cfbSmrg
305808c70cfbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
305908c70cfbSmrg   find out it does not work in some platform. */
306008c70cfbSmrg#ifndef LT_DLLAZY_OR_NOW
306108c70cfbSmrg#  ifdef RTLD_LAZY
306208c70cfbSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
306308c70cfbSmrg#  else
306408c70cfbSmrg#    ifdef DL_LAZY
306508c70cfbSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
306608c70cfbSmrg#    else
306708c70cfbSmrg#      ifdef RTLD_NOW
306808c70cfbSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
306908c70cfbSmrg#      else
307008c70cfbSmrg#        ifdef DL_NOW
307108c70cfbSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
307208c70cfbSmrg#        else
307308c70cfbSmrg#          define LT_DLLAZY_OR_NOW	0
307408c70cfbSmrg#        endif
307508c70cfbSmrg#      endif
307608c70cfbSmrg#    endif
307708c70cfbSmrg#  endif
307808c70cfbSmrg#endif
307908c70cfbSmrg
308008c70cfbSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
308108c70cfbSmrg   correspondingly for the symbols needed.  */
308208c70cfbSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
308308c70cfbSmrgint fnord () __attribute__((visibility("default")));
308408c70cfbSmrg#endif
308508c70cfbSmrg
308608c70cfbSmrgint fnord () { return 42; }
308708c70cfbSmrgint main ()
308808c70cfbSmrg{
308908c70cfbSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
309008c70cfbSmrg  int status = $lt_dlunknown;
309108c70cfbSmrg
309208c70cfbSmrg  if (self)
309308c70cfbSmrg    {
309408c70cfbSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
309508c70cfbSmrg      else
309608c70cfbSmrg        {
309708c70cfbSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
309808c70cfbSmrg          else puts (dlerror ());
309908c70cfbSmrg	}
310008c70cfbSmrg      /* dlclose (self); */
310108c70cfbSmrg    }
310221298544Smrg  else
310308c70cfbSmrg    puts (dlerror ());
310408c70cfbSmrg
310508c70cfbSmrg  return status;
310608c70cfbSmrg}]
310708c70cfbSmrg_LT_EOF
310808c70cfbSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
310908c70cfbSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
311008c70cfbSmrg    lt_status=$?
311108c70cfbSmrg    case x$lt_status in
311208c70cfbSmrg      x$lt_dlno_uscore) $1 ;;
311308c70cfbSmrg      x$lt_dlneed_uscore) $2 ;;
311408c70cfbSmrg      x$lt_dlunknown|x*) $3 ;;
311521298544Smrg    esac
311608c70cfbSmrg  else :
311708c70cfbSmrg    # compilation failed
311808c70cfbSmrg    $3
3119602e473dSmrg  fi
3120602e473dSmrgfi
312108c70cfbSmrgrm -fr conftest*
312208c70cfbSmrg])# _LT_TRY_DLOPEN_SELF
3123602e473dSmrg
3124602e473dSmrg
312508c70cfbSmrg# LT_SYS_DLOPEN_SELF
312608c70cfbSmrg# ------------------
312708c70cfbSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
312808c70cfbSmrg[m4_require([_LT_HEADER_DLFCN])dnl
312908c70cfbSmrgif test "x$enable_dlopen" != xyes; then
313008c70cfbSmrg  enable_dlopen=unknown
313108c70cfbSmrg  enable_dlopen_self=unknown
313208c70cfbSmrg  enable_dlopen_self_static=unknown
313308c70cfbSmrgelse
313408c70cfbSmrg  lt_cv_dlopen=no
313508c70cfbSmrg  lt_cv_dlopen_libs=
3136602e473dSmrg
313708c70cfbSmrg  case $host_os in
313808c70cfbSmrg  beos*)
313908c70cfbSmrg    lt_cv_dlopen="load_add_on"
314008c70cfbSmrg    lt_cv_dlopen_libs=
314108c70cfbSmrg    lt_cv_dlopen_self=yes
314208c70cfbSmrg    ;;
314321298544Smrg
314408c70cfbSmrg  mingw* | pw32* | cegcc*)
314508c70cfbSmrg    lt_cv_dlopen="LoadLibrary"
314608c70cfbSmrg    lt_cv_dlopen_libs=
314721298544Smrg    ;;
314808c70cfbSmrg
314908c70cfbSmrg  cygwin*)
315008c70cfbSmrg    lt_cv_dlopen="dlopen"
315108c70cfbSmrg    lt_cv_dlopen_libs=
315221298544Smrg    ;;
315321298544Smrg
315408c70cfbSmrg  darwin*)
315508c70cfbSmrg  # if libdl is installed we need to link against it
315608c70cfbSmrg    AC_CHECK_LIB([dl], [dlopen],
315708c70cfbSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
315808c70cfbSmrg    lt_cv_dlopen="dyld"
315908c70cfbSmrg    lt_cv_dlopen_libs=
316008c70cfbSmrg    lt_cv_dlopen_self=yes
316108c70cfbSmrg    ])
316208c70cfbSmrg    ;;
316321298544Smrg
316408c70cfbSmrg  *)
316508c70cfbSmrg    AC_CHECK_FUNC([shl_load],
316608c70cfbSmrg	  [lt_cv_dlopen="shl_load"],
316708c70cfbSmrg      [AC_CHECK_LIB([dld], [shl_load],
316808c70cfbSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
316908c70cfbSmrg	[AC_CHECK_FUNC([dlopen],
317008c70cfbSmrg	      [lt_cv_dlopen="dlopen"],
317108c70cfbSmrg	  [AC_CHECK_LIB([dl], [dlopen],
317208c70cfbSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
317308c70cfbSmrg	    [AC_CHECK_LIB([svld], [dlopen],
317408c70cfbSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
317508c70cfbSmrg	      [AC_CHECK_LIB([dld], [dld_link],
317608c70cfbSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
317708c70cfbSmrg	      ])
317808c70cfbSmrg	    ])
317908c70cfbSmrg	  ])
318008c70cfbSmrg	])
318108c70cfbSmrg      ])
318208c70cfbSmrg    ;;
318308c70cfbSmrg  esac
318421298544Smrg
318508c70cfbSmrg  if test "x$lt_cv_dlopen" != xno; then
318608c70cfbSmrg    enable_dlopen=yes
318708c70cfbSmrg  else
318808c70cfbSmrg    enable_dlopen=no
318921298544Smrg  fi
319021298544Smrg
319108c70cfbSmrg  case $lt_cv_dlopen in
319208c70cfbSmrg  dlopen)
319308c70cfbSmrg    save_CPPFLAGS="$CPPFLAGS"
319408c70cfbSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3195602e473dSmrg
319608c70cfbSmrg    save_LDFLAGS="$LDFLAGS"
319708c70cfbSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3198602e473dSmrg
319908c70cfbSmrg    save_LIBS="$LIBS"
320008c70cfbSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
3201602e473dSmrg
320208c70cfbSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
320308c70cfbSmrg	  lt_cv_dlopen_self, [dnl
320408c70cfbSmrg	  _LT_TRY_DLOPEN_SELF(
320508c70cfbSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
320608c70cfbSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
320708c70cfbSmrg    ])
3208602e473dSmrg
320908c70cfbSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
321008c70cfbSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
321108c70cfbSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
321208c70cfbSmrg	  lt_cv_dlopen_self_static, [dnl
321308c70cfbSmrg	  _LT_TRY_DLOPEN_SELF(
321408c70cfbSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
321508c70cfbSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
321608c70cfbSmrg      ])
321708c70cfbSmrg    fi
3218602e473dSmrg
321908c70cfbSmrg    CPPFLAGS="$save_CPPFLAGS"
322008c70cfbSmrg    LDFLAGS="$save_LDFLAGS"
322108c70cfbSmrg    LIBS="$save_LIBS"
322208c70cfbSmrg    ;;
322308c70cfbSmrg  esac
3224602e473dSmrg
322508c70cfbSmrg  case $lt_cv_dlopen_self in
322608c70cfbSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
322708c70cfbSmrg  *) enable_dlopen_self=unknown ;;
322821298544Smrg  esac
3229602e473dSmrg
323008c70cfbSmrg  case $lt_cv_dlopen_self_static in
323108c70cfbSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
323208c70cfbSmrg  *) enable_dlopen_self_static=unknown ;;
323308c70cfbSmrg  esac
3234602e473dSmrgfi
323508c70cfbSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
323608c70cfbSmrg	 [Whether dlopen is supported])
323708c70cfbSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
323808c70cfbSmrg	 [Whether dlopen of programs is supported])
323908c70cfbSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
324008c70cfbSmrg	 [Whether dlopen of statically linked programs is supported])
324108c70cfbSmrg])# LT_SYS_DLOPEN_SELF
3242602e473dSmrg
324308c70cfbSmrg# Old name:
324408c70cfbSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
324508c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
324608c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3247602e473dSmrg
324808c70cfbSmrg
324908c70cfbSmrg# _LT_COMPILER_C_O([TAGNAME])
325008c70cfbSmrg# ---------------------------
325108c70cfbSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
325208c70cfbSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
325308c70cfbSmrgm4_defun([_LT_COMPILER_C_O],
325408c70cfbSmrg[m4_require([_LT_DECL_SED])dnl
325508c70cfbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
3256602e473dSmrgm4_require([_LT_TAG_COMPILER])dnl
325708c70cfbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
325808c70cfbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
325908c70cfbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
326008c70cfbSmrg   $RM -r conftest 2>/dev/null
326108c70cfbSmrg   mkdir conftest
326208c70cfbSmrg   cd conftest
326308c70cfbSmrg   mkdir out
326408c70cfbSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3265602e473dSmrg
326608c70cfbSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
326708c70cfbSmrg   # Insert the option either (1) after the last *FLAGS variable, or
326808c70cfbSmrg   # (2) before a word containing "conftest.", or (3) at the end.
326908c70cfbSmrg   # Note that $ac_compile itself does not contain backslashes and begins
327008c70cfbSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
327108c70cfbSmrg   lt_compile=`echo "$ac_compile" | $SED \
327208c70cfbSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
327308c70cfbSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
327408c70cfbSmrg   -e 's:$: $lt_compiler_flag:'`
327508c70cfbSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
327608c70cfbSmrg   (eval "$lt_compile" 2>out/conftest.err)
327708c70cfbSmrg   ac_status=$?
327808c70cfbSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
327908c70cfbSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
328008c70cfbSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
328108c70cfbSmrg   then
328208c70cfbSmrg     # The compiler can only warn and ignore the option if not recognized
328308c70cfbSmrg     # So say no if there are warnings
328408c70cfbSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
328508c70cfbSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
328608c70cfbSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
328708c70cfbSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
328808c70cfbSmrg     fi
328908c70cfbSmrg   fi
329008c70cfbSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
329108c70cfbSmrg   $RM conftest*
329208c70cfbSmrg   # SGI C++ compiler will create directory out/ii_files/ for
329308c70cfbSmrg   # template instantiation
329408c70cfbSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
329508c70cfbSmrg   $RM out/* && rmdir out
329608c70cfbSmrg   cd ..
329708c70cfbSmrg   $RM -r conftest
329808c70cfbSmrg   $RM conftest*
329908c70cfbSmrg])
330008c70cfbSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
330108c70cfbSmrg	[Does compiler simultaneously support -c and -o options?])
330208c70cfbSmrg])# _LT_COMPILER_C_O
3303602e473dSmrg
3304602e473dSmrg
330508c70cfbSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
330608c70cfbSmrg# ----------------------------------
330708c70cfbSmrg# Check to see if we can do hard links to lock some files if needed
330808c70cfbSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
330908c70cfbSmrg[m4_require([_LT_ENABLE_LOCK])dnl
331008c70cfbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
331108c70cfbSmrg_LT_COMPILER_C_O([$1])
3312602e473dSmrg
331308c70cfbSmrghard_links="nottested"
331408c70cfbSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
331508c70cfbSmrg  # do not overwrite the value of need_locks provided by the user
331608c70cfbSmrg  AC_MSG_CHECKING([if we can lock with hard links])
331708c70cfbSmrg  hard_links=yes
331808c70cfbSmrg  $RM conftest*
331908c70cfbSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
332008c70cfbSmrg  touch conftest.a
332108c70cfbSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
332208c70cfbSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
332308c70cfbSmrg  AC_MSG_RESULT([$hard_links])
332408c70cfbSmrg  if test "$hard_links" = no; then
332508c70cfbSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
332608c70cfbSmrg    need_locks=warn
3327602e473dSmrg  fi
332808c70cfbSmrgelse
332908c70cfbSmrg  need_locks=no
333008c70cfbSmrgfi
333108c70cfbSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
333208c70cfbSmrg])# _LT_COMPILER_FILE_LOCKS
3333602e473dSmrg
3334602e473dSmrg
333508c70cfbSmrg# _LT_CHECK_OBJDIR
333608c70cfbSmrg# ----------------
333708c70cfbSmrgm4_defun([_LT_CHECK_OBJDIR],
333808c70cfbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
333908c70cfbSmrg[rm -f .libs 2>/dev/null
334008c70cfbSmrgmkdir .libs 2>/dev/null
334108c70cfbSmrgif test -d .libs; then
334208c70cfbSmrg  lt_cv_objdir=.libs
334308c70cfbSmrgelse
334408c70cfbSmrg  # MS-DOS does not allow filenames that begin with a dot.
334508c70cfbSmrg  lt_cv_objdir=_libs
334608c70cfbSmrgfi
334708c70cfbSmrgrmdir .libs 2>/dev/null])
334808c70cfbSmrgobjdir=$lt_cv_objdir
334908c70cfbSmrg_LT_DECL([], [objdir], [0],
335008c70cfbSmrg         [The name of the directory that contains temporary libtool files])dnl
335108c70cfbSmrgm4_pattern_allow([LT_OBJDIR])dnl
335208c70cfbSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
335308c70cfbSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
335408c70cfbSmrg])# _LT_CHECK_OBJDIR
3355602e473dSmrg
3356602e473dSmrg
335708c70cfbSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
335808c70cfbSmrg# --------------------------------------
335908c70cfbSmrg# Check hardcoding attributes.
336008c70cfbSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
336108c70cfbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
336208c70cfbSmrg_LT_TAGVAR(hardcode_action, $1)=
336308c70cfbSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
336408c70cfbSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
336508c70cfbSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3366602e473dSmrg
336708c70cfbSmrg  # We can hardcode non-existent directories.
336808c70cfbSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
336908c70cfbSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
337008c70cfbSmrg     # have to relink, otherwise we might link with an installed library
337108c70cfbSmrg     # when we should be linking with a yet-to-be-installed one
337208c70cfbSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
337308c70cfbSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
337408c70cfbSmrg    # Linking always hardcodes the temporary library directory.
337508c70cfbSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
3376602e473dSmrg  else
337708c70cfbSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
337808c70cfbSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
3379602e473dSmrg  fi
3380602e473dSmrgelse
338108c70cfbSmrg  # We cannot hardcode anything, or else we can only hardcode existing
338208c70cfbSmrg  # directories.
338308c70cfbSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
3384602e473dSmrgfi
338508c70cfbSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3386602e473dSmrg
338708c70cfbSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
338808c70cfbSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
338908c70cfbSmrg  # Fast installation is not supported
339008c70cfbSmrg  enable_fast_install=no
339108c70cfbSmrgelif test "$shlibpath_overrides_runpath" = yes ||
339208c70cfbSmrg     test "$enable_shared" = no; then
339308c70cfbSmrg  # Fast installation is not necessary
339408c70cfbSmrg  enable_fast_install=needless
339521298544Smrgfi
339608c70cfbSmrg_LT_TAGDECL([], [hardcode_action], [0],
339708c70cfbSmrg    [How to hardcode a shared library path into an executable])
339808c70cfbSmrg])# _LT_LINKER_HARDCODE_LIBPATH
339921298544Smrg
3400602e473dSmrg
340108c70cfbSmrg# _LT_CMD_STRIPLIB
340208c70cfbSmrg# ----------------
340308c70cfbSmrgm4_defun([_LT_CMD_STRIPLIB],
340408c70cfbSmrg[m4_require([_LT_DECL_EGREP])
340508c70cfbSmrgstriplib=
340608c70cfbSmrgold_striplib=
340708c70cfbSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
340808c70cfbSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
340908c70cfbSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
341008c70cfbSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
341108c70cfbSmrg  AC_MSG_RESULT([yes])
341208c70cfbSmrgelse
341308c70cfbSmrg# FIXME - insert some real tests, host_os isn't really good enough
341408c70cfbSmrg  case $host_os in
341508c70cfbSmrg  darwin*)
341608c70cfbSmrg    if test -n "$STRIP" ; then
341708c70cfbSmrg      striplib="$STRIP -x"
341808c70cfbSmrg      old_striplib="$STRIP -S"
341908c70cfbSmrg      AC_MSG_RESULT([yes])
342008c70cfbSmrg    else
342108c70cfbSmrg      AC_MSG_RESULT([no])
342208c70cfbSmrg    fi
342308c70cfbSmrg    ;;
342408c70cfbSmrg  *)
342508c70cfbSmrg    AC_MSG_RESULT([no])
342608c70cfbSmrg    ;;
342708c70cfbSmrg  esac
342808c70cfbSmrgfi
342908c70cfbSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
343008c70cfbSmrg_LT_DECL([], [striplib], [1])
343108c70cfbSmrg])# _LT_CMD_STRIPLIB
3432602e473dSmrg
3433602e473dSmrg
343408c70cfbSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
343508c70cfbSmrg# -----------------------------
343608c70cfbSmrg# PORTME Fill in your ld.so characteristics
343708c70cfbSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
343808c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
343908c70cfbSmrgm4_require([_LT_DECL_EGREP])dnl
344008c70cfbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
344108c70cfbSmrgm4_require([_LT_DECL_OBJDUMP])dnl
344208c70cfbSmrgm4_require([_LT_DECL_SED])dnl
344308c70cfbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
344408c70cfbSmrgAC_MSG_CHECKING([dynamic linker characteristics])
344508c70cfbSmrgm4_if([$1],
344608c70cfbSmrg	[], [
344708c70cfbSmrgif test "$GCC" = yes; then
344808c70cfbSmrg  case $host_os in
344908c70cfbSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
345008c70cfbSmrg    *) lt_awk_arg="/^libraries:/" ;;
345108c70cfbSmrg  esac
345208c70cfbSmrg  case $host_os in
345308c70cfbSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
345408c70cfbSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
345508c70cfbSmrg  esac
345608c70cfbSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
345708c70cfbSmrg  case $lt_search_path_spec in
345808c70cfbSmrg  *\;*)
345908c70cfbSmrg    # if the path contains ";" then we assume it to be the separator
346008c70cfbSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
346108c70cfbSmrg    # assumed that no part of a normal pathname contains ";" but that should
346208c70cfbSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
346308c70cfbSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
346408c70cfbSmrg    ;;
346508c70cfbSmrg  *)
346608c70cfbSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
346708c70cfbSmrg    ;;
346808c70cfbSmrg  esac
346908c70cfbSmrg  # Ok, now we have the path, separated by spaces, we can step through it
347008c70cfbSmrg  # and add multilib dir if necessary.
347108c70cfbSmrg  lt_tmp_lt_search_path_spec=
347208c70cfbSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
347308c70cfbSmrg  for lt_sys_path in $lt_search_path_spec; do
347408c70cfbSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
347508c70cfbSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
347608c70cfbSmrg    else
347708c70cfbSmrg      test -d "$lt_sys_path" && \
347808c70cfbSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
347908c70cfbSmrg    fi
348008c70cfbSmrg  done
348108c70cfbSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
348208c70cfbSmrgBEGIN {RS=" "; FS="/|\n";} {
348308c70cfbSmrg  lt_foo="";
348408c70cfbSmrg  lt_count=0;
348508c70cfbSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
348608c70cfbSmrg    if ($lt_i != "" && $lt_i != ".") {
348708c70cfbSmrg      if ($lt_i == "..") {
348808c70cfbSmrg        lt_count++;
348908c70cfbSmrg      } else {
349008c70cfbSmrg        if (lt_count == 0) {
349108c70cfbSmrg          lt_foo="/" $lt_i lt_foo;
349208c70cfbSmrg        } else {
349308c70cfbSmrg          lt_count--;
349408c70cfbSmrg        }
349508c70cfbSmrg      }
349608c70cfbSmrg    }
349708c70cfbSmrg  }
349808c70cfbSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
349908c70cfbSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
350008c70cfbSmrg}'`
350108c70cfbSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
350208c70cfbSmrg  # for these hosts.
350308c70cfbSmrg  case $host_os in
350408c70cfbSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
350508c70cfbSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
350608c70cfbSmrg  esac
350708c70cfbSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
350808c70cfbSmrgelse
350908c70cfbSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
351008c70cfbSmrgfi])
351108c70cfbSmrglibrary_names_spec=
351208c70cfbSmrglibname_spec='lib$name'
351308c70cfbSmrgsoname_spec=
351408c70cfbSmrgshrext_cmds=".so"
351508c70cfbSmrgpostinstall_cmds=
351608c70cfbSmrgpostuninstall_cmds=
351708c70cfbSmrgfinish_cmds=
351808c70cfbSmrgfinish_eval=
351908c70cfbSmrgshlibpath_var=
352008c70cfbSmrgshlibpath_overrides_runpath=unknown
352108c70cfbSmrgversion_type=none
352208c70cfbSmrgdynamic_linker="$host_os ld.so"
352308c70cfbSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
352408c70cfbSmrgneed_lib_prefix=unknown
352508c70cfbSmrghardcode_into_libs=no
3526602e473dSmrg
352708c70cfbSmrg# when you set need_version to no, make sure it does not cause -set_version
352808c70cfbSmrg# flags to be left without arguments
352908c70cfbSmrgneed_version=unknown
3530602e473dSmrg
353108c70cfbSmrgcase $host_os in
353208c70cfbSmrgaix3*)
353308c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
353408c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
353508c70cfbSmrg  shlibpath_var=LIBPATH
3536602e473dSmrg
353708c70cfbSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
353808c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
353908c70cfbSmrg  ;;
354008c70cfbSmrg
354108c70cfbSmrgaix[[4-9]]*)
354208c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
354308c70cfbSmrg  need_lib_prefix=no
354408c70cfbSmrg  need_version=no
354508c70cfbSmrg  hardcode_into_libs=yes
354608c70cfbSmrg  if test "$host_cpu" = ia64; then
354708c70cfbSmrg    # AIX 5 supports IA64
354808c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
354908c70cfbSmrg    shlibpath_var=LD_LIBRARY_PATH
355008c70cfbSmrg  else
355108c70cfbSmrg    # With GCC up to 2.95.x, collect2 would create an import file
355208c70cfbSmrg    # for dependence libraries.  The import file would start with
355308c70cfbSmrg    # the line `#! .'.  This would cause the generated library to
355408c70cfbSmrg    # depend on `.', always an invalid library.  This was fixed in
355508c70cfbSmrg    # development snapshots of GCC prior to 3.0.
355608c70cfbSmrg    case $host_os in
355708c70cfbSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
355808c70cfbSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
355908c70cfbSmrg	   echo ' yes '
356008c70cfbSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
356108c70cfbSmrg	:
356208c70cfbSmrg      else
356308c70cfbSmrg	can_build_shared=no
3564602e473dSmrg      fi
3565602e473dSmrg      ;;
3566602e473dSmrg    esac
356708c70cfbSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
356808c70cfbSmrg    # soname into executable. Probably we can add versioning support to
356908c70cfbSmrg    # collect2, so additional links can be useful in future.
357008c70cfbSmrg    if test "$aix_use_runtimelinking" = yes; then
357108c70cfbSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
357208c70cfbSmrg      # instead of lib<name>.a to let people know that these are not
357308c70cfbSmrg      # typical AIX shared libraries.
357408c70cfbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
357508c70cfbSmrg    else
357608c70cfbSmrg      # We preserve .a as extension for shared libraries through AIX4.2
357708c70cfbSmrg      # and later when we are not doing run time linking.
357808c70cfbSmrg      library_names_spec='${libname}${release}.a $libname.a'
357908c70cfbSmrg      soname_spec='${libname}${release}${shared_ext}$major'
358008c70cfbSmrg    fi
358108c70cfbSmrg    shlibpath_var=LIBPATH
3582602e473dSmrg  fi
358308c70cfbSmrg  ;;
3584602e473dSmrg
358508c70cfbSmrgamigaos*)
358608c70cfbSmrg  case $host_cpu in
358708c70cfbSmrg  powerpc)
358808c70cfbSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
358908c70cfbSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
359008c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
359108c70cfbSmrg    ;;
359208c70cfbSmrg  m68k)
359308c70cfbSmrg    library_names_spec='$libname.ixlibrary $libname.a'
359408c70cfbSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
359508c70cfbSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
359608c70cfbSmrg    ;;
359708c70cfbSmrg  esac
359808c70cfbSmrg  ;;
3599602e473dSmrg
360008c70cfbSmrgbeos*)
360108c70cfbSmrg  library_names_spec='${libname}${shared_ext}'
360208c70cfbSmrg  dynamic_linker="$host_os ld.so"
360308c70cfbSmrg  shlibpath_var=LIBRARY_PATH
360408c70cfbSmrg  ;;
3605602e473dSmrg
360608c70cfbSmrgbsdi[[45]]*)
360708c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
360808c70cfbSmrg  need_version=no
360908c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
361008c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
361108c70cfbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
361208c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
361308c70cfbSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
361408c70cfbSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
361508c70cfbSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
361608c70cfbSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
361708c70cfbSmrg  # libtool to hard-code these into programs
361808c70cfbSmrg  ;;
3619602e473dSmrg
362008c70cfbSmrgcygwin* | mingw* | pw32* | cegcc*)
362108c70cfbSmrg  version_type=windows
362208c70cfbSmrg  shrext_cmds=".dll"
362308c70cfbSmrg  need_version=no
362408c70cfbSmrg  need_lib_prefix=no
362521298544Smrg
362608c70cfbSmrg  case $GCC,$cc_basename in
362708c70cfbSmrg  yes,*)
362808c70cfbSmrg    # gcc
362908c70cfbSmrg    library_names_spec='$libname.dll.a'
363008c70cfbSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
363108c70cfbSmrg    postinstall_cmds='base_file=`basename \${file}`~
363208c70cfbSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
363308c70cfbSmrg      dldir=$destdir/`dirname \$dlpath`~
363408c70cfbSmrg      test -d \$dldir || mkdir -p \$dldir~
363508c70cfbSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
363608c70cfbSmrg      chmod a+x \$dldir/$dlname~
363708c70cfbSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
363808c70cfbSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
363908c70cfbSmrg      fi'
364008c70cfbSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
364108c70cfbSmrg      dlpath=$dir/\$dldll~
364208c70cfbSmrg       $RM \$dlpath'
364308c70cfbSmrg    shlibpath_overrides_runpath=yes
3644602e473dSmrg
364508c70cfbSmrg    case $host_os in
364608c70cfbSmrg    cygwin*)
364708c70cfbSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
364808c70cfbSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
364908c70cfbSmrgm4_if([$1], [],[
365008c70cfbSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3651602e473dSmrg      ;;
365208c70cfbSmrg    mingw* | cegcc*)
365308c70cfbSmrg      # MinGW DLLs use traditional 'lib' prefix
365408c70cfbSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3655602e473dSmrg      ;;
365608c70cfbSmrg    pw32*)
365708c70cfbSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
365808c70cfbSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3659602e473dSmrg      ;;
366008c70cfbSmrg    esac
366108c70cfbSmrg    dynamic_linker='Win32 ld.exe'
366208c70cfbSmrg    ;;
3663602e473dSmrg
366408c70cfbSmrg  *,cl*)
366508c70cfbSmrg    # Native MSVC
366608c70cfbSmrg    libname_spec='$name'
366708c70cfbSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
366808c70cfbSmrg    library_names_spec='${libname}.dll.lib'
3669602e473dSmrg
367008c70cfbSmrg    case $build_os in
367108c70cfbSmrg    mingw*)
367208c70cfbSmrg      sys_lib_search_path_spec=
367308c70cfbSmrg      lt_save_ifs=$IFS
367408c70cfbSmrg      IFS=';'
367508c70cfbSmrg      for lt_path in $LIB
367608c70cfbSmrg      do
367708c70cfbSmrg        IFS=$lt_save_ifs
367808c70cfbSmrg        # Let DOS variable expansion print the short 8.3 style file name.
367908c70cfbSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
368008c70cfbSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
368108c70cfbSmrg      done
368208c70cfbSmrg      IFS=$lt_save_ifs
368308c70cfbSmrg      # Convert to MSYS style.
368408c70cfbSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3685602e473dSmrg      ;;
368608c70cfbSmrg    cygwin*)
368708c70cfbSmrg      # Convert to unix form, then to dos form, then back to unix form
368808c70cfbSmrg      # but this time dos style (no spaces!) so that the unix form looks
368908c70cfbSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
369008c70cfbSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
369108c70cfbSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
369208c70cfbSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
369321298544Smrg      ;;
369408c70cfbSmrg    *)
369508c70cfbSmrg      sys_lib_search_path_spec="$LIB"
369608c70cfbSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
369708c70cfbSmrg        # It is most probably a Windows format PATH.
369808c70cfbSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3699602e473dSmrg      else
370008c70cfbSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3701602e473dSmrg      fi
370208c70cfbSmrg      # FIXME: find the short name or the path components, as spaces are
370308c70cfbSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
3704602e473dSmrg      ;;
370508c70cfbSmrg    esac
3706602e473dSmrg
370708c70cfbSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
370808c70cfbSmrg    postinstall_cmds='base_file=`basename \${file}`~
370908c70cfbSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
371008c70cfbSmrg      dldir=$destdir/`dirname \$dlpath`~
371108c70cfbSmrg      test -d \$dldir || mkdir -p \$dldir~
371208c70cfbSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
371308c70cfbSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
371408c70cfbSmrg      dlpath=$dir/\$dldll~
371508c70cfbSmrg       $RM \$dlpath'
371608c70cfbSmrg    shlibpath_overrides_runpath=yes
371708c70cfbSmrg    dynamic_linker='Win32 link.exe'
371808c70cfbSmrg    ;;
3719602e473dSmrg
372008c70cfbSmrg  *)
372108c70cfbSmrg    # Assume MSVC wrapper
372208c70cfbSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
372308c70cfbSmrg    dynamic_linker='Win32 ld.exe'
372408c70cfbSmrg    ;;
372508c70cfbSmrg  esac
372608c70cfbSmrg  # FIXME: first we should search . and the directory the executable is in
372708c70cfbSmrg  shlibpath_var=PATH
372808c70cfbSmrg  ;;
3729602e473dSmrg
373008c70cfbSmrgdarwin* | rhapsody*)
373108c70cfbSmrg  dynamic_linker="$host_os dyld"
373208c70cfbSmrg  version_type=darwin
373308c70cfbSmrg  need_lib_prefix=no
373408c70cfbSmrg  need_version=no
373508c70cfbSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
373608c70cfbSmrg  soname_spec='${libname}${release}${major}$shared_ext'
373708c70cfbSmrg  shlibpath_overrides_runpath=yes
373808c70cfbSmrg  shlibpath_var=DYLD_LIBRARY_PATH
373908c70cfbSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
374008c70cfbSmrgm4_if([$1], [],[
374108c70cfbSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
374208c70cfbSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
374308c70cfbSmrg  ;;
3744602e473dSmrg
374508c70cfbSmrgdgux*)
374608c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
374708c70cfbSmrg  need_lib_prefix=no
374808c70cfbSmrg  need_version=no
374908c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
375008c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
375108c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
375208c70cfbSmrg  ;;
375308c70cfbSmrg
375408c70cfbSmrgfreebsd* | dragonfly*)
375508c70cfbSmrg  # DragonFly does not have aout.  When/if they implement a new
375608c70cfbSmrg  # versioning mechanism, adjust this.
375708c70cfbSmrg  if test -x /usr/bin/objformat; then
375808c70cfbSmrg    objformat=`/usr/bin/objformat`
375908c70cfbSmrg  else
376008c70cfbSmrg    case $host_os in
376108c70cfbSmrg    freebsd[[23]].*) objformat=aout ;;
376208c70cfbSmrg    *) objformat=elf ;;
376308c70cfbSmrg    esac
376408c70cfbSmrg  fi
376508c70cfbSmrg  version_type=freebsd-$objformat
376608c70cfbSmrg  case $version_type in
376708c70cfbSmrg    freebsd-elf*)
376808c70cfbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
376908c70cfbSmrg      need_version=no
377008c70cfbSmrg      need_lib_prefix=no
3771602e473dSmrg      ;;
377208c70cfbSmrg    freebsd-*)
377308c70cfbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
377408c70cfbSmrg      need_version=yes
3775602e473dSmrg      ;;
377608c70cfbSmrg  esac
377708c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
377808c70cfbSmrg  case $host_os in
377908c70cfbSmrg  freebsd2.*)
378008c70cfbSmrg    shlibpath_overrides_runpath=yes
378108c70cfbSmrg    ;;
378208c70cfbSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
378308c70cfbSmrg    shlibpath_overrides_runpath=yes
378408c70cfbSmrg    hardcode_into_libs=yes
378508c70cfbSmrg    ;;
378608c70cfbSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
378708c70cfbSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
378808c70cfbSmrg    shlibpath_overrides_runpath=no
378908c70cfbSmrg    hardcode_into_libs=yes
379008c70cfbSmrg    ;;
379108c70cfbSmrg  *) # from 4.6 on, and DragonFly
379208c70cfbSmrg    shlibpath_overrides_runpath=yes
379308c70cfbSmrg    hardcode_into_libs=yes
379408c70cfbSmrg    ;;
379508c70cfbSmrg  esac
379608c70cfbSmrg  ;;
3797602e473dSmrg
379808c70cfbSmrggnu*)
379908c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
380008c70cfbSmrg  need_lib_prefix=no
380108c70cfbSmrg  need_version=no
380208c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
380308c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
380408c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
380508c70cfbSmrg  shlibpath_overrides_runpath=no
380608c70cfbSmrg  hardcode_into_libs=yes
380708c70cfbSmrg  ;;
3808602e473dSmrg
380908c70cfbSmrghaiku*)
381008c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
381108c70cfbSmrg  need_lib_prefix=no
381208c70cfbSmrg  need_version=no
381308c70cfbSmrg  dynamic_linker="$host_os runtime_loader"
381408c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
381508c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
381608c70cfbSmrg  shlibpath_var=LIBRARY_PATH
381708c70cfbSmrg  shlibpath_overrides_runpath=yes
381808c70cfbSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
381908c70cfbSmrg  hardcode_into_libs=yes
382008c70cfbSmrg  ;;
3821602e473dSmrg
382208c70cfbSmrghpux9* | hpux10* | hpux11*)
382308c70cfbSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
382408c70cfbSmrg  # link against other versions.
382508c70cfbSmrg  version_type=sunos
382608c70cfbSmrg  need_lib_prefix=no
382708c70cfbSmrg  need_version=no
382808c70cfbSmrg  case $host_cpu in
382908c70cfbSmrg  ia64*)
383008c70cfbSmrg    shrext_cmds='.so'
383108c70cfbSmrg    hardcode_into_libs=yes
383208c70cfbSmrg    dynamic_linker="$host_os dld.so"
383308c70cfbSmrg    shlibpath_var=LD_LIBRARY_PATH
383408c70cfbSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
383508c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
383608c70cfbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
383708c70cfbSmrg    if test "X$HPUX_IA64_MODE" = X32; then
383808c70cfbSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
383908c70cfbSmrg    else
384008c70cfbSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
384108c70cfbSmrg    fi
384208c70cfbSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
384308c70cfbSmrg    ;;
384408c70cfbSmrg  hppa*64*)
384508c70cfbSmrg    shrext_cmds='.sl'
384608c70cfbSmrg    hardcode_into_libs=yes
384708c70cfbSmrg    dynamic_linker="$host_os dld.sl"
384808c70cfbSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
384908c70cfbSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
385008c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
385108c70cfbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
385208c70cfbSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
385308c70cfbSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
385408c70cfbSmrg    ;;
385508c70cfbSmrg  *)
385608c70cfbSmrg    shrext_cmds='.sl'
385708c70cfbSmrg    dynamic_linker="$host_os dld.sl"
385808c70cfbSmrg    shlibpath_var=SHLIB_PATH
385908c70cfbSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
386008c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
386108c70cfbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
386208c70cfbSmrg    ;;
386308c70cfbSmrg  esac
386408c70cfbSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
386508c70cfbSmrg  postinstall_cmds='chmod 555 $lib'
386608c70cfbSmrg  # or fails outright, so override atomically:
386708c70cfbSmrg  install_override_mode=555
386808c70cfbSmrg  ;;
3869602e473dSmrg
387008c70cfbSmrginterix[[3-9]]*)
387108c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
387208c70cfbSmrg  need_lib_prefix=no
387308c70cfbSmrg  need_version=no
387408c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
387508c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
387608c70cfbSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
387708c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
387808c70cfbSmrg  shlibpath_overrides_runpath=no
387908c70cfbSmrg  hardcode_into_libs=yes
388008c70cfbSmrg  ;;
3881602e473dSmrg
388208c70cfbSmrgirix5* | irix6* | nonstopux*)
388308c70cfbSmrg  case $host_os in
388408c70cfbSmrg    nonstopux*) version_type=nonstopux ;;
388508c70cfbSmrg    *)
388608c70cfbSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
388708c70cfbSmrg		version_type=linux # correct to gnu/linux during the next big refactor
388808c70cfbSmrg	else
388908c70cfbSmrg		version_type=irix
389008c70cfbSmrg	fi ;;
389108c70cfbSmrg  esac
389208c70cfbSmrg  need_lib_prefix=no
389308c70cfbSmrg  need_version=no
389408c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
389508c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
389608c70cfbSmrg  case $host_os in
389708c70cfbSmrg  irix5* | nonstopux*)
389808c70cfbSmrg    libsuff= shlibsuff=
389908c70cfbSmrg    ;;
390008c70cfbSmrg  *)
390108c70cfbSmrg    case $LD in # libtool.m4 will add one of these switches to LD
390208c70cfbSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
390308c70cfbSmrg      libsuff= shlibsuff= libmagic=32-bit;;
390408c70cfbSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
390508c70cfbSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
390608c70cfbSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
390708c70cfbSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
390808c70cfbSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
390908c70cfbSmrg    esac
391008c70cfbSmrg    ;;
391108c70cfbSmrg  esac
391208c70cfbSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
391308c70cfbSmrg  shlibpath_overrides_runpath=no
391408c70cfbSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
391508c70cfbSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
391608c70cfbSmrg  hardcode_into_libs=yes
391708c70cfbSmrg  ;;
3918602e473dSmrg
391908c70cfbSmrg# No shared lib support for Linux oldld, aout, or coff.
392008c70cfbSmrglinux*oldld* | linux*aout* | linux*coff*)
392108c70cfbSmrg  dynamic_linker=no
392208c70cfbSmrg  ;;
3923602e473dSmrg
392408c70cfbSmrg# This must be glibc/ELF.
392508c70cfbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
392608c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
392708c70cfbSmrg  need_lib_prefix=no
392808c70cfbSmrg  need_version=no
392908c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
393008c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
393108c70cfbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
393208c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
393308c70cfbSmrg  shlibpath_overrides_runpath=no
3934602e473dSmrg
393508c70cfbSmrg  # Some binutils ld are patched to set DT_RUNPATH
393608c70cfbSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
393708c70cfbSmrg    [lt_cv_shlibpath_overrides_runpath=no
393808c70cfbSmrg    save_LDFLAGS=$LDFLAGS
393908c70cfbSmrg    save_libdir=$libdir
394008c70cfbSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
394108c70cfbSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
394208c70cfbSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
394308c70cfbSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
394408c70cfbSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
394508c70cfbSmrg    LDFLAGS=$save_LDFLAGS
394608c70cfbSmrg    libdir=$save_libdir
394708c70cfbSmrg    ])
394808c70cfbSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
394908c70cfbSmrg
395008c70cfbSmrg  # This implies no fast_install, which is unacceptable.
395108c70cfbSmrg  # Some rework will be needed to allow for fast_install
395208c70cfbSmrg  # before this can be enabled.
395308c70cfbSmrg  hardcode_into_libs=yes
395408c70cfbSmrg
395508c70cfbSmrg  # Append ld.so.conf contents to the search path
395608c70cfbSmrg  if test -f /etc/ld.so.conf; then
395708c70cfbSmrg    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' ' '`
395808c70cfbSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
395908c70cfbSmrg  fi
396008c70cfbSmrg
396108c70cfbSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
396208c70cfbSmrg  # powerpc, because MkLinux only supported shared libraries with the
396308c70cfbSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
396408c70cfbSmrg  # most powerpc-linux boxes support dynamic linking these days and
396508c70cfbSmrg  # people can always --disable-shared, the test was removed, and we
396608c70cfbSmrg  # assume the GNU/Linux dynamic linker is in use.
396708c70cfbSmrg  dynamic_linker='GNU/Linux ld.so'
396808c70cfbSmrg  ;;
396908c70cfbSmrg
397008c70cfbSmrgnetbsd*)
397108c70cfbSmrg  version_type=sunos
397208c70cfbSmrg  need_lib_prefix=no
397308c70cfbSmrg  need_version=no
397408c70cfbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
397508c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
397608c70cfbSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
397708c70cfbSmrg    dynamic_linker='NetBSD (a.out) ld.so'
397808c70cfbSmrg  else
397908c70cfbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
398008c70cfbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
398108c70cfbSmrg    dynamic_linker='NetBSD ld.elf_so'
398208c70cfbSmrg  fi
398308c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
398408c70cfbSmrg  shlibpath_overrides_runpath=yes
398508c70cfbSmrg  hardcode_into_libs=yes
398608c70cfbSmrg  ;;
3987602e473dSmrg
398808c70cfbSmrgnewsos6)
398908c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
399008c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
399108c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
399208c70cfbSmrg  shlibpath_overrides_runpath=yes
399308c70cfbSmrg  ;;
3994602e473dSmrg
399508c70cfbSmrg*nto* | *qnx*)
399608c70cfbSmrg  version_type=qnx
399708c70cfbSmrg  need_lib_prefix=no
399808c70cfbSmrg  need_version=no
399908c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
400008c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
400108c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
400208c70cfbSmrg  shlibpath_overrides_runpath=no
400308c70cfbSmrg  hardcode_into_libs=yes
400408c70cfbSmrg  dynamic_linker='ldqnx.so'
400508c70cfbSmrg  ;;
4006602e473dSmrg
400708c70cfbSmrgopenbsd*)
400808c70cfbSmrg  version_type=sunos
400908c70cfbSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
401008c70cfbSmrg  need_lib_prefix=no
401108c70cfbSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
401208c70cfbSmrg  case $host_os in
401308c70cfbSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
401408c70cfbSmrg    *)				need_version=no  ;;
401508c70cfbSmrg  esac
401608c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
401708c70cfbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
401808c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
401908c70cfbSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
402008c70cfbSmrg    case $host_os in
402108c70cfbSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
402208c70cfbSmrg	shlibpath_overrides_runpath=no
402308c70cfbSmrg	;;
402408c70cfbSmrg      *)
402508c70cfbSmrg	shlibpath_overrides_runpath=yes
402608c70cfbSmrg	;;
402708c70cfbSmrg      esac
402808c70cfbSmrg  else
402908c70cfbSmrg    shlibpath_overrides_runpath=yes
4030602e473dSmrg  fi
403108c70cfbSmrg  ;;
403221298544Smrg
403308c70cfbSmrgos2*)
403408c70cfbSmrg  libname_spec='$name'
403508c70cfbSmrg  shrext_cmds=".dll"
403608c70cfbSmrg  need_lib_prefix=no
403708c70cfbSmrg  library_names_spec='$libname${shared_ext} $libname.a'
403808c70cfbSmrg  dynamic_linker='OS/2 ld.exe'
403908c70cfbSmrg  shlibpath_var=LIBPATH
404008c70cfbSmrg  ;;
4041602e473dSmrg
404208c70cfbSmrgosf3* | osf4* | osf5*)
404308c70cfbSmrg  version_type=osf
404408c70cfbSmrg  need_lib_prefix=no
404508c70cfbSmrg  need_version=no
404608c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
404708c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
404808c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
404908c70cfbSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
405008c70cfbSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
405108c70cfbSmrg  ;;
4052602e473dSmrg
405308c70cfbSmrgrdos*)
405408c70cfbSmrg  dynamic_linker=no
405508c70cfbSmrg  ;;
4056602e473dSmrg
405708c70cfbSmrgsolaris*)
405808c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
405908c70cfbSmrg  need_lib_prefix=no
406008c70cfbSmrg  need_version=no
406108c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
406208c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
406308c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
406408c70cfbSmrg  shlibpath_overrides_runpath=yes
406508c70cfbSmrg  hardcode_into_libs=yes
406608c70cfbSmrg  # ldd complains unless libraries are executable
406708c70cfbSmrg  postinstall_cmds='chmod +x $lib'
406808c70cfbSmrg  ;;
4069602e473dSmrg
407008c70cfbSmrgsunos4*)
407108c70cfbSmrg  version_type=sunos
407208c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
407308c70cfbSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
407408c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
407508c70cfbSmrg  shlibpath_overrides_runpath=yes
407608c70cfbSmrg  if test "$with_gnu_ld" = yes; then
407708c70cfbSmrg    need_lib_prefix=no
407808c70cfbSmrg  fi
407908c70cfbSmrg  need_version=yes
408008c70cfbSmrg  ;;
4081602e473dSmrg
408208c70cfbSmrgsysv4 | sysv4.3*)
408308c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
408408c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
408508c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
408608c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
408708c70cfbSmrg  case $host_vendor in
408808c70cfbSmrg    sni)
408908c70cfbSmrg      shlibpath_overrides_runpath=no
409008c70cfbSmrg      need_lib_prefix=no
409108c70cfbSmrg      runpath_var=LD_RUN_PATH
409208c70cfbSmrg      ;;
409308c70cfbSmrg    siemens)
409408c70cfbSmrg      need_lib_prefix=no
409508c70cfbSmrg      ;;
409608c70cfbSmrg    motorola)
409708c70cfbSmrg      need_lib_prefix=no
409808c70cfbSmrg      need_version=no
409908c70cfbSmrg      shlibpath_overrides_runpath=no
410008c70cfbSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
410108c70cfbSmrg      ;;
4102602e473dSmrg  esac
410308c70cfbSmrg  ;;
4104602e473dSmrg
410508c70cfbSmrgsysv4*MP*)
410608c70cfbSmrg  if test -d /usr/nec ;then
410708c70cfbSmrg    version_type=linux # correct to gnu/linux during the next big refactor
410808c70cfbSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
410908c70cfbSmrg    soname_spec='$libname${shared_ext}.$major'
411008c70cfbSmrg    shlibpath_var=LD_LIBRARY_PATH
411108c70cfbSmrg  fi
411208c70cfbSmrg  ;;
411321298544Smrg
411408c70cfbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
411508c70cfbSmrg  version_type=freebsd-elf
411608c70cfbSmrg  need_lib_prefix=no
411708c70cfbSmrg  need_version=no
411808c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
411908c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
412008c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
412108c70cfbSmrg  shlibpath_overrides_runpath=yes
412208c70cfbSmrg  hardcode_into_libs=yes
4123602e473dSmrg  if test "$with_gnu_ld" = yes; then
412408c70cfbSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
412508c70cfbSmrg  else
412608c70cfbSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
412721298544Smrg    case $host_os in
412808c70cfbSmrg      sco3.2v5*)
412908c70cfbSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
413021298544Smrg	;;
413121298544Smrg    esac
413221298544Smrg  fi
413308c70cfbSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
413408c70cfbSmrg  ;;
413521298544Smrg
413608c70cfbSmrgtpf*)
413708c70cfbSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
413808c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
413908c70cfbSmrg  need_lib_prefix=no
414008c70cfbSmrg  need_version=no
414108c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
414208c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
414308c70cfbSmrg  shlibpath_overrides_runpath=no
414408c70cfbSmrg  hardcode_into_libs=yes
414508c70cfbSmrg  ;;
4146602e473dSmrg
414708c70cfbSmrguts4*)
414808c70cfbSmrg  version_type=linux # correct to gnu/linux during the next big refactor
414908c70cfbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
415008c70cfbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
415108c70cfbSmrg  shlibpath_var=LD_LIBRARY_PATH
415208c70cfbSmrg  ;;
415321298544Smrg
415408c70cfbSmrg*)
415508c70cfbSmrg  dynamic_linker=no
415608c70cfbSmrg  ;;
415708c70cfbSmrgesac
415808c70cfbSmrgAC_MSG_RESULT([$dynamic_linker])
415908c70cfbSmrgtest "$dynamic_linker" = no && can_build_shared=no
4160602e473dSmrg
416108c70cfbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
416208c70cfbSmrgif test "$GCC" = yes; then
416308c70cfbSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
416408c70cfbSmrgfi
4165602e473dSmrg
416608c70cfbSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
416708c70cfbSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
416808c70cfbSmrgfi
416908c70cfbSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
417008c70cfbSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
417108c70cfbSmrgfi
4172602e473dSmrg
417308c70cfbSmrg_LT_DECL([], [variables_saved_for_relink], [1],
417408c70cfbSmrg    [Variables whose values should be saved in libtool wrapper scripts and
417508c70cfbSmrg    restored at link time])
417608c70cfbSmrg_LT_DECL([], [need_lib_prefix], [0],
417708c70cfbSmrg    [Do we need the "lib" prefix for modules?])
417808c70cfbSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
417908c70cfbSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
418008c70cfbSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
418108c70cfbSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
418208c70cfbSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
418308c70cfbSmrg    [Is shlibpath searched before the hard-coded library search path?])
418408c70cfbSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
418508c70cfbSmrg_LT_DECL([], [library_names_spec], [1],
418608c70cfbSmrg    [[List of archive names.  First name is the real one, the rest are links.
418708c70cfbSmrg    The last name is the one that the linker finds with -lNAME]])
418808c70cfbSmrg_LT_DECL([], [soname_spec], [1],
418908c70cfbSmrg    [[The coded name of the library, if different from the real name]])
419008c70cfbSmrg_LT_DECL([], [install_override_mode], [1],
419108c70cfbSmrg    [Permission mode override for installation of shared libraries])
419208c70cfbSmrg_LT_DECL([], [postinstall_cmds], [2],
419308c70cfbSmrg    [Command to use after installation of a shared archive])
419408c70cfbSmrg_LT_DECL([], [postuninstall_cmds], [2],
419508c70cfbSmrg    [Command to use after uninstallation of a shared archive])
419608c70cfbSmrg_LT_DECL([], [finish_cmds], [2],
419708c70cfbSmrg    [Commands used to finish a libtool library installation in a directory])
419808c70cfbSmrg_LT_DECL([], [finish_eval], [1],
419908c70cfbSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
420008c70cfbSmrg    not shown]])
420108c70cfbSmrg_LT_DECL([], [hardcode_into_libs], [0],
420208c70cfbSmrg    [Whether we should hardcode library paths into libraries])
420308c70cfbSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
420408c70cfbSmrg    [Compile-time system search path for libraries])
420508c70cfbSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
420608c70cfbSmrg    [Run-time system search path for libraries])
420708c70cfbSmrg])# _LT_SYS_DYNAMIC_LINKER
4208602e473dSmrg
4209602e473dSmrg
421008c70cfbSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
421108c70cfbSmrg# --------------------------
421208c70cfbSmrg# find a file program which can recognize shared library
421308c70cfbSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
421408c70cfbSmrg[m4_require([_LT_DECL_EGREP])dnl
421508c70cfbSmrgAC_MSG_CHECKING([for $1])
421608c70cfbSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
421708c70cfbSmrg[case $MAGIC_CMD in
421808c70cfbSmrg[[\\/*] |  ?:[\\/]*])
421908c70cfbSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
422008c70cfbSmrg  ;;
422108c70cfbSmrg*)
422208c70cfbSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
422308c70cfbSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
422408c70cfbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
422508c70cfbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
422608c70cfbSmrgdnl not every word.  This closes a longstanding sh security hole.
422708c70cfbSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
422808c70cfbSmrg  for ac_dir in $ac_dummy; do
422908c70cfbSmrg    IFS="$lt_save_ifs"
423008c70cfbSmrg    test -z "$ac_dir" && ac_dir=.
423108c70cfbSmrg    if test -f $ac_dir/$1; then
423208c70cfbSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
423308c70cfbSmrg      if test -n "$file_magic_test_file"; then
423408c70cfbSmrg	case $deplibs_check_method in
423508c70cfbSmrg	"file_magic "*)
423608c70cfbSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
423708c70cfbSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
423808c70cfbSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
423908c70cfbSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
424008c70cfbSmrg	    :
424108c70cfbSmrg	  else
424208c70cfbSmrg	    cat <<_LT_EOF 1>&2
4243602e473dSmrg
424408c70cfbSmrg*** Warning: the command libtool uses to detect shared libraries,
424508c70cfbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
424608c70cfbSmrg*** The result is that libtool may fail to recognize shared libraries
424708c70cfbSmrg*** as such.  This will affect the creation of libtool libraries that
424808c70cfbSmrg*** depend on shared libraries, but programs linked with such libtool
424908c70cfbSmrg*** libraries will work regardless of this problem.  Nevertheless, you
425008c70cfbSmrg*** may want to report the problem to your system manager and/or to
425108c70cfbSmrg*** bug-libtool@gnu.org
4252602e473dSmrg
4253602e473dSmrg_LT_EOF
425408c70cfbSmrg	  fi ;;
425508c70cfbSmrg	esac
4256602e473dSmrg      fi
425708c70cfbSmrg      break
425808c70cfbSmrg    fi
425908c70cfbSmrg  done
426008c70cfbSmrg  IFS="$lt_save_ifs"
426108c70cfbSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
426208c70cfbSmrg  ;;
426308c70cfbSmrgesac])
426408c70cfbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
426508c70cfbSmrgif test -n "$MAGIC_CMD"; then
426608c70cfbSmrg  AC_MSG_RESULT($MAGIC_CMD)
426708c70cfbSmrgelse
426808c70cfbSmrg  AC_MSG_RESULT(no)
426908c70cfbSmrgfi
427008c70cfbSmrg_LT_DECL([], [MAGIC_CMD], [0],
427108c70cfbSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
427208c70cfbSmrg])# _LT_PATH_TOOL_PREFIX
4273602e473dSmrg
427408c70cfbSmrg# Old name:
427508c70cfbSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
427608c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
427708c70cfbSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4278602e473dSmrg
4279602e473dSmrg
428008c70cfbSmrg# _LT_PATH_MAGIC
428108c70cfbSmrg# --------------
428208c70cfbSmrg# find a file program which can recognize a shared library
428308c70cfbSmrgm4_defun([_LT_PATH_MAGIC],
428408c70cfbSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
428508c70cfbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
428608c70cfbSmrg  if test -n "$ac_tool_prefix"; then
428708c70cfbSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
428808c70cfbSmrg  else
428908c70cfbSmrg    MAGIC_CMD=:
429008c70cfbSmrg  fi
429108c70cfbSmrgfi
429208c70cfbSmrg])# _LT_PATH_MAGIC
4293602e473dSmrg
429408c70cfbSmrg
429508c70cfbSmrg# LT_PATH_LD
429608c70cfbSmrg# ----------
429708c70cfbSmrg# find the pathname to the GNU or non-GNU linker
429808c70cfbSmrgAC_DEFUN([LT_PATH_LD],
429908c70cfbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
430008c70cfbSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
430108c70cfbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
430208c70cfbSmrgm4_require([_LT_DECL_SED])dnl
430308c70cfbSmrgm4_require([_LT_DECL_EGREP])dnl
430408c70cfbSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
430508c70cfbSmrg
430608c70cfbSmrgAC_ARG_WITH([gnu-ld],
430708c70cfbSmrg    [AS_HELP_STRING([--with-gnu-ld],
430808c70cfbSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
430908c70cfbSmrg    [test "$withval" = no || with_gnu_ld=yes],
431008c70cfbSmrg    [with_gnu_ld=no])dnl
431108c70cfbSmrg
431208c70cfbSmrgac_prog=ld
431308c70cfbSmrgif test "$GCC" = yes; then
431408c70cfbSmrg  # Check if gcc -print-prog-name=ld gives a path.
431508c70cfbSmrg  AC_MSG_CHECKING([for ld used by $CC])
431608c70cfbSmrg  case $host in
431708c70cfbSmrg  *-*-mingw*)
431808c70cfbSmrg    # gcc leaves a trailing carriage return which upsets mingw
431908c70cfbSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
432008c70cfbSmrg  *)
432108c70cfbSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
432208c70cfbSmrg  esac
432308c70cfbSmrg  case $ac_prog in
432408c70cfbSmrg    # Accept absolute paths.
432508c70cfbSmrg    [[\\/]]* | ?:[[\\/]]*)
432608c70cfbSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
432708c70cfbSmrg      # Canonicalize the pathname of ld
432808c70cfbSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
432908c70cfbSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
433008c70cfbSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
433108c70cfbSmrg      done
433208c70cfbSmrg      test -z "$LD" && LD="$ac_prog"
4333602e473dSmrg      ;;
433408c70cfbSmrg  "")
433508c70cfbSmrg    # If it fails, then pretend we aren't using GCC.
433608c70cfbSmrg    ac_prog=ld
433708c70cfbSmrg    ;;
433808c70cfbSmrg  *)
433908c70cfbSmrg    # If it is relative, then search for the first ld in PATH.
434008c70cfbSmrg    with_gnu_ld=unknown
434108c70cfbSmrg    ;;
434208c70cfbSmrg  esac
434308c70cfbSmrgelif test "$with_gnu_ld" = yes; then
434408c70cfbSmrg  AC_MSG_CHECKING([for GNU ld])
434508c70cfbSmrgelse
434608c70cfbSmrg  AC_MSG_CHECKING([for non-GNU ld])
434708c70cfbSmrgfi
434808c70cfbSmrgAC_CACHE_VAL(lt_cv_path_LD,
434908c70cfbSmrg[if test -z "$LD"; then
435008c70cfbSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
435108c70cfbSmrg  for ac_dir in $PATH; do
435208c70cfbSmrg    IFS="$lt_save_ifs"
435308c70cfbSmrg    test -z "$ac_dir" && ac_dir=.
435408c70cfbSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
435508c70cfbSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
435608c70cfbSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
435708c70cfbSmrg      # but apparently some variants of GNU ld only accept -v.
435808c70cfbSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
435908c70cfbSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
436008c70cfbSmrg      *GNU* | *'with BFD'*)
436108c70cfbSmrg	test "$with_gnu_ld" != no && break
436208c70cfbSmrg	;;
436308c70cfbSmrg      *)
436408c70cfbSmrg	test "$with_gnu_ld" != yes && break
436508c70cfbSmrg	;;
436608c70cfbSmrg      esac
436708c70cfbSmrg    fi
436808c70cfbSmrg  done
436908c70cfbSmrg  IFS="$lt_save_ifs"
437008c70cfbSmrgelse
437108c70cfbSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
437208c70cfbSmrgfi])
437308c70cfbSmrgLD="$lt_cv_path_LD"
437408c70cfbSmrgif test -n "$LD"; then
437508c70cfbSmrg  AC_MSG_RESULT($LD)
437608c70cfbSmrgelse
437708c70cfbSmrg  AC_MSG_RESULT(no)
437808c70cfbSmrgfi
437908c70cfbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
438008c70cfbSmrg_LT_PATH_LD_GNU
438108c70cfbSmrgAC_SUBST([LD])
4382602e473dSmrg
438308c70cfbSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
438408c70cfbSmrg])# LT_PATH_LD
4385602e473dSmrg
438608c70cfbSmrg# Old names:
438708c70cfbSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
438808c70cfbSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
438908c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
439008c70cfbSmrgdnl AC_DEFUN([AM_PROG_LD], [])
439108c70cfbSmrgdnl AC_DEFUN([AC_PROG_LD], [])
4392602e473dSmrg
4393602e473dSmrg
439408c70cfbSmrg# _LT_PATH_LD_GNU
439508c70cfbSmrg#- --------------
439608c70cfbSmrgm4_defun([_LT_PATH_LD_GNU],
439708c70cfbSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
439808c70cfbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
439908c70cfbSmrgcase `$LD -v 2>&1 </dev/null` in
440008c70cfbSmrg*GNU* | *'with BFD'*)
440108c70cfbSmrg  lt_cv_prog_gnu_ld=yes
440208c70cfbSmrg  ;;
440308c70cfbSmrg*)
440408c70cfbSmrg  lt_cv_prog_gnu_ld=no
440508c70cfbSmrg  ;;
440608c70cfbSmrgesac])
440708c70cfbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
440808c70cfbSmrg])# _LT_PATH_LD_GNU
4409602e473dSmrg
4410602e473dSmrg
441108c70cfbSmrg# _LT_CMD_RELOAD
441208c70cfbSmrg# --------------
441308c70cfbSmrg# find reload flag for linker
441408c70cfbSmrg#   -- PORTME Some linkers may need a different reload flag.
441508c70cfbSmrgm4_defun([_LT_CMD_RELOAD],
441608c70cfbSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
441708c70cfbSmrg  lt_cv_ld_reload_flag,
441808c70cfbSmrg  [lt_cv_ld_reload_flag='-r'])
441908c70cfbSmrgreload_flag=$lt_cv_ld_reload_flag
442008c70cfbSmrgcase $reload_flag in
442108c70cfbSmrg"" | " "*) ;;
442208c70cfbSmrg*) reload_flag=" $reload_flag" ;;
442308c70cfbSmrgesac
442408c70cfbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
442508c70cfbSmrgcase $host_os in
442608c70cfbSmrg  cygwin* | mingw* | pw32* | cegcc*)
442708c70cfbSmrg    if test "$GCC" != yes; then
442808c70cfbSmrg      reload_cmds=false
442908c70cfbSmrg    fi
443008c70cfbSmrg    ;;
443108c70cfbSmrg  darwin*)
443208c70cfbSmrg    if test "$GCC" = yes; then
443308c70cfbSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
443408c70cfbSmrg    else
443508c70cfbSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
443608c70cfbSmrg    fi
443708c70cfbSmrg    ;;
443808c70cfbSmrgesac
443908c70cfbSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
444008c70cfbSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
444108c70cfbSmrg])# _LT_CMD_RELOAD
4442602e473dSmrg
4443602e473dSmrg
444408c70cfbSmrg# _LT_CHECK_MAGIC_METHOD
444508c70cfbSmrg# ----------------------
444608c70cfbSmrg# how to check for library dependencies
444708c70cfbSmrg#  -- PORTME fill in with the dynamic library characteristics
444808c70cfbSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
444908c70cfbSmrg[m4_require([_LT_DECL_EGREP])
445008c70cfbSmrgm4_require([_LT_DECL_OBJDUMP])
445108c70cfbSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
445208c70cfbSmrglt_cv_deplibs_check_method,
445308c70cfbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
445408c70cfbSmrglt_cv_file_magic_test_file=
445508c70cfbSmrglt_cv_deplibs_check_method='unknown'
445608c70cfbSmrg# Need to set the preceding variable on all platforms that support
445708c70cfbSmrg# interlibrary dependencies.
445808c70cfbSmrg# 'none' -- dependencies not supported.
445908c70cfbSmrg# `unknown' -- same as none, but documents that we really don't know.
446008c70cfbSmrg# 'pass_all' -- all dependencies passed with no checks.
446108c70cfbSmrg# 'test_compile' -- check by making test program.
446208c70cfbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
446308c70cfbSmrg# which responds to the $file_magic_cmd with a given extended regex.
446408c70cfbSmrg# If you have `file' or equivalent on your system and you're not sure
446508c70cfbSmrg# whether `pass_all' will *always* work, you probably want this one.
4466602e473dSmrg
446708c70cfbSmrgcase $host_os in
446808c70cfbSmrgaix[[4-9]]*)
446908c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
447008c70cfbSmrg  ;;
4471602e473dSmrg
447208c70cfbSmrgbeos*)
447308c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
447408c70cfbSmrg  ;;
4475602e473dSmrg
447608c70cfbSmrgbsdi[[45]]*)
447708c70cfbSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
447808c70cfbSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
447908c70cfbSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
448008c70cfbSmrg  ;;
4481602e473dSmrg
448208c70cfbSmrgcygwin*)
448308c70cfbSmrg  # func_win32_libid is a shell function defined in ltmain.sh
448408c70cfbSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
448508c70cfbSmrg  lt_cv_file_magic_cmd='func_win32_libid'
448608c70cfbSmrg  ;;
4487602e473dSmrg
448808c70cfbSmrgmingw* | pw32*)
448908c70cfbSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
449008c70cfbSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
449108c70cfbSmrg  # unless we find 'file', for example because we are cross-compiling.
449208c70cfbSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
449308c70cfbSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
449408c70cfbSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
449508c70cfbSmrg    lt_cv_file_magic_cmd='func_win32_libid'
449608c70cfbSmrg  else
449708c70cfbSmrg    # Keep this pattern in sync with the one in func_win32_libid.
449808c70cfbSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
449908c70cfbSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
450008c70cfbSmrg  fi
450108c70cfbSmrg  ;;
4502602e473dSmrg
450308c70cfbSmrgcegcc*)
450408c70cfbSmrg  # use the weaker test based on 'objdump'. See mingw*.
450508c70cfbSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
450608c70cfbSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
450708c70cfbSmrg  ;;
4508602e473dSmrg
450908c70cfbSmrgdarwin* | rhapsody*)
451008c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
451108c70cfbSmrg  ;;
4512602e473dSmrg
451308c70cfbSmrgfreebsd* | dragonfly*)
451408c70cfbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
451508c70cfbSmrg    case $host_cpu in
451608c70cfbSmrg    i*86 )
451708c70cfbSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
451808c70cfbSmrg      # Let's accept both of them until this is cleared up.
451908c70cfbSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
452008c70cfbSmrg      lt_cv_file_magic_cmd=/usr/bin/file
452108c70cfbSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4522602e473dSmrg      ;;
452308c70cfbSmrg    esac
452408c70cfbSmrg  else
452508c70cfbSmrg    lt_cv_deplibs_check_method=pass_all
452608c70cfbSmrg  fi
452708c70cfbSmrg  ;;
4528602e473dSmrg
452908c70cfbSmrggnu*)
453008c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
453108c70cfbSmrg  ;;
4532602e473dSmrg
453308c70cfbSmrghaiku*)
453408c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
453508c70cfbSmrg  ;;
4536602e473dSmrg
453708c70cfbSmrghpux10.20* | hpux11*)
453808c70cfbSmrg  lt_cv_file_magic_cmd=/usr/bin/file
453908c70cfbSmrg  case $host_cpu in
454008c70cfbSmrg  ia64*)
454108c70cfbSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
454208c70cfbSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
454308c70cfbSmrg    ;;
454408c70cfbSmrg  hppa*64*)
454508c70cfbSmrg    [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]']
454608c70cfbSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
454708c70cfbSmrg    ;;
454808c70cfbSmrg  *)
454908c70cfbSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
455008c70cfbSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
455108c70cfbSmrg    ;;
455208c70cfbSmrg  esac
455308c70cfbSmrg  ;;
4554602e473dSmrg
455508c70cfbSmrginterix[[3-9]]*)
455608c70cfbSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
455708c70cfbSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
455808c70cfbSmrg  ;;
4559602e473dSmrg
456008c70cfbSmrgirix5* | irix6* | nonstopux*)
456108c70cfbSmrg  case $LD in
456208c70cfbSmrg  *-32|*"-32 ") libmagic=32-bit;;
456308c70cfbSmrg  *-n32|*"-n32 ") libmagic=N32;;
456408c70cfbSmrg  *-64|*"-64 ") libmagic=64-bit;;
456508c70cfbSmrg  *) libmagic=never-match;;
456608c70cfbSmrg  esac
456708c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
456808c70cfbSmrg  ;;
4569602e473dSmrg
457008c70cfbSmrg# This must be glibc/ELF.
457108c70cfbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
457208c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
457308c70cfbSmrg  ;;
4574602e473dSmrg
457508c70cfbSmrgnetbsd*)
457608c70cfbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
457708c70cfbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
457808c70cfbSmrg  else
457908c70cfbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
458008c70cfbSmrg  fi
458108c70cfbSmrg  ;;
4582602e473dSmrg
458308c70cfbSmrgnewos6*)
458408c70cfbSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
458508c70cfbSmrg  lt_cv_file_magic_cmd=/usr/bin/file
458608c70cfbSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
458708c70cfbSmrg  ;;
4588602e473dSmrg
458908c70cfbSmrg*nto* | *qnx*)
459008c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
459108c70cfbSmrg  ;;
4592602e473dSmrg
459308c70cfbSmrgopenbsd*)
459408c70cfbSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
459508c70cfbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
459608c70cfbSmrg  else
459708c70cfbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
459808c70cfbSmrg  fi
459908c70cfbSmrg  ;;
4600602e473dSmrg
460108c70cfbSmrgosf3* | osf4* | osf5*)
460208c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
460308c70cfbSmrg  ;;
4604602e473dSmrg
460508c70cfbSmrgrdos*)
460608c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
460708c70cfbSmrg  ;;
4608602e473dSmrg
460908c70cfbSmrgsolaris*)
461008c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
461108c70cfbSmrg  ;;
4612602e473dSmrg
461308c70cfbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
461408c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
461508c70cfbSmrg  ;;
4616602e473dSmrg
461708c70cfbSmrgsysv4 | sysv4.3*)
461808c70cfbSmrg  case $host_vendor in
461908c70cfbSmrg  motorola)
462008c70cfbSmrg    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]]'
462108c70cfbSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
462208c70cfbSmrg    ;;
462308c70cfbSmrg  ncr)
462408c70cfbSmrg    lt_cv_deplibs_check_method=pass_all
462508c70cfbSmrg    ;;
462608c70cfbSmrg  sequent)
462708c70cfbSmrg    lt_cv_file_magic_cmd='/bin/file'
462808c70cfbSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
462908c70cfbSmrg    ;;
463008c70cfbSmrg  sni)
463108c70cfbSmrg    lt_cv_file_magic_cmd='/bin/file'
463208c70cfbSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
463308c70cfbSmrg    lt_cv_file_magic_test_file=/lib/libc.so
463408c70cfbSmrg    ;;
463508c70cfbSmrg  siemens)
463608c70cfbSmrg    lt_cv_deplibs_check_method=pass_all
463708c70cfbSmrg    ;;
463808c70cfbSmrg  pc)
463908c70cfbSmrg    lt_cv_deplibs_check_method=pass_all
464008c70cfbSmrg    ;;
464108c70cfbSmrg  esac
464208c70cfbSmrg  ;;
4643602e473dSmrg
464408c70cfbSmrgtpf*)
464508c70cfbSmrg  lt_cv_deplibs_check_method=pass_all
464608c70cfbSmrg  ;;
464708c70cfbSmrgesac
464808c70cfbSmrg])
4649602e473dSmrg
465008c70cfbSmrgfile_magic_glob=
465108c70cfbSmrgwant_nocaseglob=no
465208c70cfbSmrgif test "$build" = "$host"; then
465308c70cfbSmrg  case $host_os in
465408c70cfbSmrg  mingw* | pw32*)
465508c70cfbSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
465608c70cfbSmrg      want_nocaseglob=yes
465708c70cfbSmrg    else
465808c70cfbSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
465908c70cfbSmrg    fi
466008c70cfbSmrg    ;;
466108c70cfbSmrg  esac
466208c70cfbSmrgfi
466308c70cfbSmrg
466408c70cfbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
466508c70cfbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
466608c70cfbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
466708c70cfbSmrg
466808c70cfbSmrg_LT_DECL([], [deplibs_check_method], [1],
466908c70cfbSmrg    [Method to check whether dependent libraries are shared objects])
467008c70cfbSmrg_LT_DECL([], [file_magic_cmd], [1],
467108c70cfbSmrg    [Command to use when deplibs_check_method = "file_magic"])
467208c70cfbSmrg_LT_DECL([], [file_magic_glob], [1],
467308c70cfbSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
467408c70cfbSmrg_LT_DECL([], [want_nocaseglob], [1],
467508c70cfbSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
467608c70cfbSmrg])# _LT_CHECK_MAGIC_METHOD
467708c70cfbSmrg
467808c70cfbSmrg
467908c70cfbSmrg# LT_PATH_NM
468008c70cfbSmrg# ----------
468108c70cfbSmrg# find the pathname to a BSD- or MS-compatible name lister
468208c70cfbSmrgAC_DEFUN([LT_PATH_NM],
468308c70cfbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
468408c70cfbSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
468508c70cfbSmrg[if test -n "$NM"; then
468608c70cfbSmrg  # Let the user override the test.
468708c70cfbSmrg  lt_cv_path_NM="$NM"
468808c70cfbSmrgelse
468908c70cfbSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
469008c70cfbSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
469108c70cfbSmrg    lt_nm_to_check="$lt_nm_to_check nm"
469208c70cfbSmrg  fi
469308c70cfbSmrg  for lt_tmp_nm in $lt_nm_to_check; do
469408c70cfbSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
469508c70cfbSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
469608c70cfbSmrg      IFS="$lt_save_ifs"
469708c70cfbSmrg      test -z "$ac_dir" && ac_dir=.
469808c70cfbSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
469908c70cfbSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
470008c70cfbSmrg	# Check to see if the nm accepts a BSD-compat flag.
470108c70cfbSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
470208c70cfbSmrg	#   nm: unknown option "B" ignored
470308c70cfbSmrg	# Tru64's nm complains that /dev/null is an invalid object file
470408c70cfbSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
470508c70cfbSmrg	*/dev/null* | *'Invalid file or object type'*)
470608c70cfbSmrg	  lt_cv_path_NM="$tmp_nm -B"
470708c70cfbSmrg	  break
4708602e473dSmrg	  ;;
4709602e473dSmrg	*)
471008c70cfbSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
471108c70cfbSmrg	  */dev/null*)
471208c70cfbSmrg	    lt_cv_path_NM="$tmp_nm -p"
471308c70cfbSmrg	    break
471408c70cfbSmrg	    ;;
471508c70cfbSmrg	  *)
471608c70cfbSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
471708c70cfbSmrg	    continue # so that we can try to find one that supports BSD flags
471808c70cfbSmrg	    ;;
471908c70cfbSmrg	  esac
4720602e473dSmrg	  ;;
4721602e473dSmrg	esac
4722602e473dSmrg      fi
472308c70cfbSmrg    done
472408c70cfbSmrg    IFS="$lt_save_ifs"
472508c70cfbSmrg  done
472608c70cfbSmrg  : ${lt_cv_path_NM=no}
472708c70cfbSmrgfi])
472808c70cfbSmrgif test "$lt_cv_path_NM" != "no"; then
472908c70cfbSmrg  NM="$lt_cv_path_NM"
473008c70cfbSmrgelse
473108c70cfbSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
473208c70cfbSmrg  if test -n "$DUMPBIN"; then :
473308c70cfbSmrg    # Let the user override the test.
473408c70cfbSmrg  else
473508c70cfbSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
473608c70cfbSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
473708c70cfbSmrg    *COFF*)
473808c70cfbSmrg      DUMPBIN="$DUMPBIN -symbols"
4739602e473dSmrg      ;;
474008c70cfbSmrg    *)
474108c70cfbSmrg      DUMPBIN=:
4742602e473dSmrg      ;;
474308c70cfbSmrg    esac
474408c70cfbSmrg  fi
474508c70cfbSmrg  AC_SUBST([DUMPBIN])
474608c70cfbSmrg  if test "$DUMPBIN" != ":"; then
474708c70cfbSmrg    NM="$DUMPBIN"
474808c70cfbSmrg  fi
474908c70cfbSmrgfi
475008c70cfbSmrgtest -z "$NM" && NM=nm
475108c70cfbSmrgAC_SUBST([NM])
475208c70cfbSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4753602e473dSmrg
475408c70cfbSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
475508c70cfbSmrg  [lt_cv_nm_interface="BSD nm"
475608c70cfbSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
475708c70cfbSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
475808c70cfbSmrg  (eval "$ac_compile" 2>conftest.err)
475908c70cfbSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
476008c70cfbSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
476108c70cfbSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
476208c70cfbSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
476308c70cfbSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
476408c70cfbSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
476508c70cfbSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
476608c70cfbSmrg    lt_cv_nm_interface="MS dumpbin"
476708c70cfbSmrg  fi
476808c70cfbSmrg  rm -f conftest*])
476908c70cfbSmrg])# LT_PATH_NM
4770602e473dSmrg
477108c70cfbSmrg# Old names:
477208c70cfbSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
477308c70cfbSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
477408c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
477508c70cfbSmrgdnl AC_DEFUN([AM_PROG_NM], [])
477608c70cfbSmrgdnl AC_DEFUN([AC_PROG_NM], [])
4777602e473dSmrg
477808c70cfbSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
477908c70cfbSmrg# --------------------------------
478008c70cfbSmrg# how to determine the name of the shared library
478108c70cfbSmrg# associated with a specific link library.
478208c70cfbSmrg#  -- PORTME fill in with the dynamic library characteristics
478308c70cfbSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
478408c70cfbSmrg[m4_require([_LT_DECL_EGREP])
478508c70cfbSmrgm4_require([_LT_DECL_OBJDUMP])
478608c70cfbSmrgm4_require([_LT_DECL_DLLTOOL])
478708c70cfbSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
478808c70cfbSmrglt_cv_sharedlib_from_linklib_cmd,
478908c70cfbSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
4790602e473dSmrg
479108c70cfbSmrgcase $host_os in
479208c70cfbSmrgcygwin* | mingw* | pw32* | cegcc*)
479308c70cfbSmrg  # two different shell functions defined in ltmain.sh
479408c70cfbSmrg  # decide which to use based on capabilities of $DLLTOOL
479508c70cfbSmrg  case `$DLLTOOL --help 2>&1` in
479608c70cfbSmrg  *--identify-strict*)
479708c70cfbSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
479808c70cfbSmrg    ;;
479908c70cfbSmrg  *)
480008c70cfbSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
480108c70cfbSmrg    ;;
480208c70cfbSmrg  esac
480308c70cfbSmrg  ;;
480408c70cfbSmrg*)
480508c70cfbSmrg  # fallback: assume linklib IS sharedlib
480608c70cfbSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
480708c70cfbSmrg  ;;
480808c70cfbSmrgesac
480908c70cfbSmrg])
481008c70cfbSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
481108c70cfbSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4812602e473dSmrg
481308c70cfbSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
481408c70cfbSmrg    [Command to associate shared and link libraries])
481508c70cfbSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4816602e473dSmrg
4817602e473dSmrg
481808c70cfbSmrg# _LT_PATH_MANIFEST_TOOL
481908c70cfbSmrg# ----------------------
482008c70cfbSmrg# locate the manifest tool
482108c70cfbSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
482208c70cfbSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
482308c70cfbSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
482408c70cfbSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
482508c70cfbSmrg  [lt_cv_path_mainfest_tool=no
482608c70cfbSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
482708c70cfbSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
482808c70cfbSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
482908c70cfbSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
483008c70cfbSmrg    lt_cv_path_mainfest_tool=yes
483108c70cfbSmrg  fi
483208c70cfbSmrg  rm -f conftest*])
483308c70cfbSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
483408c70cfbSmrg  MANIFEST_TOOL=:
483508c70cfbSmrgfi
483608c70cfbSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
483708c70cfbSmrg])# _LT_PATH_MANIFEST_TOOL
483808c70cfbSmrg
483908c70cfbSmrg
484008c70cfbSmrg# LT_LIB_M
484108c70cfbSmrg# --------
484208c70cfbSmrg# check for math library
484308c70cfbSmrgAC_DEFUN([LT_LIB_M],
484408c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
484508c70cfbSmrgLIBM=
484608c70cfbSmrgcase $host in
484708c70cfbSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
484808c70cfbSmrg  # These system don't have libm, or don't need it
484908c70cfbSmrg  ;;
485008c70cfbSmrg*-ncr-sysv4.3*)
485108c70cfbSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
485208c70cfbSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
485308c70cfbSmrg  ;;
485408c70cfbSmrg*)
485508c70cfbSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
485608c70cfbSmrg  ;;
485708c70cfbSmrgesac
485808c70cfbSmrgAC_SUBST([LIBM])
485908c70cfbSmrg])# LT_LIB_M
486008c70cfbSmrg
486108c70cfbSmrg# Old name:
486208c70cfbSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
486308c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
486408c70cfbSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
4865602e473dSmrg
4866602e473dSmrg
486708c70cfbSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
486808c70cfbSmrg# -------------------------------
486908c70cfbSmrgm4_defun([_LT_COMPILER_NO_RTTI],
487008c70cfbSmrg[m4_require([_LT_TAG_COMPILER])dnl
4871602e473dSmrg
487208c70cfbSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4873602e473dSmrg
487408c70cfbSmrgif test "$GCC" = yes; then
487508c70cfbSmrg  case $cc_basename in
487608c70cfbSmrg  nvcc*)
487708c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
487808c70cfbSmrg  *)
487908c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
488008c70cfbSmrg  esac
4881602e473dSmrg
488208c70cfbSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
488308c70cfbSmrg    lt_cv_prog_compiler_rtti_exceptions,
488408c70cfbSmrg    [-fno-rtti -fno-exceptions], [],
488508c70cfbSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
488608c70cfbSmrgfi
488708c70cfbSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
488808c70cfbSmrg	[Compiler flag to turn off builtin functions])
488908c70cfbSmrg])# _LT_COMPILER_NO_RTTI
4890602e473dSmrg
4891602e473dSmrg
489208c70cfbSmrg# _LT_CMD_GLOBAL_SYMBOLS
489308c70cfbSmrg# ----------------------
489408c70cfbSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
489508c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
489608c70cfbSmrgAC_REQUIRE([AC_PROG_CC])dnl
489708c70cfbSmrgAC_REQUIRE([AC_PROG_AWK])dnl
489808c70cfbSmrgAC_REQUIRE([LT_PATH_NM])dnl
489908c70cfbSmrgAC_REQUIRE([LT_PATH_LD])dnl
490008c70cfbSmrgm4_require([_LT_DECL_SED])dnl
490108c70cfbSmrgm4_require([_LT_DECL_EGREP])dnl
490208c70cfbSmrgm4_require([_LT_TAG_COMPILER])dnl
490321298544Smrg
490408c70cfbSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
490508c70cfbSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
490608c70cfbSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
490708c70cfbSmrg[
490808c70cfbSmrg# These are sane defaults that work on at least a few old systems.
490908c70cfbSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
491008c70cfbSmrg
491108c70cfbSmrg# Character class describing NM global symbol codes.
491208c70cfbSmrgsymcode='[[BCDEGRST]]'
491308c70cfbSmrg
491408c70cfbSmrg# Regexp to match symbols that can be accessed directly from C.
491508c70cfbSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
491608c70cfbSmrg
491708c70cfbSmrg# Define system-specific variables.
491808c70cfbSmrgcase $host_os in
491908c70cfbSmrgaix*)
492008c70cfbSmrg  symcode='[[BCDT]]'
492108c70cfbSmrg  ;;
492208c70cfbSmrgcygwin* | mingw* | pw32* | cegcc*)
492308c70cfbSmrg  symcode='[[ABCDGISTW]]'
492408c70cfbSmrg  ;;
492508c70cfbSmrghpux*)
492608c70cfbSmrg  if test "$host_cpu" = ia64; then
492708c70cfbSmrg    symcode='[[ABCDEGRST]]'
4928602e473dSmrg  fi
4929602e473dSmrg  ;;
493008c70cfbSmrgirix* | nonstopux*)
493108c70cfbSmrg  symcode='[[BCDEGRST]]'
493208c70cfbSmrg  ;;
493308c70cfbSmrgosf*)
493408c70cfbSmrg  symcode='[[BCDEGQRST]]'
493508c70cfbSmrg  ;;
493608c70cfbSmrgsolaris*)
493708c70cfbSmrg  symcode='[[BDRT]]'
493808c70cfbSmrg  ;;
493908c70cfbSmrgsco3.2v5*)
494008c70cfbSmrg  symcode='[[DT]]'
494108c70cfbSmrg  ;;
494208c70cfbSmrgsysv4.2uw2*)
494308c70cfbSmrg  symcode='[[DT]]'
494408c70cfbSmrg  ;;
494508c70cfbSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
494608c70cfbSmrg  symcode='[[ABDT]]'
494708c70cfbSmrg  ;;
494808c70cfbSmrgsysv4)
494908c70cfbSmrg  symcode='[[DFNSTU]]'
495008c70cfbSmrg  ;;
4951602e473dSmrgesac
4952602e473dSmrg
495308c70cfbSmrg# If we're using GNU nm, then use its standard symbol codes.
495408c70cfbSmrgcase `$NM -V 2>&1` in
495508c70cfbSmrg*GNU* | *'with BFD'*)
495608c70cfbSmrg  symcode='[[ABCDGIRSTW]]' ;;
495708c70cfbSmrgesac
495808c70cfbSmrg
495908c70cfbSmrg# Transform an extracted symbol line into a proper C declaration.
496008c70cfbSmrg# Some systems (esp. on ia64) link data and code symbols differently,
496108c70cfbSmrg# so use this general approach.
496208c70cfbSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
496308c70cfbSmrg
496408c70cfbSmrg# Transform an extracted symbol line into symbol name and symbol address
496508c70cfbSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
496608c70cfbSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
496708c70cfbSmrg
496808c70cfbSmrg# Handle CRLF in mingw tool chain
496908c70cfbSmrgopt_cr=
497008c70cfbSmrgcase $build_os in
497108c70cfbSmrgmingw*)
497208c70cfbSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
497308c70cfbSmrg  ;;
497408c70cfbSmrgesac
4975602e473dSmrg
497608c70cfbSmrg# Try without a prefix underscore, then with it.
497708c70cfbSmrgfor ac_symprfx in "" "_"; do
4978602e473dSmrg
497908c70cfbSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
498008c70cfbSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4981602e473dSmrg
498208c70cfbSmrg  # Write the raw and C identifiers.
498308c70cfbSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
498408c70cfbSmrg    # Fake it for dumpbin and say T for any non-static function
498508c70cfbSmrg    # and D for any global variable.
498608c70cfbSmrg    # Also find C++ and __fastcall symbols from MSVC++,
498708c70cfbSmrg    # which start with @ or ?.
498808c70cfbSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
498908c70cfbSmrg"     {last_section=section; section=\$ 3};"\
499008c70cfbSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
499108c70cfbSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
499208c70cfbSmrg"     \$ 0!~/External *\|/{next};"\
499308c70cfbSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
499408c70cfbSmrg"     {if(hide[section]) next};"\
499508c70cfbSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
499608c70cfbSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
499708c70cfbSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
499808c70cfbSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
499908c70cfbSmrg"     ' prfx=^$ac_symprfx]"
500008c70cfbSmrg  else
500108c70cfbSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
500208c70cfbSmrg  fi
500308c70cfbSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5004602e473dSmrg
500508c70cfbSmrg  # Check to see that the pipe works correctly.
500608c70cfbSmrg  pipe_works=no
5007602e473dSmrg
500808c70cfbSmrg  rm -f conftest*
500908c70cfbSmrg  cat > conftest.$ac_ext <<_LT_EOF
501008c70cfbSmrg#ifdef __cplusplus
501108c70cfbSmrgextern "C" {
501208c70cfbSmrg#endif
501308c70cfbSmrgchar nm_test_var;
501408c70cfbSmrgvoid nm_test_func(void);
501508c70cfbSmrgvoid nm_test_func(void){}
501608c70cfbSmrg#ifdef __cplusplus
501708c70cfbSmrg}
501808c70cfbSmrg#endif
501908c70cfbSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
502008c70cfbSmrg_LT_EOF
5021602e473dSmrg
502208c70cfbSmrg  if AC_TRY_EVAL(ac_compile); then
502308c70cfbSmrg    # Now try to grab the symbols.
502408c70cfbSmrg    nlist=conftest.nm
502508c70cfbSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
502608c70cfbSmrg      # Try sorting and uniquifying the output.
502708c70cfbSmrg      if sort "$nlist" | uniq > "$nlist"T; then
502808c70cfbSmrg	mv -f "$nlist"T "$nlist"
502908c70cfbSmrg      else
503008c70cfbSmrg	rm -f "$nlist"T
503108c70cfbSmrg      fi
5032602e473dSmrg
503308c70cfbSmrg      # Make sure that we snagged all the symbols we need.
503408c70cfbSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
503508c70cfbSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
503608c70cfbSmrg	  cat <<_LT_EOF > conftest.$ac_ext
503708c70cfbSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
503808c70cfbSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
503908c70cfbSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
504008c70cfbSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
504108c70cfbSmrg# define LT@&t@_DLSYM_CONST
504208c70cfbSmrg#elif defined(__osf__)
504308c70cfbSmrg/* This system does not cope well with relocations in const data.  */
504408c70cfbSmrg# define LT@&t@_DLSYM_CONST
504508c70cfbSmrg#else
504608c70cfbSmrg# define LT@&t@_DLSYM_CONST const
504708c70cfbSmrg#endif
5048602e473dSmrg
504908c70cfbSmrg#ifdef __cplusplus
505008c70cfbSmrgextern "C" {
505108c70cfbSmrg#endif
5052602e473dSmrg
505308c70cfbSmrg_LT_EOF
505408c70cfbSmrg	  # Now generate the symbol file.
505508c70cfbSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5056602e473dSmrg
505708c70cfbSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
5058602e473dSmrg
505908c70cfbSmrg/* The mapping between symbol names and symbols.  */
506008c70cfbSmrgLT@&t@_DLSYM_CONST struct {
506108c70cfbSmrg  const char *name;
506208c70cfbSmrg  void       *address;
506308c70cfbSmrg}
506408c70cfbSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
506508c70cfbSmrg{
506608c70cfbSmrg  { "@PROGRAM@", (void *) 0 },
506708c70cfbSmrg_LT_EOF
506808c70cfbSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
506908c70cfbSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
507008c70cfbSmrg  {0, (void *) 0}
507108c70cfbSmrg};
5072602e473dSmrg
507308c70cfbSmrg/* This works around a problem in FreeBSD linker */
507408c70cfbSmrg#ifdef FREEBSD_WORKAROUND
507508c70cfbSmrgstatic const void *lt_preloaded_setup() {
507608c70cfbSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
507708c70cfbSmrg}
507808c70cfbSmrg#endif
5079602e473dSmrg
508008c70cfbSmrg#ifdef __cplusplus
508108c70cfbSmrg}
508208c70cfbSmrg#endif
508308c70cfbSmrg_LT_EOF
508408c70cfbSmrg	  # Now try linking the two files.
508508c70cfbSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
508608c70cfbSmrg	  lt_globsym_save_LIBS=$LIBS
508708c70cfbSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
508808c70cfbSmrg	  LIBS="conftstm.$ac_objext"
508908c70cfbSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
509008c70cfbSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
509108c70cfbSmrg	    pipe_works=yes
509208c70cfbSmrg	  fi
509308c70cfbSmrg	  LIBS=$lt_globsym_save_LIBS
509408c70cfbSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
509508c70cfbSmrg	else
509608c70cfbSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
509708c70cfbSmrg	fi
509808c70cfbSmrg      else
509908c70cfbSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
510008c70cfbSmrg      fi
510108c70cfbSmrg    else
510208c70cfbSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5103602e473dSmrg    fi
510408c70cfbSmrg  else
510508c70cfbSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
510608c70cfbSmrg    cat conftest.$ac_ext >&5
510708c70cfbSmrg  fi
510808c70cfbSmrg  rm -rf conftest* conftst*
5109602e473dSmrg
511008c70cfbSmrg  # Do not use the global_symbol_pipe unless it works.
511108c70cfbSmrg  if test "$pipe_works" = yes; then
511208c70cfbSmrg    break
511308c70cfbSmrg  else
511408c70cfbSmrg    lt_cv_sys_global_symbol_pipe=
511508c70cfbSmrg  fi
511608c70cfbSmrgdone
511708c70cfbSmrg])
511808c70cfbSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
511908c70cfbSmrg  lt_cv_sys_global_symbol_to_cdecl=
5120602e473dSmrgfi
512108c70cfbSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
512208c70cfbSmrg  AC_MSG_RESULT(failed)
512321298544Smrgelse
512408c70cfbSmrg  AC_MSG_RESULT(ok)
512521298544Smrgfi
5126602e473dSmrg
512708c70cfbSmrg# Response file support.
512808c70cfbSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
512908c70cfbSmrg  nm_file_list_spec='@'
513008c70cfbSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
513108c70cfbSmrg  nm_file_list_spec='@'
513208c70cfbSmrgfi
5133602e473dSmrg
513408c70cfbSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
513508c70cfbSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
513608c70cfbSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
513708c70cfbSmrg    [Transform the output of nm in a proper C declaration])
513808c70cfbSmrg_LT_DECL([global_symbol_to_c_name_address],
513908c70cfbSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
514008c70cfbSmrg    [Transform the output of nm in a C name address pair])
514108c70cfbSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
514208c70cfbSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
514308c70cfbSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
514408c70cfbSmrg_LT_DECL([], [nm_file_list_spec], [1],
514508c70cfbSmrg    [Specify filename containing input files for $NM])
514608c70cfbSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
5147602e473dSmrg
5148602e473dSmrg
514908c70cfbSmrg# _LT_COMPILER_PIC([TAGNAME])
515008c70cfbSmrg# ---------------------------
515108c70cfbSmrgm4_defun([_LT_COMPILER_PIC],
515208c70cfbSmrg[m4_require([_LT_TAG_COMPILER])dnl
515308c70cfbSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
515408c70cfbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
515508c70cfbSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
5156602e473dSmrg
515708c70cfbSmrgm4_if([$1], [CXX], [
515808c70cfbSmrg  # C++ specific cases for pic, static, wl, etc.
515908c70cfbSmrg  if test "$GXX" = yes; then
516008c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
516108c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5162602e473dSmrg
516308c70cfbSmrg    case $host_os in
516408c70cfbSmrg    aix*)
516508c70cfbSmrg      # All AIX code is PIC.
516608c70cfbSmrg      if test "$host_cpu" = ia64; then
516708c70cfbSmrg	# AIX 5 now supports IA64 processor
516808c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
516908c70cfbSmrg      fi
517008c70cfbSmrg      ;;
5171602e473dSmrg
517208c70cfbSmrg    amigaos*)
517308c70cfbSmrg      case $host_cpu in
517408c70cfbSmrg      powerpc)
517508c70cfbSmrg            # see comment about AmigaOS4 .so support
517608c70cfbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
517708c70cfbSmrg        ;;
517808c70cfbSmrg      m68k)
517908c70cfbSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
518008c70cfbSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
518108c70cfbSmrg            # like `-m68040'.
518208c70cfbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
518308c70cfbSmrg        ;;
518408c70cfbSmrg      esac
518508c70cfbSmrg      ;;
5186602e473dSmrg
518708c70cfbSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
518808c70cfbSmrg      # PIC is the default for these OSes.
518908c70cfbSmrg      ;;
519008c70cfbSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
519108c70cfbSmrg      # This hack is so that the source file can tell whether it is being
519208c70cfbSmrg      # built for inclusion in a dll (and should export symbols for example).
519308c70cfbSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
519408c70cfbSmrg      # (--disable-auto-import) libraries
519508c70cfbSmrg      m4_if([$1], [GCJ], [],
519608c70cfbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
519708c70cfbSmrg      ;;
519808c70cfbSmrg    darwin* | rhapsody*)
519908c70cfbSmrg      # PIC is the default on this platform
520008c70cfbSmrg      # Common symbols not allowed in MH_DYLIB files
520108c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
520208c70cfbSmrg      ;;
520308c70cfbSmrg    *djgpp*)
520408c70cfbSmrg      # DJGPP does not support shared libraries at all
520508c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
520608c70cfbSmrg      ;;
520708c70cfbSmrg    haiku*)
520808c70cfbSmrg      # PIC is the default for Haiku.
520908c70cfbSmrg      # The "-static" flag exists, but is broken.
521008c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
521108c70cfbSmrg      ;;
521208c70cfbSmrg    interix[[3-9]]*)
521308c70cfbSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
521408c70cfbSmrg      # Instead, we relocate shared libraries at runtime.
521508c70cfbSmrg      ;;
521608c70cfbSmrg    sysv4*MP*)
521708c70cfbSmrg      if test -d /usr/nec; then
521808c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
521908c70cfbSmrg      fi
522008c70cfbSmrg      ;;
522108c70cfbSmrg    hpux*)
522208c70cfbSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
522308c70cfbSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
522408c70cfbSmrg      # sets the default TLS model and affects inlining.
522508c70cfbSmrg      case $host_cpu in
522608c70cfbSmrg      hppa*64*)
522708c70cfbSmrg	;;
522808c70cfbSmrg      *)
522908c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
523008c70cfbSmrg	;;
523108c70cfbSmrg      esac
523208c70cfbSmrg      ;;
523308c70cfbSmrg    *qnx* | *nto*)
523408c70cfbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
523508c70cfbSmrg      # it will coredump.
523608c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
523708c70cfbSmrg      ;;
523808c70cfbSmrg    *)
523908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
524008c70cfbSmrg      ;;
524108c70cfbSmrg    esac
5242602e473dSmrg  else
524308c70cfbSmrg    case $host_os in
524408c70cfbSmrg      aix[[4-9]]*)
524508c70cfbSmrg	# All AIX code is PIC.
524608c70cfbSmrg	if test "$host_cpu" = ia64; then
524708c70cfbSmrg	  # AIX 5 now supports IA64 processor
524808c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524908c70cfbSmrg	else
525008c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
525108c70cfbSmrg	fi
525208c70cfbSmrg	;;
525308c70cfbSmrg      chorus*)
525408c70cfbSmrg	case $cc_basename in
525508c70cfbSmrg	cxch68*)
525608c70cfbSmrg	  # Green Hills C++ Compiler
525708c70cfbSmrg	  # _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"
525808c70cfbSmrg	  ;;
525908c70cfbSmrg	esac
526008c70cfbSmrg	;;
526108c70cfbSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
526208c70cfbSmrg	# This hack is so that the source file can tell whether it is being
526308c70cfbSmrg	# built for inclusion in a dll (and should export symbols for example).
526408c70cfbSmrg	m4_if([$1], [GCJ], [],
526508c70cfbSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
526608c70cfbSmrg	;;
526708c70cfbSmrg      dgux*)
526808c70cfbSmrg	case $cc_basename in
526908c70cfbSmrg	  ec++*)
527008c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
527108c70cfbSmrg	    ;;
527208c70cfbSmrg	  ghcx*)
527308c70cfbSmrg	    # Green Hills C++ Compiler
527408c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
527508c70cfbSmrg	    ;;
527608c70cfbSmrg	  *)
527708c70cfbSmrg	    ;;
527808c70cfbSmrg	esac
527908c70cfbSmrg	;;
528008c70cfbSmrg      freebsd* | dragonfly*)
528108c70cfbSmrg	# FreeBSD uses GNU C++
528208c70cfbSmrg	;;
528308c70cfbSmrg      hpux9* | hpux10* | hpux11*)
528408c70cfbSmrg	case $cc_basename in
528508c70cfbSmrg	  CC*)
528608c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
528708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
528808c70cfbSmrg	    if test "$host_cpu" != ia64; then
528908c70cfbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
529008c70cfbSmrg	    fi
529108c70cfbSmrg	    ;;
529208c70cfbSmrg	  aCC*)
529308c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
529408c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
529508c70cfbSmrg	    case $host_cpu in
529608c70cfbSmrg	    hppa*64*|ia64*)
529708c70cfbSmrg	      # +Z the default
529808c70cfbSmrg	      ;;
529908c70cfbSmrg	    *)
530008c70cfbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
530108c70cfbSmrg	      ;;
530208c70cfbSmrg	    esac
530308c70cfbSmrg	    ;;
530408c70cfbSmrg	  *)
530508c70cfbSmrg	    ;;
530608c70cfbSmrg	esac
530708c70cfbSmrg	;;
530808c70cfbSmrg      interix*)
530908c70cfbSmrg	# This is c89, which is MS Visual C++ (no shared libs)
531008c70cfbSmrg	# Anyone wants to do a port?
531108c70cfbSmrg	;;
531208c70cfbSmrg      irix5* | irix6* | nonstopux*)
531308c70cfbSmrg	case $cc_basename in
531408c70cfbSmrg	  CC*)
531508c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
531608c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
531708c70cfbSmrg	    # CC pic flag -KPIC is the default.
531808c70cfbSmrg	    ;;
531908c70cfbSmrg	  *)
532008c70cfbSmrg	    ;;
532108c70cfbSmrg	esac
532208c70cfbSmrg	;;
532308c70cfbSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
532408c70cfbSmrg	case $cc_basename in
532508c70cfbSmrg	  KCC*)
532608c70cfbSmrg	    # KAI C++ Compiler
532708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
532808c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
532908c70cfbSmrg	    ;;
533008c70cfbSmrg	  ecpc* )
533108c70cfbSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
533208c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
533308c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
533408c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
533508c70cfbSmrg	    ;;
533608c70cfbSmrg	  icpc* )
533708c70cfbSmrg	    # Intel C++, used to be incompatible with GCC.
533808c70cfbSmrg	    # ICC 10 doesn't accept -KPIC any more.
533908c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
534008c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
534108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
534208c70cfbSmrg	    ;;
534308c70cfbSmrg	  pgCC* | pgcpp*)
534408c70cfbSmrg	    # Portland Group C++ compiler
534508c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
534608c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
534708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
534808c70cfbSmrg	    ;;
534908c70cfbSmrg	  cxx*)
535008c70cfbSmrg	    # Compaq C++
535108c70cfbSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
535208c70cfbSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
535308c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
535408c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
535508c70cfbSmrg	    ;;
535608c70cfbSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
535708c70cfbSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
535808c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
535908c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
536008c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
536108c70cfbSmrg	    ;;
536208c70cfbSmrg	  *)
536308c70cfbSmrg	    case `$CC -V 2>&1 | sed 5q` in
536408c70cfbSmrg	    *Sun\ C*)
536508c70cfbSmrg	      # Sun C++ 5.9
536608c70cfbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
536708c70cfbSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
536808c70cfbSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
536908c70cfbSmrg	      ;;
537008c70cfbSmrg	    esac
537108c70cfbSmrg	    ;;
537208c70cfbSmrg	esac
537308c70cfbSmrg	;;
537408c70cfbSmrg      lynxos*)
537508c70cfbSmrg	;;
537608c70cfbSmrg      m88k*)
537708c70cfbSmrg	;;
537808c70cfbSmrg      mvs*)
537908c70cfbSmrg	case $cc_basename in
538008c70cfbSmrg	  cxx*)
538108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
538208c70cfbSmrg	    ;;
538308c70cfbSmrg	  *)
538408c70cfbSmrg	    ;;
538508c70cfbSmrg	esac
538608c70cfbSmrg	;;
538708c70cfbSmrg      netbsd*)
538808c70cfbSmrg	;;
538908c70cfbSmrg      *qnx* | *nto*)
539008c70cfbSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
539108c70cfbSmrg        # it will coredump.
539208c70cfbSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
539308c70cfbSmrg        ;;
539408c70cfbSmrg      osf3* | osf4* | osf5*)
539508c70cfbSmrg	case $cc_basename in
539608c70cfbSmrg	  KCC*)
539708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
539808c70cfbSmrg	    ;;
539908c70cfbSmrg	  RCC*)
540008c70cfbSmrg	    # Rational C++ 2.4.1
540108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
540208c70cfbSmrg	    ;;
540308c70cfbSmrg	  cxx*)
540408c70cfbSmrg	    # Digital/Compaq C++
540508c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
540608c70cfbSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
540708c70cfbSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
540808c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
540908c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
541008c70cfbSmrg	    ;;
541108c70cfbSmrg	  *)
541208c70cfbSmrg	    ;;
541308c70cfbSmrg	esac
541408c70cfbSmrg	;;
541508c70cfbSmrg      psos*)
541608c70cfbSmrg	;;
541708c70cfbSmrg      solaris*)
541808c70cfbSmrg	case $cc_basename in
541908c70cfbSmrg	  CC* | sunCC*)
542008c70cfbSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
542108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
542208c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
542308c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
542408c70cfbSmrg	    ;;
542508c70cfbSmrg	  gcx*)
542608c70cfbSmrg	    # Green Hills C++ Compiler
542708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
542808c70cfbSmrg	    ;;
542908c70cfbSmrg	  *)
543008c70cfbSmrg	    ;;
543108c70cfbSmrg	esac
543208c70cfbSmrg	;;
543308c70cfbSmrg      sunos4*)
543408c70cfbSmrg	case $cc_basename in
543508c70cfbSmrg	  CC*)
543608c70cfbSmrg	    # Sun C++ 4.x
543708c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
543808c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
543908c70cfbSmrg	    ;;
544008c70cfbSmrg	  lcc*)
544108c70cfbSmrg	    # Lucid
544208c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
544308c70cfbSmrg	    ;;
544408c70cfbSmrg	  *)
544508c70cfbSmrg	    ;;
544608c70cfbSmrg	esac
544708c70cfbSmrg	;;
544808c70cfbSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
544908c70cfbSmrg	case $cc_basename in
545008c70cfbSmrg	  CC*)
545108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
545208c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
545308c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
545408c70cfbSmrg	    ;;
545508c70cfbSmrg	esac
545608c70cfbSmrg	;;
545708c70cfbSmrg      tandem*)
545808c70cfbSmrg	case $cc_basename in
545908c70cfbSmrg	  NCC*)
546008c70cfbSmrg	    # NonStop-UX NCC 3.20
546108c70cfbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
546208c70cfbSmrg	    ;;
546308c70cfbSmrg	  *)
546408c70cfbSmrg	    ;;
546508c70cfbSmrg	esac
546608c70cfbSmrg	;;
546708c70cfbSmrg      vxworks*)
546808c70cfbSmrg	;;
546908c70cfbSmrg      *)
547008c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
547108c70cfbSmrg	;;
547208c70cfbSmrg    esac
5473602e473dSmrg  fi
547408c70cfbSmrg],
547508c70cfbSmrg[
547608c70cfbSmrg  if test "$GCC" = yes; then
547708c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
547808c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5479602e473dSmrg
548008c70cfbSmrg    case $host_os in
548108c70cfbSmrg      aix*)
548208c70cfbSmrg      # All AIX code is PIC.
548308c70cfbSmrg      if test "$host_cpu" = ia64; then
548408c70cfbSmrg	# AIX 5 now supports IA64 processor
548508c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
548608c70cfbSmrg      fi
548708c70cfbSmrg      ;;
5488602e473dSmrg
548908c70cfbSmrg    amigaos*)
549008c70cfbSmrg      case $host_cpu in
549108c70cfbSmrg      powerpc)
549208c70cfbSmrg            # see comment about AmigaOS4 .so support
549308c70cfbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
549408c70cfbSmrg        ;;
549508c70cfbSmrg      m68k)
549608c70cfbSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
549708c70cfbSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
549808c70cfbSmrg            # like `-m68040'.
549908c70cfbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
550008c70cfbSmrg        ;;
550108c70cfbSmrg      esac
550208c70cfbSmrg      ;;
5503602e473dSmrg
550408c70cfbSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
550508c70cfbSmrg      # PIC is the default for these OSes.
550608c70cfbSmrg      ;;
5507602e473dSmrg
550808c70cfbSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
550908c70cfbSmrg      # This hack is so that the source file can tell whether it is being
551008c70cfbSmrg      # built for inclusion in a dll (and should export symbols for example).
551108c70cfbSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
551208c70cfbSmrg      # (--disable-auto-import) libraries
551308c70cfbSmrg      m4_if([$1], [GCJ], [],
551408c70cfbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
551508c70cfbSmrg      ;;
5516602e473dSmrg
551708c70cfbSmrg    darwin* | rhapsody*)
551808c70cfbSmrg      # PIC is the default on this platform
551908c70cfbSmrg      # Common symbols not allowed in MH_DYLIB files
552008c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
552108c70cfbSmrg      ;;
5522602e473dSmrg
552308c70cfbSmrg    haiku*)
552408c70cfbSmrg      # PIC is the default for Haiku.
552508c70cfbSmrg      # The "-static" flag exists, but is broken.
552608c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
552708c70cfbSmrg      ;;
5528602e473dSmrg
552908c70cfbSmrg    hpux*)
553008c70cfbSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
553108c70cfbSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
553208c70cfbSmrg      # sets the default TLS model and affects inlining.
553308c70cfbSmrg      case $host_cpu in
553408c70cfbSmrg      hppa*64*)
553508c70cfbSmrg	# +Z the default
553608c70cfbSmrg	;;
553708c70cfbSmrg      *)
553808c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
553908c70cfbSmrg	;;
554008c70cfbSmrg      esac
554108c70cfbSmrg      ;;
5542602e473dSmrg
554308c70cfbSmrg    interix[[3-9]]*)
554408c70cfbSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
554508c70cfbSmrg      # Instead, we relocate shared libraries at runtime.
554608c70cfbSmrg      ;;
5547602e473dSmrg
554808c70cfbSmrg    msdosdjgpp*)
554908c70cfbSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
555008c70cfbSmrg      # on systems that don't support them.
555108c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
555208c70cfbSmrg      enable_shared=no
555308c70cfbSmrg      ;;
5554602e473dSmrg
555508c70cfbSmrg    *nto* | *qnx*)
555608c70cfbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
555708c70cfbSmrg      # it will coredump.
555808c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
555908c70cfbSmrg      ;;
5560602e473dSmrg
556108c70cfbSmrg    sysv4*MP*)
556208c70cfbSmrg      if test -d /usr/nec; then
556308c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
556408c70cfbSmrg      fi
556508c70cfbSmrg      ;;
5566602e473dSmrg
556708c70cfbSmrg    *)
556808c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
556908c70cfbSmrg      ;;
557008c70cfbSmrg    esac
5571602e473dSmrg
557208c70cfbSmrg    case $cc_basename in
557308c70cfbSmrg    nvcc*) # Cuda Compiler Driver 2.2
557408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
557508c70cfbSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
557608c70cfbSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
557708c70cfbSmrg      fi
557808c70cfbSmrg      ;;
557908c70cfbSmrg    esac
558008c70cfbSmrg  else
558108c70cfbSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
558208c70cfbSmrg    case $host_os in
558308c70cfbSmrg    aix*)
558408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
558508c70cfbSmrg      if test "$host_cpu" = ia64; then
558608c70cfbSmrg	# AIX 5 now supports IA64 processor
558708c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
558808c70cfbSmrg      else
558908c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
559008c70cfbSmrg      fi
559108c70cfbSmrg      ;;
5592602e473dSmrg
559308c70cfbSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
559408c70cfbSmrg      # This hack is so that the source file can tell whether it is being
559508c70cfbSmrg      # built for inclusion in a dll (and should export symbols for example).
559608c70cfbSmrg      m4_if([$1], [GCJ], [],
559708c70cfbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
559808c70cfbSmrg      ;;
5599602e473dSmrg
560008c70cfbSmrg    hpux9* | hpux10* | hpux11*)
560108c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
560208c70cfbSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
560308c70cfbSmrg      # not for PA HP-UX.
560408c70cfbSmrg      case $host_cpu in
560508c70cfbSmrg      hppa*64*|ia64*)
560608c70cfbSmrg	# +Z the default
560708c70cfbSmrg	;;
560808c70cfbSmrg      *)
560908c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5610602e473dSmrg	;;
561108c70cfbSmrg      esac
561208c70cfbSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
561308c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
561408c70cfbSmrg      ;;
5615602e473dSmrg
561608c70cfbSmrg    irix5* | irix6* | nonstopux*)
561708c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
561808c70cfbSmrg      # PIC (with -KPIC) is the default.
561908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
562008c70cfbSmrg      ;;
5621602e473dSmrg
562208c70cfbSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
562308c70cfbSmrg      case $cc_basename in
562408c70cfbSmrg      # old Intel for x86_64 which still supported -KPIC.
562508c70cfbSmrg      ecc*)
562608c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
562708c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
562808c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
562908c70cfbSmrg        ;;
563008c70cfbSmrg      # icc used to be incompatible with GCC.
563108c70cfbSmrg      # ICC 10 doesn't accept -KPIC any more.
563208c70cfbSmrg      icc* | ifort*)
563308c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
563408c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
563508c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
563608c70cfbSmrg        ;;
563708c70cfbSmrg      # Lahey Fortran 8.1.
563808c70cfbSmrg      lf95*)
563908c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
564008c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
564108c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
564208c70cfbSmrg	;;
564308c70cfbSmrg      nagfor*)
564408c70cfbSmrg	# NAG Fortran compiler
564508c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
564608c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
564708c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
564808c70cfbSmrg	;;
564908c70cfbSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
565008c70cfbSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
565108c70cfbSmrg	# which looks to be a dead project)
565208c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
565308c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
565408c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
565508c70cfbSmrg        ;;
565608c70cfbSmrg      ccc*)
565708c70cfbSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
565808c70cfbSmrg        # All Alpha code is PIC.
565908c70cfbSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
566008c70cfbSmrg        ;;
566108c70cfbSmrg      xl* | bgxl* | bgf* | mpixl*)
566208c70cfbSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
566308c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
566408c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
566508c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
566608c70cfbSmrg	;;
566708c70cfbSmrg      *)
566808c70cfbSmrg	case `$CC -V 2>&1 | sed 5q` in
566908c70cfbSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
567008c70cfbSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
567108c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
567208c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
567308c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
567421298544Smrg	  ;;
567508c70cfbSmrg	*Sun\ F* | *Sun*Fortran*)
567608c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
567708c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
567808c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
567908c70cfbSmrg	  ;;
568008c70cfbSmrg	*Sun\ C*)
568108c70cfbSmrg	  # Sun C 5.9
568208c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
568308c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
568408c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
568508c70cfbSmrg	  ;;
568608c70cfbSmrg        *Intel*\ [[CF]]*Compiler*)
568708c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
568808c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
568908c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
569008c70cfbSmrg	  ;;
569108c70cfbSmrg	*Portland\ Group*)
569208c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
569308c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
569408c70cfbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
569521298544Smrg	  ;;
569621298544Smrg	esac
569721298544Smrg	;;
569808c70cfbSmrg      esac
569908c70cfbSmrg      ;;
5700602e473dSmrg
570108c70cfbSmrg    newsos6)
570208c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
570308c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
570408c70cfbSmrg      ;;
5705602e473dSmrg
570608c70cfbSmrg    *nto* | *qnx*)
570708c70cfbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
570808c70cfbSmrg      # it will coredump.
570908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
571008c70cfbSmrg      ;;
5711602e473dSmrg
571208c70cfbSmrg    osf3* | osf4* | osf5*)
571308c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
571408c70cfbSmrg      # All OSF/1 code is PIC.
571508c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
571608c70cfbSmrg      ;;
5717602e473dSmrg
571808c70cfbSmrg    rdos*)
571908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
572008c70cfbSmrg      ;;
5721602e473dSmrg
572208c70cfbSmrg    solaris*)
572308c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
572408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
572508c70cfbSmrg      case $cc_basename in
572608c70cfbSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
572708c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
572808c70cfbSmrg      *)
572908c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
573008c70cfbSmrg      esac
573108c70cfbSmrg      ;;
5732602e473dSmrg
573308c70cfbSmrg    sunos4*)
573408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
573508c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
573608c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
573708c70cfbSmrg      ;;
5738602e473dSmrg
573908c70cfbSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
574008c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
574108c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
574208c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
574308c70cfbSmrg      ;;
5744602e473dSmrg
574508c70cfbSmrg    sysv4*MP*)
574608c70cfbSmrg      if test -d /usr/nec ;then
574708c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
574808c70cfbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
574908c70cfbSmrg      fi
575008c70cfbSmrg      ;;
5751602e473dSmrg
575208c70cfbSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
575308c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
575408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
575508c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
575608c70cfbSmrg      ;;
5757602e473dSmrg
575808c70cfbSmrg    unicos*)
575908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
576008c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
576108c70cfbSmrg      ;;
5762602e473dSmrg
576308c70cfbSmrg    uts4*)
576408c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
576508c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
576608c70cfbSmrg      ;;
5767602e473dSmrg
576808c70cfbSmrg    *)
576908c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
577008c70cfbSmrg      ;;
577108c70cfbSmrg    esac
577208c70cfbSmrg  fi
577308c70cfbSmrg])
577408c70cfbSmrgcase $host_os in
577508c70cfbSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
577608c70cfbSmrg  *djgpp*)
577708c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
577808c70cfbSmrg    ;;
577908c70cfbSmrg  *)
578008c70cfbSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
578108c70cfbSmrg    ;;
578208c70cfbSmrgesac
5783602e473dSmrg
578408c70cfbSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
578508c70cfbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
578608c70cfbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
578708c70cfbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5788602e473dSmrg
578908c70cfbSmrg#
579008c70cfbSmrg# Check to make sure the PIC flag actually works.
579108c70cfbSmrg#
579208c70cfbSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
579308c70cfbSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
579408c70cfbSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
579508c70cfbSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
579608c70cfbSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
579708c70cfbSmrg     "" | " "*) ;;
579808c70cfbSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
579908c70cfbSmrg     esac],
580008c70cfbSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
580108c70cfbSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
580208c70cfbSmrgfi
580308c70cfbSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
580408c70cfbSmrg	[Additional compiler flags for building library objects])
5805602e473dSmrg
580608c70cfbSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
580708c70cfbSmrg	[How to pass a linker flag through the compiler])
580808c70cfbSmrg#
580908c70cfbSmrg# Check to make sure the static flag actually works.
581008c70cfbSmrg#
581108c70cfbSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
581208c70cfbSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
581308c70cfbSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
581408c70cfbSmrg  $lt_tmp_static_flag,
581508c70cfbSmrg  [],
581608c70cfbSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
581708c70cfbSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
581808c70cfbSmrg	[Compiler flag to prevent dynamic linking])
581908c70cfbSmrg])# _LT_COMPILER_PIC
582008c70cfbSmrg
582108c70cfbSmrg
582208c70cfbSmrg# _LT_LINKER_SHLIBS([TAGNAME])
582308c70cfbSmrg# ----------------------------
582408c70cfbSmrg# See if the linker supports building shared libraries.
582508c70cfbSmrgm4_defun([_LT_LINKER_SHLIBS],
582608c70cfbSmrg[AC_REQUIRE([LT_PATH_LD])dnl
582708c70cfbSmrgAC_REQUIRE([LT_PATH_NM])dnl
582808c70cfbSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
582908c70cfbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
583008c70cfbSmrgm4_require([_LT_DECL_EGREP])dnl
583108c70cfbSmrgm4_require([_LT_DECL_SED])dnl
583208c70cfbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
583308c70cfbSmrgm4_require([_LT_TAG_COMPILER])dnl
583408c70cfbSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
583508c70cfbSmrgm4_if([$1], [CXX], [
583608c70cfbSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
583708c70cfbSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
583808c70cfbSmrg  case $host_os in
583908c70cfbSmrg  aix[[4-9]]*)
584008c70cfbSmrg    # If we're using GNU nm, then we don't want the "-C" option.
584108c70cfbSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
584208c70cfbSmrg    # Also, AIX nm treats weak defined symbols like other global defined
584308c70cfbSmrg    # symbols, whereas GNU nm marks them as "W".
584408c70cfbSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
584508c70cfbSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
584608c70cfbSmrg    else
584708c70cfbSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
584808c70cfbSmrg    fi
584908c70cfbSmrg    ;;
585008c70cfbSmrg  pw32*)
585108c70cfbSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
585208c70cfbSmrg    ;;
585308c70cfbSmrg  cygwin* | mingw* | cegcc*)
585408c70cfbSmrg    case $cc_basename in
585508c70cfbSmrg    cl*)
585608c70cfbSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
585708c70cfbSmrg      ;;
585808c70cfbSmrg    *)
585908c70cfbSmrg      _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'
586008c70cfbSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
586108c70cfbSmrg      ;;
586208c70cfbSmrg    esac
586308c70cfbSmrg    ;;
586408c70cfbSmrg  *)
586508c70cfbSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
586608c70cfbSmrg    ;;
586708c70cfbSmrg  esac
586808c70cfbSmrg], [
586908c70cfbSmrg  runpath_var=
587008c70cfbSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
587108c70cfbSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
587208c70cfbSmrg  _LT_TAGVAR(archive_cmds, $1)=
587308c70cfbSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
587408c70cfbSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
587508c70cfbSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
587608c70cfbSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
587708c70cfbSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
587808c70cfbSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
587908c70cfbSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
588008c70cfbSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
588108c70cfbSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
588208c70cfbSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
588308c70cfbSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
588408c70cfbSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
588508c70cfbSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
588608c70cfbSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
588708c70cfbSmrg  _LT_TAGVAR(module_cmds, $1)=
588808c70cfbSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
588908c70cfbSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
589008c70cfbSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
589108c70cfbSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
589208c70cfbSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
589308c70cfbSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
589408c70cfbSmrg  # included in the symbol list
589508c70cfbSmrg  _LT_TAGVAR(include_expsyms, $1)=
589608c70cfbSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
589708c70cfbSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
589808c70cfbSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
589908c70cfbSmrg  # as well as any symbol that contains `d'.
590008c70cfbSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
590108c70cfbSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
590208c70cfbSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
590308c70cfbSmrg  # the symbol is explicitly referenced.  Since portable code cannot
590408c70cfbSmrg  # rely on this symbol name, it's probably fine to never include it in
590508c70cfbSmrg  # preloaded symbol tables.
590608c70cfbSmrg  # Exclude shared library initialization/finalization symbols.
590708c70cfbSmrgdnl Note also adjust exclude_expsyms for C++ above.
590808c70cfbSmrg  extract_expsyms_cmds=
5909602e473dSmrg
591008c70cfbSmrg  case $host_os in
591108c70cfbSmrg  cygwin* | mingw* | pw32* | cegcc*)
591208c70cfbSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
591308c70cfbSmrg    # When not using gcc, we currently assume that we are using
591408c70cfbSmrg    # Microsoft Visual C++.
591508c70cfbSmrg    if test "$GCC" != yes; then
591608c70cfbSmrg      with_gnu_ld=no
591708c70cfbSmrg    fi
591808c70cfbSmrg    ;;
591908c70cfbSmrg  interix*)
592008c70cfbSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
592108c70cfbSmrg    with_gnu_ld=yes
592208c70cfbSmrg    ;;
592308c70cfbSmrg  openbsd*)
592408c70cfbSmrg    with_gnu_ld=no
592508c70cfbSmrg    ;;
592608c70cfbSmrg  esac
5927602e473dSmrg
592808c70cfbSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5929602e473dSmrg
593008c70cfbSmrg  # On some targets, GNU ld is compatible enough with the native linker
593108c70cfbSmrg  # that we're better off using the native interface for both.
593208c70cfbSmrg  lt_use_gnu_ld_interface=no
593308c70cfbSmrg  if test "$with_gnu_ld" = yes; then
593408c70cfbSmrg    case $host_os in
593508c70cfbSmrg      aix*)
593608c70cfbSmrg	# The AIX port of GNU ld has always aspired to compatibility
593708c70cfbSmrg	# with the native linker.  However, as the warning in the GNU ld
593808c70cfbSmrg	# block says, versions before 2.19.5* couldn't really create working
593908c70cfbSmrg	# shared libraries, regardless of the interface used.
594008c70cfbSmrg	case `$LD -v 2>&1` in
594108c70cfbSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
594208c70cfbSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
594308c70cfbSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5944602e473dSmrg	  *)
594508c70cfbSmrg	    lt_use_gnu_ld_interface=yes
5946602e473dSmrg	    ;;
5947602e473dSmrg	esac
5948602e473dSmrg	;;
594908c70cfbSmrg      *)
595008c70cfbSmrg	lt_use_gnu_ld_interface=yes
5951602e473dSmrg	;;
595208c70cfbSmrg    esac
595308c70cfbSmrg  fi
5954602e473dSmrg
595508c70cfbSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
595608c70cfbSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
595708c70cfbSmrg    wlarc='${wl}'
5958602e473dSmrg
595908c70cfbSmrg    # Set some defaults for GNU ld with shared library support. These
596008c70cfbSmrg    # are reset later if shared libraries are not supported. Putting them
596108c70cfbSmrg    # here allows them to be overridden if necessary.
596208c70cfbSmrg    runpath_var=LD_RUN_PATH
596308c70cfbSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
596408c70cfbSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
596508c70cfbSmrg    # ancient GNU ld didn't support --whole-archive et. al.
596608c70cfbSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
596708c70cfbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
596808c70cfbSmrg    else
596908c70cfbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
597008c70cfbSmrg    fi
597108c70cfbSmrg    supports_anon_versioning=no
597208c70cfbSmrg    case `$LD -v 2>&1` in
597308c70cfbSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
597408c70cfbSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
597508c70cfbSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
597608c70cfbSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
597708c70cfbSmrg      *\ 2.11.*) ;; # other 2.11 versions
597808c70cfbSmrg      *) supports_anon_versioning=yes ;;
597908c70cfbSmrg    esac
5980602e473dSmrg
598108c70cfbSmrg    # See if GNU ld supports shared libraries.
598208c70cfbSmrg    case $host_os in
598308c70cfbSmrg    aix[[3-9]]*)
598408c70cfbSmrg      # On AIX/PPC, the GNU linker is very broken
598508c70cfbSmrg      if test "$host_cpu" != ia64; then
5986602e473dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
598708c70cfbSmrg	cat <<_LT_EOF 1>&2
5988602e473dSmrg
598908c70cfbSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
599008c70cfbSmrg*** to be unable to reliably create shared libraries on AIX.
599108c70cfbSmrg*** Therefore, libtool is disabling shared libraries support.  If you
599208c70cfbSmrg*** really care for shared libraries, you may want to install binutils
599308c70cfbSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
599408c70cfbSmrg*** You will then need to restart the configuration process.
5995602e473dSmrg
599608c70cfbSmrg_LT_EOF
599708c70cfbSmrg      fi
599808c70cfbSmrg      ;;
5999602e473dSmrg
600008c70cfbSmrg    amigaos*)
600108c70cfbSmrg      case $host_cpu in
600208c70cfbSmrg      powerpc)
600308c70cfbSmrg            # see comment about AmigaOS4 .so support
600408c70cfbSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
600508c70cfbSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
600608c70cfbSmrg        ;;
600708c70cfbSmrg      m68k)
600808c70cfbSmrg            _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)'
600908c70cfbSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
601008c70cfbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
601108c70cfbSmrg        ;;
601208c70cfbSmrg      esac
601308c70cfbSmrg      ;;
6014602e473dSmrg
601508c70cfbSmrg    beos*)
601608c70cfbSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
601708c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
601808c70cfbSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
601908c70cfbSmrg	# support --undefined.  This deserves some investigation.  FIXME
602008c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
602108c70cfbSmrg      else
602208c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
602308c70cfbSmrg      fi
602408c70cfbSmrg      ;;
6025602e473dSmrg
602608c70cfbSmrg    cygwin* | mingw* | pw32* | cegcc*)
602708c70cfbSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
602808c70cfbSmrg      # as there is no search path for DLLs.
602908c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
603008c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
603108c70cfbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
603208c70cfbSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
603308c70cfbSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
603408c70cfbSmrg      _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'
603508c70cfbSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6036602e473dSmrg
603708c70cfbSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
603808c70cfbSmrg        _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'
603908c70cfbSmrg	# If the export-symbols file already is a .def file (1st line
604008c70cfbSmrg	# is EXPORTS), use it as is; otherwise, prepend...
604108c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
604208c70cfbSmrg	  cp $export_symbols $output_objdir/$soname.def;
604308c70cfbSmrg	else
604408c70cfbSmrg	  echo EXPORTS > $output_objdir/$soname.def;
604508c70cfbSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
604608c70cfbSmrg	fi~
604708c70cfbSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
604808c70cfbSmrg      else
604908c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
605008c70cfbSmrg      fi
605108c70cfbSmrg      ;;
6052602e473dSmrg
605308c70cfbSmrg    haiku*)
605408c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
605508c70cfbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
605608c70cfbSmrg      ;;
6057602e473dSmrg
605808c70cfbSmrg    interix[[3-9]]*)
605908c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
606008c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
606108c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
606208c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
606308c70cfbSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
606408c70cfbSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
606508c70cfbSmrg      # default) and relocated if they conflict, which is a slow very memory
606608c70cfbSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
606708c70cfbSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
606808c70cfbSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
606908c70cfbSmrg      _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'
607008c70cfbSmrg      _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'
607108c70cfbSmrg      ;;
6072602e473dSmrg
607308c70cfbSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
607408c70cfbSmrg      tmp_diet=no
607508c70cfbSmrg      if test "$host_os" = linux-dietlibc; then
607608c70cfbSmrg	case $cc_basename in
607708c70cfbSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
607808c70cfbSmrg	esac
607908c70cfbSmrg      fi
608008c70cfbSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
608108c70cfbSmrg	 && test "$tmp_diet" = no
608208c70cfbSmrg      then
608308c70cfbSmrg	tmp_addflag=' $pic_flag'
608408c70cfbSmrg	tmp_sharedflag='-shared'
608508c70cfbSmrg	case $cc_basename,$host_cpu in
608608c70cfbSmrg        pgcc*)				# Portland Group C compiler
608708c70cfbSmrg	  _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'
608808c70cfbSmrg	  tmp_addflag=' $pic_flag'
608908c70cfbSmrg	  ;;
609008c70cfbSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
609108c70cfbSmrg					# Portland Group f77 and f90 compilers
609208c70cfbSmrg	  _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'
609308c70cfbSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
609408c70cfbSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
609508c70cfbSmrg	  tmp_addflag=' -i_dynamic' ;;
609608c70cfbSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
609708c70cfbSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
609808c70cfbSmrg	ifc* | ifort*)			# Intel Fortran compiler
609908c70cfbSmrg	  tmp_addflag=' -nofor_main' ;;
610008c70cfbSmrg	lf95*)				# Lahey Fortran 8.1
610108c70cfbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
610208c70cfbSmrg	  tmp_sharedflag='--shared' ;;
610308c70cfbSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
610408c70cfbSmrg	  tmp_sharedflag='-qmkshrobj'
610508c70cfbSmrg	  tmp_addflag= ;;
610608c70cfbSmrg	nvcc*)	# Cuda Compiler Driver 2.2
610708c70cfbSmrg	  _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'
610808c70cfbSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
610908c70cfbSmrg	  ;;
611008c70cfbSmrg	esac
611108c70cfbSmrg	case `$CC -V 2>&1 | sed 5q` in
611208c70cfbSmrg	*Sun\ C*)			# Sun C 5.9
611308c70cfbSmrg	  _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'
611408c70cfbSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
611508c70cfbSmrg	  tmp_sharedflag='-G' ;;
611608c70cfbSmrg	*Sun\ F*)			# Sun Fortran 8.3
611708c70cfbSmrg	  tmp_sharedflag='-G' ;;
611808c70cfbSmrg	esac
611908c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6120602e473dSmrg
612108c70cfbSmrg        if test "x$supports_anon_versioning" = xyes; then
612208c70cfbSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
612308c70cfbSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
612408c70cfbSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
612508c70cfbSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
612608c70cfbSmrg        fi
612708c70cfbSmrg
612808c70cfbSmrg	case $cc_basename in
612908c70cfbSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
613008c70cfbSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
613108c70cfbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
613208c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
613308c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
613408c70cfbSmrg	  if test "x$supports_anon_versioning" = xyes; then
613508c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
613608c70cfbSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
613708c70cfbSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
613808c70cfbSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
613908c70cfbSmrg	  fi
614008c70cfbSmrg	  ;;
614108c70cfbSmrg	esac
614208c70cfbSmrg      else
6143602e473dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
614408c70cfbSmrg      fi
614508c70cfbSmrg      ;;
6146602e473dSmrg
614708c70cfbSmrg    netbsd*)
614808c70cfbSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
614908c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
615008c70cfbSmrg	wlarc=
615108c70cfbSmrg      else
615208c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
615308c70cfbSmrg	_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'
615408c70cfbSmrg      fi
615508c70cfbSmrg      ;;
6156602e473dSmrg
615708c70cfbSmrg    solaris*)
615808c70cfbSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
615908c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
616008c70cfbSmrg	cat <<_LT_EOF 1>&2
6161602e473dSmrg
616208c70cfbSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
616308c70cfbSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
616408c70cfbSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
616508c70cfbSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
616608c70cfbSmrg*** your PATH or compiler configuration so that the native linker is
616708c70cfbSmrg*** used, and then restart.
6168602e473dSmrg
616908c70cfbSmrg_LT_EOF
617008c70cfbSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
617108c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
617208c70cfbSmrg	_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'
617308c70cfbSmrg      else
617408c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
617508c70cfbSmrg      fi
617608c70cfbSmrg      ;;
6177602e473dSmrg
617808c70cfbSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
617908c70cfbSmrg      case `$LD -v 2>&1` in
618008c70cfbSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
618108c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
618208c70cfbSmrg	cat <<_LT_EOF 1>&2
6183602e473dSmrg
618408c70cfbSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
618508c70cfbSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
618608c70cfbSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
618708c70cfbSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
618808c70cfbSmrg*** your PATH or compiler configuration so that the native linker is
618908c70cfbSmrg*** used, and then restart.
619008c70cfbSmrg
619108c70cfbSmrg_LT_EOF
619208c70cfbSmrg	;;
619308c70cfbSmrg	*)
619408c70cfbSmrg	  # For security reasons, it is highly recommended that you always
619508c70cfbSmrg	  # use absolute paths for naming shared libraries, and exclude the
619608c70cfbSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
619708c70cfbSmrg	  # requires that you compile everything twice, which is a pain.
619808c70cfbSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
619908c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
620008c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
620108c70cfbSmrg	    _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'
620208c70cfbSmrg	  else
620308c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
620408c70cfbSmrg	  fi
620508c70cfbSmrg	;;
620608c70cfbSmrg      esac
620708c70cfbSmrg      ;;
6208602e473dSmrg
620908c70cfbSmrg    sunos4*)
621008c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
621108c70cfbSmrg      wlarc=
621208c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
621308c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
621408c70cfbSmrg      ;;
6215602e473dSmrg
621608c70cfbSmrg    *)
621708c70cfbSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
621808c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
621908c70cfbSmrg	_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'
622008c70cfbSmrg      else
622108c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
622208c70cfbSmrg      fi
622308c70cfbSmrg      ;;
622408c70cfbSmrg    esac
6225602e473dSmrg
622608c70cfbSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
622708c70cfbSmrg      runpath_var=
622808c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
622908c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
623008c70cfbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
623108c70cfbSmrg    fi
623208c70cfbSmrg  else
623308c70cfbSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
623408c70cfbSmrg    case $host_os in
623508c70cfbSmrg    aix3*)
623608c70cfbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
623708c70cfbSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
623808c70cfbSmrg      _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'
623908c70cfbSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
624008c70cfbSmrg      # are no directories specified by -L.
624108c70cfbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
624208c70cfbSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
624308c70cfbSmrg	# Neither direct hardcoding nor static linking is supported with a
624408c70cfbSmrg	# broken collect2.
624508c70cfbSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
624608c70cfbSmrg      fi
624708c70cfbSmrg      ;;
6248602e473dSmrg
624908c70cfbSmrg    aix[[4-9]]*)
625008c70cfbSmrg      if test "$host_cpu" = ia64; then
625108c70cfbSmrg	# On IA64, the linker does run time linking by default, so we don't
625208c70cfbSmrg	# have to do anything special.
625308c70cfbSmrg	aix_use_runtimelinking=no
625408c70cfbSmrg	exp_sym_flag='-Bexport'
625508c70cfbSmrg	no_entry_flag=""
625608c70cfbSmrg      else
625708c70cfbSmrg	# If we're using GNU nm, then we don't want the "-C" option.
625808c70cfbSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
625908c70cfbSmrg	# Also, AIX nm treats weak defined symbols like other global
626008c70cfbSmrg	# defined symbols, whereas GNU nm marks them as "W".
626108c70cfbSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
626208c70cfbSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
626308c70cfbSmrg	else
626408c70cfbSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
626508c70cfbSmrg	fi
626608c70cfbSmrg	aix_use_runtimelinking=no
6267602e473dSmrg
626808c70cfbSmrg	# Test if we are trying to use run time linking or normal
626908c70cfbSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
627008c70cfbSmrg	# need to do runtime linking.
627108c70cfbSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
627208c70cfbSmrg	  for ld_flag in $LDFLAGS; do
627308c70cfbSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
627408c70cfbSmrg	    aix_use_runtimelinking=yes
627508c70cfbSmrg	    break
627608c70cfbSmrg	  fi
627708c70cfbSmrg	  done
6278602e473dSmrg	  ;;
627908c70cfbSmrg	esac
6280602e473dSmrg
628108c70cfbSmrg	exp_sym_flag='-bexport'
628208c70cfbSmrg	no_entry_flag='-bnoentry'
628308c70cfbSmrg      fi
6284602e473dSmrg
628508c70cfbSmrg      # When large executables or shared objects are built, AIX ld can
628608c70cfbSmrg      # have problems creating the table of contents.  If linking a library
628708c70cfbSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
628808c70cfbSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
628908c70cfbSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
629008c70cfbSmrg
629108c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)=''
629208c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
629308c70cfbSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
629408c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
629508c70cfbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
629608c70cfbSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
629708c70cfbSmrg
629808c70cfbSmrg      if test "$GCC" = yes; then
629908c70cfbSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
630008c70cfbSmrg	# We only want to do this on AIX 4.2 and lower, the check
630108c70cfbSmrg	# below for broken collect2 doesn't work under 4.3+
630208c70cfbSmrg	  collect2name=`${CC} -print-prog-name=collect2`
630308c70cfbSmrg	  if test -f "$collect2name" &&
630408c70cfbSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
630508c70cfbSmrg	  then
630608c70cfbSmrg	  # We have reworked collect2
630708c70cfbSmrg	  :
630808c70cfbSmrg	  else
630908c70cfbSmrg	  # We have old collect2
631008c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
631108c70cfbSmrg	  # It fails to find uninstalled libraries when the uninstalled
631208c70cfbSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
631308c70cfbSmrg	  # to unsupported forces relinking
631408c70cfbSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
631508c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
631608c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
631708c70cfbSmrg	  fi
631808c70cfbSmrg	  ;;
6319602e473dSmrg	esac
632008c70cfbSmrg	shared_flag='-shared'
632108c70cfbSmrg	if test "$aix_use_runtimelinking" = yes; then
632208c70cfbSmrg	  shared_flag="$shared_flag "'${wl}-G'
632308c70cfbSmrg	fi
632408c70cfbSmrg      else
632508c70cfbSmrg	# not using gcc
632608c70cfbSmrg	if test "$host_cpu" = ia64; then
632708c70cfbSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
632808c70cfbSmrg	# chokes on -Wl,-G. The following line is correct:
632908c70cfbSmrg	  shared_flag='-G'
633008c70cfbSmrg	else
633108c70cfbSmrg	  if test "$aix_use_runtimelinking" = yes; then
633208c70cfbSmrg	    shared_flag='${wl}-G'
633308c70cfbSmrg	  else
633408c70cfbSmrg	    shared_flag='${wl}-bM:SRE'
633508c70cfbSmrg	  fi
633608c70cfbSmrg	fi
633708c70cfbSmrg      fi
6338602e473dSmrg
633908c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
634008c70cfbSmrg      # It seems that -bexpall does not export symbols beginning with
634108c70cfbSmrg      # underscore (_), so it is better to generate a list of symbols to export.
634208c70cfbSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
634308c70cfbSmrg      if test "$aix_use_runtimelinking" = yes; then
634408c70cfbSmrg	# Warning - without using the other runtime loading flags (-brtl),
634508c70cfbSmrg	# -berok will link without error, but may produce a broken library.
634608c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
634708c70cfbSmrg        # Determine the default libpath from the value encoded in an
634808c70cfbSmrg        # empty executable.
634908c70cfbSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
635008c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
635108c70cfbSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
635208c70cfbSmrg      else
635308c70cfbSmrg	if test "$host_cpu" = ia64; then
635408c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
635508c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
635608c70cfbSmrg	  _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"
635708c70cfbSmrg	else
635808c70cfbSmrg	 # Determine the default libpath from the value encoded in an
635908c70cfbSmrg	 # empty executable.
636008c70cfbSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
636108c70cfbSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
636208c70cfbSmrg	  # Warning - without using the other run time loading flags,
636308c70cfbSmrg	  # -berok will link without error, but may produce a broken library.
636408c70cfbSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
636508c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
636608c70cfbSmrg	  if test "$with_gnu_ld" = yes; then
636708c70cfbSmrg	    # We only use this code for GNU lds that support --whole-archive.
636808c70cfbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
636908c70cfbSmrg	  else
637008c70cfbSmrg	    # Exported symbols can be pulled into shared objects from archives
637108c70cfbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
637208c70cfbSmrg	  fi
637308c70cfbSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
637408c70cfbSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
637508c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
637608c70cfbSmrg	fi
637708c70cfbSmrg      fi
637808c70cfbSmrg      ;;
6379602e473dSmrg
638008c70cfbSmrg    amigaos*)
638108c70cfbSmrg      case $host_cpu in
638208c70cfbSmrg      powerpc)
638308c70cfbSmrg            # see comment about AmigaOS4 .so support
638408c70cfbSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
638508c70cfbSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
638608c70cfbSmrg        ;;
638708c70cfbSmrg      m68k)
638808c70cfbSmrg            _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)'
638908c70cfbSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
639008c70cfbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6391602e473dSmrg        ;;
639208c70cfbSmrg      esac
639308c70cfbSmrg      ;;
639408c70cfbSmrg
639508c70cfbSmrg    bsdi[[45]]*)
639608c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
639708c70cfbSmrg      ;;
6398602e473dSmrg
639908c70cfbSmrg    cygwin* | mingw* | pw32* | cegcc*)
640008c70cfbSmrg      # When not using gcc, we currently assume that we are using
640108c70cfbSmrg      # Microsoft Visual C++.
640208c70cfbSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
640308c70cfbSmrg      # no search path for DLLs.
640408c70cfbSmrg      case $cc_basename in
640508c70cfbSmrg      cl*)
640608c70cfbSmrg	# Native MSVC
640708c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
640808c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
640908c70cfbSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
641008c70cfbSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
641108c70cfbSmrg	# Tell ltmain to make .lib files, not .a files.
641208c70cfbSmrg	libext=lib
641308c70cfbSmrg	# Tell ltmain to make .dll files, not .so files.
641408c70cfbSmrg	shrext_cmds=".dll"
641508c70cfbSmrg	# FIXME: Setting linknames here is a bad hack.
641608c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
641708c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
641808c70cfbSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
641908c70cfbSmrg	  else
642008c70cfbSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
642108c70cfbSmrg	  fi~
642208c70cfbSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
642308c70cfbSmrg	  linknames='
642408c70cfbSmrg	# The linker will not automatically build a static lib if we build a DLL.
642508c70cfbSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
642608c70cfbSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
642708c70cfbSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
642808c70cfbSmrg	_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'
642908c70cfbSmrg	# Don't use ranlib
643008c70cfbSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
643108c70cfbSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
643208c70cfbSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
643308c70cfbSmrg	  case $lt_outputfile in
643408c70cfbSmrg	    *.exe|*.EXE) ;;
643508c70cfbSmrg	    *)
643608c70cfbSmrg	      lt_outputfile="$lt_outputfile.exe"
643708c70cfbSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
643808c70cfbSmrg	      ;;
643908c70cfbSmrg	  esac~
644008c70cfbSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
644108c70cfbSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
644208c70cfbSmrg	    $RM "$lt_outputfile.manifest";
644308c70cfbSmrg	  fi'
644408c70cfbSmrg	;;
6445602e473dSmrg      *)
644608c70cfbSmrg	# Assume MSVC wrapper
644708c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
644808c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
644908c70cfbSmrg	# Tell ltmain to make .lib files, not .a files.
645008c70cfbSmrg	libext=lib
645108c70cfbSmrg	# Tell ltmain to make .dll files, not .so files.
645208c70cfbSmrg	shrext_cmds=".dll"
645308c70cfbSmrg	# FIXME: Setting linknames here is a bad hack.
645408c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
645508c70cfbSmrg	# The linker will automatically build a .lib file if we build a DLL.
645608c70cfbSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
645708c70cfbSmrg	# FIXME: Should let the user specify the lib program.
645808c70cfbSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
645908c70cfbSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
646008c70cfbSmrg	;;
646108c70cfbSmrg      esac
646208c70cfbSmrg      ;;
6463602e473dSmrg
646408c70cfbSmrg    darwin* | rhapsody*)
646508c70cfbSmrg      _LT_DARWIN_LINKER_FEATURES($1)
646608c70cfbSmrg      ;;
6467602e473dSmrg
646808c70cfbSmrg    dgux*)
646908c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
647008c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
647108c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
647208c70cfbSmrg      ;;
6473602e473dSmrg
647408c70cfbSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
647508c70cfbSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
647608c70cfbSmrg    # does not break anything, and helps significantly (at the cost of a little
647708c70cfbSmrg    # extra space).
647808c70cfbSmrg    freebsd2.2*)
647908c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
648008c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
648108c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
648208c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
648308c70cfbSmrg      ;;
6484602e473dSmrg
648508c70cfbSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
648608c70cfbSmrg    freebsd2.*)
648708c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
648808c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
648908c70cfbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
649008c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
649108c70cfbSmrg      ;;
6492602e473dSmrg
649308c70cfbSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
649408c70cfbSmrg    freebsd* | dragonfly*)
649508c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
649608c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
649708c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
649808c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
649908c70cfbSmrg      ;;
6500602e473dSmrg
650108c70cfbSmrg    hpux9*)
650208c70cfbSmrg      if test "$GCC" = yes; then
650308c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
650408c70cfbSmrg      else
650508c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
650608c70cfbSmrg      fi
650708c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
650808c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
650908c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6510602e473dSmrg
651108c70cfbSmrg      # hardcode_minus_L: Not really in the search PATH,
651208c70cfbSmrg      # but as the default location of the library.
651308c70cfbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
651408c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
651508c70cfbSmrg      ;;
6516602e473dSmrg
651708c70cfbSmrg    hpux10*)
651808c70cfbSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
651908c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
652008c70cfbSmrg      else
652108c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
652208c70cfbSmrg      fi
652308c70cfbSmrg      if test "$with_gnu_ld" = no; then
652408c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
652508c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
652608c70cfbSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
652708c70cfbSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
652808c70cfbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
652908c70cfbSmrg	# hardcode_minus_L: Not really in the search PATH,
653008c70cfbSmrg	# but as the default location of the library.
653108c70cfbSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
653208c70cfbSmrg      fi
653308c70cfbSmrg      ;;
653421298544Smrg
653508c70cfbSmrg    hpux11*)
653608c70cfbSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
653708c70cfbSmrg	case $host_cpu in
653808c70cfbSmrg	hppa*64*)
653908c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
654008c70cfbSmrg	  ;;
654108c70cfbSmrg	ia64*)
654208c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
654308c70cfbSmrg	  ;;
654408c70cfbSmrg	*)
654508c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
654608c70cfbSmrg	  ;;
654708c70cfbSmrg	esac
654808c70cfbSmrg      else
654908c70cfbSmrg	case $host_cpu in
655008c70cfbSmrg	hppa*64*)
655108c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
655208c70cfbSmrg	  ;;
655308c70cfbSmrg	ia64*)
655408c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
655508c70cfbSmrg	  ;;
655608c70cfbSmrg	*)
655708c70cfbSmrg	m4_if($1, [], [
655808c70cfbSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
655908c70cfbSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
656008c70cfbSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
656108c70cfbSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
656208c70cfbSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
656308c70cfbSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
656408c70cfbSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
656508c70cfbSmrg	  ;;
656608c70cfbSmrg	esac
656708c70cfbSmrg      fi
656808c70cfbSmrg      if test "$with_gnu_ld" = no; then
656908c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
657008c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
657108c70cfbSmrg
657208c70cfbSmrg	case $host_cpu in
657308c70cfbSmrg	hppa*64*|ia64*)
657408c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
657508c70cfbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
657608c70cfbSmrg	  ;;
657708c70cfbSmrg	*)
657808c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
657908c70cfbSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
658008c70cfbSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6581602e473dSmrg
658208c70cfbSmrg	  # hardcode_minus_L: Not really in the search PATH,
658308c70cfbSmrg	  # but as the default location of the library.
658408c70cfbSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
658508c70cfbSmrg	  ;;
658608c70cfbSmrg	esac
658708c70cfbSmrg      fi
658808c70cfbSmrg      ;;
658908c70cfbSmrg
659008c70cfbSmrg    irix5* | irix6* | nonstopux*)
659108c70cfbSmrg      if test "$GCC" = yes; then
659208c70cfbSmrg	_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'
659308c70cfbSmrg	# Try to use the -exported_symbol ld option, if it does not
659408c70cfbSmrg	# work, assume that -exports_file does not work either and
659508c70cfbSmrg	# implicitly export all symbols.
659608c70cfbSmrg	# This should be the same for all languages, so no per-tag cache variable.
659708c70cfbSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
659808c70cfbSmrg	  [lt_cv_irix_exported_symbol],
659908c70cfbSmrg	  [save_LDFLAGS="$LDFLAGS"
660008c70cfbSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
660108c70cfbSmrg	   AC_LINK_IFELSE(
660208c70cfbSmrg	     [AC_LANG_SOURCE(
660308c70cfbSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
660408c70cfbSmrg			      [C++], [[int foo (void) { return 0; }]],
660508c70cfbSmrg			      [Fortran 77], [[
6606602e473dSmrg      subroutine foo
660708c70cfbSmrg      end]],
660808c70cfbSmrg			      [Fortran], [[
6609602e473dSmrg      subroutine foo
661008c70cfbSmrg      end]])])],
661108c70cfbSmrg	      [lt_cv_irix_exported_symbol=yes],
661208c70cfbSmrg	      [lt_cv_irix_exported_symbol=no])
661308c70cfbSmrg           LDFLAGS="$save_LDFLAGS"])
661408c70cfbSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
661508c70cfbSmrg          _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'
661608c70cfbSmrg	fi
661708c70cfbSmrg      else
661808c70cfbSmrg	_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'
661908c70cfbSmrg	_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'
662008c70cfbSmrg      fi
662108c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
662208c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
662308c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
662408c70cfbSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
662508c70cfbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
662608c70cfbSmrg      ;;
662721298544Smrg
662808c70cfbSmrg    netbsd*)
662908c70cfbSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
663008c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
663108c70cfbSmrg      else
663208c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
663308c70cfbSmrg      fi
663408c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
663508c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
663608c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
663708c70cfbSmrg      ;;
663821298544Smrg
663908c70cfbSmrg    newsos6)
664008c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
664108c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
664208c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
664308c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
664408c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
664508c70cfbSmrg      ;;
6646602e473dSmrg
664708c70cfbSmrg    *nto* | *qnx*)
664808c70cfbSmrg      ;;
6649602e473dSmrg
665008c70cfbSmrg    openbsd*)
665108c70cfbSmrg      if test -f /usr/libexec/ld.so; then
665208c70cfbSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
665308c70cfbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
665408c70cfbSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
665508c70cfbSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
665608c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
665708c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
665808c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
665908c70cfbSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
666008c70cfbSmrg	else
666108c70cfbSmrg	  case $host_os in
666208c70cfbSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
666308c70cfbSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
666408c70cfbSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
666508c70cfbSmrg	     ;;
666608c70cfbSmrg	   *)
666708c70cfbSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
666808c70cfbSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
666908c70cfbSmrg	     ;;
667008c70cfbSmrg	  esac
667108c70cfbSmrg	fi
667208c70cfbSmrg      else
667308c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
667408c70cfbSmrg      fi
667508c70cfbSmrg      ;;
6676602e473dSmrg
667708c70cfbSmrg    os2*)
667808c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
667908c70cfbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
668008c70cfbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
668108c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
668208c70cfbSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
668308c70cfbSmrg      ;;
6684602e473dSmrg
668508c70cfbSmrg    osf3*)
668608c70cfbSmrg      if test "$GCC" = yes; then
668708c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
668808c70cfbSmrg	_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'
668908c70cfbSmrg      else
669008c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
669108c70cfbSmrg	_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'
669208c70cfbSmrg      fi
669308c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
669408c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
669508c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
669608c70cfbSmrg      ;;
669708c70cfbSmrg
669808c70cfbSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
669908c70cfbSmrg      if test "$GCC" = yes; then
670008c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
670108c70cfbSmrg	_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'
670208c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
670308c70cfbSmrg      else
670408c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
670508c70cfbSmrg	_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'
670608c70cfbSmrg	_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~
670708c70cfbSmrg	$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'
670808c70cfbSmrg
670908c70cfbSmrg	# Both c and cxx compiler support -rpath directly
671008c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
671108c70cfbSmrg      fi
671208c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
671308c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
671408c70cfbSmrg      ;;
671508c70cfbSmrg
671608c70cfbSmrg    solaris*)
671708c70cfbSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
671808c70cfbSmrg      if test "$GCC" = yes; then
671908c70cfbSmrg	wlarc='${wl}'
672008c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
672108c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
672208c70cfbSmrg	  $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'
672308c70cfbSmrg      else
672408c70cfbSmrg	case `$CC -V 2>&1` in
672508c70cfbSmrg	*"Compilers 5.0"*)
672608c70cfbSmrg	  wlarc=''
672708c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
672808c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
672908c70cfbSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
673008c70cfbSmrg	  ;;
673108c70cfbSmrg	*)
673208c70cfbSmrg	  wlarc='${wl}'
673308c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
673408c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
673508c70cfbSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
673608c70cfbSmrg	  ;;
673708c70cfbSmrg	esac
673808c70cfbSmrg      fi
673908c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
674008c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
674108c70cfbSmrg      case $host_os in
674208c70cfbSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
674308c70cfbSmrg      *)
674408c70cfbSmrg	# The compiler driver will combine and reorder linker options,
674508c70cfbSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
674608c70cfbSmrg	# but is careful enough not to reorder.
674708c70cfbSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
674808c70cfbSmrg	if test "$GCC" = yes; then
674908c70cfbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
675008c70cfbSmrg	else
675108c70cfbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
675208c70cfbSmrg	fi
675308c70cfbSmrg	;;
675408c70cfbSmrg      esac
675508c70cfbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
675608c70cfbSmrg      ;;
6757602e473dSmrg
675808c70cfbSmrg    sunos4*)
675908c70cfbSmrg      if test "x$host_vendor" = xsequent; then
676008c70cfbSmrg	# Use $CC to link under sequent, because it throws in some extra .o
676108c70cfbSmrg	# files that make .init and .fini sections work.
676208c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
676308c70cfbSmrg      else
676408c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
676508c70cfbSmrg      fi
676608c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
676708c70cfbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
676808c70cfbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
676908c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
677008c70cfbSmrg      ;;
6771602e473dSmrg
677208c70cfbSmrg    sysv4)
677308c70cfbSmrg      case $host_vendor in
677408c70cfbSmrg	sni)
677508c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
677608c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
677708c70cfbSmrg	;;
677808c70cfbSmrg	siemens)
677908c70cfbSmrg	  ## LD is ld it makes a PLAMLIB
678008c70cfbSmrg	  ## CC just makes a GrossModule.
678108c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
678208c70cfbSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
678308c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
678408c70cfbSmrg        ;;
678508c70cfbSmrg	motorola)
678608c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
678708c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
678808c70cfbSmrg	;;
678908c70cfbSmrg      esac
679008c70cfbSmrg      runpath_var='LD_RUN_PATH'
679108c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
679208c70cfbSmrg      ;;
6793602e473dSmrg
679408c70cfbSmrg    sysv4.3*)
679508c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
679608c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
679708c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
679808c70cfbSmrg      ;;
6799602e473dSmrg
680008c70cfbSmrg    sysv4*MP*)
680108c70cfbSmrg      if test -d /usr/nec; then
680208c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
680308c70cfbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
680408c70cfbSmrg	runpath_var=LD_RUN_PATH
680508c70cfbSmrg	hardcode_runpath_var=yes
680608c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
680708c70cfbSmrg      fi
680808c70cfbSmrg      ;;
6809602e473dSmrg
681008c70cfbSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
681108c70cfbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
681208c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
681308c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
681408c70cfbSmrg      runpath_var='LD_RUN_PATH'
6815602e473dSmrg
681608c70cfbSmrg      if test "$GCC" = yes; then
681708c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
681808c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
681908c70cfbSmrg      else
682008c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
682108c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
682208c70cfbSmrg      fi
682308c70cfbSmrg      ;;
6824602e473dSmrg
682508c70cfbSmrg    sysv5* | sco3.2v5* | sco5v6*)
682608c70cfbSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
682708c70cfbSmrg      # link with -lc, and that would cause any symbols used from libc to
682808c70cfbSmrg      # always be unresolved, which means just about no library would
682908c70cfbSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
683008c70cfbSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
683108c70cfbSmrg      # as -z defs.
683208c70cfbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
683308c70cfbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
683408c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
683508c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
683608c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
683708c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
683808c70cfbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
683908c70cfbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
684008c70cfbSmrg      runpath_var='LD_RUN_PATH'
6841602e473dSmrg
684208c70cfbSmrg      if test "$GCC" = yes; then
684308c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
684408c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
684508c70cfbSmrg      else
684608c70cfbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
684708c70cfbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
684808c70cfbSmrg      fi
684908c70cfbSmrg      ;;
6850602e473dSmrg
685108c70cfbSmrg    uts4*)
685208c70cfbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
685308c70cfbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
685408c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
685508c70cfbSmrg      ;;
685608c70cfbSmrg
685708c70cfbSmrg    *)
685808c70cfbSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
6859602e473dSmrg      ;;
6860602e473dSmrg    esac
6861602e473dSmrg
686208c70cfbSmrg    if test x$host_vendor = xsni; then
686308c70cfbSmrg      case $host in
686408c70cfbSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
686508c70cfbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
686608c70cfbSmrg	;;
686708c70cfbSmrg      esac
6868602e473dSmrg    fi
686908c70cfbSmrg  fi
687008c70cfbSmrg])
687108c70cfbSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
687208c70cfbSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6873602e473dSmrg
687408c70cfbSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
687508c70cfbSmrg
687608c70cfbSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
687708c70cfbSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
687808c70cfbSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
687908c70cfbSmrg    [The commands to extract the exported symbol list from a shared archive])
688008c70cfbSmrg
688108c70cfbSmrg#
688208c70cfbSmrg# Do we need to explicitly link libc?
688308c70cfbSmrg#
688408c70cfbSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
688508c70cfbSmrgx|xyes)
688608c70cfbSmrg  # Assume -lc should be added
688708c70cfbSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
688808c70cfbSmrg
688908c70cfbSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
689008c70cfbSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
689108c70cfbSmrg    *'~'*)
689208c70cfbSmrg      # FIXME: we may have to deal with multi-command sequences.
6893602e473dSmrg      ;;
689408c70cfbSmrg    '$CC '*)
689508c70cfbSmrg      # Test whether the compiler implicitly links with -lc since on some
689608c70cfbSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
689708c70cfbSmrg      # to ld, don't add -lc before -lgcc.
689808c70cfbSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
689908c70cfbSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
690008c70cfbSmrg	[$RM conftest*
690108c70cfbSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6902602e473dSmrg
690308c70cfbSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
690408c70cfbSmrg	  soname=conftest
690508c70cfbSmrg	  lib=conftest
690608c70cfbSmrg	  libobjs=conftest.$ac_objext
690708c70cfbSmrg	  deplibs=
690808c70cfbSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
690908c70cfbSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
691008c70cfbSmrg	  compiler_flags=-v
691108c70cfbSmrg	  linker_flags=-v
691208c70cfbSmrg	  verstring=
691308c70cfbSmrg	  output_objdir=.
691408c70cfbSmrg	  libname=conftest
691508c70cfbSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
691608c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
691708c70cfbSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
691808c70cfbSmrg	  then
691908c70cfbSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
692008c70cfbSmrg	  else
692108c70cfbSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
692208c70cfbSmrg	  fi
692308c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
692408c70cfbSmrg	else
692508c70cfbSmrg	  cat conftest.err 1>&5
692608c70cfbSmrg	fi
692708c70cfbSmrg	$RM conftest*
692808c70cfbSmrg	])
692908c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
693008c70cfbSmrg      ;;
693108c70cfbSmrg    esac
693208c70cfbSmrg  fi
6933602e473dSmrg  ;;
6934602e473dSmrgesac
6935602e473dSmrg
693608c70cfbSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
693708c70cfbSmrg    [Whether or not to add -lc for building shared libraries])
693808c70cfbSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
693908c70cfbSmrg    [enable_shared_with_static_runtimes], [0],
694008c70cfbSmrg    [Whether or not to disallow shared libs when runtime libs are static])
694108c70cfbSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
694208c70cfbSmrg    [Compiler flag to allow reflexive dlopens])
694308c70cfbSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
694408c70cfbSmrg    [Compiler flag to generate shared objects directly from archives])
694508c70cfbSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
694608c70cfbSmrg    [Whether the compiler copes with passing no objects directly])
694708c70cfbSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
694808c70cfbSmrg    [Create an old-style archive from a shared archive])
694908c70cfbSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
695008c70cfbSmrg    [Create a temporary old-style archive to link instead of a shared archive])
695108c70cfbSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
695208c70cfbSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
695308c70cfbSmrg_LT_TAGDECL([], [module_cmds], [2],
695408c70cfbSmrg    [Commands used to build a loadable module if different from building
695508c70cfbSmrg    a shared archive.])
695608c70cfbSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
695708c70cfbSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
695808c70cfbSmrg    [Whether we are building with GNU ld or not])
695908c70cfbSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
696008c70cfbSmrg    [Flag that allows shared libraries with undefined symbols to be built])
696108c70cfbSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
696208c70cfbSmrg    [Flag that enforces no undefined symbols])
696308c70cfbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
696408c70cfbSmrg    [Flag to hardcode $libdir into a binary during linking.
696508c70cfbSmrg    This must work even if $libdir does not exist])
696608c70cfbSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
696708c70cfbSmrg    [Whether we need a single "-rpath" flag with a separated argument])
696808c70cfbSmrg_LT_TAGDECL([], [hardcode_direct], [0],
696908c70cfbSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
697008c70cfbSmrg    DIR into the resulting binary])
697108c70cfbSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
697208c70cfbSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
697308c70cfbSmrg    DIR into the resulting binary and the resulting library dependency is
697408c70cfbSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
697508c70cfbSmrg    library is relocated])
697608c70cfbSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
697708c70cfbSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
697808c70cfbSmrg    into the resulting binary])
697908c70cfbSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
698008c70cfbSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
698108c70cfbSmrg    into the resulting binary])
698208c70cfbSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
698308c70cfbSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
698408c70cfbSmrg    into the library and all subsequent libraries and executables linked
698508c70cfbSmrg    against it])
698608c70cfbSmrg_LT_TAGDECL([], [inherit_rpath], [0],
698708c70cfbSmrg    [Set to yes if linker adds runtime paths of dependent libraries
698808c70cfbSmrg    to runtime path list])
698908c70cfbSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
699008c70cfbSmrg    [Whether libtool must link a program against all its dependency libraries])
699108c70cfbSmrg_LT_TAGDECL([], [always_export_symbols], [0],
699208c70cfbSmrg    [Set to "yes" if exported symbols are required])
699308c70cfbSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
699408c70cfbSmrg    [The commands to list exported symbols])
699508c70cfbSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
699608c70cfbSmrg    [Symbols that should not be listed in the preloaded symbols])
699708c70cfbSmrg_LT_TAGDECL([], [include_expsyms], [1],
699808c70cfbSmrg    [Symbols that must always be exported])
699908c70cfbSmrg_LT_TAGDECL([], [prelink_cmds], [2],
700008c70cfbSmrg    [Commands necessary for linking programs (against libraries) with templates])
700108c70cfbSmrg_LT_TAGDECL([], [postlink_cmds], [2],
700208c70cfbSmrg    [Commands necessary for finishing linking programs])
700308c70cfbSmrg_LT_TAGDECL([], [file_list_spec], [1],
700408c70cfbSmrg    [Specify filename containing input files])
700508c70cfbSmrgdnl FIXME: Not yet implemented
700608c70cfbSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
700708c70cfbSmrgdnl    [Compiler flag to generate thread safe objects])
700808c70cfbSmrg])# _LT_LINKER_SHLIBS
7009602e473dSmrg
7010602e473dSmrg
701108c70cfbSmrg# _LT_LANG_C_CONFIG([TAG])
701208c70cfbSmrg# ------------------------
701308c70cfbSmrg# Ensure that the configuration variables for a C compiler are suitably
701408c70cfbSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
701508c70cfbSmrg# the compiler configuration to `libtool'.
701608c70cfbSmrgm4_defun([_LT_LANG_C_CONFIG],
701708c70cfbSmrg[m4_require([_LT_DECL_EGREP])dnl
701808c70cfbSmrglt_save_CC="$CC"
701908c70cfbSmrgAC_LANG_PUSH(C)
7020602e473dSmrg
702108c70cfbSmrg# Source file extension for C test sources.
702208c70cfbSmrgac_ext=c
7023602e473dSmrg
702408c70cfbSmrg# Object file extension for compiled C test sources.
7025602e473dSmrgobjext=o
7026602e473dSmrg_LT_TAGVAR(objext, $1)=$objext
7027602e473dSmrg
702808c70cfbSmrg# Code to be used in simple compile tests
702908c70cfbSmrglt_simple_compile_test_code="int some_variable = 0;"
7030602e473dSmrg
703108c70cfbSmrg# Code to be used in simple link tests
703208c70cfbSmrglt_simple_link_test_code='int main(){return(0);}'
7033602e473dSmrg
703408c70cfbSmrg_LT_TAG_COMPILER
703508c70cfbSmrg# Save the default compiler, since it gets overwritten when the other
703608c70cfbSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
703708c70cfbSmrgcompiler_DEFAULT=$CC
7038602e473dSmrg
703908c70cfbSmrg# save warnings/boilerplate of simple test code
704008c70cfbSmrg_LT_COMPILER_BOILERPLATE
704108c70cfbSmrg_LT_LINKER_BOILERPLATE
7042602e473dSmrg
704308c70cfbSmrgif test -n "$compiler"; then
704408c70cfbSmrg  _LT_COMPILER_NO_RTTI($1)
704508c70cfbSmrg  _LT_COMPILER_PIC($1)
704608c70cfbSmrg  _LT_COMPILER_C_O($1)
704708c70cfbSmrg  _LT_COMPILER_FILE_LOCKS($1)
704808c70cfbSmrg  _LT_LINKER_SHLIBS($1)
704908c70cfbSmrg  _LT_SYS_DYNAMIC_LINKER($1)
705008c70cfbSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
705108c70cfbSmrg  LT_SYS_DLOPEN_SELF
705208c70cfbSmrg  _LT_CMD_STRIPLIB
7053602e473dSmrg
705408c70cfbSmrg  # Report which library types will actually be built
705508c70cfbSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
705608c70cfbSmrg  AC_MSG_RESULT([$can_build_shared])
7057602e473dSmrg
705808c70cfbSmrg  AC_MSG_CHECKING([whether to build shared libraries])
705908c70cfbSmrg  test "$can_build_shared" = "no" && enable_shared=no
7060602e473dSmrg
706108c70cfbSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
706208c70cfbSmrg  # are all built from PIC.
706308c70cfbSmrg  case $host_os in
706408c70cfbSmrg  aix3*)
706508c70cfbSmrg    test "$enable_shared" = yes && enable_static=no
706608c70cfbSmrg    if test -n "$RANLIB"; then
706708c70cfbSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
706808c70cfbSmrg      postinstall_cmds='$RANLIB $lib'
706908c70cfbSmrg    fi
707008c70cfbSmrg    ;;
7071602e473dSmrg
707208c70cfbSmrg  aix[[4-9]]*)
707308c70cfbSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
707408c70cfbSmrg      test "$enable_shared" = yes && enable_static=no
707508c70cfbSmrg    fi
707608c70cfbSmrg    ;;
707708c70cfbSmrg  esac
707808c70cfbSmrg  AC_MSG_RESULT([$enable_shared])
7079602e473dSmrg
708008c70cfbSmrg  AC_MSG_CHECKING([whether to build static libraries])
708108c70cfbSmrg  # Make sure either enable_shared or enable_static is yes.
708208c70cfbSmrg  test "$enable_shared" = yes || enable_static=yes
708308c70cfbSmrg  AC_MSG_RESULT([$enable_static])
7084602e473dSmrg
708508c70cfbSmrg  _LT_CONFIG($1)
708608c70cfbSmrgfi
7087602e473dSmrgAC_LANG_POP
708808c70cfbSmrgCC="$lt_save_CC"
708908c70cfbSmrg])# _LT_LANG_C_CONFIG
7090602e473dSmrg
709121298544Smrg
709208c70cfbSmrg# _LT_LANG_CXX_CONFIG([TAG])
709308c70cfbSmrg# --------------------------
709408c70cfbSmrg# Ensure that the configuration variables for a C++ compiler are suitably
709508c70cfbSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
709608c70cfbSmrg# the compiler configuration to `libtool'.
709708c70cfbSmrgm4_defun([_LT_LANG_CXX_CONFIG],
709808c70cfbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
709908c70cfbSmrgm4_require([_LT_DECL_EGREP])dnl
710008c70cfbSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
710108c70cfbSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
710208c70cfbSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
710308c70cfbSmrg    (test "X$CXX" != "Xg++"))) ; then
710408c70cfbSmrg  AC_PROG_CXXCPP
710508c70cfbSmrgelse
710608c70cfbSmrg  _lt_caught_CXX_error=yes
710721298544Smrgfi
7108602e473dSmrg
710908c70cfbSmrgAC_LANG_PUSH(C++)
7110602e473dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7111602e473dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
7112602e473dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
7113602e473dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
711408c70cfbSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
7115602e473dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7116602e473dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
7117602e473dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7118602e473dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7119602e473dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7120602e473dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
712108c70cfbSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7122602e473dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
7123602e473dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
7124602e473dSmrg_LT_TAGVAR(module_cmds, $1)=
7125602e473dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
7126602e473dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7127602e473dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
712821298544Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
712921298544Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7130602e473dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
7131602e473dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7132602e473dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7133602e473dSmrg
713408c70cfbSmrg# Source file extension for C++ test sources.
713508c70cfbSmrgac_ext=cpp
7136602e473dSmrg
713708c70cfbSmrg# Object file extension for compiled C++ test sources.
7138602e473dSmrgobjext=o
7139602e473dSmrg_LT_TAGVAR(objext, $1)=$objext
7140602e473dSmrg
7141602e473dSmrg# No sense in running all these tests if we already determined that
714208c70cfbSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
7143602e473dSmrg# are currently assumed to apply to all compilers on this platform,
7144602e473dSmrg# and will be corrupted by setting them based on a non-working compiler.
714508c70cfbSmrgif test "$_lt_caught_CXX_error" != yes; then
7146602e473dSmrg  # Code to be used in simple compile tests
714708c70cfbSmrg  lt_simple_compile_test_code="int some_variable = 0;"
7148602e473dSmrg
7149602e473dSmrg  # Code to be used in simple link tests
715008c70cfbSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7151602e473dSmrg
7152602e473dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7153602e473dSmrg  _LT_TAG_COMPILER
7154602e473dSmrg
7155602e473dSmrg  # save warnings/boilerplate of simple test code
7156602e473dSmrg  _LT_COMPILER_BOILERPLATE
7157602e473dSmrg  _LT_LINKER_BOILERPLATE
7158602e473dSmrg
7159602e473dSmrg  # Allow CC to be a program name with arguments.
716008c70cfbSmrg  lt_save_CC=$CC
716121298544Smrg  lt_save_CFLAGS=$CFLAGS
716208c70cfbSmrg  lt_save_LD=$LD
716308c70cfbSmrg  lt_save_GCC=$GCC
716408c70cfbSmrg  GCC=$GXX
716508c70cfbSmrg  lt_save_with_gnu_ld=$with_gnu_ld
716608c70cfbSmrg  lt_save_path_LD=$lt_cv_path_LD
716708c70cfbSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
716808c70cfbSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
716908c70cfbSmrg  else
717008c70cfbSmrg    $as_unset lt_cv_prog_gnu_ld
717108c70cfbSmrg  fi
717208c70cfbSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
717308c70cfbSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
717408c70cfbSmrg  else
717508c70cfbSmrg    $as_unset lt_cv_path_LD
717608c70cfbSmrg  fi
717708c70cfbSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
717808c70cfbSmrg  CC=${CXX-"c++"}
717908c70cfbSmrg  CFLAGS=$CXXFLAGS
7180602e473dSmrg  compiler=$CC
7181602e473dSmrg  _LT_TAGVAR(compiler, $1)=$CC
7182602e473dSmrg  _LT_CC_BASENAME([$compiler])
7183602e473dSmrg
7184602e473dSmrg  if test -n "$compiler"; then
718508c70cfbSmrg    # We don't want -fno-exception when compiling C++ code, so set the
718608c70cfbSmrg    # no_builtin_flag separately
718708c70cfbSmrg    if test "$GXX" = yes; then
718808c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
718908c70cfbSmrg    else
719008c70cfbSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
719108c70cfbSmrg    fi
7192602e473dSmrg
719308c70cfbSmrg    if test "$GXX" = yes; then
719408c70cfbSmrg      # Set up default GNU C++ configuration
7195602e473dSmrg
719608c70cfbSmrg      LT_PATH_LD
7197602e473dSmrg
719808c70cfbSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
719908c70cfbSmrg      # archiving commands below assume that GNU ld is being used.
720008c70cfbSmrg      if test "$with_gnu_ld" = yes; then
720108c70cfbSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
720208c70cfbSmrg        _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'
7203602e473dSmrg
720408c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
720508c70cfbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7206602e473dSmrg
720708c70cfbSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
720808c70cfbSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
720908c70cfbSmrg        #     investigate it a little bit more. (MM)
721008c70cfbSmrg        wlarc='${wl}'
7211602e473dSmrg
721208c70cfbSmrg        # ancient GNU ld didn't support --whole-archive et. al.
721308c70cfbSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
721408c70cfbSmrg	  $GREP 'no-whole-archive' > /dev/null; then
721508c70cfbSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
721608c70cfbSmrg        else
721708c70cfbSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
721808c70cfbSmrg        fi
721908c70cfbSmrg      else
722008c70cfbSmrg        with_gnu_ld=no
722108c70cfbSmrg        wlarc=
7222602e473dSmrg
722308c70cfbSmrg        # A generic and very simple default shared library creation
722408c70cfbSmrg        # command for GNU C++ for the case where it uses the native
722508c70cfbSmrg        # linker, instead of GNU ld.  If possible, this setting should
722608c70cfbSmrg        # overridden to take advantage of the native linker features on
722708c70cfbSmrg        # the platform it is being used on.
722808c70cfbSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
722908c70cfbSmrg      fi
7230602e473dSmrg
723108c70cfbSmrg      # Commands to make compiler produce verbose output that lists
723208c70cfbSmrg      # what "hidden" libraries, object files and flags are used when
723308c70cfbSmrg      # linking a shared library.
723408c70cfbSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7235602e473dSmrg
723608c70cfbSmrg    else
723708c70cfbSmrg      GXX=no
723808c70cfbSmrg      with_gnu_ld=no
723908c70cfbSmrg      wlarc=
724008c70cfbSmrg    fi
7241602e473dSmrg
724208c70cfbSmrg    # PORTME: fill in a description of your system's C++ link characteristics
724308c70cfbSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
724408c70cfbSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
724508c70cfbSmrg    case $host_os in
724608c70cfbSmrg      aix3*)
724708c70cfbSmrg        # FIXME: insert proper C++ library support
724808c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
724908c70cfbSmrg        ;;
725008c70cfbSmrg      aix[[4-9]]*)
725108c70cfbSmrg        if test "$host_cpu" = ia64; then
725208c70cfbSmrg          # On IA64, the linker does run time linking by default, so we don't
725308c70cfbSmrg          # have to do anything special.
725408c70cfbSmrg          aix_use_runtimelinking=no
725508c70cfbSmrg          exp_sym_flag='-Bexport'
725608c70cfbSmrg          no_entry_flag=""
725708c70cfbSmrg        else
725808c70cfbSmrg          aix_use_runtimelinking=no
7259602e473dSmrg
726008c70cfbSmrg          # Test if we are trying to use run time linking or normal
726108c70cfbSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
726208c70cfbSmrg          # need to do runtime linking.
726308c70cfbSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
726408c70cfbSmrg	    for ld_flag in $LDFLAGS; do
726508c70cfbSmrg	      case $ld_flag in
726608c70cfbSmrg	      *-brtl*)
726708c70cfbSmrg	        aix_use_runtimelinking=yes
726808c70cfbSmrg	        break
726908c70cfbSmrg	        ;;
727008c70cfbSmrg	      esac
727108c70cfbSmrg	    done
727208c70cfbSmrg	    ;;
727308c70cfbSmrg          esac
7274602e473dSmrg
727508c70cfbSmrg          exp_sym_flag='-bexport'
727608c70cfbSmrg          no_entry_flag='-bnoentry'
727708c70cfbSmrg        fi
7278602e473dSmrg
727908c70cfbSmrg        # When large executables or shared objects are built, AIX ld can
728008c70cfbSmrg        # have problems creating the table of contents.  If linking a library
728108c70cfbSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
728208c70cfbSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
728308c70cfbSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7284602e473dSmrg
728508c70cfbSmrg        _LT_TAGVAR(archive_cmds, $1)=''
728608c70cfbSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
728708c70cfbSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
728808c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
728908c70cfbSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
729008c70cfbSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7291602e473dSmrg
729208c70cfbSmrg        if test "$GXX" = yes; then
729308c70cfbSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
729408c70cfbSmrg          # We only want to do this on AIX 4.2 and lower, the check
729508c70cfbSmrg          # below for broken collect2 doesn't work under 4.3+
729608c70cfbSmrg	  collect2name=`${CC} -print-prog-name=collect2`
729708c70cfbSmrg	  if test -f "$collect2name" &&
729808c70cfbSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
729908c70cfbSmrg	  then
730008c70cfbSmrg	    # We have reworked collect2
730108c70cfbSmrg	    :
730208c70cfbSmrg	  else
730308c70cfbSmrg	    # We have old collect2
730408c70cfbSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
730508c70cfbSmrg	    # It fails to find uninstalled libraries when the uninstalled
730608c70cfbSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
730708c70cfbSmrg	    # to unsupported forces relinking
730808c70cfbSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
730908c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
731008c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
731108c70cfbSmrg	  fi
731208c70cfbSmrg          esac
731308c70cfbSmrg          shared_flag='-shared'
731408c70cfbSmrg	  if test "$aix_use_runtimelinking" = yes; then
731508c70cfbSmrg	    shared_flag="$shared_flag "'${wl}-G'
731608c70cfbSmrg	  fi
731708c70cfbSmrg        else
731808c70cfbSmrg          # not using gcc
731908c70cfbSmrg          if test "$host_cpu" = ia64; then
732008c70cfbSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
732108c70cfbSmrg	  # chokes on -Wl,-G. The following line is correct:
732208c70cfbSmrg	  shared_flag='-G'
732308c70cfbSmrg          else
732408c70cfbSmrg	    if test "$aix_use_runtimelinking" = yes; then
732508c70cfbSmrg	      shared_flag='${wl}-G'
732608c70cfbSmrg	    else
732708c70cfbSmrg	      shared_flag='${wl}-bM:SRE'
732808c70cfbSmrg	    fi
732908c70cfbSmrg          fi
733008c70cfbSmrg        fi
7331602e473dSmrg
733208c70cfbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
733308c70cfbSmrg        # It seems that -bexpall does not export symbols beginning with
733408c70cfbSmrg        # underscore (_), so it is better to generate a list of symbols to
733508c70cfbSmrg	# export.
733608c70cfbSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
733708c70cfbSmrg        if test "$aix_use_runtimelinking" = yes; then
733808c70cfbSmrg          # Warning - without using the other runtime loading flags (-brtl),
733908c70cfbSmrg          # -berok will link without error, but may produce a broken library.
734008c70cfbSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
734108c70cfbSmrg          # Determine the default libpath from the value encoded in an empty
734208c70cfbSmrg          # executable.
734308c70cfbSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
734408c70cfbSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7345602e473dSmrg
734608c70cfbSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
734708c70cfbSmrg        else
734808c70cfbSmrg          if test "$host_cpu" = ia64; then
734908c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
735008c70cfbSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
735108c70cfbSmrg	    _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"
735208c70cfbSmrg          else
735308c70cfbSmrg	    # Determine the default libpath from the value encoded in an
735408c70cfbSmrg	    # empty executable.
735508c70cfbSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
735608c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
735708c70cfbSmrg	    # Warning - without using the other run time loading flags,
735808c70cfbSmrg	    # -berok will link without error, but may produce a broken library.
735908c70cfbSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
736008c70cfbSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
736108c70cfbSmrg	    if test "$with_gnu_ld" = yes; then
736208c70cfbSmrg	      # We only use this code for GNU lds that support --whole-archive.
736308c70cfbSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
736408c70cfbSmrg	    else
736508c70cfbSmrg	      # Exported symbols can be pulled into shared objects from archives
736608c70cfbSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
736708c70cfbSmrg	    fi
736808c70cfbSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
736908c70cfbSmrg	    # This is similar to how AIX traditionally builds its shared
737008c70cfbSmrg	    # libraries.
737108c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
737208c70cfbSmrg          fi
737308c70cfbSmrg        fi
737408c70cfbSmrg        ;;
7375602e473dSmrg
737608c70cfbSmrg      beos*)
737708c70cfbSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
737808c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
737908c70cfbSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
738008c70cfbSmrg	  # support --undefined.  This deserves some investigation.  FIXME
738108c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
738208c70cfbSmrg	else
738308c70cfbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
738408c70cfbSmrg	fi
738508c70cfbSmrg	;;
738608c70cfbSmrg
738708c70cfbSmrg      chorus*)
738808c70cfbSmrg        case $cc_basename in
738908c70cfbSmrg          *)
739008c70cfbSmrg	  # FIXME: insert proper C++ library support
739108c70cfbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
739208c70cfbSmrg	  ;;
739308c70cfbSmrg        esac
739408c70cfbSmrg        ;;
7395602e473dSmrg
739608c70cfbSmrg      cygwin* | mingw* | pw32* | cegcc*)
739708c70cfbSmrg	case $GXX,$cc_basename in
739808c70cfbSmrg	,cl* | no,cl*)
739908c70cfbSmrg	  # Native MSVC
740008c70cfbSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
740108c70cfbSmrg	  # no search path for DLLs.
740208c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
740308c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
740408c70cfbSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
740508c70cfbSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
740608c70cfbSmrg	  # Tell ltmain to make .lib files, not .a files.
740708c70cfbSmrg	  libext=lib
740808c70cfbSmrg	  # Tell ltmain to make .dll files, not .so files.
740908c70cfbSmrg	  shrext_cmds=".dll"
741008c70cfbSmrg	  # FIXME: Setting linknames here is a bad hack.
741108c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
741208c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
741308c70cfbSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
741408c70cfbSmrg	    else
741508c70cfbSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
741608c70cfbSmrg	    fi~
741708c70cfbSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
741808c70cfbSmrg	    linknames='
741908c70cfbSmrg	  # The linker will not automatically build a static lib if we build a DLL.
742008c70cfbSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
742108c70cfbSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
742208c70cfbSmrg	  # Don't use ranlib
742308c70cfbSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
742408c70cfbSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
742508c70cfbSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
742608c70cfbSmrg	    case $lt_outputfile in
742708c70cfbSmrg	      *.exe|*.EXE) ;;
742808c70cfbSmrg	      *)
742908c70cfbSmrg		lt_outputfile="$lt_outputfile.exe"
743008c70cfbSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
743108c70cfbSmrg		;;
743208c70cfbSmrg	    esac~
743308c70cfbSmrg	    func_to_tool_file "$lt_outputfile"~
743408c70cfbSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
743508c70cfbSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
743608c70cfbSmrg	      $RM "$lt_outputfile.manifest";
743708c70cfbSmrg	    fi'
743808c70cfbSmrg	  ;;
743908c70cfbSmrg	*)
744008c70cfbSmrg	  # g++
744108c70cfbSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
744208c70cfbSmrg	  # as there is no search path for DLLs.
744308c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
744408c70cfbSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
744508c70cfbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
744608c70cfbSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
744708c70cfbSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7448602e473dSmrg
744908c70cfbSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
745008c70cfbSmrg	    _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'
745108c70cfbSmrg	    # If the export-symbols file already is a .def file (1st line
745208c70cfbSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
745308c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
745408c70cfbSmrg	      cp $export_symbols $output_objdir/$soname.def;
745508c70cfbSmrg	    else
745608c70cfbSmrg	      echo EXPORTS > $output_objdir/$soname.def;
745708c70cfbSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
745808c70cfbSmrg	    fi~
745908c70cfbSmrg	    $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'
746008c70cfbSmrg	  else
746108c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
746208c70cfbSmrg	  fi
746308c70cfbSmrg	  ;;
746408c70cfbSmrg	esac
746508c70cfbSmrg	;;
746608c70cfbSmrg      darwin* | rhapsody*)
746708c70cfbSmrg        _LT_DARWIN_LINKER_FEATURES($1)
746808c70cfbSmrg	;;
746921298544Smrg
747008c70cfbSmrg      dgux*)
747108c70cfbSmrg        case $cc_basename in
747208c70cfbSmrg          ec++*)
747308c70cfbSmrg	    # FIXME: insert proper C++ library support
747408c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
747508c70cfbSmrg	    ;;
747608c70cfbSmrg          ghcx*)
747708c70cfbSmrg	    # Green Hills C++ Compiler
747808c70cfbSmrg	    # FIXME: insert proper C++ library support
747908c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
748008c70cfbSmrg	    ;;
748108c70cfbSmrg          *)
748208c70cfbSmrg	    # FIXME: insert proper C++ library support
748308c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
748408c70cfbSmrg	    ;;
748508c70cfbSmrg        esac
748608c70cfbSmrg        ;;
748721298544Smrg
748808c70cfbSmrg      freebsd2.*)
748908c70cfbSmrg        # C++ shared libraries reported to be fairly broken before
749008c70cfbSmrg	# switch to ELF
749108c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
749208c70cfbSmrg        ;;
749321298544Smrg
749408c70cfbSmrg      freebsd-elf*)
749508c70cfbSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
749608c70cfbSmrg        ;;
749721298544Smrg
749808c70cfbSmrg      freebsd* | dragonfly*)
749908c70cfbSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
750008c70cfbSmrg        # conventions
750108c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
750208c70cfbSmrg        ;;
750321298544Smrg
750408c70cfbSmrg      gnu*)
750508c70cfbSmrg        ;;
750621298544Smrg
750708c70cfbSmrg      haiku*)
750808c70cfbSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
750908c70cfbSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
751008c70cfbSmrg        ;;
751121298544Smrg
751208c70cfbSmrg      hpux9*)
751308c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
751408c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
751508c70cfbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
751608c70cfbSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
751708c70cfbSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
751808c70cfbSmrg				             # but as the default
751908c70cfbSmrg				             # location of the library.
752021298544Smrg
752108c70cfbSmrg        case $cc_basename in
752208c70cfbSmrg          CC*)
752308c70cfbSmrg            # FIXME: insert proper C++ library support
752408c70cfbSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
752508c70cfbSmrg            ;;
752608c70cfbSmrg          aCC*)
752708c70cfbSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
752808c70cfbSmrg            # Commands to make compiler produce verbose output that lists
752908c70cfbSmrg            # what "hidden" libraries, object files and flags are used when
753008c70cfbSmrg            # linking a shared library.
753108c70cfbSmrg            #
753208c70cfbSmrg            # There doesn't appear to be a way to prevent this compiler from
753308c70cfbSmrg            # explicitly linking system object files so we need to strip them
753408c70cfbSmrg            # from the output so that they don't get included in the library
753508c70cfbSmrg            # dependencies.
753608c70cfbSmrg            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"'
753708c70cfbSmrg            ;;
753808c70cfbSmrg          *)
753908c70cfbSmrg            if test "$GXX" = yes; then
754008c70cfbSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
754108c70cfbSmrg            else
754208c70cfbSmrg              # FIXME: insert proper C++ library support
754308c70cfbSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
754408c70cfbSmrg            fi
754508c70cfbSmrg            ;;
754608c70cfbSmrg        esac
754708c70cfbSmrg        ;;
754821298544Smrg
754908c70cfbSmrg      hpux10*|hpux11*)
755008c70cfbSmrg        if test $with_gnu_ld = no; then
755108c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
755208c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
755321298544Smrg
755408c70cfbSmrg          case $host_cpu in
755508c70cfbSmrg            hppa*64*|ia64*)
755608c70cfbSmrg              ;;
755708c70cfbSmrg            *)
755808c70cfbSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
755908c70cfbSmrg              ;;
756008c70cfbSmrg          esac
756108c70cfbSmrg        fi
756208c70cfbSmrg        case $host_cpu in
756308c70cfbSmrg          hppa*64*|ia64*)
756408c70cfbSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
756508c70cfbSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
756608c70cfbSmrg            ;;
756708c70cfbSmrg          *)
756808c70cfbSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
756908c70cfbSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
757008c70cfbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
757108c70cfbSmrg					         # but as the default
757208c70cfbSmrg					         # location of the library.
757308c70cfbSmrg            ;;
757408c70cfbSmrg        esac
757521298544Smrg
757608c70cfbSmrg        case $cc_basename in
757708c70cfbSmrg          CC*)
757808c70cfbSmrg	    # FIXME: insert proper C++ library support
757908c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
758008c70cfbSmrg	    ;;
758108c70cfbSmrg          aCC*)
758208c70cfbSmrg	    case $host_cpu in
758308c70cfbSmrg	      hppa*64*)
758408c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
758508c70cfbSmrg	        ;;
758608c70cfbSmrg	      ia64*)
758708c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
758808c70cfbSmrg	        ;;
758908c70cfbSmrg	      *)
759008c70cfbSmrg	        _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'
759108c70cfbSmrg	        ;;
759208c70cfbSmrg	    esac
759308c70cfbSmrg	    # Commands to make compiler produce verbose output that lists
759408c70cfbSmrg	    # what "hidden" libraries, object files and flags are used when
759508c70cfbSmrg	    # linking a shared library.
759608c70cfbSmrg	    #
759708c70cfbSmrg	    # There doesn't appear to be a way to prevent this compiler from
759808c70cfbSmrg	    # explicitly linking system object files so we need to strip them
759908c70cfbSmrg	    # from the output so that they don't get included in the library
760008c70cfbSmrg	    # dependencies.
760108c70cfbSmrg	    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"'
760208c70cfbSmrg	    ;;
760308c70cfbSmrg          *)
760408c70cfbSmrg	    if test "$GXX" = yes; then
760508c70cfbSmrg	      if test $with_gnu_ld = no; then
760608c70cfbSmrg	        case $host_cpu in
760708c70cfbSmrg	          hppa*64*)
760808c70cfbSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
760908c70cfbSmrg	            ;;
761008c70cfbSmrg	          ia64*)
761108c70cfbSmrg	            _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'
761208c70cfbSmrg	            ;;
761308c70cfbSmrg	          *)
761408c70cfbSmrg	            _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'
761508c70cfbSmrg	            ;;
761608c70cfbSmrg	        esac
761708c70cfbSmrg	      fi
761808c70cfbSmrg	    else
761908c70cfbSmrg	      # FIXME: insert proper C++ library support
762008c70cfbSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
762108c70cfbSmrg	    fi
762208c70cfbSmrg	    ;;
762308c70cfbSmrg        esac
762408c70cfbSmrg        ;;
762521298544Smrg
762608c70cfbSmrg      interix[[3-9]]*)
762708c70cfbSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
762808c70cfbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
762908c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
763008c70cfbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
763108c70cfbSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
763208c70cfbSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
763308c70cfbSmrg	# default) and relocated if they conflict, which is a slow very memory
763408c70cfbSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
763508c70cfbSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
763608c70cfbSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
763708c70cfbSmrg	_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'
763808c70cfbSmrg	_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'
763908c70cfbSmrg	;;
764008c70cfbSmrg      irix5* | irix6*)
764108c70cfbSmrg        case $cc_basename in
764208c70cfbSmrg          CC*)
764308c70cfbSmrg	    # SGI C++
764408c70cfbSmrg	    _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'
764521298544Smrg
764608c70cfbSmrg	    # Archives containing C++ object files must be created using
764708c70cfbSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
764808c70cfbSmrg	    # necessary to make sure instantiated templates are included
764908c70cfbSmrg	    # in the archive.
765008c70cfbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
765108c70cfbSmrg	    ;;
765208c70cfbSmrg          *)
765308c70cfbSmrg	    if test "$GXX" = yes; then
765408c70cfbSmrg	      if test "$with_gnu_ld" = no; then
765508c70cfbSmrg	        _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'
765608c70cfbSmrg	      else
765708c70cfbSmrg	        _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'
765808c70cfbSmrg	      fi
765908c70cfbSmrg	    fi
766008c70cfbSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
766108c70cfbSmrg	    ;;
766208c70cfbSmrg        esac
766308c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
766408c70cfbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
766508c70cfbSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
766608c70cfbSmrg        ;;
766721298544Smrg
766808c70cfbSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
766908c70cfbSmrg        case $cc_basename in
767008c70cfbSmrg          KCC*)
767108c70cfbSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
767221298544Smrg
767308c70cfbSmrg	    # KCC will only create a shared library if the output file
767408c70cfbSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
767508c70cfbSmrg	    # to its proper name (with version) after linking.
767608c70cfbSmrg	    _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'
767708c70cfbSmrg	    _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'
767808c70cfbSmrg	    # Commands to make compiler produce verbose output that lists
767908c70cfbSmrg	    # what "hidden" libraries, object files and flags are used when
768008c70cfbSmrg	    # linking a shared library.
768108c70cfbSmrg	    #
768208c70cfbSmrg	    # There doesn't appear to be a way to prevent this compiler from
768308c70cfbSmrg	    # explicitly linking system object files so we need to strip them
768408c70cfbSmrg	    # from the output so that they don't get included in the library
768508c70cfbSmrg	    # dependencies.
768608c70cfbSmrg	    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"'
7687602e473dSmrg
768808c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
768908c70cfbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7690602e473dSmrg
769108c70cfbSmrg	    # Archives containing C++ object files must be created using
769208c70cfbSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
769308c70cfbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
769408c70cfbSmrg	    ;;
769508c70cfbSmrg	  icpc* | ecpc* )
769608c70cfbSmrg	    # Intel C++
769708c70cfbSmrg	    with_gnu_ld=yes
769808c70cfbSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
769908c70cfbSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
770008c70cfbSmrg	    # earlier do not add the objects themselves.
770108c70cfbSmrg	    case `$CC -V 2>&1` in
770208c70cfbSmrg	      *"Version 7."*)
770308c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
770408c70cfbSmrg		_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'
770508c70cfbSmrg		;;
770608c70cfbSmrg	      *)  # Version 8.0 or newer
770708c70cfbSmrg	        tmp_idyn=
770808c70cfbSmrg	        case $host_cpu in
770908c70cfbSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
771008c70cfbSmrg		esac
771108c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
771208c70cfbSmrg		_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'
771308c70cfbSmrg		;;
771408c70cfbSmrg	    esac
771508c70cfbSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
771608c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
771708c70cfbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
771808c70cfbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
771908c70cfbSmrg	    ;;
772008c70cfbSmrg          pgCC* | pgcpp*)
772108c70cfbSmrg            # Portland Group C++ compiler
772208c70cfbSmrg	    case `$CC -V` in
772308c70cfbSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
772408c70cfbSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
772508c70cfbSmrg		rm -rf $tpldir~
772608c70cfbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
772708c70cfbSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
772808c70cfbSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
772908c70cfbSmrg		rm -rf $tpldir~
773008c70cfbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
773108c70cfbSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
773208c70cfbSmrg		$RANLIB $oldlib'
773308c70cfbSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
773408c70cfbSmrg		rm -rf $tpldir~
773508c70cfbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
773608c70cfbSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
773708c70cfbSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
773808c70cfbSmrg		rm -rf $tpldir~
773908c70cfbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
774008c70cfbSmrg		$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'
774108c70cfbSmrg	      ;;
774208c70cfbSmrg	    *) # Version 6 and above use weak symbols
774308c70cfbSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
774408c70cfbSmrg	      _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'
774508c70cfbSmrg	      ;;
774608c70cfbSmrg	    esac
7747602e473dSmrg
774808c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
774908c70cfbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
775008c70cfbSmrg	    _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'
775108c70cfbSmrg            ;;
775208c70cfbSmrg	  cxx*)
775308c70cfbSmrg	    # Compaq C++
775408c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
775508c70cfbSmrg	    _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'
7756602e473dSmrg
775708c70cfbSmrg	    runpath_var=LD_RUN_PATH
775808c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
775908c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7760602e473dSmrg
776108c70cfbSmrg	    # Commands to make compiler produce verbose output that lists
776208c70cfbSmrg	    # what "hidden" libraries, object files and flags are used when
776308c70cfbSmrg	    # linking a shared library.
776408c70cfbSmrg	    #
776508c70cfbSmrg	    # There doesn't appear to be a way to prevent this compiler from
776608c70cfbSmrg	    # explicitly linking system object files so we need to strip them
776708c70cfbSmrg	    # from the output so that they don't get included in the library
776808c70cfbSmrg	    # dependencies.
776908c70cfbSmrg	    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'
777008c70cfbSmrg	    ;;
777108c70cfbSmrg	  xl* | mpixl* | bgxl*)
777208c70cfbSmrg	    # IBM XL 8.0 on PPC, with GNU ld
777308c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
777408c70cfbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
777508c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
777608c70cfbSmrg	    if test "x$supports_anon_versioning" = xyes; then
777708c70cfbSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
777808c70cfbSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
777908c70cfbSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
778008c70cfbSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
778108c70cfbSmrg	    fi
778208c70cfbSmrg	    ;;
778308c70cfbSmrg	  *)
778408c70cfbSmrg	    case `$CC -V 2>&1 | sed 5q` in
778508c70cfbSmrg	    *Sun\ C*)
778608c70cfbSmrg	      # Sun C++ 5.9
778708c70cfbSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
778808c70cfbSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
778908c70cfbSmrg	      _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'
779008c70cfbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
779108c70cfbSmrg	      _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'
779208c70cfbSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7793602e473dSmrg
779408c70cfbSmrg	      # Not sure whether something based on
779508c70cfbSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
779608c70cfbSmrg	      # would be better.
779708c70cfbSmrg	      output_verbose_link_cmd='func_echo_all'
7798602e473dSmrg
779908c70cfbSmrg	      # Archives containing C++ object files must be created using
780008c70cfbSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
780108c70cfbSmrg	      # necessary to make sure instantiated templates are included
780208c70cfbSmrg	      # in the archive.
780308c70cfbSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
780408c70cfbSmrg	      ;;
780508c70cfbSmrg	    esac
780608c70cfbSmrg	    ;;
780708c70cfbSmrg	esac
780808c70cfbSmrg	;;
7809602e473dSmrg
781008c70cfbSmrg      lynxos*)
781108c70cfbSmrg        # FIXME: insert proper C++ library support
781208c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
781308c70cfbSmrg	;;
7814602e473dSmrg
781508c70cfbSmrg      m88k*)
781608c70cfbSmrg        # FIXME: insert proper C++ library support
781708c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
781808c70cfbSmrg	;;
7819602e473dSmrg
782008c70cfbSmrg      mvs*)
782108c70cfbSmrg        case $cc_basename in
782208c70cfbSmrg          cxx*)
782308c70cfbSmrg	    # FIXME: insert proper C++ library support
782408c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
782508c70cfbSmrg	    ;;
782608c70cfbSmrg	  *)
782708c70cfbSmrg	    # FIXME: insert proper C++ library support
782808c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
782908c70cfbSmrg	    ;;
783008c70cfbSmrg	esac
783108c70cfbSmrg	;;
7832602e473dSmrg
783308c70cfbSmrg      netbsd*)
783408c70cfbSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
783508c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
783608c70cfbSmrg	  wlarc=
783708c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
783808c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
783908c70cfbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
784008c70cfbSmrg	fi
784108c70cfbSmrg	# Workaround some broken pre-1.5 toolchains
784208c70cfbSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
784308c70cfbSmrg	;;
7844602e473dSmrg
784508c70cfbSmrg      *nto* | *qnx*)
784608c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
784708c70cfbSmrg	;;
7848602e473dSmrg
784908c70cfbSmrg      openbsd2*)
785008c70cfbSmrg        # C++ shared libraries are fairly broken
785108c70cfbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
785208c70cfbSmrg	;;
7853602e473dSmrg
785408c70cfbSmrg      openbsd*)
785508c70cfbSmrg	if test -f /usr/libexec/ld.so; then
785608c70cfbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
785708c70cfbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
785808c70cfbSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
785908c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
786008c70cfbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
786108c70cfbSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
786208c70cfbSmrg	    _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'
786308c70cfbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
786408c70cfbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
786508c70cfbSmrg	  fi
786608c70cfbSmrg	  output_verbose_link_cmd=func_echo_all
786708c70cfbSmrg	else
786808c70cfbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
786908c70cfbSmrg	fi
787008c70cfbSmrg	;;
787121298544Smrg
787208c70cfbSmrg      osf3* | osf4* | osf5*)
787308c70cfbSmrg        case $cc_basename in
787408c70cfbSmrg          KCC*)
787508c70cfbSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
787621298544Smrg
787708c70cfbSmrg	    # KCC will only create a shared library if the output file
787808c70cfbSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
787908c70cfbSmrg	    # to its proper name (with version) after linking.
788008c70cfbSmrg	    _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'
7881602e473dSmrg
788208c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
788308c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7884602e473dSmrg
788508c70cfbSmrg	    # Archives containing C++ object files must be created using
788608c70cfbSmrg	    # the KAI C++ compiler.
788708c70cfbSmrg	    case $host in
788808c70cfbSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
788908c70cfbSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
789008c70cfbSmrg	    esac
789108c70cfbSmrg	    ;;
789208c70cfbSmrg          RCC*)
789308c70cfbSmrg	    # Rational C++ 2.4.1
789408c70cfbSmrg	    # FIXME: insert proper C++ library support
789508c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
789608c70cfbSmrg	    ;;
789708c70cfbSmrg          cxx*)
789808c70cfbSmrg	    case $host in
789908c70cfbSmrg	      osf3*)
790008c70cfbSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
790108c70cfbSmrg	        _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'
790208c70cfbSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
790308c70cfbSmrg		;;
790408c70cfbSmrg	      *)
790508c70cfbSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
790608c70cfbSmrg	        _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'
790708c70cfbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
790808c70cfbSmrg	          echo "-hidden">> $lib.exp~
790908c70cfbSmrg	          $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~
791008c70cfbSmrg	          $RM $lib.exp'
791108c70cfbSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
791208c70cfbSmrg		;;
791308c70cfbSmrg	    esac
7914602e473dSmrg
791508c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7916602e473dSmrg
791708c70cfbSmrg	    # Commands to make compiler produce verbose output that lists
791808c70cfbSmrg	    # what "hidden" libraries, object files and flags are used when
791908c70cfbSmrg	    # linking a shared library.
792008c70cfbSmrg	    #
792108c70cfbSmrg	    # There doesn't appear to be a way to prevent this compiler from
792208c70cfbSmrg	    # explicitly linking system object files so we need to strip them
792308c70cfbSmrg	    # from the output so that they don't get included in the library
792408c70cfbSmrg	    # dependencies.
792508c70cfbSmrg	    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"'
792608c70cfbSmrg	    ;;
792708c70cfbSmrg	  *)
792808c70cfbSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
792908c70cfbSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
793008c70cfbSmrg	      case $host in
793108c70cfbSmrg	        osf3*)
793208c70cfbSmrg	          _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'
793308c70cfbSmrg		  ;;
793408c70cfbSmrg	        *)
793508c70cfbSmrg	          _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'
793608c70cfbSmrg		  ;;
793708c70cfbSmrg	      esac
7938602e473dSmrg
793908c70cfbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
794008c70cfbSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7941602e473dSmrg
794208c70cfbSmrg	      # Commands to make compiler produce verbose output that lists
794308c70cfbSmrg	      # what "hidden" libraries, object files and flags are used when
794408c70cfbSmrg	      # linking a shared library.
794508c70cfbSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7946602e473dSmrg
794708c70cfbSmrg	    else
794808c70cfbSmrg	      # FIXME: insert proper C++ library support
794908c70cfbSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
795008c70cfbSmrg	    fi
795108c70cfbSmrg	    ;;
795208c70cfbSmrg        esac
795308c70cfbSmrg        ;;
7954602e473dSmrg
795508c70cfbSmrg      psos*)
795608c70cfbSmrg        # FIXME: insert proper C++ library support
795708c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
795808c70cfbSmrg        ;;
7959602e473dSmrg
796008c70cfbSmrg      sunos4*)
796108c70cfbSmrg        case $cc_basename in
796208c70cfbSmrg          CC*)
796308c70cfbSmrg	    # Sun C++ 4.x
796408c70cfbSmrg	    # FIXME: insert proper C++ library support
796508c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
796608c70cfbSmrg	    ;;
796708c70cfbSmrg          lcc*)
796808c70cfbSmrg	    # Lucid
796908c70cfbSmrg	    # FIXME: insert proper C++ library support
797008c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
797108c70cfbSmrg	    ;;
797208c70cfbSmrg          *)
797308c70cfbSmrg	    # FIXME: insert proper C++ library support
797408c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
797508c70cfbSmrg	    ;;
797608c70cfbSmrg        esac
797708c70cfbSmrg        ;;
7978602e473dSmrg
797908c70cfbSmrg      solaris*)
798008c70cfbSmrg        case $cc_basename in
798108c70cfbSmrg          CC* | sunCC*)
798208c70cfbSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
798308c70cfbSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
798408c70cfbSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
798508c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
798608c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
798708c70cfbSmrg	      $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'
7988602e473dSmrg
798908c70cfbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
799008c70cfbSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
799108c70cfbSmrg	    case $host_os in
799208c70cfbSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
799308c70cfbSmrg	      *)
799408c70cfbSmrg		# The compiler driver will combine and reorder linker options,
799508c70cfbSmrg		# but understands `-z linker_flag'.
799608c70cfbSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
799708c70cfbSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
799808c70cfbSmrg	        ;;
799908c70cfbSmrg	    esac
800008c70cfbSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8001602e473dSmrg
800208c70cfbSmrg	    output_verbose_link_cmd='func_echo_all'
8003602e473dSmrg
800408c70cfbSmrg	    # Archives containing C++ object files must be created using
800508c70cfbSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
800608c70cfbSmrg	    # necessary to make sure instantiated templates are included
800708c70cfbSmrg	    # in the archive.
800808c70cfbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
800908c70cfbSmrg	    ;;
801008c70cfbSmrg          gcx*)
801108c70cfbSmrg	    # Green Hills C++ Compiler
801208c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8013602e473dSmrg
801408c70cfbSmrg	    # The C++ compiler must be used to create the archive.
801508c70cfbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
801608c70cfbSmrg	    ;;
801708c70cfbSmrg          *)
801808c70cfbSmrg	    # GNU C++ compiler with Solaris linker
801908c70cfbSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
802008c70cfbSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
802108c70cfbSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
802208c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
802308c70cfbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
802408c70cfbSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8025602e473dSmrg
802608c70cfbSmrg	        # Commands to make compiler produce verbose output that lists
802708c70cfbSmrg	        # what "hidden" libraries, object files and flags are used when
802808c70cfbSmrg	        # linking a shared library.
802908c70cfbSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
803008c70cfbSmrg	      else
803108c70cfbSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
803208c70cfbSmrg	        # platform.
803308c70cfbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
803408c70cfbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
803508c70cfbSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8036602e473dSmrg
803708c70cfbSmrg	        # Commands to make compiler produce verbose output that lists
803808c70cfbSmrg	        # what "hidden" libraries, object files and flags are used when
803908c70cfbSmrg	        # linking a shared library.
804008c70cfbSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
804108c70cfbSmrg	      fi
8042602e473dSmrg
804308c70cfbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
804408c70cfbSmrg	      case $host_os in
804508c70cfbSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
804608c70cfbSmrg		*)
804708c70cfbSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
804808c70cfbSmrg		  ;;
804908c70cfbSmrg	      esac
805008c70cfbSmrg	    fi
805108c70cfbSmrg	    ;;
805208c70cfbSmrg        esac
805308c70cfbSmrg        ;;
8054602e473dSmrg
805508c70cfbSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
805608c70cfbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
805708c70cfbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
805808c70cfbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
805908c70cfbSmrg      runpath_var='LD_RUN_PATH'
8060602e473dSmrg
806108c70cfbSmrg      case $cc_basename in
806208c70cfbSmrg        CC*)
806308c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
806408c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
806508c70cfbSmrg	  ;;
806608c70cfbSmrg	*)
806708c70cfbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
806808c70cfbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
806908c70cfbSmrg	  ;;
807008c70cfbSmrg      esac
807108c70cfbSmrg      ;;
807221298544Smrg
807308c70cfbSmrg      sysv5* | sco3.2v5* | sco5v6*)
807408c70cfbSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
807508c70cfbSmrg	# link with -lc, and that would cause any symbols used from libc to
807608c70cfbSmrg	# always be unresolved, which means just about no library would
807708c70cfbSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
807808c70cfbSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
807908c70cfbSmrg	# as -z defs.
808008c70cfbSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
808108c70cfbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
808208c70cfbSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
808308c70cfbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
808408c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
808508c70cfbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
808608c70cfbSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
808708c70cfbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
808808c70cfbSmrg	runpath_var='LD_RUN_PATH'
808921298544Smrg
809008c70cfbSmrg	case $cc_basename in
809108c70cfbSmrg          CC*)
809208c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
809308c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
809408c70cfbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
809508c70cfbSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
809608c70cfbSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
809708c70cfbSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
809808c70cfbSmrg	    ;;
809908c70cfbSmrg	  *)
810008c70cfbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
810108c70cfbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
810208c70cfbSmrg	    ;;
810308c70cfbSmrg	esac
810408c70cfbSmrg      ;;
8105602e473dSmrg
810608c70cfbSmrg      tandem*)
810708c70cfbSmrg        case $cc_basename in
810808c70cfbSmrg          NCC*)
810908c70cfbSmrg	    # NonStop-UX NCC 3.20
811008c70cfbSmrg	    # FIXME: insert proper C++ library support
811108c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
811208c70cfbSmrg	    ;;
811308c70cfbSmrg          *)
811408c70cfbSmrg	    # FIXME: insert proper C++ library support
811508c70cfbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
811608c70cfbSmrg	    ;;
811708c70cfbSmrg        esac
811808c70cfbSmrg        ;;
8119602e473dSmrg
812008c70cfbSmrg      vxworks*)
812108c70cfbSmrg        # FIXME: insert proper C++ library support
812208c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
812308c70cfbSmrg        ;;
8124602e473dSmrg
812508c70cfbSmrg      *)
812608c70cfbSmrg        # FIXME: insert proper C++ library support
812708c70cfbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
812808c70cfbSmrg        ;;
812908c70cfbSmrg    esac
8130602e473dSmrg
813108c70cfbSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
813208c70cfbSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8133602e473dSmrg
813408c70cfbSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
813508c70cfbSmrg    _LT_TAGVAR(LD, $1)="$LD"
8136602e473dSmrg
813708c70cfbSmrg    ## CAVEAT EMPTOR:
813808c70cfbSmrg    ## There is no encapsulation within the following macros, do not change
813908c70cfbSmrg    ## the running order or otherwise move them around unless you know exactly
814008c70cfbSmrg    ## what you are doing...
814108c70cfbSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
814208c70cfbSmrg    _LT_COMPILER_PIC($1)
814308c70cfbSmrg    _LT_COMPILER_C_O($1)
814408c70cfbSmrg    _LT_COMPILER_FILE_LOCKS($1)
814508c70cfbSmrg    _LT_LINKER_SHLIBS($1)
814608c70cfbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
814708c70cfbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8148602e473dSmrg
814908c70cfbSmrg    _LT_CONFIG($1)
815008c70cfbSmrg  fi # test -n "$compiler"
8151602e473dSmrg
815208c70cfbSmrg  CC=$lt_save_CC
815308c70cfbSmrg  CFLAGS=$lt_save_CFLAGS
815408c70cfbSmrg  LDCXX=$LD
815508c70cfbSmrg  LD=$lt_save_LD
815608c70cfbSmrg  GCC=$lt_save_GCC
815708c70cfbSmrg  with_gnu_ld=$lt_save_with_gnu_ld
815808c70cfbSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
815908c70cfbSmrg  lt_cv_path_LD=$lt_save_path_LD
816008c70cfbSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
816108c70cfbSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
816208c70cfbSmrgfi # test "$_lt_caught_CXX_error" != yes
8163602e473dSmrg
816408c70cfbSmrgAC_LANG_POP
816508c70cfbSmrg])# _LT_LANG_CXX_CONFIG
8166602e473dSmrg
8167602e473dSmrg
816808c70cfbSmrg# _LT_FUNC_STRIPNAME_CNF
816908c70cfbSmrg# ----------------------
817008c70cfbSmrg# func_stripname_cnf prefix suffix name
817108c70cfbSmrg# strip PREFIX and SUFFIX off of NAME.
817208c70cfbSmrg# PREFIX and SUFFIX must not contain globbing or regex special
817308c70cfbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
817408c70cfbSmrg# dot (in which case that matches only a dot).
817508c70cfbSmrg#
817608c70cfbSmrg# This function is identical to the (non-XSI) version of func_stripname,
817708c70cfbSmrg# except this one can be used by m4 code that may be executed by configure,
817808c70cfbSmrg# rather than the libtool script.
817908c70cfbSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
818008c70cfbSmrgAC_REQUIRE([_LT_DECL_SED])
818108c70cfbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
818208c70cfbSmrgfunc_stripname_cnf ()
818308c70cfbSmrg{
818408c70cfbSmrg  case ${2} in
818508c70cfbSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
818608c70cfbSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
818708c70cfbSmrg  esac
818808c70cfbSmrg} # func_stripname_cnf
818908c70cfbSmrg])# _LT_FUNC_STRIPNAME_CNF
8190602e473dSmrg
819108c70cfbSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
819208c70cfbSmrg# ---------------------------------
819308c70cfbSmrg# Figure out "hidden" library dependencies from verbose
819408c70cfbSmrg# compiler output when linking a shared library.
819508c70cfbSmrg# Parse the compiler output and extract the necessary
819608c70cfbSmrg# objects, libraries and library flags.
819708c70cfbSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
819808c70cfbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
819908c70cfbSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
820008c70cfbSmrg# Dependencies to place before and after the object being linked:
820108c70cfbSmrg_LT_TAGVAR(predep_objects, $1)=
820208c70cfbSmrg_LT_TAGVAR(postdep_objects, $1)=
820308c70cfbSmrg_LT_TAGVAR(predeps, $1)=
820408c70cfbSmrg_LT_TAGVAR(postdeps, $1)=
820508c70cfbSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
820608c70cfbSmrg
820708c70cfbSmrgdnl we can't use the lt_simple_compile_test_code here,
820808c70cfbSmrgdnl because it contains code intended for an executable,
820908c70cfbSmrgdnl not a library.  It's possible we should let each
821008c70cfbSmrgdnl tag define a new lt_????_link_test_code variable,
821108c70cfbSmrgdnl but it's only used here...
821208c70cfbSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
821308c70cfbSmrgint a;
821408c70cfbSmrgvoid foo (void) { a = 0; }
821508c70cfbSmrg_LT_EOF
821608c70cfbSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
821708c70cfbSmrgclass Foo
821808c70cfbSmrg{
821908c70cfbSmrgpublic:
822008c70cfbSmrg  Foo (void) { a = 0; }
822108c70cfbSmrgprivate:
822208c70cfbSmrg  int a;
822308c70cfbSmrg};
822408c70cfbSmrg_LT_EOF
822508c70cfbSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
822608c70cfbSmrg      subroutine foo
822708c70cfbSmrg      implicit none
822808c70cfbSmrg      integer*4 a
822908c70cfbSmrg      a=0
823008c70cfbSmrg      return
823108c70cfbSmrg      end
823208c70cfbSmrg_LT_EOF
823308c70cfbSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
823408c70cfbSmrg      subroutine foo
823508c70cfbSmrg      implicit none
823608c70cfbSmrg      integer a
823708c70cfbSmrg      a=0
823808c70cfbSmrg      return
823908c70cfbSmrg      end
824008c70cfbSmrg_LT_EOF
824108c70cfbSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
824208c70cfbSmrgpublic class foo {
824308c70cfbSmrg  private int a;
824408c70cfbSmrg  public void bar (void) {
824508c70cfbSmrg    a = 0;
824608c70cfbSmrg  }
824708c70cfbSmrg};
824808c70cfbSmrg_LT_EOF
824908c70cfbSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
825008c70cfbSmrgpackage foo
825108c70cfbSmrgfunc foo() {
825208c70cfbSmrg}
825308c70cfbSmrg_LT_EOF
825421298544Smrg])
825521298544Smrg
825608c70cfbSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
825708c70cfbSmrgcase "$CC $CFLAGS " in #(
825808c70cfbSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
825908c70cfbSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
826008c70cfbSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
826121298544Smrgesac
8262602e473dSmrg
826308c70cfbSmrgdnl Parse the compiler output and extract the necessary
826408c70cfbSmrgdnl objects, libraries and library flags.
826508c70cfbSmrgif AC_TRY_EVAL(ac_compile); then
826608c70cfbSmrg  # Parse the compiler output and extract the necessary
826708c70cfbSmrg  # objects, libraries and library flags.
8268602e473dSmrg
826908c70cfbSmrg  # Sentinel used to keep track of whether or not we are before
827008c70cfbSmrg  # the conftest object file.
827108c70cfbSmrg  pre_test_object_deps_done=no
8272602e473dSmrg
827308c70cfbSmrg  for p in `eval "$output_verbose_link_cmd"`; do
827408c70cfbSmrg    case ${prev}${p} in
8275602e473dSmrg
827608c70cfbSmrg    -L* | -R* | -l*)
827708c70cfbSmrg       # Some compilers place space between "-{L,R}" and the path.
827808c70cfbSmrg       # Remove the space.
827908c70cfbSmrg       if test $p = "-L" ||
828008c70cfbSmrg          test $p = "-R"; then
828108c70cfbSmrg	 prev=$p
828208c70cfbSmrg	 continue
828308c70cfbSmrg       fi
8284602e473dSmrg
828508c70cfbSmrg       # Expand the sysroot to ease extracting the directories later.
828608c70cfbSmrg       if test -z "$prev"; then
828708c70cfbSmrg         case $p in
828808c70cfbSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
828908c70cfbSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
829008c70cfbSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
829108c70cfbSmrg         esac
829208c70cfbSmrg       fi
829308c70cfbSmrg       case $p in
829408c70cfbSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
829508c70cfbSmrg       esac
829608c70cfbSmrg       if test "$pre_test_object_deps_done" = no; then
829708c70cfbSmrg	 case ${prev} in
829808c70cfbSmrg	 -L | -R)
829908c70cfbSmrg	   # Internal compiler library paths should come after those
830008c70cfbSmrg	   # provided the user.  The postdeps already come after the
830108c70cfbSmrg	   # user supplied libs so there is no need to process them.
830208c70cfbSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
830308c70cfbSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
830408c70cfbSmrg	   else
830508c70cfbSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
830608c70cfbSmrg	   fi
830708c70cfbSmrg	   ;;
830808c70cfbSmrg	 # The "-l" case would never come before the object being
830908c70cfbSmrg	 # linked, so don't bother handling this case.
831008c70cfbSmrg	 esac
831108c70cfbSmrg       else
831208c70cfbSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
831308c70cfbSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
831408c70cfbSmrg	 else
831508c70cfbSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
831608c70cfbSmrg	 fi
831708c70cfbSmrg       fi
831808c70cfbSmrg       prev=
831908c70cfbSmrg       ;;
8320602e473dSmrg
832108c70cfbSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
832208c70cfbSmrg    *.$objext)
832308c70cfbSmrg       # This assumes that the test object file only shows up
832408c70cfbSmrg       # once in the compiler output.
832508c70cfbSmrg       if test "$p" = "conftest.$objext"; then
832608c70cfbSmrg	 pre_test_object_deps_done=yes
832708c70cfbSmrg	 continue
832808c70cfbSmrg       fi
8329602e473dSmrg
833008c70cfbSmrg       if test "$pre_test_object_deps_done" = no; then
833108c70cfbSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
833208c70cfbSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
833308c70cfbSmrg	 else
833408c70cfbSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
833508c70cfbSmrg	 fi
833608c70cfbSmrg       else
833708c70cfbSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
833808c70cfbSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
833908c70cfbSmrg	 else
834008c70cfbSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
834108c70cfbSmrg	 fi
834208c70cfbSmrg       fi
834308c70cfbSmrg       ;;
8344602e473dSmrg
834508c70cfbSmrg    *) ;; # Ignore the rest.
8346602e473dSmrg
834708c70cfbSmrg    esac
834808c70cfbSmrg  done
8349602e473dSmrg
835008c70cfbSmrg  # Clean up.
835108c70cfbSmrg  rm -f a.out a.exe
835208c70cfbSmrgelse
835308c70cfbSmrg  echo "libtool.m4: error: problem compiling $1 test program"
835408c70cfbSmrgfi
8355602e473dSmrg
835608c70cfbSmrg$RM -f confest.$objext
835708c70cfbSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
835808c70cfbSmrg
835908c70cfbSmrg# PORTME: override above test on systems where it is broken
836008c70cfbSmrgm4_if([$1], [CXX],
836108c70cfbSmrg[case $host_os in
836208c70cfbSmrginterix[[3-9]]*)
836308c70cfbSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
836408c70cfbSmrg  # hack all around it, let's just trust "g++" to DTRT.
836508c70cfbSmrg  _LT_TAGVAR(predep_objects,$1)=
836608c70cfbSmrg  _LT_TAGVAR(postdep_objects,$1)=
836708c70cfbSmrg  _LT_TAGVAR(postdeps,$1)=
836808c70cfbSmrg  ;;
8369602e473dSmrg
837008c70cfbSmrglinux*)
837108c70cfbSmrg  case `$CC -V 2>&1 | sed 5q` in
837208c70cfbSmrg  *Sun\ C*)
837308c70cfbSmrg    # Sun C++ 5.9
8374602e473dSmrg
837508c70cfbSmrg    # The more standards-conforming stlport4 library is
837608c70cfbSmrg    # incompatible with the Cstd library. Avoid specifying
837708c70cfbSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
837808c70cfbSmrg    # -library=stlport4 depends on it.
837908c70cfbSmrg    case " $CXX $CXXFLAGS " in
838008c70cfbSmrg    *" -library=stlport4 "*)
838108c70cfbSmrg      solaris_use_stlport4=yes
838208c70cfbSmrg      ;;
838308c70cfbSmrg    esac
8384602e473dSmrg
838508c70cfbSmrg    if test "$solaris_use_stlport4" != yes; then
838608c70cfbSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
838708c70cfbSmrg    fi
838808c70cfbSmrg    ;;
838908c70cfbSmrg  esac
839008c70cfbSmrg  ;;
839108c70cfbSmrg
839208c70cfbSmrgsolaris*)
839308c70cfbSmrg  case $cc_basename in
839408c70cfbSmrg  CC* | sunCC*)
839508c70cfbSmrg    # The more standards-conforming stlport4 library is
839608c70cfbSmrg    # incompatible with the Cstd library. Avoid specifying
839708c70cfbSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
839808c70cfbSmrg    # -library=stlport4 depends on it.
839908c70cfbSmrg    case " $CXX $CXXFLAGS " in
840008c70cfbSmrg    *" -library=stlport4 "*)
840108c70cfbSmrg      solaris_use_stlport4=yes
840208c70cfbSmrg      ;;
840308c70cfbSmrg    esac
8404602e473dSmrg
840508c70cfbSmrg    # Adding this requires a known-good setup of shared libraries for
840608c70cfbSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
840708c70cfbSmrg    # archive will be linked into the output, leading to subtle bugs.
840808c70cfbSmrg    if test "$solaris_use_stlport4" != yes; then
840908c70cfbSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
841008c70cfbSmrg    fi
841108c70cfbSmrg    ;;
841208c70cfbSmrg  esac
841308c70cfbSmrg  ;;
841408c70cfbSmrgesac
841508c70cfbSmrg])
8416602e473dSmrg
841708c70cfbSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
841808c70cfbSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
841908c70cfbSmrgesac
842008c70cfbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
842108c70cfbSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
842208c70cfbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
842308c70cfbSmrgfi
842408c70cfbSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
842508c70cfbSmrg    [The directories searched by this compiler when creating a shared library])
842608c70cfbSmrg_LT_TAGDECL([], [predep_objects], [1],
842708c70cfbSmrg    [Dependencies to place before and after the objects being linked to
842808c70cfbSmrg    create a shared library])
842908c70cfbSmrg_LT_TAGDECL([], [postdep_objects], [1])
843008c70cfbSmrg_LT_TAGDECL([], [predeps], [1])
843108c70cfbSmrg_LT_TAGDECL([], [postdeps], [1])
843208c70cfbSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
843308c70cfbSmrg    [The library search path used internally by the compiler when linking
843408c70cfbSmrg    a shared library])
843508c70cfbSmrg])# _LT_SYS_HIDDEN_LIBDEPS
8436602e473dSmrg
8437602e473dSmrg
843808c70cfbSmrg# _LT_LANG_F77_CONFIG([TAG])
843908c70cfbSmrg# --------------------------
844008c70cfbSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
844108c70cfbSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
844208c70cfbSmrg# to write the compiler configuration to `libtool'.
844308c70cfbSmrgm4_defun([_LT_LANG_F77_CONFIG],
844408c70cfbSmrg[AC_LANG_PUSH(Fortran 77)
844508c70cfbSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
844608c70cfbSmrg  _lt_disable_F77=yes
844708c70cfbSmrgfi
8448602e473dSmrg
844908c70cfbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
845008c70cfbSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
845108c70cfbSmrg_LT_TAGVAR(always_export_symbols, $1)=no
845208c70cfbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
845308c70cfbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
845408c70cfbSmrg_LT_TAGVAR(hardcode_direct, $1)=no
845508c70cfbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
845608c70cfbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
845708c70cfbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
845808c70cfbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
845908c70cfbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
846008c70cfbSmrg_LT_TAGVAR(inherit_rpath, $1)=no
846108c70cfbSmrg_LT_TAGVAR(module_cmds, $1)=
846208c70cfbSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
846308c70cfbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
846408c70cfbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
846508c70cfbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
846608c70cfbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
846708c70cfbSmrg_LT_TAGVAR(no_undefined_flag, $1)=
846808c70cfbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
846908c70cfbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8470602e473dSmrg
847108c70cfbSmrg# Source file extension for f77 test sources.
847208c70cfbSmrgac_ext=f
8473602e473dSmrg
847408c70cfbSmrg# Object file extension for compiled f77 test sources.
847508c70cfbSmrgobjext=o
847608c70cfbSmrg_LT_TAGVAR(objext, $1)=$objext
8477602e473dSmrg
847808c70cfbSmrg# No sense in running all these tests if we already determined that
847908c70cfbSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
848008c70cfbSmrg# are currently assumed to apply to all compilers on this platform,
848108c70cfbSmrg# and will be corrupted by setting them based on a non-working compiler.
848208c70cfbSmrgif test "$_lt_disable_F77" != yes; then
848308c70cfbSmrg  # Code to be used in simple compile tests
848408c70cfbSmrg  lt_simple_compile_test_code="\
848508c70cfbSmrg      subroutine t
848608c70cfbSmrg      return
848708c70cfbSmrg      end
848808c70cfbSmrg"
8489602e473dSmrg
849008c70cfbSmrg  # Code to be used in simple link tests
849108c70cfbSmrg  lt_simple_link_test_code="\
849208c70cfbSmrg      program t
849308c70cfbSmrg      end
849408c70cfbSmrg"
8495602e473dSmrg
849608c70cfbSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
849708c70cfbSmrg  _LT_TAG_COMPILER
8498602e473dSmrg
849908c70cfbSmrg  # save warnings/boilerplate of simple test code
850008c70cfbSmrg  _LT_COMPILER_BOILERPLATE
850108c70cfbSmrg  _LT_LINKER_BOILERPLATE
8502602e473dSmrg
850308c70cfbSmrg  # Allow CC to be a program name with arguments.
850408c70cfbSmrg  lt_save_CC="$CC"
850508c70cfbSmrg  lt_save_GCC=$GCC
850608c70cfbSmrg  lt_save_CFLAGS=$CFLAGS
850708c70cfbSmrg  CC=${F77-"f77"}
850808c70cfbSmrg  CFLAGS=$FFLAGS
850908c70cfbSmrg  compiler=$CC
851008c70cfbSmrg  _LT_TAGVAR(compiler, $1)=$CC
851108c70cfbSmrg  _LT_CC_BASENAME([$compiler])
851208c70cfbSmrg  GCC=$G77
851308c70cfbSmrg  if test -n "$compiler"; then
851408c70cfbSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
851508c70cfbSmrg    AC_MSG_RESULT([$can_build_shared])
8516602e473dSmrg
851708c70cfbSmrg    AC_MSG_CHECKING([whether to build shared libraries])
851808c70cfbSmrg    test "$can_build_shared" = "no" && enable_shared=no
8519602e473dSmrg
852008c70cfbSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
852108c70cfbSmrg    # are all built from PIC.
852208c70cfbSmrg    case $host_os in
852308c70cfbSmrg      aix3*)
852408c70cfbSmrg        test "$enable_shared" = yes && enable_static=no
852508c70cfbSmrg        if test -n "$RANLIB"; then
852608c70cfbSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
852708c70cfbSmrg          postinstall_cmds='$RANLIB $lib'
852808c70cfbSmrg        fi
852908c70cfbSmrg        ;;
853008c70cfbSmrg      aix[[4-9]]*)
853108c70cfbSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
853208c70cfbSmrg	  test "$enable_shared" = yes && enable_static=no
853308c70cfbSmrg	fi
853408c70cfbSmrg        ;;
853508c70cfbSmrg    esac
853608c70cfbSmrg    AC_MSG_RESULT([$enable_shared])
8537602e473dSmrg
853808c70cfbSmrg    AC_MSG_CHECKING([whether to build static libraries])
853908c70cfbSmrg    # Make sure either enable_shared or enable_static is yes.
854008c70cfbSmrg    test "$enable_shared" = yes || enable_static=yes
854108c70cfbSmrg    AC_MSG_RESULT([$enable_static])
8542602e473dSmrg
854308c70cfbSmrg    _LT_TAGVAR(GCC, $1)="$G77"
854408c70cfbSmrg    _LT_TAGVAR(LD, $1)="$LD"
8545602e473dSmrg
854608c70cfbSmrg    ## CAVEAT EMPTOR:
854708c70cfbSmrg    ## There is no encapsulation within the following macros, do not change
854808c70cfbSmrg    ## the running order or otherwise move them around unless you know exactly
854908c70cfbSmrg    ## what you are doing...
855008c70cfbSmrg    _LT_COMPILER_PIC($1)
855108c70cfbSmrg    _LT_COMPILER_C_O($1)
855208c70cfbSmrg    _LT_COMPILER_FILE_LOCKS($1)
855308c70cfbSmrg    _LT_LINKER_SHLIBS($1)
855408c70cfbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
855508c70cfbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8556602e473dSmrg
855708c70cfbSmrg    _LT_CONFIG($1)
855808c70cfbSmrg  fi # test -n "$compiler"
8559602e473dSmrg
856008c70cfbSmrg  GCC=$lt_save_GCC
856108c70cfbSmrg  CC="$lt_save_CC"
856208c70cfbSmrg  CFLAGS="$lt_save_CFLAGS"
856308c70cfbSmrgfi # test "$_lt_disable_F77" != yes
8564602e473dSmrg
856508c70cfbSmrgAC_LANG_POP
856608c70cfbSmrg])# _LT_LANG_F77_CONFIG
8567602e473dSmrg
8568602e473dSmrg
856908c70cfbSmrg# _LT_LANG_FC_CONFIG([TAG])
857008c70cfbSmrg# -------------------------
857108c70cfbSmrg# Ensure that the configuration variables for a Fortran compiler are
857208c70cfbSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
857308c70cfbSmrg# to write the compiler configuration to `libtool'.
857408c70cfbSmrgm4_defun([_LT_LANG_FC_CONFIG],
857508c70cfbSmrg[AC_LANG_PUSH(Fortran)
8576602e473dSmrg
857708c70cfbSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
857808c70cfbSmrg  _lt_disable_FC=yes
857908c70cfbSmrgfi
8580602e473dSmrg
858108c70cfbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
858208c70cfbSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
858308c70cfbSmrg_LT_TAGVAR(always_export_symbols, $1)=no
858408c70cfbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
858508c70cfbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
858608c70cfbSmrg_LT_TAGVAR(hardcode_direct, $1)=no
858708c70cfbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
858808c70cfbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
858908c70cfbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
859008c70cfbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
859108c70cfbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
859208c70cfbSmrg_LT_TAGVAR(inherit_rpath, $1)=no
859308c70cfbSmrg_LT_TAGVAR(module_cmds, $1)=
859408c70cfbSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
859508c70cfbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
859608c70cfbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
859708c70cfbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
859808c70cfbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
859908c70cfbSmrg_LT_TAGVAR(no_undefined_flag, $1)=
860008c70cfbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
860108c70cfbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8602602e473dSmrg
860308c70cfbSmrg# Source file extension for fc test sources.
860408c70cfbSmrgac_ext=${ac_fc_srcext-f}
8605602e473dSmrg
860608c70cfbSmrg# Object file extension for compiled fc test sources.
860708c70cfbSmrgobjext=o
860808c70cfbSmrg_LT_TAGVAR(objext, $1)=$objext
8609602e473dSmrg
861008c70cfbSmrg# No sense in running all these tests if we already determined that
861108c70cfbSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
861208c70cfbSmrg# are currently assumed to apply to all compilers on this platform,
861308c70cfbSmrg# and will be corrupted by setting them based on a non-working compiler.
861408c70cfbSmrgif test "$_lt_disable_FC" != yes; then
861508c70cfbSmrg  # Code to be used in simple compile tests
861608c70cfbSmrg  lt_simple_compile_test_code="\
861708c70cfbSmrg      subroutine t
861808c70cfbSmrg      return
861908c70cfbSmrg      end
862008c70cfbSmrg"
8621602e473dSmrg
862208c70cfbSmrg  # Code to be used in simple link tests
862308c70cfbSmrg  lt_simple_link_test_code="\
862408c70cfbSmrg      program t
862508c70cfbSmrg      end
862608c70cfbSmrg"
8627602e473dSmrg
862808c70cfbSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
862908c70cfbSmrg  _LT_TAG_COMPILER
8630602e473dSmrg
863108c70cfbSmrg  # save warnings/boilerplate of simple test code
863208c70cfbSmrg  _LT_COMPILER_BOILERPLATE
863308c70cfbSmrg  _LT_LINKER_BOILERPLATE
8634602e473dSmrg
863508c70cfbSmrg  # Allow CC to be a program name with arguments.
863608c70cfbSmrg  lt_save_CC="$CC"
863708c70cfbSmrg  lt_save_GCC=$GCC
863808c70cfbSmrg  lt_save_CFLAGS=$CFLAGS
863908c70cfbSmrg  CC=${FC-"f95"}
864008c70cfbSmrg  CFLAGS=$FCFLAGS
864108c70cfbSmrg  compiler=$CC
864208c70cfbSmrg  GCC=$ac_cv_fc_compiler_gnu
8643602e473dSmrg
864408c70cfbSmrg  _LT_TAGVAR(compiler, $1)=$CC
864508c70cfbSmrg  _LT_CC_BASENAME([$compiler])
8646602e473dSmrg
864708c70cfbSmrg  if test -n "$compiler"; then
864808c70cfbSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
864908c70cfbSmrg    AC_MSG_RESULT([$can_build_shared])
8650602e473dSmrg
865108c70cfbSmrg    AC_MSG_CHECKING([whether to build shared libraries])
865208c70cfbSmrg    test "$can_build_shared" = "no" && enable_shared=no
8653602e473dSmrg
865408c70cfbSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
865508c70cfbSmrg    # are all built from PIC.
865608c70cfbSmrg    case $host_os in
865708c70cfbSmrg      aix3*)
865808c70cfbSmrg        test "$enable_shared" = yes && enable_static=no
865908c70cfbSmrg        if test -n "$RANLIB"; then
866008c70cfbSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
866108c70cfbSmrg          postinstall_cmds='$RANLIB $lib'
866208c70cfbSmrg        fi
866308c70cfbSmrg        ;;
866408c70cfbSmrg      aix[[4-9]]*)
866508c70cfbSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
866608c70cfbSmrg	  test "$enable_shared" = yes && enable_static=no
866708c70cfbSmrg	fi
866808c70cfbSmrg        ;;
866908c70cfbSmrg    esac
867008c70cfbSmrg    AC_MSG_RESULT([$enable_shared])
8671602e473dSmrg
867208c70cfbSmrg    AC_MSG_CHECKING([whether to build static libraries])
867308c70cfbSmrg    # Make sure either enable_shared or enable_static is yes.
867408c70cfbSmrg    test "$enable_shared" = yes || enable_static=yes
867508c70cfbSmrg    AC_MSG_RESULT([$enable_static])
8676602e473dSmrg
867708c70cfbSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
867808c70cfbSmrg    _LT_TAGVAR(LD, $1)="$LD"
8679602e473dSmrg
868008c70cfbSmrg    ## CAVEAT EMPTOR:
868108c70cfbSmrg    ## There is no encapsulation within the following macros, do not change
868208c70cfbSmrg    ## the running order or otherwise move them around unless you know exactly
868308c70cfbSmrg    ## what you are doing...
868408c70cfbSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
868508c70cfbSmrg    _LT_COMPILER_PIC($1)
868608c70cfbSmrg    _LT_COMPILER_C_O($1)
868708c70cfbSmrg    _LT_COMPILER_FILE_LOCKS($1)
868808c70cfbSmrg    _LT_LINKER_SHLIBS($1)
868908c70cfbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
869008c70cfbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8691602e473dSmrg
869208c70cfbSmrg    _LT_CONFIG($1)
869308c70cfbSmrg  fi # test -n "$compiler"
8694602e473dSmrg
869508c70cfbSmrg  GCC=$lt_save_GCC
869608c70cfbSmrg  CC=$lt_save_CC
869708c70cfbSmrg  CFLAGS=$lt_save_CFLAGS
869808c70cfbSmrgfi # test "$_lt_disable_FC" != yes
8699602e473dSmrg
870008c70cfbSmrgAC_LANG_POP
870108c70cfbSmrg])# _LT_LANG_FC_CONFIG
8702602e473dSmrg
8703602e473dSmrg
870408c70cfbSmrg# _LT_LANG_GCJ_CONFIG([TAG])
870508c70cfbSmrg# --------------------------
870608c70cfbSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
870708c70cfbSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
870808c70cfbSmrg# to write the compiler configuration to `libtool'.
870908c70cfbSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
871008c70cfbSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
871108c70cfbSmrgAC_LANG_SAVE
8712602e473dSmrg
871308c70cfbSmrg# Source file extension for Java test sources.
871408c70cfbSmrgac_ext=java
8715602e473dSmrg
871608c70cfbSmrg# Object file extension for compiled Java test sources.
871708c70cfbSmrgobjext=o
871808c70cfbSmrg_LT_TAGVAR(objext, $1)=$objext
8719602e473dSmrg
872008c70cfbSmrg# Code to be used in simple compile tests
872108c70cfbSmrglt_simple_compile_test_code="class foo {}"
8722602e473dSmrg
872308c70cfbSmrg# Code to be used in simple link tests
872408c70cfbSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8725602e473dSmrg
872608c70cfbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
872708c70cfbSmrg_LT_TAG_COMPILER
8728602e473dSmrg
872908c70cfbSmrg# save warnings/boilerplate of simple test code
873008c70cfbSmrg_LT_COMPILER_BOILERPLATE
873108c70cfbSmrg_LT_LINKER_BOILERPLATE
8732602e473dSmrg
873308c70cfbSmrg# Allow CC to be a program name with arguments.
873408c70cfbSmrglt_save_CC=$CC
873508c70cfbSmrglt_save_CFLAGS=$CFLAGS
873608c70cfbSmrglt_save_GCC=$GCC
873708c70cfbSmrgGCC=yes
873808c70cfbSmrgCC=${GCJ-"gcj"}
873908c70cfbSmrgCFLAGS=$GCJFLAGS
874008c70cfbSmrgcompiler=$CC
874108c70cfbSmrg_LT_TAGVAR(compiler, $1)=$CC
874208c70cfbSmrg_LT_TAGVAR(LD, $1)="$LD"
874308c70cfbSmrg_LT_CC_BASENAME([$compiler])
8744602e473dSmrg
874508c70cfbSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
874608c70cfbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8747602e473dSmrg
874808c70cfbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
874908c70cfbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
875008c70cfbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8751602e473dSmrg
875208c70cfbSmrgif test -n "$compiler"; then
875308c70cfbSmrg  _LT_COMPILER_NO_RTTI($1)
875408c70cfbSmrg  _LT_COMPILER_PIC($1)
875508c70cfbSmrg  _LT_COMPILER_C_O($1)
875608c70cfbSmrg  _LT_COMPILER_FILE_LOCKS($1)
875708c70cfbSmrg  _LT_LINKER_SHLIBS($1)
875808c70cfbSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8759602e473dSmrg
876008c70cfbSmrg  _LT_CONFIG($1)
876108c70cfbSmrgfi
8762602e473dSmrg
876308c70cfbSmrgAC_LANG_RESTORE
8764602e473dSmrg
876508c70cfbSmrgGCC=$lt_save_GCC
876608c70cfbSmrgCC=$lt_save_CC
876708c70cfbSmrgCFLAGS=$lt_save_CFLAGS
876808c70cfbSmrg])# _LT_LANG_GCJ_CONFIG
8769602e473dSmrg
8770602e473dSmrg
877108c70cfbSmrg# _LT_LANG_GO_CONFIG([TAG])
877208c70cfbSmrg# --------------------------
877308c70cfbSmrg# Ensure that the configuration variables for the GNU Go compiler
877408c70cfbSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
877508c70cfbSmrg# to write the compiler configuration to `libtool'.
877608c70cfbSmrgm4_defun([_LT_LANG_GO_CONFIG],
877708c70cfbSmrg[AC_REQUIRE([LT_PROG_GO])dnl
877808c70cfbSmrgAC_LANG_SAVE
8779602e473dSmrg
878008c70cfbSmrg# Source file extension for Go test sources.
878108c70cfbSmrgac_ext=go
8782602e473dSmrg
878308c70cfbSmrg# Object file extension for compiled Go test sources.
878408c70cfbSmrgobjext=o
878508c70cfbSmrg_LT_TAGVAR(objext, $1)=$objext
8786602e473dSmrg
878708c70cfbSmrg# Code to be used in simple compile tests
878808c70cfbSmrglt_simple_compile_test_code="package main; func main() { }"
8789602e473dSmrg
879008c70cfbSmrg# Code to be used in simple link tests
879108c70cfbSmrglt_simple_link_test_code='package main; func main() { }'
8792602e473dSmrg
879308c70cfbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
879408c70cfbSmrg_LT_TAG_COMPILER
8795602e473dSmrg
879608c70cfbSmrg# save warnings/boilerplate of simple test code
879708c70cfbSmrg_LT_COMPILER_BOILERPLATE
879808c70cfbSmrg_LT_LINKER_BOILERPLATE
879908c70cfbSmrg
880008c70cfbSmrg# Allow CC to be a program name with arguments.
880108c70cfbSmrglt_save_CC=$CC
880208c70cfbSmrglt_save_CFLAGS=$CFLAGS
880308c70cfbSmrglt_save_GCC=$GCC
880408c70cfbSmrgGCC=yes
880508c70cfbSmrgCC=${GOC-"gccgo"}
880608c70cfbSmrgCFLAGS=$GOFLAGS
880708c70cfbSmrgcompiler=$CC
880808c70cfbSmrg_LT_TAGVAR(compiler, $1)=$CC
880908c70cfbSmrg_LT_TAGVAR(LD, $1)="$LD"
881008c70cfbSmrg_LT_CC_BASENAME([$compiler])
8811602e473dSmrg
881208c70cfbSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
881308c70cfbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8814602e473dSmrg
881508c70cfbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
881608c70cfbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
881708c70cfbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8818602e473dSmrg
881908c70cfbSmrgif test -n "$compiler"; then
882008c70cfbSmrg  _LT_COMPILER_NO_RTTI($1)
882108c70cfbSmrg  _LT_COMPILER_PIC($1)
882208c70cfbSmrg  _LT_COMPILER_C_O($1)
882308c70cfbSmrg  _LT_COMPILER_FILE_LOCKS($1)
882408c70cfbSmrg  _LT_LINKER_SHLIBS($1)
882508c70cfbSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8826602e473dSmrg
882708c70cfbSmrg  _LT_CONFIG($1)
882808c70cfbSmrgfi
8829602e473dSmrg
883008c70cfbSmrgAC_LANG_RESTORE
8831602e473dSmrg
883208c70cfbSmrgGCC=$lt_save_GCC
883308c70cfbSmrgCC=$lt_save_CC
883408c70cfbSmrgCFLAGS=$lt_save_CFLAGS
883508c70cfbSmrg])# _LT_LANG_GO_CONFIG
8836602e473dSmrg
8837602e473dSmrg
883808c70cfbSmrg# _LT_LANG_RC_CONFIG([TAG])
883908c70cfbSmrg# -------------------------
884008c70cfbSmrg# Ensure that the configuration variables for the Windows resource compiler
884108c70cfbSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
884208c70cfbSmrg# to write the compiler configuration to `libtool'.
884308c70cfbSmrgm4_defun([_LT_LANG_RC_CONFIG],
884408c70cfbSmrg[AC_REQUIRE([LT_PROG_RC])dnl
884508c70cfbSmrgAC_LANG_SAVE
8846602e473dSmrg
884708c70cfbSmrg# Source file extension for RC test sources.
884808c70cfbSmrgac_ext=rc
8849602e473dSmrg
885008c70cfbSmrg# Object file extension for compiled RC test sources.
885108c70cfbSmrgobjext=o
885208c70cfbSmrg_LT_TAGVAR(objext, $1)=$objext
8853602e473dSmrg
885408c70cfbSmrg# Code to be used in simple compile tests
885508c70cfbSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8856602e473dSmrg
885708c70cfbSmrg# Code to be used in simple link tests
885808c70cfbSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
8859602e473dSmrg
886008c70cfbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
886108c70cfbSmrg_LT_TAG_COMPILER
8862602e473dSmrg
886308c70cfbSmrg# save warnings/boilerplate of simple test code
886408c70cfbSmrg_LT_COMPILER_BOILERPLATE
886508c70cfbSmrg_LT_LINKER_BOILERPLATE
8866602e473dSmrg
886708c70cfbSmrg# Allow CC to be a program name with arguments.
886808c70cfbSmrglt_save_CC="$CC"
886908c70cfbSmrglt_save_CFLAGS=$CFLAGS
887008c70cfbSmrglt_save_GCC=$GCC
887108c70cfbSmrgGCC=
887208c70cfbSmrgCC=${RC-"windres"}
887308c70cfbSmrgCFLAGS=
887408c70cfbSmrgcompiler=$CC
887508c70cfbSmrg_LT_TAGVAR(compiler, $1)=$CC
887608c70cfbSmrg_LT_CC_BASENAME([$compiler])
887708c70cfbSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8878602e473dSmrg
887908c70cfbSmrgif test -n "$compiler"; then
888008c70cfbSmrg  :
888108c70cfbSmrg  _LT_CONFIG($1)
888208c70cfbSmrgfi
8883602e473dSmrg
888408c70cfbSmrgGCC=$lt_save_GCC
888508c70cfbSmrgAC_LANG_RESTORE
888608c70cfbSmrgCC=$lt_save_CC
888708c70cfbSmrgCFLAGS=$lt_save_CFLAGS
888808c70cfbSmrg])# _LT_LANG_RC_CONFIG
8889602e473dSmrg
8890602e473dSmrg
889108c70cfbSmrg# LT_PROG_GCJ
889208c70cfbSmrg# -----------
889308c70cfbSmrgAC_DEFUN([LT_PROG_GCJ],
889408c70cfbSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
889508c70cfbSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
889608c70cfbSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
889708c70cfbSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
889808c70cfbSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
889908c70cfbSmrg])
8900602e473dSmrg
890108c70cfbSmrg# Old name:
890208c70cfbSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
890308c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
890408c70cfbSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8905602e473dSmrg
8906602e473dSmrg
890708c70cfbSmrg# LT_PROG_GO
890808c70cfbSmrg# ----------
890908c70cfbSmrgAC_DEFUN([LT_PROG_GO],
891008c70cfbSmrg[AC_CHECK_TOOL(GOC, gccgo,)
891108c70cfbSmrg])
8912602e473dSmrg
8913602e473dSmrg
891408c70cfbSmrg# LT_PROG_RC
891508c70cfbSmrg# ----------
891608c70cfbSmrgAC_DEFUN([LT_PROG_RC],
891708c70cfbSmrg[AC_CHECK_TOOL(RC, windres,)
891808c70cfbSmrg])
8919b20a2039Smrg
892008c70cfbSmrg# Old name:
892108c70cfbSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
892208c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
892308c70cfbSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
8924602e473dSmrg
8925602e473dSmrg
892608c70cfbSmrg# _LT_DECL_EGREP
892708c70cfbSmrg# --------------
892808c70cfbSmrg# If we don't have a new enough Autoconf to choose the best grep
892908c70cfbSmrg# available, choose the one first in the user's PATH.
893008c70cfbSmrgm4_defun([_LT_DECL_EGREP],
893108c70cfbSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
893208c70cfbSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
893308c70cfbSmrgtest -z "$GREP" && GREP=grep
893408c70cfbSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
893508c70cfbSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
893608c70cfbSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
893708c70cfbSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
893808c70cfbSmrgAC_SUBST([GREP])
893908c70cfbSmrg])
8940602e473dSmrg
8941602e473dSmrg
894208c70cfbSmrg# _LT_DECL_OBJDUMP
894308c70cfbSmrg# --------------
894408c70cfbSmrg# If we don't have a new enough Autoconf to choose the best objdump
894508c70cfbSmrg# available, choose the one first in the user's PATH.
894608c70cfbSmrgm4_defun([_LT_DECL_OBJDUMP],
894708c70cfbSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
894808c70cfbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
894908c70cfbSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
895008c70cfbSmrgAC_SUBST([OBJDUMP])
895108c70cfbSmrg])
8952602e473dSmrg
895308c70cfbSmrg# _LT_DECL_DLLTOOL
895408c70cfbSmrg# ----------------
895508c70cfbSmrg# Ensure DLLTOOL variable is set.
895608c70cfbSmrgm4_defun([_LT_DECL_DLLTOOL],
895708c70cfbSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
895808c70cfbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
895908c70cfbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
896008c70cfbSmrgAC_SUBST([DLLTOOL])
896108c70cfbSmrg])
896208c70cfbSmrg
896308c70cfbSmrg# _LT_DECL_SED
896408c70cfbSmrg# ------------
896508c70cfbSmrg# Check for a fully-functional sed program, that truncates
896608c70cfbSmrg# as few characters as possible.  Prefer GNU sed if found.
896708c70cfbSmrgm4_defun([_LT_DECL_SED],
896808c70cfbSmrg[AC_PROG_SED
896908c70cfbSmrgtest -z "$SED" && SED=sed
897008c70cfbSmrgXsed="$SED -e 1s/^X//"
897108c70cfbSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
897208c70cfbSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
897308c70cfbSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
897408c70cfbSmrg])# _LT_DECL_SED
8975602e473dSmrg
897608c70cfbSmrgm4_ifndef([AC_PROG_SED], [
897708c70cfbSmrg# NOTE: This macro has been submitted for inclusion into   #
897808c70cfbSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
897908c70cfbSmrg#  a released version of Autoconf we should remove this    #
898008c70cfbSmrg#  macro and use it instead.                               #
8981602e473dSmrg
898208c70cfbSmrgm4_defun([AC_PROG_SED],
898308c70cfbSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
898408c70cfbSmrgAC_CACHE_VAL(lt_cv_path_SED,
898508c70cfbSmrg[# Loop through the user's path and test for sed and gsed.
898608c70cfbSmrg# Then use that list of sed's as ones to test for truncation.
898708c70cfbSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
898808c70cfbSmrgfor as_dir in $PATH
898908c70cfbSmrgdo
899008c70cfbSmrg  IFS=$as_save_IFS
899108c70cfbSmrg  test -z "$as_dir" && as_dir=.
899208c70cfbSmrg  for lt_ac_prog in sed gsed; do
899308c70cfbSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
899408c70cfbSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
899508c70cfbSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
899608c70cfbSmrg      fi
899708c70cfbSmrg    done
899808c70cfbSmrg  done
899908c70cfbSmrgdone
900008c70cfbSmrgIFS=$as_save_IFS
900108c70cfbSmrglt_ac_max=0
900208c70cfbSmrglt_ac_count=0
900308c70cfbSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
900408c70cfbSmrg# along with /bin/sed that truncates output.
900508c70cfbSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
900608c70cfbSmrg  test ! -f $lt_ac_sed && continue
900708c70cfbSmrg  cat /dev/null > conftest.in
900808c70cfbSmrg  lt_ac_count=0
900908c70cfbSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
901008c70cfbSmrg  # Check for GNU sed and select it if it is found.
901108c70cfbSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
901208c70cfbSmrg    lt_cv_path_SED=$lt_ac_sed
901308c70cfbSmrg    break
901408c70cfbSmrg  fi
901508c70cfbSmrg  while true; do
901608c70cfbSmrg    cat conftest.in conftest.in >conftest.tmp
901708c70cfbSmrg    mv conftest.tmp conftest.in
901808c70cfbSmrg    cp conftest.in conftest.nl
901908c70cfbSmrg    echo >>conftest.nl
902008c70cfbSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
902108c70cfbSmrg    cmp -s conftest.out conftest.nl || break
902208c70cfbSmrg    # 10000 chars as input seems more than enough
902308c70cfbSmrg    test $lt_ac_count -gt 10 && break
902408c70cfbSmrg    lt_ac_count=`expr $lt_ac_count + 1`
902508c70cfbSmrg    if test $lt_ac_count -gt $lt_ac_max; then
902608c70cfbSmrg      lt_ac_max=$lt_ac_count
902708c70cfbSmrg      lt_cv_path_SED=$lt_ac_sed
902808c70cfbSmrg    fi
902908c70cfbSmrg  done
903008c70cfbSmrgdone
903108c70cfbSmrg])
903208c70cfbSmrgSED=$lt_cv_path_SED
903308c70cfbSmrgAC_SUBST([SED])
903408c70cfbSmrgAC_MSG_RESULT([$SED])
903508c70cfbSmrg])#AC_PROG_SED
903608c70cfbSmrg])#m4_ifndef
9037602e473dSmrg
903808c70cfbSmrg# Old name:
903908c70cfbSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
904008c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
904108c70cfbSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
9042602e473dSmrg
9043602e473dSmrg
904408c70cfbSmrg# _LT_CHECK_SHELL_FEATURES
904508c70cfbSmrg# ------------------------
904608c70cfbSmrg# Find out whether the shell is Bourne or XSI compatible,
904708c70cfbSmrg# or has some other useful features.
904808c70cfbSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
904908c70cfbSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
905008c70cfbSmrg# Try some XSI features
905108c70cfbSmrgxsi_shell=no
905208c70cfbSmrg( _lt_dummy="a/b/c"
905308c70cfbSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
905408c70cfbSmrg      = c,a/b,b/c, \
905508c70cfbSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
905608c70cfbSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
905708c70cfbSmrg  && xsi_shell=yes
905808c70cfbSmrgAC_MSG_RESULT([$xsi_shell])
905908c70cfbSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9060602e473dSmrg
906108c70cfbSmrgAC_MSG_CHECKING([whether the shell understands "+="])
906208c70cfbSmrglt_shell_append=no
906308c70cfbSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
906408c70cfbSmrg    >/dev/null 2>&1 \
906508c70cfbSmrg  && lt_shell_append=yes
906608c70cfbSmrgAC_MSG_RESULT([$lt_shell_append])
906708c70cfbSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9068602e473dSmrg
906908c70cfbSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
907008c70cfbSmrg  lt_unset=unset
907108c70cfbSmrgelse
907208c70cfbSmrg  lt_unset=false
907308c70cfbSmrgfi
907408c70cfbSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9075602e473dSmrg
907608c70cfbSmrg# test EBCDIC or ASCII
907708c70cfbSmrgcase `echo X|tr X '\101'` in
907808c70cfbSmrg A) # ASCII based system
907908c70cfbSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
908008c70cfbSmrg  lt_SP2NL='tr \040 \012'
908108c70cfbSmrg  lt_NL2SP='tr \015\012 \040\040'
908208c70cfbSmrg  ;;
908308c70cfbSmrg *) # EBCDIC based system
908408c70cfbSmrg  lt_SP2NL='tr \100 \n'
908508c70cfbSmrg  lt_NL2SP='tr \r\n \100\100'
908608c70cfbSmrg  ;;
908708c70cfbSmrgesac
908808c70cfbSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
908908c70cfbSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
909008c70cfbSmrg])# _LT_CHECK_SHELL_FEATURES
9091602e473dSmrg
9092602e473dSmrg
909308c70cfbSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
909408c70cfbSmrg# ------------------------------------------------------
909508c70cfbSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
909608c70cfbSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
909708c70cfbSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
909808c70cfbSmrg[dnl {
909908c70cfbSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
910008c70cfbSmrg$1 ()\
910108c70cfbSmrg{\
910208c70cfbSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
910308c70cfbSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
910408c70cfbSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
910508c70cfbSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
910608c70cfbSmrgtest 0 -eq $? || _lt_function_replace_fail=:
910708c70cfbSmrg])
9108602e473dSmrg
9109602e473dSmrg
911008c70cfbSmrg# _LT_PROG_REPLACE_SHELLFNS
911108c70cfbSmrg# -------------------------
911208c70cfbSmrg# Replace existing portable implementations of several shell functions with
911308c70cfbSmrg# equivalent extended shell implementations where those features are available..
911408c70cfbSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
911508c70cfbSmrg[if test x"$xsi_shell" = xyes; then
911608c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
911708c70cfbSmrg    case ${1} in
911808c70cfbSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
911908c70cfbSmrg      *  ) func_dirname_result="${3}" ;;
912008c70cfbSmrg    esac])
912121298544Smrg
912208c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
912308c70cfbSmrg    func_basename_result="${1##*/}"])
9124602e473dSmrg
912508c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
912608c70cfbSmrg    case ${1} in
912708c70cfbSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
912808c70cfbSmrg      *  ) func_dirname_result="${3}" ;;
912908c70cfbSmrg    esac
913008c70cfbSmrg    func_basename_result="${1##*/}"])
9131602e473dSmrg
913208c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
913308c70cfbSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
913408c70cfbSmrg    # positional parameters, so assign one to ordinary parameter first.
913508c70cfbSmrg    func_stripname_result=${3}
913608c70cfbSmrg    func_stripname_result=${func_stripname_result#"${1}"}
913708c70cfbSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
9138602e473dSmrg
913908c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
914008c70cfbSmrg    func_split_long_opt_name=${1%%=*}
914108c70cfbSmrg    func_split_long_opt_arg=${1#*=}])
9142602e473dSmrg
914308c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
914408c70cfbSmrg    func_split_short_opt_arg=${1#??}
914508c70cfbSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9146602e473dSmrg
914708c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
914808c70cfbSmrg    case ${1} in
914908c70cfbSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
915008c70cfbSmrg      *)    func_lo2o_result=${1} ;;
915108c70cfbSmrg    esac])
915221298544Smrg
915308c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9154602e473dSmrg
915508c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9156602e473dSmrg
915708c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
915808c70cfbSmrgfi
9159602e473dSmrg
916008c70cfbSmrgif test x"$lt_shell_append" = xyes; then
916108c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9162602e473dSmrg
916308c70cfbSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
916408c70cfbSmrg    func_quote_for_eval "${2}"
916508c70cfbSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
916608c70cfbSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9167602e473dSmrg
916808c70cfbSmrg  # Save a `func_append' function call where possible by direct use of '+='
916908c70cfbSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
917008c70cfbSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
917108c70cfbSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
917208c70cfbSmrg  test 0 -eq $? || _lt_function_replace_fail=:
9173602e473dSmrgelse
917408c70cfbSmrg  # Save a `func_append' function call even when '+=' is not available
917508c70cfbSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
917608c70cfbSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
917708c70cfbSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
917808c70cfbSmrg  test 0 -eq $? || _lt_function_replace_fail=:
9179602e473dSmrgfi
9180602e473dSmrg
918108c70cfbSmrgif test x"$_lt_function_replace_fail" = x":"; then
918208c70cfbSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
918308c70cfbSmrgfi
918408c70cfbSmrg])
9185602e473dSmrg
918608c70cfbSmrg# _LT_PATH_CONVERSION_FUNCTIONS
918708c70cfbSmrg# -----------------------------
918808c70cfbSmrg# Determine which file name conversion functions should be used by
918908c70cfbSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
919008c70cfbSmrg# for certain cross-compile configurations and native mingw.
919108c70cfbSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
919208c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
919308c70cfbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
919408c70cfbSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
919508c70cfbSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
919608c70cfbSmrg[case $host in
919708c70cfbSmrg  *-*-mingw* )
919808c70cfbSmrg    case $build in
919908c70cfbSmrg      *-*-mingw* ) # actually msys
920008c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
920108c70cfbSmrg        ;;
920208c70cfbSmrg      *-*-cygwin* )
920308c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
920408c70cfbSmrg        ;;
920508c70cfbSmrg      * ) # otherwise, assume *nix
920608c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
920708c70cfbSmrg        ;;
920808c70cfbSmrg    esac
920908c70cfbSmrg    ;;
921008c70cfbSmrg  *-*-cygwin* )
921108c70cfbSmrg    case $build in
921208c70cfbSmrg      *-*-mingw* ) # actually msys
921308c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
921408c70cfbSmrg        ;;
921508c70cfbSmrg      *-*-cygwin* )
921608c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
921708c70cfbSmrg        ;;
921808c70cfbSmrg      * ) # otherwise, assume *nix
921908c70cfbSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
922008c70cfbSmrg        ;;
922108c70cfbSmrg    esac
922208c70cfbSmrg    ;;
922308c70cfbSmrg  * ) # unhandled hosts (and "normal" native builds)
922408c70cfbSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
922508c70cfbSmrg    ;;
922608c70cfbSmrgesac
922708c70cfbSmrg])
922808c70cfbSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
922908c70cfbSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
923008c70cfbSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
923108c70cfbSmrg         [0], [convert $build file names to $host format])dnl
9232602e473dSmrg
923308c70cfbSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
923408c70cfbSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
923508c70cfbSmrg[#assume ordinary cross tools, or native build.
923608c70cfbSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
923708c70cfbSmrgcase $host in
923808c70cfbSmrg  *-*-mingw* )
923908c70cfbSmrg    case $build in
924008c70cfbSmrg      *-*-mingw* ) # actually msys
924108c70cfbSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
924208c70cfbSmrg        ;;
924308c70cfbSmrg    esac
924408c70cfbSmrg    ;;
924508c70cfbSmrgesac
924608c70cfbSmrg])
924708c70cfbSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
924808c70cfbSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
924908c70cfbSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
925008c70cfbSmrg         [0], [convert $build files to toolchain format])dnl
925108c70cfbSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
9252602e473dSmrg
925308c70cfbSmrg# Helper functions for option handling.                    -*- Autoconf -*-
9254602e473dSmrg#
925508c70cfbSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
925608c70cfbSmrg#   Inc.
925708c70cfbSmrg#   Written by Gary V. Vaughan, 2004
925808c70cfbSmrg#
925908c70cfbSmrg# This file is free software; the Free Software Foundation gives
926008c70cfbSmrg# unlimited permission to copy and/or distribute it, with or without
926108c70cfbSmrg# modifications, as long as this notice is preserved.
9262602e473dSmrg
926308c70cfbSmrg# serial 7 ltoptions.m4
9264602e473dSmrg
926508c70cfbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
926608c70cfbSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9267602e473dSmrg
9268602e473dSmrg
926908c70cfbSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
927008c70cfbSmrg# ------------------------------------------
927108c70cfbSmrgm4_define([_LT_MANGLE_OPTION],
927208c70cfbSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9273602e473dSmrg
9274602e473dSmrg
927508c70cfbSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
927608c70cfbSmrg# ---------------------------------------
927708c70cfbSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
927808c70cfbSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
927908c70cfbSmrg# saved as a flag.
928008c70cfbSmrgm4_define([_LT_SET_OPTION],
928108c70cfbSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
928208c70cfbSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
928308c70cfbSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
928408c70cfbSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
9285602e473dSmrg])
9286602e473dSmrg
9287602e473dSmrg
928808c70cfbSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
928908c70cfbSmrg# ------------------------------------------------------------
929008c70cfbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
929108c70cfbSmrgm4_define([_LT_IF_OPTION],
929208c70cfbSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
929308c70cfbSmrg
929408c70cfbSmrg
929508c70cfbSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
929608c70cfbSmrg# -------------------------------------------------------
929708c70cfbSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
929808c70cfbSmrg# are set.
929908c70cfbSmrgm4_define([_LT_UNLESS_OPTIONS],
930008c70cfbSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
930108c70cfbSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
930208c70cfbSmrg		      [m4_define([$0_found])])])[]dnl
930308c70cfbSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
930408c70cfbSmrg])[]dnl
9305602e473dSmrg])
9306602e473dSmrg
9307602e473dSmrg
930808c70cfbSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
930908c70cfbSmrg# ----------------------------------------
931008c70cfbSmrg# OPTION-LIST is a space-separated list of Libtool options associated
931108c70cfbSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
931208c70cfbSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
931308c70cfbSmrg# the unknown option and exit.
931408c70cfbSmrgm4_defun([_LT_SET_OPTIONS],
931508c70cfbSmrg[# Set options
931608c70cfbSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
931708c70cfbSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
9318602e473dSmrg
931908c70cfbSmrgm4_if([$1],[LT_INIT],[
932008c70cfbSmrg  dnl
932108c70cfbSmrg  dnl Simply set some default values (i.e off) if boolean options were not
932208c70cfbSmrg  dnl specified:
932308c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
932408c70cfbSmrg  ])
932508c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
932608c70cfbSmrg  ])
932708c70cfbSmrg  dnl
932808c70cfbSmrg  dnl If no reference was made to various pairs of opposing options, then
932908c70cfbSmrg  dnl we run the default mode handler for the pair.  For example, if neither
933008c70cfbSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
933108c70cfbSmrg  dnl archives by default:
933208c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
933308c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
933408c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
933508c70cfbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
933608c70cfbSmrg  		   [_LT_ENABLE_FAST_INSTALL])
933708c70cfbSmrg  ])
933808c70cfbSmrg])# _LT_SET_OPTIONS
9339602e473dSmrg
9340602e473dSmrg
9341602e473dSmrg
934208c70cfbSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
934308c70cfbSmrg# -----------------------------------------
934408c70cfbSmrgm4_define([_LT_MANGLE_DEFUN],
934508c70cfbSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
934608c70cfbSmrg
934708c70cfbSmrg
934808c70cfbSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
934908c70cfbSmrg# -----------------------------------------------
935008c70cfbSmrgm4_define([LT_OPTION_DEFINE],
935108c70cfbSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
935208c70cfbSmrg])# LT_OPTION_DEFINE
935308c70cfbSmrg
935408c70cfbSmrg
935508c70cfbSmrg# dlopen
935608c70cfbSmrg# ------
935708c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9358602e473dSmrg])
9359602e473dSmrg
936008c70cfbSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
936108c70cfbSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
936208c70cfbSmrgAC_DIAGNOSE([obsolete],
936308c70cfbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
936408c70cfbSmrgput the `dlopen' option into LT_INIT's first parameter.])
936508c70cfbSmrg])
9366602e473dSmrg
936708c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
936808c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9369602e473dSmrg
9370602e473dSmrg
937108c70cfbSmrg# win32-dll
937208c70cfbSmrg# ---------
937308c70cfbSmrg# Declare package support for building win32 dll's.
937408c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
937508c70cfbSmrg[enable_win32_dll=yes
9376602e473dSmrg
937708c70cfbSmrgcase $host in
937808c70cfbSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
937908c70cfbSmrg  AC_CHECK_TOOL(AS, as, false)
938008c70cfbSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
938108c70cfbSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
938208c70cfbSmrg  ;;
938308c70cfbSmrgesac
9384602e473dSmrg
938508c70cfbSmrgtest -z "$AS" && AS=as
938608c70cfbSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
938708c70cfbSmrg
938808c70cfbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
938908c70cfbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
939008c70cfbSmrg
939108c70cfbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
939208c70cfbSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
939308c70cfbSmrg])# win32-dll
939408c70cfbSmrg
939508c70cfbSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
939608c70cfbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
939708c70cfbSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
939808c70cfbSmrgAC_DIAGNOSE([obsolete],
939908c70cfbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
940008c70cfbSmrgput the `win32-dll' option into LT_INIT's first parameter.])
940108c70cfbSmrg])
940208c70cfbSmrg
940308c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
940408c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
940508c70cfbSmrg
940608c70cfbSmrg
940708c70cfbSmrg# _LT_ENABLE_SHARED([DEFAULT])
940808c70cfbSmrg# ----------------------------
940908c70cfbSmrg# implement the --enable-shared flag, and supports the `shared' and
941008c70cfbSmrg# `disable-shared' LT_INIT options.
941108c70cfbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
941208c70cfbSmrgm4_define([_LT_ENABLE_SHARED],
941308c70cfbSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
941408c70cfbSmrgAC_ARG_ENABLE([shared],
941508c70cfbSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
941608c70cfbSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
941708c70cfbSmrg    [p=${PACKAGE-default}
941808c70cfbSmrg    case $enableval in
941908c70cfbSmrg    yes) enable_shared=yes ;;
942008c70cfbSmrg    no) enable_shared=no ;;
942108c70cfbSmrg    *)
942208c70cfbSmrg      enable_shared=no
942308c70cfbSmrg      # Look at the argument we got.  We use all the common list separators.
942408c70cfbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
942508c70cfbSmrg      for pkg in $enableval; do
942608c70cfbSmrg	IFS="$lt_save_ifs"
942708c70cfbSmrg	if test "X$pkg" = "X$p"; then
942808c70cfbSmrg	  enable_shared=yes
942908c70cfbSmrg	fi
943008c70cfbSmrg      done
943108c70cfbSmrg      IFS="$lt_save_ifs"
943208c70cfbSmrg      ;;
943308c70cfbSmrg    esac],
943408c70cfbSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9435602e473dSmrg
943608c70cfbSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
943708c70cfbSmrg	[Whether or not to build shared libraries])
943808c70cfbSmrg])# _LT_ENABLE_SHARED
9439602e473dSmrg
944008c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
944108c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9442602e473dSmrg
944308c70cfbSmrg# Old names:
944408c70cfbSmrgAC_DEFUN([AC_ENABLE_SHARED],
944508c70cfbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9446602e473dSmrg])
944708c70cfbSmrg
944808c70cfbSmrgAC_DEFUN([AC_DISABLE_SHARED],
944908c70cfbSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
9450602e473dSmrg])
9451602e473dSmrg
945208c70cfbSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
945308c70cfbSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9454602e473dSmrg
945508c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
945608c70cfbSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
945708c70cfbSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
9458602e473dSmrg
9459602e473dSmrg
9460602e473dSmrg
946108c70cfbSmrg# _LT_ENABLE_STATIC([DEFAULT])
946208c70cfbSmrg# ----------------------------
946308c70cfbSmrg# implement the --enable-static flag, and support the `static' and
946408c70cfbSmrg# `disable-static' LT_INIT options.
946508c70cfbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
946608c70cfbSmrgm4_define([_LT_ENABLE_STATIC],
946708c70cfbSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
946808c70cfbSmrgAC_ARG_ENABLE([static],
946908c70cfbSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
947008c70cfbSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
947108c70cfbSmrg    [p=${PACKAGE-default}
947208c70cfbSmrg    case $enableval in
947308c70cfbSmrg    yes) enable_static=yes ;;
947408c70cfbSmrg    no) enable_static=no ;;
947508c70cfbSmrg    *)
947608c70cfbSmrg     enable_static=no
947708c70cfbSmrg      # Look at the argument we got.  We use all the common list separators.
947808c70cfbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
947908c70cfbSmrg      for pkg in $enableval; do
948008c70cfbSmrg	IFS="$lt_save_ifs"
948108c70cfbSmrg	if test "X$pkg" = "X$p"; then
948208c70cfbSmrg	  enable_static=yes
948308c70cfbSmrg	fi
948408c70cfbSmrg      done
948508c70cfbSmrg      IFS="$lt_save_ifs"
948608c70cfbSmrg      ;;
948708c70cfbSmrg    esac],
948808c70cfbSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9489602e473dSmrg
949008c70cfbSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
949108c70cfbSmrg	[Whether or not to build static libraries])
949208c70cfbSmrg])# _LT_ENABLE_STATIC
949321298544Smrg
949408c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
949508c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9496602e473dSmrg
949708c70cfbSmrg# Old names:
949808c70cfbSmrgAC_DEFUN([AC_ENABLE_STATIC],
949908c70cfbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
950008c70cfbSmrg])
9501602e473dSmrg
950208c70cfbSmrgAC_DEFUN([AC_DISABLE_STATIC],
950308c70cfbSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
950408c70cfbSmrg])
9505602e473dSmrg
950608c70cfbSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
950708c70cfbSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9508602e473dSmrg
950908c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
951008c70cfbSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
951108c70cfbSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
9512602e473dSmrg
9513602e473dSmrg
9514602e473dSmrg
951508c70cfbSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
951608c70cfbSmrg# ----------------------------------
951708c70cfbSmrg# implement the --enable-fast-install flag, and support the `fast-install'
951808c70cfbSmrg# and `disable-fast-install' LT_INIT options.
951908c70cfbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
952008c70cfbSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
952108c70cfbSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
952208c70cfbSmrgAC_ARG_ENABLE([fast-install],
952308c70cfbSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
952408c70cfbSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
952508c70cfbSmrg    [p=${PACKAGE-default}
952608c70cfbSmrg    case $enableval in
952708c70cfbSmrg    yes) enable_fast_install=yes ;;
952808c70cfbSmrg    no) enable_fast_install=no ;;
952908c70cfbSmrg    *)
953008c70cfbSmrg      enable_fast_install=no
953108c70cfbSmrg      # Look at the argument we got.  We use all the common list separators.
953208c70cfbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
953308c70cfbSmrg      for pkg in $enableval; do
953408c70cfbSmrg	IFS="$lt_save_ifs"
953508c70cfbSmrg	if test "X$pkg" = "X$p"; then
953608c70cfbSmrg	  enable_fast_install=yes
953708c70cfbSmrg	fi
953808c70cfbSmrg      done
953908c70cfbSmrg      IFS="$lt_save_ifs"
954008c70cfbSmrg      ;;
954108c70cfbSmrg    esac],
954208c70cfbSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
954308c70cfbSmrg
954408c70cfbSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
954508c70cfbSmrg	 [Whether or not to optimize for fast installation])dnl
954608c70cfbSmrg])# _LT_ENABLE_FAST_INSTALL
954708c70cfbSmrg
954808c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
954908c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
955008c70cfbSmrg
955108c70cfbSmrg# Old names:
955208c70cfbSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
955308c70cfbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
955408c70cfbSmrgAC_DIAGNOSE([obsolete],
955508c70cfbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
955608c70cfbSmrgthe `fast-install' option into LT_INIT's first parameter.])
955708c70cfbSmrg])
955808c70cfbSmrg
955908c70cfbSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
956008c70cfbSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
956108c70cfbSmrgAC_DIAGNOSE([obsolete],
956208c70cfbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
956308c70cfbSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
9564602e473dSmrg])
9565602e473dSmrg
956608c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
956708c70cfbSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
956808c70cfbSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
956908c70cfbSmrg
9570602e473dSmrg
957108c70cfbSmrg# _LT_WITH_PIC([MODE])
957208c70cfbSmrg# --------------------
957308c70cfbSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
957408c70cfbSmrg# LT_INIT options.
957508c70cfbSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
957608c70cfbSmrgm4_define([_LT_WITH_PIC],
957708c70cfbSmrg[AC_ARG_WITH([pic],
957808c70cfbSmrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
957908c70cfbSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
958008c70cfbSmrg    [lt_p=${PACKAGE-default}
958108c70cfbSmrg    case $withval in
958208c70cfbSmrg    yes|no) pic_mode=$withval ;;
958308c70cfbSmrg    *)
958408c70cfbSmrg      pic_mode=default
958508c70cfbSmrg      # Look at the argument we got.  We use all the common list separators.
958608c70cfbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
958708c70cfbSmrg      for lt_pkg in $withval; do
958808c70cfbSmrg	IFS="$lt_save_ifs"
958908c70cfbSmrg	if test "X$lt_pkg" = "X$lt_p"; then
959008c70cfbSmrg	  pic_mode=yes
959108c70cfbSmrg	fi
959208c70cfbSmrg      done
959308c70cfbSmrg      IFS="$lt_save_ifs"
959408c70cfbSmrg      ;;
959508c70cfbSmrg    esac],
959608c70cfbSmrg    [pic_mode=default])
9597602e473dSmrg
959808c70cfbSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9599602e473dSmrg
960008c70cfbSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
960108c70cfbSmrg])# _LT_WITH_PIC
9602602e473dSmrg
960308c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
960408c70cfbSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9605602e473dSmrg
960608c70cfbSmrg# Old name:
960708c70cfbSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
960808c70cfbSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
960908c70cfbSmrgAC_DIAGNOSE([obsolete],
961008c70cfbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
961108c70cfbSmrgput the `pic-only' option into LT_INIT's first parameter.])
9612602e473dSmrg])
9613602e473dSmrg
961408c70cfbSmrgdnl aclocal-1.4 backwards compatibility:
961508c70cfbSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9616602e473dSmrg
961721298544Smrg
961808c70cfbSmrgm4_define([_LTDL_MODE], [])
961908c70cfbSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
962008c70cfbSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
962108c70cfbSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
962208c70cfbSmrg		 [m4_define([_LTDL_MODE], [recursive])])
962308c70cfbSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
962408c70cfbSmrg		 [m4_define([_LTDL_MODE], [subproject])])
9625602e473dSmrg
962608c70cfbSmrgm4_define([_LTDL_TYPE], [])
962708c70cfbSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
962808c70cfbSmrg		 [m4_define([_LTDL_TYPE], [installable])])
962908c70cfbSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
963008c70cfbSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
9631602e473dSmrg
963208c70cfbSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9633602e473dSmrg#
963408c70cfbSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
963508c70cfbSmrg# Written by Gary V. Vaughan, 2004
963608c70cfbSmrg#
963708c70cfbSmrg# This file is free software; the Free Software Foundation gives
963808c70cfbSmrg# unlimited permission to copy and/or distribute it, with or without
963908c70cfbSmrg# modifications, as long as this notice is preserved.
9640602e473dSmrg
964108c70cfbSmrg# serial 6 ltsugar.m4
9642602e473dSmrg
964308c70cfbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
964408c70cfbSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9645602e473dSmrg
9646602e473dSmrg
964708c70cfbSmrg# lt_join(SEP, ARG1, [ARG2...])
964808c70cfbSmrg# -----------------------------
964908c70cfbSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
965008c70cfbSmrg# associated separator.
965108c70cfbSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
965208c70cfbSmrg# versions in m4sugar had bugs.
965308c70cfbSmrgm4_define([lt_join],
965408c70cfbSmrg[m4_if([$#], [1], [],
965508c70cfbSmrg       [$#], [2], [[$2]],
965608c70cfbSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
965708c70cfbSmrgm4_define([_lt_join],
965808c70cfbSmrg[m4_if([$#$2], [2], [],
965908c70cfbSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9660602e473dSmrg
9661602e473dSmrg
966208c70cfbSmrg# lt_car(LIST)
966308c70cfbSmrg# lt_cdr(LIST)
966408c70cfbSmrg# ------------
966508c70cfbSmrg# Manipulate m4 lists.
966608c70cfbSmrg# These macros are necessary as long as will still need to support
966708c70cfbSmrg# Autoconf-2.59 which quotes differently.
966808c70cfbSmrgm4_define([lt_car], [[$1]])
966908c70cfbSmrgm4_define([lt_cdr],
967008c70cfbSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
967108c70cfbSmrg       [$#], 1, [],
967208c70cfbSmrg       [m4_dquote(m4_shift($@))])])
967308c70cfbSmrgm4_define([lt_unquote], $1)
9674602e473dSmrg
967521298544Smrg
967608c70cfbSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
967708c70cfbSmrg# ------------------------------------------
967808c70cfbSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
967908c70cfbSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
968008c70cfbSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
968108c70cfbSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
968208c70cfbSmrg# than defined and empty).
9683602e473dSmrg#
968408c70cfbSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
968508c70cfbSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
968608c70cfbSmrgm4_define([lt_append],
968708c70cfbSmrg[m4_define([$1],
968808c70cfbSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9689602e473dSmrg
9690602e473dSmrg
9691602e473dSmrg
969208c70cfbSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
969308c70cfbSmrg# ----------------------------------------------------------
969408c70cfbSmrg# Produce a SEP delimited list of all paired combinations of elements of
969508c70cfbSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
969608c70cfbSmrg# has the form PREFIXmINFIXSUFFIXn.
969708c70cfbSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
969808c70cfbSmrgm4_define([lt_combine],
969908c70cfbSmrg[m4_if(m4_eval([$# > 3]), [1],
970008c70cfbSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
970108c70cfbSmrg[[m4_foreach([_Lt_prefix], [$2],
970208c70cfbSmrg	     [m4_foreach([_Lt_suffix],
970308c70cfbSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
970408c70cfbSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9705602e473dSmrg
9706602e473dSmrg
970708c70cfbSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
970808c70cfbSmrg# -----------------------------------------------------------------------
970908c70cfbSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
971008c70cfbSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
971108c70cfbSmrgm4_define([lt_if_append_uniq],
971208c70cfbSmrg[m4_ifdef([$1],
971308c70cfbSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
971408c70cfbSmrg		 [lt_append([$1], [$2], [$3])$4],
971508c70cfbSmrg		 [$5])],
971608c70cfbSmrg	  [lt_append([$1], [$2], [$3])$4])])
9717602e473dSmrg
9718602e473dSmrg
971908c70cfbSmrg# lt_dict_add(DICT, KEY, VALUE)
972008c70cfbSmrg# -----------------------------
972108c70cfbSmrgm4_define([lt_dict_add],
972208c70cfbSmrg[m4_define([$1($2)], [$3])])
9723602e473dSmrg
9724602e473dSmrg
972508c70cfbSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
972608c70cfbSmrg# --------------------------------------------
972708c70cfbSmrgm4_define([lt_dict_add_subkey],
972808c70cfbSmrg[m4_define([$1($2:$3)], [$4])])
9729602e473dSmrg
9730602e473dSmrg
973108c70cfbSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
973208c70cfbSmrg# ----------------------------------
973308c70cfbSmrgm4_define([lt_dict_fetch],
973408c70cfbSmrg[m4_ifval([$3],
973508c70cfbSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
973608c70cfbSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9737602e473dSmrg
9738602e473dSmrg
973908c70cfbSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
974008c70cfbSmrg# -----------------------------------------------------------------
974108c70cfbSmrgm4_define([lt_if_dict_fetch],
974208c70cfbSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
974308c70cfbSmrg	[$5],
974408c70cfbSmrg    [$6])])
9745602e473dSmrg
9746602e473dSmrg
974708c70cfbSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
974808c70cfbSmrg# --------------------------------------------------------------
974908c70cfbSmrgm4_define([lt_dict_filter],
975008c70cfbSmrg[m4_if([$5], [], [],
975108c70cfbSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
975208c70cfbSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
975308c70cfbSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
975408c70cfbSmrg])
9755602e473dSmrg
975608c70cfbSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
975708c70cfbSmrg#
975808c70cfbSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
975908c70cfbSmrg#   Written by Scott James Remnant, 2004
976008c70cfbSmrg#
976108c70cfbSmrg# This file is free software; the Free Software Foundation gives
976208c70cfbSmrg# unlimited permission to copy and/or distribute it, with or without
976308c70cfbSmrg# modifications, as long as this notice is preserved.
9764602e473dSmrg
976508c70cfbSmrg# @configure_input@
9766602e473dSmrg
976708c70cfbSmrg# serial 3337 ltversion.m4
976808c70cfbSmrg# This file is part of GNU Libtool
9769602e473dSmrg
977008c70cfbSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2])
977108c70cfbSmrgm4_define([LT_PACKAGE_REVISION], [1.3337])
9772602e473dSmrg
977308c70cfbSmrgAC_DEFUN([LTVERSION_VERSION],
977408c70cfbSmrg[macro_version='2.4.2'
977508c70cfbSmrgmacro_revision='1.3337'
977608c70cfbSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
977708c70cfbSmrg_LT_DECL(, macro_revision, 0)
977808c70cfbSmrg])
9779602e473dSmrg
978008c70cfbSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9781602e473dSmrg#
978208c70cfbSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
978308c70cfbSmrg#   Written by Scott James Remnant, 2004.
978408c70cfbSmrg#
978508c70cfbSmrg# This file is free software; the Free Software Foundation gives
978608c70cfbSmrg# unlimited permission to copy and/or distribute it, with or without
978708c70cfbSmrg# modifications, as long as this notice is preserved.
9788602e473dSmrg
978908c70cfbSmrg# serial 5 lt~obsolete.m4
9790602e473dSmrg
979108c70cfbSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
9792602e473dSmrg#
979308c70cfbSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
979408c70cfbSmrg# which have later been changed to m4_define as they aren't part of the
979508c70cfbSmrg# exported API, or moved to Autoconf or Automake where they belong.
979608c70cfbSmrg#
979708c70cfbSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
979808c70cfbSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
979908c70cfbSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
980008c70cfbSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
980108c70cfbSmrg# and doesn't know about Autoconf macros at all.)
980208c70cfbSmrg#
980308c70cfbSmrg# So we provide this file, which has a silly filename so it's always
980408c70cfbSmrg# included after everything else.  This provides aclocal with the
980508c70cfbSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
980608c70cfbSmrg# because those macros already exist, or will be overwritten later.
980708c70cfbSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
980808c70cfbSmrg#
980908c70cfbSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
981008c70cfbSmrg# Yes, that means every name once taken will need to remain here until
981108c70cfbSmrg# we give up compatibility with versions before 1.7, at which point
981208c70cfbSmrg# we need to keep only those names which we still refer to.
9813602e473dSmrg
981408c70cfbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
981508c70cfbSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9816602e473dSmrg
981708c70cfbSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
981808c70cfbSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
981908c70cfbSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
982008c70cfbSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
982108c70cfbSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
982208c70cfbSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
982308c70cfbSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
982408c70cfbSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
982508c70cfbSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
982608c70cfbSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
982708c70cfbSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
982808c70cfbSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
982908c70cfbSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
983008c70cfbSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
983108c70cfbSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
983208c70cfbSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
983308c70cfbSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
983408c70cfbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
983508c70cfbSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
983608c70cfbSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
983708c70cfbSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
983808c70cfbSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
983908c70cfbSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
984008c70cfbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
984108c70cfbSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
984208c70cfbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
984308c70cfbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
984408c70cfbSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
984508c70cfbSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
984608c70cfbSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
984708c70cfbSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
984808c70cfbSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
984908c70cfbSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
985008c70cfbSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
985108c70cfbSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
985208c70cfbSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
985308c70cfbSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
985408c70cfbSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
985508c70cfbSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
985608c70cfbSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
985708c70cfbSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
985808c70cfbSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
985908c70cfbSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
986008c70cfbSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
986108c70cfbSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
986208c70cfbSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
986308c70cfbSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
986408c70cfbSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
986508c70cfbSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
986608c70cfbSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
986708c70cfbSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
986808c70cfbSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
986908c70cfbSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
987008c70cfbSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
987108c70cfbSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
987208c70cfbSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
987308c70cfbSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
987408c70cfbSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
987508c70cfbSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
987608c70cfbSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
987708c70cfbSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9878602e473dSmrg
987908c70cfbSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
988008c70cfbSmrg# 
988108c70cfbSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
988208c70cfbSmrg#
988308c70cfbSmrg# This program is free software; you can redistribute it and/or modify
988408c70cfbSmrg# it under the terms of the GNU General Public License as published by
988508c70cfbSmrg# the Free Software Foundation; either version 2 of the License, or
988608c70cfbSmrg# (at your option) any later version.
988708c70cfbSmrg#
988808c70cfbSmrg# This program is distributed in the hope that it will be useful, but
988908c70cfbSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
989008c70cfbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
989108c70cfbSmrg# General Public License for more details.
989208c70cfbSmrg#
989308c70cfbSmrg# You should have received a copy of the GNU General Public License
989408c70cfbSmrg# along with this program; if not, write to the Free Software
989508c70cfbSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
989608c70cfbSmrg#
989708c70cfbSmrg# As a special exception to the GNU General Public License, if you
989808c70cfbSmrg# distribute this file as part of a program that contains a
989908c70cfbSmrg# configuration script generated by Autoconf, you may include it under
990008c70cfbSmrg# the same distribution terms that you use for the rest of that program.
9901602e473dSmrg
990208c70cfbSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
990308c70cfbSmrg# ----------------------------------
990408c70cfbSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
990508c70cfbSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
990608c70cfbSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
990708c70cfbSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
990808c70cfbSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
990908c70cfbSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9910602e473dSmrgfi
991108c70cfbSmrgif test -n "$PKG_CONFIG"; then
991208c70cfbSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
991308c70cfbSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
991408c70cfbSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
991508c70cfbSmrg		AC_MSG_RESULT([yes])
991608c70cfbSmrg	else
991708c70cfbSmrg		AC_MSG_RESULT([no])
991808c70cfbSmrg		PKG_CONFIG=""
991908c70cfbSmrg	fi
992008c70cfbSmrg		
992108c70cfbSmrgfi[]dnl
992208c70cfbSmrg])# PKG_PROG_PKG_CONFIG
9923602e473dSmrg
992408c70cfbSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
992521298544Smrg#
992608c70cfbSmrg# Check to see whether a particular set of modules exists.  Similar
992708c70cfbSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
992808c70cfbSmrg#
992908c70cfbSmrg#
993008c70cfbSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
993108c70cfbSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
993208c70cfbSmrg# PKG_CHECK_EXISTS manually
993308c70cfbSmrg# --------------------------------------------------------------
993408c70cfbSmrgAC_DEFUN([PKG_CHECK_EXISTS],
993508c70cfbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
993608c70cfbSmrgif test -n "$PKG_CONFIG" && \
993708c70cfbSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
993808c70cfbSmrg  m4_ifval([$2], [$2], [:])
993908c70cfbSmrgm4_ifvaln([$3], [else
994008c70cfbSmrg  $3])dnl
994121298544Smrgfi])
994221298544Smrg
9943602e473dSmrg
994408c70cfbSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
994508c70cfbSmrg# ---------------------------------------------
994608c70cfbSmrgm4_define([_PKG_CONFIG],
994708c70cfbSmrg[if test -n "$$1"; then
994808c70cfbSmrg    pkg_cv_[]$1="$$1"
994908c70cfbSmrg elif test -n "$PKG_CONFIG"; then
995008c70cfbSmrg    PKG_CHECK_EXISTS([$3],
995108c70cfbSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
995208c70cfbSmrg		     [pkg_failed=yes])
995308c70cfbSmrg else
995408c70cfbSmrg    pkg_failed=untried
995508c70cfbSmrgfi[]dnl
995608c70cfbSmrg])# _PKG_CONFIG
995708c70cfbSmrg
995808c70cfbSmrg# _PKG_SHORT_ERRORS_SUPPORTED
995908c70cfbSmrg# -----------------------------
996008c70cfbSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
996108c70cfbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
996208c70cfbSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
996308c70cfbSmrg        _pkg_short_errors_supported=yes
996408c70cfbSmrgelse
996508c70cfbSmrg        _pkg_short_errors_supported=no
996608c70cfbSmrgfi[]dnl
996708c70cfbSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
996821298544Smrg
9969602e473dSmrg
997008c70cfbSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
997108c70cfbSmrg# [ACTION-IF-NOT-FOUND])
9972602e473dSmrg#
997308c70cfbSmrg#
997408c70cfbSmrg# Note that if there is a possibility the first call to
997508c70cfbSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
997608c70cfbSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
997708c70cfbSmrg#
997808c70cfbSmrg#
997908c70cfbSmrg# --------------------------------------------------------------
998008c70cfbSmrgAC_DEFUN([PKG_CHECK_MODULES],
998108c70cfbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
998208c70cfbSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
998308c70cfbSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9984602e473dSmrg
998508c70cfbSmrgpkg_failed=no
998608c70cfbSmrgAC_MSG_CHECKING([for $1])
9987602e473dSmrg
998808c70cfbSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
998908c70cfbSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9990602e473dSmrg
999108c70cfbSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
999208c70cfbSmrgand $1[]_LIBS to avoid the need to call pkg-config.
999308c70cfbSmrgSee the pkg-config man page for more details.])
9994602e473dSmrg
999508c70cfbSmrgif test $pkg_failed = yes; then
999608c70cfbSmrg        _PKG_SHORT_ERRORS_SUPPORTED
999708c70cfbSmrg        if test $_pkg_short_errors_supported = yes; then
999808c70cfbSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
999908c70cfbSmrg        else 
1000008c70cfbSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1000108c70cfbSmrg        fi
1000208c70cfbSmrg	# Put the nasty error message in config.log where it belongs
1000308c70cfbSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10004602e473dSmrg
1000508c70cfbSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
1000608c70cfbSmrg[Package requirements ($2) were not met:
10007602e473dSmrg
1000808c70cfbSmrg$$1_PKG_ERRORS
10009602e473dSmrg
1001008c70cfbSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
1001108c70cfbSmrginstalled software in a non-standard prefix.
10012602e473dSmrg
1001308c70cfbSmrg_PKG_TEXT
1001408c70cfbSmrg])],
1001508c70cfbSmrg		[AC_MSG_RESULT([no])
1001608c70cfbSmrg                $4])
1001708c70cfbSmrgelif test $pkg_failed = untried; then
1001808c70cfbSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
1001908c70cfbSmrg[The pkg-config script could not be found or is too old.  Make sure it
1002008c70cfbSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
1002108c70cfbSmrgpath to pkg-config.
10022602e473dSmrg
1002308c70cfbSmrg_PKG_TEXT
10024602e473dSmrg
1002508c70cfbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1002608c70cfbSmrg		[$4])
1002708c70cfbSmrgelse
1002808c70cfbSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1002908c70cfbSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1003008c70cfbSmrg        AC_MSG_RESULT([yes])
1003108c70cfbSmrg	ifelse([$3], , :, [$3])
1003208c70cfbSmrgfi[]dnl
1003308c70cfbSmrg])# PKG_CHECK_MODULES
10034602e473dSmrg
10035602e473dSmrgm4_include([acinclude.m4])
10036