aclocal.m4 revision 39713583
139713583Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
295b296d0Smrg
395b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ff89ac2bSmrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
595b296d0Smrg# This file is free software; the Free Software Foundation
695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
795b296d0Smrg# with or without modifications, as long as this notice is preserved.
895b296d0Smrg
995b296d0Smrg# This program is distributed in the hope that it will be useful,
1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1295b296d0Smrg# PARTICULAR PURPOSE.
1395b296d0Smrg
14ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15ff89ac2bSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1639713583Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17ff89ac2bSmrg[m4_warning([this file was generated for autoconf 2.63.
18ff89ac2bSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19ff89ac2bSmrgIf you have problems, you may need to regenerate the build system entirely.
20ff89ac2bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21ff89ac2bSmrg
2295b296d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2339713583Smrg#
2439713583Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2539713583Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
2639713583Smrg#   Written by Gordon Matzigkeit, 1996
2739713583Smrg#
2839713583Smrg# This file is free software; the Free Software Foundation gives
2939713583Smrg# unlimited permission to copy and/or distribute it, with or without
3039713583Smrg# modifications, as long as this notice is preserved.
3139713583Smrg
3239713583Smrgm4_define([_LT_COPYING], [dnl
3339713583Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3439713583Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
3539713583Smrg#   Written by Gordon Matzigkeit, 1996
3639713583Smrg#
3739713583Smrg#   This file is part of GNU Libtool.
3839713583Smrg#
3939713583Smrg# GNU Libtool is free software; you can redistribute it and/or
4039713583Smrg# modify it under the terms of the GNU General Public License as
4139713583Smrg# published by the Free Software Foundation; either version 2 of
4239713583Smrg# the License, or (at your option) any later version.
4339713583Smrg#
4439713583Smrg# As a special exception to the GNU General Public License,
4539713583Smrg# if you distribute this file as part of a program or library that
4639713583Smrg# is built using GNU Libtool, you may include this file under the
4739713583Smrg# same distribution terms that you use for the rest of that program.
4839713583Smrg#
4939713583Smrg# GNU Libtool is distributed in the hope that it will be useful,
5039713583Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
5139713583Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5239713583Smrg# GNU General Public License for more details.
5339713583Smrg#
5439713583Smrg# You should have received a copy of the GNU General Public License
5539713583Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
5639713583Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
5739713583Smrg# obtained by writing to the Free Software Foundation, Inc.,
5839713583Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5939713583Smrg])
6095b296d0Smrg
6139713583Smrg# serial 56 LT_INIT
6295b296d0Smrg
6395b296d0Smrg
6439713583Smrg# LT_PREREQ(VERSION)
6539713583Smrg# ------------------
6639713583Smrg# Complain and exit if this libtool version is less that VERSION.
6739713583Smrgm4_defun([LT_PREREQ],
6839713583Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
6939713583Smrg       [m4_default([$3],
7039713583Smrg		   [m4_fatal([Libtool version $1 or higher is required],
7139713583Smrg		             63)])],
7239713583Smrg       [$2])])
7395b296d0Smrg
7495b296d0Smrg
7539713583Smrg# _LT_CHECK_BUILDDIR
7639713583Smrg# ------------------
7739713583Smrg# Complain if the absolute build directory name contains unusual characters
7839713583Smrgm4_defun([_LT_CHECK_BUILDDIR],
7939713583Smrg[case `pwd` in
8039713583Smrg  *\ * | *\	*)
8139713583Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
8239713583Smrgesac
8339713583Smrg])
8439713583Smrg
8539713583Smrg
8639713583Smrg# LT_INIT([OPTIONS])
8739713583Smrg# ------------------
8839713583SmrgAC_DEFUN([LT_INIT],
8939713583Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
9039713583SmrgAC_BEFORE([$0], [LT_LANG])dnl
9139713583SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
9239713583SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
9339713583Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
9439713583Smrg
9539713583Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
9639713583Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
9739713583Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
9839713583Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
9939713583Smrgdnl unless we require an AC_DEFUNed macro:
10039713583SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
10139713583SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
10239713583SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
10339713583SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
10439713583Smrgm4_require([_LT_PROG_LTMAIN])dnl
10539713583Smrg
10639713583Smrgdnl Parse OPTIONS
10739713583Smrg_LT_SET_OPTIONS([$0], [$1])
10895b296d0Smrg
10995b296d0Smrg# This can be used to rebuild libtool when needed
11039713583SmrgLIBTOOL_DEPS="$ltmain"
11195b296d0Smrg
11295b296d0Smrg# Always use our own libtool.
11395b296d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
11495b296d0SmrgAC_SUBST(LIBTOOL)dnl
11595b296d0Smrg
11639713583Smrg_LT_SETUP
11795b296d0Smrg
11839713583Smrg# Only expand once:
11939713583Smrgm4_define([LT_INIT])
12039713583Smrg])# LT_INIT
12195b296d0Smrg
12239713583Smrg# Old names:
12339713583SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12439713583SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12539713583Smrgdnl aclocal-1.4 backwards compatibility:
12639713583Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12739713583Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12839713583Smrg
12939713583Smrg
13039713583Smrg# _LT_CC_BASENAME(CC)
13139713583Smrg# -------------------
13239713583Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
13339713583Smrgm4_defun([_LT_CC_BASENAME],
13439713583Smrg[for cc_temp in $1""; do
13539713583Smrg  case $cc_temp in
13639713583Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
13739713583Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
13839713583Smrg    \-*) ;;
13939713583Smrg    *) break;;
14039713583Smrg  esac
14139713583Smrgdone
14239713583Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14339713583Smrg])
14439713583Smrg
14539713583Smrg
14639713583Smrg# _LT_FILEUTILS_DEFAULTS
14739713583Smrg# ----------------------
14839713583Smrg# It is okay to use these file commands and assume they have been set
14939713583Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
15039713583Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
15139713583Smrg[: ${CP="cp -f"}
15239713583Smrg: ${MV="mv -f"}
15339713583Smrg: ${RM="rm -f"}
15439713583Smrg])# _LT_FILEUTILS_DEFAULTS
15539713583Smrg
15639713583Smrg
15739713583Smrg# _LT_SETUP
15839713583Smrg# ---------
15939713583Smrgm4_defun([_LT_SETUP],
16039713583Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16195b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
16239713583Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
16339713583Smrg_LT_DECL([], [host], [0])dnl
16439713583Smrg_LT_DECL([], [host_os], [0])dnl
16539713583Smrgdnl
16639713583Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
16739713583Smrg_LT_DECL([], [build], [0])dnl
16839713583Smrg_LT_DECL([], [build_os], [0])dnl
16939713583Smrgdnl
17095b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl
17139713583SmrgAC_REQUIRE([LT_PATH_LD])dnl
17239713583SmrgAC_REQUIRE([LT_PATH_NM])dnl
17339713583Smrgdnl
17495b296d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
17539713583Smrgtest -z "$LN_S" && LN_S="ln -s"
17639713583Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
17739713583Smrgdnl
17839713583SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
17939713583Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
18039713583Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
18195b296d0Smrgdnl
18239713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18339713583Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
18439713583Smrgm4_require([_LT_CMD_RELOAD])dnl
18539713583Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
18639713583Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
18739713583Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
18839713583Smrg
18939713583Smrg_LT_CONFIG_LIBTOOL_INIT([
19039713583Smrg# See if we are running on zsh, and set the options which allow our
19139713583Smrg# commands through without removal of \ escapes INIT.
19239713583Smrgif test -n "\${ZSH_VERSION+set}" ; then
19339713583Smrg   setopt NO_GLOB_SUBST
19439713583Smrgfi
19539713583Smrg])
19639713583Smrgif test -n "${ZSH_VERSION+set}" ; then
19739713583Smrg   setopt NO_GLOB_SUBST
19839713583Smrgfi
19939713583Smrg
20039713583Smrg_LT_CHECK_OBJDIR
20195b296d0Smrg
20239713583Smrgm4_require([_LT_TAG_COMPILER])dnl
20339713583Smrg_LT_PROG_ECHO_BACKSLASH
20495b296d0Smrg
20595b296d0Smrgcase $host_os in
20695b296d0Smrgaix3*)
20795b296d0Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
20895b296d0Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
20995b296d0Smrg  # vanish in a puff of smoke.
21095b296d0Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
21195b296d0Smrg    COLLECT_NAMES=
21295b296d0Smrg    export COLLECT_NAMES
21395b296d0Smrg  fi
21495b296d0Smrg  ;;
21595b296d0Smrgesac
21695b296d0Smrg
21795b296d0Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
21895b296d0Smrg# metacharacters that are still active within double-quoted strings.
21939713583Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
22095b296d0Smrg
22195b296d0Smrg# Same as above, but do not quote variable references.
22239713583Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
22395b296d0Smrg
22495b296d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a
22595b296d0Smrg# double_quote_subst'ed string.
22695b296d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
22795b296d0Smrg
22839713583Smrg# Sed substitution to delay expansion of an escaped single quote.
22939713583Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
23039713583Smrg
23195b296d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions
23295b296d0Smrgno_glob_subst='s/\*/\\\*/g'
23395b296d0Smrg
23495b296d0Smrg# Global variables:
23539713583Smrgofile=libtool
23695b296d0Smrgcan_build_shared=yes
23795b296d0Smrg
23895b296d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
23995b296d0Smrg# which needs '.lib').
24095b296d0Smrglibext=a
24195b296d0Smrg
24239713583Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
24395b296d0Smrg
24495b296d0Smrgold_CC="$CC"
24595b296d0Smrgold_CFLAGS="$CFLAGS"
24695b296d0Smrg
24795b296d0Smrg# Set sane defaults for various variables
24895b296d0Smrgtest -z "$CC" && CC=cc
24995b296d0Smrgtest -z "$LTCC" && LTCC=$CC
25095b296d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
25195b296d0Smrgtest -z "$LD" && LD=ld
25295b296d0Smrgtest -z "$ac_objext" && ac_objext=o
25395b296d0Smrg
25495b296d0Smrg_LT_CC_BASENAME([$compiler])
25595b296d0Smrg
25695b296d0Smrg# Only perform the check for file, if the check method requires it
25739713583Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
25895b296d0Smrgcase $deplibs_check_method in
25995b296d0Smrgfile_magic*)
26095b296d0Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
26139713583Smrg    _LT_PATH_MAGIC
26295b296d0Smrg  fi
26395b296d0Smrg  ;;
26495b296d0Smrgesac
26595b296d0Smrg
26639713583Smrg# Use C for the default configuration in the libtool script
26739713583SmrgLT_SUPPORTED_TAG([CC])
26839713583Smrg_LT_LANG_C_CONFIG
26939713583Smrg_LT_LANG_DEFAULT_CONFIG
27039713583Smrg_LT_CONFIG_COMMANDS
27139713583Smrg])# _LT_SETUP
272ff89ac2bSmrg
27395b296d0Smrg
27439713583Smrg# _LT_PROG_LTMAIN
27539713583Smrg# ---------------
27639713583Smrg# Note that this code is called both from `configure', and `config.status'
27739713583Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
27839713583Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
27939713583Smrg# so we pass a copy along to make sure it has a sensible value anyway.
28039713583Smrgm4_defun([_LT_PROG_LTMAIN],
28139713583Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
28239713583Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
28339713583Smrgltmain="$ac_aux_dir/ltmain.sh"
28439713583Smrg])# _LT_PROG_LTMAIN
28595b296d0Smrg
28695b296d0Smrg
28739713583Smrg
28839713583Smrg# So that we can recreate a full libtool script including additional
28939713583Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
29039713583Smrg# in macros and then make a single call at the end using the `libtool'
29139713583Smrg# label.
29239713583Smrg
29339713583Smrg
29439713583Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
29539713583Smrg# ----------------------------------------
29639713583Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
29739713583Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
29839713583Smrg[m4_ifval([$1],
29939713583Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
30039713583Smrg                     [$1
30139713583Smrg])])])
30239713583Smrg
30339713583Smrg# Initialize.
30439713583Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
30539713583Smrg
30639713583Smrg
30739713583Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
30839713583Smrg# ------------------------------
30939713583Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
31039713583Smrgm4_define([_LT_CONFIG_LIBTOOL],
31139713583Smrg[m4_ifval([$1],
31239713583Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
31339713583Smrg                     [$1
31439713583Smrg])])])
31539713583Smrg
31639713583Smrg# Initialize.
31739713583Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
31839713583Smrg
31939713583Smrg
32039713583Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
32139713583Smrg# -----------------------------------------------------
32239713583Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
32339713583Smrg[_LT_CONFIG_LIBTOOL([$1])
32439713583Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
32539713583Smrg])
32639713583Smrg
32739713583Smrg
32839713583Smrg# _LT_FORMAT_COMMENT([COMMENT])
32939713583Smrg# -----------------------------
33039713583Smrg# Add leading comment marks to the start of each line, and a trailing
33139713583Smrg# full-stop to the whole comment if one is not present already.
33239713583Smrgm4_define([_LT_FORMAT_COMMENT],
33339713583Smrg[m4_ifval([$1], [
33439713583Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
33539713583Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
33639713583Smrg)])
33739713583Smrg
33839713583Smrg
33939713583Smrg
34039713583Smrg
34139713583Smrg
34239713583Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
34339713583Smrg# -------------------------------------------------------------------
34439713583Smrg# CONFIGNAME is the name given to the value in the libtool script.
34539713583Smrg# VARNAME is the (base) name used in the configure script.
34639713583Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
34739713583Smrg# VARNAME.  Any other value will be used directly.
34839713583Smrgm4_define([_LT_DECL],
34939713583Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
35039713583Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
35139713583Smrg	[m4_ifval([$1], [$1], [$2])])
35239713583Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
35339713583Smrg    m4_ifval([$4],
35439713583Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
35539713583Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
35639713583Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
35739713583Smrg])
35839713583Smrg
35939713583Smrg
36039713583Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
36139713583Smrg# --------------------------------------------------------
36239713583Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
36339713583Smrg
36439713583Smrg
36539713583Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
36639713583Smrg# ------------------------------------------------
36739713583Smrgm4_define([lt_decl_tag_varnames],
36839713583Smrg[_lt_decl_filter([tagged?], [yes], $@)])
36939713583Smrg
37039713583Smrg
37139713583Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
37239713583Smrg# ---------------------------------------------------------
37339713583Smrgm4_define([_lt_decl_filter],
37439713583Smrg[m4_case([$#],
37539713583Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
37639713583Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
37739713583Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
37839713583Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
37939713583Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
38039713583Smrg])
38139713583Smrg
38239713583Smrg
38339713583Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
38439713583Smrg# --------------------------------------------------
38539713583Smrgm4_define([lt_decl_quote_varnames],
38639713583Smrg[_lt_decl_filter([value], [1], $@)])
38739713583Smrg
38839713583Smrg
38939713583Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
39039713583Smrg# ---------------------------------------------------
39139713583Smrgm4_define([lt_decl_dquote_varnames],
39239713583Smrg[_lt_decl_filter([value], [2], $@)])
39339713583Smrg
39439713583Smrg
39539713583Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
39639713583Smrg# ---------------------------------------------------
39739713583Smrgm4_define([lt_decl_varnames_tagged],
39839713583Smrg[m4_assert([$# <= 2])dnl
39939713583Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
40039713583Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
40139713583Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
40239713583Smrgm4_define([_lt_decl_varnames_tagged],
40339713583Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
40439713583Smrg
40539713583Smrg
40639713583Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
40739713583Smrg# ------------------------------------------------
40839713583Smrgm4_define([lt_decl_all_varnames],
40939713583Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
41039713583Smrg     m4_if([$2], [],
41139713583Smrg	   m4_quote(lt_decl_varnames),
41239713583Smrg	m4_quote(m4_shift($@))))[]dnl
41339713583Smrg])
41439713583Smrgm4_define([_lt_decl_all_varnames],
41539713583Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
41639713583Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
41739713583Smrg])
41839713583Smrg
41939713583Smrg
42039713583Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
42139713583Smrg# ------------------------------------
42239713583Smrg# Quote a variable value, and forward it to `config.status' so that its
42339713583Smrg# declaration there will have the same value as in `configure'.  VARNAME
42439713583Smrg# must have a single quote delimited value for this to work.
42539713583Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
42639713583Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
42739713583Smrg
42839713583Smrg
42939713583Smrg# _LT_CONFIG_STATUS_DECLARATIONS
43039713583Smrg# ------------------------------
43139713583Smrg# We delimit libtool config variables with single quotes, so when
43239713583Smrg# we write them to config.status, we have to be sure to quote all
43339713583Smrg# embedded single quotes properly.  In configure, this macro expands
43439713583Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
43539713583Smrg#
43639713583Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
43739713583Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
43839713583Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
43939713583Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
44095b296d0Smrg
44195b296d0Smrg
44239713583Smrg# _LT_LIBTOOL_TAGS
44339713583Smrg# ----------------
44439713583Smrg# Output comment and list of tags supported by the script
44539713583Smrgm4_defun([_LT_LIBTOOL_TAGS],
44639713583Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
44739713583Smrgavailable_tags="_LT_TAGS"dnl
44839713583Smrg])
44939713583Smrg
45039713583Smrg
45139713583Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
45239713583Smrg# -----------------------------------
45339713583Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
45439713583Smrg# expand to a commented shell variable setting:
45539713583Smrg#
45639713583Smrg#    # Some comment about what VAR is for.
45739713583Smrg#    visible_name=$lt_internal_name
45839713583Smrgm4_define([_LT_LIBTOOL_DECLARE],
45939713583Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
46039713583Smrg					   [description])))[]dnl
46139713583Smrgm4_pushdef([_libtool_name],
46239713583Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
46339713583Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
46439713583Smrg    [0], [_libtool_name=[$]$1],
46539713583Smrg    [1], [_libtool_name=$lt_[]$1],
46639713583Smrg    [2], [_libtool_name=$lt_[]$1],
46739713583Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
46839713583Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
46939713583Smrg])
47039713583Smrg
47139713583Smrg
47239713583Smrg# _LT_LIBTOOL_CONFIG_VARS
47339713583Smrg# -----------------------
47439713583Smrg# Produce commented declarations of non-tagged libtool config variables
47539713583Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
47639713583Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
47739713583Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
47839713583Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
47939713583Smrg[m4_foreach([_lt_var],
48039713583Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
48139713583Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
48239713583Smrg
48339713583Smrg
48439713583Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
48539713583Smrg# -------------------------
48639713583Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
48739713583Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
48839713583Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
48939713583Smrg
49039713583Smrg
49139713583Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
49239713583Smrg# ------------------------------
49339713583Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
49439713583Smrg
49539713583Smrg
49639713583Smrg# _LT_CONFIG_COMMANDS
49795b296d0Smrg# -------------------
49839713583Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
49939713583Smrg# variables for single and double quote escaping we saved from calls
50039713583Smrg# to _LT_DECL, we can put quote escaped variables declarations
50139713583Smrg# into `config.status', and then the shell code to quote escape them in
50239713583Smrg# for loops in `config.status'.  Finally, any additional code accumulated
50339713583Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
50439713583Smrgm4_defun([_LT_CONFIG_COMMANDS],
50539713583Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
50639713583Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
50739713583Smrg	dnl instead of duplicating it all over again into config.status,
50839713583Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
50939713583Smrg	dnl needs to know what name is stored there:
51039713583Smrg        [AC_CONFIG_COMMANDS([libtool],
51139713583Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
51239713583Smrg    dnl If the libtool generation code is destined for config.status,
51339713583Smrg    dnl expand the accumulated commands and init code now:
51439713583Smrg    [AC_CONFIG_COMMANDS([libtool],
51539713583Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
51639713583Smrg])#_LT_CONFIG_COMMANDS
51739713583Smrg
51839713583Smrg
51939713583Smrg# Initialize.
52039713583Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
52139713583Smrg[
52239713583Smrg
52339713583Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
52439713583Smrg# if CDPATH is set.
52539713583Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52639713583Smrg
52739713583Smrgsed_quote_subst='$sed_quote_subst'
52839713583Smrgdouble_quote_subst='$double_quote_subst'
52939713583Smrgdelay_variable_subst='$delay_variable_subst'
53039713583Smrg_LT_CONFIG_STATUS_DECLARATIONS
53139713583SmrgLTCC='$LTCC'
53239713583SmrgLTCFLAGS='$LTCFLAGS'
53339713583Smrgcompiler='$compiler_DEFAULT'
53439713583Smrg
53539713583Smrg# Quote evaled strings.
53639713583Smrgfor var in lt_decl_all_varnames([[ \
53739713583Smrg]], lt_decl_quote_varnames); do
53839713583Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
53939713583Smrg    *[[\\\\\\\`\\"\\\$]]*)
54039713583Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
54139713583Smrg      ;;
54239713583Smrg    *)
54339713583Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
54439713583Smrg      ;;
54539713583Smrg    esac
54639713583Smrgdone
54739713583Smrg
54839713583Smrg# Double-quote double-evaled strings.
54939713583Smrgfor var in lt_decl_all_varnames([[ \
55039713583Smrg]], lt_decl_dquote_varnames); do
55139713583Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
55239713583Smrg    *[[\\\\\\\`\\"\\\$]]*)
55339713583Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
55439713583Smrg      ;;
55539713583Smrg    *)
55639713583Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
55739713583Smrg      ;;
55839713583Smrg    esac
55939713583Smrgdone
56039713583Smrg
56139713583Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
56239713583Smrgcase \$lt_ECHO in
56339713583Smrg*'\\\[$]0 --fallback-echo"')dnl "
56439713583Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
56539713583Smrg  ;;
56639713583Smrgesac
56739713583Smrg
56839713583Smrg_LT_OUTPUT_LIBTOOL_INIT
56939713583Smrg])
57039713583Smrg
57139713583Smrg
57239713583Smrg# LT_OUTPUT
57339713583Smrg# ---------
57439713583Smrg# This macro allows early generation of the libtool script (before
57539713583Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
57639713583Smrg# tests.
57739713583SmrgAC_DEFUN([LT_OUTPUT],
57839713583Smrg[: ${CONFIG_LT=./config.lt}
57939713583SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
58039713583Smrgcat >"$CONFIG_LT" <<_LTEOF
58139713583Smrg#! $SHELL
58239713583Smrg# Generated by $as_me.
58339713583Smrg# Run this file to recreate a libtool stub with the current configuration.
58439713583Smrg
58539713583Smrglt_cl_silent=false
58639713583SmrgSHELL=\${CONFIG_SHELL-$SHELL}
58739713583Smrg_LTEOF
58839713583Smrg
58939713583Smrgcat >>"$CONFIG_LT" <<\_LTEOF
59039713583SmrgAS_SHELL_SANITIZE
59139713583Smrg_AS_PREPARE
59239713583Smrg
59339713583Smrgexec AS_MESSAGE_FD>&1
59439713583Smrgexec AS_MESSAGE_LOG_FD>>config.log
59539713583Smrg{
59639713583Smrg  echo
59739713583Smrg  AS_BOX([Running $as_me.])
59839713583Smrg} >&AS_MESSAGE_LOG_FD
59939713583Smrg
60039713583Smrglt_cl_help="\
60139713583Smrg\`$as_me' creates a local libtool stub from the current configuration,
60239713583Smrgfor use in further configure time tests before the real libtool is
60339713583Smrggenerated.
60439713583Smrg
60539713583SmrgUsage: $[0] [[OPTIONS]]
60639713583Smrg
60739713583Smrg  -h, --help      print this help, then exit
60839713583Smrg  -V, --version   print version number, then exit
60939713583Smrg  -q, --quiet     do not print progress messages
61039713583Smrg  -d, --debug     don't remove temporary files
61139713583Smrg
61239713583SmrgReport bugs to <bug-libtool@gnu.org>."
61339713583Smrg
61439713583Smrglt_cl_version="\
61539713583Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
61639713583Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
61739713583Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
61839713583Smrg
61939713583SmrgCopyright (C) 2008 Free Software Foundation, Inc.
62039713583SmrgThis config.lt script is free software; the Free Software Foundation
62139713583Smrggives unlimited permision to copy, distribute and modify it."
62239713583Smrg
62339713583Smrgwhile test $[#] != 0
62439713583Smrgdo
62539713583Smrg  case $[1] in
62639713583Smrg    --version | --v* | -V )
62739713583Smrg      echo "$lt_cl_version"; exit 0 ;;
62839713583Smrg    --help | --h* | -h )
62939713583Smrg      echo "$lt_cl_help"; exit 0 ;;
63039713583Smrg    --debug | --d* | -d )
63139713583Smrg      debug=: ;;
63239713583Smrg    --quiet | --q* | --silent | --s* | -q )
63339713583Smrg      lt_cl_silent=: ;;
63439713583Smrg
63539713583Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
63639713583SmrgTry \`$[0] --help' for more information.]) ;;
63739713583Smrg
63839713583Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
63939713583SmrgTry \`$[0] --help' for more information.]) ;;
64039713583Smrg  esac
64139713583Smrg  shift
64239713583Smrgdone
64339713583Smrg
64439713583Smrgif $lt_cl_silent; then
64539713583Smrg  exec AS_MESSAGE_FD>/dev/null
64639713583Smrgfi
64739713583Smrg_LTEOF
64839713583Smrg
64939713583Smrgcat >>"$CONFIG_LT" <<_LTEOF
65039713583Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
65139713583Smrg_LTEOF
65239713583Smrg
65339713583Smrgcat >>"$CONFIG_LT" <<\_LTEOF
65439713583SmrgAC_MSG_NOTICE([creating $ofile])
65539713583Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
65639713583SmrgAS_EXIT(0)
65739713583Smrg_LTEOF
65839713583Smrgchmod +x "$CONFIG_LT"
65939713583Smrg
66039713583Smrg# configure is writing to config.log, but config.lt does its own redirection,
66139713583Smrg# appending to config.log, which fails on DOS, as config.log is still kept
66239713583Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
66339713583Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
66439713583Smrgif test "$no_create" != yes; then
66539713583Smrg  lt_cl_success=:
66639713583Smrg  test "$silent" = yes &&
66739713583Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
66839713583Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
66939713583Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
67039713583Smrg  exec AS_MESSAGE_LOG_FD>>config.log
67139713583Smrg  $lt_cl_success || AS_EXIT(1)
67239713583Smrgfi
67339713583Smrg])# LT_OUTPUT
67439713583Smrg
67539713583Smrg
67639713583Smrg# _LT_CONFIG(TAG)
67739713583Smrg# ---------------
67839713583Smrg# If TAG is the built-in tag, create an initial libtool script with a
67939713583Smrg# default configuration from the untagged config vars.  Otherwise add code
68039713583Smrg# to config.status for appending the configuration named by TAG from the
68139713583Smrg# matching tagged config vars.
68239713583Smrgm4_defun([_LT_CONFIG],
68339713583Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
68439713583Smrg_LT_CONFIG_SAVE_COMMANDS([
68539713583Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
68639713583Smrg  m4_if(_LT_TAG, [C], [
68739713583Smrg    # See if we are running on zsh, and set the options which allow our
68839713583Smrg    # commands through without removal of \ escapes.
68939713583Smrg    if test -n "${ZSH_VERSION+set}" ; then
69039713583Smrg      setopt NO_GLOB_SUBST
69139713583Smrg    fi
69239713583Smrg
69339713583Smrg    cfgfile="${ofile}T"
69439713583Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
69539713583Smrg    $RM "$cfgfile"
69639713583Smrg
69739713583Smrg    cat <<_LT_EOF >> "$cfgfile"
69839713583Smrg#! $SHELL
69939713583Smrg
70039713583Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
70139713583Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
70239713583Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
70339713583Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
70439713583Smrg#
70539713583Smrg_LT_COPYING
70639713583Smrg_LT_LIBTOOL_TAGS
70739713583Smrg
70839713583Smrg# ### BEGIN LIBTOOL CONFIG
70939713583Smrg_LT_LIBTOOL_CONFIG_VARS
71039713583Smrg_LT_LIBTOOL_TAG_VARS
71139713583Smrg# ### END LIBTOOL CONFIG
71239713583Smrg
71339713583Smrg_LT_EOF
71439713583Smrg
71539713583Smrg  case $host_os in
71639713583Smrg  aix3*)
71739713583Smrg    cat <<\_LT_EOF >> "$cfgfile"
71839713583Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
71939713583Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
72039713583Smrg# vanish in a puff of smoke.
72139713583Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
72239713583Smrg  COLLECT_NAMES=
72339713583Smrg  export COLLECT_NAMES
72439713583Smrgfi
72539713583Smrg_LT_EOF
72639713583Smrg    ;;
72739713583Smrg  esac
72839713583Smrg
72939713583Smrg  _LT_PROG_LTMAIN
73039713583Smrg
73139713583Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
73239713583Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
73339713583Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
73439713583Smrg  # is reportedly fixed, but why not run on old versions too?
73539713583Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
73639713583Smrg    || (rm -f "$cfgfile"; exit 1)
73739713583Smrg
73839713583Smrg  _LT_PROG_XSI_SHELLFNS
73939713583Smrg
74039713583Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
74139713583Smrg    || (rm -f "$cfgfile"; exit 1)
74239713583Smrg
74339713583Smrg  mv -f "$cfgfile" "$ofile" ||
74439713583Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
74539713583Smrg  chmod +x "$ofile"
74639713583Smrg],
74739713583Smrg[cat <<_LT_EOF >> "$ofile"
74839713583Smrg
74939713583Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
75039713583Smrgdnl in a comment (ie after a #).
75139713583Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
75239713583Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
75339713583Smrg# ### END LIBTOOL TAG CONFIG: $1
75439713583Smrg_LT_EOF
75539713583Smrg])dnl /m4_if
75639713583Smrg],
75739713583Smrg[m4_if([$1], [], [
75839713583Smrg    PACKAGE='$PACKAGE'
75939713583Smrg    VERSION='$VERSION'
76039713583Smrg    TIMESTAMP='$TIMESTAMP'
76139713583Smrg    RM='$RM'
76239713583Smrg    ofile='$ofile'], [])
76339713583Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
76439713583Smrg])# _LT_CONFIG
76539713583Smrg
76639713583Smrg
76739713583Smrg# LT_SUPPORTED_TAG(TAG)
76839713583Smrg# ---------------------
76939713583Smrg# Trace this macro to discover what tags are supported by the libtool
77039713583Smrg# --tag option, using:
77139713583Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
77239713583SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
77339713583Smrg
77439713583Smrg
77539713583Smrg# C support is built-in for now
77639713583Smrgm4_define([_LT_LANG_C_enabled], [])
77739713583Smrgm4_define([_LT_TAGS], [])
77839713583Smrg
77939713583Smrg
78039713583Smrg# LT_LANG(LANG)
78139713583Smrg# -------------
78239713583Smrg# Enable libtool support for the given language if not already enabled.
78339713583SmrgAC_DEFUN([LT_LANG],
78439713583Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
78539713583Smrgm4_case([$1],
78639713583Smrg  [C],			[_LT_LANG(C)],
78739713583Smrg  [C++],		[_LT_LANG(CXX)],
78839713583Smrg  [Java],		[_LT_LANG(GCJ)],
78939713583Smrg  [Fortran 77],		[_LT_LANG(F77)],
79039713583Smrg  [Fortran],		[_LT_LANG(FC)],
79139713583Smrg  [Windows Resource],	[_LT_LANG(RC)],
79239713583Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
79339713583Smrg    [_LT_LANG($1)],
79439713583Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
79539713583Smrg])# LT_LANG
79639713583Smrg
79739713583Smrg
79839713583Smrg# _LT_LANG(LANGNAME)
79939713583Smrg# ------------------
80039713583Smrgm4_defun([_LT_LANG],
80139713583Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
80239713583Smrg  [LT_SUPPORTED_TAG([$1])dnl
80339713583Smrg  m4_append([_LT_TAGS], [$1 ])dnl
80439713583Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
80539713583Smrg  _LT_LANG_$1_CONFIG($1)])dnl
80639713583Smrg])# _LT_LANG
80739713583Smrg
80839713583Smrg
80939713583Smrg# _LT_LANG_DEFAULT_CONFIG
81039713583Smrg# -----------------------
81139713583Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
81239713583Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
81339713583Smrg  [LT_LANG(CXX)],
81439713583Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
81539713583Smrg
81639713583SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
81739713583Smrg  [LT_LANG(F77)],
81839713583Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
81939713583Smrg
82039713583SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
82139713583Smrg  [LT_LANG(FC)],
82239713583Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
82339713583Smrg
82439713583Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
82539713583Smrgdnl pulling things in needlessly.
82639713583SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
82739713583Smrg  [LT_LANG(GCJ)],
82839713583Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
82939713583Smrg    [LT_LANG(GCJ)],
83039713583Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
83139713583Smrg      [LT_LANG(GCJ)],
83239713583Smrg      [m4_ifdef([AC_PROG_GCJ],
83339713583Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
83439713583Smrg       m4_ifdef([A][M_PROG_GCJ],
83539713583Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
83639713583Smrg       m4_ifdef([LT_PROG_GCJ],
83739713583Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
83839713583Smrg
83939713583SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
84039713583Smrg  [LT_LANG(RC)],
84139713583Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
84239713583Smrg])# _LT_LANG_DEFAULT_CONFIG
84339713583Smrg
84439713583Smrg# Obsolete macros:
84539713583SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
84639713583SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
84739713583SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
84839713583SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
84939713583Smrgdnl aclocal-1.4 backwards compatibility:
85039713583Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
85139713583Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
85239713583Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
85339713583Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
85439713583Smrg
85539713583Smrg
85639713583Smrg# _LT_TAG_COMPILER
85739713583Smrg# ----------------
85839713583Smrgm4_defun([_LT_TAG_COMPILER],
85995b296d0Smrg[AC_REQUIRE([AC_PROG_CC])dnl
86095b296d0Smrg
86139713583Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
86239713583Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
86339713583Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
86439713583Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
86539713583Smrg
86695b296d0Smrg# If no C compiler was specified, use CC.
86795b296d0SmrgLTCC=${LTCC-"$CC"}
86895b296d0Smrg
86995b296d0Smrg# If no C compiler flags were specified, use CFLAGS.
87095b296d0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
87195b296d0Smrg
87295b296d0Smrg# Allow CC to be a program name with arguments.
87395b296d0Smrgcompiler=$CC
87439713583Smrg])# _LT_TAG_COMPILER
87595b296d0Smrg
87695b296d0Smrg
87795b296d0Smrg# _LT_COMPILER_BOILERPLATE
87895b296d0Smrg# ------------------------
87995b296d0Smrg# Check for compiler boilerplate output or warnings with
88095b296d0Smrg# the simple compiler test code.
88139713583Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
88239713583Smrg[m4_require([_LT_DECL_SED])dnl
883ff89ac2bSmrgac_outfile=conftest.$ac_objext
884ff89ac2bSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
88595b296d0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
88695b296d0Smrg_lt_compiler_boilerplate=`cat conftest.err`
88739713583Smrg$RM conftest*
88895b296d0Smrg])# _LT_COMPILER_BOILERPLATE
88995b296d0Smrg
89095b296d0Smrg
89195b296d0Smrg# _LT_LINKER_BOILERPLATE
89295b296d0Smrg# ----------------------
89395b296d0Smrg# Check for linker boilerplate output or warnings with
89495b296d0Smrg# the simple link test code.
89539713583Smrgm4_defun([_LT_LINKER_BOILERPLATE],
89639713583Smrg[m4_require([_LT_DECL_SED])dnl
897ff89ac2bSmrgac_outfile=conftest.$ac_objext
898ff89ac2bSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
89995b296d0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
90095b296d0Smrg_lt_linker_boilerplate=`cat conftest.err`
90139713583Smrg$RM -r conftest*
90295b296d0Smrg])# _LT_LINKER_BOILERPLATE
90395b296d0Smrg
904ff89ac2bSmrg# _LT_REQUIRED_DARWIN_CHECKS
90539713583Smrg# -------------------------
90639713583Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907ff89ac2bSmrg  case $host_os in
908ff89ac2bSmrg    rhapsody* | darwin*)
909ff89ac2bSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910ff89ac2bSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
91139713583Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
91239713583Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
91339713583Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
91439713583Smrg    _LT_DECL([], [DSYMUTIL], [1],
91539713583Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
91639713583Smrg    _LT_DECL([], [NMEDIT], [1],
91739713583Smrg      [Tool to change global to local symbols on Mac OS X])
91839713583Smrg    _LT_DECL([], [LIPO], [1],
91939713583Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
92039713583Smrg    _LT_DECL([], [OTOOL], [1],
92139713583Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
92239713583Smrg    _LT_DECL([], [OTOOL64], [1],
92339713583Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924ff89ac2bSmrg
925ff89ac2bSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926ff89ac2bSmrg      [lt_cv_apple_cc_single_mod=no
927ff89ac2bSmrg      if test -z "${LT_MULTI_MODULE}"; then
92839713583Smrg	# By default we will add the -single_module flag. You can override
92939713583Smrg	# by either setting the environment variable LT_MULTI_MODULE
93039713583Smrg	# non-empty at configure time, or by adding -multi_module to the
93139713583Smrg	# link flags.
93239713583Smrg	rm -rf libconftest.dylib*
93339713583Smrg	echo "int foo(void){return 1;}" > conftest.c
93439713583Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93539713583Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
93639713583Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93739713583Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
93839713583Smrg        _lt_result=$?
93939713583Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
94039713583Smrg	  lt_cv_apple_cc_single_mod=yes
94139713583Smrg	else
94239713583Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
94339713583Smrg	fi
94439713583Smrg	rm -rf libconftest.dylib*
94539713583Smrg	rm -f conftest.*
946ff89ac2bSmrg      fi])
947ff89ac2bSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948ff89ac2bSmrg      [lt_cv_ld_exported_symbols_list],
949ff89ac2bSmrg      [lt_cv_ld_exported_symbols_list=no
950ff89ac2bSmrg      save_LDFLAGS=$LDFLAGS
951ff89ac2bSmrg      echo "_main" > conftest.sym
952ff89ac2bSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953ff89ac2bSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
95439713583Smrg	[lt_cv_ld_exported_symbols_list=yes],
95539713583Smrg	[lt_cv_ld_exported_symbols_list=no])
95639713583Smrg	LDFLAGS="$save_LDFLAGS"
957ff89ac2bSmrg    ])
958ff89ac2bSmrg    case $host_os in
95939713583Smrg    rhapsody* | darwin1.[[012]])
960ff89ac2bSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961ff89ac2bSmrg    darwin1.*)
96239713583Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
96339713583Smrg    darwin*) # darwin 5.x on
964ff89ac2bSmrg      # if running on 10.5 or later, the deployment target defaults
965ff89ac2bSmrg      # to the OS version, if on x86, and 10.4, the deployment
966ff89ac2bSmrg      # target defaults to 10.4. Don't you love it?
967ff89ac2bSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
96839713583Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
96939713583Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
97039713583Smrg	10.[[012]]*)
97139713583Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
97239713583Smrg	10.*)
97339713583Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974ff89ac2bSmrg      esac
975ff89ac2bSmrg    ;;
976ff89ac2bSmrg  esac
977ff89ac2bSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978ff89ac2bSmrg      _lt_dar_single_mod='$single_module'
979ff89ac2bSmrg    fi
980ff89ac2bSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981ff89ac2bSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982ff89ac2bSmrg    else
98339713583Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984ff89ac2bSmrg    fi
985ff89ac2bSmrg    if test "$DSYMUTIL" != ":"; then
98639713583Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987ff89ac2bSmrg    else
988ff89ac2bSmrg      _lt_dsymutil=
989ff89ac2bSmrg    fi
990ff89ac2bSmrg    ;;
991ff89ac2bSmrg  esac
992ff89ac2bSmrg])
99395b296d0Smrg
99439713583Smrg
99539713583Smrg# _LT_DARWIN_LINKER_FEATURES
99639713583Smrg# --------------------------
99739713583Smrg# Checks for linker and compiler features on darwin
99839713583Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
99939713583Smrg[
100039713583Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
100139713583Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
100239713583Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
100339713583Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
100439713583Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
100539713583Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
100639713583Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
100739713583Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
100839713583Smrg  case $cc_basename in
100939713583Smrg     ifort*) _lt_dar_can_shared=yes ;;
101039713583Smrg     *) _lt_dar_can_shared=$GCC ;;
101139713583Smrg  esac
101239713583Smrg  if test "$_lt_dar_can_shared" = "yes"; then
101339713583Smrg    output_verbose_link_cmd=echo
101439713583Smrg    _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}"
101539713583Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
101639713583Smrg    _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}"
101739713583Smrg    _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}"
101839713583Smrg    m4_if([$1], [CXX],
101939713583Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
102039713583Smrg      _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}"
102139713583Smrg      _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}"
102239713583Smrg    fi
102339713583Smrg],[])
102439713583Smrg  else
102539713583Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
102639713583Smrg  fi
102739713583Smrg])
102839713583Smrg
102939713583Smrg# _LT_SYS_MODULE_PATH_AIX
103039713583Smrg# -----------------------
103195b296d0Smrg# Links a minimal program and checks the executable
103295b296d0Smrg# for the system default hardcoded library path. In most cases,
103395b296d0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
103495b296d0Smrg# the location of the communication and MPI libs are included too.
103595b296d0Smrg# If we don't find anything, use the default library path according
103695b296d0Smrg# to the aix ld manual.
103739713583Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
103839713583Smrg[m4_require([_LT_DECL_SED])dnl
1039ff89ac2bSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040ff89ac2bSmrglt_aix_libpath_sed='
1041ff89ac2bSmrg    /Import File Strings/,/^$/ {
1042ff89ac2bSmrg	/^0/ {
1043ff89ac2bSmrg	    s/^0  *\(.*\)$/\1/
1044ff89ac2bSmrg	    p
1045ff89ac2bSmrg	}
1046ff89ac2bSmrg    }'
1047ff89ac2bSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
104895b296d0Smrg# Check for a 64-bit object if we didn't find anything.
1049ff89ac2bSmrgif test -z "$aix_libpath"; then
1050ff89ac2bSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051ff89ac2bSmrgfi],[])
105295b296d0Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
105339713583Smrg])# _LT_SYS_MODULE_PATH_AIX
105495b296d0Smrg
105595b296d0Smrg
105639713583Smrg# _LT_SHELL_INIT(ARG)
105739713583Smrg# -------------------
105839713583Smrgm4_define([_LT_SHELL_INIT],
105995b296d0Smrg[ifdef([AC_DIVERSION_NOTICE],
106095b296d0Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
106195b296d0Smrg	 [AC_DIVERT_PUSH(NOTICE)])
106295b296d0Smrg$1
106395b296d0SmrgAC_DIVERT_POP
106439713583Smrg])# _LT_SHELL_INIT
106595b296d0Smrg
106695b296d0Smrg
106739713583Smrg# _LT_PROG_ECHO_BACKSLASH
106839713583Smrg# -----------------------
106995b296d0Smrg# Add some code to the start of the generated configure script which
107095b296d0Smrg# will find an echo command which doesn't interpret backslashes.
107139713583Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
107239713583Smrg[_LT_SHELL_INIT([
107395b296d0Smrg# Check that we are running under the correct shell.
107495b296d0SmrgSHELL=${CONFIG_SHELL-/bin/sh}
107595b296d0Smrg
107639713583Smrgcase X$lt_ECHO in
107795b296d0SmrgX*--fallback-echo)
107895b296d0Smrg  # Remove one level of quotation (which was required for Make).
107939713583Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
108095b296d0Smrg  ;;
108195b296d0Smrgesac
108295b296d0Smrg
108339713583SmrgECHO=${lt_ECHO-echo}
108495b296d0Smrgif test "X[$]1" = X--no-reexec; then
108595b296d0Smrg  # Discard the --no-reexec flag, and continue.
108695b296d0Smrg  shift
108795b296d0Smrgelif test "X[$]1" = X--fallback-echo; then
108895b296d0Smrg  # Avoid inline document here, it may be left over
108995b296d0Smrg  :
109039713583Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
109139713583Smrg  # Yippee, $ECHO works!
109295b296d0Smrg  :
109395b296d0Smrgelse
109495b296d0Smrg  # Restart under the correct shell.
109595b296d0Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
109695b296d0Smrgfi
109795b296d0Smrg
109895b296d0Smrgif test "X[$]1" = X--fallback-echo; then
109995b296d0Smrg  # used as fallback echo
110095b296d0Smrg  shift
110139713583Smrg  cat <<_LT_EOF
110295b296d0Smrg[$]*
110339713583Smrg_LT_EOF
110495b296d0Smrg  exit 0
110595b296d0Smrgfi
110695b296d0Smrg
110795b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
110895b296d0Smrg# if CDPATH is set.
110995b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
111095b296d0Smrg
111139713583Smrgif test -z "$lt_ECHO"; then
111239713583Smrg  if test "X${echo_test_string+set}" != Xset; then
111339713583Smrg    # find a string as large as possible, as long as the shell can cope with it
111439713583Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
111539713583Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
111639713583Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
111739713583Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
111839713583Smrg      then
111939713583Smrg        break
112039713583Smrg      fi
112139713583Smrg    done
112239713583Smrg  fi
112395b296d0Smrg
112439713583Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
112539713583Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
112639713583Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
112739713583Smrg    :
112839713583Smrg  else
112939713583Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
113039713583Smrg    # backslashes.  This makes it impossible to quote backslashes using
113139713583Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
113239713583Smrg    #
113339713583Smrg    # So, first we look for a working echo in the user's PATH.
113495b296d0Smrg
113539713583Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
113639713583Smrg    for dir in $PATH /usr/ucb; do
113739713583Smrg      IFS="$lt_save_ifs"
113839713583Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
113939713583Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
114039713583Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
114139713583Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
114239713583Smrg        ECHO="$dir/echo"
114339713583Smrg        break
114439713583Smrg      fi
114539713583Smrg    done
114695b296d0Smrg    IFS="$lt_save_ifs"
114795b296d0Smrg
114839713583Smrg    if test "X$ECHO" = Xecho; then
114939713583Smrg      # We didn't find a better echo, so look for alternatives.
115039713583Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
115139713583Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
115239713583Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
115339713583Smrg        # This shell has a builtin print -r that does the trick.
115439713583Smrg        ECHO='print -r'
115539713583Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
115639713583Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
115739713583Smrg        # If we have ksh, try running configure again with it.
115839713583Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
115939713583Smrg        export ORIGINAL_CONFIG_SHELL
116039713583Smrg        CONFIG_SHELL=/bin/ksh
116139713583Smrg        export CONFIG_SHELL
116239713583Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
116395b296d0Smrg      else
116439713583Smrg        # Try using printf.
116539713583Smrg        ECHO='printf %s\n'
116639713583Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
116739713583Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
116839713583Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
116939713583Smrg	  # Cool, printf works
117039713583Smrg	  :
117139713583Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
117239713583Smrg	     test "X$echo_testing_string" = 'X\t' &&
117339713583Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
117439713583Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
117539713583Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
117639713583Smrg	  export CONFIG_SHELL
117739713583Smrg	  SHELL="$CONFIG_SHELL"
117839713583Smrg	  export SHELL
117939713583Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118039713583Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
118139713583Smrg	     test "X$echo_testing_string" = 'X\t' &&
118239713583Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
118339713583Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
118439713583Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118539713583Smrg        else
118639713583Smrg	  # maybe with a smaller string...
118739713583Smrg	  prev=:
118895b296d0Smrg
118939713583Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
119039713583Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
119139713583Smrg	    then
119239713583Smrg	      break
119339713583Smrg	    fi
119439713583Smrg	    prev="$cmd"
119539713583Smrg	  done
119695b296d0Smrg
119739713583Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
119839713583Smrg	    echo_test_string=`eval $prev`
119939713583Smrg	    export echo_test_string
120039713583Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
120139713583Smrg	  else
120239713583Smrg	    # Oops.  We lost completely, so just stick with echo.
120339713583Smrg	    ECHO=echo
120439713583Smrg	  fi
120539713583Smrg        fi
120695b296d0Smrg      fi
120795b296d0Smrg    fi
120895b296d0Smrg  fi
120995b296d0Smrgfi
121095b296d0Smrg
121195b296d0Smrg# Copy echo and quote the copy suitably for passing to libtool from
121295b296d0Smrg# the Makefile, instead of quoting the original, which is used later.
121339713583Smrglt_ECHO=$ECHO
121439713583Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
121539713583Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
121695b296d0Smrgfi
121795b296d0Smrg
121839713583SmrgAC_SUBST(lt_ECHO)
121939713583Smrg])
122039713583Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
122139713583Smrg_LT_DECL([], [ECHO], [1],
122239713583Smrg    [An echo program that does not interpret backslashes])
122339713583Smrg])# _LT_PROG_ECHO_BACKSLASH
122495b296d0Smrg
122595b296d0Smrg
122639713583Smrg# _LT_ENABLE_LOCK
122739713583Smrg# ---------------
122839713583Smrgm4_defun([_LT_ENABLE_LOCK],
122995b296d0Smrg[AC_ARG_ENABLE([libtool-lock],
123039713583Smrg  [AS_HELP_STRING([--disable-libtool-lock],
123139713583Smrg    [avoid locking (might break parallel builds)])])
123295b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
123395b296d0Smrg
123495b296d0Smrg# Some flags need to be propagated to the compiler or linker for good
123595b296d0Smrg# libtool support.
123695b296d0Smrgcase $host in
123795b296d0Smrgia64-*-hpux*)
123895b296d0Smrg  # Find out which ABI we are using.
123995b296d0Smrg  echo 'int i;' > conftest.$ac_ext
124095b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
124195b296d0Smrg    case `/usr/bin/file conftest.$ac_objext` in
124239713583Smrg      *ELF-32*)
124339713583Smrg	HPUX_IA64_MODE="32"
124439713583Smrg	;;
124539713583Smrg      *ELF-64*)
124639713583Smrg	HPUX_IA64_MODE="64"
124739713583Smrg	;;
124895b296d0Smrg    esac
124995b296d0Smrg  fi
125095b296d0Smrg  rm -rf conftest*
125195b296d0Smrg  ;;
125295b296d0Smrg*-*-irix6*)
125395b296d0Smrg  # Find out which ABI we are using.
125495b296d0Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
125595b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
125639713583Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
125739713583Smrg      case `/usr/bin/file conftest.$ac_objext` in
125839713583Smrg	*32-bit*)
125939713583Smrg	  LD="${LD-ld} -melf32bsmip"
126039713583Smrg	  ;;
126139713583Smrg	*N32*)
126239713583Smrg	  LD="${LD-ld} -melf32bmipn32"
126339713583Smrg	  ;;
126439713583Smrg	*64-bit*)
126539713583Smrg	  LD="${LD-ld} -melf64bmip"
126639713583Smrg	;;
126739713583Smrg      esac
126839713583Smrg    else
126939713583Smrg      case `/usr/bin/file conftest.$ac_objext` in
127039713583Smrg	*32-bit*)
127139713583Smrg	  LD="${LD-ld} -32"
127239713583Smrg	  ;;
127339713583Smrg	*N32*)
127439713583Smrg	  LD="${LD-ld} -n32"
127539713583Smrg	  ;;
127639713583Smrg	*64-bit*)
127739713583Smrg	  LD="${LD-ld} -64"
127839713583Smrg	  ;;
127939713583Smrg      esac
128039713583Smrg    fi
128195b296d0Smrg  fi
128295b296d0Smrg  rm -rf conftest*
128395b296d0Smrg  ;;
128495b296d0Smrg
1285ff89ac2bSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
128639713583Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
128795b296d0Smrg  # Find out which ABI we are using.
128895b296d0Smrg  echo 'int i;' > conftest.$ac_ext
128995b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
129095b296d0Smrg    case `/usr/bin/file conftest.o` in
129139713583Smrg      *32-bit*)
129239713583Smrg	case $host in
129339713583Smrg	  x86_64-*kfreebsd*-gnu)
129439713583Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
129539713583Smrg	    ;;
129639713583Smrg	  x86_64-*linux*)
129739713583Smrg	    LD="${LD-ld} -m elf_i386"
129839713583Smrg	    ;;
129939713583Smrg	  ppc64-*linux*|powerpc64-*linux*)
130039713583Smrg	    LD="${LD-ld} -m elf32ppclinux"
130139713583Smrg	    ;;
130239713583Smrg	  s390x-*linux*)
130339713583Smrg	    LD="${LD-ld} -m elf_s390"
130439713583Smrg	    ;;
130539713583Smrg	  sparc64-*linux*)
130639713583Smrg	    LD="${LD-ld} -m elf32_sparc"
130739713583Smrg	    ;;
130839713583Smrg	esac
130939713583Smrg	;;
131039713583Smrg      *64-bit*)
131139713583Smrg	case $host in
131239713583Smrg	  x86_64-*kfreebsd*-gnu)
131339713583Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
131439713583Smrg	    ;;
131539713583Smrg	  x86_64-*linux*)
131639713583Smrg	    LD="${LD-ld} -m elf_x86_64"
131739713583Smrg	    ;;
131839713583Smrg	  ppc*-*linux*|powerpc*-*linux*)
131939713583Smrg	    LD="${LD-ld} -m elf64ppc"
132039713583Smrg	    ;;
132139713583Smrg	  s390*-*linux*|s390*-*tpf*)
132239713583Smrg	    LD="${LD-ld} -m elf64_s390"
132339713583Smrg	    ;;
132439713583Smrg	  sparc*-*linux*)
132539713583Smrg	    LD="${LD-ld} -m elf64_sparc"
132639713583Smrg	    ;;
132739713583Smrg	esac
132839713583Smrg	;;
132995b296d0Smrg    esac
133095b296d0Smrg  fi
133195b296d0Smrg  rm -rf conftest*
133295b296d0Smrg  ;;
133395b296d0Smrg
133495b296d0Smrg*-*-sco3.2v5*)
133595b296d0Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
133695b296d0Smrg  SAVE_CFLAGS="$CFLAGS"
133795b296d0Smrg  CFLAGS="$CFLAGS -belf"
133895b296d0Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
133995b296d0Smrg    [AC_LANG_PUSH(C)
134039713583Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
134195b296d0Smrg     AC_LANG_POP])
134295b296d0Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
134395b296d0Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
134495b296d0Smrg    CFLAGS="$SAVE_CFLAGS"
134595b296d0Smrg  fi
134695b296d0Smrg  ;;
134795b296d0Smrgsparc*-*solaris*)
134895b296d0Smrg  # Find out which ABI we are using.
134995b296d0Smrg  echo 'int i;' > conftest.$ac_ext
135095b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
135195b296d0Smrg    case `/usr/bin/file conftest.o` in
135295b296d0Smrg    *64-bit*)
135395b296d0Smrg      case $lt_cv_prog_gnu_ld in
135495b296d0Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355ff89ac2bSmrg      *)
135639713583Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357ff89ac2bSmrg	  LD="${LD-ld} -64"
1358ff89ac2bSmrg	fi
1359ff89ac2bSmrg	;;
136095b296d0Smrg      esac
136195b296d0Smrg      ;;
136295b296d0Smrg    esac
136395b296d0Smrg  fi
136495b296d0Smrg  rm -rf conftest*
136595b296d0Smrg  ;;
136695b296d0Smrgesac
136795b296d0Smrg
136895b296d0Smrgneed_locks="$enable_libtool_lock"
136939713583Smrg])# _LT_ENABLE_LOCK
137039713583Smrg
137139713583Smrg
137239713583Smrg# _LT_CMD_OLD_ARCHIVE
137339713583Smrg# -------------------
137439713583Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
137539713583Smrg[AC_CHECK_TOOL(AR, ar, false)
137639713583Smrgtest -z "$AR" && AR=ar
137739713583Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
137839713583Smrg_LT_DECL([], [AR], [1], [The archiver])
137939713583Smrg_LT_DECL([], [AR_FLAGS], [1])
138039713583Smrg
138139713583SmrgAC_CHECK_TOOL(STRIP, strip, :)
138239713583Smrgtest -z "$STRIP" && STRIP=:
138339713583Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
138439713583Smrg
138539713583SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
138639713583Smrgtest -z "$RANLIB" && RANLIB=:
138739713583Smrg_LT_DECL([], [RANLIB], [1],
138839713583Smrg    [Commands used to install an old-style archive])
138939713583Smrg
139039713583Smrg# Determine commands to create old-style static archives.
139139713583Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
139239713583Smrgold_postinstall_cmds='chmod 644 $oldlib'
139339713583Smrgold_postuninstall_cmds=
139495b296d0Smrg
139539713583Smrgif test -n "$RANLIB"; then
139639713583Smrg  case $host_os in
139739713583Smrg  openbsd*)
139839713583Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
139939713583Smrg    ;;
140039713583Smrg  *)
140139713583Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
140239713583Smrg    ;;
140339713583Smrg  esac
140439713583Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
140539713583Smrgfi
140639713583Smrg_LT_DECL([], [old_postinstall_cmds], [2])
140739713583Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
140839713583Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
140939713583Smrg    [Commands used to build an old-style archive])
141039713583Smrg])# _LT_CMD_OLD_ARCHIVE
141195b296d0Smrg
141295b296d0Smrg
141339713583Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
141495b296d0Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
141595b296d0Smrg# ----------------------------------------------------------------
141695b296d0Smrg# Check whether the given compiler option works
141739713583SmrgAC_DEFUN([_LT_COMPILER_OPTION],
141839713583Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
141939713583Smrgm4_require([_LT_DECL_SED])dnl
142095b296d0SmrgAC_CACHE_CHECK([$1], [$2],
142195b296d0Smrg  [$2=no
142239713583Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423ff89ac2bSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
142495b296d0Smrg   lt_compiler_flag="$3"
142595b296d0Smrg   # Insert the option either (1) after the last *FLAGS variable, or
142695b296d0Smrg   # (2) before a word containing "conftest.", or (3) at the end.
142795b296d0Smrg   # Note that $ac_compile itself does not contain backslashes and begins
142895b296d0Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
142995b296d0Smrg   # The option is referenced via a variable to avoid confusing sed.
143095b296d0Smrg   lt_compile=`echo "$ac_compile" | $SED \
143195b296d0Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
143295b296d0Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
143395b296d0Smrg   -e 's:$: $lt_compiler_flag:'`
143495b296d0Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
143595b296d0Smrg   (eval "$lt_compile" 2>conftest.err)
143695b296d0Smrg   ac_status=$?
143795b296d0Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
143895b296d0Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
143995b296d0Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
144095b296d0Smrg     # The compiler can only warn and ignore the option if not recognized
144195b296d0Smrg     # So say no if there are warnings other than the usual output.
144239713583Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
144395b296d0Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
144495b296d0Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
144595b296d0Smrg       $2=yes
144695b296d0Smrg     fi
144795b296d0Smrg   fi
144839713583Smrg   $RM conftest*
144995b296d0Smrg])
145095b296d0Smrg
145195b296d0Smrgif test x"[$]$2" = xyes; then
145239713583Smrg    m4_if([$5], , :, [$5])
145395b296d0Smrgelse
145439713583Smrg    m4_if([$6], , :, [$6])
145595b296d0Smrgfi
145639713583Smrg])# _LT_COMPILER_OPTION
145795b296d0Smrg
145839713583Smrg# Old name:
145939713583SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
146039713583Smrgdnl aclocal-1.4 backwards compatibility:
146139713583Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
146295b296d0Smrg
146339713583Smrg
146439713583Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
146539713583Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
146639713583Smrg# ----------------------------------------------------
146739713583Smrg# Check whether the given linker option works
146839713583SmrgAC_DEFUN([_LT_LINKER_OPTION],
146939713583Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
147039713583Smrgm4_require([_LT_DECL_SED])dnl
1471ff89ac2bSmrgAC_CACHE_CHECK([$1], [$2],
147295b296d0Smrg  [$2=no
147395b296d0Smrg   save_LDFLAGS="$LDFLAGS"
147495b296d0Smrg   LDFLAGS="$LDFLAGS $3"
1475ff89ac2bSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
147695b296d0Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
147795b296d0Smrg     # The linker can only warn and ignore the option if not recognized
147895b296d0Smrg     # So say no if there are warnings
147995b296d0Smrg     if test -s conftest.err; then
148095b296d0Smrg       # Append any errors to the config.log.
148195b296d0Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
148239713583Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
148395b296d0Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
148495b296d0Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
148595b296d0Smrg         $2=yes
148695b296d0Smrg       fi
148795b296d0Smrg     else
148895b296d0Smrg       $2=yes
148995b296d0Smrg     fi
149095b296d0Smrg   fi
149139713583Smrg   $RM -r conftest*
149295b296d0Smrg   LDFLAGS="$save_LDFLAGS"
149395b296d0Smrg])
149495b296d0Smrg
149595b296d0Smrgif test x"[$]$2" = xyes; then
149639713583Smrg    m4_if([$4], , :, [$4])
149795b296d0Smrgelse
149839713583Smrg    m4_if([$5], , :, [$5])
149995b296d0Smrgfi
150039713583Smrg])# _LT_LINKER_OPTION
150195b296d0Smrg
150239713583Smrg# Old name:
150339713583SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
150439713583Smrgdnl aclocal-1.4 backwards compatibility:
150539713583Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
150695b296d0Smrg
150739713583Smrg
150839713583Smrg# LT_CMD_MAX_LEN
150939713583Smrg#---------------
151039713583SmrgAC_DEFUN([LT_CMD_MAX_LEN],
151139713583Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
151239713583Smrg# find the maximum length of command line arguments
151395b296d0SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
151495b296d0SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
151595b296d0Smrg  i=0
151695b296d0Smrg  teststring="ABCD"
151795b296d0Smrg
151895b296d0Smrg  case $build_os in
151995b296d0Smrg  msdosdjgpp*)
152095b296d0Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
152195b296d0Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
152295b296d0Smrg    # during glob expansion).  Even if it were fixed, the result of this
152395b296d0Smrg    # check would be larger than it should be.
152495b296d0Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
152595b296d0Smrg    ;;
152695b296d0Smrg
152795b296d0Smrg  gnu*)
152895b296d0Smrg    # Under GNU Hurd, this test is not required because there is
152995b296d0Smrg    # no limit to the length of command line arguments.
153095b296d0Smrg    # Libtool will interpret -1 as no limit whatsoever
153195b296d0Smrg    lt_cv_sys_max_cmd_len=-1;
153295b296d0Smrg    ;;
153395b296d0Smrg
153439713583Smrg  cygwin* | mingw* | cegcc*)
153595b296d0Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
153695b296d0Smrg    # about 5 minutes as the teststring grows exponentially.
153795b296d0Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
153895b296d0Smrg    # you end up with a "frozen" computer, even though with patience
153995b296d0Smrg    # the test eventually succeeds (with a max line length of 256k).
154095b296d0Smrg    # Instead, let's just punt: use the minimum linelength reported by
154195b296d0Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
154295b296d0Smrg    lt_cv_sys_max_cmd_len=8192;
154395b296d0Smrg    ;;
154495b296d0Smrg
154595b296d0Smrg  amigaos*)
154695b296d0Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
154795b296d0Smrg    # So we just punt and use a minimum line length of 8192.
154895b296d0Smrg    lt_cv_sys_max_cmd_len=8192;
154995b296d0Smrg    ;;
155095b296d0Smrg
155195b296d0Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
155295b296d0Smrg    # This has been around since 386BSD, at least.  Likely further.
155395b296d0Smrg    if test -x /sbin/sysctl; then
155495b296d0Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
155595b296d0Smrg    elif test -x /usr/sbin/sysctl; then
155695b296d0Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
155795b296d0Smrg    else
155895b296d0Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
155995b296d0Smrg    fi
156095b296d0Smrg    # And add a safety zone
156195b296d0Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
156295b296d0Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
156395b296d0Smrg    ;;
156495b296d0Smrg
156595b296d0Smrg  interix*)
156695b296d0Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
156795b296d0Smrg    lt_cv_sys_max_cmd_len=196608
156895b296d0Smrg    ;;
156995b296d0Smrg
157095b296d0Smrg  osf*)
157195b296d0Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
157295b296d0Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
157395b296d0Smrg    # nice to cause kernel panics so lets avoid the loop below.
157495b296d0Smrg    # First set a reasonable default.
157595b296d0Smrg    lt_cv_sys_max_cmd_len=16384
157695b296d0Smrg    #
157795b296d0Smrg    if test -x /sbin/sysconfig; then
157895b296d0Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
157995b296d0Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
158095b296d0Smrg      esac
158195b296d0Smrg    fi
158295b296d0Smrg    ;;
158395b296d0Smrg  sco3.2v5*)
158495b296d0Smrg    lt_cv_sys_max_cmd_len=102400
158595b296d0Smrg    ;;
158695b296d0Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
158795b296d0Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
158895b296d0Smrg    if test -n "$kargmax"; then
158939713583Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
159095b296d0Smrg    else
159195b296d0Smrg      lt_cv_sys_max_cmd_len=32768
159295b296d0Smrg    fi
159395b296d0Smrg    ;;
159495b296d0Smrg  *)
1595ff89ac2bSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596ff89ac2bSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597ff89ac2bSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598ff89ac2bSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599ff89ac2bSmrg    else
160039713583Smrg      # Make teststring a little bigger before we do anything with it.
160139713583Smrg      # a 1K string should be a reasonable start.
160239713583Smrg      for i in 1 2 3 4 5 6 7 8 ; do
160339713583Smrg        teststring=$teststring$teststring
160439713583Smrg      done
1605ff89ac2bSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
160639713583Smrg      # If test is not a shell built-in, we'll probably end up computing a
160739713583Smrg      # maximum length that is only half of the actual maximum length, but
160839713583Smrg      # we can't tell.
160939713583Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
161039713583Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611ff89ac2bSmrg	      test $i != 17 # 1/2 MB should be enough
1612ff89ac2bSmrg      do
1613ff89ac2bSmrg        i=`expr $i + 1`
1614ff89ac2bSmrg        teststring=$teststring$teststring
1615ff89ac2bSmrg      done
161639713583Smrg      # Only check the string length outside the loop.
161739713583Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618ff89ac2bSmrg      teststring=
161939713583Smrg      # Add a significant safety factor because C++ compilers can tack on
162039713583Smrg      # massive amounts of additional arguments before passing them to the
162139713583Smrg      # linker.  It appears as though 1/2 is a usable value.
1622ff89ac2bSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623ff89ac2bSmrg    fi
162495b296d0Smrg    ;;
162595b296d0Smrg  esac
162695b296d0Smrg])
162795b296d0Smrgif test -n $lt_cv_sys_max_cmd_len ; then
162895b296d0Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
162995b296d0Smrgelse
163095b296d0Smrg  AC_MSG_RESULT(none)
163195b296d0Smrgfi
163239713583Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
163339713583Smrg_LT_DECL([], [max_cmd_len], [0],
163439713583Smrg    [What is the maximum length of a command?])
163539713583Smrg])# LT_CMD_MAX_LEN
163695b296d0Smrg
163739713583Smrg# Old name:
163839713583SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
163939713583Smrgdnl aclocal-1.4 backwards compatibility:
164039713583Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
164195b296d0Smrg
164239713583Smrg
164339713583Smrg# _LT_HEADER_DLFCN
164439713583Smrg# ----------------
164539713583Smrgm4_defun([_LT_HEADER_DLFCN],
164639713583Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
164739713583Smrg])# _LT_HEADER_DLFCN
164895b296d0Smrg
164995b296d0Smrg
165039713583Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
165139713583Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
165239713583Smrg# ----------------------------------------------------------------
165339713583Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
165439713583Smrg[m4_require([_LT_HEADER_DLFCN])dnl
165595b296d0Smrgif test "$cross_compiling" = yes; then :
165695b296d0Smrg  [$4]
165795b296d0Smrgelse
165895b296d0Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
165995b296d0Smrg  lt_status=$lt_dlunknown
166039713583Smrg  cat > conftest.$ac_ext <<_LT_EOF
166195b296d0Smrg[#line __oline__ "configure"
166295b296d0Smrg#include "confdefs.h"
166395b296d0Smrg
166495b296d0Smrg#if HAVE_DLFCN_H
166595b296d0Smrg#include <dlfcn.h>
166695b296d0Smrg#endif
166795b296d0Smrg
166895b296d0Smrg#include <stdio.h>
166995b296d0Smrg
167095b296d0Smrg#ifdef RTLD_GLOBAL
167195b296d0Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
167295b296d0Smrg#else
167395b296d0Smrg#  ifdef DL_GLOBAL
167495b296d0Smrg#    define LT_DLGLOBAL		DL_GLOBAL
167595b296d0Smrg#  else
167695b296d0Smrg#    define LT_DLGLOBAL		0
167795b296d0Smrg#  endif
167895b296d0Smrg#endif
167995b296d0Smrg
168095b296d0Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
168195b296d0Smrg   find out it does not work in some platform. */
168295b296d0Smrg#ifndef LT_DLLAZY_OR_NOW
168395b296d0Smrg#  ifdef RTLD_LAZY
168495b296d0Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
168595b296d0Smrg#  else
168695b296d0Smrg#    ifdef DL_LAZY
168795b296d0Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
168895b296d0Smrg#    else
168995b296d0Smrg#      ifdef RTLD_NOW
169095b296d0Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
169195b296d0Smrg#      else
169295b296d0Smrg#        ifdef DL_NOW
169395b296d0Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
169495b296d0Smrg#        else
169595b296d0Smrg#          define LT_DLLAZY_OR_NOW	0
169695b296d0Smrg#        endif
169795b296d0Smrg#      endif
169895b296d0Smrg#    endif
169995b296d0Smrg#  endif
170095b296d0Smrg#endif
170195b296d0Smrg
170295b296d0Smrgvoid fnord() { int i=42;}
170395b296d0Smrgint main ()
170495b296d0Smrg{
170595b296d0Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
170695b296d0Smrg  int status = $lt_dlunknown;
170795b296d0Smrg
170895b296d0Smrg  if (self)
170995b296d0Smrg    {
171095b296d0Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
171195b296d0Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
171295b296d0Smrg      /* dlclose (self); */
171395b296d0Smrg    }
171495b296d0Smrg  else
171595b296d0Smrg    puts (dlerror ());
171695b296d0Smrg
171739713583Smrg  return status;
171895b296d0Smrg}]
171939713583Smrg_LT_EOF
172095b296d0Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
172195b296d0Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
172295b296d0Smrg    lt_status=$?
172395b296d0Smrg    case x$lt_status in
172495b296d0Smrg      x$lt_dlno_uscore) $1 ;;
172595b296d0Smrg      x$lt_dlneed_uscore) $2 ;;
172695b296d0Smrg      x$lt_dlunknown|x*) $3 ;;
172795b296d0Smrg    esac
172895b296d0Smrg  else :
172995b296d0Smrg    # compilation failed
173095b296d0Smrg    $3
173195b296d0Smrg  fi
173295b296d0Smrgfi
173395b296d0Smrgrm -fr conftest*
173439713583Smrg])# _LT_TRY_DLOPEN_SELF
173595b296d0Smrg
173695b296d0Smrg
173739713583Smrg# LT_SYS_DLOPEN_SELF
173839713583Smrg# ------------------
173939713583SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
174039713583Smrg[m4_require([_LT_HEADER_DLFCN])dnl
174195b296d0Smrgif test "x$enable_dlopen" != xyes; then
174295b296d0Smrg  enable_dlopen=unknown
174395b296d0Smrg  enable_dlopen_self=unknown
174495b296d0Smrg  enable_dlopen_self_static=unknown
174595b296d0Smrgelse
174695b296d0Smrg  lt_cv_dlopen=no
174795b296d0Smrg  lt_cv_dlopen_libs=
174895b296d0Smrg
174995b296d0Smrg  case $host_os in
175095b296d0Smrg  beos*)
175195b296d0Smrg    lt_cv_dlopen="load_add_on"
175295b296d0Smrg    lt_cv_dlopen_libs=
175395b296d0Smrg    lt_cv_dlopen_self=yes
175495b296d0Smrg    ;;
175595b296d0Smrg
175639713583Smrg  mingw* | pw32* | cegcc*)
175795b296d0Smrg    lt_cv_dlopen="LoadLibrary"
175895b296d0Smrg    lt_cv_dlopen_libs=
175939713583Smrg    ;;
176095b296d0Smrg
176195b296d0Smrg  cygwin*)
176295b296d0Smrg    lt_cv_dlopen="dlopen"
176395b296d0Smrg    lt_cv_dlopen_libs=
176439713583Smrg    ;;
176595b296d0Smrg
176695b296d0Smrg  darwin*)
176795b296d0Smrg  # if libdl is installed we need to link against it
176895b296d0Smrg    AC_CHECK_LIB([dl], [dlopen],
176995b296d0Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
177095b296d0Smrg    lt_cv_dlopen="dyld"
177195b296d0Smrg    lt_cv_dlopen_libs=
177295b296d0Smrg    lt_cv_dlopen_self=yes
177395b296d0Smrg    ])
177439713583Smrg    ;;
177595b296d0Smrg
177695b296d0Smrg  *)
177795b296d0Smrg    AC_CHECK_FUNC([shl_load],
177895b296d0Smrg	  [lt_cv_dlopen="shl_load"],
177995b296d0Smrg      [AC_CHECK_LIB([dld], [shl_load],
1780ff89ac2bSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
178195b296d0Smrg	[AC_CHECK_FUNC([dlopen],
178295b296d0Smrg	      [lt_cv_dlopen="dlopen"],
178395b296d0Smrg	  [AC_CHECK_LIB([dl], [dlopen],
178495b296d0Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
178595b296d0Smrg	    [AC_CHECK_LIB([svld], [dlopen],
178695b296d0Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
178795b296d0Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1788ff89ac2bSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
178995b296d0Smrg	      ])
179095b296d0Smrg	    ])
179195b296d0Smrg	  ])
179295b296d0Smrg	])
179395b296d0Smrg      ])
179495b296d0Smrg    ;;
179595b296d0Smrg  esac
179695b296d0Smrg
179795b296d0Smrg  if test "x$lt_cv_dlopen" != xno; then
179895b296d0Smrg    enable_dlopen=yes
179995b296d0Smrg  else
180095b296d0Smrg    enable_dlopen=no
180195b296d0Smrg  fi
180295b296d0Smrg
180395b296d0Smrg  case $lt_cv_dlopen in
180495b296d0Smrg  dlopen)
180595b296d0Smrg    save_CPPFLAGS="$CPPFLAGS"
180695b296d0Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
180795b296d0Smrg
180895b296d0Smrg    save_LDFLAGS="$LDFLAGS"
180995b296d0Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
181095b296d0Smrg
181195b296d0Smrg    save_LIBS="$LIBS"
181295b296d0Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
181395b296d0Smrg
181495b296d0Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
181595b296d0Smrg	  lt_cv_dlopen_self, [dnl
181639713583Smrg	  _LT_TRY_DLOPEN_SELF(
181795b296d0Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
181895b296d0Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
181995b296d0Smrg    ])
182095b296d0Smrg
182195b296d0Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
182295b296d0Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
182395b296d0Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
182439713583Smrg	  lt_cv_dlopen_self_static, [dnl
182539713583Smrg	  _LT_TRY_DLOPEN_SELF(
182695b296d0Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
182795b296d0Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
182895b296d0Smrg      ])
182995b296d0Smrg    fi
183095b296d0Smrg
183195b296d0Smrg    CPPFLAGS="$save_CPPFLAGS"
183295b296d0Smrg    LDFLAGS="$save_LDFLAGS"
183395b296d0Smrg    LIBS="$save_LIBS"
183495b296d0Smrg    ;;
183595b296d0Smrg  esac
183695b296d0Smrg
183795b296d0Smrg  case $lt_cv_dlopen_self in
183895b296d0Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
183995b296d0Smrg  *) enable_dlopen_self=unknown ;;
184095b296d0Smrg  esac
184195b296d0Smrg
184295b296d0Smrg  case $lt_cv_dlopen_self_static in
184395b296d0Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
184495b296d0Smrg  *) enable_dlopen_self_static=unknown ;;
184595b296d0Smrg  esac
184695b296d0Smrgfi
184739713583Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
184839713583Smrg	 [Whether dlopen is supported])
184939713583Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
185039713583Smrg	 [Whether dlopen of programs is supported])
185139713583Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
185239713583Smrg	 [Whether dlopen of statically linked programs is supported])
185339713583Smrg])# LT_SYS_DLOPEN_SELF
185495b296d0Smrg
185539713583Smrg# Old name:
185639713583SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
185739713583Smrgdnl aclocal-1.4 backwards compatibility:
185839713583Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
185995b296d0Smrg
186039713583Smrg
186139713583Smrg# _LT_COMPILER_C_O([TAGNAME])
186239713583Smrg# ---------------------------
186339713583Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
186439713583Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
186539713583Smrgm4_defun([_LT_COMPILER_C_O],
186639713583Smrg[m4_require([_LT_DECL_SED])dnl
186739713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
186839713583Smrgm4_require([_LT_TAG_COMPILER])dnl
186995b296d0SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
187039713583Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
187139713583Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
187239713583Smrg   $RM -r conftest 2>/dev/null
187395b296d0Smrg   mkdir conftest
187495b296d0Smrg   cd conftest
187595b296d0Smrg   mkdir out
1876ff89ac2bSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
187795b296d0Smrg
187895b296d0Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
187995b296d0Smrg   # Insert the option either (1) after the last *FLAGS variable, or
188095b296d0Smrg   # (2) before a word containing "conftest.", or (3) at the end.
188195b296d0Smrg   # Note that $ac_compile itself does not contain backslashes and begins
188295b296d0Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
188395b296d0Smrg   lt_compile=`echo "$ac_compile" | $SED \
188495b296d0Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
188595b296d0Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
188695b296d0Smrg   -e 's:$: $lt_compiler_flag:'`
188795b296d0Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
188895b296d0Smrg   (eval "$lt_compile" 2>out/conftest.err)
188995b296d0Smrg   ac_status=$?
189095b296d0Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
189195b296d0Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
189295b296d0Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
189395b296d0Smrg   then
189495b296d0Smrg     # The compiler can only warn and ignore the option if not recognized
189595b296d0Smrg     # So say no if there are warnings
189639713583Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
189795b296d0Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
189895b296d0Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
189939713583Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
190095b296d0Smrg     fi
190195b296d0Smrg   fi
190295b296d0Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
190339713583Smrg   $RM conftest*
190495b296d0Smrg   # SGI C++ compiler will create directory out/ii_files/ for
190595b296d0Smrg   # template instantiation
190639713583Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
190739713583Smrg   $RM out/* && rmdir out
190895b296d0Smrg   cd ..
190939713583Smrg   $RM -r conftest
191039713583Smrg   $RM conftest*
191195b296d0Smrg])
191239713583Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
191339713583Smrg	[Does compiler simultaneously support -c and -o options?])
191439713583Smrg])# _LT_COMPILER_C_O
191595b296d0Smrg
191695b296d0Smrg
191739713583Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
191839713583Smrg# ----------------------------------
191995b296d0Smrg# Check to see if we can do hard links to lock some files if needed
192039713583Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
192139713583Smrg[m4_require([_LT_ENABLE_LOCK])dnl
192239713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
192339713583Smrg_LT_COMPILER_C_O([$1])
192495b296d0Smrg
192595b296d0Smrghard_links="nottested"
192639713583Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
192795b296d0Smrg  # do not overwrite the value of need_locks provided by the user
192895b296d0Smrg  AC_MSG_CHECKING([if we can lock with hard links])
192995b296d0Smrg  hard_links=yes
193039713583Smrg  $RM conftest*
193195b296d0Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193295b296d0Smrg  touch conftest.a
193395b296d0Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
193495b296d0Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193595b296d0Smrg  AC_MSG_RESULT([$hard_links])
193695b296d0Smrg  if test "$hard_links" = no; then
193795b296d0Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
193895b296d0Smrg    need_locks=warn
193995b296d0Smrg  fi
194095b296d0Smrgelse
194195b296d0Smrg  need_locks=no
194295b296d0Smrgfi
194339713583Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
194439713583Smrg])# _LT_COMPILER_FILE_LOCKS
194595b296d0Smrg
194695b296d0Smrg
194739713583Smrg# _LT_CHECK_OBJDIR
194839713583Smrg# ----------------
194939713583Smrgm4_defun([_LT_CHECK_OBJDIR],
195095b296d0Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
195195b296d0Smrg[rm -f .libs 2>/dev/null
195295b296d0Smrgmkdir .libs 2>/dev/null
195395b296d0Smrgif test -d .libs; then
195495b296d0Smrg  lt_cv_objdir=.libs
195595b296d0Smrgelse
195695b296d0Smrg  # MS-DOS does not allow filenames that begin with a dot.
195795b296d0Smrg  lt_cv_objdir=_libs
195895b296d0Smrgfi
195995b296d0Smrgrmdir .libs 2>/dev/null])
196095b296d0Smrgobjdir=$lt_cv_objdir
196139713583Smrg_LT_DECL([], [objdir], [0],
196239713583Smrg         [The name of the directory that contains temporary libtool files])dnl
196339713583Smrgm4_pattern_allow([LT_OBJDIR])dnl
196439713583SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
196539713583Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
196639713583Smrg])# _LT_CHECK_OBJDIR
196795b296d0Smrg
196895b296d0Smrg
196939713583Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
197039713583Smrg# --------------------------------------
197195b296d0Smrg# Check hardcoding attributes.
197239713583Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
197395b296d0Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
197439713583Smrg_LT_TAGVAR(hardcode_action, $1)=
197539713583Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
197639713583Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
197739713583Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
197895b296d0Smrg
197939713583Smrg  # We can hardcode non-existent directories.
198039713583Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
198195b296d0Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
198295b296d0Smrg     # have to relink, otherwise we might link with an installed library
198395b296d0Smrg     # when we should be linking with a yet-to-be-installed one
198439713583Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
198539713583Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
198695b296d0Smrg    # Linking always hardcodes the temporary library directory.
198739713583Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
198895b296d0Smrg  else
198995b296d0Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
199039713583Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
199195b296d0Smrg  fi
199295b296d0Smrgelse
199395b296d0Smrg  # We cannot hardcode anything, or else we can only hardcode existing
199495b296d0Smrg  # directories.
199539713583Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
199695b296d0Smrgfi
199739713583SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
199895b296d0Smrg
199939713583Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
200039713583Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
200195b296d0Smrg  # Fast installation is not supported
200295b296d0Smrg  enable_fast_install=no
200395b296d0Smrgelif test "$shlibpath_overrides_runpath" = yes ||
200495b296d0Smrg     test "$enable_shared" = no; then
200595b296d0Smrg  # Fast installation is not necessary
200695b296d0Smrg  enable_fast_install=needless
200795b296d0Smrgfi
200839713583Smrg_LT_TAGDECL([], [hardcode_action], [0],
200939713583Smrg    [How to hardcode a shared library path into an executable])
201039713583Smrg])# _LT_LINKER_HARDCODE_LIBPATH
201195b296d0Smrg
201295b296d0Smrg
201339713583Smrg# _LT_CMD_STRIPLIB
201439713583Smrg# ----------------
201539713583Smrgm4_defun([_LT_CMD_STRIPLIB],
201639713583Smrg[m4_require([_LT_DECL_EGREP])
201739713583Smrgstriplib=
201895b296d0Smrgold_striplib=
201995b296d0SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
202039713583Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
202195b296d0Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
202295b296d0Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
202395b296d0Smrg  AC_MSG_RESULT([yes])
202495b296d0Smrgelse
202595b296d0Smrg# FIXME - insert some real tests, host_os isn't really good enough
202695b296d0Smrg  case $host_os in
202739713583Smrg  darwin*)
202839713583Smrg    if test -n "$STRIP" ; then
202939713583Smrg      striplib="$STRIP -x"
203039713583Smrg      old_striplib="$STRIP -S"
203139713583Smrg      AC_MSG_RESULT([yes])
203239713583Smrg    else
203339713583Smrg      AC_MSG_RESULT([no])
203439713583Smrg    fi
203539713583Smrg    ;;
203639713583Smrg  *)
203739713583Smrg    AC_MSG_RESULT([no])
203895b296d0Smrg    ;;
203995b296d0Smrg  esac
204095b296d0Smrgfi
204139713583Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
204239713583Smrg_LT_DECL([], [striplib], [1])
204339713583Smrg])# _LT_CMD_STRIPLIB
204495b296d0Smrg
204595b296d0Smrg
204639713583Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
204795b296d0Smrg# -----------------------------
204895b296d0Smrg# PORTME Fill in your ld.so characteristics
204939713583Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
205039713583Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
205139713583Smrgm4_require([_LT_DECL_EGREP])dnl
205239713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
205339713583Smrgm4_require([_LT_DECL_OBJDUMP])dnl
205439713583Smrgm4_require([_LT_DECL_SED])dnl
2055ff89ac2bSmrgAC_MSG_CHECKING([dynamic linker characteristics])
205639713583Smrgm4_if([$1],
205739713583Smrg	[], [
205895b296d0Smrgif test "$GCC" = yes; then
2059ff89ac2bSmrg  case $host_os in
2060ff89ac2bSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061ff89ac2bSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062ff89ac2bSmrg  esac
2063ff89ac2bSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
206439713583Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
206595b296d0Smrg    # if the path contains ";" then we assume it to be the separator
206695b296d0Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
206795b296d0Smrg    # assumed that no part of a normal pathname contains ";" but that should
206895b296d0Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
206939713583Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
207095b296d0Smrg  else
207139713583Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
207295b296d0Smrg  fi
2073ff89ac2bSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074ff89ac2bSmrg  # and add multilib dir if necessary.
2075ff89ac2bSmrg  lt_tmp_lt_search_path_spec=
2076ff89ac2bSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077ff89ac2bSmrg  for lt_sys_path in $lt_search_path_spec; do
2078ff89ac2bSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079ff89ac2bSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080ff89ac2bSmrg    else
2081ff89ac2bSmrg      test -d "$lt_sys_path" && \
2082ff89ac2bSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083ff89ac2bSmrg    fi
2084ff89ac2bSmrg  done
208539713583Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086ff89ac2bSmrgBEGIN {RS=" "; FS="/|\n";} {
2087ff89ac2bSmrg  lt_foo="";
2088ff89ac2bSmrg  lt_count=0;
2089ff89ac2bSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090ff89ac2bSmrg    if ($lt_i != "" && $lt_i != ".") {
2091ff89ac2bSmrg      if ($lt_i == "..") {
2092ff89ac2bSmrg        lt_count++;
2093ff89ac2bSmrg      } else {
2094ff89ac2bSmrg        if (lt_count == 0) {
2095ff89ac2bSmrg          lt_foo="/" $lt_i lt_foo;
2096ff89ac2bSmrg        } else {
2097ff89ac2bSmrg          lt_count--;
2098ff89ac2bSmrg        }
2099ff89ac2bSmrg      }
2100ff89ac2bSmrg    }
2101ff89ac2bSmrg  }
2102ff89ac2bSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103ff89ac2bSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104ff89ac2bSmrg}'`
210539713583Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
210695b296d0Smrgelse
210795b296d0Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108ff89ac2bSmrgfi])
210939713583Smrglibrary_names_spec=
211039713583Smrglibname_spec='lib$name'
211139713583Smrgsoname_spec=
211239713583Smrgshrext_cmds=".so"
211339713583Smrgpostinstall_cmds=
211439713583Smrgpostuninstall_cmds=
211539713583Smrgfinish_cmds=
211639713583Smrgfinish_eval=
211739713583Smrgshlibpath_var=
211839713583Smrgshlibpath_overrides_runpath=unknown
211939713583Smrgversion_type=none
212039713583Smrgdynamic_linker="$host_os ld.so"
212139713583Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
212295b296d0Smrgneed_lib_prefix=unknown
212395b296d0Smrghardcode_into_libs=no
212495b296d0Smrg
212595b296d0Smrg# when you set need_version to no, make sure it does not cause -set_version
212695b296d0Smrg# flags to be left without arguments
212795b296d0Smrgneed_version=unknown
212895b296d0Smrg
212995b296d0Smrgcase $host_os in
213095b296d0Smrgaix3*)
213195b296d0Smrg  version_type=linux
213295b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
213395b296d0Smrg  shlibpath_var=LIBPATH
213495b296d0Smrg
213595b296d0Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
213695b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
213795b296d0Smrg  ;;
213895b296d0Smrg
2139ff89ac2bSmrgaix[[4-9]]*)
214095b296d0Smrg  version_type=linux
214195b296d0Smrg  need_lib_prefix=no
214295b296d0Smrg  need_version=no
214395b296d0Smrg  hardcode_into_libs=yes
214495b296d0Smrg  if test "$host_cpu" = ia64; then
214595b296d0Smrg    # AIX 5 supports IA64
214695b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
214795b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
214895b296d0Smrg  else
214995b296d0Smrg    # With GCC up to 2.95.x, collect2 would create an import file
215095b296d0Smrg    # for dependence libraries.  The import file would start with
215195b296d0Smrg    # the line `#! .'.  This would cause the generated library to
215295b296d0Smrg    # depend on `.', always an invalid library.  This was fixed in
215395b296d0Smrg    # development snapshots of GCC prior to 3.0.
215495b296d0Smrg    case $host_os in
215595b296d0Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
215695b296d0Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
215795b296d0Smrg	   echo ' yes '
215839713583Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
215995b296d0Smrg	:
216095b296d0Smrg      else
216195b296d0Smrg	can_build_shared=no
216295b296d0Smrg      fi
216395b296d0Smrg      ;;
216495b296d0Smrg    esac
216595b296d0Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
216695b296d0Smrg    # soname into executable. Probably we can add versioning support to
216795b296d0Smrg    # collect2, so additional links can be useful in future.
216895b296d0Smrg    if test "$aix_use_runtimelinking" = yes; then
216995b296d0Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
217095b296d0Smrg      # instead of lib<name>.a to let people know that these are not
217195b296d0Smrg      # typical AIX shared libraries.
217295b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
217395b296d0Smrg    else
217495b296d0Smrg      # We preserve .a as extension for shared libraries through AIX4.2
217595b296d0Smrg      # and later when we are not doing run time linking.
217695b296d0Smrg      library_names_spec='${libname}${release}.a $libname.a'
217795b296d0Smrg      soname_spec='${libname}${release}${shared_ext}$major'
217895b296d0Smrg    fi
217995b296d0Smrg    shlibpath_var=LIBPATH
218095b296d0Smrg  fi
218195b296d0Smrg  ;;
218295b296d0Smrg
218395b296d0Smrgamigaos*)
218439713583Smrg  case $host_cpu in
218539713583Smrg  powerpc)
218639713583Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
218739713583Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
218839713583Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
218939713583Smrg    ;;
219039713583Smrg  m68k)
219139713583Smrg    library_names_spec='$libname.ixlibrary $libname.a'
219239713583Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
219339713583Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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'
219439713583Smrg    ;;
219539713583Smrg  esac
219695b296d0Smrg  ;;
219795b296d0Smrg
219895b296d0Smrgbeos*)
219995b296d0Smrg  library_names_spec='${libname}${shared_ext}'
220095b296d0Smrg  dynamic_linker="$host_os ld.so"
220195b296d0Smrg  shlibpath_var=LIBRARY_PATH
220295b296d0Smrg  ;;
220395b296d0Smrg
220495b296d0Smrgbsdi[[45]]*)
220595b296d0Smrg  version_type=linux
220695b296d0Smrg  need_version=no
220795b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
220895b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
220995b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
221095b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
221195b296d0Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
221295b296d0Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
221395b296d0Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
221495b296d0Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
221595b296d0Smrg  # libtool to hard-code these into programs
221695b296d0Smrg  ;;
221795b296d0Smrg
221839713583Smrgcygwin* | mingw* | pw32* | cegcc*)
221995b296d0Smrg  version_type=windows
222095b296d0Smrg  shrext_cmds=".dll"
222195b296d0Smrg  need_version=no
222295b296d0Smrg  need_lib_prefix=no
222395b296d0Smrg
222495b296d0Smrg  case $GCC,$host_os in
222539713583Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
222695b296d0Smrg    library_names_spec='$libname.dll.a'
222795b296d0Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
222895b296d0Smrg    postinstall_cmds='base_file=`basename \${file}`~
222939713583Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
223095b296d0Smrg      dldir=$destdir/`dirname \$dlpath`~
223195b296d0Smrg      test -d \$dldir || mkdir -p \$dldir~
223295b296d0Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
223339713583Smrg      chmod a+x \$dldir/$dlname~
223439713583Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
223539713583Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
223639713583Smrg      fi'
223795b296d0Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
223895b296d0Smrg      dlpath=$dir/\$dldll~
223939713583Smrg       $RM \$dlpath'
224095b296d0Smrg    shlibpath_overrides_runpath=yes
224195b296d0Smrg
224295b296d0Smrg    case $host_os in
224395b296d0Smrg    cygwin*)
224495b296d0Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
224595b296d0Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
224695b296d0Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
224795b296d0Smrg      ;;
224839713583Smrg    mingw* | cegcc*)
224995b296d0Smrg      # MinGW DLLs use traditional 'lib' prefix
225095b296d0Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
225139713583Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
225239713583Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
225395b296d0Smrg        # It is most probably a Windows format PATH printed by
225495b296d0Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
225595b296d0Smrg        # path with ; separators, and with drive letters. We can handle the
225695b296d0Smrg        # drive letters (cygwin fileutils understands them), so leave them,
225795b296d0Smrg        # especially as we might pass files found there to a mingw objdump,
225895b296d0Smrg        # which wouldn't understand a cygwinified path. Ahh.
225939713583Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
226095b296d0Smrg      else
226139713583Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
226295b296d0Smrg      fi
226395b296d0Smrg      ;;
226495b296d0Smrg    pw32*)
226595b296d0Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
226695b296d0Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
226795b296d0Smrg      ;;
226895b296d0Smrg    esac
226995b296d0Smrg    ;;
227095b296d0Smrg
227195b296d0Smrg  *)
227295b296d0Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
227395b296d0Smrg    ;;
227495b296d0Smrg  esac
227595b296d0Smrg  dynamic_linker='Win32 ld.exe'
227695b296d0Smrg  # FIXME: first we should search . and the directory the executable is in
227795b296d0Smrg  shlibpath_var=PATH
227895b296d0Smrg  ;;
227995b296d0Smrg
228095b296d0Smrgdarwin* | rhapsody*)
228195b296d0Smrg  dynamic_linker="$host_os dyld"
228295b296d0Smrg  version_type=darwin
228395b296d0Smrg  need_lib_prefix=no
228495b296d0Smrg  need_version=no
228539713583Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
228695b296d0Smrg  soname_spec='${libname}${release}${major}$shared_ext'
228795b296d0Smrg  shlibpath_overrides_runpath=yes
228895b296d0Smrg  shlibpath_var=DYLD_LIBRARY_PATH
228995b296d0Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
229039713583Smrgm4_if([$1], [],[
229139713583Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
229295b296d0Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
229395b296d0Smrg  ;;
229495b296d0Smrg
229595b296d0Smrgdgux*)
229695b296d0Smrg  version_type=linux
229795b296d0Smrg  need_lib_prefix=no
229895b296d0Smrg  need_version=no
229995b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
230095b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
230195b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
230295b296d0Smrg  ;;
230395b296d0Smrg
230495b296d0Smrgfreebsd1*)
230595b296d0Smrg  dynamic_linker=no
230695b296d0Smrg  ;;
230795b296d0Smrg
230895b296d0Smrgfreebsd* | dragonfly*)
230995b296d0Smrg  # DragonFly does not have aout.  When/if they implement a new
231095b296d0Smrg  # versioning mechanism, adjust this.
231195b296d0Smrg  if test -x /usr/bin/objformat; then
231295b296d0Smrg    objformat=`/usr/bin/objformat`
231395b296d0Smrg  else
231495b296d0Smrg    case $host_os in
231595b296d0Smrg    freebsd[[123]]*) objformat=aout ;;
231695b296d0Smrg    *) objformat=elf ;;
231795b296d0Smrg    esac
231895b296d0Smrg  fi
2319ff89ac2bSmrg  version_type=freebsd-$objformat
232095b296d0Smrg  case $version_type in
232195b296d0Smrg    freebsd-elf*)
232295b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
232395b296d0Smrg      need_version=no
232495b296d0Smrg      need_lib_prefix=no
232595b296d0Smrg      ;;
232695b296d0Smrg    freebsd-*)
232795b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
232895b296d0Smrg      need_version=yes
232995b296d0Smrg      ;;
233095b296d0Smrg  esac
233195b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
233295b296d0Smrg  case $host_os in
233395b296d0Smrg  freebsd2*)
233495b296d0Smrg    shlibpath_overrides_runpath=yes
233595b296d0Smrg    ;;
233695b296d0Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
233795b296d0Smrg    shlibpath_overrides_runpath=yes
233895b296d0Smrg    hardcode_into_libs=yes
233995b296d0Smrg    ;;
234095b296d0Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
234195b296d0Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
234295b296d0Smrg    shlibpath_overrides_runpath=no
234395b296d0Smrg    hardcode_into_libs=yes
234495b296d0Smrg    ;;
2345ff89ac2bSmrg  *) # from 4.6 on, and DragonFly
234695b296d0Smrg    shlibpath_overrides_runpath=yes
234795b296d0Smrg    hardcode_into_libs=yes
234895b296d0Smrg    ;;
234995b296d0Smrg  esac
235095b296d0Smrg  ;;
235195b296d0Smrg
235295b296d0Smrggnu*)
235395b296d0Smrg  version_type=linux
235495b296d0Smrg  need_lib_prefix=no
235595b296d0Smrg  need_version=no
235695b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
235795b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
235895b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
235995b296d0Smrg  hardcode_into_libs=yes
236095b296d0Smrg  ;;
236195b296d0Smrg
236295b296d0Smrghpux9* | hpux10* | hpux11*)
236395b296d0Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
236495b296d0Smrg  # link against other versions.
236595b296d0Smrg  version_type=sunos
236695b296d0Smrg  need_lib_prefix=no
236795b296d0Smrg  need_version=no
236895b296d0Smrg  case $host_cpu in
236995b296d0Smrg  ia64*)
237095b296d0Smrg    shrext_cmds='.so'
237195b296d0Smrg    hardcode_into_libs=yes
237295b296d0Smrg    dynamic_linker="$host_os dld.so"
237395b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
237495b296d0Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
237595b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
237695b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
237795b296d0Smrg    if test "X$HPUX_IA64_MODE" = X32; then
237895b296d0Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
237995b296d0Smrg    else
238095b296d0Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
238195b296d0Smrg    fi
238295b296d0Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
238395b296d0Smrg    ;;
238439713583Smrg  hppa*64*)
238539713583Smrg    shrext_cmds='.sl'
238639713583Smrg    hardcode_into_libs=yes
238739713583Smrg    dynamic_linker="$host_os dld.sl"
238839713583Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
238939713583Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
239039713583Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
239139713583Smrg    soname_spec='${libname}${release}${shared_ext}$major'
239239713583Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
239339713583Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
239439713583Smrg    ;;
239539713583Smrg  *)
239695b296d0Smrg    shrext_cmds='.sl'
239795b296d0Smrg    dynamic_linker="$host_os dld.sl"
239895b296d0Smrg    shlibpath_var=SHLIB_PATH
239995b296d0Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
240095b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
240195b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
240295b296d0Smrg    ;;
240395b296d0Smrg  esac
240495b296d0Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
240595b296d0Smrg  postinstall_cmds='chmod 555 $lib'
240695b296d0Smrg  ;;
240795b296d0Smrg
2408ff89ac2bSmrginterix[[3-9]]*)
240995b296d0Smrg  version_type=linux
241095b296d0Smrg  need_lib_prefix=no
241195b296d0Smrg  need_version=no
241295b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
241395b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
241495b296d0Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
241595b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
241695b296d0Smrg  shlibpath_overrides_runpath=no
241795b296d0Smrg  hardcode_into_libs=yes
241895b296d0Smrg  ;;
241995b296d0Smrg
242095b296d0Smrgirix5* | irix6* | nonstopux*)
242195b296d0Smrg  case $host_os in
242295b296d0Smrg    nonstopux*) version_type=nonstopux ;;
242395b296d0Smrg    *)
242495b296d0Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
242595b296d0Smrg		version_type=linux
242695b296d0Smrg	else
242795b296d0Smrg		version_type=irix
242895b296d0Smrg	fi ;;
242995b296d0Smrg  esac
243095b296d0Smrg  need_lib_prefix=no
243195b296d0Smrg  need_version=no
243295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
243395b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
243495b296d0Smrg  case $host_os in
243595b296d0Smrg  irix5* | nonstopux*)
243695b296d0Smrg    libsuff= shlibsuff=
243795b296d0Smrg    ;;
243895b296d0Smrg  *)
243995b296d0Smrg    case $LD in # libtool.m4 will add one of these switches to LD
244095b296d0Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
244195b296d0Smrg      libsuff= shlibsuff= libmagic=32-bit;;
244295b296d0Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
244395b296d0Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
244495b296d0Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
244595b296d0Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
244695b296d0Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
244795b296d0Smrg    esac
244895b296d0Smrg    ;;
244995b296d0Smrg  esac
245095b296d0Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
245195b296d0Smrg  shlibpath_overrides_runpath=no
245295b296d0Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
245395b296d0Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
245495b296d0Smrg  hardcode_into_libs=yes
245595b296d0Smrg  ;;
245695b296d0Smrg
245795b296d0Smrg# No shared lib support for Linux oldld, aout, or coff.
245895b296d0Smrglinux*oldld* | linux*aout* | linux*coff*)
245995b296d0Smrg  dynamic_linker=no
246095b296d0Smrg  ;;
246195b296d0Smrg
246295b296d0Smrg# This must be Linux ELF.
2463ff89ac2bSmrglinux* | k*bsd*-gnu)
246495b296d0Smrg  version_type=linux
246595b296d0Smrg  need_lib_prefix=no
246695b296d0Smrg  need_version=no
246795b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
246895b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
246995b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
247095b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
247195b296d0Smrg  shlibpath_overrides_runpath=no
247239713583Smrg  # Some binutils ld are patched to set DT_RUNPATH
247339713583Smrg  save_LDFLAGS=$LDFLAGS
247439713583Smrg  save_libdir=$libdir
247539713583Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
247639713583Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
247739713583Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
247839713583Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
247939713583Smrg       [shlibpath_overrides_runpath=yes])])
248039713583Smrg  LDFLAGS=$save_LDFLAGS
248139713583Smrg  libdir=$save_libdir
248239713583Smrg
248395b296d0Smrg  # This implies no fast_install, which is unacceptable.
248495b296d0Smrg  # Some rework will be needed to allow for fast_install
248595b296d0Smrg  # before this can be enabled.
248695b296d0Smrg  hardcode_into_libs=yes
248739713583Smrg
248839713583Smrg  # Add ABI-specific directories to the system library path.
248939713583Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
249095b296d0Smrg
249195b296d0Smrg  # Append ld.so.conf contents to the search path
249295b296d0Smrg  if test -f /etc/ld.so.conf; then
249339713583Smrg    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;/^$/d' | tr '\n' ' '`
2494ff89ac2bSmrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
249595b296d0Smrg  fi
249695b296d0Smrg
249795b296d0Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
249895b296d0Smrg  # powerpc, because MkLinux only supported shared libraries with the
249995b296d0Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
250095b296d0Smrg  # most powerpc-linux boxes support dynamic linking these days and
250195b296d0Smrg  # people can always --disable-shared, the test was removed, and we
250295b296d0Smrg  # assume the GNU/Linux dynamic linker is in use.
250395b296d0Smrg  dynamic_linker='GNU/Linux ld.so'
250495b296d0Smrg  ;;
250595b296d0Smrg
250695b296d0Smrgnetbsd*)
250795b296d0Smrg  version_type=sunos
250895b296d0Smrg  need_lib_prefix=no
250995b296d0Smrg  need_version=no
251039713583Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
251195b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
251295b296d0Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
251395b296d0Smrg    dynamic_linker='NetBSD (a.out) ld.so'
251495b296d0Smrg  else
251595b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
251695b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
251795b296d0Smrg    dynamic_linker='NetBSD ld.elf_so'
251895b296d0Smrg  fi
251995b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
252095b296d0Smrg  shlibpath_overrides_runpath=yes
252195b296d0Smrg  hardcode_into_libs=yes
252295b296d0Smrg  ;;
252395b296d0Smrg
252495b296d0Smrgnewsos6)
252595b296d0Smrg  version_type=linux
252695b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
252795b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
252895b296d0Smrg  shlibpath_overrides_runpath=yes
252995b296d0Smrg  ;;
253095b296d0Smrg
253139713583Smrg*nto* | *qnx*)
253239713583Smrg  version_type=qnx
253395b296d0Smrg  need_lib_prefix=no
253495b296d0Smrg  need_version=no
253595b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
253695b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
253795b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
253839713583Smrg  shlibpath_overrides_runpath=no
253939713583Smrg  hardcode_into_libs=yes
254039713583Smrg  dynamic_linker='ldqnx.so'
254195b296d0Smrg  ;;
254295b296d0Smrg
254395b296d0Smrgopenbsd*)
254495b296d0Smrg  version_type=sunos
254595b296d0Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
254695b296d0Smrg  need_lib_prefix=no
254795b296d0Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
254895b296d0Smrg  case $host_os in
254939713583Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
255039713583Smrg    *)				need_version=no  ;;
255195b296d0Smrg  esac
255295b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
255395b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
255495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
255539713583Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
255695b296d0Smrg    case $host_os in
255795b296d0Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
255895b296d0Smrg	shlibpath_overrides_runpath=no
255995b296d0Smrg	;;
256095b296d0Smrg      *)
256195b296d0Smrg	shlibpath_overrides_runpath=yes
256295b296d0Smrg	;;
256395b296d0Smrg      esac
256495b296d0Smrg  else
256595b296d0Smrg    shlibpath_overrides_runpath=yes
256695b296d0Smrg  fi
256795b296d0Smrg  ;;
256895b296d0Smrg
256995b296d0Smrgos2*)
257095b296d0Smrg  libname_spec='$name'
257195b296d0Smrg  shrext_cmds=".dll"
257295b296d0Smrg  need_lib_prefix=no
257395b296d0Smrg  library_names_spec='$libname${shared_ext} $libname.a'
257495b296d0Smrg  dynamic_linker='OS/2 ld.exe'
257595b296d0Smrg  shlibpath_var=LIBPATH
257695b296d0Smrg  ;;
257795b296d0Smrg
257895b296d0Smrgosf3* | osf4* | osf5*)
257995b296d0Smrg  version_type=osf
258095b296d0Smrg  need_lib_prefix=no
258195b296d0Smrg  need_version=no
258295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
258395b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
258495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
258595b296d0Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
258695b296d0Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
258795b296d0Smrg  ;;
258895b296d0Smrg
2589ff89ac2bSmrgrdos*)
2590ff89ac2bSmrg  dynamic_linker=no
2591ff89ac2bSmrg  ;;
2592ff89ac2bSmrg
259395b296d0Smrgsolaris*)
259495b296d0Smrg  version_type=linux
259595b296d0Smrg  need_lib_prefix=no
259695b296d0Smrg  need_version=no
259795b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
259895b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
259995b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
260095b296d0Smrg  shlibpath_overrides_runpath=yes
260195b296d0Smrg  hardcode_into_libs=yes
260295b296d0Smrg  # ldd complains unless libraries are executable
260395b296d0Smrg  postinstall_cmds='chmod +x $lib'
260495b296d0Smrg  ;;
260595b296d0Smrg
260695b296d0Smrgsunos4*)
260795b296d0Smrg  version_type=sunos
260895b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
260995b296d0Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
261095b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
261195b296d0Smrg  shlibpath_overrides_runpath=yes
261295b296d0Smrg  if test "$with_gnu_ld" = yes; then
261395b296d0Smrg    need_lib_prefix=no
261495b296d0Smrg  fi
261595b296d0Smrg  need_version=yes
261695b296d0Smrg  ;;
261795b296d0Smrg
261895b296d0Smrgsysv4 | sysv4.3*)
261995b296d0Smrg  version_type=linux
262095b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
262195b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
262295b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
262395b296d0Smrg  case $host_vendor in
262495b296d0Smrg    sni)
262595b296d0Smrg      shlibpath_overrides_runpath=no
262695b296d0Smrg      need_lib_prefix=no
262795b296d0Smrg      runpath_var=LD_RUN_PATH
262895b296d0Smrg      ;;
262995b296d0Smrg    siemens)
263095b296d0Smrg      need_lib_prefix=no
263195b296d0Smrg      ;;
263295b296d0Smrg    motorola)
263395b296d0Smrg      need_lib_prefix=no
263495b296d0Smrg      need_version=no
263595b296d0Smrg      shlibpath_overrides_runpath=no
263695b296d0Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
263795b296d0Smrg      ;;
263895b296d0Smrg  esac
263995b296d0Smrg  ;;
264095b296d0Smrg
264195b296d0Smrgsysv4*MP*)
264295b296d0Smrg  if test -d /usr/nec ;then
264395b296d0Smrg    version_type=linux
264495b296d0Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
264595b296d0Smrg    soname_spec='$libname${shared_ext}.$major'
264695b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
264795b296d0Smrg  fi
264895b296d0Smrg  ;;
264995b296d0Smrg
265095b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
265195b296d0Smrg  version_type=freebsd-elf
265295b296d0Smrg  need_lib_prefix=no
265395b296d0Smrg  need_version=no
265495b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
265595b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
265695b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
265739713583Smrg  shlibpath_overrides_runpath=yes
265895b296d0Smrg  hardcode_into_libs=yes
265995b296d0Smrg  if test "$with_gnu_ld" = yes; then
266095b296d0Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
266195b296d0Smrg  else
266295b296d0Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
266395b296d0Smrg    case $host_os in
266495b296d0Smrg      sco3.2v5*)
266595b296d0Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
266695b296d0Smrg	;;
266795b296d0Smrg    esac
266895b296d0Smrg  fi
266995b296d0Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
267095b296d0Smrg  ;;
267195b296d0Smrg
267239713583Smrgtpf*)
267339713583Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
267439713583Smrg  version_type=linux
267539713583Smrg  need_lib_prefix=no
267639713583Smrg  need_version=no
267739713583Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
267839713583Smrg  shlibpath_var=LD_LIBRARY_PATH
267939713583Smrg  shlibpath_overrides_runpath=no
268039713583Smrg  hardcode_into_libs=yes
268139713583Smrg  ;;
268239713583Smrg
268395b296d0Smrguts4*)
268495b296d0Smrg  version_type=linux
268595b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
268695b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
268795b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
268895b296d0Smrg  ;;
268995b296d0Smrg
269095b296d0Smrg*)
269195b296d0Smrg  dynamic_linker=no
269295b296d0Smrg  ;;
269395b296d0Smrgesac
269495b296d0SmrgAC_MSG_RESULT([$dynamic_linker])
269595b296d0Smrgtest "$dynamic_linker" = no && can_build_shared=no
269695b296d0Smrg
269795b296d0Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
269895b296d0Smrgif test "$GCC" = yes; then
269995b296d0Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
270095b296d0Smrgfi
270195b296d0Smrg
270239713583Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
270339713583Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
270439713583Smrgfi
270539713583Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
270639713583Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
270739713583Smrgfi
270895b296d0Smrg
270939713583Smrg_LT_DECL([], [variables_saved_for_relink], [1],
271039713583Smrg    [Variables whose values should be saved in libtool wrapper scripts and
271139713583Smrg    restored at link time])
271239713583Smrg_LT_DECL([], [need_lib_prefix], [0],
271339713583Smrg    [Do we need the "lib" prefix for modules?])
271439713583Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
271539713583Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
271639713583Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
271739713583Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
271839713583Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
271939713583Smrg    [Is shlibpath searched before the hard-coded library search path?])
272039713583Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
272139713583Smrg_LT_DECL([], [library_names_spec], [1],
272239713583Smrg    [[List of archive names.  First name is the real one, the rest are links.
272339713583Smrg    The last name is the one that the linker finds with -lNAME]])
272439713583Smrg_LT_DECL([], [soname_spec], [1],
272539713583Smrg    [[The coded name of the library, if different from the real name]])
272639713583Smrg_LT_DECL([], [postinstall_cmds], [2],
272739713583Smrg    [Command to use after installation of a shared archive])
272839713583Smrg_LT_DECL([], [postuninstall_cmds], [2],
272939713583Smrg    [Command to use after uninstallation of a shared archive])
273039713583Smrg_LT_DECL([], [finish_cmds], [2],
273139713583Smrg    [Commands used to finish a libtool library installation in a directory])
273239713583Smrg_LT_DECL([], [finish_eval], [1],
273339713583Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
273439713583Smrg    not shown]])
273539713583Smrg_LT_DECL([], [hardcode_into_libs], [0],
273639713583Smrg    [Whether we should hardcode library paths into libraries])
273739713583Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
273839713583Smrg    [Compile-time system search path for libraries])
273939713583Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
274039713583Smrg    [Run-time system search path for libraries])
274139713583Smrg])# _LT_SYS_DYNAMIC_LINKER
274239713583Smrg
274339713583Smrg
274439713583Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
274595b296d0Smrg# --------------------------
2746ff89ac2bSmrg# find a file program which can recognize shared library
274739713583SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
274839713583Smrg[m4_require([_LT_DECL_EGREP])dnl
274995b296d0SmrgAC_MSG_CHECKING([for $1])
275095b296d0SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
275195b296d0Smrg[case $MAGIC_CMD in
275295b296d0Smrg[[\\/*] |  ?:[\\/]*])
275395b296d0Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
275495b296d0Smrg  ;;
275595b296d0Smrg*)
275695b296d0Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
275795b296d0Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
275895b296d0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
275995b296d0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
276095b296d0Smrgdnl not every word.  This closes a longstanding sh security hole.
276139713583Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
276295b296d0Smrg  for ac_dir in $ac_dummy; do
276395b296d0Smrg    IFS="$lt_save_ifs"
276495b296d0Smrg    test -z "$ac_dir" && ac_dir=.
276595b296d0Smrg    if test -f $ac_dir/$1; then
276695b296d0Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
276795b296d0Smrg      if test -n "$file_magic_test_file"; then
276895b296d0Smrg	case $deplibs_check_method in
276995b296d0Smrg	"file_magic "*)
277095b296d0Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
277195b296d0Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
277295b296d0Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
277395b296d0Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
277495b296d0Smrg	    :
277595b296d0Smrg	  else
277639713583Smrg	    cat <<_LT_EOF 1>&2
277795b296d0Smrg
277895b296d0Smrg*** Warning: the command libtool uses to detect shared libraries,
277995b296d0Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
278095b296d0Smrg*** The result is that libtool may fail to recognize shared libraries
278195b296d0Smrg*** as such.  This will affect the creation of libtool libraries that
278295b296d0Smrg*** depend on shared libraries, but programs linked with such libtool
278395b296d0Smrg*** libraries will work regardless of this problem.  Nevertheless, you
278495b296d0Smrg*** may want to report the problem to your system manager and/or to
278595b296d0Smrg*** bug-libtool@gnu.org
278695b296d0Smrg
278739713583Smrg_LT_EOF
278895b296d0Smrg	  fi ;;
278995b296d0Smrg	esac
279095b296d0Smrg      fi
279195b296d0Smrg      break
279295b296d0Smrg    fi
279395b296d0Smrg  done
279495b296d0Smrg  IFS="$lt_save_ifs"
279595b296d0Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
279695b296d0Smrg  ;;
279795b296d0Smrgesac])
279895b296d0SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
279995b296d0Smrgif test -n "$MAGIC_CMD"; then
280095b296d0Smrg  AC_MSG_RESULT($MAGIC_CMD)
280195b296d0Smrgelse
280295b296d0Smrg  AC_MSG_RESULT(no)
280395b296d0Smrgfi
280439713583Smrg_LT_DECL([], [MAGIC_CMD], [0],
280539713583Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
280639713583Smrg])# _LT_PATH_TOOL_PREFIX
280795b296d0Smrg
280839713583Smrg# Old name:
280939713583SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
281039713583Smrgdnl aclocal-1.4 backwards compatibility:
281139713583Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
281295b296d0Smrg
281339713583Smrg
281439713583Smrg# _LT_PATH_MAGIC
281539713583Smrg# --------------
2816ff89ac2bSmrg# find a file program which can recognize a shared library
281739713583Smrgm4_defun([_LT_PATH_MAGIC],
281839713583Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
281995b296d0Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
282095b296d0Smrg  if test -n "$ac_tool_prefix"; then
282139713583Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
282295b296d0Smrg  else
282395b296d0Smrg    MAGIC_CMD=:
282495b296d0Smrg  fi
282595b296d0Smrgfi
282639713583Smrg])# _LT_PATH_MAGIC
282795b296d0Smrg
282895b296d0Smrg
282939713583Smrg# LT_PATH_LD
283095b296d0Smrg# ----------
283195b296d0Smrg# find the pathname to the GNU or non-GNU linker
283239713583SmrgAC_DEFUN([LT_PATH_LD],
283339713583Smrg[AC_REQUIRE([AC_PROG_CC])dnl
283495b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
283595b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
283639713583Smrgm4_require([_LT_DECL_SED])dnl
283739713583Smrgm4_require([_LT_DECL_EGREP])dnl
283839713583Smrg
283939713583SmrgAC_ARG_WITH([gnu-ld],
284039713583Smrg    [AS_HELP_STRING([--with-gnu-ld],
284139713583Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
284239713583Smrg    [test "$withval" = no || with_gnu_ld=yes],
284339713583Smrg    [with_gnu_ld=no])dnl
284439713583Smrg
284595b296d0Smrgac_prog=ld
284695b296d0Smrgif test "$GCC" = yes; then
284795b296d0Smrg  # Check if gcc -print-prog-name=ld gives a path.
284895b296d0Smrg  AC_MSG_CHECKING([for ld used by $CC])
284995b296d0Smrg  case $host in
285095b296d0Smrg  *-*-mingw*)
285195b296d0Smrg    # gcc leaves a trailing carriage return which upsets mingw
285295b296d0Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
285395b296d0Smrg  *)
285495b296d0Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
285595b296d0Smrg  esac
285695b296d0Smrg  case $ac_prog in
285795b296d0Smrg    # Accept absolute paths.
285895b296d0Smrg    [[\\/]]* | ?:[[\\/]]*)
285995b296d0Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
286095b296d0Smrg      # Canonicalize the pathname of ld
286139713583Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
286239713583Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
286339713583Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
286495b296d0Smrg      done
286595b296d0Smrg      test -z "$LD" && LD="$ac_prog"
286695b296d0Smrg      ;;
286795b296d0Smrg  "")
286895b296d0Smrg    # If it fails, then pretend we aren't using GCC.
286995b296d0Smrg    ac_prog=ld
287095b296d0Smrg    ;;
287195b296d0Smrg  *)
287295b296d0Smrg    # If it is relative, then search for the first ld in PATH.
287395b296d0Smrg    with_gnu_ld=unknown
287495b296d0Smrg    ;;
287595b296d0Smrg  esac
287695b296d0Smrgelif test "$with_gnu_ld" = yes; then
287795b296d0Smrg  AC_MSG_CHECKING([for GNU ld])
287895b296d0Smrgelse
287995b296d0Smrg  AC_MSG_CHECKING([for non-GNU ld])
288095b296d0Smrgfi
288195b296d0SmrgAC_CACHE_VAL(lt_cv_path_LD,
288295b296d0Smrg[if test -z "$LD"; then
288395b296d0Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
288495b296d0Smrg  for ac_dir in $PATH; do
288595b296d0Smrg    IFS="$lt_save_ifs"
288695b296d0Smrg    test -z "$ac_dir" && ac_dir=.
288795b296d0Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
288895b296d0Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
288995b296d0Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
289095b296d0Smrg      # but apparently some variants of GNU ld only accept -v.
289195b296d0Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
289295b296d0Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
289395b296d0Smrg      *GNU* | *'with BFD'*)
289495b296d0Smrg	test "$with_gnu_ld" != no && break
289595b296d0Smrg	;;
289695b296d0Smrg      *)
289795b296d0Smrg	test "$with_gnu_ld" != yes && break
289895b296d0Smrg	;;
289995b296d0Smrg      esac
290095b296d0Smrg    fi
290195b296d0Smrg  done
290295b296d0Smrg  IFS="$lt_save_ifs"
290395b296d0Smrgelse
290495b296d0Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
290595b296d0Smrgfi])
290695b296d0SmrgLD="$lt_cv_path_LD"
290795b296d0Smrgif test -n "$LD"; then
290895b296d0Smrg  AC_MSG_RESULT($LD)
290995b296d0Smrgelse
291095b296d0Smrg  AC_MSG_RESULT(no)
291195b296d0Smrgfi
291295b296d0Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
291339713583Smrg_LT_PATH_LD_GNU
291439713583SmrgAC_SUBST([LD])
291595b296d0Smrg
291639713583Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
291739713583Smrg])# LT_PATH_LD
291895b296d0Smrg
291939713583Smrg# Old names:
292039713583SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
292139713583SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
292239713583Smrgdnl aclocal-1.4 backwards compatibility:
292339713583Smrgdnl AC_DEFUN([AM_PROG_LD], [])
292439713583Smrgdnl AC_DEFUN([AC_PROG_LD], [])
292539713583Smrg
292639713583Smrg
292739713583Smrg# _LT_PATH_LD_GNU
292839713583Smrg#- --------------
292939713583Smrgm4_defun([_LT_PATH_LD_GNU],
293039713583Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
293195b296d0Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
293295b296d0Smrgcase `$LD -v 2>&1 </dev/null` in
293395b296d0Smrg*GNU* | *'with BFD'*)
293495b296d0Smrg  lt_cv_prog_gnu_ld=yes
293595b296d0Smrg  ;;
293695b296d0Smrg*)
293795b296d0Smrg  lt_cv_prog_gnu_ld=no
293895b296d0Smrg  ;;
293995b296d0Smrgesac])
294095b296d0Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
294139713583Smrg])# _LT_PATH_LD_GNU
294295b296d0Smrg
294395b296d0Smrg
294439713583Smrg# _LT_CMD_RELOAD
294539713583Smrg# --------------
294695b296d0Smrg# find reload flag for linker
294795b296d0Smrg#   -- PORTME Some linkers may need a different reload flag.
294839713583Smrgm4_defun([_LT_CMD_RELOAD],
294995b296d0Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
295095b296d0Smrg  lt_cv_ld_reload_flag,
295195b296d0Smrg  [lt_cv_ld_reload_flag='-r'])
295295b296d0Smrgreload_flag=$lt_cv_ld_reload_flag
295395b296d0Smrgcase $reload_flag in
295495b296d0Smrg"" | " "*) ;;
295595b296d0Smrg*) reload_flag=" $reload_flag" ;;
295695b296d0Smrgesac
295795b296d0Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
295895b296d0Smrgcase $host_os in
295995b296d0Smrg  darwin*)
296095b296d0Smrg    if test "$GCC" = yes; then
296195b296d0Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
296295b296d0Smrg    else
296395b296d0Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
296495b296d0Smrg    fi
296595b296d0Smrg    ;;
296695b296d0Smrgesac
296739713583Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
296839713583Smrg_LT_DECL([], [reload_cmds], [2])dnl
296939713583Smrg])# _LT_CMD_RELOAD
297095b296d0Smrg
297195b296d0Smrg
297239713583Smrg# _LT_CHECK_MAGIC_METHOD
297339713583Smrg# ----------------------
297495b296d0Smrg# how to check for library dependencies
297595b296d0Smrg#  -- PORTME fill in with the dynamic library characteristics
297639713583Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
297739713583Smrg[m4_require([_LT_DECL_EGREP])
297839713583Smrgm4_require([_LT_DECL_OBJDUMP])
297939713583SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
298095b296d0Smrglt_cv_deplibs_check_method,
298195b296d0Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
298295b296d0Smrglt_cv_file_magic_test_file=
298395b296d0Smrglt_cv_deplibs_check_method='unknown'
298495b296d0Smrg# Need to set the preceding variable on all platforms that support
298595b296d0Smrg# interlibrary dependencies.
298695b296d0Smrg# 'none' -- dependencies not supported.
298795b296d0Smrg# `unknown' -- same as none, but documents that we really don't know.
298895b296d0Smrg# 'pass_all' -- all dependencies passed with no checks.
298995b296d0Smrg# 'test_compile' -- check by making test program.
299095b296d0Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
299195b296d0Smrg# which responds to the $file_magic_cmd with a given extended regex.
299295b296d0Smrg# If you have `file' or equivalent on your system and you're not sure
299395b296d0Smrg# whether `pass_all' will *always* work, you probably want this one.
299495b296d0Smrg
299595b296d0Smrgcase $host_os in
2996ff89ac2bSmrgaix[[4-9]]*)
299795b296d0Smrg  lt_cv_deplibs_check_method=pass_all
299895b296d0Smrg  ;;
299995b296d0Smrg
300095b296d0Smrgbeos*)
300195b296d0Smrg  lt_cv_deplibs_check_method=pass_all
300295b296d0Smrg  ;;
300395b296d0Smrg
300495b296d0Smrgbsdi[[45]]*)
300595b296d0Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
300695b296d0Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
300795b296d0Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
300895b296d0Smrg  ;;
300995b296d0Smrg
301095b296d0Smrgcygwin*)
301195b296d0Smrg  # func_win32_libid is a shell function defined in ltmain.sh
301295b296d0Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
301395b296d0Smrg  lt_cv_file_magic_cmd='func_win32_libid'
301495b296d0Smrg  ;;
301595b296d0Smrg
301695b296d0Smrgmingw* | pw32*)
301795b296d0Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018ff89ac2bSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019ff89ac2bSmrg  # unless we find 'file', for example because we are cross-compiling.
3020ff89ac2bSmrg  if ( file / ) >/dev/null 2>&1; then
3021ff89ac2bSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022ff89ac2bSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3023ff89ac2bSmrg  else
3024ff89ac2bSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025ff89ac2bSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026ff89ac2bSmrg  fi
302795b296d0Smrg  ;;
302895b296d0Smrg
302939713583Smrgcegcc)
303039713583Smrg  # use the weaker test based on 'objdump'. See mingw*.
303139713583Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
303239713583Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
303339713583Smrg  ;;
303439713583Smrg
303595b296d0Smrgdarwin* | rhapsody*)
303695b296d0Smrg  lt_cv_deplibs_check_method=pass_all
303795b296d0Smrg  ;;
303895b296d0Smrg
3039ff89ac2bSmrgfreebsd* | dragonfly*)
304039713583Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
304195b296d0Smrg    case $host_cpu in
304295b296d0Smrg    i*86 )
304395b296d0Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
304495b296d0Smrg      # Let's accept both of them until this is cleared up.
304595b296d0Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
304695b296d0Smrg      lt_cv_file_magic_cmd=/usr/bin/file
304795b296d0Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
304895b296d0Smrg      ;;
304995b296d0Smrg    esac
305095b296d0Smrg  else
305195b296d0Smrg    lt_cv_deplibs_check_method=pass_all
305295b296d0Smrg  fi
305395b296d0Smrg  ;;
305495b296d0Smrg
305595b296d0Smrggnu*)
305695b296d0Smrg  lt_cv_deplibs_check_method=pass_all
305795b296d0Smrg  ;;
305895b296d0Smrg
305995b296d0Smrghpux10.20* | hpux11*)
306095b296d0Smrg  lt_cv_file_magic_cmd=/usr/bin/file
306195b296d0Smrg  case $host_cpu in
306295b296d0Smrg  ia64*)
306395b296d0Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
306495b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
306595b296d0Smrg    ;;
306695b296d0Smrg  hppa*64*)
306795b296d0Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
306895b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
306995b296d0Smrg    ;;
307095b296d0Smrg  *)
307195b296d0Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
307295b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
307395b296d0Smrg    ;;
307495b296d0Smrg  esac
307595b296d0Smrg  ;;
307695b296d0Smrg
3077ff89ac2bSmrginterix[[3-9]]*)
307895b296d0Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
307995b296d0Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
308095b296d0Smrg  ;;
308195b296d0Smrg
308295b296d0Smrgirix5* | irix6* | nonstopux*)
308395b296d0Smrg  case $LD in
308495b296d0Smrg  *-32|*"-32 ") libmagic=32-bit;;
308595b296d0Smrg  *-n32|*"-n32 ") libmagic=N32;;
308695b296d0Smrg  *-64|*"-64 ") libmagic=64-bit;;
308795b296d0Smrg  *) libmagic=never-match;;
308895b296d0Smrg  esac
308995b296d0Smrg  lt_cv_deplibs_check_method=pass_all
309095b296d0Smrg  ;;
309195b296d0Smrg
309295b296d0Smrg# This must be Linux ELF.
3093ff89ac2bSmrglinux* | k*bsd*-gnu)
309495b296d0Smrg  lt_cv_deplibs_check_method=pass_all
309595b296d0Smrg  ;;
309695b296d0Smrg
309795b296d0Smrgnetbsd*)
309839713583Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
309995b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
310095b296d0Smrg  else
310195b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
310295b296d0Smrg  fi
310395b296d0Smrg  ;;
310495b296d0Smrg
310595b296d0Smrgnewos6*)
310695b296d0Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
310795b296d0Smrg  lt_cv_file_magic_cmd=/usr/bin/file
310895b296d0Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
310995b296d0Smrg  ;;
311095b296d0Smrg
311139713583Smrg*nto* | *qnx*)
311239713583Smrg  lt_cv_deplibs_check_method=pass_all
311395b296d0Smrg  ;;
311495b296d0Smrg
311595b296d0Smrgopenbsd*)
311639713583Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
311795b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
311895b296d0Smrg  else
311995b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
312095b296d0Smrg  fi
312195b296d0Smrg  ;;
312295b296d0Smrg
312395b296d0Smrgosf3* | osf4* | osf5*)
312495b296d0Smrg  lt_cv_deplibs_check_method=pass_all
312595b296d0Smrg  ;;
312695b296d0Smrg
3127ff89ac2bSmrgrdos*)
3128ff89ac2bSmrg  lt_cv_deplibs_check_method=pass_all
3129ff89ac2bSmrg  ;;
3130ff89ac2bSmrg
313195b296d0Smrgsolaris*)
313295b296d0Smrg  lt_cv_deplibs_check_method=pass_all
313395b296d0Smrg  ;;
313495b296d0Smrg
313539713583Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
313639713583Smrg  lt_cv_deplibs_check_method=pass_all
313739713583Smrg  ;;
313839713583Smrg
313995b296d0Smrgsysv4 | sysv4.3*)
314095b296d0Smrg  case $host_vendor in
314195b296d0Smrg  motorola)
314295b296d0Smrg    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]]'
314395b296d0Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
314495b296d0Smrg    ;;
314595b296d0Smrg  ncr)
314695b296d0Smrg    lt_cv_deplibs_check_method=pass_all
314795b296d0Smrg    ;;
314895b296d0Smrg  sequent)
314995b296d0Smrg    lt_cv_file_magic_cmd='/bin/file'
315095b296d0Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
315195b296d0Smrg    ;;
315295b296d0Smrg  sni)
315395b296d0Smrg    lt_cv_file_magic_cmd='/bin/file'
315495b296d0Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
315595b296d0Smrg    lt_cv_file_magic_test_file=/lib/libc.so
315695b296d0Smrg    ;;
315795b296d0Smrg  siemens)
315895b296d0Smrg    lt_cv_deplibs_check_method=pass_all
315995b296d0Smrg    ;;
316095b296d0Smrg  pc)
316195b296d0Smrg    lt_cv_deplibs_check_method=pass_all
316295b296d0Smrg    ;;
316395b296d0Smrg  esac
316495b296d0Smrg  ;;
316595b296d0Smrg
316639713583Smrgtpf*)
316795b296d0Smrg  lt_cv_deplibs_check_method=pass_all
316895b296d0Smrg  ;;
316995b296d0Smrgesac
317095b296d0Smrg])
317195b296d0Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
317295b296d0Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
317395b296d0Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
317495b296d0Smrg
317539713583Smrg_LT_DECL([], [deplibs_check_method], [1],
317639713583Smrg    [Method to check whether dependent libraries are shared objects])
317739713583Smrg_LT_DECL([], [file_magic_cmd], [1],
317839713583Smrg    [Command to use when deplibs_check_method == "file_magic"])
317939713583Smrg])# _LT_CHECK_MAGIC_METHOD
318095b296d0Smrg
318139713583Smrg
318239713583Smrg# LT_PATH_NM
318395b296d0Smrg# ----------
318439713583Smrg# find the pathname to a BSD- or MS-compatible name lister
318539713583SmrgAC_DEFUN([LT_PATH_NM],
318639713583Smrg[AC_REQUIRE([AC_PROG_CC])dnl
318739713583SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
318895b296d0Smrg[if test -n "$NM"; then
318995b296d0Smrg  # Let the user override the test.
319095b296d0Smrg  lt_cv_path_NM="$NM"
319195b296d0Smrgelse
319295b296d0Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193ff89ac2bSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
319495b296d0Smrg    lt_nm_to_check="$lt_nm_to_check nm"
319595b296d0Smrg  fi
319695b296d0Smrg  for lt_tmp_nm in $lt_nm_to_check; do
319795b296d0Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
319895b296d0Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
319995b296d0Smrg      IFS="$lt_save_ifs"
320095b296d0Smrg      test -z "$ac_dir" && ac_dir=.
320195b296d0Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
320295b296d0Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
320395b296d0Smrg	# Check to see if the nm accepts a BSD-compat flag.
320495b296d0Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
320595b296d0Smrg	#   nm: unknown option "B" ignored
320695b296d0Smrg	# Tru64's nm complains that /dev/null is an invalid object file
320795b296d0Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
320895b296d0Smrg	*/dev/null* | *'Invalid file or object type'*)
320995b296d0Smrg	  lt_cv_path_NM="$tmp_nm -B"
321095b296d0Smrg	  break
321195b296d0Smrg	  ;;
321295b296d0Smrg	*)
321395b296d0Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
321495b296d0Smrg	  */dev/null*)
321595b296d0Smrg	    lt_cv_path_NM="$tmp_nm -p"
321695b296d0Smrg	    break
321795b296d0Smrg	    ;;
321895b296d0Smrg	  *)
321995b296d0Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
322095b296d0Smrg	    continue # so that we can try to find one that supports BSD flags
322195b296d0Smrg	    ;;
322295b296d0Smrg	  esac
322395b296d0Smrg	  ;;
322495b296d0Smrg	esac
322595b296d0Smrg      fi
322695b296d0Smrg    done
322795b296d0Smrg    IFS="$lt_save_ifs"
322895b296d0Smrg  done
322939713583Smrg  : ${lt_cv_path_NM=no}
323095b296d0Smrgfi])
323139713583Smrgif test "$lt_cv_path_NM" != "no"; then
323239713583Smrg  NM="$lt_cv_path_NM"
323339713583Smrgelse
323439713583Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
323539713583Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
323639713583Smrg  AC_SUBST([DUMPBIN])
323739713583Smrg  if test "$DUMPBIN" != ":"; then
323839713583Smrg    NM="$DUMPBIN"
323939713583Smrg  fi
324039713583Smrgfi
324139713583Smrgtest -z "$NM" && NM=nm
324239713583SmrgAC_SUBST([NM])
324339713583Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
324439713583Smrg
324539713583SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
324639713583Smrg  [lt_cv_nm_interface="BSD nm"
324739713583Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
324839713583Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
324939713583Smrg  (eval "$ac_compile" 2>conftest.err)
325039713583Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
325139713583Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
325239713583Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
325339713583Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
325439713583Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
325539713583Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
325639713583Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
325739713583Smrg    lt_cv_nm_interface="MS dumpbin"
325839713583Smrg  fi
325939713583Smrg  rm -f conftest*])
326039713583Smrg])# LT_PATH_NM
326195b296d0Smrg
326239713583Smrg# Old names:
326339713583SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
326439713583SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
326539713583Smrgdnl aclocal-1.4 backwards compatibility:
326639713583Smrgdnl AC_DEFUN([AM_PROG_NM], [])
326739713583Smrgdnl AC_DEFUN([AC_PROG_NM], [])
326895b296d0Smrg
326939713583Smrg
327039713583Smrg# LT_LIB_M
327139713583Smrg# --------
327295b296d0Smrg# check for math library
327339713583SmrgAC_DEFUN([LT_LIB_M],
327495b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
327595b296d0SmrgLIBM=
327695b296d0Smrgcase $host in
327795b296d0Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
327895b296d0Smrg  # These system don't have libm, or don't need it
327995b296d0Smrg  ;;
328095b296d0Smrg*-ncr-sysv4.3*)
328195b296d0Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
328295b296d0Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
328395b296d0Smrg  ;;
328495b296d0Smrg*)
328595b296d0Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
328695b296d0Smrg  ;;
328795b296d0Smrgesac
328839713583SmrgAC_SUBST([LIBM])
328939713583Smrg])# LT_LIB_M
329095b296d0Smrg
329139713583Smrg# Old name:
329239713583SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
329339713583Smrgdnl aclocal-1.4 backwards compatibility:
329439713583Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
329595b296d0Smrg
329695b296d0Smrg
329739713583Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
329839713583Smrg# -------------------------------
329939713583Smrgm4_defun([_LT_COMPILER_NO_RTTI],
330039713583Smrg[m4_require([_LT_TAG_COMPILER])dnl
330195b296d0Smrg
330239713583Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
330395b296d0Smrg
330439713583Smrgif test "$GCC" = yes; then
330539713583Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
330695b296d0Smrg
330739713583Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
330839713583Smrg    lt_cv_prog_compiler_rtti_exceptions,
330939713583Smrg    [-fno-rtti -fno-exceptions], [],
331039713583Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
331139713583Smrgfi
331239713583Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
331339713583Smrg	[Compiler flag to turn off builtin functions])
331439713583Smrg])# _LT_COMPILER_NO_RTTI
331595b296d0Smrg
331695b296d0Smrg
331739713583Smrg# _LT_CMD_GLOBAL_SYMBOLS
331839713583Smrg# ----------------------
331939713583Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
332039713583Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
332139713583SmrgAC_REQUIRE([AC_PROG_CC])dnl
332239713583SmrgAC_REQUIRE([LT_PATH_NM])dnl
332339713583SmrgAC_REQUIRE([LT_PATH_LD])dnl
332439713583Smrgm4_require([_LT_DECL_SED])dnl
332539713583Smrgm4_require([_LT_DECL_EGREP])dnl
332639713583Smrgm4_require([_LT_TAG_COMPILER])dnl
332795b296d0Smrg
332839713583Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
332939713583SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
333039713583SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
333195b296d0Smrg[
333239713583Smrg# These are sane defaults that work on at least a few old systems.
333339713583Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
333495b296d0Smrg
333539713583Smrg# Character class describing NM global symbol codes.
333639713583Smrgsymcode='[[BCDEGRST]]'
333795b296d0Smrg
333839713583Smrg# Regexp to match symbols that can be accessed directly from C.
333939713583Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
334095b296d0Smrg
334139713583Smrg# Define system-specific variables.
334239713583Smrgcase $host_os in
334339713583Smrgaix*)
334439713583Smrg  symcode='[[BCDT]]'
334539713583Smrg  ;;
334639713583Smrgcygwin* | mingw* | pw32* | cegcc*)
334739713583Smrg  symcode='[[ABCDGISTW]]'
334839713583Smrg  ;;
334939713583Smrghpux*)
335039713583Smrg  if test "$host_cpu" = ia64; then
335139713583Smrg    symcode='[[ABCDEGRST]]'
335239713583Smrg  fi
335339713583Smrg  ;;
335439713583Smrgirix* | nonstopux*)
335539713583Smrg  symcode='[[BCDEGRST]]'
335639713583Smrg  ;;
335739713583Smrgosf*)
335839713583Smrg  symcode='[[BCDEGQRST]]'
335939713583Smrg  ;;
336039713583Smrgsolaris*)
336139713583Smrg  symcode='[[BDRT]]'
336239713583Smrg  ;;
336339713583Smrgsco3.2v5*)
336439713583Smrg  symcode='[[DT]]'
336539713583Smrg  ;;
336639713583Smrgsysv4.2uw2*)
336739713583Smrg  symcode='[[DT]]'
336839713583Smrg  ;;
336939713583Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
337039713583Smrg  symcode='[[ABDT]]'
337139713583Smrg  ;;
337239713583Smrgsysv4)
337339713583Smrg  symcode='[[DFNSTU]]'
337439713583Smrg  ;;
337539713583Smrgesac
337695b296d0Smrg
337739713583Smrg# If we're using GNU nm, then use its standard symbol codes.
337839713583Smrgcase `$NM -V 2>&1` in
337939713583Smrg*GNU* | *'with BFD'*)
338039713583Smrg  symcode='[[ABCDGIRSTW]]' ;;
338139713583Smrgesac
338295b296d0Smrg
338339713583Smrg# Transform an extracted symbol line into a proper C declaration.
338439713583Smrg# Some systems (esp. on ia64) link data and code symbols differently,
338539713583Smrg# so use this general approach.
338639713583Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
338795b296d0Smrg
338839713583Smrg# Transform an extracted symbol line into symbol name and symbol address
338939713583Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
339039713583Smrglt_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'"
339195b296d0Smrg
339239713583Smrg# Handle CRLF in mingw tool chain
339339713583Smrgopt_cr=
339439713583Smrgcase $build_os in
339539713583Smrgmingw*)
339639713583Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
339739713583Smrg  ;;
339839713583Smrgesac
339995b296d0Smrg
340039713583Smrg# Try without a prefix underscore, then with it.
340139713583Smrgfor ac_symprfx in "" "_"; do
340295b296d0Smrg
340339713583Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
340439713583Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
340595b296d0Smrg
340639713583Smrg  # Write the raw and C identifiers.
340739713583Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
340839713583Smrg    # Fake it for dumpbin and say T for any non-static function
340939713583Smrg    # and D for any global variable.
341039713583Smrg    # Also find C++ and __fastcall symbols from MSVC++,
341139713583Smrg    # which start with @ or ?.
341239713583Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
341339713583Smrg"     {last_section=section; section=\$ 3};"\
341439713583Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
341539713583Smrg"     \$ 0!~/External *\|/{next};"\
341639713583Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
341739713583Smrg"     {if(hide[section]) next};"\
341839713583Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
341939713583Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
342039713583Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
342139713583Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
342239713583Smrg"     ' prfx=^$ac_symprfx]"
342339713583Smrg  else
342439713583Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
342595b296d0Smrg  fi
342695b296d0Smrg
342739713583Smrg  # Check to see that the pipe works correctly.
342839713583Smrg  pipe_works=no
342995b296d0Smrg
343039713583Smrg  rm -f conftest*
343139713583Smrg  cat > conftest.$ac_ext <<_LT_EOF
343239713583Smrg#ifdef __cplusplus
343339713583Smrgextern "C" {
343439713583Smrg#endif
343539713583Smrgchar nm_test_var;
343639713583Smrgvoid nm_test_func(void);
343739713583Smrgvoid nm_test_func(void){}
343839713583Smrg#ifdef __cplusplus
343939713583Smrg}
344039713583Smrg#endif
344139713583Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
344239713583Smrg_LT_EOF
344395b296d0Smrg
344439713583Smrg  if AC_TRY_EVAL(ac_compile); then
344539713583Smrg    # Now try to grab the symbols.
344639713583Smrg    nlist=conftest.nm
344739713583Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
344839713583Smrg      # Try sorting and uniquifying the output.
344939713583Smrg      if sort "$nlist" | uniq > "$nlist"T; then
345039713583Smrg	mv -f "$nlist"T "$nlist"
345139713583Smrg      else
345239713583Smrg	rm -f "$nlist"T
345339713583Smrg      fi
345495b296d0Smrg
345539713583Smrg      # Make sure that we snagged all the symbols we need.
345639713583Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
345739713583Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
345839713583Smrg	  cat <<_LT_EOF > conftest.$ac_ext
345939713583Smrg#ifdef __cplusplus
346039713583Smrgextern "C" {
346139713583Smrg#endif
346295b296d0Smrg
346339713583Smrg_LT_EOF
346439713583Smrg	  # Now generate the symbol file.
346539713583Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
346695b296d0Smrg
346739713583Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
346895b296d0Smrg
346939713583Smrg/* The mapping between symbol names and symbols.  */
347039713583Smrgconst struct {
347139713583Smrg  const char *name;
347239713583Smrg  void       *address;
347339713583Smrg}
347439713583Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
347539713583Smrg{
347639713583Smrg  { "@PROGRAM@", (void *) 0 },
347739713583Smrg_LT_EOF
347839713583Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
347939713583Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
348039713583Smrg  {0, (void *) 0}
348139713583Smrg};
348295b296d0Smrg
348339713583Smrg/* This works around a problem in FreeBSD linker */
348439713583Smrg#ifdef FREEBSD_WORKAROUND
348539713583Smrgstatic const void *lt_preloaded_setup() {
348639713583Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
348739713583Smrg}
348839713583Smrg#endif
348995b296d0Smrg
349039713583Smrg#ifdef __cplusplus
349139713583Smrg}
349239713583Smrg#endif
349339713583Smrg_LT_EOF
349439713583Smrg	  # Now try linking the two files.
349539713583Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
349639713583Smrg	  lt_save_LIBS="$LIBS"
349739713583Smrg	  lt_save_CFLAGS="$CFLAGS"
349839713583Smrg	  LIBS="conftstm.$ac_objext"
349939713583Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
350039713583Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
350139713583Smrg	    pipe_works=yes
350239713583Smrg	  fi
350339713583Smrg	  LIBS="$lt_save_LIBS"
350439713583Smrg	  CFLAGS="$lt_save_CFLAGS"
350539713583Smrg	else
350639713583Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
350739713583Smrg	fi
350839713583Smrg      else
350939713583Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
351039713583Smrg      fi
351195b296d0Smrg    else
351239713583Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
351395b296d0Smrg    fi
351495b296d0Smrg  else
351539713583Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
351639713583Smrg    cat conftest.$ac_ext >&5
351795b296d0Smrg  fi
351839713583Smrg  rm -rf conftest* conftst*
351995b296d0Smrg
352039713583Smrg  # Do not use the global_symbol_pipe unless it works.
352139713583Smrg  if test "$pipe_works" = yes; then
352239713583Smrg    break
352339713583Smrg  else
352439713583Smrg    lt_cv_sys_global_symbol_pipe=
352539713583Smrg  fi
352639713583Smrgdone
352739713583Smrg])
352839713583Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
352939713583Smrg  lt_cv_sys_global_symbol_to_cdecl=
353039713583Smrgfi
353139713583Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
353239713583Smrg  AC_MSG_RESULT(failed)
353395b296d0Smrgelse
353439713583Smrg  AC_MSG_RESULT(ok)
353595b296d0Smrgfi
353695b296d0Smrg
353739713583Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
353839713583Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
353939713583Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
354039713583Smrg    [Transform the output of nm in a proper C declaration])
354139713583Smrg_LT_DECL([global_symbol_to_c_name_address],
354239713583Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
354339713583Smrg    [Transform the output of nm in a C name address pair])
354439713583Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
354539713583Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
354639713583Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
354739713583Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
354895b296d0Smrg
354995b296d0Smrg
355039713583Smrg# _LT_COMPILER_PIC([TAGNAME])
355139713583Smrg# ---------------------------
355239713583Smrgm4_defun([_LT_COMPILER_PIC],
355339713583Smrg[m4_require([_LT_TAG_COMPILER])dnl
355439713583Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
355539713583Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
355639713583Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
355795b296d0Smrg
355839713583SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
355939713583Smrgm4_if([$1], [CXX], [
356039713583Smrg  # C++ specific cases for pic, static, wl, etc.
356139713583Smrg  if test "$GXX" = yes; then
356239713583Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
356339713583Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
356495b296d0Smrg
356539713583Smrg    case $host_os in
356639713583Smrg    aix*)
356739713583Smrg      # All AIX code is PIC.
356895b296d0Smrg      if test "$host_cpu" = ia64; then
356939713583Smrg	# AIX 5 now supports IA64 processor
357039713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
357195b296d0Smrg      fi
357239713583Smrg      ;;
357395b296d0Smrg
357439713583Smrg    amigaos*)
357539713583Smrg      case $host_cpu in
357639713583Smrg      powerpc)
357739713583Smrg            # see comment about AmigaOS4 .so support
357839713583Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
357995b296d0Smrg        ;;
358039713583Smrg      m68k)
358139713583Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
358239713583Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
358339713583Smrg            # like `-m68040'.
358439713583Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
358539713583Smrg        ;;
358639713583Smrg      esac
358739713583Smrg      ;;
358895b296d0Smrg
358939713583Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
359039713583Smrg      # PIC is the default for these OSes.
359139713583Smrg      ;;
359239713583Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
359339713583Smrg      # This hack is so that the source file can tell whether it is being
359439713583Smrg      # built for inclusion in a dll (and should export symbols for example).
359539713583Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
359639713583Smrg      # (--disable-auto-import) libraries
359739713583Smrg      m4_if([$1], [GCJ], [],
359839713583Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
359939713583Smrg      ;;
360039713583Smrg    darwin* | rhapsody*)
360139713583Smrg      # PIC is the default on this platform
360239713583Smrg      # Common symbols not allowed in MH_DYLIB files
360339713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
360439713583Smrg      ;;
360539713583Smrg    *djgpp*)
360639713583Smrg      # DJGPP does not support shared libraries at all
360739713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
360839713583Smrg      ;;
360939713583Smrg    interix[[3-9]]*)
361039713583Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
361139713583Smrg      # Instead, we relocate shared libraries at runtime.
361239713583Smrg      ;;
361339713583Smrg    sysv4*MP*)
361439713583Smrg      if test -d /usr/nec; then
361539713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
361639713583Smrg      fi
361739713583Smrg      ;;
361839713583Smrg    hpux*)
361939713583Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
362039713583Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
362139713583Smrg      # sets the default TLS model and affects inlining.
362239713583Smrg      case $host_cpu in
362339713583Smrg      hppa*64*)
362495b296d0Smrg	;;
362595b296d0Smrg      *)
362639713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
362795b296d0Smrg	;;
362839713583Smrg      esac
362995b296d0Smrg      ;;
363039713583Smrg    *qnx* | *nto*)
363139713583Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
363239713583Smrg      # it will coredump.
363339713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
363495b296d0Smrg      ;;
363595b296d0Smrg    *)
363639713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
363795b296d0Smrg      ;;
363895b296d0Smrg    esac
363939713583Smrg  else
364039713583Smrg    case $host_os in
364139713583Smrg      aix[[4-9]]*)
364239713583Smrg	# All AIX code is PIC.
364339713583Smrg	if test "$host_cpu" = ia64; then
364439713583Smrg	  # AIX 5 now supports IA64 processor
364539713583Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
364639713583Smrg	else
364739713583Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
364839713583Smrg	fi
364995b296d0Smrg	;;
365039713583Smrg      chorus*)
365139713583Smrg	case $cc_basename in
365239713583Smrg	cxch68*)
365339713583Smrg	  # Green Hills C++ Compiler
365439713583Smrg	  # _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"
365595b296d0Smrg	  ;;
365695b296d0Smrg	esac
365795b296d0Smrg	;;
365839713583Smrg      dgux*)
365939713583Smrg	case $cc_basename in
366039713583Smrg	  ec++*)
366139713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
366239713583Smrg	    ;;
366339713583Smrg	  ghcx*)
366439713583Smrg	    # Green Hills C++ Compiler
366539713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
366639713583Smrg	    ;;
366739713583Smrg	  *)
366839713583Smrg	    ;;
366939713583Smrg	esac
367039713583Smrg	;;
367139713583Smrg      freebsd* | dragonfly*)
367239713583Smrg	# FreeBSD uses GNU C++
367339713583Smrg	;;
367439713583Smrg      hpux9* | hpux10* | hpux11*)
367539713583Smrg	case $cc_basename in
367639713583Smrg	  CC*)
367739713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
367839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
367939713583Smrg	    if test "$host_cpu" != ia64; then
368039713583Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
368139713583Smrg	    fi
368239713583Smrg	    ;;
368339713583Smrg	  aCC*)
368439713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
368539713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
368695b296d0Smrg	    case $host_cpu in
368739713583Smrg	    hppa*64*|ia64*)
368839713583Smrg	      # +Z the default
368995b296d0Smrg	      ;;
369095b296d0Smrg	    *)
369139713583Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
369295b296d0Smrg	      ;;
369395b296d0Smrg	    esac
369439713583Smrg	    ;;
369539713583Smrg	  *)
369639713583Smrg	    ;;
369795b296d0Smrg	esac
369895b296d0Smrg	;;
369939713583Smrg      interix*)
370039713583Smrg	# This is c89, which is MS Visual C++ (no shared libs)
370139713583Smrg	# Anyone wants to do a port?
370295b296d0Smrg	;;
370339713583Smrg      irix5* | irix6* | nonstopux*)
370439713583Smrg	case $cc_basename in
370539713583Smrg	  CC*)
370639713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
370739713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
370839713583Smrg	    # CC pic flag -KPIC is the default.
370939713583Smrg	    ;;
371039713583Smrg	  *)
371139713583Smrg	    ;;
3712ff89ac2bSmrg	esac
3713ff89ac2bSmrg	;;
371439713583Smrg      linux* | k*bsd*-gnu)
371539713583Smrg	case $cc_basename in
371639713583Smrg	  KCC*)
371739713583Smrg	    # KAI C++ Compiler
371839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
371939713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
372039713583Smrg	    ;;
372139713583Smrg	  ecpc* )
372239713583Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
372339713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
372439713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
372539713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
372639713583Smrg	    ;;
372739713583Smrg	  icpc* )
372839713583Smrg	    # Intel C++, used to be incompatible with GCC.
372939713583Smrg	    # ICC 10 doesn't accept -KPIC any more.
373039713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
373139713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
373239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
373339713583Smrg	    ;;
373439713583Smrg	  pgCC* | pgcpp*)
373539713583Smrg	    # Portland Group C++ compiler
373639713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
373739713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
373839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
373939713583Smrg	    ;;
374039713583Smrg	  cxx*)
374139713583Smrg	    # Compaq C++
374239713583Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
374339713583Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
374439713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
374539713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
374639713583Smrg	    ;;
374739713583Smrg	  xlc* | xlC*)
374839713583Smrg	    # IBM XL 8.0 on PPC
374939713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
375039713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
375139713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
375239713583Smrg	    ;;
375339713583Smrg	  *)
375439713583Smrg	    case `$CC -V 2>&1 | sed 5q` in
375539713583Smrg	    *Sun\ C*)
375639713583Smrg	      # Sun C++ 5.9
375739713583Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
375839713583Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
375939713583Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
376039713583Smrg	      ;;
376139713583Smrg	    esac
376239713583Smrg	    ;;
376339713583Smrg	esac
376495b296d0Smrg	;;
376539713583Smrg      lynxos*)
376695b296d0Smrg	;;
376739713583Smrg      m88k*)
376895b296d0Smrg	;;
376939713583Smrg      mvs*)
377039713583Smrg	case $cc_basename in
377139713583Smrg	  cxx*)
377239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
377339713583Smrg	    ;;
377439713583Smrg	  *)
377539713583Smrg	    ;;
377639713583Smrg	esac
377795b296d0Smrg	;;
377839713583Smrg      netbsd*)
377995b296d0Smrg	;;
378039713583Smrg      *qnx* | *nto*)
378139713583Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
378239713583Smrg        # it will coredump.
378339713583Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
378439713583Smrg        ;;
378539713583Smrg      osf3* | osf4* | osf5*)
378639713583Smrg	case $cc_basename in
378739713583Smrg	  KCC*)
378839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
378939713583Smrg	    ;;
379039713583Smrg	  RCC*)
379139713583Smrg	    # Rational C++ 2.4.1
379239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
379339713583Smrg	    ;;
379439713583Smrg	  cxx*)
379539713583Smrg	    # Digital/Compaq C++
379639713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
379739713583Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
379839713583Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
379939713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
380039713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
380139713583Smrg	    ;;
380239713583Smrg	  *)
380339713583Smrg	    ;;
380439713583Smrg	esac
380595b296d0Smrg	;;
380639713583Smrg      psos*)
380795b296d0Smrg	;;
380839713583Smrg      solaris*)
380939713583Smrg	case $cc_basename in
381039713583Smrg	  CC*)
381139713583Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
381239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
381339713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
381439713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
381539713583Smrg	    ;;
381639713583Smrg	  gcx*)
381739713583Smrg	    # Green Hills C++ Compiler
381839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
381939713583Smrg	    ;;
382095b296d0Smrg	  *)
382195b296d0Smrg	    ;;
382295b296d0Smrg	esac
382395b296d0Smrg	;;
382439713583Smrg      sunos4*)
382539713583Smrg	case $cc_basename in
382639713583Smrg	  CC*)
382739713583Smrg	    # Sun C++ 4.x
382839713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
382939713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
383039713583Smrg	    ;;
383139713583Smrg	  lcc*)
383239713583Smrg	    # Lucid
383339713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
383439713583Smrg	    ;;
3835ff89ac2bSmrg	  *)
3836ff89ac2bSmrg	    ;;
383739713583Smrg	esac
383895b296d0Smrg	;;
383939713583Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
384039713583Smrg	case $cc_basename in
384139713583Smrg	  CC*)
384239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
384339713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
384439713583Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
384539713583Smrg	    ;;
384639713583Smrg	esac
384795b296d0Smrg	;;
384839713583Smrg      tandem*)
384939713583Smrg	case $cc_basename in
385039713583Smrg	  NCC*)
385139713583Smrg	    # NonStop-UX NCC 3.20
385239713583Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
385339713583Smrg	    ;;
385439713583Smrg	  *)
385539713583Smrg	    ;;
385639713583Smrg	esac
385795b296d0Smrg	;;
385839713583Smrg      vxworks*)
385995b296d0Smrg	;;
386095b296d0Smrg      *)
386139713583Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
386295b296d0Smrg	;;
386395b296d0Smrg    esac
386439713583Smrg  fi
386539713583Smrg],
386639713583Smrg[
386739713583Smrg  if test "$GCC" = yes; then
386839713583Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
386939713583Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
387095b296d0Smrg
387139713583Smrg    case $host_os in
387239713583Smrg      aix*)
387339713583Smrg      # All AIX code is PIC.
387439713583Smrg      if test "$host_cpu" = ia64; then
387539713583Smrg	# AIX 5 now supports IA64 processor
387639713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
387739713583Smrg      fi
387839713583Smrg      ;;
387995b296d0Smrg
388039713583Smrg    amigaos*)
388139713583Smrg      case $host_cpu in
388239713583Smrg      powerpc)
388339713583Smrg            # see comment about AmigaOS4 .so support
388439713583Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
388539713583Smrg        ;;
388639713583Smrg      m68k)
388739713583Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
388839713583Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
388939713583Smrg            # like `-m68040'.
389039713583Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
389139713583Smrg        ;;
389239713583Smrg      esac
389339713583Smrg      ;;
389495b296d0Smrg
389539713583Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
389639713583Smrg      # PIC is the default for these OSes.
389739713583Smrg      ;;
389895b296d0Smrg
389939713583Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
390039713583Smrg      # This hack is so that the source file can tell whether it is being
390139713583Smrg      # built for inclusion in a dll (and should export symbols for example).
390239713583Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
390339713583Smrg      # (--disable-auto-import) libraries
390439713583Smrg      m4_if([$1], [GCJ], [],
390539713583Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
390639713583Smrg      ;;
390795b296d0Smrg
390839713583Smrg    darwin* | rhapsody*)
390939713583Smrg      # PIC is the default on this platform
391039713583Smrg      # Common symbols not allowed in MH_DYLIB files
391139713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
391239713583Smrg      ;;
391395b296d0Smrg
391439713583Smrg    hpux*)
391539713583Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
391639713583Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
391739713583Smrg      # sets the default TLS model and affects inlining.
391839713583Smrg      case $host_cpu in
391939713583Smrg      hppa*64*)
392039713583Smrg	# +Z the default
392139713583Smrg	;;
392239713583Smrg      *)
392339713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
392439713583Smrg	;;
392539713583Smrg      esac
392639713583Smrg      ;;
392795b296d0Smrg
392839713583Smrg    interix[[3-9]]*)
392939713583Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
393039713583Smrg      # Instead, we relocate shared libraries at runtime.
393139713583Smrg      ;;
393295b296d0Smrg
393339713583Smrg    msdosdjgpp*)
393439713583Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
393539713583Smrg      # on systems that don't support them.
393639713583Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
393739713583Smrg      enable_shared=no
393839713583Smrg      ;;
393995b296d0Smrg
394039713583Smrg    *nto* | *qnx*)
394139713583Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
394239713583Smrg      # it will coredump.
394339713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
394439713583Smrg      ;;
394595b296d0Smrg
394639713583Smrg    sysv4*MP*)
394739713583Smrg      if test -d /usr/nec; then
394839713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
394939713583Smrg      fi
395039713583Smrg      ;;
395195b296d0Smrg
395239713583Smrg    *)
395339713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
395439713583Smrg      ;;
395595b296d0Smrg    esac
395639713583Smrg  else
395739713583Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
395839713583Smrg    case $host_os in
395939713583Smrg    aix*)
396039713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
396139713583Smrg      if test "$host_cpu" = ia64; then
396239713583Smrg	# AIX 5 now supports IA64 processor
396339713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
396439713583Smrg      else
396539713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
396639713583Smrg      fi
396739713583Smrg      ;;
396895b296d0Smrg
396939713583Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
397039713583Smrg      # This hack is so that the source file can tell whether it is being
397139713583Smrg      # built for inclusion in a dll (and should export symbols for example).
397239713583Smrg      m4_if([$1], [GCJ], [],
397339713583Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
397439713583Smrg      ;;
397595b296d0Smrg
397639713583Smrg    hpux9* | hpux10* | hpux11*)
397739713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
397839713583Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
397939713583Smrg      # not for PA HP-UX.
398039713583Smrg      case $host_cpu in
398139713583Smrg      hppa*64*|ia64*)
398239713583Smrg	# +Z the default
398339713583Smrg	;;
398439713583Smrg      *)
398539713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
398639713583Smrg	;;
398739713583Smrg      esac
398839713583Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
398939713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
399039713583Smrg      ;;
399195b296d0Smrg
399239713583Smrg    irix5* | irix6* | nonstopux*)
399339713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
399439713583Smrg      # PIC (with -KPIC) is the default.
399539713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
399639713583Smrg      ;;
3997ff89ac2bSmrg
399839713583Smrg    linux* | k*bsd*-gnu)
399939713583Smrg      case $cc_basename in
400039713583Smrg      # old Intel for x86_64 which still supported -KPIC.
400139713583Smrg      ecc*)
400239713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
400339713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
400439713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
400539713583Smrg        ;;
400639713583Smrg      # icc used to be incompatible with GCC.
400739713583Smrg      # ICC 10 doesn't accept -KPIC any more.
400839713583Smrg      icc* | ifort*)
400939713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
401039713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
401139713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
401239713583Smrg        ;;
401339713583Smrg      # Lahey Fortran 8.1.
401439713583Smrg      lf95*)
401539713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
401639713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
401739713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
401839713583Smrg	;;
401939713583Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
402039713583Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
402139713583Smrg	# which looks to be a dead project)
402239713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402339713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
402439713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
402539713583Smrg        ;;
402639713583Smrg      ccc*)
402739713583Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402839713583Smrg        # All Alpha code is PIC.
402939713583Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
403039713583Smrg        ;;
403139713583Smrg      xl*)
403239713583Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
403339713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
403439713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
403539713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
403639713583Smrg	;;
403739713583Smrg      *)
403839713583Smrg	case `$CC -V 2>&1 | sed 5q` in
403939713583Smrg	*Sun\ C*)
404039713583Smrg	  # Sun C 5.9
404139713583Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
404239713583Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404339713583Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
404439713583Smrg	  ;;
404539713583Smrg	*Sun\ F*)
404639713583Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
404739713583Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
404839713583Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404939713583Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
405039713583Smrg	  ;;
405139713583Smrg	esac
405239713583Smrg	;;
405339713583Smrg      esac
405439713583Smrg      ;;
405595b296d0Smrg
405639713583Smrg    newsos6)
405739713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
405839713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059ff89ac2bSmrg      ;;
4060ff89ac2bSmrg
406139713583Smrg    *nto* | *qnx*)
406239713583Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
406339713583Smrg      # it will coredump.
406439713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065ff89ac2bSmrg      ;;
4066ff89ac2bSmrg
406739713583Smrg    osf3* | osf4* | osf5*)
406839713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
406939713583Smrg      # All OSF/1 code is PIC.
407039713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
407139713583Smrg      ;;
407295b296d0Smrg
407339713583Smrg    rdos*)
407439713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
407539713583Smrg      ;;
407695b296d0Smrg
407739713583Smrg    solaris*)
407839713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
407939713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
408039713583Smrg      case $cc_basename in
408139713583Smrg      f77* | f90* | f95*)
408239713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
408339713583Smrg      *)
408439713583Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
408539713583Smrg      esac
408639713583Smrg      ;;
408795b296d0Smrg
408839713583Smrg    sunos4*)
408939713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
409039713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
409139713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
409239713583Smrg      ;;
409395b296d0Smrg
409439713583Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
409539713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
409639713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
409739713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
409839713583Smrg      ;;
409995b296d0Smrg
410039713583Smrg    sysv4*MP*)
410139713583Smrg      if test -d /usr/nec ;then
410239713583Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
410339713583Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
410439713583Smrg      fi
410539713583Smrg      ;;
410695b296d0Smrg
410739713583Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
410839713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
410939713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
411039713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
411139713583Smrg      ;;
411295b296d0Smrg
411339713583Smrg    unicos*)
411439713583Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
411539713583Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
411639713583Smrg      ;;
411795b296d0Smrg
411839713583Smrg    uts4*)
411939713583Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
412039713583Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
412139713583Smrg      ;;
412295b296d0Smrg
412339713583Smrg    *)
412439713583Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
412539713583Smrg      ;;
412639713583Smrg    esac
412795b296d0Smrg  fi
412839713583Smrg])
412939713583Smrgcase $host_os in
413039713583Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
413139713583Smrg  *djgpp*)
413239713583Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
413339713583Smrg    ;;
413439713583Smrg  *)
413539713583Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
413639713583Smrg    ;;
413795b296d0Smrgesac
413839713583SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
413939713583Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
414039713583Smrg	[How to pass a linker flag through the compiler])
414195b296d0Smrg
414239713583Smrg#
414339713583Smrg# Check to make sure the PIC flag actually works.
414439713583Smrg#
414539713583Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
414639713583Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
414739713583Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
414839713583Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
414939713583Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
415039713583Smrg     "" | " "*) ;;
415139713583Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
415239713583Smrg     esac],
415339713583Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
415439713583Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
415539713583Smrgfi
415639713583Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
415739713583Smrg	[Additional compiler flags for building library objects])
415895b296d0Smrg
415939713583Smrg#
416039713583Smrg# Check to make sure the static flag actually works.
416139713583Smrg#
416239713583Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
416339713583Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
416439713583Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
416539713583Smrg  $lt_tmp_static_flag,
416639713583Smrg  [],
416739713583Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
416839713583Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
416939713583Smrg	[Compiler flag to prevent dynamic linking])
417039713583Smrg])# _LT_COMPILER_PIC
417195b296d0Smrg
417295b296d0Smrg
417339713583Smrg# _LT_LINKER_SHLIBS([TAGNAME])
417439713583Smrg# ----------------------------
417539713583Smrg# See if the linker supports building shared libraries.
417639713583Smrgm4_defun([_LT_LINKER_SHLIBS],
417739713583Smrg[AC_REQUIRE([LT_PATH_LD])dnl
417839713583SmrgAC_REQUIRE([LT_PATH_NM])dnl
417939713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
418039713583Smrgm4_require([_LT_DECL_EGREP])dnl
418139713583Smrgm4_require([_LT_DECL_SED])dnl
418239713583Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
418339713583Smrgm4_require([_LT_TAG_COMPILER])dnl
418439713583SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
418539713583Smrgm4_if([$1], [CXX], [
418639713583Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
418739713583Smrg  case $host_os in
418839713583Smrg  aix[[4-9]]*)
418939713583Smrg    # If we're using GNU nm, then we don't want the "-C" option.
419039713583Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
419139713583Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
419239713583Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
419339713583Smrg    else
419439713583Smrg      _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'
419539713583Smrg    fi
419639713583Smrg    ;;
419739713583Smrg  pw32*)
419839713583Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
419939713583Smrg  ;;
420039713583Smrg  cygwin* | mingw* | cegcc*)
420139713583Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
420239713583Smrg  ;;
420339713583Smrg  *)
420439713583Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
420539713583Smrg  ;;
420639713583Smrg  esac
420739713583Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
420839713583Smrg], [
420939713583Smrg  runpath_var=
421039713583Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
421139713583Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
421239713583Smrg  _LT_TAGVAR(archive_cmds, $1)=
421339713583Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
421439713583Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
421539713583Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
421639713583Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
421739713583Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
421839713583Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
421939713583Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
422039713583Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
422139713583Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
422239713583Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
422339713583Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
422439713583Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
422539713583Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
422639713583Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
422739713583Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
422839713583Smrg  _LT_TAGVAR(module_cmds, $1)=
422939713583Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
423039713583Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
423139713583Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
423239713583Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
423339713583Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
423439713583Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
423539713583Smrg  # included in the symbol list
423639713583Smrg  _LT_TAGVAR(include_expsyms, $1)=
423739713583Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
423839713583Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
423939713583Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
424039713583Smrg  # as well as any symbol that contains `d'.
424139713583Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
424239713583Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
424339713583Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
424439713583Smrg  # the symbol is explicitly referenced.  Since portable code cannot
424539713583Smrg  # rely on this symbol name, it's probably fine to never include it in
424639713583Smrg  # preloaded symbol tables.
424739713583Smrg  # Exclude shared library initialization/finalization symbols.
424839713583Smrgdnl Note also adjust exclude_expsyms for C++ above.
424939713583Smrg  extract_expsyms_cmds=
425095b296d0Smrg
425139713583Smrg  case $host_os in
425239713583Smrg  cygwin* | mingw* | pw32* | cegcc*)
425339713583Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
425439713583Smrg    # When not using gcc, we currently assume that we are using
425539713583Smrg    # Microsoft Visual C++.
425639713583Smrg    if test "$GCC" != yes; then
425739713583Smrg      with_gnu_ld=no
425839713583Smrg    fi
425939713583Smrg    ;;
426039713583Smrg  interix*)
426139713583Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
426239713583Smrg    with_gnu_ld=yes
426339713583Smrg    ;;
426439713583Smrg  openbsd*)
426539713583Smrg    with_gnu_ld=no
426639713583Smrg    ;;
426739713583Smrg  esac
426895b296d0Smrg
426939713583Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
427039713583Smrg  if test "$with_gnu_ld" = yes; then
427139713583Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
427239713583Smrg    wlarc='${wl}'
427395b296d0Smrg
427439713583Smrg    # Set some defaults for GNU ld with shared library support. These
427539713583Smrg    # are reset later if shared libraries are not supported. Putting them
427639713583Smrg    # here allows them to be overridden if necessary.
427739713583Smrg    runpath_var=LD_RUN_PATH
427839713583Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
427939713583Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
428039713583Smrg    # ancient GNU ld didn't support --whole-archive et. al.
428139713583Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
428239713583Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
428339713583Smrg    else
428439713583Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
428539713583Smrg    fi
428639713583Smrg    supports_anon_versioning=no
428739713583Smrg    case `$LD -v 2>&1` in
428839713583Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
428939713583Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
429039713583Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
429139713583Smrg      *\ 2.11.*) ;; # other 2.11 versions
429239713583Smrg      *) supports_anon_versioning=yes ;;
429339713583Smrg    esac
429495b296d0Smrg
429539713583Smrg    # See if GNU ld supports shared libraries.
429639713583Smrg    case $host_os in
429739713583Smrg    aix[[3-9]]*)
429839713583Smrg      # On AIX/PPC, the GNU linker is very broken
429939713583Smrg      if test "$host_cpu" != ia64; then
430039713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
430139713583Smrg	cat <<_LT_EOF 1>&2
430295b296d0Smrg
430339713583Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
430439713583Smrg*** to be unable to reliably create shared libraries on AIX.
430539713583Smrg*** Therefore, libtool is disabling shared libraries support.  If you
430639713583Smrg*** really care for shared libraries, you may want to modify your PATH
430739713583Smrg*** so that a non-GNU linker is found, and then restart.
430895b296d0Smrg
430939713583Smrg_LT_EOF
431039713583Smrg      fi
431139713583Smrg      ;;
431295b296d0Smrg
431339713583Smrg    amigaos*)
431439713583Smrg      case $host_cpu in
431539713583Smrg      powerpc)
431639713583Smrg            # see comment about AmigaOS4 .so support
431739713583Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
431839713583Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
431939713583Smrg        ;;
432039713583Smrg      m68k)
432139713583Smrg            _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)'
432239713583Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
432339713583Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
432439713583Smrg        ;;
432539713583Smrg      esac
432639713583Smrg      ;;
432795b296d0Smrg
432839713583Smrg    beos*)
432939713583Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
433039713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
433139713583Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
433239713583Smrg	# support --undefined.  This deserves some investigation.  FIXME
433339713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
433439713583Smrg      else
433539713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
433639713583Smrg      fi
433739713583Smrg      ;;
433895b296d0Smrg
433939713583Smrg    cygwin* | mingw* | pw32* | cegcc*)
434039713583Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
434139713583Smrg      # as there is no search path for DLLs.
434239713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
434339713583Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
434439713583Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
434539713583Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
434639713583Smrg      _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'
434739713583Smrg
434839713583Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
434939713583Smrg        _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'
435039713583Smrg	# If the export-symbols file already is a .def file (1st line
435139713583Smrg	# is EXPORTS), use it as is; otherwise, prepend...
435239713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
435339713583Smrg	  cp $export_symbols $output_objdir/$soname.def;
435439713583Smrg	else
435539713583Smrg	  echo EXPORTS > $output_objdir/$soname.def;
435639713583Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
435739713583Smrg	fi~
435839713583Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
435939713583Smrg      else
436039713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
436139713583Smrg      fi
436239713583Smrg      ;;
436395b296d0Smrg
436439713583Smrg    interix[[3-9]]*)
436539713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
436639713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
436739713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
436839713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
436939713583Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
437039713583Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
437139713583Smrg      # default) and relocated if they conflict, which is a slow very memory
437239713583Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
437339713583Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
437439713583Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
437539713583Smrg      _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'
437639713583Smrg      _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'
437739713583Smrg      ;;
437895b296d0Smrg
437939713583Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
438039713583Smrg      tmp_diet=no
438139713583Smrg      if test "$host_os" = linux-dietlibc; then
438239713583Smrg	case $cc_basename in
438339713583Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
438439713583Smrg	esac
438539713583Smrg      fi
438639713583Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
438739713583Smrg	 && test "$tmp_diet" = no
438839713583Smrg      then
438939713583Smrg	tmp_addflag=
439039713583Smrg	tmp_sharedflag='-shared'
439139713583Smrg	case $cc_basename,$host_cpu in
439239713583Smrg        pgcc*)				# Portland Group C compiler
439339713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
439439713583Smrg	  tmp_addflag=' $pic_flag'
439539713583Smrg	  ;;
439639713583Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
439739713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
439839713583Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
439939713583Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
440039713583Smrg	  tmp_addflag=' -i_dynamic' ;;
440139713583Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
440239713583Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
440339713583Smrg	ifc* | ifort*)			# Intel Fortran compiler
440439713583Smrg	  tmp_addflag=' -nofor_main' ;;
440539713583Smrg	lf95*)				# Lahey Fortran 8.1
440639713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
440739713583Smrg	  tmp_sharedflag='--shared' ;;
440839713583Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
440939713583Smrg	  tmp_sharedflag='-qmkshrobj'
441039713583Smrg	  tmp_addflag= ;;
441139713583Smrg	esac
441239713583Smrg	case `$CC -V 2>&1 | sed 5q` in
441339713583Smrg	*Sun\ C*)			# Sun C 5.9
441439713583Smrg	  _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
441539713583Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
441639713583Smrg	  tmp_sharedflag='-G' ;;
441739713583Smrg	*Sun\ F*)			# Sun Fortran 8.3
441839713583Smrg	  tmp_sharedflag='-G' ;;
441939713583Smrg	esac
442039713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
442195b296d0Smrg
442239713583Smrg        if test "x$supports_anon_versioning" = xyes; then
442339713583Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
442439713583Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
442539713583Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
442639713583Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
442739713583Smrg        fi
442895b296d0Smrg
442939713583Smrg	case $cc_basename in
443039713583Smrg	xlf*)
443139713583Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
443239713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
443339713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
443439713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
443539713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
443639713583Smrg	  if test "x$supports_anon_versioning" = xyes; then
443739713583Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
443839713583Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
443939713583Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
444039713583Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
444139713583Smrg	  fi
444239713583Smrg	  ;;
444339713583Smrg	esac
444439713583Smrg      else
444539713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
444639713583Smrg      fi
444739713583Smrg      ;;
444895b296d0Smrg
444939713583Smrg    netbsd*)
445039713583Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
445139713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
445239713583Smrg	wlarc=
445339713583Smrg      else
445439713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
445539713583Smrg	_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'
445639713583Smrg      fi
445739713583Smrg      ;;
445895b296d0Smrg
445939713583Smrg    solaris*)
446039713583Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
446139713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
446239713583Smrg	cat <<_LT_EOF 1>&2
446395b296d0Smrg
446439713583Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
446539713583Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
446639713583Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
446739713583Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
446839713583Smrg*** your PATH or compiler configuration so that the native linker is
446939713583Smrg*** used, and then restart.
447095b296d0Smrg
447139713583Smrg_LT_EOF
447239713583Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
447339713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
447439713583Smrg	_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'
447539713583Smrg      else
447639713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
447739713583Smrg      fi
447839713583Smrg      ;;
447995b296d0Smrg
448039713583Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
448139713583Smrg      case `$LD -v 2>&1` in
448239713583Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
448339713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
448439713583Smrg	cat <<_LT_EOF 1>&2
448595b296d0Smrg
448639713583Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
448739713583Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
448839713583Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
448939713583Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
449039713583Smrg*** your PATH or compiler configuration so that the native linker is
449139713583Smrg*** used, and then restart.
449295b296d0Smrg
449339713583Smrg_LT_EOF
449439713583Smrg	;;
449539713583Smrg	*)
449639713583Smrg	  # For security reasons, it is highly recommended that you always
449739713583Smrg	  # use absolute paths for naming shared libraries, and exclude the
449839713583Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
449939713583Smrg	  # requires that you compile everything twice, which is a pain.
450039713583Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
450139713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
450239713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
450339713583Smrg	    _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'
450439713583Smrg	  else
450539713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
450639713583Smrg	  fi
450739713583Smrg	;;
450839713583Smrg      esac
450939713583Smrg      ;;
451095b296d0Smrg
451139713583Smrg    sunos4*)
451239713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
451339713583Smrg      wlarc=
451439713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
451539713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
451695b296d0Smrg      ;;
451739713583Smrg
451895b296d0Smrg    *)
451939713583Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
452039713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
452139713583Smrg	_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'
452239713583Smrg      else
452339713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
452439713583Smrg      fi
452595b296d0Smrg      ;;
452695b296d0Smrg    esac
452795b296d0Smrg
452839713583Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
452939713583Smrg      runpath_var=
453039713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
453139713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
453239713583Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
453339713583Smrg    fi
453439713583Smrg  else
453539713583Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
453639713583Smrg    case $host_os in
453739713583Smrg    aix3*)
453839713583Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
453939713583Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
454039713583Smrg      _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'
454139713583Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
454239713583Smrg      # are no directories specified by -L.
454339713583Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
454439713583Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
454539713583Smrg	# Neither direct hardcoding nor static linking is supported with a
454639713583Smrg	# broken collect2.
454739713583Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
454839713583Smrg      fi
454939713583Smrg      ;;
455095b296d0Smrg
455139713583Smrg    aix[[4-9]]*)
455239713583Smrg      if test "$host_cpu" = ia64; then
455339713583Smrg	# On IA64, the linker does run time linking by default, so we don't
455439713583Smrg	# have to do anything special.
455539713583Smrg	aix_use_runtimelinking=no
455639713583Smrg	exp_sym_flag='-Bexport'
455739713583Smrg	no_entry_flag=""
455839713583Smrg      else
455939713583Smrg	# If we're using GNU nm, then we don't want the "-C" option.
456039713583Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
456139713583Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
456239713583Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
456339713583Smrg	else
456439713583Smrg	  _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'
456539713583Smrg	fi
456639713583Smrg	aix_use_runtimelinking=no
456795b296d0Smrg
456839713583Smrg	# Test if we are trying to use run time linking or normal
456939713583Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
457039713583Smrg	# need to do runtime linking.
457139713583Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
457239713583Smrg	  for ld_flag in $LDFLAGS; do
457339713583Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
457439713583Smrg	    aix_use_runtimelinking=yes
457539713583Smrg	    break
457639713583Smrg	  fi
457739713583Smrg	  done
457839713583Smrg	  ;;
457939713583Smrg	esac
458095b296d0Smrg
458139713583Smrg	exp_sym_flag='-bexport'
458239713583Smrg	no_entry_flag='-bnoentry'
458339713583Smrg      fi
458495b296d0Smrg
458539713583Smrg      # When large executables or shared objects are built, AIX ld can
458639713583Smrg      # have problems creating the table of contents.  If linking a library
458739713583Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
458839713583Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
458939713583Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
459095b296d0Smrg
459139713583Smrg      _LT_TAGVAR(archive_cmds, $1)=''
459239713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
459339713583Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
459439713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
459539713583Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
459639713583Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
459795b296d0Smrg
459839713583Smrg      if test "$GCC" = yes; then
459939713583Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
460039713583Smrg	# We only want to do this on AIX 4.2 and lower, the check
460139713583Smrg	# below for broken collect2 doesn't work under 4.3+
460239713583Smrg	  collect2name=`${CC} -print-prog-name=collect2`
460339713583Smrg	  if test -f "$collect2name" &&
460439713583Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
460539713583Smrg	  then
460639713583Smrg	  # We have reworked collect2
460739713583Smrg	  :
460839713583Smrg	  else
460939713583Smrg	  # We have old collect2
461039713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
461139713583Smrg	  # It fails to find uninstalled libraries when the uninstalled
461239713583Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
461339713583Smrg	  # to unsupported forces relinking
461439713583Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
461539713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
461639713583Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
461739713583Smrg	  fi
461839713583Smrg	  ;;
461939713583Smrg	esac
462039713583Smrg	shared_flag='-shared'
462139713583Smrg	if test "$aix_use_runtimelinking" = yes; then
462239713583Smrg	  shared_flag="$shared_flag "'${wl}-G'
462339713583Smrg	fi
462439713583Smrg      else
462539713583Smrg	# not using gcc
462639713583Smrg	if test "$host_cpu" = ia64; then
462739713583Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
462839713583Smrg	# chokes on -Wl,-G. The following line is correct:
462939713583Smrg	  shared_flag='-G'
463039713583Smrg	else
463139713583Smrg	  if test "$aix_use_runtimelinking" = yes; then
463239713583Smrg	    shared_flag='${wl}-G'
463339713583Smrg	  else
463439713583Smrg	    shared_flag='${wl}-bM:SRE'
463539713583Smrg	  fi
463639713583Smrg	fi
463739713583Smrg      fi
463895b296d0Smrg
463939713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
464039713583Smrg      # It seems that -bexpall does not export symbols beginning with
464139713583Smrg      # underscore (_), so it is better to generate a list of symbols to export.
464239713583Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
464339713583Smrg      if test "$aix_use_runtimelinking" = yes; then
464439713583Smrg	# Warning - without using the other runtime loading flags (-brtl),
464539713583Smrg	# -berok will link without error, but may produce a broken library.
464639713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
464739713583Smrg        # Determine the default libpath from the value encoded in an
464839713583Smrg        # empty executable.
464939713583Smrg        _LT_SYS_MODULE_PATH_AIX
465039713583Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
465139713583Smrg        _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
465239713583Smrg      else
465339713583Smrg	if test "$host_cpu" = ia64; then
465439713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
465539713583Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
465639713583Smrg	  _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"
465739713583Smrg	else
465839713583Smrg	 # Determine the default libpath from the value encoded in an
465939713583Smrg	 # empty executable.
466039713583Smrg	 _LT_SYS_MODULE_PATH_AIX
466139713583Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
466239713583Smrg	  # Warning - without using the other run time loading flags,
466339713583Smrg	  # -berok will link without error, but may produce a broken library.
466439713583Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
466539713583Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
466639713583Smrg	  # Exported symbols can be pulled into shared objects from archives
466739713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
466839713583Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
466939713583Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
467039713583Smrg	  _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'
467139713583Smrg	fi
467239713583Smrg      fi
467339713583Smrg      ;;
467495b296d0Smrg
467539713583Smrg    amigaos*)
467639713583Smrg      case $host_cpu in
467739713583Smrg      powerpc)
467839713583Smrg            # see comment about AmigaOS4 .so support
467939713583Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
468039713583Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
468139713583Smrg        ;;
468239713583Smrg      m68k)
468339713583Smrg            _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)'
468439713583Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
468539713583Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
468639713583Smrg        ;;
468739713583Smrg      esac
468839713583Smrg      ;;
468995b296d0Smrg
469039713583Smrg    bsdi[[45]]*)
469139713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
469239713583Smrg      ;;
469395b296d0Smrg
469439713583Smrg    cygwin* | mingw* | pw32* | cegcc*)
469539713583Smrg      # When not using gcc, we currently assume that we are using
469639713583Smrg      # Microsoft Visual C++.
469739713583Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
469839713583Smrg      # no search path for DLLs.
469939713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
470039713583Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
470139713583Smrg      # Tell ltmain to make .lib files, not .a files.
470239713583Smrg      libext=lib
470339713583Smrg      # Tell ltmain to make .dll files, not .so files.
470439713583Smrg      shrext_cmds=".dll"
470539713583Smrg      # FIXME: Setting linknames here is a bad hack.
470639713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
470739713583Smrg      # The linker will automatically build a .lib file if we build a DLL.
470839713583Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
470939713583Smrg      # FIXME: Should let the user specify the lib program.
471039713583Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
471139713583Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
471239713583Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
471339713583Smrg      ;;
471495b296d0Smrg
471539713583Smrg    darwin* | rhapsody*)
471639713583Smrg      _LT_DARWIN_LINKER_FEATURES($1)
471739713583Smrg      ;;
471895b296d0Smrg
471939713583Smrg    dgux*)
472039713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
472139713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
472239713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
472339713583Smrg      ;;
472495b296d0Smrg
472539713583Smrg    freebsd1*)
472639713583Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
472739713583Smrg      ;;
472895b296d0Smrg
472939713583Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
473039713583Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
473139713583Smrg    # does not break anything, and helps significantly (at the cost of a little
473239713583Smrg    # extra space).
473339713583Smrg    freebsd2.2*)
473439713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
473539713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
473639713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
473739713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
473839713583Smrg      ;;
473995b296d0Smrg
474039713583Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
474139713583Smrg    freebsd2*)
474239713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
474339713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
474439713583Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
474539713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
474639713583Smrg      ;;
474795b296d0Smrg
474839713583Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
474939713583Smrg    freebsd* | dragonfly*)
475039713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
475139713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
475239713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
475339713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
475439713583Smrg      ;;
475595b296d0Smrg
475639713583Smrg    hpux9*)
475739713583Smrg      if test "$GCC" = yes; then
475839713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
475939713583Smrg      else
476039713583Smrg	_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'
476139713583Smrg      fi
476239713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
476339713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
476439713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
476595b296d0Smrg
476639713583Smrg      # hardcode_minus_L: Not really in the search PATH,
476739713583Smrg      # but as the default location of the library.
476839713583Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
476939713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
477039713583Smrg      ;;
477195b296d0Smrg
477239713583Smrg    hpux10*)
477339713583Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
477439713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
477539713583Smrg      else
477639713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
477739713583Smrg      fi
477839713583Smrg      if test "$with_gnu_ld" = no; then
477939713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
478039713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
478139713583Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
478239713583Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
478339713583Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
478439713583Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
478539713583Smrg	# hardcode_minus_L: Not really in the search PATH,
478639713583Smrg	# but as the default location of the library.
478739713583Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
478839713583Smrg      fi
478939713583Smrg      ;;
479095b296d0Smrg
479139713583Smrg    hpux11*)
479239713583Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
479339713583Smrg	case $host_cpu in
479439713583Smrg	hppa*64*)
479539713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
479639713583Smrg	  ;;
479739713583Smrg	ia64*)
479839713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
479939713583Smrg	  ;;
480039713583Smrg	*)
480139713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
480239713583Smrg	  ;;
480339713583Smrg	esac
480439713583Smrg      else
480539713583Smrg	case $host_cpu in
480639713583Smrg	hppa*64*)
480739713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
480839713583Smrg	  ;;
480939713583Smrg	ia64*)
481039713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
481139713583Smrg	  ;;
481239713583Smrg	*)
481339713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
481439713583Smrg	  ;;
481539713583Smrg	esac
481639713583Smrg      fi
481739713583Smrg      if test "$with_gnu_ld" = no; then
481839713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
481939713583Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
482095b296d0Smrg
482139713583Smrg	case $host_cpu in
482239713583Smrg	hppa*64*|ia64*)
482339713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
482439713583Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
482539713583Smrg	  ;;
482639713583Smrg	*)
482739713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
482839713583Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
482939713583Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
483095b296d0Smrg
483139713583Smrg	  # hardcode_minus_L: Not really in the search PATH,
483239713583Smrg	  # but as the default location of the library.
483339713583Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
483439713583Smrg	  ;;
483539713583Smrg	esac
483639713583Smrg      fi
483739713583Smrg      ;;
483895b296d0Smrg
483939713583Smrg    irix5* | irix6* | nonstopux*)
484039713583Smrg      if test "$GCC" = yes; then
484139713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
484239713583Smrg	# Try to use the -exported_symbol ld option, if it does not
484339713583Smrg	# work, assume that -exports_file does not work either and
484439713583Smrg	# implicitly export all symbols.
484539713583Smrg        save_LDFLAGS="$LDFLAGS"
484639713583Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
484739713583Smrg        AC_LINK_IFELSE(int foo(void) {},
484839713583Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
484939713583Smrg        )
485039713583Smrg        LDFLAGS="$save_LDFLAGS"
485139713583Smrg      else
485239713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
485339713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
485439713583Smrg      fi
485539713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
485639713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
485739713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
485839713583Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
485939713583Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
486039713583Smrg      ;;
486195b296d0Smrg
486239713583Smrg    netbsd*)
486339713583Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
486439713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
486539713583Smrg      else
486639713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
486739713583Smrg      fi
486839713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
486939713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
487039713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
487139713583Smrg      ;;
487295b296d0Smrg
487339713583Smrg    newsos6)
487439713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
487539713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
487639713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
487739713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
487839713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
487939713583Smrg      ;;
488095b296d0Smrg
488139713583Smrg    *nto* | *qnx*)
488239713583Smrg      ;;
488395b296d0Smrg
488439713583Smrg    openbsd*)
488539713583Smrg      if test -f /usr/libexec/ld.so; then
488639713583Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
488739713583Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
488839713583Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
488939713583Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
489039713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
489139713583Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
489239713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
489339713583Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
489439713583Smrg	else
489539713583Smrg	  case $host_os in
489639713583Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
489739713583Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
489839713583Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
489939713583Smrg	     ;;
490039713583Smrg	   *)
490139713583Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
490239713583Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
490339713583Smrg	     ;;
490439713583Smrg	  esac
490539713583Smrg	fi
490639713583Smrg      else
490739713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
490839713583Smrg      fi
490939713583Smrg      ;;
491095b296d0Smrg
491139713583Smrg    os2*)
491239713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
491339713583Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
491439713583Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
491539713583Smrg      _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'
491639713583Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
491739713583Smrg      ;;
491895b296d0Smrg
491939713583Smrg    osf3*)
492039713583Smrg      if test "$GCC" = yes; then
492139713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
492239713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
492339713583Smrg      else
492439713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
492539713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
492639713583Smrg      fi
492739713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
492839713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
492939713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
493039713583Smrg      ;;
493195b296d0Smrg
493239713583Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
493339713583Smrg      if test "$GCC" = yes; then
493439713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
493539713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
493639713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
493739713583Smrg      else
493839713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
493939713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
494039713583Smrg	_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~
494139713583Smrg	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
494295b296d0Smrg
494339713583Smrg	# Both c and cxx compiler support -rpath directly
494439713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
494539713583Smrg      fi
494639713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
494739713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
494839713583Smrg      ;;
494995b296d0Smrg
495039713583Smrg    solaris*)
495139713583Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
495239713583Smrg      if test "$GCC" = yes; then
495339713583Smrg	wlarc='${wl}'
495439713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
495539713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
495639713583Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
495739713583Smrg      else
495839713583Smrg	case `$CC -V 2>&1` in
495939713583Smrg	*"Compilers 5.0"*)
496039713583Smrg	  wlarc=''
496139713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
496239713583Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496339713583Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
496439713583Smrg	  ;;
496539713583Smrg	*)
496639713583Smrg	  wlarc='${wl}'
496739713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
496839713583Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496939713583Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
497039713583Smrg	  ;;
497139713583Smrg	esac
497239713583Smrg      fi
497339713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
497439713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
497539713583Smrg      case $host_os in
497639713583Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
497739713583Smrg      *)
497839713583Smrg	# The compiler driver will combine and reorder linker options,
497939713583Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
498039713583Smrg	# but is careful enough not to reorder.
498139713583Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
498239713583Smrg	if test "$GCC" = yes; then
498339713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
498439713583Smrg	else
498539713583Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
498639713583Smrg	fi
498739713583Smrg	;;
498839713583Smrg      esac
498939713583Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
499039713583Smrg      ;;
499195b296d0Smrg
499239713583Smrg    sunos4*)
499339713583Smrg      if test "x$host_vendor" = xsequent; then
499439713583Smrg	# Use $CC to link under sequent, because it throws in some extra .o
499539713583Smrg	# files that make .init and .fini sections work.
499639713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
499739713583Smrg      else
499839713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
499939713583Smrg      fi
500039713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
500139713583Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
500239713583Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
500339713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
500439713583Smrg      ;;
500595b296d0Smrg
500639713583Smrg    sysv4)
500739713583Smrg      case $host_vendor in
500839713583Smrg	sni)
500939713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
501039713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
501139713583Smrg	;;
501239713583Smrg	siemens)
501339713583Smrg	  ## LD is ld it makes a PLAMLIB
501439713583Smrg	  ## CC just makes a GrossModule.
501539713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
501639713583Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
501739713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
501839713583Smrg        ;;
501939713583Smrg	motorola)
502039713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
502139713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
502239713583Smrg	;;
502339713583Smrg      esac
502439713583Smrg      runpath_var='LD_RUN_PATH'
502539713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
502639713583Smrg      ;;
502795b296d0Smrg
502839713583Smrg    sysv4.3*)
502939713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
503039713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
503139713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
503239713583Smrg      ;;
503395b296d0Smrg
503439713583Smrg    sysv4*MP*)
503539713583Smrg      if test -d /usr/nec; then
503639713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
503739713583Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
503839713583Smrg	runpath_var=LD_RUN_PATH
503939713583Smrg	hardcode_runpath_var=yes
504039713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
504139713583Smrg      fi
504239713583Smrg      ;;
504395b296d0Smrg
504439713583Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
504539713583Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
504639713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
504739713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
504839713583Smrg      runpath_var='LD_RUN_PATH'
504995b296d0Smrg
505039713583Smrg      if test "$GCC" = yes; then
505139713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505239713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505339713583Smrg      else
505439713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505539713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505639713583Smrg      fi
505739713583Smrg      ;;
505895b296d0Smrg
505939713583Smrg    sysv5* | sco3.2v5* | sco5v6*)
506039713583Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
506139713583Smrg      # link with -lc, and that would cause any symbols used from libc to
506239713583Smrg      # always be unresolved, which means just about no library would
506339713583Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
506439713583Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
506539713583Smrg      # as -z defs.
506639713583Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
506739713583Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
506839713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
506939713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
507039713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
507139713583Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
507239713583Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
507339713583Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
507439713583Smrg      runpath_var='LD_RUN_PATH'
507595b296d0Smrg
507639713583Smrg      if test "$GCC" = yes; then
507739713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507839713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507939713583Smrg      else
508039713583Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
508139713583Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
508239713583Smrg      fi
508339713583Smrg      ;;
508495b296d0Smrg
508539713583Smrg    uts4*)
508639713583Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
508739713583Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
508839713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
508939713583Smrg      ;;
509095b296d0Smrg
509139713583Smrg    *)
509239713583Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
509339713583Smrg      ;;
509439713583Smrg    esac
509595b296d0Smrg
509639713583Smrg    if test x$host_vendor = xsni; then
509739713583Smrg      case $host in
509839713583Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
509939713583Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
510039713583Smrg	;;
510139713583Smrg      esac
510239713583Smrg    fi
510339713583Smrg  fi
510439713583Smrg])
510539713583SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
510639713583Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
510795b296d0Smrg
510839713583Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
510995b296d0Smrg
511039713583Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
511139713583Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
511239713583Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
511339713583Smrg    [The commands to extract the exported symbol list from a shared archive])
511495b296d0Smrg
511539713583Smrg#
511639713583Smrg# Do we need to explicitly link libc?
511739713583Smrg#
511839713583Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
511939713583Smrgx|xyes)
512039713583Smrg  # Assume -lc should be added
512139713583Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
512295b296d0Smrg
512339713583Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
512439713583Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
512539713583Smrg    *'~'*)
512639713583Smrg      # FIXME: we may have to deal with multi-command sequences.
512739713583Smrg      ;;
512839713583Smrg    '$CC '*)
512939713583Smrg      # Test whether the compiler implicitly links with -lc since on some
513039713583Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
513139713583Smrg      # to ld, don't add -lc before -lgcc.
513239713583Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
513339713583Smrg      $RM conftest*
513439713583Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
513595b296d0Smrg
513639713583Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
513739713583Smrg        soname=conftest
513839713583Smrg        lib=conftest
513939713583Smrg        libobjs=conftest.$ac_objext
514039713583Smrg        deplibs=
514139713583Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
514239713583Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
514339713583Smrg        compiler_flags=-v
514439713583Smrg        linker_flags=-v
514539713583Smrg        verstring=
514639713583Smrg        output_objdir=.
514739713583Smrg        libname=conftest
514839713583Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
514939713583Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
515039713583Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
515139713583Smrg        then
515239713583Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
515339713583Smrg        else
515439713583Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
515539713583Smrg        fi
515639713583Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
515739713583Smrg      else
515839713583Smrg        cat conftest.err 1>&5
515939713583Smrg      fi
516039713583Smrg      $RM conftest*
516139713583Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
516239713583Smrg      ;;
516339713583Smrg    esac
516439713583Smrg  fi
516539713583Smrg  ;;
516639713583Smrgesac
516795b296d0Smrg
516839713583Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
516939713583Smrg    [Whether or not to add -lc for building shared libraries])
517039713583Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
517139713583Smrg    [enable_shared_with_static_runtimes], [0],
517239713583Smrg    [Whether or not to disallow shared libs when runtime libs are static])
517339713583Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
517439713583Smrg    [Compiler flag to allow reflexive dlopens])
517539713583Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
517639713583Smrg    [Compiler flag to generate shared objects directly from archives])
517739713583Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
517839713583Smrg    [Whether the compiler copes with passing no objects directly])
517939713583Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
518039713583Smrg    [Create an old-style archive from a shared archive])
518139713583Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
518239713583Smrg    [Create a temporary old-style archive to link instead of a shared archive])
518339713583Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
518439713583Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
518539713583Smrg_LT_TAGDECL([], [module_cmds], [2],
518639713583Smrg    [Commands used to build a loadable module if different from building
518739713583Smrg    a shared archive.])
518839713583Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
518939713583Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
519039713583Smrg    [Whether we are building with GNU ld or not])
519139713583Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
519239713583Smrg    [Flag that allows shared libraries with undefined symbols to be built])
519339713583Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
519439713583Smrg    [Flag that enforces no undefined symbols])
519539713583Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
519639713583Smrg    [Flag to hardcode $libdir into a binary during linking.
519739713583Smrg    This must work even if $libdir does not exist])
519839713583Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
519939713583Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
520039713583Smrg    during linking.  This must work even if $libdir does not exist]])
520139713583Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
520239713583Smrg    [Whether we need a single "-rpath" flag with a separated argument])
520339713583Smrg_LT_TAGDECL([], [hardcode_direct], [0],
520439713583Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520539713583Smrg    DIR into the resulting binary])
520639713583Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
520739713583Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520839713583Smrg    DIR into the resulting binary and the resulting library dependency is
520939713583Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
521039713583Smrg    library is relocated])
521139713583Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
521239713583Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
521339713583Smrg    into the resulting binary])
521439713583Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
521539713583Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
521639713583Smrg    into the resulting binary])
521739713583Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
521839713583Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
521939713583Smrg    into the library and all subsequent libraries and executables linked
522039713583Smrg    against it])
522139713583Smrg_LT_TAGDECL([], [inherit_rpath], [0],
522239713583Smrg    [Set to yes if linker adds runtime paths of dependent libraries
522339713583Smrg    to runtime path list])
522439713583Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
522539713583Smrg    [Whether libtool must link a program against all its dependency libraries])
522639713583Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
522739713583Smrg    [Fix the shell variable $srcfile for the compiler])
522839713583Smrg_LT_TAGDECL([], [always_export_symbols], [0],
522939713583Smrg    [Set to "yes" if exported symbols are required])
523039713583Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
523139713583Smrg    [The commands to list exported symbols])
523239713583Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
523339713583Smrg    [Symbols that should not be listed in the preloaded symbols])
523439713583Smrg_LT_TAGDECL([], [include_expsyms], [1],
523539713583Smrg    [Symbols that must always be exported])
523639713583Smrg_LT_TAGDECL([], [prelink_cmds], [2],
523739713583Smrg    [Commands necessary for linking programs (against libraries) with templates])
523839713583Smrg_LT_TAGDECL([], [file_list_spec], [1],
523939713583Smrg    [Specify filename containing input files])
524039713583Smrgdnl FIXME: Not yet implemented
524139713583Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
524239713583Smrgdnl    [Compiler flag to generate thread safe objects])
524339713583Smrg])# _LT_LINKER_SHLIBS
524439713583Smrg
524539713583Smrg
524639713583Smrg# _LT_LANG_C_CONFIG([TAG])
524739713583Smrg# ------------------------
524839713583Smrg# Ensure that the configuration variables for a C compiler are suitably
524939713583Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
525039713583Smrg# the compiler configuration to `libtool'.
525139713583Smrgm4_defun([_LT_LANG_C_CONFIG],
525239713583Smrg[m4_require([_LT_DECL_EGREP])dnl
525339713583Smrglt_save_CC="$CC"
525439713583SmrgAC_LANG_PUSH(C)
525595b296d0Smrg
525639713583Smrg# Source file extension for C test sources.
525739713583Smrgac_ext=c
525895b296d0Smrg
525939713583Smrg# Object file extension for compiled C test sources.
526039713583Smrgobjext=o
526139713583Smrg_LT_TAGVAR(objext, $1)=$objext
526295b296d0Smrg
526339713583Smrg# Code to be used in simple compile tests
526439713583Smrglt_simple_compile_test_code="int some_variable = 0;"
526595b296d0Smrg
526639713583Smrg# Code to be used in simple link tests
526739713583Smrglt_simple_link_test_code='int main(){return(0);}'
526895b296d0Smrg
526939713583Smrg_LT_TAG_COMPILER
527039713583Smrg# Save the default compiler, since it gets overwritten when the other
527139713583Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
527239713583Smrgcompiler_DEFAULT=$CC
527395b296d0Smrg
527439713583Smrg# save warnings/boilerplate of simple test code
527539713583Smrg_LT_COMPILER_BOILERPLATE
527639713583Smrg_LT_LINKER_BOILERPLATE
527795b296d0Smrg
527839713583Smrgif test -n "$compiler"; then
527939713583Smrg  _LT_COMPILER_NO_RTTI($1)
528039713583Smrg  _LT_COMPILER_PIC($1)
528139713583Smrg  _LT_COMPILER_C_O($1)
528239713583Smrg  _LT_COMPILER_FILE_LOCKS($1)
528339713583Smrg  _LT_LINKER_SHLIBS($1)
528439713583Smrg  _LT_SYS_DYNAMIC_LINKER($1)
528539713583Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
528639713583Smrg  LT_SYS_DLOPEN_SELF
528739713583Smrg  _LT_CMD_STRIPLIB
528839713583Smrg
528939713583Smrg  # Report which library types will actually be built
529039713583Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
529139713583Smrg  AC_MSG_RESULT([$can_build_shared])
529239713583Smrg
529339713583Smrg  AC_MSG_CHECKING([whether to build shared libraries])
529439713583Smrg  test "$can_build_shared" = "no" && enable_shared=no
529539713583Smrg
529639713583Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
529739713583Smrg  # are all built from PIC.
529839713583Smrg  case $host_os in
529939713583Smrg  aix3*)
530039713583Smrg    test "$enable_shared" = yes && enable_static=no
530139713583Smrg    if test -n "$RANLIB"; then
530239713583Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
530339713583Smrg      postinstall_cmds='$RANLIB $lib'
530439713583Smrg    fi
530539713583Smrg    ;;
530695b296d0Smrg
530739713583Smrg  aix[[4-9]]*)
530839713583Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
530939713583Smrg      test "$enable_shared" = yes && enable_static=no
531039713583Smrg    fi
531139713583Smrg    ;;
531239713583Smrg  esac
531339713583Smrg  AC_MSG_RESULT([$enable_shared])
531495b296d0Smrg
531539713583Smrg  AC_MSG_CHECKING([whether to build static libraries])
531639713583Smrg  # Make sure either enable_shared or enable_static is yes.
531739713583Smrg  test "$enable_shared" = yes || enable_static=yes
531839713583Smrg  AC_MSG_RESULT([$enable_static])
531995b296d0Smrg
532039713583Smrg  _LT_CONFIG($1)
532139713583Smrgfi
532239713583SmrgAC_LANG_POP
532339713583SmrgCC="$lt_save_CC"
532439713583Smrg])# _LT_LANG_C_CONFIG
532595b296d0Smrg
532695b296d0Smrg
532739713583Smrg# _LT_PROG_CXX
532839713583Smrg# ------------
532939713583Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
533039713583Smrg# compiler, we have our own version here.
533139713583Smrgm4_defun([_LT_PROG_CXX],
533239713583Smrg[
533339713583Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
533439713583SmrgAC_PROG_CXX
533539713583Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
533639713583Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
533739713583Smrg    (test "X$CXX" != "Xg++"))) ; then
533839713583Smrg  AC_PROG_CXXCPP
533939713583Smrgelse
534039713583Smrg  _lt_caught_CXX_error=yes
534139713583Smrgfi
534239713583Smrgpopdef([AC_MSG_ERROR])
534339713583Smrg])# _LT_PROG_CXX
534495b296d0Smrg
534539713583Smrgdnl aclocal-1.4 backwards compatibility:
534639713583Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347ff89ac2bSmrg
534895b296d0Smrg
534939713583Smrg# _LT_LANG_CXX_CONFIG([TAG])
535039713583Smrg# --------------------------
535139713583Smrg# Ensure that the configuration variables for a C++ compiler are suitably
535239713583Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
535339713583Smrg# the compiler configuration to `libtool'.
535439713583Smrgm4_defun([_LT_LANG_CXX_CONFIG],
535539713583Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
535639713583Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
535739713583Smrgm4_require([_LT_DECL_EGREP])dnl
535839713583Smrg
535939713583SmrgAC_LANG_PUSH(C++)
536039713583Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
536139713583Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
536239713583Smrg_LT_TAGVAR(always_export_symbols, $1)=no
536339713583Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
536439713583Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
536539713583Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
536639713583Smrg_LT_TAGVAR(hardcode_direct, $1)=no
536739713583Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
536839713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
536939713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
537039713583Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
537139713583Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
537239713583Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
537339713583Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
537439713583Smrg_LT_TAGVAR(inherit_rpath, $1)=no
537539713583Smrg_LT_TAGVAR(module_cmds, $1)=
537639713583Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
537739713583Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
537839713583Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
537939713583Smrg_LT_TAGVAR(no_undefined_flag, $1)=
538039713583Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
538139713583Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
538295b296d0Smrg
538339713583Smrg# Source file extension for C++ test sources.
538439713583Smrgac_ext=cpp
538595b296d0Smrg
538639713583Smrg# Object file extension for compiled C++ test sources.
538739713583Smrgobjext=o
538839713583Smrg_LT_TAGVAR(objext, $1)=$objext
538939713583Smrg
539039713583Smrg# No sense in running all these tests if we already determined that
539139713583Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
539239713583Smrg# are currently assumed to apply to all compilers on this platform,
539339713583Smrg# and will be corrupted by setting them based on a non-working compiler.
539439713583Smrgif test "$_lt_caught_CXX_error" != yes; then
539539713583Smrg  # Code to be used in simple compile tests
539639713583Smrg  lt_simple_compile_test_code="int some_variable = 0;"
539739713583Smrg
539839713583Smrg  # Code to be used in simple link tests
539939713583Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
540039713583Smrg
540139713583Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
540239713583Smrg  _LT_TAG_COMPILER
540339713583Smrg
540439713583Smrg  # save warnings/boilerplate of simple test code
540539713583Smrg  _LT_COMPILER_BOILERPLATE
540639713583Smrg  _LT_LINKER_BOILERPLATE
540739713583Smrg
540839713583Smrg  # Allow CC to be a program name with arguments.
540939713583Smrg  lt_save_CC=$CC
541039713583Smrg  lt_save_LD=$LD
541139713583Smrg  lt_save_GCC=$GCC
541239713583Smrg  GCC=$GXX
541339713583Smrg  lt_save_with_gnu_ld=$with_gnu_ld
541439713583Smrg  lt_save_path_LD=$lt_cv_path_LD
541539713583Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
541639713583Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
541739713583Smrg  else
541839713583Smrg    $as_unset lt_cv_prog_gnu_ld
541939713583Smrg  fi
542039713583Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
542139713583Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
542239713583Smrg  else
542339713583Smrg    $as_unset lt_cv_path_LD
542439713583Smrg  fi
542539713583Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
542639713583Smrg  CC=${CXX-"c++"}
542739713583Smrg  compiler=$CC
542839713583Smrg  _LT_TAGVAR(compiler, $1)=$CC
542939713583Smrg  _LT_CC_BASENAME([$compiler])
543095b296d0Smrg
543139713583Smrg  if test -n "$compiler"; then
543239713583Smrg    # We don't want -fno-exception when compiling C++ code, so set the
543339713583Smrg    # no_builtin_flag separately
543439713583Smrg    if test "$GXX" = yes; then
543539713583Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
543639713583Smrg    else
543739713583Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
543839713583Smrg    fi
543995b296d0Smrg
544039713583Smrg    if test "$GXX" = yes; then
544139713583Smrg      # Set up default GNU C++ configuration
544295b296d0Smrg
544339713583Smrg      LT_PATH_LD
544495b296d0Smrg
544539713583Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
544639713583Smrg      # archiving commands below assume that GNU ld is being used.
544739713583Smrg      if test "$with_gnu_ld" = yes; then
544839713583Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
544939713583Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
545095b296d0Smrg
545139713583Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
545239713583Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
545395b296d0Smrg
545439713583Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
545539713583Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
545639713583Smrg        #     investigate it a little bit more. (MM)
545739713583Smrg        wlarc='${wl}'
545895b296d0Smrg
545939713583Smrg        # ancient GNU ld didn't support --whole-archive et. al.
546039713583Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
546139713583Smrg	  $GREP 'no-whole-archive' > /dev/null; then
546239713583Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
546339713583Smrg        else
546439713583Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
546539713583Smrg        fi
546639713583Smrg      else
546739713583Smrg        with_gnu_ld=no
546839713583Smrg        wlarc=
546939713583Smrg
547039713583Smrg        # A generic and very simple default shared library creation
547139713583Smrg        # command for GNU C++ for the case where it uses the native
547239713583Smrg        # linker, instead of GNU ld.  If possible, this setting should
547339713583Smrg        # overridden to take advantage of the native linker features on
547439713583Smrg        # the platform it is being used on.
547539713583Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
547639713583Smrg      fi
547795b296d0Smrg
547839713583Smrg      # Commands to make compiler produce verbose output that lists
547939713583Smrg      # what "hidden" libraries, object files and flags are used when
548039713583Smrg      # linking a shared library.
548139713583Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
548295b296d0Smrg
548339713583Smrg    else
548439713583Smrg      GXX=no
548539713583Smrg      with_gnu_ld=no
548639713583Smrg      wlarc=
548739713583Smrg    fi
548895b296d0Smrg
548939713583Smrg    # PORTME: fill in a description of your system's C++ link characteristics
549039713583Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
549139713583Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
549239713583Smrg    case $host_os in
549339713583Smrg      aix3*)
549439713583Smrg        # FIXME: insert proper C++ library support
549539713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
549639713583Smrg        ;;
549739713583Smrg      aix[[4-9]]*)
549839713583Smrg        if test "$host_cpu" = ia64; then
549939713583Smrg          # On IA64, the linker does run time linking by default, so we don't
550039713583Smrg          # have to do anything special.
550139713583Smrg          aix_use_runtimelinking=no
550239713583Smrg          exp_sym_flag='-Bexport'
550339713583Smrg          no_entry_flag=""
550439713583Smrg        else
550539713583Smrg          aix_use_runtimelinking=no
550639713583Smrg
550739713583Smrg          # Test if we are trying to use run time linking or normal
550839713583Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
550939713583Smrg          # need to do runtime linking.
551039713583Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
551139713583Smrg	    for ld_flag in $LDFLAGS; do
551239713583Smrg	      case $ld_flag in
551339713583Smrg	      *-brtl*)
551439713583Smrg	        aix_use_runtimelinking=yes
551539713583Smrg	        break
551639713583Smrg	        ;;
551739713583Smrg	      esac
551839713583Smrg	    done
551939713583Smrg	    ;;
552039713583Smrg          esac
552195b296d0Smrg
552239713583Smrg          exp_sym_flag='-bexport'
552339713583Smrg          no_entry_flag='-bnoentry'
552439713583Smrg        fi
552595b296d0Smrg
552639713583Smrg        # When large executables or shared objects are built, AIX ld can
552739713583Smrg        # have problems creating the table of contents.  If linking a library
552839713583Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
552939713583Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
553039713583Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
553139713583Smrg
553239713583Smrg        _LT_TAGVAR(archive_cmds, $1)=''
553339713583Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
553439713583Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
553539713583Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
553639713583Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
553739713583Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
553839713583Smrg
553939713583Smrg        if test "$GXX" = yes; then
554039713583Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
554139713583Smrg          # We only want to do this on AIX 4.2 and lower, the check
554239713583Smrg          # below for broken collect2 doesn't work under 4.3+
554339713583Smrg	  collect2name=`${CC} -print-prog-name=collect2`
554439713583Smrg	  if test -f "$collect2name" &&
554539713583Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
554639713583Smrg	  then
554739713583Smrg	    # We have reworked collect2
554839713583Smrg	    :
554939713583Smrg	  else
555039713583Smrg	    # We have old collect2
555139713583Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
555239713583Smrg	    # It fails to find uninstalled libraries when the uninstalled
555339713583Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
555439713583Smrg	    # to unsupported forces relinking
555539713583Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
555639713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
555739713583Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
555839713583Smrg	  fi
555939713583Smrg          esac
556039713583Smrg          shared_flag='-shared'
556139713583Smrg	  if test "$aix_use_runtimelinking" = yes; then
556239713583Smrg	    shared_flag="$shared_flag "'${wl}-G'
556339713583Smrg	  fi
556439713583Smrg        else
556539713583Smrg          # not using gcc
556639713583Smrg          if test "$host_cpu" = ia64; then
556739713583Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
556839713583Smrg	  # chokes on -Wl,-G. The following line is correct:
556939713583Smrg	  shared_flag='-G'
557039713583Smrg          else
557139713583Smrg	    if test "$aix_use_runtimelinking" = yes; then
557239713583Smrg	      shared_flag='${wl}-G'
557339713583Smrg	    else
557439713583Smrg	      shared_flag='${wl}-bM:SRE'
557539713583Smrg	    fi
557639713583Smrg          fi
557739713583Smrg        fi
557895b296d0Smrg
557939713583Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
558039713583Smrg        # It seems that -bexpall does not export symbols beginning with
558139713583Smrg        # underscore (_), so it is better to generate a list of symbols to
558239713583Smrg	# export.
558339713583Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
558439713583Smrg        if test "$aix_use_runtimelinking" = yes; then
558539713583Smrg          # Warning - without using the other runtime loading flags (-brtl),
558639713583Smrg          # -berok will link without error, but may produce a broken library.
558739713583Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
558839713583Smrg          # Determine the default libpath from the value encoded in an empty
558939713583Smrg          # executable.
559039713583Smrg          _LT_SYS_MODULE_PATH_AIX
559139713583Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
559239713583Smrg
559339713583Smrg          _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
559439713583Smrg        else
559539713583Smrg          if test "$host_cpu" = ia64; then
559639713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
559739713583Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
559839713583Smrg	    _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"
559939713583Smrg          else
560039713583Smrg	    # Determine the default libpath from the value encoded in an
560139713583Smrg	    # empty executable.
560239713583Smrg	    _LT_SYS_MODULE_PATH_AIX
560339713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
560439713583Smrg	    # Warning - without using the other run time loading flags,
560539713583Smrg	    # -berok will link without error, but may produce a broken library.
560639713583Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
560739713583Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
560839713583Smrg	    # Exported symbols can be pulled into shared objects from archives
560939713583Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
561039713583Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
561139713583Smrg	    # This is similar to how AIX traditionally builds its shared
561239713583Smrg	    # libraries.
561339713583Smrg	    _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'
561439713583Smrg          fi
561539713583Smrg        fi
561639713583Smrg        ;;
561795b296d0Smrg
561839713583Smrg      beos*)
561939713583Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
562039713583Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
562139713583Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
562239713583Smrg	  # support --undefined.  This deserves some investigation.  FIXME
562339713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
562439713583Smrg	else
562539713583Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
562639713583Smrg	fi
562739713583Smrg	;;
562895b296d0Smrg
562939713583Smrg      chorus*)
563039713583Smrg        case $cc_basename in
563139713583Smrg          *)
563239713583Smrg	  # FIXME: insert proper C++ library support
563339713583Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
563439713583Smrg	  ;;
563539713583Smrg        esac
563639713583Smrg        ;;
563795b296d0Smrg
563839713583Smrg      cygwin* | mingw* | pw32* | cegcc*)
563939713583Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
564039713583Smrg        # as there is no search path for DLLs.
564139713583Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
564239713583Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
564339713583Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
564439713583Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
564539713583Smrg
564639713583Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
564739713583Smrg          _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'
564839713583Smrg          # If the export-symbols file already is a .def file (1st line
564939713583Smrg          # is EXPORTS), use it as is; otherwise, prepend...
565039713583Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
565139713583Smrg	    cp $export_symbols $output_objdir/$soname.def;
565239713583Smrg          else
565339713583Smrg	    echo EXPORTS > $output_objdir/$soname.def;
565439713583Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
565539713583Smrg          fi~
565639713583Smrg          $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'
565739713583Smrg        else
565839713583Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
565939713583Smrg        fi
566039713583Smrg        ;;
566139713583Smrg      darwin* | rhapsody*)
566239713583Smrg        _LT_DARWIN_LINKER_FEATURES($1)
566339713583Smrg	;;
566495b296d0Smrg
566539713583Smrg      dgux*)
566639713583Smrg        case $cc_basename in
566739713583Smrg          ec++*)
566839713583Smrg	    # FIXME: insert proper C++ library support
566939713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567039713583Smrg	    ;;
567139713583Smrg          ghcx*)
567239713583Smrg	    # Green Hills C++ Compiler
567339713583Smrg	    # FIXME: insert proper C++ library support
567439713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567539713583Smrg	    ;;
567639713583Smrg          *)
567739713583Smrg	    # FIXME: insert proper C++ library support
567839713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567939713583Smrg	    ;;
568039713583Smrg        esac
568139713583Smrg        ;;
568295b296d0Smrg
568339713583Smrg      freebsd[[12]]*)
568439713583Smrg        # C++ shared libraries reported to be fairly broken before
568539713583Smrg	# switch to ELF
568639713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
568739713583Smrg        ;;
568895b296d0Smrg
568939713583Smrg      freebsd-elf*)
569039713583Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
569139713583Smrg        ;;
569295b296d0Smrg
569339713583Smrg      freebsd* | dragonfly*)
569439713583Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
569539713583Smrg        # conventions
569639713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
569739713583Smrg        ;;
569895b296d0Smrg
569939713583Smrg      gnu*)
570039713583Smrg        ;;
570195b296d0Smrg
570239713583Smrg      hpux9*)
570339713583Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
570439713583Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
570539713583Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
570639713583Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
570739713583Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
570839713583Smrg				             # but as the default
570939713583Smrg				             # location of the library.
571039713583Smrg
571139713583Smrg        case $cc_basename in
571239713583Smrg          CC*)
571339713583Smrg            # FIXME: insert proper C++ library support
571439713583Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
571539713583Smrg            ;;
571639713583Smrg          aCC*)
571739713583Smrg            _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'
571839713583Smrg            # Commands to make compiler produce verbose output that lists
571939713583Smrg            # what "hidden" libraries, object files and flags are used when
572039713583Smrg            # linking a shared library.
572139713583Smrg            #
572239713583Smrg            # There doesn't appear to be a way to prevent this compiler from
572339713583Smrg            # explicitly linking system object files so we need to strip them
572439713583Smrg            # from the output so that they don't get included in the library
572539713583Smrg            # dependencies.
572639713583Smrg            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; $ECHO "X$list" | $Xsed'
572739713583Smrg            ;;
572839713583Smrg          *)
572939713583Smrg            if test "$GXX" = yes; then
573039713583Smrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
573139713583Smrg            else
573239713583Smrg              # FIXME: insert proper C++ library support
573339713583Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
573439713583Smrg            fi
573539713583Smrg            ;;
573639713583Smrg        esac
573739713583Smrg        ;;
573895b296d0Smrg
573939713583Smrg      hpux10*|hpux11*)
574039713583Smrg        if test $with_gnu_ld = no; then
574139713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
574239713583Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
574339713583Smrg
574439713583Smrg          case $host_cpu in
574539713583Smrg            hppa*64*|ia64*)
574639713583Smrg              ;;
574739713583Smrg            *)
574839713583Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
574939713583Smrg              ;;
575039713583Smrg          esac
575139713583Smrg        fi
575239713583Smrg        case $host_cpu in
575339713583Smrg          hppa*64*|ia64*)
575439713583Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
575539713583Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
575639713583Smrg            ;;
575739713583Smrg          *)
575839713583Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
575939713583Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
576039713583Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
576139713583Smrg					         # but as the default
576239713583Smrg					         # location of the library.
576339713583Smrg            ;;
576439713583Smrg        esac
576539713583Smrg
576639713583Smrg        case $cc_basename in
576739713583Smrg          CC*)
576839713583Smrg	    # FIXME: insert proper C++ library support
576939713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
577039713583Smrg	    ;;
577139713583Smrg          aCC*)
577239713583Smrg	    case $host_cpu in
577339713583Smrg	      hppa*64*)
577439713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577539713583Smrg	        ;;
577639713583Smrg	      ia64*)
577739713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577839713583Smrg	        ;;
577939713583Smrg	      *)
578039713583Smrg	        _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'
578139713583Smrg	        ;;
578239713583Smrg	    esac
578339713583Smrg	    # Commands to make compiler produce verbose output that lists
578439713583Smrg	    # what "hidden" libraries, object files and flags are used when
578539713583Smrg	    # linking a shared library.
578639713583Smrg	    #
578739713583Smrg	    # There doesn't appear to be a way to prevent this compiler from
578839713583Smrg	    # explicitly linking system object files so we need to strip them
578939713583Smrg	    # from the output so that they don't get included in the library
579039713583Smrg	    # dependencies.
579139713583Smrg	    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; $ECHO "X$list" | $Xsed'
579239713583Smrg	    ;;
579339713583Smrg          *)
579439713583Smrg	    if test "$GXX" = yes; then
579539713583Smrg	      if test $with_gnu_ld = no; then
579639713583Smrg	        case $host_cpu in
579739713583Smrg	          hppa*64*)
579839713583Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
579939713583Smrg	            ;;
580039713583Smrg	          ia64*)
580139713583Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
580239713583Smrg	            ;;
580339713583Smrg	          *)
580439713583Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
580539713583Smrg	            ;;
580639713583Smrg	        esac
580739713583Smrg	      fi
580839713583Smrg	    else
580939713583Smrg	      # FIXME: insert proper C++ library support
581039713583Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
581139713583Smrg	    fi
581239713583Smrg	    ;;
581339713583Smrg        esac
581439713583Smrg        ;;
581595b296d0Smrg
581639713583Smrg      interix[[3-9]]*)
581739713583Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
581839713583Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
581939713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
582039713583Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
582139713583Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
582239713583Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
582339713583Smrg	# default) and relocated if they conflict, which is a slow very memory
582439713583Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
582539713583Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
582639713583Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
582739713583Smrg	_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'
582839713583Smrg	_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'
582939713583Smrg	;;
583039713583Smrg      irix5* | irix6*)
583139713583Smrg        case $cc_basename in
583239713583Smrg          CC*)
583339713583Smrg	    # SGI C++
583439713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
583539713583Smrg
583639713583Smrg	    # Archives containing C++ object files must be created using
583739713583Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
583839713583Smrg	    # necessary to make sure instantiated templates are included
583939713583Smrg	    # in the archive.
584039713583Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
584139713583Smrg	    ;;
584239713583Smrg          *)
584339713583Smrg	    if test "$GXX" = yes; then
584439713583Smrg	      if test "$with_gnu_ld" = no; then
584539713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
584639713583Smrg	      else
584739713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
584839713583Smrg	      fi
584939713583Smrg	    fi
585039713583Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
585139713583Smrg	    ;;
585239713583Smrg        esac
585339713583Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
585439713583Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
585539713583Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
585639713583Smrg        ;;
585795b296d0Smrg
585839713583Smrg      linux* | k*bsd*-gnu)
585939713583Smrg        case $cc_basename in
586039713583Smrg          KCC*)
586139713583Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
586239713583Smrg
586339713583Smrg	    # KCC will only create a shared library if the output file
586439713583Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
586539713583Smrg	    # to its proper name (with version) after linking.
586639713583Smrg	    _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'
586739713583Smrg	    _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'
586839713583Smrg	    # Commands to make compiler produce verbose output that lists
586939713583Smrg	    # what "hidden" libraries, object files and flags are used when
587039713583Smrg	    # linking a shared library.
587139713583Smrg	    #
587239713583Smrg	    # There doesn't appear to be a way to prevent this compiler from
587339713583Smrg	    # explicitly linking system object files so we need to strip them
587439713583Smrg	    # from the output so that they don't get included in the library
587539713583Smrg	    # dependencies.
587639713583Smrg	    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; $ECHO "X$list" | $Xsed'
587739713583Smrg
587839713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
587939713583Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
588039713583Smrg
588139713583Smrg	    # Archives containing C++ object files must be created using
588239713583Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
588339713583Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
588439713583Smrg	    ;;
588539713583Smrg	  icpc* | ecpc* )
588639713583Smrg	    # Intel C++
588739713583Smrg	    with_gnu_ld=yes
588839713583Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
588939713583Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
589039713583Smrg	    # earlier do not add the objects themselves.
589139713583Smrg	    case `$CC -V 2>&1` in
589239713583Smrg	      *"Version 7."*)
589339713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
589439713583Smrg		_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'
589539713583Smrg		;;
589639713583Smrg	      *)  # Version 8.0 or newer
589739713583Smrg	        tmp_idyn=
589839713583Smrg	        case $host_cpu in
589939713583Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
590039713583Smrg		esac
590139713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
590239713583Smrg		_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'
590339713583Smrg		;;
590439713583Smrg	    esac
590539713583Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
590639713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
590739713583Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
590839713583Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
590939713583Smrg	    ;;
591039713583Smrg          pgCC* | pgcpp*)
591139713583Smrg            # Portland Group C++ compiler
591239713583Smrg	    case `$CC -V` in
591339713583Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
591439713583Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
591539713583Smrg		rm -rf $tpldir~
591639713583Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
591739713583Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
591839713583Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
591939713583Smrg		rm -rf $tpldir~
592039713583Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
592139713583Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
592239713583Smrg		$RANLIB $oldlib'
592339713583Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
592439713583Smrg		rm -rf $tpldir~
592539713583Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
592639713583Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
592739713583Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
592839713583Smrg		rm -rf $tpldir~
592939713583Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
593039713583Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
593139713583Smrg	      ;;
593239713583Smrg	    *) # Version 6 will use weak symbols
593339713583Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
593439713583Smrg	      _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'
593539713583Smrg	      ;;
593639713583Smrg	    esac
593795b296d0Smrg
593839713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
593939713583Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
594039713583Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
594139713583Smrg            ;;
594239713583Smrg	  cxx*)
594339713583Smrg	    # Compaq C++
594439713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
594539713583Smrg	    _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'
594695b296d0Smrg
594739713583Smrg	    runpath_var=LD_RUN_PATH
594839713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
594939713583Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
595095b296d0Smrg
595139713583Smrg	    # Commands to make compiler produce verbose output that lists
595239713583Smrg	    # what "hidden" libraries, object files and flags are used when
595339713583Smrg	    # linking a shared library.
595439713583Smrg	    #
595539713583Smrg	    # There doesn't appear to be a way to prevent this compiler from
595639713583Smrg	    # explicitly linking system object files so we need to strip them
595739713583Smrg	    # from the output so that they don't get included in the library
595839713583Smrg	    # dependencies.
595939713583Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
596039713583Smrg	    ;;
596139713583Smrg	  xl*)
596239713583Smrg	    # IBM XL 8.0 on PPC, with GNU ld
596339713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
596439713583Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
596539713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
596639713583Smrg	    if test "x$supports_anon_versioning" = xyes; then
596739713583Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
596839713583Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
596939713583Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
597039713583Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
597139713583Smrg	    fi
597239713583Smrg	    ;;
597339713583Smrg	  *)
597439713583Smrg	    case `$CC -V 2>&1 | sed 5q` in
597539713583Smrg	    *Sun\ C*)
597639713583Smrg	      # Sun C++ 5.9
597739713583Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
597839713583Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
597939713583Smrg	      _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'
598039713583Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
598139713583Smrg	      _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
598239713583Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
598339713583Smrg
598439713583Smrg	      # Not sure whether something based on
598539713583Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
598639713583Smrg	      # would be better.
598739713583Smrg	      output_verbose_link_cmd='echo'
598839713583Smrg
598939713583Smrg	      # Archives containing C++ object files must be created using
599039713583Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
599139713583Smrg	      # necessary to make sure instantiated templates are included
599239713583Smrg	      # in the archive.
599339713583Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
599439713583Smrg	      ;;
599539713583Smrg	    esac
599639713583Smrg	    ;;
599739713583Smrg	esac
599839713583Smrg	;;
599995b296d0Smrg
600039713583Smrg      lynxos*)
600139713583Smrg        # FIXME: insert proper C++ library support
600239713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
600339713583Smrg	;;
600495b296d0Smrg
600539713583Smrg      m88k*)
600639713583Smrg        # FIXME: insert proper C++ library support
600739713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
600839713583Smrg	;;
600995b296d0Smrg
601039713583Smrg      mvs*)
601139713583Smrg        case $cc_basename in
601239713583Smrg          cxx*)
601339713583Smrg	    # FIXME: insert proper C++ library support
601439713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
601539713583Smrg	    ;;
601639713583Smrg	  *)
601739713583Smrg	    # FIXME: insert proper C++ library support
601839713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
601939713583Smrg	    ;;
602039713583Smrg	esac
602139713583Smrg	;;
602295b296d0Smrg
602339713583Smrg      netbsd*)
602439713583Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
602539713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
602639713583Smrg	  wlarc=
602739713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
602839713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
602939713583Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
603039713583Smrg	fi
603139713583Smrg	# Workaround some broken pre-1.5 toolchains
603239713583Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
603339713583Smrg	;;
603495b296d0Smrg
603539713583Smrg      *nto* | *qnx*)
603639713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
603739713583Smrg	;;
603895b296d0Smrg
603939713583Smrg      openbsd2*)
604039713583Smrg        # C++ shared libraries are fairly broken
604139713583Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
604239713583Smrg	;;
604395b296d0Smrg
604439713583Smrg      openbsd*)
604539713583Smrg	if test -f /usr/libexec/ld.so; then
604639713583Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
604739713583Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
604839713583Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
604939713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
605039713583Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
605139713583Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
605239713583Smrg	    _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'
605339713583Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
605439713583Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
605539713583Smrg	  fi
605639713583Smrg	  output_verbose_link_cmd=echo
605739713583Smrg	else
605839713583Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
605939713583Smrg	fi
606039713583Smrg	;;
606195b296d0Smrg
606239713583Smrg      osf3* | osf4* | osf5*)
606339713583Smrg        case $cc_basename in
606439713583Smrg          KCC*)
606539713583Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
606639713583Smrg
606739713583Smrg	    # KCC will only create a shared library if the output file
606839713583Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
606939713583Smrg	    # to its proper name (with version) after linking.
607039713583Smrg	    _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'
607139713583Smrg
607239713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
607339713583Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
607439713583Smrg
607539713583Smrg	    # Archives containing C++ object files must be created using
607639713583Smrg	    # the KAI C++ compiler.
607739713583Smrg	    case $host in
607839713583Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
607939713583Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
608039713583Smrg	    esac
608139713583Smrg	    ;;
608239713583Smrg          RCC*)
608339713583Smrg	    # Rational C++ 2.4.1
608439713583Smrg	    # FIXME: insert proper C++ library support
608539713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
608639713583Smrg	    ;;
608739713583Smrg          cxx*)
608839713583Smrg	    case $host in
608939713583Smrg	      osf3*)
609039713583Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
609139713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
609239713583Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
609339713583Smrg		;;
609439713583Smrg	      *)
609539713583Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
609639713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
609739713583Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
609839713583Smrg	          echo "-hidden">> $lib.exp~
609939713583Smrg	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
610039713583Smrg	          $RM $lib.exp'
610139713583Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
610239713583Smrg		;;
610339713583Smrg	    esac
610495b296d0Smrg
610539713583Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
610695b296d0Smrg
610739713583Smrg	    # Commands to make compiler produce verbose output that lists
610839713583Smrg	    # what "hidden" libraries, object files and flags are used when
610939713583Smrg	    # linking a shared library.
611039713583Smrg	    #
611139713583Smrg	    # There doesn't appear to be a way to prevent this compiler from
611239713583Smrg	    # explicitly linking system object files so we need to strip them
611339713583Smrg	    # from the output so that they don't get included in the library
611439713583Smrg	    # dependencies.
611539713583Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
611639713583Smrg	    ;;
611739713583Smrg	  *)
611839713583Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
611939713583Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
612039713583Smrg	      case $host in
612139713583Smrg	        osf3*)
612239713583Smrg	          _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
612339713583Smrg		  ;;
612439713583Smrg	        *)
612539713583Smrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
612639713583Smrg		  ;;
612739713583Smrg	      esac
612839713583Smrg
612939713583Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
613039713583Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
613139713583Smrg
613239713583Smrg	      # Commands to make compiler produce verbose output that lists
613339713583Smrg	      # what "hidden" libraries, object files and flags are used when
613439713583Smrg	      # linking a shared library.
613539713583Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
613639713583Smrg
613739713583Smrg	    else
613839713583Smrg	      # FIXME: insert proper C++ library support
613939713583Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
614039713583Smrg	    fi
614139713583Smrg	    ;;
614239713583Smrg        esac
614339713583Smrg        ;;
614495b296d0Smrg
614539713583Smrg      psos*)
614639713583Smrg        # FIXME: insert proper C++ library support
614739713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
614839713583Smrg        ;;
614995b296d0Smrg
615039713583Smrg      sunos4*)
615139713583Smrg        case $cc_basename in
615239713583Smrg          CC*)
615339713583Smrg	    # Sun C++ 4.x
615439713583Smrg	    # FIXME: insert proper C++ library support
615539713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
615639713583Smrg	    ;;
615739713583Smrg          lcc*)
615839713583Smrg	    # Lucid
615939713583Smrg	    # FIXME: insert proper C++ library support
616039713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
616139713583Smrg	    ;;
616239713583Smrg          *)
616339713583Smrg	    # FIXME: insert proper C++ library support
616439713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
616539713583Smrg	    ;;
616639713583Smrg        esac
616739713583Smrg        ;;
616895b296d0Smrg
616939713583Smrg      solaris*)
617039713583Smrg        case $cc_basename in
617139713583Smrg          CC*)
617239713583Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
617339713583Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
617439713583Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
617539713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
617639713583Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
617739713583Smrg	      $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'
617839713583Smrg
617939713583Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
618039713583Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
618139713583Smrg	    case $host_os in
618239713583Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
618339713583Smrg	      *)
618439713583Smrg		# The compiler driver will combine and reorder linker options,
618539713583Smrg		# but understands `-z linker_flag'.
618639713583Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
618739713583Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
618839713583Smrg	        ;;
618939713583Smrg	    esac
619039713583Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
619195b296d0Smrg
619239713583Smrg	    output_verbose_link_cmd='echo'
619395b296d0Smrg
619439713583Smrg	    # Archives containing C++ object files must be created using
619539713583Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
619639713583Smrg	    # necessary to make sure instantiated templates are included
619739713583Smrg	    # in the archive.
619839713583Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
619939713583Smrg	    ;;
620039713583Smrg          gcx*)
620139713583Smrg	    # Green Hills C++ Compiler
620239713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
620395b296d0Smrg
620439713583Smrg	    # The C++ compiler must be used to create the archive.
620539713583Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
620639713583Smrg	    ;;
620739713583Smrg          *)
620839713583Smrg	    # GNU C++ compiler with Solaris linker
620939713583Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
621039713583Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
621139713583Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
621239713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
621339713583Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
621439713583Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
621539713583Smrg
621639713583Smrg	        # Commands to make compiler produce verbose output that lists
621739713583Smrg	        # what "hidden" libraries, object files and flags are used when
621839713583Smrg	        # linking a shared library.
621939713583Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
622039713583Smrg	      else
622139713583Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
622239713583Smrg	        # platform.
622339713583Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
622439713583Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
622539713583Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
622639713583Smrg
622739713583Smrg	        # Commands to make compiler produce verbose output that lists
622839713583Smrg	        # what "hidden" libraries, object files and flags are used when
622939713583Smrg	        # linking a shared library.
623039713583Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
623139713583Smrg	      fi
623239713583Smrg
623339713583Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
623439713583Smrg	      case $host_os in
623539713583Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
623639713583Smrg		*)
623739713583Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
623839713583Smrg		  ;;
623939713583Smrg	      esac
624039713583Smrg	    fi
624139713583Smrg	    ;;
624239713583Smrg        esac
624339713583Smrg        ;;
624495b296d0Smrg
624539713583Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
624639713583Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
624739713583Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
624839713583Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
624939713583Smrg      runpath_var='LD_RUN_PATH'
625095b296d0Smrg
625139713583Smrg      case $cc_basename in
625239713583Smrg        CC*)
625339713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625439713583Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625539713583Smrg	  ;;
625639713583Smrg	*)
625739713583Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625839713583Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625939713583Smrg	  ;;
626039713583Smrg      esac
626139713583Smrg      ;;
626295b296d0Smrg
626339713583Smrg      sysv5* | sco3.2v5* | sco5v6*)
626439713583Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
626539713583Smrg	# link with -lc, and that would cause any symbols used from libc to
626639713583Smrg	# always be unresolved, which means just about no library would
626739713583Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
626839713583Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
626939713583Smrg	# as -z defs.
627039713583Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
627139713583Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
627239713583Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
627339713583Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
627439713583Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
627539713583Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
627639713583Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
627739713583Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
627839713583Smrg	runpath_var='LD_RUN_PATH'
627995b296d0Smrg
628039713583Smrg	case $cc_basename in
628139713583Smrg          CC*)
628239713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628339713583Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628439713583Smrg	    ;;
628539713583Smrg	  *)
628639713583Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628739713583Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628839713583Smrg	    ;;
628939713583Smrg	esac
629039713583Smrg      ;;
629195b296d0Smrg
629239713583Smrg      tandem*)
629339713583Smrg        case $cc_basename in
629439713583Smrg          NCC*)
629539713583Smrg	    # NonStop-UX NCC 3.20
629639713583Smrg	    # FIXME: insert proper C++ library support
629739713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
629839713583Smrg	    ;;
629939713583Smrg          *)
630039713583Smrg	    # FIXME: insert proper C++ library support
630139713583Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
630239713583Smrg	    ;;
630339713583Smrg        esac
630439713583Smrg        ;;
630595b296d0Smrg
630639713583Smrg      vxworks*)
630739713583Smrg        # FIXME: insert proper C++ library support
630839713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
630939713583Smrg        ;;
631095b296d0Smrg
631139713583Smrg      *)
631239713583Smrg        # FIXME: insert proper C++ library support
631339713583Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
631439713583Smrg        ;;
631539713583Smrg    esac
631695b296d0Smrg
631739713583Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
631839713583Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
631939713583Smrg
632039713583Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
632139713583Smrg    _LT_TAGVAR(LD, $1)="$LD"
632239713583Smrg
632339713583Smrg    ## CAVEAT EMPTOR:
632439713583Smrg    ## There is no encapsulation within the following macros, do not change
632539713583Smrg    ## the running order or otherwise move them around unless you know exactly
632639713583Smrg    ## what you are doing...
632739713583Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
632839713583Smrg    _LT_COMPILER_PIC($1)
632939713583Smrg    _LT_COMPILER_C_O($1)
633039713583Smrg    _LT_COMPILER_FILE_LOCKS($1)
633139713583Smrg    _LT_LINKER_SHLIBS($1)
633239713583Smrg    _LT_SYS_DYNAMIC_LINKER($1)
633339713583Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
633439713583Smrg
633539713583Smrg    _LT_CONFIG($1)
633639713583Smrg  fi # test -n "$compiler"
633739713583Smrg
633839713583Smrg  CC=$lt_save_CC
633939713583Smrg  LDCXX=$LD
634039713583Smrg  LD=$lt_save_LD
634139713583Smrg  GCC=$lt_save_GCC
634239713583Smrg  with_gnu_ld=$lt_save_with_gnu_ld
634339713583Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
634439713583Smrg  lt_cv_path_LD=$lt_save_path_LD
634539713583Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
634639713583Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
634739713583Smrgfi # test "$_lt_caught_CXX_error" != yes
634895b296d0Smrg
634939713583SmrgAC_LANG_POP
635039713583Smrg])# _LT_LANG_CXX_CONFIG
635195b296d0Smrg
635295b296d0Smrg
635339713583Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
635439713583Smrg# ---------------------------------
635539713583Smrg# Figure out "hidden" library dependencies from verbose
635639713583Smrg# compiler output when linking a shared library.
635739713583Smrg# Parse the compiler output and extract the necessary
635839713583Smrg# objects, libraries and library flags.
635939713583Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
636039713583Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
636139713583Smrg# Dependencies to place before and after the object being linked:
636239713583Smrg_LT_TAGVAR(predep_objects, $1)=
636339713583Smrg_LT_TAGVAR(postdep_objects, $1)=
636439713583Smrg_LT_TAGVAR(predeps, $1)=
636539713583Smrg_LT_TAGVAR(postdeps, $1)=
636639713583Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
636795b296d0Smrg
636839713583Smrgdnl we can't use the lt_simple_compile_test_code here,
636939713583Smrgdnl because it contains code intended for an executable,
637039713583Smrgdnl not a library.  It's possible we should let each
637139713583Smrgdnl tag define a new lt_????_link_test_code variable,
637239713583Smrgdnl but it's only used here...
637339713583Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
637439713583Smrgint a;
637539713583Smrgvoid foo (void) { a = 0; }
637639713583Smrg_LT_EOF
637739713583Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
637839713583Smrgclass Foo
637995b296d0Smrg{
638039713583Smrgpublic:
638139713583Smrg  Foo (void) { a = 0; }
638239713583Smrgprivate:
638339713583Smrg  int a;
638439713583Smrg};
638539713583Smrg_LT_EOF
638639713583Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
638739713583Smrg      subroutine foo
638839713583Smrg      implicit none
638939713583Smrg      integer*4 a
639039713583Smrg      a=0
639139713583Smrg      return
639239713583Smrg      end
639339713583Smrg_LT_EOF
639439713583Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
639539713583Smrg      subroutine foo
639639713583Smrg      implicit none
639739713583Smrg      integer a
639839713583Smrg      a=0
639939713583Smrg      return
640039713583Smrg      end
640139713583Smrg_LT_EOF
640239713583Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
640339713583Smrgpublic class foo {
640439713583Smrg  private int a;
640539713583Smrg  public void bar (void) {
640639713583Smrg    a = 0;
640739713583Smrg  }
640895b296d0Smrg};
640939713583Smrg_LT_EOF
641039713583Smrg])
641139713583Smrgdnl Parse the compiler output and extract the necessary
641239713583Smrgdnl objects, libraries and library flags.
641339713583Smrgif AC_TRY_EVAL(ac_compile); then
641439713583Smrg  # Parse the compiler output and extract the necessary
641539713583Smrg  # objects, libraries and library flags.
641695b296d0Smrg
641739713583Smrg  # Sentinel used to keep track of whether or not we are before
641839713583Smrg  # the conftest object file.
641939713583Smrg  pre_test_object_deps_done=no
642095b296d0Smrg
642139713583Smrg  for p in `eval "$output_verbose_link_cmd"`; do
642239713583Smrg    case $p in
642339713583Smrg
642439713583Smrg    -L* | -R* | -l*)
642539713583Smrg       # Some compilers place space between "-{L,R}" and the path.
642639713583Smrg       # Remove the space.
642739713583Smrg       if test $p = "-L" ||
642839713583Smrg          test $p = "-R"; then
642939713583Smrg	 prev=$p
643039713583Smrg	 continue
643139713583Smrg       else
643239713583Smrg	 prev=
643339713583Smrg       fi
643439713583Smrg
643539713583Smrg       if test "$pre_test_object_deps_done" = no; then
643639713583Smrg	 case $p in
643739713583Smrg	 -L* | -R*)
643839713583Smrg	   # Internal compiler library paths should come after those
643939713583Smrg	   # provided the user.  The postdeps already come after the
644039713583Smrg	   # user supplied libs so there is no need to process them.
644139713583Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
644239713583Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
644339713583Smrg	   else
644439713583Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
644539713583Smrg	   fi
644639713583Smrg	   ;;
644739713583Smrg	 # The "-l" case would never come before the object being
644839713583Smrg	 # linked, so don't bother handling this case.
644939713583Smrg	 esac
645039713583Smrg       else
645139713583Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
645239713583Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
645339713583Smrg	 else
645439713583Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
645539713583Smrg	 fi
645639713583Smrg       fi
645739713583Smrg       ;;
645839713583Smrg
645939713583Smrg    *.$objext)
646039713583Smrg       # This assumes that the test object file only shows up
646139713583Smrg       # once in the compiler output.
646239713583Smrg       if test "$p" = "conftest.$objext"; then
646339713583Smrg	 pre_test_object_deps_done=yes
646439713583Smrg	 continue
646539713583Smrg       fi
646639713583Smrg
646739713583Smrg       if test "$pre_test_object_deps_done" = no; then
646839713583Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
646939713583Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
647039713583Smrg	 else
647139713583Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
647239713583Smrg	 fi
647339713583Smrg       else
647439713583Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
647539713583Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
647639713583Smrg	 else
647739713583Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
647839713583Smrg	 fi
647939713583Smrg       fi
648039713583Smrg       ;;
648139713583Smrg
648239713583Smrg    *) ;; # Ignore the rest.
648339713583Smrg
648439713583Smrg    esac
648539713583Smrg  done
648639713583Smrg
648739713583Smrg  # Clean up.
648839713583Smrg  rm -f a.out a.exe
648995b296d0Smrgelse
649039713583Smrg  echo "libtool.m4: error: problem compiling $1 test program"
649195b296d0Smrgfi
649295b296d0Smrg
649339713583Smrg$RM -f confest.$objext
649495b296d0Smrg
649539713583Smrg# PORTME: override above test on systems where it is broken
649639713583Smrgm4_if([$1], [CXX],
649739713583Smrg[case $host_os in
649839713583Smrginterix[[3-9]]*)
649939713583Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
650039713583Smrg  # hack all around it, let's just trust "g++" to DTRT.
650139713583Smrg  _LT_TAGVAR(predep_objects,$1)=
650239713583Smrg  _LT_TAGVAR(postdep_objects,$1)=
650339713583Smrg  _LT_TAGVAR(postdeps,$1)=
650439713583Smrg  ;;
650595b296d0Smrg
650639713583Smrglinux*)
650739713583Smrg  case `$CC -V 2>&1 | sed 5q` in
650839713583Smrg  *Sun\ C*)
650939713583Smrg    # Sun C++ 5.9
651095b296d0Smrg
651139713583Smrg    # The more standards-conforming stlport4 library is
651239713583Smrg    # incompatible with the Cstd library. Avoid specifying
651339713583Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
651439713583Smrg    # -library=stlport4 depends on it.
651539713583Smrg    case " $CXX $CXXFLAGS " in
651639713583Smrg    *" -library=stlport4 "*)
651739713583Smrg      solaris_use_stlport4=yes
651895b296d0Smrg      ;;
651939713583Smrg    esac
652039713583Smrg
652139713583Smrg    if test "$solaris_use_stlport4" != yes; then
652239713583Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
652339713583Smrg    fi
652439713583Smrg    ;;
652539713583Smrg  esac
652639713583Smrg  ;;
652739713583Smrg
652839713583Smrgsolaris*)
652939713583Smrg  case $cc_basename in
653039713583Smrg  CC*)
653139713583Smrg    # The more standards-conforming stlport4 library is
653239713583Smrg    # incompatible with the Cstd library. Avoid specifying
653339713583Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
653439713583Smrg    # -library=stlport4 depends on it.
653539713583Smrg    case " $CXX $CXXFLAGS " in
653639713583Smrg    *" -library=stlport4 "*)
653739713583Smrg      solaris_use_stlport4=yes
653895b296d0Smrg      ;;
653995b296d0Smrg    esac
654039713583Smrg
654139713583Smrg    # Adding this requires a known-good setup of shared libraries for
654239713583Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
654339713583Smrg    # archive will be linked into the output, leading to subtle bugs.
654439713583Smrg    if test "$solaris_use_stlport4" != yes; then
654539713583Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
654639713583Smrg    fi
654739713583Smrg    ;;
654839713583Smrg  esac
654939713583Smrg  ;;
655039713583Smrgesac
655139713583Smrg])
655239713583Smrg
655339713583Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
655439713583Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
655539713583Smrgesac
655639713583Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
655739713583Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
655839713583Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
655939713583Smrgfi
656039713583Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
656139713583Smrg    [The directories searched by this compiler when creating a shared library])
656239713583Smrg_LT_TAGDECL([], [predep_objects], [1],
656339713583Smrg    [Dependencies to place before and after the objects being linked to
656439713583Smrg    create a shared library])
656539713583Smrg_LT_TAGDECL([], [postdep_objects], [1])
656639713583Smrg_LT_TAGDECL([], [predeps], [1])
656739713583Smrg_LT_TAGDECL([], [postdeps], [1])
656839713583Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
656939713583Smrg    [The library search path used internally by the compiler when linking
657039713583Smrg    a shared library])
657139713583Smrg])# _LT_SYS_HIDDEN_LIBDEPS
657239713583Smrg
657339713583Smrg
657439713583Smrg# _LT_PROG_F77
657539713583Smrg# ------------
657639713583Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
657739713583Smrg# if there is no fortran compiler, we have our own version here.
657839713583Smrgm4_defun([_LT_PROG_F77],
657939713583Smrg[
658039713583Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
658139713583SmrgAC_PROG_F77
658239713583Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
658339713583Smrg  _lt_disable_F77=yes
658439713583Smrgfi
658539713583Smrgpopdef([AC_MSG_ERROR])
658639713583Smrg])# _LT_PROG_F77
658739713583Smrg
658839713583Smrgdnl aclocal-1.4 backwards compatibility:
658939713583Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
659039713583Smrg
659139713583Smrg
659239713583Smrg# _LT_LANG_F77_CONFIG([TAG])
659339713583Smrg# --------------------------
659439713583Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
659539713583Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
659639713583Smrg# to write the compiler configuration to `libtool'.
659739713583Smrgm4_defun([_LT_LANG_F77_CONFIG],
659839713583Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
659939713583SmrgAC_LANG_PUSH(Fortran 77)
660039713583Smrg
660139713583Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
660239713583Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
660339713583Smrg_LT_TAGVAR(always_export_symbols, $1)=no
660439713583Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
660539713583Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
660639713583Smrg_LT_TAGVAR(hardcode_direct, $1)=no
660739713583Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
660839713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
660939713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
661039713583Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
661139713583Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
661239713583Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
661339713583Smrg_LT_TAGVAR(inherit_rpath, $1)=no
661439713583Smrg_LT_TAGVAR(module_cmds, $1)=
661539713583Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
661639713583Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
661739713583Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
661839713583Smrg_LT_TAGVAR(no_undefined_flag, $1)=
661939713583Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
662039713583Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
662139713583Smrg
662239713583Smrg# Source file extension for f77 test sources.
662339713583Smrgac_ext=f
662439713583Smrg
662539713583Smrg# Object file extension for compiled f77 test sources.
662639713583Smrgobjext=o
662739713583Smrg_LT_TAGVAR(objext, $1)=$objext
662839713583Smrg
662939713583Smrg# No sense in running all these tests if we already determined that
663039713583Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
663139713583Smrg# are currently assumed to apply to all compilers on this platform,
663239713583Smrg# and will be corrupted by setting them based on a non-working compiler.
663339713583Smrgif test "$_lt_disable_F77" != yes; then
663439713583Smrg  # Code to be used in simple compile tests
663539713583Smrg  lt_simple_compile_test_code="\
663639713583Smrg      subroutine t
663739713583Smrg      return
663839713583Smrg      end
663939713583Smrg"
664039713583Smrg
664139713583Smrg  # Code to be used in simple link tests
664239713583Smrg  lt_simple_link_test_code="\
664339713583Smrg      program t
664439713583Smrg      end
664539713583Smrg"
664639713583Smrg
664739713583Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
664839713583Smrg  _LT_TAG_COMPILER
664939713583Smrg
665039713583Smrg  # save warnings/boilerplate of simple test code
665139713583Smrg  _LT_COMPILER_BOILERPLATE
665239713583Smrg  _LT_LINKER_BOILERPLATE
665339713583Smrg
665439713583Smrg  # Allow CC to be a program name with arguments.
665539713583Smrg  lt_save_CC="$CC"
665639713583Smrg  lt_save_GCC=$GCC
665739713583Smrg  CC=${F77-"f77"}
665839713583Smrg  compiler=$CC
665939713583Smrg  _LT_TAGVAR(compiler, $1)=$CC
666039713583Smrg  _LT_CC_BASENAME([$compiler])
666139713583Smrg  GCC=$G77
666239713583Smrg  if test -n "$compiler"; then
666339713583Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
666439713583Smrg    AC_MSG_RESULT([$can_build_shared])
666539713583Smrg
666639713583Smrg    AC_MSG_CHECKING([whether to build shared libraries])
666739713583Smrg    test "$can_build_shared" = "no" && enable_shared=no
666839713583Smrg
666939713583Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
667039713583Smrg    # are all built from PIC.
667139713583Smrg    case $host_os in
667239713583Smrg      aix3*)
667339713583Smrg        test "$enable_shared" = yes && enable_static=no
667439713583Smrg        if test -n "$RANLIB"; then
667539713583Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
667639713583Smrg          postinstall_cmds='$RANLIB $lib'
667739713583Smrg        fi
667839713583Smrg        ;;
667939713583Smrg      aix[[4-9]]*)
668039713583Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
668139713583Smrg	  test "$enable_shared" = yes && enable_static=no
668239713583Smrg	fi
668339713583Smrg        ;;
668495b296d0Smrg    esac
668539713583Smrg    AC_MSG_RESULT([$enable_shared])
668639713583Smrg
668739713583Smrg    AC_MSG_CHECKING([whether to build static libraries])
668839713583Smrg    # Make sure either enable_shared or enable_static is yes.
668939713583Smrg    test "$enable_shared" = yes || enable_static=yes
669039713583Smrg    AC_MSG_RESULT([$enable_static])
669139713583Smrg
669239713583Smrg    _LT_TAGVAR(GCC, $1)="$G77"
669339713583Smrg    _LT_TAGVAR(LD, $1)="$LD"
669439713583Smrg
669539713583Smrg    ## CAVEAT EMPTOR:
669639713583Smrg    ## There is no encapsulation within the following macros, do not change
669739713583Smrg    ## the running order or otherwise move them around unless you know exactly
669839713583Smrg    ## what you are doing...
669939713583Smrg    _LT_COMPILER_PIC($1)
670039713583Smrg    _LT_COMPILER_C_O($1)
670139713583Smrg    _LT_COMPILER_FILE_LOCKS($1)
670239713583Smrg    _LT_LINKER_SHLIBS($1)
670339713583Smrg    _LT_SYS_DYNAMIC_LINKER($1)
670439713583Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
670539713583Smrg
670639713583Smrg    _LT_CONFIG($1)
670739713583Smrg  fi # test -n "$compiler"
670839713583Smrg
670939713583Smrg  GCC=$lt_save_GCC
671039713583Smrg  CC="$lt_save_CC"
671139713583Smrgfi # test "$_lt_disable_F77" != yes
671239713583Smrg
671339713583SmrgAC_LANG_POP
671439713583Smrg])# _LT_LANG_F77_CONFIG
671539713583Smrg
671639713583Smrg
671739713583Smrg# _LT_PROG_FC
671839713583Smrg# -----------
671939713583Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
672039713583Smrg# if there is no fortran compiler, we have our own version here.
672139713583Smrgm4_defun([_LT_PROG_FC],
672295b296d0Smrg[
672339713583Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
672439713583SmrgAC_PROG_FC
672539713583Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
672639713583Smrg  _lt_disable_FC=yes
672739713583Smrgfi
672839713583Smrgpopdef([AC_MSG_ERROR])
672939713583Smrg])# _LT_PROG_FC
673039713583Smrg
673139713583Smrgdnl aclocal-1.4 backwards compatibility:
673239713583Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
673339713583Smrg
673439713583Smrg
673539713583Smrg# _LT_LANG_FC_CONFIG([TAG])
673639713583Smrg# -------------------------
673739713583Smrg# Ensure that the configuration variables for a Fortran compiler are
673839713583Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
673939713583Smrg# to write the compiler configuration to `libtool'.
674039713583Smrgm4_defun([_LT_LANG_FC_CONFIG],
674139713583Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
674239713583SmrgAC_LANG_PUSH(Fortran)
674339713583Smrg
674439713583Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
674539713583Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
674639713583Smrg_LT_TAGVAR(always_export_symbols, $1)=no
674739713583Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
674839713583Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
674939713583Smrg_LT_TAGVAR(hardcode_direct, $1)=no
675039713583Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
675139713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
675239713583Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
675339713583Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
675439713583Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
675539713583Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
675639713583Smrg_LT_TAGVAR(inherit_rpath, $1)=no
675739713583Smrg_LT_TAGVAR(module_cmds, $1)=
675839713583Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
675939713583Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
676039713583Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
676139713583Smrg_LT_TAGVAR(no_undefined_flag, $1)=
676239713583Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
676339713583Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
676439713583Smrg
676539713583Smrg# Source file extension for fc test sources.
676639713583Smrgac_ext=${ac_fc_srcext-f}
676739713583Smrg
676839713583Smrg# Object file extension for compiled fc test sources.
676939713583Smrgobjext=o
677039713583Smrg_LT_TAGVAR(objext, $1)=$objext
677139713583Smrg
677239713583Smrg# No sense in running all these tests if we already determined that
677339713583Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
677439713583Smrg# are currently assumed to apply to all compilers on this platform,
677539713583Smrg# and will be corrupted by setting them based on a non-working compiler.
677639713583Smrgif test "$_lt_disable_FC" != yes; then
677739713583Smrg  # Code to be used in simple compile tests
677839713583Smrg  lt_simple_compile_test_code="\
677939713583Smrg      subroutine t
678039713583Smrg      return
678139713583Smrg      end
678239713583Smrg"
678395b296d0Smrg
678439713583Smrg  # Code to be used in simple link tests
678539713583Smrg  lt_simple_link_test_code="\
678639713583Smrg      program t
678739713583Smrg      end
678839713583Smrg"
678939713583Smrg
679039713583Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
679139713583Smrg  _LT_TAG_COMPILER
679239713583Smrg
679339713583Smrg  # save warnings/boilerplate of simple test code
679439713583Smrg  _LT_COMPILER_BOILERPLATE
679539713583Smrg  _LT_LINKER_BOILERPLATE
679639713583Smrg
679739713583Smrg  # Allow CC to be a program name with arguments.
679839713583Smrg  lt_save_CC="$CC"
679939713583Smrg  lt_save_GCC=$GCC
680039713583Smrg  CC=${FC-"f95"}
680139713583Smrg  compiler=$CC
680239713583Smrg  GCC=$ac_cv_fc_compiler_gnu
680339713583Smrg
680439713583Smrg  _LT_TAGVAR(compiler, $1)=$CC
680539713583Smrg  _LT_CC_BASENAME([$compiler])
680639713583Smrg
680739713583Smrg  if test -n "$compiler"; then
680839713583Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
680939713583Smrg    AC_MSG_RESULT([$can_build_shared])
681039713583Smrg
681139713583Smrg    AC_MSG_CHECKING([whether to build shared libraries])
681239713583Smrg    test "$can_build_shared" = "no" && enable_shared=no
681339713583Smrg
681439713583Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
681539713583Smrg    # are all built from PIC.
681695b296d0Smrg    case $host_os in
681739713583Smrg      aix3*)
681839713583Smrg        test "$enable_shared" = yes && enable_static=no
681939713583Smrg        if test -n "$RANLIB"; then
682039713583Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
682139713583Smrg          postinstall_cmds='$RANLIB $lib'
682239713583Smrg        fi
682339713583Smrg        ;;
682439713583Smrg      aix[[4-9]]*)
682539713583Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
682639713583Smrg	  test "$enable_shared" = yes && enable_static=no
682739713583Smrg	fi
682839713583Smrg        ;;
682939713583Smrg    esac
683039713583Smrg    AC_MSG_RESULT([$enable_shared])
683139713583Smrg
683239713583Smrg    AC_MSG_CHECKING([whether to build static libraries])
683339713583Smrg    # Make sure either enable_shared or enable_static is yes.
683439713583Smrg    test "$enable_shared" = yes || enable_static=yes
683539713583Smrg    AC_MSG_RESULT([$enable_static])
683639713583Smrg
683739713583Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
683839713583Smrg    _LT_TAGVAR(LD, $1)="$LD"
683939713583Smrg
684039713583Smrg    ## CAVEAT EMPTOR:
684139713583Smrg    ## There is no encapsulation within the following macros, do not change
684239713583Smrg    ## the running order or otherwise move them around unless you know exactly
684339713583Smrg    ## what you are doing...
684439713583Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
684539713583Smrg    _LT_COMPILER_PIC($1)
684639713583Smrg    _LT_COMPILER_C_O($1)
684739713583Smrg    _LT_COMPILER_FILE_LOCKS($1)
684839713583Smrg    _LT_LINKER_SHLIBS($1)
684939713583Smrg    _LT_SYS_DYNAMIC_LINKER($1)
685039713583Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
685139713583Smrg
685239713583Smrg    _LT_CONFIG($1)
685339713583Smrg  fi # test -n "$compiler"
685439713583Smrg
685539713583Smrg  GCC=$lt_save_GCC
685639713583Smrg  CC="$lt_save_CC"
685739713583Smrgfi # test "$_lt_disable_FC" != yes
685895b296d0Smrg
685939713583SmrgAC_LANG_POP
686039713583Smrg])# _LT_LANG_FC_CONFIG
686195b296d0Smrg
686295b296d0Smrg
686339713583Smrg# _LT_LANG_GCJ_CONFIG([TAG])
686439713583Smrg# --------------------------
686539713583Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
686639713583Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
686739713583Smrg# to write the compiler configuration to `libtool'.
686839713583Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
686939713583Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
687039713583SmrgAC_LANG_SAVE
687195b296d0Smrg
687239713583Smrg# Source file extension for Java test sources.
687339713583Smrgac_ext=java
687495b296d0Smrg
687539713583Smrg# Object file extension for compiled Java test sources.
687639713583Smrgobjext=o
687739713583Smrg_LT_TAGVAR(objext, $1)=$objext
687895b296d0Smrg
687939713583Smrg# Code to be used in simple compile tests
688039713583Smrglt_simple_compile_test_code="class foo {}"
688195b296d0Smrg
688239713583Smrg# Code to be used in simple link tests
688339713583Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
688495b296d0Smrg
688539713583Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
688639713583Smrg_LT_TAG_COMPILER
688739713583Smrg
688839713583Smrg# save warnings/boilerplate of simple test code
688939713583Smrg_LT_COMPILER_BOILERPLATE
689039713583Smrg_LT_LINKER_BOILERPLATE
689139713583Smrg
689239713583Smrg# Allow CC to be a program name with arguments.
689339713583Smrglt_save_CC="$CC"
689439713583Smrglt_save_GCC=$GCC
689539713583SmrgGCC=yes
689639713583SmrgCC=${GCJ-"gcj"}
689739713583Smrgcompiler=$CC
689839713583Smrg_LT_TAGVAR(compiler, $1)=$CC
689939713583Smrg_LT_TAGVAR(LD, $1)="$LD"
690039713583Smrg_LT_CC_BASENAME([$compiler])
690139713583Smrg
690239713583Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
690339713583Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
690439713583Smrg
690539713583Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
690639713583Smrg
690739713583Smrgif test -n "$compiler"; then
690839713583Smrg  _LT_COMPILER_NO_RTTI($1)
690939713583Smrg  _LT_COMPILER_PIC($1)
691039713583Smrg  _LT_COMPILER_C_O($1)
691139713583Smrg  _LT_COMPILER_FILE_LOCKS($1)
691239713583Smrg  _LT_LINKER_SHLIBS($1)
691339713583Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
691439713583Smrg
691539713583Smrg  _LT_CONFIG($1)
691639713583Smrgfi
691739713583Smrg
691839713583SmrgAC_LANG_RESTORE
691939713583Smrg
692039713583SmrgGCC=$lt_save_GCC
692139713583SmrgCC="$lt_save_CC"
692239713583Smrg])# _LT_LANG_GCJ_CONFIG
692339713583Smrg
692439713583Smrg
692539713583Smrg# _LT_LANG_RC_CONFIG([TAG])
692639713583Smrg# -------------------------
692739713583Smrg# Ensure that the configuration variables for the Windows resource compiler
692839713583Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
692939713583Smrg# to write the compiler configuration to `libtool'.
693039713583Smrgm4_defun([_LT_LANG_RC_CONFIG],
693139713583Smrg[AC_REQUIRE([LT_PROG_RC])dnl
693239713583SmrgAC_LANG_SAVE
693339713583Smrg
693439713583Smrg# Source file extension for RC test sources.
693539713583Smrgac_ext=rc
693639713583Smrg
693739713583Smrg# Object file extension for compiled RC test sources.
693839713583Smrgobjext=o
693939713583Smrg_LT_TAGVAR(objext, $1)=$objext
694039713583Smrg
694139713583Smrg# Code to be used in simple compile tests
694239713583Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
694339713583Smrg
694439713583Smrg# Code to be used in simple link tests
694539713583Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
694639713583Smrg
694739713583Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
694839713583Smrg_LT_TAG_COMPILER
694939713583Smrg
695039713583Smrg# save warnings/boilerplate of simple test code
695139713583Smrg_LT_COMPILER_BOILERPLATE
695239713583Smrg_LT_LINKER_BOILERPLATE
695339713583Smrg
695439713583Smrg# Allow CC to be a program name with arguments.
695539713583Smrglt_save_CC="$CC"
695639713583Smrglt_save_GCC=$GCC
695739713583SmrgGCC=
695839713583SmrgCC=${RC-"windres"}
695939713583Smrgcompiler=$CC
696039713583Smrg_LT_TAGVAR(compiler, $1)=$CC
696139713583Smrg_LT_CC_BASENAME([$compiler])
696239713583Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
696395b296d0Smrg
696439713583Smrgif test -n "$compiler"; then
696539713583Smrg  :
696639713583Smrg  _LT_CONFIG($1)
696739713583Smrgfi
696895b296d0Smrg
696939713583SmrgGCC=$lt_save_GCC
697039713583SmrgAC_LANG_RESTORE
697139713583SmrgCC="$lt_save_CC"
697239713583Smrg])# _LT_LANG_RC_CONFIG
697395b296d0Smrg
697495b296d0Smrg
697539713583Smrg# LT_PROG_GCJ
697639713583Smrg# -----------
697739713583SmrgAC_DEFUN([LT_PROG_GCJ],
697839713583Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
697939713583Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
698039713583Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
698139713583Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
698239713583Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
698339713583Smrg])
698495b296d0Smrg
698539713583Smrg# Old name:
698639713583SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
698739713583Smrgdnl aclocal-1.4 backwards compatibility:
698839713583Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
698995b296d0Smrg
699095b296d0Smrg
699139713583Smrg# LT_PROG_RC
699239713583Smrg# ----------
699339713583SmrgAC_DEFUN([LT_PROG_RC],
699439713583Smrg[AC_CHECK_TOOL(RC, windres,)
699539713583Smrg])
699695b296d0Smrg
699739713583Smrg# Old name:
699839713583SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
699939713583Smrgdnl aclocal-1.4 backwards compatibility:
700039713583Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7001ff89ac2bSmrg
700295b296d0Smrg
700339713583Smrg# _LT_DECL_EGREP
700439713583Smrg# --------------
700539713583Smrg# If we don't have a new enough Autoconf to choose the best grep
700639713583Smrg# available, choose the one first in the user's PATH.
700739713583Smrgm4_defun([_LT_DECL_EGREP],
700839713583Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
700939713583SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
701039713583Smrgtest -z "$GREP" && GREP=grep
701139713583Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
701239713583Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
701339713583Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
701439713583Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
701539713583SmrgAC_SUBST([GREP])
701639713583Smrg])
701795b296d0Smrg
701895b296d0Smrg
701939713583Smrg# _LT_DECL_OBJDUMP
702039713583Smrg# --------------
702139713583Smrg# If we don't have a new enough Autoconf to choose the best objdump
702239713583Smrg# available, choose the one first in the user's PATH.
702339713583Smrgm4_defun([_LT_DECL_OBJDUMP],
702439713583Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
702539713583Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
702639713583Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
702739713583SmrgAC_SUBST([OBJDUMP])
702839713583Smrg])
702995b296d0Smrg
703095b296d0Smrg
703139713583Smrg# _LT_DECL_SED
703239713583Smrg# ------------
703339713583Smrg# Check for a fully-functional sed program, that truncates
703439713583Smrg# as few characters as possible.  Prefer GNU sed if found.
703539713583Smrgm4_defun([_LT_DECL_SED],
703639713583Smrg[AC_PROG_SED
703739713583Smrgtest -z "$SED" && SED=sed
703839713583SmrgXsed="$SED -e 1s/^X//"
703939713583Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
704039713583Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
704139713583Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
704239713583Smrg])# _LT_DECL_SED
704395b296d0Smrg
704439713583Smrgm4_ifndef([AC_PROG_SED], [
704539713583Smrg# NOTE: This macro has been submitted for inclusion into   #
704639713583Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
704739713583Smrg#  a released version of Autoconf we should remove this    #
704839713583Smrg#  macro and use it instead.                               #
704995b296d0Smrg
705039713583Smrgm4_defun([AC_PROG_SED],
705139713583Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
705239713583SmrgAC_CACHE_VAL(lt_cv_path_SED,
705339713583Smrg[# Loop through the user's path and test for sed and gsed.
705439713583Smrg# Then use that list of sed's as ones to test for truncation.
705539713583Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
705639713583Smrgfor as_dir in $PATH
705739713583Smrgdo
705839713583Smrg  IFS=$as_save_IFS
705939713583Smrg  test -z "$as_dir" && as_dir=.
706039713583Smrg  for lt_ac_prog in sed gsed; do
706139713583Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
706239713583Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
706339713583Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
706439713583Smrg      fi
706539713583Smrg    done
706639713583Smrg  done
706739713583Smrgdone
706839713583SmrgIFS=$as_save_IFS
706939713583Smrglt_ac_max=0
707039713583Smrglt_ac_count=0
707139713583Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
707239713583Smrg# along with /bin/sed that truncates output.
707339713583Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
707439713583Smrg  test ! -f $lt_ac_sed && continue
707539713583Smrg  cat /dev/null > conftest.in
707639713583Smrg  lt_ac_count=0
707739713583Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
707839713583Smrg  # Check for GNU sed and select it if it is found.
707939713583Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
708039713583Smrg    lt_cv_path_SED=$lt_ac_sed
708139713583Smrg    break
708295b296d0Smrg  fi
708339713583Smrg  while true; do
708439713583Smrg    cat conftest.in conftest.in >conftest.tmp
708539713583Smrg    mv conftest.tmp conftest.in
708639713583Smrg    cp conftest.in conftest.nl
708739713583Smrg    echo >>conftest.nl
708839713583Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
708939713583Smrg    cmp -s conftest.out conftest.nl || break
709039713583Smrg    # 10000 chars as input seems more than enough
709139713583Smrg    test $lt_ac_count -gt 10 && break
709239713583Smrg    lt_ac_count=`expr $lt_ac_count + 1`
709339713583Smrg    if test $lt_ac_count -gt $lt_ac_max; then
709439713583Smrg      lt_ac_max=$lt_ac_count
709539713583Smrg      lt_cv_path_SED=$lt_ac_sed
709639713583Smrg    fi
709739713583Smrg  done
709839713583Smrgdone
709995b296d0Smrg])
710039713583SmrgSED=$lt_cv_path_SED
710139713583SmrgAC_SUBST([SED])
710239713583SmrgAC_MSG_RESULT([$SED])
710339713583Smrg])#AC_PROG_SED
710439713583Smrg])#m4_ifndef
710595b296d0Smrg
710639713583Smrg# Old name:
710739713583SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
710839713583Smrgdnl aclocal-1.4 backwards compatibility:
710939713583Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
711039713583Smrg
711139713583Smrg
711239713583Smrg# _LT_CHECK_SHELL_FEATURES
711339713583Smrg# ------------------------
711439713583Smrg# Find out whether the shell is Bourne or XSI compatible,
711539713583Smrg# or has some other useful features.
711639713583Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
711739713583Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
711839713583Smrg# Try some XSI features
711939713583Smrgxsi_shell=no
712039713583Smrg( _lt_dummy="a/b/c"
712139713583Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
712239713583Smrg      = c,a/b,, \
712339713583Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
712439713583Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
712539713583Smrg  && xsi_shell=yes
712639713583SmrgAC_MSG_RESULT([$xsi_shell])
712739713583Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
712839713583Smrg
712939713583SmrgAC_MSG_CHECKING([whether the shell understands "+="])
713039713583Smrglt_shell_append=no
713139713583Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
713239713583Smrg    >/dev/null 2>&1 \
713339713583Smrg  && lt_shell_append=yes
713439713583SmrgAC_MSG_RESULT([$lt_shell_append])
713539713583Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
713639713583Smrg
713739713583Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
713839713583Smrg  lt_unset=unset
713939713583Smrgelse
714039713583Smrg  lt_unset=false
714195b296d0Smrgfi
714239713583Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
714339713583Smrg
714439713583Smrg# test EBCDIC or ASCII
714539713583Smrgcase `echo X|tr X '\101'` in
714639713583Smrg A) # ASCII based system
714739713583Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
714839713583Smrg  lt_SP2NL='tr \040 \012'
714939713583Smrg  lt_NL2SP='tr \015\012 \040\040'
715039713583Smrg  ;;
715139713583Smrg *) # EBCDIC based system
715239713583Smrg  lt_SP2NL='tr \100 \n'
715339713583Smrg  lt_NL2SP='tr \r\n \100\100'
715439713583Smrg  ;;
715595b296d0Smrgesac
715639713583Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
715739713583Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
715839713583Smrg])# _LT_CHECK_SHELL_FEATURES
715939713583Smrg
716039713583Smrg
716139713583Smrg# _LT_PROG_XSI_SHELLFNS
716239713583Smrg# ---------------------
716339713583Smrg# Bourne and XSI compatible variants of some useful shell functions.
716439713583Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
716539713583Smrg[case $xsi_shell in
716639713583Smrg  yes)
716739713583Smrg    cat << \_LT_EOF >> "$cfgfile"
716839713583Smrg
716939713583Smrg# func_dirname file append nondir_replacement
717039713583Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
717139713583Smrg# otherwise set result to NONDIR_REPLACEMENT.
717239713583Smrgfunc_dirname ()
717339713583Smrg{
717439713583Smrg  case ${1} in
717539713583Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
717639713583Smrg    *  ) func_dirname_result="${3}" ;;
717739713583Smrg  esac
717839713583Smrg}
717995b296d0Smrg
718039713583Smrg# func_basename file
718139713583Smrgfunc_basename ()
718239713583Smrg{
718339713583Smrg  func_basename_result="${1##*/}"
718439713583Smrg}
718595b296d0Smrg
718639713583Smrg# func_dirname_and_basename file append nondir_replacement
718739713583Smrg# perform func_basename and func_dirname in a single function
718839713583Smrg# call:
718939713583Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
719039713583Smrg#             add APPEND to the result, otherwise set result
719139713583Smrg#             to NONDIR_REPLACEMENT.
719239713583Smrg#             value returned in "$func_dirname_result"
719339713583Smrg#   basename: Compute filename of FILE.
719439713583Smrg#             value retuned in "$func_basename_result"
719539713583Smrg# Implementation must be kept synchronized with func_dirname
719639713583Smrg# and func_basename. For efficiency, we do not delegate to
719739713583Smrg# those functions but instead duplicate the functionality here.
719839713583Smrgfunc_dirname_and_basename ()
719939713583Smrg{
720039713583Smrg  case ${1} in
720139713583Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
720239713583Smrg    *  ) func_dirname_result="${3}" ;;
720339713583Smrg  esac
720439713583Smrg  func_basename_result="${1##*/}"
720539713583Smrg}
720695b296d0Smrg
720739713583Smrg# func_stripname prefix suffix name
720839713583Smrg# strip PREFIX and SUFFIX off of NAME.
720939713583Smrg# PREFIX and SUFFIX must not contain globbing or regex special
721039713583Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
721139713583Smrg# dot (in which case that matches only a dot).
721239713583Smrgfunc_stripname ()
721339713583Smrg{
721439713583Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
721539713583Smrg  # positional parameters, so assign one to ordinary parameter first.
721639713583Smrg  func_stripname_result=${3}
721739713583Smrg  func_stripname_result=${func_stripname_result#"${1}"}
721839713583Smrg  func_stripname_result=${func_stripname_result%"${2}"}
721939713583Smrg}
722039713583Smrg
722139713583Smrg# func_opt_split
722239713583Smrgfunc_opt_split ()
722339713583Smrg{
722439713583Smrg  func_opt_split_opt=${1%%=*}
722539713583Smrg  func_opt_split_arg=${1#*=}
722639713583Smrg}
722739713583Smrg
722839713583Smrg# func_lo2o object
722939713583Smrgfunc_lo2o ()
723039713583Smrg{
723139713583Smrg  case ${1} in
723239713583Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
723339713583Smrg    *)    func_lo2o_result=${1} ;;
723495b296d0Smrg  esac
723539713583Smrg}
723639713583Smrg
723739713583Smrg# func_xform libobj-or-source
723839713583Smrgfunc_xform ()
723939713583Smrg{
724039713583Smrg  func_xform_result=${1%.*}.lo
724139713583Smrg}
724239713583Smrg
724339713583Smrg# func_arith arithmetic-term...
724439713583Smrgfunc_arith ()
724539713583Smrg{
724639713583Smrg  func_arith_result=$(( $[*] ))
724739713583Smrg}
724839713583Smrg
724939713583Smrg# func_len string
725039713583Smrg# STRING may not start with a hyphen.
725139713583Smrgfunc_len ()
725239713583Smrg{
725339713583Smrg  func_len_result=${#1}
725439713583Smrg}
725539713583Smrg
725639713583Smrg_LT_EOF
725795b296d0Smrg    ;;
725839713583Smrg  *) # Bourne compatible functions.
725939713583Smrg    cat << \_LT_EOF >> "$cfgfile"
726039713583Smrg
726139713583Smrg# func_dirname file append nondir_replacement
726239713583Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
726339713583Smrg# otherwise set result to NONDIR_REPLACEMENT.
726439713583Smrgfunc_dirname ()
726539713583Smrg{
726639713583Smrg  # Extract subdirectory from the argument.
726739713583Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
726839713583Smrg  if test "X$func_dirname_result" = "X${1}"; then
726939713583Smrg    func_dirname_result="${3}"
727039713583Smrg  else
727139713583Smrg    func_dirname_result="$func_dirname_result${2}"
727239713583Smrg  fi
727339713583Smrg}
727439713583Smrg
727539713583Smrg# func_basename file
727639713583Smrgfunc_basename ()
727739713583Smrg{
727839713583Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
727939713583Smrg}
728039713583Smrg
728139713583Smrgdnl func_dirname_and_basename
728239713583Smrgdnl A portable version of this function is already defined in general.m4sh
728339713583Smrgdnl so there is no need for it here.
728439713583Smrg
728539713583Smrg# func_stripname prefix suffix name
728639713583Smrg# strip PREFIX and SUFFIX off of NAME.
728739713583Smrg# PREFIX and SUFFIX must not contain globbing or regex special
728839713583Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
728939713583Smrg# dot (in which case that matches only a dot).
729039713583Smrg# func_strip_suffix prefix name
729139713583Smrgfunc_stripname ()
729239713583Smrg{
729339713583Smrg  case ${2} in
729439713583Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
729539713583Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
729639713583Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
729739713583Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
729895b296d0Smrg  esac
729939713583Smrg}
730095b296d0Smrg
730139713583Smrg# sed scripts:
730239713583Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
730339713583Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
730495b296d0Smrg
730539713583Smrg# func_opt_split
730639713583Smrgfunc_opt_split ()
730739713583Smrg{
730839713583Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
730939713583Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
731039713583Smrg}
731195b296d0Smrg
731239713583Smrg# func_lo2o object
731339713583Smrgfunc_lo2o ()
731439713583Smrg{
731539713583Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
731639713583Smrg}
731795b296d0Smrg
731839713583Smrg# func_xform libobj-or-source
731939713583Smrgfunc_xform ()
732039713583Smrg{
732139713583Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
732239713583Smrg}
732395b296d0Smrg
732439713583Smrg# func_arith arithmetic-term...
732539713583Smrgfunc_arith ()
732639713583Smrg{
732739713583Smrg  func_arith_result=`expr "$[@]"`
732839713583Smrg}
732995b296d0Smrg
733039713583Smrg# func_len string
733139713583Smrg# STRING may not start with a hyphen.
733239713583Smrgfunc_len ()
733339713583Smrg{
733439713583Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
733539713583Smrg}
733695b296d0Smrg
733739713583Smrg_LT_EOF
733839713583Smrgesac
733995b296d0Smrg
734039713583Smrgcase $lt_shell_append in
734139713583Smrg  yes)
734239713583Smrg    cat << \_LT_EOF >> "$cfgfile"
734395b296d0Smrg
734439713583Smrg# func_append var value
734539713583Smrg# Append VALUE to the end of shell variable VAR.
734639713583Smrgfunc_append ()
734739713583Smrg{
734839713583Smrg  eval "$[1]+=\$[2]"
734939713583Smrg}
735039713583Smrg_LT_EOF
735139713583Smrg    ;;
735239713583Smrg  *)
735339713583Smrg    cat << \_LT_EOF >> "$cfgfile"
735495b296d0Smrg
735539713583Smrg# func_append var value
735639713583Smrg# Append VALUE to the end of shell variable VAR.
735739713583Smrgfunc_append ()
735839713583Smrg{
735939713583Smrg  eval "$[1]=\$$[1]\$[2]"
736039713583Smrg}
736195b296d0Smrg
736239713583Smrg_LT_EOF
736339713583Smrg    ;;
736439713583Smrg  esac
736539713583Smrg])
736695b296d0Smrg
736739713583Smrg# Helper functions for option handling.                    -*- Autoconf -*-
736839713583Smrg#
736939713583Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
737039713583Smrg#   Written by Gary V. Vaughan, 2004
737139713583Smrg#
737239713583Smrg# This file is free software; the Free Software Foundation gives
737339713583Smrg# unlimited permission to copy and/or distribute it, with or without
737439713583Smrg# modifications, as long as this notice is preserved.
737595b296d0Smrg
737639713583Smrg# serial 6 ltoptions.m4
737795b296d0Smrg
737839713583Smrg# This is to help aclocal find these macros, as it can't see m4_define.
737939713583SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
738095b296d0Smrg
738195b296d0Smrg
738239713583Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
738339713583Smrg# ------------------------------------------
738439713583Smrgm4_define([_LT_MANGLE_OPTION],
738539713583Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
738695b296d0Smrg
738795b296d0Smrg
738839713583Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
738939713583Smrg# ---------------------------------------
739039713583Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
739139713583Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
739239713583Smrg# saved as a flag.
739339713583Smrgm4_define([_LT_SET_OPTION],
739439713583Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
739539713583Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
739639713583Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
739739713583Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
739839713583Smrg])
739995b296d0Smrg
740095b296d0Smrg
740139713583Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
740239713583Smrg# ------------------------------------------------------------
740339713583Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
740439713583Smrgm4_define([_LT_IF_OPTION],
740539713583Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
740639713583Smrg
740739713583Smrg
740839713583Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
740939713583Smrg# -------------------------------------------------------
741039713583Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
741139713583Smrg# are set.
741239713583Smrgm4_define([_LT_UNLESS_OPTIONS],
741339713583Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
741439713583Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
741539713583Smrg		      [m4_define([$0_found])])])[]dnl
741639713583Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
741739713583Smrg])[]dnl
741839713583Smrg])
741995b296d0Smrg
742095b296d0Smrg
742139713583Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
742239713583Smrg# ----------------------------------------
742339713583Smrg# OPTION-LIST is a space-separated list of Libtool options associated
742439713583Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
742539713583Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
742639713583Smrg# the unknown option and exit.
742739713583Smrgm4_defun([_LT_SET_OPTIONS],
742839713583Smrg[# Set options
742939713583Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
743039713583Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
743139713583Smrg
743239713583Smrgm4_if([$1],[LT_INIT],[
743339713583Smrg  dnl
743439713583Smrg  dnl Simply set some default values (i.e off) if boolean options were not
743539713583Smrg  dnl specified:
743639713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
743739713583Smrg  ])
743839713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
743939713583Smrg  ])
744039713583Smrg  dnl
744139713583Smrg  dnl If no reference was made to various pairs of opposing options, then
744239713583Smrg  dnl we run the default mode handler for the pair.  For example, if neither
744339713583Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
744439713583Smrg  dnl archives by default:
744539713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
744639713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
744739713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
744839713583Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
744939713583Smrg  		   [_LT_ENABLE_FAST_INSTALL])
745039713583Smrg  ])
745139713583Smrg])# _LT_SET_OPTIONS
745295b296d0Smrg
745395b296d0Smrg
745495b296d0Smrg
745539713583Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
745639713583Smrg# -----------------------------------------
745739713583Smrgm4_define([_LT_MANGLE_DEFUN],
745839713583Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
745995b296d0Smrg
746095b296d0Smrg
746139713583Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
746239713583Smrg# -----------------------------------------------
746339713583Smrgm4_define([LT_OPTION_DEFINE],
746439713583Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
746539713583Smrg])# LT_OPTION_DEFINE
746695b296d0Smrg
746795b296d0Smrg
746839713583Smrg# dlopen
746939713583Smrg# ------
747039713583SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
747139713583Smrg])
747239713583Smrg
747339713583SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
747439713583Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
747539713583SmrgAC_DIAGNOSE([obsolete],
747639713583Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
747739713583Smrgput the `dlopen' option into LT_INIT's first parameter.])
747839713583Smrg])
747939713583Smrg
748039713583Smrgdnl aclocal-1.4 backwards compatibility:
748139713583Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
748239713583Smrg
748339713583Smrg
748439713583Smrg# win32-dll
748539713583Smrg# ---------
748639713583Smrg# Declare package support for building win32 dll's.
748739713583SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
748839713583Smrg[enable_win32_dll=yes
748995b296d0Smrg
749039713583Smrgcase $host in
749139713583Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
749239713583Smrg  AC_CHECK_TOOL(AS, as, false)
749339713583Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
749439713583Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
749539713583Smrg  ;;
749639713583Smrgesac
749795b296d0Smrg
749839713583Smrgtest -z "$AS" && AS=as
749939713583Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
750095b296d0Smrg
750139713583Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
750239713583Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
750395b296d0Smrg
750439713583Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
750539713583Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
750639713583Smrg])# win32-dll
750795b296d0Smrg
750839713583SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
750939713583Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
751039713583Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
751139713583SmrgAC_DIAGNOSE([obsolete],
751239713583Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
751339713583Smrgput the `win32-dll' option into LT_INIT's first parameter.])
751439713583Smrg])
751595b296d0Smrg
751639713583Smrgdnl aclocal-1.4 backwards compatibility:
751739713583Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
751895b296d0Smrg
751995b296d0Smrg
752039713583Smrg# _LT_ENABLE_SHARED([DEFAULT])
752139713583Smrg# ----------------------------
752239713583Smrg# implement the --enable-shared flag, and supports the `shared' and
752339713583Smrg# `disable-shared' LT_INIT options.
752439713583Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
752539713583Smrgm4_define([_LT_ENABLE_SHARED],
752639713583Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
752739713583SmrgAC_ARG_ENABLE([shared],
752839713583Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
752939713583Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
753039713583Smrg    [p=${PACKAGE-default}
753139713583Smrg    case $enableval in
753239713583Smrg    yes) enable_shared=yes ;;
753339713583Smrg    no) enable_shared=no ;;
753439713583Smrg    *)
753539713583Smrg      enable_shared=no
753639713583Smrg      # Look at the argument we got.  We use all the common list separators.
753739713583Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
753839713583Smrg      for pkg in $enableval; do
753939713583Smrg	IFS="$lt_save_ifs"
754039713583Smrg	if test "X$pkg" = "X$p"; then
754139713583Smrg	  enable_shared=yes
754239713583Smrg	fi
754339713583Smrg      done
754439713583Smrg      IFS="$lt_save_ifs"
754595b296d0Smrg      ;;
754639713583Smrg    esac],
754739713583Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
754895b296d0Smrg
754939713583Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
755039713583Smrg	[Whether or not to build shared libraries])
755139713583Smrg])# _LT_ENABLE_SHARED
755295b296d0Smrg
755339713583SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
755439713583SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
755595b296d0Smrg
755639713583Smrg# Old names:
755739713583SmrgAC_DEFUN([AC_ENABLE_SHARED],
755839713583Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
755939713583Smrg])
756095b296d0Smrg
756139713583SmrgAC_DEFUN([AC_DISABLE_SHARED],
756239713583Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
756339713583Smrg])
756495b296d0Smrg
756539713583SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
756639713583SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
756795b296d0Smrg
756839713583Smrgdnl aclocal-1.4 backwards compatibility:
756939713583Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
757039713583Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
757195b296d0Smrg
757295b296d0Smrg
757395b296d0Smrg
757439713583Smrg# _LT_ENABLE_STATIC([DEFAULT])
757539713583Smrg# ----------------------------
757639713583Smrg# implement the --enable-static flag, and support the `static' and
757739713583Smrg# `disable-static' LT_INIT options.
757839713583Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
757939713583Smrgm4_define([_LT_ENABLE_STATIC],
758039713583Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
758139713583SmrgAC_ARG_ENABLE([static],
758239713583Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
758339713583Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
758439713583Smrg    [p=${PACKAGE-default}
758539713583Smrg    case $enableval in
758639713583Smrg    yes) enable_static=yes ;;
758739713583Smrg    no) enable_static=no ;;
758839713583Smrg    *)
758939713583Smrg     enable_static=no
759039713583Smrg      # Look at the argument we got.  We use all the common list separators.
759139713583Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
759239713583Smrg      for pkg in $enableval; do
759339713583Smrg	IFS="$lt_save_ifs"
759439713583Smrg	if test "X$pkg" = "X$p"; then
759539713583Smrg	  enable_static=yes
759639713583Smrg	fi
759739713583Smrg      done
759839713583Smrg      IFS="$lt_save_ifs"
759995b296d0Smrg      ;;
760039713583Smrg    esac],
760139713583Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
760295b296d0Smrg
760339713583Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
760439713583Smrg	[Whether or not to build static libraries])
760539713583Smrg])# _LT_ENABLE_STATIC
760695b296d0Smrg
760739713583SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
760839713583SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
760995b296d0Smrg
761039713583Smrg# Old names:
761139713583SmrgAC_DEFUN([AC_ENABLE_STATIC],
761239713583Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
761339713583Smrg])
761495b296d0Smrg
761539713583SmrgAC_DEFUN([AC_DISABLE_STATIC],
761639713583Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
761739713583Smrg])
761895b296d0Smrg
761939713583SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
762039713583SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
762195b296d0Smrg
762239713583Smrgdnl aclocal-1.4 backwards compatibility:
762339713583Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
762439713583Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
762595b296d0Smrg
762695b296d0Smrg
762739713583Smrg
762839713583Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
762939713583Smrg# ----------------------------------
763039713583Smrg# implement the --enable-fast-install flag, and support the `fast-install'
763139713583Smrg# and `disable-fast-install' LT_INIT options.
763239713583Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
763339713583Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
763439713583Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
763539713583SmrgAC_ARG_ENABLE([fast-install],
763639713583Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
763739713583Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
763839713583Smrg    [p=${PACKAGE-default}
763939713583Smrg    case $enableval in
764039713583Smrg    yes) enable_fast_install=yes ;;
764139713583Smrg    no) enable_fast_install=no ;;
764239713583Smrg    *)
764339713583Smrg      enable_fast_install=no
764439713583Smrg      # Look at the argument we got.  We use all the common list separators.
764539713583Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
764639713583Smrg      for pkg in $enableval; do
764739713583Smrg	IFS="$lt_save_ifs"
764839713583Smrg	if test "X$pkg" = "X$p"; then
764939713583Smrg	  enable_fast_install=yes
7650ff89ac2bSmrg	fi
765139713583Smrg      done
765239713583Smrg      IFS="$lt_save_ifs"
765395b296d0Smrg      ;;
765439713583Smrg    esac],
765539713583Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
765695b296d0Smrg
765739713583Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
765839713583Smrg	 [Whether or not to optimize for fast installation])dnl
765939713583Smrg])# _LT_ENABLE_FAST_INSTALL
766095b296d0Smrg
766139713583SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
766239713583SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
766395b296d0Smrg
766439713583Smrg# Old names:
766539713583SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
766639713583Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
766739713583SmrgAC_DIAGNOSE([obsolete],
766839713583Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
766939713583Smrgthe `fast-install' option into LT_INIT's first parameter.])
767039713583Smrg])
767195b296d0Smrg
767239713583SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
767339713583Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
767439713583SmrgAC_DIAGNOSE([obsolete],
767539713583Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
767639713583Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
767739713583Smrg])
767895b296d0Smrg
767939713583Smrgdnl aclocal-1.4 backwards compatibility:
768039713583Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
768139713583Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
768295b296d0Smrg
768395b296d0Smrg
768439713583Smrg# _LT_WITH_PIC([MODE])
768539713583Smrg# --------------------
768639713583Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
768739713583Smrg# LT_INIT options.
768839713583Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
768939713583Smrgm4_define([_LT_WITH_PIC],
769039713583Smrg[AC_ARG_WITH([pic],
769139713583Smrg    [AS_HELP_STRING([--with-pic],
769239713583Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
769339713583Smrg    [pic_mode="$withval"],
769439713583Smrg    [pic_mode=default])
769595b296d0Smrg
769639713583Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
769795b296d0Smrg
769839713583Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
769939713583Smrg])# _LT_WITH_PIC
770095b296d0Smrg
770139713583SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
770239713583SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
770339713583Smrg
770439713583Smrg# Old name:
770539713583SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
770639713583Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
770739713583SmrgAC_DIAGNOSE([obsolete],
770839713583Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
770939713583Smrgput the `pic-only' option into LT_INIT's first parameter.])
771095b296d0Smrg])
771195b296d0Smrg
771239713583Smrgdnl aclocal-1.4 backwards compatibility:
771339713583Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
771495b296d0Smrg
771595b296d0Smrg
771639713583Smrgm4_define([_LTDL_MODE], [])
771739713583SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
771839713583Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
771939713583SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
772039713583Smrg		 [m4_define([_LTDL_MODE], [recursive])])
772139713583SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
772239713583Smrg		 [m4_define([_LTDL_MODE], [subproject])])
772395b296d0Smrg
772439713583Smrgm4_define([_LTDL_TYPE], [])
772539713583SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
772639713583Smrg		 [m4_define([_LTDL_TYPE], [installable])])
772739713583SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
772839713583Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
772995b296d0Smrg
773039713583Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
773195b296d0Smrg#
773239713583Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
773339713583Smrg# Written by Gary V. Vaughan, 2004
773495b296d0Smrg#
773539713583Smrg# This file is free software; the Free Software Foundation gives
773639713583Smrg# unlimited permission to copy and/or distribute it, with or without
773739713583Smrg# modifications, as long as this notice is preserved.
773839713583Smrg
773939713583Smrg# serial 6 ltsugar.m4
774039713583Smrg
774139713583Smrg# This is to help aclocal find these macros, as it can't see m4_define.
774239713583SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
774339713583Smrg
774439713583Smrg
774539713583Smrg# lt_join(SEP, ARG1, [ARG2...])
774639713583Smrg# -----------------------------
774739713583Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
774839713583Smrg# associated separator.
774939713583Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
775039713583Smrg# versions in m4sugar had bugs.
775139713583Smrgm4_define([lt_join],
775239713583Smrg[m4_if([$#], [1], [],
775339713583Smrg       [$#], [2], [[$2]],
775439713583Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
775539713583Smrgm4_define([_lt_join],
775639713583Smrg[m4_if([$#$2], [2], [],
775739713583Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
775839713583Smrg
775939713583Smrg
776039713583Smrg# lt_car(LIST)
776139713583Smrg# lt_cdr(LIST)
776239713583Smrg# ------------
776339713583Smrg# Manipulate m4 lists.
776439713583Smrg# These macros are necessary as long as will still need to support
776539713583Smrg# Autoconf-2.59 which quotes differently.
776639713583Smrgm4_define([lt_car], [[$1]])
776739713583Smrgm4_define([lt_cdr],
776839713583Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
776939713583Smrg       [$#], 1, [],
777039713583Smrg       [m4_dquote(m4_shift($@))])])
777139713583Smrgm4_define([lt_unquote], $1)
777239713583Smrg
777339713583Smrg
777439713583Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
777539713583Smrg# ------------------------------------------
777639713583Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
777739713583Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
777839713583Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
777939713583Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
778039713583Smrg# than defined and empty).
778195b296d0Smrg#
778239713583Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
778339713583Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
778439713583Smrgm4_define([lt_append],
778539713583Smrg[m4_define([$1],
778639713583Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
778739713583Smrg
778839713583Smrg
778939713583Smrg
779039713583Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
779139713583Smrg# ----------------------------------------------------------
779239713583Smrg# Produce a SEP delimited list of all paired combinations of elements of
779339713583Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
779439713583Smrg# has the form PREFIXmINFIXSUFFIXn.
779539713583Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
779639713583Smrgm4_define([lt_combine],
779739713583Smrg[m4_if(m4_eval([$# > 3]), [1],
779839713583Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
779939713583Smrg[[m4_foreach([_Lt_prefix], [$2],
780039713583Smrg	     [m4_foreach([_Lt_suffix],
780139713583Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
780239713583Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
780339713583Smrg
780439713583Smrg
780539713583Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
780639713583Smrg# -----------------------------------------------------------------------
780739713583Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
780839713583Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
780939713583Smrgm4_define([lt_if_append_uniq],
781039713583Smrg[m4_ifdef([$1],
781139713583Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
781239713583Smrg		 [lt_append([$1], [$2], [$3])$4],
781339713583Smrg		 [$5])],
781439713583Smrg	  [lt_append([$1], [$2], [$3])$4])])
781539713583Smrg
781639713583Smrg
781739713583Smrg# lt_dict_add(DICT, KEY, VALUE)
781839713583Smrg# -----------------------------
781939713583Smrgm4_define([lt_dict_add],
782039713583Smrg[m4_define([$1($2)], [$3])])
782195b296d0Smrg
782295b296d0Smrg
782339713583Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
782439713583Smrg# --------------------------------------------
782539713583Smrgm4_define([lt_dict_add_subkey],
782639713583Smrg[m4_define([$1($2:$3)], [$4])])
782739713583Smrg
782895b296d0Smrg
782939713583Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
783039713583Smrg# ----------------------------------
783139713583Smrgm4_define([lt_dict_fetch],
783239713583Smrg[m4_ifval([$3],
783339713583Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
783439713583Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
783595b296d0Smrg
783695b296d0Smrg
783739713583Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
783839713583Smrg# -----------------------------------------------------------------
783939713583Smrgm4_define([lt_if_dict_fetch],
784039713583Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
784139713583Smrg	[$5],
784239713583Smrg    [$6])])
784395b296d0Smrg
784495b296d0Smrg
784539713583Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
784639713583Smrg# --------------------------------------------------------------
784739713583Smrgm4_define([lt_dict_filter],
784839713583Smrg[m4_if([$5], [], [],
784939713583Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
785039713583Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
785139713583Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
785295b296d0Smrg])
785395b296d0Smrg
785439713583Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
785539713583Smrg#
785639713583Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
785739713583Smrg#   Written by Scott James Remnant, 2004
785839713583Smrg#
785939713583Smrg# This file is free software; the Free Software Foundation gives
786039713583Smrg# unlimited permission to copy and/or distribute it, with or without
786139713583Smrg# modifications, as long as this notice is preserved.
7862ff89ac2bSmrg
786339713583Smrg# Generated from ltversion.in.
7864ff89ac2bSmrg
786539713583Smrg# serial 3012 ltversion.m4
786639713583Smrg# This file is part of GNU Libtool
7867ff89ac2bSmrg
786839713583Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
786939713583Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7870ff89ac2bSmrg
787139713583SmrgAC_DEFUN([LTVERSION_VERSION],
787239713583Smrg[macro_version='2.2.6'
787339713583Smrgmacro_revision='1.3012'
787439713583Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
787539713583Smrg_LT_DECL(, macro_revision, 0)
787695b296d0Smrg])
787795b296d0Smrg
787839713583Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
787939713583Smrg#
788039713583Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
788139713583Smrg#   Written by Scott James Remnant, 2004.
788239713583Smrg#
788339713583Smrg# This file is free software; the Free Software Foundation gives
788439713583Smrg# unlimited permission to copy and/or distribute it, with or without
788539713583Smrg# modifications, as long as this notice is preserved.
788639713583Smrg
788739713583Smrg# serial 4 lt~obsolete.m4
788839713583Smrg
788939713583Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
789039713583Smrg#
789139713583Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
789239713583Smrg# which have later been changed to m4_define as they aren't part of the
789339713583Smrg# exported API, or moved to Autoconf or Automake where they belong.
789439713583Smrg#
789539713583Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
789639713583Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
789739713583Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
789839713583Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
789939713583Smrg# and doesn't know about Autoconf macros at all.)
790039713583Smrg#
790139713583Smrg# So we provide this file, which has a silly filename so it's always
790239713583Smrg# included after everything else.  This provides aclocal with the
790339713583Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
790439713583Smrg# because those macros already exist, or will be overwritten later.
790539713583Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
790639713583Smrg#
790739713583Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
790839713583Smrg# Yes, that means every name once taken will need to remain here until
790939713583Smrg# we give up compatibility with versions before 1.7, at which point
791039713583Smrg# we need to keep only those names which we still refer to.
791139713583Smrg
791239713583Smrg# This is to help aclocal find these macros, as it can't see m4_define.
791339713583SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
791439713583Smrg
791539713583Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
791639713583Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
791739713583Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
791839713583Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
791939713583Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
792039713583Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
792139713583Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
792239713583Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
792339713583Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
792439713583Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
792539713583Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
792639713583Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
792739713583Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
792839713583Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
792939713583Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
793039713583Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
793139713583Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
793239713583Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
793339713583Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
793439713583Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
793539713583Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
793639713583Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
793739713583Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
793839713583Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
793939713583Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
794039713583Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
794139713583Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
794239713583Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
794339713583Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
794439713583Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
794539713583Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
794639713583Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
794739713583Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
794839713583Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
794939713583Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
795039713583Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
795139713583Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
795239713583Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
795339713583Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
795439713583Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
795539713583Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
795639713583Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
795739713583Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
795839713583Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
795939713583Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
796039713583Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
796139713583Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
796239713583Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
796339713583Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
796439713583Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
796539713583Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
796639713583Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
796739713583Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
796839713583Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
796939713583Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
797039713583Smrg
797195b296d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
797295b296d0Smrg# 
797395b296d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
797495b296d0Smrg#
797595b296d0Smrg# This program is free software; you can redistribute it and/or modify
797695b296d0Smrg# it under the terms of the GNU General Public License as published by
797795b296d0Smrg# the Free Software Foundation; either version 2 of the License, or
797895b296d0Smrg# (at your option) any later version.
797995b296d0Smrg#
798095b296d0Smrg# This program is distributed in the hope that it will be useful, but
798195b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
798295b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
798395b296d0Smrg# General Public License for more details.
798495b296d0Smrg#
798595b296d0Smrg# You should have received a copy of the GNU General Public License
798695b296d0Smrg# along with this program; if not, write to the Free Software
798795b296d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
798895b296d0Smrg#
798995b296d0Smrg# As a special exception to the GNU General Public License, if you
799095b296d0Smrg# distribute this file as part of a program that contains a
799195b296d0Smrg# configuration script generated by Autoconf, you may include it under
799295b296d0Smrg# the same distribution terms that you use for the rest of that program.
799395b296d0Smrg
799495b296d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
799595b296d0Smrg# ----------------------------------
799695b296d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
799795b296d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
799895b296d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
799995b296d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
800095b296d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
800195b296d0Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
800295b296d0Smrgfi
800395b296d0Smrgif test -n "$PKG_CONFIG"; then
800495b296d0Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
800595b296d0Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
800695b296d0Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
800795b296d0Smrg		AC_MSG_RESULT([yes])
800895b296d0Smrg	else
800995b296d0Smrg		AC_MSG_RESULT([no])
801095b296d0Smrg		PKG_CONFIG=""
801195b296d0Smrg	fi
801295b296d0Smrg		
801395b296d0Smrgfi[]dnl
801495b296d0Smrg])# PKG_PROG_PKG_CONFIG
801595b296d0Smrg
801695b296d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
801795b296d0Smrg#
801895b296d0Smrg# Check to see whether a particular set of modules exists.  Similar
801995b296d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
802095b296d0Smrg#
802195b296d0Smrg#
802295b296d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
802395b296d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
802495b296d0Smrg# PKG_CHECK_EXISTS manually
802595b296d0Smrg# --------------------------------------------------------------
802695b296d0SmrgAC_DEFUN([PKG_CHECK_EXISTS],
802795b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
802895b296d0Smrgif test -n "$PKG_CONFIG" && \
802995b296d0Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
803095b296d0Smrg  m4_ifval([$2], [$2], [:])
803195b296d0Smrgm4_ifvaln([$3], [else
803295b296d0Smrg  $3])dnl
803395b296d0Smrgfi])
803495b296d0Smrg
803595b296d0Smrg
803695b296d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
803795b296d0Smrg# ---------------------------------------------
803895b296d0Smrgm4_define([_PKG_CONFIG],
8039ff89ac2bSmrg[if test -n "$$1"; then
8040ff89ac2bSmrg    pkg_cv_[]$1="$$1"
8041ff89ac2bSmrg elif test -n "$PKG_CONFIG"; then
8042ff89ac2bSmrg    PKG_CHECK_EXISTS([$3],
8043ff89ac2bSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8044ff89ac2bSmrg		     [pkg_failed=yes])
8045ff89ac2bSmrg else
8046ff89ac2bSmrg    pkg_failed=untried
804795b296d0Smrgfi[]dnl
804895b296d0Smrg])# _PKG_CONFIG
804995b296d0Smrg
805095b296d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED
805195b296d0Smrg# -----------------------------
805295b296d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
805395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
805495b296d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
805595b296d0Smrg        _pkg_short_errors_supported=yes
805695b296d0Smrgelse
805795b296d0Smrg        _pkg_short_errors_supported=no
805895b296d0Smrgfi[]dnl
805995b296d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
806095b296d0Smrg
806195b296d0Smrg
806295b296d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
806395b296d0Smrg# [ACTION-IF-NOT-FOUND])
806495b296d0Smrg#
806595b296d0Smrg#
806695b296d0Smrg# Note that if there is a possibility the first call to
806795b296d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
806895b296d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
806995b296d0Smrg#
807095b296d0Smrg#
807195b296d0Smrg# --------------------------------------------------------------
807295b296d0SmrgAC_DEFUN([PKG_CHECK_MODULES],
807395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
807495b296d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
807595b296d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
807695b296d0Smrg
807795b296d0Smrgpkg_failed=no
807895b296d0SmrgAC_MSG_CHECKING([for $1])
807995b296d0Smrg
808095b296d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
808195b296d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
808295b296d0Smrg
808395b296d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
808495b296d0Smrgand $1[]_LIBS to avoid the need to call pkg-config.
808595b296d0SmrgSee the pkg-config man page for more details.])
808695b296d0Smrg
808795b296d0Smrgif test $pkg_failed = yes; then
808895b296d0Smrg        _PKG_SHORT_ERRORS_SUPPORTED
808995b296d0Smrg        if test $_pkg_short_errors_supported = yes; then
8090ff89ac2bSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
809195b296d0Smrg        else 
8092ff89ac2bSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
809395b296d0Smrg        fi
809495b296d0Smrg	# Put the nasty error message in config.log where it belongs
809595b296d0Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
809695b296d0Smrg
809795b296d0Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
809895b296d0Smrg[Package requirements ($2) were not met:
809995b296d0Smrg
810095b296d0Smrg$$1_PKG_ERRORS
810195b296d0Smrg
810295b296d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
810395b296d0Smrginstalled software in a non-standard prefix.
810495b296d0Smrg
810595b296d0Smrg_PKG_TEXT
810695b296d0Smrg])],
8107ff89ac2bSmrg		[AC_MSG_RESULT([no])
8108ff89ac2bSmrg                $4])
810995b296d0Smrgelif test $pkg_failed = untried; then
811095b296d0Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
811195b296d0Smrg[The pkg-config script could not be found or is too old.  Make sure it
811295b296d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
811395b296d0Smrgpath to pkg-config.
811495b296d0Smrg
811595b296d0Smrg_PKG_TEXT
811695b296d0Smrg
8117ff89ac2bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
811895b296d0Smrg		[$4])
811995b296d0Smrgelse
812095b296d0Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
812195b296d0Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
812295b296d0Smrg        AC_MSG_RESULT([yes])
812395b296d0Smrg	ifelse([$3], , :, [$3])
812495b296d0Smrgfi[]dnl
812595b296d0Smrg])# PKG_CHECK_MODULES
812695b296d0Smrg
812739713583Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
812895b296d0Smrgdnl
812995b296d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
813095b296d0Smrgdnl 
813195b296d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
813295b296d0Smrgdnl copy of this software and associated documentation files (the
813395b296d0Smrgdnl "Software"), to deal in the Software without restriction, including
813495b296d0Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
813595b296d0Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
813695b296d0Smrgdnl to whom the Software is furnished to do so, provided that the above
813795b296d0Smrgdnl copyright notice(s) and this permission notice appear in all copies of
813895b296d0Smrgdnl the Software and that both the above copyright notice(s) and this
813995b296d0Smrgdnl permission notice appear in supporting documentation.
814095b296d0Smrgdnl
814195b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
814295b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
814395b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
814495b296d0Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
814595b296d0Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
814695b296d0Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
814795b296d0Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
814895b296d0Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
814995b296d0Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
815095b296d0Smrgdnl
815195b296d0Smrgdnl Except as contained in this notice, the name of a copyright holder
815295b296d0Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
815395b296d0Smrgdnl or other dealings in this Software without prior written authorization
815495b296d0Smrgdnl of the copyright holder.
815595b296d0Smrg
815695b296d0Smrg# XORG_MACROS_VERSION(required-version)
815795b296d0Smrg# -------------------------------------
815895b296d0Smrg# Minimum version: 1.1.0
815995b296d0Smrg#
816095b296d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in
816195b296d0Smrg# your configure.ac with the minimum required version, such as:
816295b296d0Smrg# XORG_MACROS_VERSION(1.1)
816395b296d0Smrg#
816495b296d0Smrg# To force at least a version with this macro defined, also add:
816595b296d0Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
816695b296d0Smrg#
816795b296d0Smrg#
816895b296d0Smrg# See the "minimum version" comment for each macro you use to see what 
816995b296d0Smrg# version you require.
817095b296d0SmrgAC_DEFUN([XORG_MACROS_VERSION],[
817195b296d0Smrg	[XORG_MACROS_needed_version=$1
817295b296d0Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
817395b296d0Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817495b296d0Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
817539713583Smrg	[XORG_MACROS_version=1.2.1
817695b296d0Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
817795b296d0Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817895b296d0Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
817995b296d0Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
818095b296d0Smrg	fi
818195b296d0Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
818295b296d0Smrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
818395b296d0Smrg	fi
818495b296d0Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
818595b296d0Smrg]) # XORG_MACROS_VERSION
818695b296d0Smrg
818795b296d0Smrg# XORG_PROG_RAWCPP()
818895b296d0Smrg# ------------------
818995b296d0Smrg# Minimum version: 1.0.0
819095b296d0Smrg#
819195b296d0Smrg# Find cpp program and necessary flags for use in pre-processing text files
819295b296d0Smrg# such as man pages and config files
819395b296d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
819495b296d0SmrgAC_REQUIRE([AC_PROG_CPP])
819595b296d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
819695b296d0Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
819795b296d0Smrg
819895b296d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
819995b296d0Smrg# which is not the best choice for supporting other OS'es, but covers most
820095b296d0Smrg# of the ones we need for now.
820195b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
820295b296d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
820395b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820495b296d0Smrg	AC_MSG_RESULT([no])
820595b296d0Smrgelse
820695b296d0Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820795b296d0Smrg		RAWCPPFLAGS=-undef
820895b296d0Smrg		AC_MSG_RESULT([yes])
820939713583Smrg	# under Cygwin unix is still defined even with -undef
821039713583Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
821139713583Smrg		RAWCPPFLAGS="-undef -ansi"
821239713583Smrg		AC_MSG_RESULT([yes, with -ansi])
821395b296d0Smrg	else
821495b296d0Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
821595b296d0Smrg	fi
821695b296d0Smrgfi
821795b296d0Smrgrm -f conftest.$ac_ext
821895b296d0Smrg
821995b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
822095b296d0SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
822195b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822295b296d0Smrg	AC_MSG_RESULT([no])
822395b296d0Smrgelse
822495b296d0Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822595b296d0Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
822695b296d0Smrg		AC_MSG_RESULT([yes])
822795b296d0Smrg	else
822895b296d0Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
822995b296d0Smrg	fi
823095b296d0Smrgfi
823195b296d0Smrgrm -f conftest.$ac_ext
823295b296d0SmrgAC_SUBST(RAWCPPFLAGS)
823395b296d0Smrg]) # XORG_PROG_RAWCPP
823495b296d0Smrg
823595b296d0Smrg# XORG_MANPAGE_SECTIONS()
823695b296d0Smrg# -----------------------
823795b296d0Smrg# Minimum version: 1.0.0
823895b296d0Smrg#
823995b296d0Smrg# Determine which sections man pages go in for the different man page types
824095b296d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
824195b296d0Smrg# Not sure if there's any better way than just hardcoding by OS name.
824295b296d0Smrg# Override default settings by setting environment variables
824395b296d0Smrg
824495b296d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
824595b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])
824695b296d0Smrg
824795b296d0Smrgif test x$APP_MAN_SUFFIX = x    ; then
8248ff89ac2bSmrg    APP_MAN_SUFFIX=1
824995b296d0Smrgfi
825095b296d0Smrgif test x$APP_MAN_DIR = x    ; then
8251ff89ac2bSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
825295b296d0Smrgfi
825395b296d0Smrg
825495b296d0Smrgif test x$LIB_MAN_SUFFIX = x    ; then
8255ff89ac2bSmrg    LIB_MAN_SUFFIX=3
825695b296d0Smrgfi
825795b296d0Smrgif test x$LIB_MAN_DIR = x    ; then
8258ff89ac2bSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
825995b296d0Smrgfi
826095b296d0Smrg
826195b296d0Smrgif test x$FILE_MAN_SUFFIX = x    ; then
826295b296d0Smrg    case $host_os in
826395b296d0Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
826495b296d0Smrg	*)		FILE_MAN_SUFFIX=5  ;;
826595b296d0Smrg    esac
826695b296d0Smrgfi
826795b296d0Smrgif test x$FILE_MAN_DIR = x    ; then
8268ff89ac2bSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
826995b296d0Smrgfi
827095b296d0Smrg
827195b296d0Smrgif test x$MISC_MAN_SUFFIX = x    ; then
827295b296d0Smrg    case $host_os in
827395b296d0Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
827495b296d0Smrg	*)		MISC_MAN_SUFFIX=7  ;;
827595b296d0Smrg    esac
827695b296d0Smrgfi
827795b296d0Smrgif test x$MISC_MAN_DIR = x    ; then
8278ff89ac2bSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
827995b296d0Smrgfi
828095b296d0Smrg
828195b296d0Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
828295b296d0Smrg    case $host_os in
828395b296d0Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
828495b296d0Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
828595b296d0Smrg    esac
828695b296d0Smrgfi
828795b296d0Smrgif test x$DRIVER_MAN_DIR = x    ; then
8288ff89ac2bSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
828995b296d0Smrgfi
829095b296d0Smrg
829195b296d0Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
829295b296d0Smrg    case $host_os in
829395b296d0Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
829495b296d0Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
829595b296d0Smrg    esac
829695b296d0Smrgfi
829795b296d0Smrgif test x$ADMIN_MAN_DIR = x    ; then
829895b296d0Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
829995b296d0Smrgfi
830095b296d0Smrg
830195b296d0Smrg
830295b296d0SmrgAC_SUBST([APP_MAN_SUFFIX])
830395b296d0SmrgAC_SUBST([LIB_MAN_SUFFIX])
830495b296d0SmrgAC_SUBST([FILE_MAN_SUFFIX])
830595b296d0SmrgAC_SUBST([MISC_MAN_SUFFIX])
830695b296d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
830795b296d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
830895b296d0SmrgAC_SUBST([APP_MAN_DIR])
830995b296d0SmrgAC_SUBST([LIB_MAN_DIR])
831095b296d0SmrgAC_SUBST([FILE_MAN_DIR])
831195b296d0SmrgAC_SUBST([MISC_MAN_DIR])
831295b296d0SmrgAC_SUBST([DRIVER_MAN_DIR])
831395b296d0SmrgAC_SUBST([ADMIN_MAN_DIR])
831495b296d0Smrg]) # XORG_MANPAGE_SECTIONS
831595b296d0Smrg
831695b296d0Smrg# XORG_CHECK_LINUXDOC
831795b296d0Smrg# -------------------
831895b296d0Smrg# Minimum version: 1.0.0
831995b296d0Smrg#
832095b296d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and
832195b296d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
832295b296d0Smrg# Whether or not the necessary tools and files are found can be checked
832395b296d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
832495b296d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
832539713583Smrgif test x$XORG_SGML_PATH = x ; then
832639713583Smrg    XORG_SGML_PATH=$prefix/share/sgml
832739713583Smrgfi
8328ff89ac2bSmrgHAVE_DEFS_ENT=
8329ff89ac2bSmrg
8330ff89ac2bSmrgif test x"$cross_compiling" = x"yes" ; then
8331ff89ac2bSmrg  HAVE_DEFS_ENT=no
8332ff89ac2bSmrgelse
8333ff89ac2bSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8334ff89ac2bSmrgfi
833595b296d0Smrg
833695b296d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
833795b296d0SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
833895b296d0Smrg
833995b296d0SmrgAC_MSG_CHECKING([Whether to build documentation])
834095b296d0Smrg
8341ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
834295b296d0Smrg   BUILDDOC=yes
834395b296d0Smrgelse
834495b296d0Smrg   BUILDDOC=no
834595b296d0Smrgfi
834695b296d0Smrg
834795b296d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
834895b296d0Smrg
834995b296d0SmrgAC_MSG_RESULT([$BUILDDOC])
835095b296d0Smrg
835195b296d0SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
835295b296d0Smrg
8353ff89ac2bSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
835495b296d0Smrg   BUILDPDFDOC=yes
835595b296d0Smrgelse
835695b296d0Smrg   BUILDPDFDOC=no
835795b296d0Smrgfi
835895b296d0Smrg
835995b296d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
836095b296d0Smrg
836195b296d0SmrgAC_MSG_RESULT([$BUILDPDFDOC])
836295b296d0Smrg
8363ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
8364ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
836595b296d0SmrgMAKE_PDF="$PS2PDF"
8366ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
836795b296d0Smrg
836895b296d0SmrgAC_SUBST(MAKE_TEXT)
836995b296d0SmrgAC_SUBST(MAKE_PS)
837095b296d0SmrgAC_SUBST(MAKE_PDF)
837195b296d0SmrgAC_SUBST(MAKE_HTML)
837295b296d0Smrg]) # XORG_CHECK_LINUXDOC
837395b296d0Smrg
8374ff89ac2bSmrg# XORG_CHECK_DOCBOOK
8375ff89ac2bSmrg# -------------------
8376ff89ac2bSmrg# Minimum version: 1.0.0
8377ff89ac2bSmrg#
8378ff89ac2bSmrg# Checks for the ability to build output formats from SGML DocBook source.
8379ff89ac2bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
8380ff89ac2bSmrg# indicates whether the necessary tools and files are found and, if set,
8381ff89ac2bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
8382ff89ac2bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
838339713583Smrgif test x$XORG_SGML_PATH = x ; then
838439713583Smrg    XORG_SGML_PATH=$prefix/share/sgml
838539713583Smrgfi
8386ff89ac2bSmrgHAVE_DEFS_ENT=
8387ff89ac2bSmrgBUILDTXTDOC=no
8388ff89ac2bSmrgBUILDPDFDOC=no
8389ff89ac2bSmrgBUILDPSDOC=no
8390ff89ac2bSmrgBUILDHTMLDOC=no
8391ff89ac2bSmrg
8392ff89ac2bSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8393ff89ac2bSmrg
8394ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
8395ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
8396ff89ac2bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
8397ff89ac2bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
8398ff89ac2bSmrg
8399ff89ac2bSmrgAC_MSG_CHECKING([Whether to build text documentation])
8400ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
8401ff89ac2bSmrg   test x$BUILD_TXTDOC != xno; then
8402ff89ac2bSmrg	BUILDTXTDOC=yes
8403ff89ac2bSmrgfi
8404ff89ac2bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
8405ff89ac2bSmrgAC_MSG_RESULT([$BUILDTXTDOC])
8406ff89ac2bSmrg
8407ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
8408ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
8409ff89ac2bSmrg   test x$BUILD_PDFDOC != xno; then
8410ff89ac2bSmrg	BUILDPDFDOC=yes
8411ff89ac2bSmrgfi
8412ff89ac2bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8413ff89ac2bSmrgAC_MSG_RESULT([$BUILDPDFDOC])
8414ff89ac2bSmrg
8415ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
8416ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
8417ff89ac2bSmrg   test x$BUILD_PSDOC != xno; then
8418ff89ac2bSmrg	BUILDPSDOC=yes
8419ff89ac2bSmrgfi
8420ff89ac2bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
8421ff89ac2bSmrgAC_MSG_RESULT([$BUILDPSDOC])
8422ff89ac2bSmrg
8423ff89ac2bSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
8424ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
8425ff89ac2bSmrg   test x$BUILD_HTMLDOC != xno; then
8426ff89ac2bSmrg	BUILDHTMLDOC=yes
8427ff89ac2bSmrgfi
8428ff89ac2bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
8429ff89ac2bSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
8430ff89ac2bSmrg
8431ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
8432ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
8433ff89ac2bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
8434ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
8435ff89ac2bSmrg
8436ff89ac2bSmrgAC_SUBST(MAKE_TEXT)
8437ff89ac2bSmrgAC_SUBST(MAKE_PS)
8438ff89ac2bSmrgAC_SUBST(MAKE_PDF)
8439ff89ac2bSmrgAC_SUBST(MAKE_HTML)
8440ff89ac2bSmrg]) # XORG_CHECK_DOCBOOK
8441ff89ac2bSmrg
844295b296d0Smrg# XORG_CHECK_MALLOC_ZERO
844395b296d0Smrg# ----------------------
844495b296d0Smrg# Minimum version: 1.0.0
844595b296d0Smrg#
844695b296d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
844795b296d0Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
844895b296d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
844995b296d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
845095b296d0SmrgAC_ARG_ENABLE(malloc0returnsnull,
845195b296d0Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
845295b296d0Smrg		       [malloc(0) returns NULL (default: auto)]),
845395b296d0Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
845495b296d0Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
845595b296d0Smrg
845695b296d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
845795b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
845895b296d0Smrg	AC_RUN_IFELSE([
845995b296d0Smrgchar *malloc();
846095b296d0Smrgchar *realloc();
846195b296d0Smrgchar *calloc();
846295b296d0Smrgmain() {
846395b296d0Smrg    char *m0, *r0, *c0, *p;
846495b296d0Smrg    m0 = malloc(0);
846595b296d0Smrg    p = malloc(10);
846695b296d0Smrg    r0 = realloc(p,0);
846795b296d0Smrg    c0 = calloc(0);
846895b296d0Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
846995b296d0Smrg}],
847095b296d0Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
847195b296d0Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
847295b296d0Smrgfi
847395b296d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
847495b296d0Smrg
847595b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
847695b296d0Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
847795b296d0Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
847895b296d0Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
847995b296d0Smrgelse
848095b296d0Smrg	MALLOC_ZERO_CFLAGS=""
848195b296d0Smrg	XMALLOC_ZERO_CFLAGS=""
848295b296d0Smrg	XTMALLOC_ZERO_CFLAGS=""
848395b296d0Smrgfi
848495b296d0Smrg
848595b296d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
848695b296d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
848795b296d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
848895b296d0Smrg]) # XORG_CHECK_MALLOC_ZERO
848995b296d0Smrg
849095b296d0Smrg# XORG_WITH_LINT()
849195b296d0Smrg# ----------------
849295b296d0Smrg# Minimum version: 1.1.0
849395b296d0Smrg#
849495b296d0Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
849595b296d0Smrg# is specified.   (Use --with-lint=sparse for sparse.)
849695b296d0Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
849795b296d0Smrg# Sets $LINT_FLAGS to flags to pass to source checker
849895b296d0Smrg# Sets LINT automake conditional if enabled (default: disabled)
849995b296d0Smrg#
850095b296d0SmrgAC_DEFUN([XORG_WITH_LINT],[
850195b296d0Smrg
850295b296d0Smrg# Allow checking code with lint, sparse, etc.
850395b296d0SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
850495b296d0Smrg		[Use a lint-style source code checker (default: disabled)])],
850595b296d0Smrg		[use_lint=$withval], [use_lint=no])
850695b296d0Smrgif test "x$use_lint" = "xyes" ; then
850795b296d0Smrg	LINT="lint"
850895b296d0Smrgelse
850995b296d0Smrg	LINT="$use_lint"
851095b296d0Smrgfi
851195b296d0Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
851295b296d0Smrg    case $LINT in
851395b296d0Smrg	lint|*/lint)
851495b296d0Smrg	    case $host_os in
851595b296d0Smrg		solaris*)
851695b296d0Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
851795b296d0Smrg			;;
851895b296d0Smrg	    esac
851995b296d0Smrg	    ;;
852095b296d0Smrg    esac
852195b296d0Smrgfi
852295b296d0Smrg
852395b296d0SmrgAC_SUBST(LINT)
852495b296d0SmrgAC_SUBST(LINT_FLAGS)
852595b296d0SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
852695b296d0Smrg
852795b296d0Smrg]) # XORG_WITH_LINT
852895b296d0Smrg
852995b296d0Smrg# XORG_LINT_LIBRARY(LIBNAME)
853095b296d0Smrg# --------------------------
853195b296d0Smrg# Minimum version: 1.1.0
853295b296d0Smrg#
853395b296d0Smrg# Sets up flags for building lint libraries for checking programs that call
853495b296d0Smrg# functions in the library.
853595b296d0Smrg# Disabled by default, enable with --enable-lint-library
853695b296d0Smrg# Sets: 
853795b296d0Smrg#	@LINTLIB@		- name of lint library file to make
853895b296d0Smrg#	MAKE_LINT_LIB		- automake conditional
853995b296d0Smrg#
854095b296d0Smrg
854195b296d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
854295b296d0SmrgAC_REQUIRE([XORG_WITH_LINT])
854395b296d0Smrg# Build lint "library" for more indepth checks of programs calling this library
854495b296d0SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
854595b296d0Smrg	[Create lint library (default: disabled)])],
854695b296d0Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
854795b296d0Smrgif test "x$make_lint_lib" != "xno" ; then
854895b296d0Smrg	if test "x$LINT" = "xno" ; then
854995b296d0Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
855095b296d0Smrg	fi
855195b296d0Smrg	if test "x$make_lint_lib" = "xyes" ; then
855295b296d0Smrg		LINTLIB=llib-l$1.ln
855395b296d0Smrg	else
855495b296d0Smrg		LINTLIB=$make_lint_lib
855595b296d0Smrg	fi
855695b296d0Smrgfi
855795b296d0SmrgAC_SUBST(LINTLIB)
855895b296d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
855995b296d0Smrg
856095b296d0Smrg]) # XORG_LINT_LIBRARY
856195b296d0Smrg
856239713583Smrg# XORG_CWARNFLAGS
856339713583Smrg# ---------------
856439713583Smrg# Minimum version: 1.2.0
856539713583Smrg#
856639713583Smrg# Defines CWARNFLAGS to enable C compiler warnings.
856739713583Smrg#
856839713583SmrgAC_DEFUN([XORG_CWARNFLAGS], [
856939713583SmrgAC_REQUIRE([AC_PROG_CC])
857039713583Smrgif  test "x$GCC" = xyes ; then
857139713583Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
857239713583Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
857339713583Smrg-Wbad-function-cast"
857439713583Smrg    case `gcc -dumpversion` in
857539713583Smrg    3.4.* | 4.*)
857639713583Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
857739713583Smrg	;;
857839713583Smrg    esac
857939713583Smrgelse
858039713583Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
858139713583Smrg    if test "x$SUNCC" = "xyes"; then
858239713583Smrg	CWARNFLAGS="-v"
858339713583Smrg    fi
858439713583Smrgfi
858539713583SmrgAC_SUBST(CWARNFLAGS)
858639713583Smrg]) # XORG_CWARNFLAGS
858795b296d0Smrgdnl Copyright 2005 Red Hat, Inc
858895b296d0Smrgdnl
858995b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
859095b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that
859195b296d0Smrgdnl the above copyright notice appear in all copies and that both that
859295b296d0Smrgdnl copyright notice and this permission notice appear in supporting
859395b296d0Smrgdnl documentation.
859495b296d0Smrgdnl
859595b296d0Smrgdnl The above copyright notice and this permission notice shall be included
859695b296d0Smrgdnl in all copies or substantial portions of the Software.
859795b296d0Smrgdnl
859895b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
859995b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
860095b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
860195b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
860295b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
860395b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
860495b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
860595b296d0Smrgdnl
860695b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall
860795b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or
860895b296d0Smrgdnl other dealings in this Software without prior written authorization
860995b296d0Smrgdnl from the copyright holders.
861095b296d0Smrgdnl
861195b296d0Smrg
861295b296d0Smrg# XORG_RELEASE_VERSION
861395b296d0Smrg# --------------------
861495b296d0Smrg# Adds --with/without-release-string and changes the PACKAGE and
861595b296d0Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
8616ff89ac2bSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
8617ff89ac2bSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
861895b296d0Smrg 
861995b296d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
862095b296d0Smrg	AC_ARG_WITH(release-version,
862195b296d0Smrg			AC_HELP_STRING([--with-release-version=STRING],
862295b296d0Smrg				[Use release version string in package name]),
862395b296d0Smrg			[RELEASE_VERSION="$withval"],
862495b296d0Smrg			[RELEASE_VERSION=""])
862595b296d0Smrg	if test "x$RELEASE_VERSION" != "x"; then
862695b296d0Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
862795b296d0Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
862895b296d0Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
862995b296d0Smrg	fi
8630ff89ac2bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
8631ff89ac2bSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
8632ff89ac2bSmrg		[Major version of this package])
8633ff89ac2bSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
8634ff89ac2bSmrg	if test "x$PVM" = "x"; then
8635ff89ac2bSmrg		PVM="0"
8636ff89ac2bSmrg	fi
8637ff89ac2bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
8638ff89ac2bSmrg		[$PVM],
8639ff89ac2bSmrg		[Minor version of this package])
8640ff89ac2bSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
8641ff89ac2bSmrg	if test "x$PVP" = "x"; then
8642ff89ac2bSmrg		PVP="0"
8643ff89ac2bSmrg	fi
8644ff89ac2bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
8645ff89ac2bSmrg		[$PVP],
8646ff89ac2bSmrg		[Patch version of this package])
864795b296d0Smrg])
864895b296d0Smrg
864939713583Smrg# XORG_CHANGELOG()
865039713583Smrg# ----------------
865139713583Smrg# Minimum version: 1.2.0
865239713583Smrg#
865339713583Smrg# Defines the variable CHANGELOG_CMD as the command to generate
865439713583Smrg# ChangeLog from git.
865539713583Smrg#
865639713583Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
865739713583Smrg#
865839713583SmrgAC_DEFUN([XORG_CHANGELOG], [
865939713583SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
866039713583Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
866139713583Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
866239713583SmrgAC_SUBST([CHANGELOG_CMD])
866339713583SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
866439713583Smrg]) # XORG_CHANGELOG
866539713583Smrg
866639713583Smrgdnl Copyright 2005 Red Hat, Inc
866739713583Smrgdnl 
866839713583Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
866939713583Smrgdnl documentation for any purpose is hereby granted without fee, provided that
867039713583Smrgdnl the above copyright notice appear in all copies and that both that
867139713583Smrgdnl copyright notice and this permission notice appear in supporting
867239713583Smrgdnl documentation.
867339713583Smrgdnl 
867439713583Smrgdnl The above copyright notice and this permission notice shall be included
867539713583Smrgdnl in all copies or substantial portions of the Software.
867639713583Smrgdnl 
867739713583Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
867839713583Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
867939713583Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
868039713583Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
868139713583Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
868239713583Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
868339713583Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
868439713583Smrgdnl 
868539713583Smrgdnl Except as contained in this notice, the name of the copyright holders shall
868639713583Smrgdnl not be used in advertising or otherwise to promote the sale, use or
868739713583Smrgdnl other dealings in this Software without prior written authorization
868839713583Smrgdnl from the copyright holders.
868939713583Smrgdnl 
869039713583Smrg
869139713583Smrg# XORG_DRIVER_CHECK_EXT()
869239713583Smrg# --------------------------
869339713583Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
869439713583Smrg# is defined, then add $1 to $REQUIRED_MODULES.
869539713583Smrg
869639713583SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
869739713583Smrg	SAVE_CFLAGS="$CFLAGS"
869839713583Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
869939713583Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
870039713583Smrg#include "xorg-server.h"
870139713583Smrg#if !defined $1
870239713583Smrg#error $1 not defined
870339713583Smrg#endif
870439713583Smrg		]])],
870539713583Smrg		[_EXT_CHECK=yes],
870639713583Smrg		[_EXT_CHECK=no])
870739713583Smrg	CFLAGS="$SAVE_CFLAGS"
870839713583Smrg	AC_MSG_CHECKING([if $1 is defined])
870939713583Smrg	AC_MSG_RESULT([$_EXT_CHECK])
871039713583Smrg	if test "$_EXT_CHECK" != no; then
871139713583Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
871239713583Smrg	fi
871339713583Smrg])
871439713583Smrg
871539713583Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
871695b296d0Smrg#
871795b296d0Smrg# This file is free software; the Free Software Foundation
871895b296d0Smrg# gives unlimited permission to copy and/or distribute it,
871995b296d0Smrg# with or without modifications, as long as this notice is preserved.
872095b296d0Smrg
872195b296d0Smrg# AM_AUTOMAKE_VERSION(VERSION)
872295b296d0Smrg# ----------------------------
872395b296d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
872495b296d0Smrg# generated from the m4 files accompanying Automake X.Y.
8725ff89ac2bSmrg# (This private macro should not be called outside this file.)
8726ff89ac2bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8727ff89ac2bSmrg[am__api_version='1.10'
8728ff89ac2bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8729ff89ac2bSmrgdnl require some minimum version.  Point them to the right macro.
873039713583Smrgm4_if([$1], [1.10.2], [],
8731ff89ac2bSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8732ff89ac2bSmrg])
8733ff89ac2bSmrg
8734ff89ac2bSmrg# _AM_AUTOCONF_VERSION(VERSION)
8735ff89ac2bSmrg# -----------------------------
8736ff89ac2bSmrg# aclocal traces this macro to find the Autoconf version.
8737ff89ac2bSmrg# This is a private macro too.  Using m4_define simplifies
8738ff89ac2bSmrg# the logic in aclocal, which can simply ignore this definition.
8739ff89ac2bSmrgm4_define([_AM_AUTOCONF_VERSION], [])
874095b296d0Smrg
874195b296d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
874295b296d0Smrg# -------------------------------
8743ff89ac2bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
874439713583Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
874595b296d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
874639713583Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
8747ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION],
8748ff89ac2bSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
874939713583Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
875095b296d0Smrg
875195b296d0Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
875295b296d0Smrg
875395b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
875495b296d0Smrg#
875595b296d0Smrg# This file is free software; the Free Software Foundation
875695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
875795b296d0Smrg# with or without modifications, as long as this notice is preserved.
875895b296d0Smrg
875995b296d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
876095b296d0Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
876195b296d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
876295b296d0Smrg#
876395b296d0Smrg# Of course, Automake must honor this variable whenever it calls a
876495b296d0Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
876595b296d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
876695b296d0Smrg# depending on how configure is run.  This is pretty annoying, since
876795b296d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
876895b296d0Smrg# source directory, any form will work fine, but in subdirectories a
876995b296d0Smrg# relative path needs to be adjusted first.
877095b296d0Smrg#
877195b296d0Smrg# $ac_aux_dir/missing
877295b296d0Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
877395b296d0Smrg# $top_srcdir/$ac_aux_dir/missing
877495b296d0Smrg#    fails if $ac_aux_dir is absolute,
877595b296d0Smrg#    fails when called from a subdirectory in a VPATH build with
877695b296d0Smrg#          a relative $ac_aux_dir
877795b296d0Smrg#
877895b296d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
877995b296d0Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
878095b296d0Smrg# harmless because $srcdir is `.', but things will broke when you
878195b296d0Smrg# start a VPATH build or use an absolute $srcdir.
878295b296d0Smrg#
878395b296d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
878495b296d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
878595b296d0Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
878695b296d0Smrg# and then we would define $MISSING as
878795b296d0Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
878895b296d0Smrg# This will work as long as MISSING is not called from configure, because
878995b296d0Smrg# unfortunately $(top_srcdir) has no meaning in configure.
879095b296d0Smrg# However there are other variables, like CC, which are often used in
879195b296d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
879295b296d0Smrg#
879395b296d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
879495b296d0Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
879595b296d0Smrg# configured tree to be moved without reconfiguration.
879695b296d0Smrg
879795b296d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
879895b296d0Smrg[dnl Rely on autoconf to set up CDPATH properly.
879995b296d0SmrgAC_PREREQ([2.50])dnl
880095b296d0Smrg# expand $ac_aux_dir to an absolute path
880195b296d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
880295b296d0Smrg])
880395b296d0Smrg
880495b296d0Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
880595b296d0Smrg
8806ff89ac2bSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
880795b296d0Smrg# Free Software Foundation, Inc.
880895b296d0Smrg#
880995b296d0Smrg# This file is free software; the Free Software Foundation
881095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
881195b296d0Smrg# with or without modifications, as long as this notice is preserved.
881295b296d0Smrg
8813ff89ac2bSmrg# serial 8
881495b296d0Smrg
881595b296d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
881695b296d0Smrg# -------------------------------------
881795b296d0Smrg# Define a conditional.
881895b296d0SmrgAC_DEFUN([AM_CONDITIONAL],
881995b296d0Smrg[AC_PREREQ(2.52)dnl
882095b296d0Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
882195b296d0Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8822ff89ac2bSmrgAC_SUBST([$1_TRUE])dnl
8823ff89ac2bSmrgAC_SUBST([$1_FALSE])dnl
8824ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8825ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
882695b296d0Smrgif $2; then
882795b296d0Smrg  $1_TRUE=
882895b296d0Smrg  $1_FALSE='#'
882995b296d0Smrgelse
883095b296d0Smrg  $1_TRUE='#'
883195b296d0Smrg  $1_FALSE=
883295b296d0Smrgfi
883395b296d0SmrgAC_CONFIG_COMMANDS_PRE(
883495b296d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
883595b296d0Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
883695b296d0SmrgUsually this means the macro was only invoked conditionally.]])
883795b296d0Smrgfi])])
883895b296d0Smrg
8839ff89ac2bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
884095b296d0Smrg# Free Software Foundation, Inc.
884195b296d0Smrg#
884295b296d0Smrg# This file is free software; the Free Software Foundation
884395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
884495b296d0Smrg# with or without modifications, as long as this notice is preserved.
884595b296d0Smrg
8846ff89ac2bSmrg# serial 9
884795b296d0Smrg
884895b296d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
884995b296d0Smrg# written in clear, in which case automake, when reading aclocal.m4,
885095b296d0Smrg# will think it sees a *use*, and therefore will trigger all it's
885195b296d0Smrg# C support machinery.  Also note that it means that autoscan, seeing
885295b296d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
885395b296d0Smrg
885495b296d0Smrg
885595b296d0Smrg# _AM_DEPENDENCIES(NAME)
885695b296d0Smrg# ----------------------
885795b296d0Smrg# See how the compiler implements dependency checking.
885895b296d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
885995b296d0Smrg# We try a few techniques and use that to set a single cache variable.
886095b296d0Smrg#
886195b296d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
886295b296d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
886395b296d0Smrg# dependency, and given that the user is not expected to run this macro,
886495b296d0Smrg# just rely on AC_PROG_CC.
886595b296d0SmrgAC_DEFUN([_AM_DEPENDENCIES],
886695b296d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
886795b296d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
886895b296d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
886995b296d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
887095b296d0Smrg
887195b296d0Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
887295b296d0Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
887395b296d0Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8874ff89ac2bSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
887595b296d0Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
887695b296d0Smrg                   [depcc="$$1"   am_compiler_list=])
887795b296d0Smrg
887895b296d0SmrgAC_CACHE_CHECK([dependency style of $depcc],
887995b296d0Smrg               [am_cv_$1_dependencies_compiler_type],
888095b296d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
888195b296d0Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
888295b296d0Smrg  # making bogus files that we don't know about and never remove.  For
888395b296d0Smrg  # instance it was reported that on HP-UX the gcc test will end up
888495b296d0Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
888595b296d0Smrg  # in D'.
888695b296d0Smrg  mkdir conftest.dir
888795b296d0Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
888895b296d0Smrg  # using a relative directory.
888995b296d0Smrg  cp "$am_depcomp" conftest.dir
889095b296d0Smrg  cd conftest.dir
889195b296d0Smrg  # We will build objects and dependencies in a subdirectory because
889295b296d0Smrg  # it helps to detect inapplicable dependency modes.  For instance
889395b296d0Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
889495b296d0Smrg  # side effect of compilation, but ICC will put the dependencies in
889595b296d0Smrg  # the current directory while Tru64 will put them in the object
889695b296d0Smrg  # directory.
889795b296d0Smrg  mkdir sub
889895b296d0Smrg
889995b296d0Smrg  am_cv_$1_dependencies_compiler_type=none
890095b296d0Smrg  if test "$am_compiler_list" = ""; then
890195b296d0Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
890295b296d0Smrg  fi
890395b296d0Smrg  for depmode in $am_compiler_list; do
890495b296d0Smrg    # Setup a source with many dependencies, because some compilers
890595b296d0Smrg    # like to wrap large dependency lists on column 80 (with \), and
890695b296d0Smrg    # we should not choose a depcomp mode which is confused by this.
890795b296d0Smrg    #
890895b296d0Smrg    # We need to recreate these files for each test, as the compiler may
890995b296d0Smrg    # overwrite some of them when testing with obscure command lines.
891095b296d0Smrg    # This happens at least with the AIX C compiler.
891195b296d0Smrg    : > sub/conftest.c
891295b296d0Smrg    for i in 1 2 3 4 5 6; do
891395b296d0Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
891495b296d0Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
891595b296d0Smrg      # Solaris 8's {/usr,}/bin/sh.
891695b296d0Smrg      touch sub/conftst$i.h
891795b296d0Smrg    done
891895b296d0Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
891995b296d0Smrg
892095b296d0Smrg    case $depmode in
892195b296d0Smrg    nosideeffect)
892295b296d0Smrg      # after this tag, mechanisms are not by side-effect, so they'll
892395b296d0Smrg      # only be used when explicitly requested
892495b296d0Smrg      if test "x$enable_dependency_tracking" = xyes; then
892595b296d0Smrg	continue
892695b296d0Smrg      else
892795b296d0Smrg	break
892895b296d0Smrg      fi
892995b296d0Smrg      ;;
893095b296d0Smrg    none) break ;;
893195b296d0Smrg    esac
893295b296d0Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
893395b296d0Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
893495b296d0Smrg    # handle `-M -o', and we need to detect this.
893595b296d0Smrg    if depmode=$depmode \
893695b296d0Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
893795b296d0Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
893895b296d0Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
893995b296d0Smrg         >/dev/null 2>conftest.err &&
8940ff89ac2bSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
894195b296d0Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
894295b296d0Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
894395b296d0Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
894495b296d0Smrg      # icc doesn't choke on unknown options, it will just issue warnings
894595b296d0Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
894695b296d0Smrg      # that says an option was ignored or not supported.
894795b296d0Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
894895b296d0Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
894995b296d0Smrg      # The diagnosis changed in icc 8.0:
895095b296d0Smrg      #   icc: Command line remark: option '-MP' not supported
895195b296d0Smrg      if (grep 'ignoring option' conftest.err ||
895295b296d0Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
895395b296d0Smrg        am_cv_$1_dependencies_compiler_type=$depmode
895495b296d0Smrg        break
895595b296d0Smrg      fi
895695b296d0Smrg    fi
895795b296d0Smrg  done
895895b296d0Smrg
895995b296d0Smrg  cd ..
896095b296d0Smrg  rm -rf conftest.dir
896195b296d0Smrgelse
896295b296d0Smrg  am_cv_$1_dependencies_compiler_type=none
896395b296d0Smrgfi
896495b296d0Smrg])
896595b296d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
896695b296d0SmrgAM_CONDITIONAL([am__fastdep$1], [
896795b296d0Smrg  test "x$enable_dependency_tracking" != xno \
896895b296d0Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
896995b296d0Smrg])
897095b296d0Smrg
897195b296d0Smrg
897295b296d0Smrg# AM_SET_DEPDIR
897395b296d0Smrg# -------------
897495b296d0Smrg# Choose a directory name for dependency files.
897595b296d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
897695b296d0SmrgAC_DEFUN([AM_SET_DEPDIR],
897795b296d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
897895b296d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
897995b296d0Smrg])
898095b296d0Smrg
898195b296d0Smrg
898295b296d0Smrg# AM_DEP_TRACK
898395b296d0Smrg# ------------
898495b296d0SmrgAC_DEFUN([AM_DEP_TRACK],
898595b296d0Smrg[AC_ARG_ENABLE(dependency-tracking,
898695b296d0Smrg[  --disable-dependency-tracking  speeds up one-time build
898795b296d0Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
898895b296d0Smrgif test "x$enable_dependency_tracking" != xno; then
898995b296d0Smrg  am_depcomp="$ac_aux_dir/depcomp"
899095b296d0Smrg  AMDEPBACKSLASH='\'
899195b296d0Smrgfi
899295b296d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8993ff89ac2bSmrgAC_SUBST([AMDEPBACKSLASH])dnl
8994ff89ac2bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
899595b296d0Smrg])
899695b296d0Smrg
899795b296d0Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
899895b296d0Smrg
899939713583Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
900095b296d0Smrg# Free Software Foundation, Inc.
900195b296d0Smrg#
900295b296d0Smrg# This file is free software; the Free Software Foundation
900395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
900495b296d0Smrg# with or without modifications, as long as this notice is preserved.
900595b296d0Smrg
900639713583Smrg#serial 4
900795b296d0Smrg
900895b296d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
900995b296d0Smrg# ------------------------------
901095b296d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
901139713583Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
901239713583Smrg# are listed without --file.  Let's play safe and only enable the eval
901339713583Smrg# if we detect the quoting.
901439713583Smrgcase $CONFIG_FILES in
901539713583Smrg*\'*) eval set x "$CONFIG_FILES" ;;
901639713583Smrg*)   set x $CONFIG_FILES ;;
901739713583Smrgesac
901839713583Smrgshift
901939713583Smrgfor mf
902039713583Smrgdo
902195b296d0Smrg  # Strip MF so we end up with the name of the file.
902295b296d0Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
902395b296d0Smrg  # Check whether this is an Automake generated Makefile or not.
902495b296d0Smrg  # We used to match only the files named `Makefile.in', but
902595b296d0Smrg  # some people rename them; so instead we look at the file content.
902695b296d0Smrg  # Grep'ing the first line is not enough: some people post-process
902795b296d0Smrg  # each Makefile.in and add a new line on top of each file to say so.
9028ff89ac2bSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
9029ff89ac2bSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
9030ff89ac2bSmrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
903195b296d0Smrg    dirpart=`AS_DIRNAME("$mf")`
903295b296d0Smrg  else
903395b296d0Smrg    continue
903495b296d0Smrg  fi
903595b296d0Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
903695b296d0Smrg  # from the Makefile without running `make'.
903795b296d0Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
903895b296d0Smrg  test -z "$DEPDIR" && continue
903995b296d0Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
904095b296d0Smrg  test -z "am__include" && continue
904195b296d0Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
904295b296d0Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
904395b296d0Smrg  U=`sed -n 's/^U = //p' < "$mf"`
904495b296d0Smrg  # Find all dependency output files, they are included files with
904595b296d0Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
904695b296d0Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
904795b296d0Smrg  # expansion.
904895b296d0Smrg  for file in `sed -n "
904995b296d0Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
905095b296d0Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
905195b296d0Smrg    # Make sure the directory exists.
905295b296d0Smrg    test -f "$dirpart/$file" && continue
905395b296d0Smrg    fdir=`AS_DIRNAME(["$file"])`
905495b296d0Smrg    AS_MKDIR_P([$dirpart/$fdir])
905595b296d0Smrg    # echo "creating $dirpart/$file"
905695b296d0Smrg    echo '# dummy' > "$dirpart/$file"
905795b296d0Smrg  done
905895b296d0Smrgdone
905995b296d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
906095b296d0Smrg
906195b296d0Smrg
906295b296d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
906395b296d0Smrg# -----------------------------
906495b296d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
906595b296d0Smrg#
906695b296d0Smrg# This code is only required when automatic dependency tracking
906795b296d0Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
906895b296d0Smrg# need in order to bootstrap the dependency handling code.
906995b296d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
907095b296d0Smrg[AC_CONFIG_COMMANDS([depfiles],
907195b296d0Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
907295b296d0Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
907395b296d0Smrg])
907495b296d0Smrg
907595b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
907695b296d0Smrg# Free Software Foundation, Inc.
907795b296d0Smrg#
907895b296d0Smrg# This file is free software; the Free Software Foundation
907995b296d0Smrg# gives unlimited permission to copy and/or distribute it,
908095b296d0Smrg# with or without modifications, as long as this notice is preserved.
908195b296d0Smrg
908295b296d0Smrg# serial 8
908395b296d0Smrg
908495b296d0Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
908595b296d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
908695b296d0Smrg
908795b296d0Smrg# Do all the work for Automake.                             -*- Autoconf -*-
908895b296d0Smrg
9089ff89ac2bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9090ff89ac2bSmrg# 2005, 2006, 2008 Free Software Foundation, Inc.
909195b296d0Smrg#
909295b296d0Smrg# This file is free software; the Free Software Foundation
909395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
909495b296d0Smrg# with or without modifications, as long as this notice is preserved.
909595b296d0Smrg
9096ff89ac2bSmrg# serial 13
909795b296d0Smrg
909895b296d0Smrg# This macro actually does too much.  Some checks are only needed if
909995b296d0Smrg# your package does certain things.  But this isn't really a big deal.
910095b296d0Smrg
910195b296d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
910295b296d0Smrg# AM_INIT_AUTOMAKE([OPTIONS])
910395b296d0Smrg# -----------------------------------------------
910495b296d0Smrg# The call with PACKAGE and VERSION arguments is the old style
910595b296d0Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
910695b296d0Smrg# and VERSION should now be passed to AC_INIT and removed from
910795b296d0Smrg# the call to AM_INIT_AUTOMAKE.
910895b296d0Smrg# We support both call styles for the transition.  After
910995b296d0Smrg# the next Automake release, Autoconf can make the AC_INIT
911095b296d0Smrg# arguments mandatory, and then we can depend on a new Autoconf
911195b296d0Smrg# release and drop the old call support.
911295b296d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
9113ff89ac2bSmrg[AC_PREREQ([2.60])dnl
911495b296d0Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
911595b296d0Smrgdnl the ones we care about.
911695b296d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
911795b296d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
911895b296d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
9119ff89ac2bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
9120ff89ac2bSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9121ff89ac2bSmrg  # is not polluted with repeated "-I."
9122ff89ac2bSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9123ff89ac2bSmrg  # test to see if srcdir already configured
9124ff89ac2bSmrg  if test -f $srcdir/config.status; then
9125ff89ac2bSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9126ff89ac2bSmrg  fi
912795b296d0Smrgfi
912895b296d0Smrg
912995b296d0Smrg# test whether we have cygpath
913095b296d0Smrgif test -z "$CYGPATH_W"; then
913195b296d0Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
913295b296d0Smrg    CYGPATH_W='cygpath -w'
913395b296d0Smrg  else
913495b296d0Smrg    CYGPATH_W=echo
913595b296d0Smrg  fi
913695b296d0Smrgfi
913795b296d0SmrgAC_SUBST([CYGPATH_W])
913895b296d0Smrg
913995b296d0Smrg# Define the identity of the package.
914095b296d0Smrgdnl Distinguish between old-style and new-style calls.
914195b296d0Smrgm4_ifval([$2],
914295b296d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
914395b296d0Smrg AC_SUBST([PACKAGE], [$1])dnl
914495b296d0Smrg AC_SUBST([VERSION], [$2])],
914595b296d0Smrg[_AM_SET_OPTIONS([$1])dnl
9146ff89ac2bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9147ff89ac2bSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9148ff89ac2bSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
914995b296d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
915095b296d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
915195b296d0Smrg
915295b296d0Smrg_AM_IF_OPTION([no-define],,
915395b296d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
915495b296d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
915595b296d0Smrg
915695b296d0Smrg# Some tools Automake needs.
915795b296d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
915895b296d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
915995b296d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
916095b296d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
916195b296d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
916295b296d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
916395b296d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
916495b296d0SmrgAM_PROG_INSTALL_SH
916595b296d0SmrgAM_PROG_INSTALL_STRIP
916695b296d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
916795b296d0Smrg# We need awk for the "check" target.  The system "awk" is bad on
916895b296d0Smrg# some platforms.
916995b296d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl
917095b296d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
917195b296d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
917295b296d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
917395b296d0Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
917495b296d0Smrg	      		     [_AM_PROG_TAR([v7])])])
917595b296d0Smrg_AM_IF_OPTION([no-dependencies],,
917695b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
917795b296d0Smrg                  [_AM_DEPENDENCIES(CC)],
917895b296d0Smrg                  [define([AC_PROG_CC],
917995b296d0Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
918095b296d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
918195b296d0Smrg                  [_AM_DEPENDENCIES(CXX)],
918295b296d0Smrg                  [define([AC_PROG_CXX],
918395b296d0Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9184ff89ac2bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
9185ff89ac2bSmrg                  [_AM_DEPENDENCIES(OBJC)],
9186ff89ac2bSmrg                  [define([AC_PROG_OBJC],
9187ff89ac2bSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
918895b296d0Smrg])
918995b296d0Smrg])
919095b296d0Smrg
919195b296d0Smrg
919295b296d0Smrg# When config.status generates a header, we must update the stamp-h file.
919395b296d0Smrg# This file resides in the same directory as the config header
919495b296d0Smrg# that is generated.  The stamp files are numbered to have different names.
919595b296d0Smrg
919695b296d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
919795b296d0Smrg# loop where config.status creates the headers, so we can generate
919895b296d0Smrg# our stamp files there.
919995b296d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
920095b296d0Smrg[# Compute $1's index in $config_headers.
9201ff89ac2bSmrg_am_arg=$1
920295b296d0Smrg_am_stamp_count=1
920395b296d0Smrgfor _am_header in $config_headers :; do
920495b296d0Smrg  case $_am_header in
9205ff89ac2bSmrg    $_am_arg | $_am_arg:* )
920695b296d0Smrg      break ;;
920795b296d0Smrg    * )
920895b296d0Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
920995b296d0Smrg  esac
921095b296d0Smrgdone
9211ff89ac2bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
921295b296d0Smrg
921395b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
921495b296d0Smrg#
921595b296d0Smrg# This file is free software; the Free Software Foundation
921695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
921795b296d0Smrg# with or without modifications, as long as this notice is preserved.
921895b296d0Smrg
921995b296d0Smrg# AM_PROG_INSTALL_SH
922095b296d0Smrg# ------------------
922195b296d0Smrg# Define $install_sh.
922295b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
922395b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9224ff89ac2bSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
922595b296d0SmrgAC_SUBST(install_sh)])
922695b296d0Smrg
922795b296d0Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
922895b296d0Smrg#
922995b296d0Smrg# This file is free software; the Free Software Foundation
923095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
923195b296d0Smrg# with or without modifications, as long as this notice is preserved.
923295b296d0Smrg
923395b296d0Smrg# serial 2
923495b296d0Smrg
923595b296d0Smrg# Check whether the underlying file-system supports filenames
923695b296d0Smrg# with a leading dot.  For instance MS-DOS doesn't.
923795b296d0SmrgAC_DEFUN([AM_SET_LEADING_DOT],
923895b296d0Smrg[rm -rf .tst 2>/dev/null
923995b296d0Smrgmkdir .tst 2>/dev/null
924095b296d0Smrgif test -d .tst; then
924195b296d0Smrg  am__leading_dot=.
924295b296d0Smrgelse
924395b296d0Smrg  am__leading_dot=_
924495b296d0Smrgfi
924595b296d0Smrgrmdir .tst 2>/dev/null
924695b296d0SmrgAC_SUBST([am__leading_dot])])
924795b296d0Smrg
924895b296d0Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
924995b296d0Smrg# From Jim Meyering
925095b296d0Smrg
925195b296d0Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
925295b296d0Smrg# Free Software Foundation, Inc.
925395b296d0Smrg#
925495b296d0Smrg# This file is free software; the Free Software Foundation
925595b296d0Smrg# gives unlimited permission to copy and/or distribute it,
925695b296d0Smrg# with or without modifications, as long as this notice is preserved.
925795b296d0Smrg
925895b296d0Smrg# serial 4
925995b296d0Smrg
926095b296d0SmrgAC_DEFUN([AM_MAINTAINER_MODE],
926195b296d0Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
926295b296d0Smrg  dnl maintainer-mode is disabled by default
926395b296d0Smrg  AC_ARG_ENABLE(maintainer-mode,
926495b296d0Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
926595b296d0Smrg			  (and sometimes confusing) to the casual installer],
926695b296d0Smrg      USE_MAINTAINER_MODE=$enableval,
926795b296d0Smrg      USE_MAINTAINER_MODE=no)
926895b296d0Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
926995b296d0Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
927095b296d0Smrg  MAINT=$MAINTAINER_MODE_TRUE
927195b296d0Smrg  AC_SUBST(MAINT)dnl
927295b296d0Smrg]
927395b296d0Smrg)
927495b296d0Smrg
927595b296d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
927695b296d0Smrg
927795b296d0Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
927895b296d0Smrg
927995b296d0Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
928095b296d0Smrg#
928195b296d0Smrg# This file is free software; the Free Software Foundation
928295b296d0Smrg# gives unlimited permission to copy and/or distribute it,
928395b296d0Smrg# with or without modifications, as long as this notice is preserved.
928495b296d0Smrg
928595b296d0Smrg# serial 3
928695b296d0Smrg
928795b296d0Smrg# AM_MAKE_INCLUDE()
928895b296d0Smrg# -----------------
928995b296d0Smrg# Check to see how make treats includes.
929095b296d0SmrgAC_DEFUN([AM_MAKE_INCLUDE],
929195b296d0Smrg[am_make=${MAKE-make}
929295b296d0Smrgcat > confinc << 'END'
929395b296d0Smrgam__doit:
929495b296d0Smrg	@echo done
929595b296d0Smrg.PHONY: am__doit
929695b296d0SmrgEND
929795b296d0Smrg# If we don't find an include directive, just comment out the code.
929895b296d0SmrgAC_MSG_CHECKING([for style of include used by $am_make])
929995b296d0Smrgam__include="#"
930095b296d0Smrgam__quote=
930195b296d0Smrg_am_result=none
930295b296d0Smrg# First try GNU make style include.
930395b296d0Smrgecho "include confinc" > confmf
930495b296d0Smrg# We grep out `Entering directory' and `Leaving directory'
930595b296d0Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
930695b296d0Smrg# In particular we don't look at `^make:' because GNU make might
930795b296d0Smrg# be invoked under some other name (usually "gmake"), in which
930895b296d0Smrg# case it prints its new name instead of `make'.
930995b296d0Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
931095b296d0Smrg   am__include=include
931195b296d0Smrg   am__quote=
931295b296d0Smrg   _am_result=GNU
931395b296d0Smrgfi
931495b296d0Smrg# Now try BSD make style include.
931595b296d0Smrgif test "$am__include" = "#"; then
931695b296d0Smrg   echo '.include "confinc"' > confmf
931795b296d0Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
931895b296d0Smrg      am__include=.include
931995b296d0Smrg      am__quote="\""
932095b296d0Smrg      _am_result=BSD
932195b296d0Smrg   fi
932295b296d0Smrgfi
932395b296d0SmrgAC_SUBST([am__include])
932495b296d0SmrgAC_SUBST([am__quote])
932595b296d0SmrgAC_MSG_RESULT([$_am_result])
932695b296d0Smrgrm -f confinc confmf
932795b296d0Smrg])
932895b296d0Smrg
932995b296d0Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
933095b296d0Smrg
9331ff89ac2bSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
933295b296d0Smrg# Free Software Foundation, Inc.
933395b296d0Smrg#
933495b296d0Smrg# This file is free software; the Free Software Foundation
933595b296d0Smrg# gives unlimited permission to copy and/or distribute it,
933695b296d0Smrg# with or without modifications, as long as this notice is preserved.
933795b296d0Smrg
9338ff89ac2bSmrg# serial 5
933995b296d0Smrg
934095b296d0Smrg# AM_MISSING_PROG(NAME, PROGRAM)
934195b296d0Smrg# ------------------------------
934295b296d0SmrgAC_DEFUN([AM_MISSING_PROG],
934395b296d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
934495b296d0Smrg$1=${$1-"${am_missing_run}$2"}
934595b296d0SmrgAC_SUBST($1)])
934695b296d0Smrg
934795b296d0Smrg
934895b296d0Smrg# AM_MISSING_HAS_RUN
934995b296d0Smrg# ------------------
935095b296d0Smrg# Define MISSING if not defined so far and test if it supports --run.
935195b296d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
935295b296d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
935395b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9354ff89ac2bSmrgAC_REQUIRE_AUX_FILE([missing])dnl
935595b296d0Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
935695b296d0Smrg# Use eval to expand $SHELL
935795b296d0Smrgif eval "$MISSING --run true"; then
935895b296d0Smrg  am_missing_run="$MISSING --run "
935995b296d0Smrgelse
936095b296d0Smrg  am_missing_run=
936195b296d0Smrg  AC_MSG_WARN([`missing' script is too old or missing])
936295b296d0Smrgfi
936395b296d0Smrg])
936495b296d0Smrg
9365ff89ac2bSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
936695b296d0Smrg#
936795b296d0Smrg# This file is free software; the Free Software Foundation
936895b296d0Smrg# gives unlimited permission to copy and/or distribute it,
936995b296d0Smrg# with or without modifications, as long as this notice is preserved.
937095b296d0Smrg
937195b296d0Smrg# AM_PROG_MKDIR_P
937295b296d0Smrg# ---------------
9373ff89ac2bSmrg# Check for `mkdir -p'.
937495b296d0SmrgAC_DEFUN([AM_PROG_MKDIR_P],
9375ff89ac2bSmrg[AC_PREREQ([2.60])dnl
9376ff89ac2bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
9377ff89ac2bSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9378ff89ac2bSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
9379ff89ac2bSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9380ff89ac2bSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9381ff89ac2bSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
9382ff89ac2bSmrgdnl adjustment using top_builddir (which is defined more often than
9383ff89ac2bSmrgdnl MKDIR_P).
9384ff89ac2bSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9385ff89ac2bSmrgcase $mkdir_p in
9386ff89ac2bSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
9387ff89ac2bSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9388ff89ac2bSmrgesac
9389ff89ac2bSmrg])
939095b296d0Smrg
939195b296d0Smrg# Helper functions for option handling.                     -*- Autoconf -*-
939295b296d0Smrg
939339713583Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
939495b296d0Smrg#
939595b296d0Smrg# This file is free software; the Free Software Foundation
939695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
939795b296d0Smrg# with or without modifications, as long as this notice is preserved.
939895b296d0Smrg
939939713583Smrg# serial 4
940095b296d0Smrg
940195b296d0Smrg# _AM_MANGLE_OPTION(NAME)
940295b296d0Smrg# -----------------------
940395b296d0SmrgAC_DEFUN([_AM_MANGLE_OPTION],
940495b296d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
940595b296d0Smrg
940695b296d0Smrg# _AM_SET_OPTION(NAME)
940795b296d0Smrg# ------------------------------
940895b296d0Smrg# Set option NAME.  Presently that only means defining a flag for this option.
940995b296d0SmrgAC_DEFUN([_AM_SET_OPTION],
941095b296d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
941195b296d0Smrg
941295b296d0Smrg# _AM_SET_OPTIONS(OPTIONS)
941395b296d0Smrg# ----------------------------------
941495b296d0Smrg# OPTIONS is a space-separated list of Automake options.
941595b296d0SmrgAC_DEFUN([_AM_SET_OPTIONS],
941639713583Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
941795b296d0Smrg
941895b296d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
941995b296d0Smrg# -------------------------------------------
942095b296d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
942195b296d0SmrgAC_DEFUN([_AM_IF_OPTION],
942295b296d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
942395b296d0Smrg
942495b296d0Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
942595b296d0Smrg
942695b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
942795b296d0Smrg# Free Software Foundation, Inc.
942895b296d0Smrg#
942995b296d0Smrg# This file is free software; the Free Software Foundation
943095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
943195b296d0Smrg# with or without modifications, as long as this notice is preserved.
943295b296d0Smrg
943395b296d0Smrg# serial 4
943495b296d0Smrg
943595b296d0Smrg# AM_SANITY_CHECK
943695b296d0Smrg# ---------------
943795b296d0SmrgAC_DEFUN([AM_SANITY_CHECK],
943895b296d0Smrg[AC_MSG_CHECKING([whether build environment is sane])
943995b296d0Smrg# Just in case
944095b296d0Smrgsleep 1
944195b296d0Smrgecho timestamp > conftest.file
944295b296d0Smrg# Do `set' in a subshell so we don't clobber the current shell's
944395b296d0Smrg# arguments.  Must try -L first in case configure is actually a
944495b296d0Smrg# symlink; some systems play weird games with the mod time of symlinks
944595b296d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing
944695b296d0Smrg# directory).
944795b296d0Smrgif (
944895b296d0Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
944995b296d0Smrg   if test "$[*]" = "X"; then
945095b296d0Smrg      # -L didn't work.
945195b296d0Smrg      set X `ls -t $srcdir/configure conftest.file`
945295b296d0Smrg   fi
945395b296d0Smrg   rm -f conftest.file
945495b296d0Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
945595b296d0Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
945695b296d0Smrg
945795b296d0Smrg      # If neither matched, then we have a broken ls.  This can happen
945895b296d0Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
945995b296d0Smrg      # broken ls alias from the environment.  This has actually
946095b296d0Smrg      # happened.  Such a system could not be considered "sane".
946195b296d0Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
946295b296d0Smrgalias in your environment])
946395b296d0Smrg   fi
946495b296d0Smrg
946595b296d0Smrg   test "$[2]" = conftest.file
946695b296d0Smrg   )
946795b296d0Smrgthen
946895b296d0Smrg   # Ok.
946995b296d0Smrg   :
947095b296d0Smrgelse
947195b296d0Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
947295b296d0SmrgCheck your system clock])
947395b296d0Smrgfi
947495b296d0SmrgAC_MSG_RESULT(yes)])
947595b296d0Smrg
947695b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
947795b296d0Smrg#
947895b296d0Smrg# This file is free software; the Free Software Foundation
947995b296d0Smrg# gives unlimited permission to copy and/or distribute it,
948095b296d0Smrg# with or without modifications, as long as this notice is preserved.
948195b296d0Smrg
948295b296d0Smrg# AM_PROG_INSTALL_STRIP
948395b296d0Smrg# ---------------------
948495b296d0Smrg# One issue with vendor `install' (even GNU) is that you can't
948595b296d0Smrg# specify the program used to strip binaries.  This is especially
948695b296d0Smrg# annoying in cross-compiling environments, where the build's strip
948795b296d0Smrg# is unlikely to handle the host's binaries.
948895b296d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
948995b296d0Smrg# always use install-sh in `make install-strip', and initialize
949095b296d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
949195b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
949295b296d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
949395b296d0Smrg# Installed binaries are usually stripped using `strip' when the user
949495b296d0Smrg# run `make install-strip'.  However `strip' might not be the right
949595b296d0Smrg# tool to use in cross-compilation environments, therefore Automake
949695b296d0Smrg# will honor the `STRIP' environment variable to overrule this program.
949795b296d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
949895b296d0Smrgif test "$cross_compiling" != no; then
949995b296d0Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
950095b296d0Smrgfi
9501ff89ac2bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
950295b296d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
950395b296d0Smrg
9504ff89ac2bSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
9505ff89ac2bSmrg#
9506ff89ac2bSmrg# This file is free software; the Free Software Foundation
9507ff89ac2bSmrg# gives unlimited permission to copy and/or distribute it,
9508ff89ac2bSmrg# with or without modifications, as long as this notice is preserved.
9509ff89ac2bSmrg
9510ff89ac2bSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
9511ff89ac2bSmrg# ---------------------------
9512ff89ac2bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9513ff89ac2bSmrg# This macro is traced by Automake.
9514ff89ac2bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9515ff89ac2bSmrg
951695b296d0Smrg# Check how to create a tarball.                            -*- Autoconf -*-
951795b296d0Smrg
951895b296d0Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
951995b296d0Smrg#
952095b296d0Smrg# This file is free software; the Free Software Foundation
952195b296d0Smrg# gives unlimited permission to copy and/or distribute it,
952295b296d0Smrg# with or without modifications, as long as this notice is preserved.
952395b296d0Smrg
952495b296d0Smrg# serial 2
952595b296d0Smrg
952695b296d0Smrg# _AM_PROG_TAR(FORMAT)
952795b296d0Smrg# --------------------
952895b296d0Smrg# Check how to create a tarball in format FORMAT.
952995b296d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
953095b296d0Smrg#
953195b296d0Smrg# Substitute a variable $(am__tar) that is a command
953295b296d0Smrg# writing to stdout a FORMAT-tarball containing the directory
953395b296d0Smrg# $tardir.
953495b296d0Smrg#     tardir=directory && $(am__tar) > result.tar
953595b296d0Smrg#
953695b296d0Smrg# Substitute a variable $(am__untar) that extract such
953795b296d0Smrg# a tarball read from stdin.
953895b296d0Smrg#     $(am__untar) < result.tar
953995b296d0SmrgAC_DEFUN([_AM_PROG_TAR],
954095b296d0Smrg[# Always define AMTAR for backward compatibility.
954195b296d0SmrgAM_MISSING_PROG([AMTAR], [tar])
954295b296d0Smrgm4_if([$1], [v7],
954395b296d0Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
954495b296d0Smrg     [m4_case([$1], [ustar],, [pax],,
954595b296d0Smrg              [m4_fatal([Unknown tar format])])
954695b296d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
954795b296d0Smrg# Loop over all known methods to create a tar archive until one works.
954895b296d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
954995b296d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
955095b296d0Smrg# Do not fold the above two line into one, because Tru64 sh and
955195b296d0Smrg# Solaris sh will not grok spaces in the rhs of `-'.
955295b296d0Smrgfor _am_tool in $_am_tools
955395b296d0Smrgdo
955495b296d0Smrg  case $_am_tool in
955595b296d0Smrg  gnutar)
955695b296d0Smrg    for _am_tar in tar gnutar gtar;
955795b296d0Smrg    do
955895b296d0Smrg      AM_RUN_LOG([$_am_tar --version]) && break
955995b296d0Smrg    done
956095b296d0Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
956195b296d0Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
956295b296d0Smrg    am__untar="$_am_tar -xf -"
956395b296d0Smrg    ;;
956495b296d0Smrg  plaintar)
956595b296d0Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
956695b296d0Smrg    # ustar tarball either.
956795b296d0Smrg    (tar --version) >/dev/null 2>&1 && continue
956895b296d0Smrg    am__tar='tar chf - "$$tardir"'
956995b296d0Smrg    am__tar_='tar chf - "$tardir"'
957095b296d0Smrg    am__untar='tar xf -'
957195b296d0Smrg    ;;
957295b296d0Smrg  pax)
957395b296d0Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
957495b296d0Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
957595b296d0Smrg    am__untar='pax -r'
957695b296d0Smrg    ;;
957795b296d0Smrg  cpio)
957895b296d0Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
957995b296d0Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
958095b296d0Smrg    am__untar='cpio -i -H $1 -d'
958195b296d0Smrg    ;;
958295b296d0Smrg  none)
958395b296d0Smrg    am__tar=false
958495b296d0Smrg    am__tar_=false
958595b296d0Smrg    am__untar=false
958695b296d0Smrg    ;;
958795b296d0Smrg  esac
958895b296d0Smrg
958995b296d0Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
959095b296d0Smrg  # and am__untar set.
959195b296d0Smrg  test -n "${am_cv_prog_tar_$1}" && break
959295b296d0Smrg
959395b296d0Smrg  # tar/untar a dummy directory, and stop if the command works
959495b296d0Smrg  rm -rf conftest.dir
959595b296d0Smrg  mkdir conftest.dir
959695b296d0Smrg  echo GrepMe > conftest.dir/file
959795b296d0Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
959895b296d0Smrg  rm -rf conftest.dir
959995b296d0Smrg  if test -s conftest.tar; then
960095b296d0Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
960195b296d0Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
960295b296d0Smrg  fi
960395b296d0Smrgdone
960495b296d0Smrgrm -rf conftest.dir
960595b296d0Smrg
960695b296d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
960795b296d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
960895b296d0SmrgAC_SUBST([am__tar])
960995b296d0SmrgAC_SUBST([am__untar])
961095b296d0Smrg]) # _AM_PROG_TAR
961195b296d0Smrg
9612