aclocal.m4 revision 86dafe34
186dafe34Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
276888252Smrg
376888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
486dafe34Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
576888252Smrg# This file is free software; the Free Software Foundation
676888252Smrg# gives unlimited permission to copy and/or distribute it,
776888252Smrg# with or without modifications, as long as this notice is preserved.
876888252Smrg
976888252Smrg# This program is distributed in the hope that it will be useful,
1076888252Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1176888252Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1276888252Smrg# PARTICULAR PURPOSE.
1376888252Smrg
1486dafe34Smrgm4_ifndef([AC_AUTOCONF_VERSION],
1586dafe34Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1686dafe34Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
1786dafe34Smrg[m4_warning([this file was generated for autoconf 2.63.
1886dafe34SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
1986dafe34SmrgIf you have problems, you may need to regenerate the build system entirely.
2086dafe34SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2176888252Smrg
2286dafe34Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
231ae1b5e8Smrg#
2486dafe34Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2586dafe34Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
2686dafe34Smrg#   Written by Gordon Matzigkeit, 1996
271ae1b5e8Smrg#
2886dafe34Smrg# This file is free software; the Free Software Foundation gives
2986dafe34Smrg# unlimited permission to copy and/or distribute it, with or without
3086dafe34Smrg# modifications, as long as this notice is preserved.
3186dafe34Smrg
3286dafe34Smrgm4_define([_LT_COPYING], [dnl
3386dafe34Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3486dafe34Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
3586dafe34Smrg#   Written by Gordon Matzigkeit, 1996
361ae1b5e8Smrg#
3786dafe34Smrg#   This file is part of GNU Libtool.
381ae1b5e8Smrg#
3986dafe34Smrg# GNU Libtool is free software; you can redistribute it and/or
4086dafe34Smrg# modify it under the terms of the GNU General Public License as
4186dafe34Smrg# published by the Free Software Foundation; either version 2 of
4286dafe34Smrg# the License, or (at your option) any later version.
431ae1b5e8Smrg#
4486dafe34Smrg# As a special exception to the GNU General Public License,
4586dafe34Smrg# if you distribute this file as part of a program or library that
4686dafe34Smrg# is built using GNU Libtool, you may include this file under the
4786dafe34Smrg# same distribution terms that you use for the rest of that program.
4886dafe34Smrg#
4986dafe34Smrg# GNU Libtool is distributed in the hope that it will be useful,
5086dafe34Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
5186dafe34Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5286dafe34Smrg# GNU General Public License for more details.
5386dafe34Smrg#
5486dafe34Smrg# You should have received a copy of the GNU General Public License
5586dafe34Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
5686dafe34Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
5786dafe34Smrg# obtained by writing to the Free Software Foundation, Inc.,
5886dafe34Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5986dafe34Smrg])
6076888252Smrg
6186dafe34Smrg# serial 56 LT_INIT
6276888252Smrg
6376888252Smrg
6486dafe34Smrg# LT_PREREQ(VERSION)
6586dafe34Smrg# ------------------
6686dafe34Smrg# Complain and exit if this libtool version is less that VERSION.
6786dafe34Smrgm4_defun([LT_PREREQ],
6886dafe34Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
6986dafe34Smrg       [m4_default([$3],
7086dafe34Smrg		   [m4_fatal([Libtool version $1 or higher is required],
7186dafe34Smrg		             63)])],
7286dafe34Smrg       [$2])])
7376888252Smrg
7476888252Smrg
7586dafe34Smrg# _LT_CHECK_BUILDDIR
7686dafe34Smrg# ------------------
7786dafe34Smrg# Complain if the absolute build directory name contains unusual characters
7886dafe34Smrgm4_defun([_LT_CHECK_BUILDDIR],
7986dafe34Smrg[case `pwd` in
8086dafe34Smrg  *\ * | *\	*)
8186dafe34Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
8286dafe34Smrgesac
8386dafe34Smrg])
8476888252Smrg
8576888252Smrg
8686dafe34Smrg# LT_INIT([OPTIONS])
8786dafe34Smrg# ------------------
8886dafe34SmrgAC_DEFUN([LT_INIT],
8986dafe34Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
9086dafe34SmrgAC_BEFORE([$0], [LT_LANG])dnl
9186dafe34SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
9286dafe34SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
9386dafe34Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
9486dafe34Smrg
9586dafe34Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
9686dafe34Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
9786dafe34Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
9886dafe34Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
9986dafe34Smrgdnl unless we require an AC_DEFUNed macro:
10086dafe34SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
10186dafe34SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
10286dafe34SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
10386dafe34SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
10486dafe34Smrgm4_require([_LT_PROG_LTMAIN])dnl
10586dafe34Smrg
10686dafe34Smrgdnl Parse OPTIONS
10786dafe34Smrg_LT_SET_OPTIONS([$0], [$1])
10876888252Smrg
10986dafe34Smrg# This can be used to rebuild libtool when needed
11086dafe34SmrgLIBTOOL_DEPS="$ltmain"
11176888252Smrg
11286dafe34Smrg# Always use our own libtool.
11386dafe34SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
11486dafe34SmrgAC_SUBST(LIBTOOL)dnl
11576888252Smrg
11686dafe34Smrg_LT_SETUP
11776888252Smrg
11886dafe34Smrg# Only expand once:
11986dafe34Smrgm4_define([LT_INIT])
12086dafe34Smrg])# LT_INIT
12176888252Smrg
12286dafe34Smrg# Old names:
12386dafe34SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12486dafe34SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12586dafe34Smrgdnl aclocal-1.4 backwards compatibility:
12686dafe34Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12786dafe34Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12876888252Smrg
12986dafe34Smrg
13086dafe34Smrg# _LT_CC_BASENAME(CC)
1311ae1b5e8Smrg# -------------------
13286dafe34Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
13386dafe34Smrgm4_defun([_LT_CC_BASENAME],
13486dafe34Smrg[for cc_temp in $1""; do
13586dafe34Smrg  case $cc_temp in
13686dafe34Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
13786dafe34Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
13886dafe34Smrg    \-*) ;;
13986dafe34Smrg    *) break;;
14086dafe34Smrg  esac
14186dafe34Smrgdone
14286dafe34Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14386dafe34Smrg])
14476888252Smrg
14586dafe34Smrg
14686dafe34Smrg# _LT_FILEUTILS_DEFAULTS
14786dafe34Smrg# ----------------------
14886dafe34Smrg# It is okay to use these file commands and assume they have been set
14986dafe34Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
15086dafe34Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
15186dafe34Smrg[: ${CP="cp -f"}
15286dafe34Smrg: ${MV="mv -f"}
15386dafe34Smrg: ${RM="rm -f"}
15486dafe34Smrg])# _LT_FILEUTILS_DEFAULTS
15586dafe34Smrg
15686dafe34Smrg
15786dafe34Smrg# _LT_SETUP
15886dafe34Smrg# ---------
15986dafe34Smrgm4_defun([_LT_SETUP],
16086dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16186dafe34SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
16286dafe34Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
16386dafe34Smrg_LT_DECL([], [host], [0])dnl
16486dafe34Smrg_LT_DECL([], [host_os], [0])dnl
16586dafe34Smrgdnl
16686dafe34Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
16786dafe34Smrg_LT_DECL([], [build], [0])dnl
16886dafe34Smrg_LT_DECL([], [build_os], [0])dnl
16986dafe34Smrgdnl
17086dafe34SmrgAC_REQUIRE([AC_PROG_CC])dnl
17186dafe34SmrgAC_REQUIRE([LT_PATH_LD])dnl
17286dafe34SmrgAC_REQUIRE([LT_PATH_NM])dnl
17386dafe34Smrgdnl
17486dafe34SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
17586dafe34Smrgtest -z "$LN_S" && LN_S="ln -s"
17686dafe34Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
17786dafe34Smrgdnl
17886dafe34SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
17986dafe34Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
18086dafe34Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
18186dafe34Smrgdnl
18286dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18386dafe34Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
18486dafe34Smrgm4_require([_LT_CMD_RELOAD])dnl
18586dafe34Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
18686dafe34Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
18786dafe34Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
18886dafe34Smrg
18986dafe34Smrg_LT_CONFIG_LIBTOOL_INIT([
19086dafe34Smrg# See if we are running on zsh, and set the options which allow our
19186dafe34Smrg# commands through without removal of \ escapes INIT.
19286dafe34Smrgif test -n "\${ZSH_VERSION+set}" ; then
19386dafe34Smrg   setopt NO_GLOB_SUBST
19486dafe34Smrgfi
19586dafe34Smrg])
19686dafe34Smrgif test -n "${ZSH_VERSION+set}" ; then
19786dafe34Smrg   setopt NO_GLOB_SUBST
1981ae1b5e8Smrgfi
19976888252Smrg
20086dafe34Smrg_LT_CHECK_OBJDIR
20176888252Smrg
20286dafe34Smrgm4_require([_LT_TAG_COMPILER])dnl
20386dafe34Smrg_LT_PROG_ECHO_BACKSLASH
20476888252Smrg
20586dafe34Smrgcase $host_os in
20686dafe34Smrgaix3*)
20786dafe34Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
20886dafe34Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
20986dafe34Smrg  # vanish in a puff of smoke.
21086dafe34Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
21186dafe34Smrg    COLLECT_NAMES=
21286dafe34Smrg    export COLLECT_NAMES
21386dafe34Smrg  fi
21486dafe34Smrg  ;;
21586dafe34Smrgesac
21676888252Smrg
21786dafe34Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
21886dafe34Smrg# metacharacters that are still active within double-quoted strings.
21986dafe34Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
22076888252Smrg
22186dafe34Smrg# Same as above, but do not quote variable references.
22286dafe34Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
22376888252Smrg
22486dafe34Smrg# Sed substitution to delay expansion of an escaped shell variable in a
22586dafe34Smrg# double_quote_subst'ed string.
22686dafe34Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
22776888252Smrg
22886dafe34Smrg# Sed substitution to delay expansion of an escaped single quote.
22986dafe34Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
23076888252Smrg
23186dafe34Smrg# Sed substitution to avoid accidental globbing in evaled expressions
23286dafe34Smrgno_glob_subst='s/\*/\\\*/g'
23376888252Smrg
23486dafe34Smrg# Global variables:
23586dafe34Smrgofile=libtool
23686dafe34Smrgcan_build_shared=yes
23776888252Smrg
23886dafe34Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
23986dafe34Smrg# which needs '.lib').
24086dafe34Smrglibext=a
24176888252Smrg
24286dafe34Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
24376888252Smrg
24486dafe34Smrgold_CC="$CC"
24586dafe34Smrgold_CFLAGS="$CFLAGS"
2461ae1b5e8Smrg
24786dafe34Smrg# Set sane defaults for various variables
24886dafe34Smrgtest -z "$CC" && CC=cc
24986dafe34Smrgtest -z "$LTCC" && LTCC=$CC
25086dafe34Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
25186dafe34Smrgtest -z "$LD" && LD=ld
25286dafe34Smrgtest -z "$ac_objext" && ac_objext=o
2531ae1b5e8Smrg
25486dafe34Smrg_LT_CC_BASENAME([$compiler])
2551ae1b5e8Smrg
25686dafe34Smrg# Only perform the check for file, if the check method requires it
25786dafe34Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
25886dafe34Smrgcase $deplibs_check_method in
25986dafe34Smrgfile_magic*)
26086dafe34Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
26186dafe34Smrg    _LT_PATH_MAGIC
26286dafe34Smrg  fi
26386dafe34Smrg  ;;
26486dafe34Smrgesac
26576888252Smrg
26686dafe34Smrg# Use C for the default configuration in the libtool script
26786dafe34SmrgLT_SUPPORTED_TAG([CC])
26886dafe34Smrg_LT_LANG_C_CONFIG
26986dafe34Smrg_LT_LANG_DEFAULT_CONFIG
27086dafe34Smrg_LT_CONFIG_COMMANDS
27186dafe34Smrg])# _LT_SETUP
27276888252Smrg
27376888252Smrg
27486dafe34Smrg# _LT_PROG_LTMAIN
27586dafe34Smrg# ---------------
27686dafe34Smrg# Note that this code is called both from `configure', and `config.status'
27786dafe34Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
27886dafe34Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
27986dafe34Smrg# so we pass a copy along to make sure it has a sensible value anyway.
28086dafe34Smrgm4_defun([_LT_PROG_LTMAIN],
28186dafe34Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
28286dafe34Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
28386dafe34Smrgltmain="$ac_aux_dir/ltmain.sh"
28486dafe34Smrg])# _LT_PROG_LTMAIN
28576888252Smrg
28676888252Smrg
28776888252Smrg
28886dafe34Smrg# So that we can recreate a full libtool script including additional
28986dafe34Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
29086dafe34Smrg# in macros and then make a single call at the end using the `libtool'
29186dafe34Smrg# label.
29276888252Smrg
29376888252Smrg
29486dafe34Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
29586dafe34Smrg# ----------------------------------------
29686dafe34Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
29786dafe34Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
29886dafe34Smrg[m4_ifval([$1],
29986dafe34Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
30086dafe34Smrg                     [$1
30186dafe34Smrg])])])
30276888252Smrg
30386dafe34Smrg# Initialize.
30486dafe34Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
30576888252Smrg
3061ae1b5e8Smrg
30786dafe34Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
30886dafe34Smrg# ------------------------------
30986dafe34Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
31086dafe34Smrgm4_define([_LT_CONFIG_LIBTOOL],
31186dafe34Smrg[m4_ifval([$1],
31286dafe34Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
31386dafe34Smrg                     [$1
31486dafe34Smrg])])])
31586dafe34Smrg
31686dafe34Smrg# Initialize.
31786dafe34Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
31886dafe34Smrg
31986dafe34Smrg
32086dafe34Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
32186dafe34Smrg# -----------------------------------------------------
32286dafe34Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
32386dafe34Smrg[_LT_CONFIG_LIBTOOL([$1])
32486dafe34Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
32586dafe34Smrg])
32676888252Smrg
32776888252Smrg
32886dafe34Smrg# _LT_FORMAT_COMMENT([COMMENT])
32986dafe34Smrg# -----------------------------
33086dafe34Smrg# Add leading comment marks to the start of each line, and a trailing
33186dafe34Smrg# full-stop to the whole comment if one is not present already.
33286dafe34Smrgm4_define([_LT_FORMAT_COMMENT],
33386dafe34Smrg[m4_ifval([$1], [
33486dafe34Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
33586dafe34Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
33686dafe34Smrg)])
33786dafe34Smrg
33886dafe34Smrg
33986dafe34Smrg
34086dafe34Smrg
34186dafe34Smrg
34286dafe34Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
34386dafe34Smrg# -------------------------------------------------------------------
34486dafe34Smrg# CONFIGNAME is the name given to the value in the libtool script.
34586dafe34Smrg# VARNAME is the (base) name used in the configure script.
34686dafe34Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
34786dafe34Smrg# VARNAME.  Any other value will be used directly.
34886dafe34Smrgm4_define([_LT_DECL],
34986dafe34Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
35086dafe34Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
35186dafe34Smrg	[m4_ifval([$1], [$1], [$2])])
35286dafe34Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
35386dafe34Smrg    m4_ifval([$4],
35486dafe34Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
35586dafe34Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
35686dafe34Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
35786dafe34Smrg])
35876888252Smrg
35976888252Smrg
36086dafe34Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
36186dafe34Smrg# --------------------------------------------------------
36286dafe34Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
36376888252Smrg
36476888252Smrg
36586dafe34Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
36686dafe34Smrg# ------------------------------------------------
36786dafe34Smrgm4_define([lt_decl_tag_varnames],
36886dafe34Smrg[_lt_decl_filter([tagged?], [yes], $@)])
36986dafe34Smrg
37086dafe34Smrg
37186dafe34Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
37286dafe34Smrg# ---------------------------------------------------------
37386dafe34Smrgm4_define([_lt_decl_filter],
37486dafe34Smrg[m4_case([$#],
37586dafe34Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
37686dafe34Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
37786dafe34Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
37886dafe34Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
37986dafe34Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
38086dafe34Smrg])
38186dafe34Smrg
38286dafe34Smrg
38386dafe34Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
38486dafe34Smrg# --------------------------------------------------
38586dafe34Smrgm4_define([lt_decl_quote_varnames],
38686dafe34Smrg[_lt_decl_filter([value], [1], $@)])
38786dafe34Smrg
38886dafe34Smrg
38986dafe34Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
39086dafe34Smrg# ---------------------------------------------------
39186dafe34Smrgm4_define([lt_decl_dquote_varnames],
39286dafe34Smrg[_lt_decl_filter([value], [2], $@)])
39386dafe34Smrg
39486dafe34Smrg
39586dafe34Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
39686dafe34Smrg# ---------------------------------------------------
39786dafe34Smrgm4_define([lt_decl_varnames_tagged],
39886dafe34Smrg[m4_assert([$# <= 2])dnl
39986dafe34Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
40086dafe34Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
40186dafe34Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
40286dafe34Smrgm4_define([_lt_decl_varnames_tagged],
40386dafe34Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
40486dafe34Smrg
40586dafe34Smrg
40686dafe34Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
40786dafe34Smrg# ------------------------------------------------
40886dafe34Smrgm4_define([lt_decl_all_varnames],
40986dafe34Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
41086dafe34Smrg     m4_if([$2], [],
41186dafe34Smrg	   m4_quote(lt_decl_varnames),
41286dafe34Smrg	m4_quote(m4_shift($@))))[]dnl
41386dafe34Smrg])
41486dafe34Smrgm4_define([_lt_decl_all_varnames],
41586dafe34Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
41686dafe34Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
41786dafe34Smrg])
41886dafe34Smrg
41986dafe34Smrg
42086dafe34Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
42186dafe34Smrg# ------------------------------------
42286dafe34Smrg# Quote a variable value, and forward it to `config.status' so that its
42386dafe34Smrg# declaration there will have the same value as in `configure'.  VARNAME
42486dafe34Smrg# must have a single quote delimited value for this to work.
42586dafe34Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
42686dafe34Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
42786dafe34Smrg
42886dafe34Smrg
42986dafe34Smrg# _LT_CONFIG_STATUS_DECLARATIONS
43086dafe34Smrg# ------------------------------
43186dafe34Smrg# We delimit libtool config variables with single quotes, so when
43286dafe34Smrg# we write them to config.status, we have to be sure to quote all
43386dafe34Smrg# embedded single quotes properly.  In configure, this macro expands
43486dafe34Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4351ae1b5e8Smrg#
43686dafe34Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
43786dafe34Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
43886dafe34Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
43986dafe34Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
44086dafe34Smrg
44186dafe34Smrg
44286dafe34Smrg# _LT_LIBTOOL_TAGS
44386dafe34Smrg# ----------------
44486dafe34Smrg# Output comment and list of tags supported by the script
44586dafe34Smrgm4_defun([_LT_LIBTOOL_TAGS],
44686dafe34Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
44786dafe34Smrgavailable_tags="_LT_TAGS"dnl
44886dafe34Smrg])
44986dafe34Smrg
45086dafe34Smrg
45186dafe34Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
45286dafe34Smrg# -----------------------------------
45386dafe34Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
45486dafe34Smrg# expand to a commented shell variable setting:
4551ae1b5e8Smrg#
45686dafe34Smrg#    # Some comment about what VAR is for.
45786dafe34Smrg#    visible_name=$lt_internal_name
45886dafe34Smrgm4_define([_LT_LIBTOOL_DECLARE],
45986dafe34Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
46086dafe34Smrg					   [description])))[]dnl
46186dafe34Smrgm4_pushdef([_libtool_name],
46286dafe34Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
46386dafe34Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
46486dafe34Smrg    [0], [_libtool_name=[$]$1],
46586dafe34Smrg    [1], [_libtool_name=$lt_[]$1],
46686dafe34Smrg    [2], [_libtool_name=$lt_[]$1],
46786dafe34Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
46886dafe34Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4691ae1b5e8Smrg])
47076888252Smrg
4711ae1b5e8Smrg
47286dafe34Smrg# _LT_LIBTOOL_CONFIG_VARS
47386dafe34Smrg# -----------------------
47486dafe34Smrg# Produce commented declarations of non-tagged libtool config variables
47586dafe34Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
47686dafe34Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
47786dafe34Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
47886dafe34Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
47986dafe34Smrg[m4_foreach([_lt_var],
48086dafe34Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
48186dafe34Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
48276888252Smrg
48376888252Smrg
48486dafe34Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
48586dafe34Smrg# -------------------------
48686dafe34Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
48786dafe34Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
48886dafe34Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
48976888252Smrg
49076888252Smrg
49186dafe34Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
49286dafe34Smrg# ------------------------------
49386dafe34Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
49476888252Smrg
49576888252Smrg
49686dafe34Smrg# _LT_CONFIG_COMMANDS
49786dafe34Smrg# -------------------
49886dafe34Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
49986dafe34Smrg# variables for single and double quote escaping we saved from calls
50086dafe34Smrg# to _LT_DECL, we can put quote escaped variables declarations
50186dafe34Smrg# into `config.status', and then the shell code to quote escape them in
50286dafe34Smrg# for loops in `config.status'.  Finally, any additional code accumulated
50386dafe34Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
50486dafe34Smrgm4_defun([_LT_CONFIG_COMMANDS],
50586dafe34Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
50686dafe34Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
50786dafe34Smrg	dnl instead of duplicating it all over again into config.status,
50886dafe34Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
50986dafe34Smrg	dnl needs to know what name is stored there:
51086dafe34Smrg        [AC_CONFIG_COMMANDS([libtool],
51186dafe34Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
51286dafe34Smrg    dnl If the libtool generation code is destined for config.status,
51386dafe34Smrg    dnl expand the accumulated commands and init code now:
51486dafe34Smrg    [AC_CONFIG_COMMANDS([libtool],
51586dafe34Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
51686dafe34Smrg])#_LT_CONFIG_COMMANDS
51786dafe34Smrg
51886dafe34Smrg
51986dafe34Smrg# Initialize.
52086dafe34Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
52186dafe34Smrg[
52276888252Smrg
52386dafe34Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
52486dafe34Smrg# if CDPATH is set.
52586dafe34Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52686dafe34Smrg
52786dafe34Smrgsed_quote_subst='$sed_quote_subst'
52886dafe34Smrgdouble_quote_subst='$double_quote_subst'
52986dafe34Smrgdelay_variable_subst='$delay_variable_subst'
53086dafe34Smrg_LT_CONFIG_STATUS_DECLARATIONS
53186dafe34SmrgLTCC='$LTCC'
53286dafe34SmrgLTCFLAGS='$LTCFLAGS'
53386dafe34Smrgcompiler='$compiler_DEFAULT'
53486dafe34Smrg
53586dafe34Smrg# Quote evaled strings.
53686dafe34Smrgfor var in lt_decl_all_varnames([[ \
53786dafe34Smrg]], lt_decl_quote_varnames); do
53886dafe34Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
53986dafe34Smrg    *[[\\\\\\\`\\"\\\$]]*)
54086dafe34Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
54186dafe34Smrg      ;;
54286dafe34Smrg    *)
54386dafe34Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
54486dafe34Smrg      ;;
54586dafe34Smrg    esac
54686dafe34Smrgdone
54786dafe34Smrg
54886dafe34Smrg# Double-quote double-evaled strings.
54986dafe34Smrgfor var in lt_decl_all_varnames([[ \
55086dafe34Smrg]], lt_decl_dquote_varnames); do
55186dafe34Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
55286dafe34Smrg    *[[\\\\\\\`\\"\\\$]]*)
55386dafe34Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
55486dafe34Smrg      ;;
55586dafe34Smrg    *)
55686dafe34Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
55786dafe34Smrg      ;;
55886dafe34Smrg    esac
55986dafe34Smrgdone
56086dafe34Smrg
56186dafe34Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
56286dafe34Smrgcase \$lt_ECHO in
56386dafe34Smrg*'\\\[$]0 --fallback-echo"')dnl "
56486dafe34Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
56586dafe34Smrg  ;;
56686dafe34Smrgesac
56786dafe34Smrg
56886dafe34Smrg_LT_OUTPUT_LIBTOOL_INIT
5691ae1b5e8Smrg])
57076888252Smrg
57176888252Smrg
57286dafe34Smrg# LT_OUTPUT
57386dafe34Smrg# ---------
57486dafe34Smrg# This macro allows early generation of the libtool script (before
57586dafe34Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
57686dafe34Smrg# tests.
57786dafe34SmrgAC_DEFUN([LT_OUTPUT],
57886dafe34Smrg[: ${CONFIG_LT=./config.lt}
57986dafe34SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
58086dafe34Smrgcat >"$CONFIG_LT" <<_LTEOF
58186dafe34Smrg#! $SHELL
58286dafe34Smrg# Generated by $as_me.
58386dafe34Smrg# Run this file to recreate a libtool stub with the current configuration.
58486dafe34Smrg
58586dafe34Smrglt_cl_silent=false
58686dafe34SmrgSHELL=\${CONFIG_SHELL-$SHELL}
58786dafe34Smrg_LTEOF
58886dafe34Smrg
58986dafe34Smrgcat >>"$CONFIG_LT" <<\_LTEOF
59086dafe34SmrgAS_SHELL_SANITIZE
59186dafe34Smrg_AS_PREPARE
59286dafe34Smrg
59386dafe34Smrgexec AS_MESSAGE_FD>&1
59486dafe34Smrgexec AS_MESSAGE_LOG_FD>>config.log
59586dafe34Smrg{
59686dafe34Smrg  echo
59786dafe34Smrg  AS_BOX([Running $as_me.])
59886dafe34Smrg} >&AS_MESSAGE_LOG_FD
59976888252Smrg
60086dafe34Smrglt_cl_help="\
60186dafe34Smrg\`$as_me' creates a local libtool stub from the current configuration,
60286dafe34Smrgfor use in further configure time tests before the real libtool is
60386dafe34Smrggenerated.
60476888252Smrg
60586dafe34SmrgUsage: $[0] [[OPTIONS]]
60686dafe34Smrg
60786dafe34Smrg  -h, --help      print this help, then exit
60886dafe34Smrg  -V, --version   print version number, then exit
60986dafe34Smrg  -q, --quiet     do not print progress messages
61086dafe34Smrg  -d, --debug     don't remove temporary files
61186dafe34Smrg
61286dafe34SmrgReport bugs to <bug-libtool@gnu.org>."
61386dafe34Smrg
61486dafe34Smrglt_cl_version="\
61586dafe34Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
61686dafe34Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
61786dafe34Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
61886dafe34Smrg
61986dafe34SmrgCopyright (C) 2008 Free Software Foundation, Inc.
62086dafe34SmrgThis config.lt script is free software; the Free Software Foundation
62186dafe34Smrggives unlimited permision to copy, distribute and modify it."
62286dafe34Smrg
62386dafe34Smrgwhile test $[#] != 0
62486dafe34Smrgdo
62586dafe34Smrg  case $[1] in
62686dafe34Smrg    --version | --v* | -V )
62786dafe34Smrg      echo "$lt_cl_version"; exit 0 ;;
62886dafe34Smrg    --help | --h* | -h )
62986dafe34Smrg      echo "$lt_cl_help"; exit 0 ;;
63086dafe34Smrg    --debug | --d* | -d )
63186dafe34Smrg      debug=: ;;
63286dafe34Smrg    --quiet | --q* | --silent | --s* | -q )
63386dafe34Smrg      lt_cl_silent=: ;;
63486dafe34Smrg
63586dafe34Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
63686dafe34SmrgTry \`$[0] --help' for more information.]) ;;
63786dafe34Smrg
63886dafe34Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
63986dafe34SmrgTry \`$[0] --help' for more information.]) ;;
64086dafe34Smrg  esac
64186dafe34Smrg  shift
64286dafe34Smrgdone
64386dafe34Smrg
64486dafe34Smrgif $lt_cl_silent; then
64586dafe34Smrg  exec AS_MESSAGE_FD>/dev/null
64676888252Smrgfi
64786dafe34Smrg_LTEOF
64886dafe34Smrg
64986dafe34Smrgcat >>"$CONFIG_LT" <<_LTEOF
65086dafe34Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
65186dafe34Smrg_LTEOF
65286dafe34Smrg
65386dafe34Smrgcat >>"$CONFIG_LT" <<\_LTEOF
65486dafe34SmrgAC_MSG_NOTICE([creating $ofile])
65586dafe34Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
65686dafe34SmrgAS_EXIT(0)
65786dafe34Smrg_LTEOF
65886dafe34Smrgchmod +x "$CONFIG_LT"
65986dafe34Smrg
66086dafe34Smrg# configure is writing to config.log, but config.lt does its own redirection,
66186dafe34Smrg# appending to config.log, which fails on DOS, as config.log is still kept
66286dafe34Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
66386dafe34Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
66486dafe34Smrgif test "$no_create" != yes; then
66586dafe34Smrg  lt_cl_success=:
66686dafe34Smrg  test "$silent" = yes &&
66786dafe34Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
66886dafe34Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
66986dafe34Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
67086dafe34Smrg  exec AS_MESSAGE_LOG_FD>>config.log
67186dafe34Smrg  $lt_cl_success || AS_EXIT(1)
67286dafe34Smrgfi
67386dafe34Smrg])# LT_OUTPUT
67476888252Smrg
67576888252Smrg
67686dafe34Smrg# _LT_CONFIG(TAG)
67786dafe34Smrg# ---------------
67886dafe34Smrg# If TAG is the built-in tag, create an initial libtool script with a
67986dafe34Smrg# default configuration from the untagged config vars.  Otherwise add code
68086dafe34Smrg# to config.status for appending the configuration named by TAG from the
68186dafe34Smrg# matching tagged config vars.
68286dafe34Smrgm4_defun([_LT_CONFIG],
68386dafe34Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
68486dafe34Smrg_LT_CONFIG_SAVE_COMMANDS([
68586dafe34Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
68686dafe34Smrg  m4_if(_LT_TAG, [C], [
68786dafe34Smrg    # See if we are running on zsh, and set the options which allow our
68886dafe34Smrg    # commands through without removal of \ escapes.
68986dafe34Smrg    if test -n "${ZSH_VERSION+set}" ; then
69086dafe34Smrg      setopt NO_GLOB_SUBST
69186dafe34Smrg    fi
69276888252Smrg
69386dafe34Smrg    cfgfile="${ofile}T"
69486dafe34Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
69586dafe34Smrg    $RM "$cfgfile"
69676888252Smrg
69786dafe34Smrg    cat <<_LT_EOF >> "$cfgfile"
69886dafe34Smrg#! $SHELL
69976888252Smrg
70086dafe34Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
70186dafe34Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
70286dafe34Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
70386dafe34Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7041ae1b5e8Smrg#
70586dafe34Smrg_LT_COPYING
70686dafe34Smrg_LT_LIBTOOL_TAGS
70776888252Smrg
70886dafe34Smrg# ### BEGIN LIBTOOL CONFIG
70986dafe34Smrg_LT_LIBTOOL_CONFIG_VARS
71086dafe34Smrg_LT_LIBTOOL_TAG_VARS
71186dafe34Smrg# ### END LIBTOOL CONFIG
7121ae1b5e8Smrg
71386dafe34Smrg_LT_EOF
71476888252Smrg
71586dafe34Smrg  case $host_os in
71686dafe34Smrg  aix3*)
71786dafe34Smrg    cat <<\_LT_EOF >> "$cfgfile"
71886dafe34Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
71986dafe34Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
72086dafe34Smrg# vanish in a puff of smoke.
72186dafe34Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
72286dafe34Smrg  COLLECT_NAMES=
72386dafe34Smrg  export COLLECT_NAMES
7241ae1b5e8Smrgfi
72586dafe34Smrg_LT_EOF
72686dafe34Smrg    ;;
72786dafe34Smrg  esac
72876888252Smrg
72986dafe34Smrg  _LT_PROG_LTMAIN
73076888252Smrg
73186dafe34Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
73286dafe34Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
73386dafe34Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
73486dafe34Smrg  # is reportedly fixed, but why not run on old versions too?
73586dafe34Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
73686dafe34Smrg    || (rm -f "$cfgfile"; exit 1)
73776888252Smrg
73886dafe34Smrg  _LT_PROG_XSI_SHELLFNS
73976888252Smrg
74086dafe34Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
74186dafe34Smrg    || (rm -f "$cfgfile"; exit 1)
74276888252Smrg
74386dafe34Smrg  mv -f "$cfgfile" "$ofile" ||
74486dafe34Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
74586dafe34Smrg  chmod +x "$ofile"
74686dafe34Smrg],
74786dafe34Smrg[cat <<_LT_EOF >> "$ofile"
74876888252Smrg
74986dafe34Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
75086dafe34Smrgdnl in a comment (ie after a #).
75186dafe34Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
75286dafe34Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
75386dafe34Smrg# ### END LIBTOOL TAG CONFIG: $1
75486dafe34Smrg_LT_EOF
75586dafe34Smrg])dnl /m4_if
75686dafe34Smrg],
75786dafe34Smrg[m4_if([$1], [], [
75886dafe34Smrg    PACKAGE='$PACKAGE'
75986dafe34Smrg    VERSION='$VERSION'
76086dafe34Smrg    TIMESTAMP='$TIMESTAMP'
76186dafe34Smrg    RM='$RM'
76286dafe34Smrg    ofile='$ofile'], [])
76386dafe34Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
76486dafe34Smrg])# _LT_CONFIG
76576888252Smrg
7661ae1b5e8Smrg
76786dafe34Smrg# LT_SUPPORTED_TAG(TAG)
76886dafe34Smrg# ---------------------
76986dafe34Smrg# Trace this macro to discover what tags are supported by the libtool
77086dafe34Smrg# --tag option, using:
77186dafe34Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
77286dafe34SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
7731ae1b5e8Smrg
7741ae1b5e8Smrg
77586dafe34Smrg# C support is built-in for now
77686dafe34Smrgm4_define([_LT_LANG_C_enabled], [])
77786dafe34Smrgm4_define([_LT_TAGS], [])
77876888252Smrg
77976888252Smrg
78086dafe34Smrg# LT_LANG(LANG)
78186dafe34Smrg# -------------
78286dafe34Smrg# Enable libtool support for the given language if not already enabled.
78386dafe34SmrgAC_DEFUN([LT_LANG],
78486dafe34Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
78586dafe34Smrgm4_case([$1],
78686dafe34Smrg  [C],			[_LT_LANG(C)],
78786dafe34Smrg  [C++],		[_LT_LANG(CXX)],
78886dafe34Smrg  [Java],		[_LT_LANG(GCJ)],
78986dafe34Smrg  [Fortran 77],		[_LT_LANG(F77)],
79086dafe34Smrg  [Fortran],		[_LT_LANG(FC)],
79186dafe34Smrg  [Windows Resource],	[_LT_LANG(RC)],
79286dafe34Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
79386dafe34Smrg    [_LT_LANG($1)],
79486dafe34Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
79586dafe34Smrg])# LT_LANG
79686dafe34Smrg
79786dafe34Smrg
79886dafe34Smrg# _LT_LANG(LANGNAME)
79986dafe34Smrg# ------------------
80086dafe34Smrgm4_defun([_LT_LANG],
80186dafe34Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
80286dafe34Smrg  [LT_SUPPORTED_TAG([$1])dnl
80386dafe34Smrg  m4_append([_LT_TAGS], [$1 ])dnl
80486dafe34Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
80586dafe34Smrg  _LT_LANG_$1_CONFIG($1)])dnl
80686dafe34Smrg])# _LT_LANG
80776888252Smrg
80876888252Smrg
80986dafe34Smrg# _LT_LANG_DEFAULT_CONFIG
81086dafe34Smrg# -----------------------
81186dafe34Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
81286dafe34Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
81386dafe34Smrg  [LT_LANG(CXX)],
81486dafe34Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
81586dafe34Smrg
81686dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
81786dafe34Smrg  [LT_LANG(F77)],
81886dafe34Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
81986dafe34Smrg
82086dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
82186dafe34Smrg  [LT_LANG(FC)],
82286dafe34Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
82386dafe34Smrg
82486dafe34Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
82586dafe34Smrgdnl pulling things in needlessly.
82686dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
82786dafe34Smrg  [LT_LANG(GCJ)],
82886dafe34Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
82986dafe34Smrg    [LT_LANG(GCJ)],
83086dafe34Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
83186dafe34Smrg      [LT_LANG(GCJ)],
83286dafe34Smrg      [m4_ifdef([AC_PROG_GCJ],
83386dafe34Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
83486dafe34Smrg       m4_ifdef([A][M_PROG_GCJ],
83586dafe34Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
83686dafe34Smrg       m4_ifdef([LT_PROG_GCJ],
83786dafe34Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
83886dafe34Smrg
83986dafe34SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
84086dafe34Smrg  [LT_LANG(RC)],
84186dafe34Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
84286dafe34Smrg])# _LT_LANG_DEFAULT_CONFIG
84386dafe34Smrg
84486dafe34Smrg# Obsolete macros:
84586dafe34SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
84686dafe34SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
84786dafe34SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
84886dafe34SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
84986dafe34Smrgdnl aclocal-1.4 backwards compatibility:
85086dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
85186dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
85286dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
85386dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
85486dafe34Smrg
85586dafe34Smrg
85686dafe34Smrg# _LT_TAG_COMPILER
85786dafe34Smrg# ----------------
85886dafe34Smrgm4_defun([_LT_TAG_COMPILER],
85986dafe34Smrg[AC_REQUIRE([AC_PROG_CC])dnl
86076888252Smrg
86186dafe34Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
86286dafe34Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
86386dafe34Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
86486dafe34Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
86576888252Smrg
86686dafe34Smrg# If no C compiler was specified, use CC.
86786dafe34SmrgLTCC=${LTCC-"$CC"}
86876888252Smrg
86986dafe34Smrg# If no C compiler flags were specified, use CFLAGS.
87086dafe34SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
87176888252Smrg
87286dafe34Smrg# Allow CC to be a program name with arguments.
87386dafe34Smrgcompiler=$CC
87486dafe34Smrg])# _LT_TAG_COMPILER
87576888252Smrg
87676888252Smrg
87786dafe34Smrg# _LT_COMPILER_BOILERPLATE
87886dafe34Smrg# ------------------------
87986dafe34Smrg# Check for compiler boilerplate output or warnings with
88086dafe34Smrg# the simple compiler test code.
88186dafe34Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
88286dafe34Smrg[m4_require([_LT_DECL_SED])dnl
88386dafe34Smrgac_outfile=conftest.$ac_objext
88486dafe34Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
88586dafe34Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
88686dafe34Smrg_lt_compiler_boilerplate=`cat conftest.err`
88786dafe34Smrg$RM conftest*
88886dafe34Smrg])# _LT_COMPILER_BOILERPLATE
88976888252Smrg
89076888252Smrg
89186dafe34Smrg# _LT_LINKER_BOILERPLATE
89286dafe34Smrg# ----------------------
89386dafe34Smrg# Check for linker boilerplate output or warnings with
89486dafe34Smrg# the simple link test code.
89586dafe34Smrgm4_defun([_LT_LINKER_BOILERPLATE],
89686dafe34Smrg[m4_require([_LT_DECL_SED])dnl
89786dafe34Smrgac_outfile=conftest.$ac_objext
89886dafe34Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
89986dafe34Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
90086dafe34Smrg_lt_linker_boilerplate=`cat conftest.err`
90186dafe34Smrg$RM -r conftest*
90286dafe34Smrg])# _LT_LINKER_BOILERPLATE
90376888252Smrg
90486dafe34Smrg# _LT_REQUIRED_DARWIN_CHECKS
90586dafe34Smrg# -------------------------
90686dafe34Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
90786dafe34Smrg  case $host_os in
90886dafe34Smrg    rhapsody* | darwin*)
90986dafe34Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
91086dafe34Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
91186dafe34Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
91286dafe34Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
91386dafe34Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
91486dafe34Smrg    _LT_DECL([], [DSYMUTIL], [1],
91586dafe34Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
91686dafe34Smrg    _LT_DECL([], [NMEDIT], [1],
91786dafe34Smrg      [Tool to change global to local symbols on Mac OS X])
91886dafe34Smrg    _LT_DECL([], [LIPO], [1],
91986dafe34Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
92086dafe34Smrg    _LT_DECL([], [OTOOL], [1],
92186dafe34Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
92286dafe34Smrg    _LT_DECL([], [OTOOL64], [1],
92386dafe34Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
92486dafe34Smrg
92586dafe34Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
92686dafe34Smrg      [lt_cv_apple_cc_single_mod=no
92786dafe34Smrg      if test -z "${LT_MULTI_MODULE}"; then
92886dafe34Smrg	# By default we will add the -single_module flag. You can override
92986dafe34Smrg	# by either setting the environment variable LT_MULTI_MODULE
93086dafe34Smrg	# non-empty at configure time, or by adding -multi_module to the
93186dafe34Smrg	# link flags.
93286dafe34Smrg	rm -rf libconftest.dylib*
93386dafe34Smrg	echo "int foo(void){return 1;}" > conftest.c
93486dafe34Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93586dafe34Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
93686dafe34Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93786dafe34Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
93886dafe34Smrg        _lt_result=$?
93986dafe34Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
94086dafe34Smrg	  lt_cv_apple_cc_single_mod=yes
94186dafe34Smrg	else
94286dafe34Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
94386dafe34Smrg	fi
94486dafe34Smrg	rm -rf libconftest.dylib*
94586dafe34Smrg	rm -f conftest.*
94686dafe34Smrg      fi])
94786dafe34Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
94886dafe34Smrg      [lt_cv_ld_exported_symbols_list],
94986dafe34Smrg      [lt_cv_ld_exported_symbols_list=no
95086dafe34Smrg      save_LDFLAGS=$LDFLAGS
95186dafe34Smrg      echo "_main" > conftest.sym
95286dafe34Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
95386dafe34Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
95486dafe34Smrg	[lt_cv_ld_exported_symbols_list=yes],
95586dafe34Smrg	[lt_cv_ld_exported_symbols_list=no])
95686dafe34Smrg	LDFLAGS="$save_LDFLAGS"
95786dafe34Smrg    ])
95886dafe34Smrg    case $host_os in
95986dafe34Smrg    rhapsody* | darwin1.[[012]])
96086dafe34Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
96186dafe34Smrg    darwin1.*)
96286dafe34Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
96386dafe34Smrg    darwin*) # darwin 5.x on
96486dafe34Smrg      # if running on 10.5 or later, the deployment target defaults
96586dafe34Smrg      # to the OS version, if on x86, and 10.4, the deployment
96686dafe34Smrg      # target defaults to 10.4. Don't you love it?
96786dafe34Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
96886dafe34Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
96986dafe34Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
97086dafe34Smrg	10.[[012]]*)
97186dafe34Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
97286dafe34Smrg	10.*)
97386dafe34Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
97486dafe34Smrg      esac
97586dafe34Smrg    ;;
97686dafe34Smrg  esac
97786dafe34Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
97886dafe34Smrg      _lt_dar_single_mod='$single_module'
97986dafe34Smrg    fi
98086dafe34Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
98186dafe34Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
98286dafe34Smrg    else
98386dafe34Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
98486dafe34Smrg    fi
98586dafe34Smrg    if test "$DSYMUTIL" != ":"; then
98686dafe34Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
98786dafe34Smrg    else
98886dafe34Smrg      _lt_dsymutil=
98986dafe34Smrg    fi
99086dafe34Smrg    ;;
99186dafe34Smrg  esac
99286dafe34Smrg])
99376888252Smrg
99476888252Smrg
99586dafe34Smrg# _LT_DARWIN_LINKER_FEATURES
99686dafe34Smrg# --------------------------
99786dafe34Smrg# Checks for linker and compiler features on darwin
99886dafe34Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
99986dafe34Smrg[
100086dafe34Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
100186dafe34Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
100286dafe34Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
100386dafe34Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
100486dafe34Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
100586dafe34Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
100686dafe34Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
100786dafe34Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
100886dafe34Smrg  case $cc_basename in
100986dafe34Smrg     ifort*) _lt_dar_can_shared=yes ;;
101086dafe34Smrg     *) _lt_dar_can_shared=$GCC ;;
10111ae1b5e8Smrg  esac
101286dafe34Smrg  if test "$_lt_dar_can_shared" = "yes"; then
101386dafe34Smrg    output_verbose_link_cmd=echo
101486dafe34Smrg    _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}"
101586dafe34Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
101686dafe34Smrg    _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}"
101786dafe34Smrg    _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}"
101886dafe34Smrg    m4_if([$1], [CXX],
101986dafe34Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
102086dafe34Smrg      _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}"
102186dafe34Smrg      _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}"
102286dafe34Smrg    fi
102386dafe34Smrg],[])
102486dafe34Smrg  else
102586dafe34Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
102686dafe34Smrg  fi
102786dafe34Smrg])
102876888252Smrg
102986dafe34Smrg# _LT_SYS_MODULE_PATH_AIX
103086dafe34Smrg# -----------------------
103186dafe34Smrg# Links a minimal program and checks the executable
103286dafe34Smrg# for the system default hardcoded library path. In most cases,
103386dafe34Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
103486dafe34Smrg# the location of the communication and MPI libs are included too.
103586dafe34Smrg# If we don't find anything, use the default library path according
103686dafe34Smrg# to the aix ld manual.
103786dafe34Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
103886dafe34Smrg[m4_require([_LT_DECL_SED])dnl
103986dafe34SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
104086dafe34Smrglt_aix_libpath_sed='
104186dafe34Smrg    /Import File Strings/,/^$/ {
104286dafe34Smrg	/^0/ {
104386dafe34Smrg	    s/^0  *\(.*\)$/\1/
104486dafe34Smrg	    p
104586dafe34Smrg	}
104686dafe34Smrg    }'
104786dafe34Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
104886dafe34Smrg# Check for a 64-bit object if we didn't find anything.
104986dafe34Smrgif test -z "$aix_libpath"; then
105086dafe34Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
105186dafe34Smrgfi],[])
105286dafe34Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
105386dafe34Smrg])# _LT_SYS_MODULE_PATH_AIX
105476888252Smrg
105576888252Smrg
105686dafe34Smrg# _LT_SHELL_INIT(ARG)
105786dafe34Smrg# -------------------
105886dafe34Smrgm4_define([_LT_SHELL_INIT],
105986dafe34Smrg[ifdef([AC_DIVERSION_NOTICE],
106086dafe34Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
106186dafe34Smrg	 [AC_DIVERT_PUSH(NOTICE)])
106286dafe34Smrg$1
106386dafe34SmrgAC_DIVERT_POP
106486dafe34Smrg])# _LT_SHELL_INIT
106576888252Smrg
106676888252Smrg
106786dafe34Smrg# _LT_PROG_ECHO_BACKSLASH
106886dafe34Smrg# -----------------------
106986dafe34Smrg# Add some code to the start of the generated configure script which
107086dafe34Smrg# will find an echo command which doesn't interpret backslashes.
107186dafe34Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
107286dafe34Smrg[_LT_SHELL_INIT([
107386dafe34Smrg# Check that we are running under the correct shell.
107486dafe34SmrgSHELL=${CONFIG_SHELL-/bin/sh}
107586dafe34Smrg
107686dafe34Smrgcase X$lt_ECHO in
107786dafe34SmrgX*--fallback-echo)
107886dafe34Smrg  # Remove one level of quotation (which was required for Make).
107986dafe34Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
108086dafe34Smrg  ;;
108186dafe34Smrgesac
108286dafe34Smrg
108386dafe34SmrgECHO=${lt_ECHO-echo}
108486dafe34Smrgif test "X[$]1" = X--no-reexec; then
108586dafe34Smrg  # Discard the --no-reexec flag, and continue.
108686dafe34Smrg  shift
108786dafe34Smrgelif test "X[$]1" = X--fallback-echo; then
108886dafe34Smrg  # Avoid inline document here, it may be left over
108986dafe34Smrg  :
109086dafe34Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
109186dafe34Smrg  # Yippee, $ECHO works!
109286dafe34Smrg  :
10931ae1b5e8Smrgelse
109486dafe34Smrg  # Restart under the correct shell.
109586dafe34Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
10961ae1b5e8Smrgfi
109776888252Smrg
109886dafe34Smrgif test "X[$]1" = X--fallback-echo; then
109986dafe34Smrg  # used as fallback echo
110086dafe34Smrg  shift
110186dafe34Smrg  cat <<_LT_EOF
110286dafe34Smrg[$]*
110386dafe34Smrg_LT_EOF
110486dafe34Smrg  exit 0
110586dafe34Smrgfi
110676888252Smrg
110786dafe34Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
110886dafe34Smrg# if CDPATH is set.
110986dafe34Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
111076888252Smrg
111186dafe34Smrgif test -z "$lt_ECHO"; then
111286dafe34Smrg  if test "X${echo_test_string+set}" != Xset; then
111386dafe34Smrg    # find a string as large as possible, as long as the shell can cope with it
111486dafe34Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
111586dafe34Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
111686dafe34Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
111786dafe34Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
111886dafe34Smrg      then
111986dafe34Smrg        break
112086dafe34Smrg      fi
112186dafe34Smrg    done
112286dafe34Smrg  fi
112376888252Smrg
112486dafe34Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
112586dafe34Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
112686dafe34Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
112786dafe34Smrg    :
112886dafe34Smrg  else
112986dafe34Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
113086dafe34Smrg    # backslashes.  This makes it impossible to quote backslashes using
113186dafe34Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
113286dafe34Smrg    #
113386dafe34Smrg    # So, first we look for a working echo in the user's PATH.
113476888252Smrg
113586dafe34Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
113686dafe34Smrg    for dir in $PATH /usr/ucb; do
113786dafe34Smrg      IFS="$lt_save_ifs"
113886dafe34Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
113986dafe34Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
114086dafe34Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
114186dafe34Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
114286dafe34Smrg        ECHO="$dir/echo"
114386dafe34Smrg        break
114486dafe34Smrg      fi
114586dafe34Smrg    done
114686dafe34Smrg    IFS="$lt_save_ifs"
114776888252Smrg
114886dafe34Smrg    if test "X$ECHO" = Xecho; then
114986dafe34Smrg      # We didn't find a better echo, so look for alternatives.
115086dafe34Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
115186dafe34Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
115286dafe34Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
115386dafe34Smrg        # This shell has a builtin print -r that does the trick.
115486dafe34Smrg        ECHO='print -r'
115586dafe34Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
115686dafe34Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
115786dafe34Smrg        # If we have ksh, try running configure again with it.
115886dafe34Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
115986dafe34Smrg        export ORIGINAL_CONFIG_SHELL
116086dafe34Smrg        CONFIG_SHELL=/bin/ksh
116186dafe34Smrg        export CONFIG_SHELL
116286dafe34Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
116386dafe34Smrg      else
116486dafe34Smrg        # Try using printf.
116586dafe34Smrg        ECHO='printf %s\n'
116686dafe34Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
116786dafe34Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
116886dafe34Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
116986dafe34Smrg	  # Cool, printf works
117086dafe34Smrg	  :
117186dafe34Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
117286dafe34Smrg	     test "X$echo_testing_string" = 'X\t' &&
117386dafe34Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
117486dafe34Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
117586dafe34Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
117686dafe34Smrg	  export CONFIG_SHELL
117786dafe34Smrg	  SHELL="$CONFIG_SHELL"
117886dafe34Smrg	  export SHELL
117986dafe34Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118086dafe34Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
118186dafe34Smrg	     test "X$echo_testing_string" = 'X\t' &&
118286dafe34Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
118386dafe34Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
118486dafe34Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118586dafe34Smrg        else
118686dafe34Smrg	  # maybe with a smaller string...
118786dafe34Smrg	  prev=:
118876888252Smrg
118986dafe34Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
119086dafe34Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
119186dafe34Smrg	    then
119286dafe34Smrg	      break
119386dafe34Smrg	    fi
119486dafe34Smrg	    prev="$cmd"
119586dafe34Smrg	  done
119676888252Smrg
119786dafe34Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
119886dafe34Smrg	    echo_test_string=`eval $prev`
119986dafe34Smrg	    export echo_test_string
120086dafe34Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
120186dafe34Smrg	  else
120286dafe34Smrg	    # Oops.  We lost completely, so just stick with echo.
120386dafe34Smrg	    ECHO=echo
120486dafe34Smrg	  fi
120586dafe34Smrg        fi
120686dafe34Smrg      fi
120786dafe34Smrg    fi
120886dafe34Smrg  fi
120986dafe34Smrgfi
121076888252Smrg
121186dafe34Smrg# Copy echo and quote the copy suitably for passing to libtool from
121286dafe34Smrg# the Makefile, instead of quoting the original, which is used later.
121386dafe34Smrglt_ECHO=$ECHO
121486dafe34Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
121586dafe34Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
12161ae1b5e8Smrgfi
121776888252Smrg
121886dafe34SmrgAC_SUBST(lt_ECHO)
121986dafe34Smrg])
122086dafe34Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
122186dafe34Smrg_LT_DECL([], [ECHO], [1],
122286dafe34Smrg    [An echo program that does not interpret backslashes])
122386dafe34Smrg])# _LT_PROG_ECHO_BACKSLASH
122476888252Smrg
122576888252Smrg
122686dafe34Smrg# _LT_ENABLE_LOCK
122786dafe34Smrg# ---------------
122886dafe34Smrgm4_defun([_LT_ENABLE_LOCK],
122986dafe34Smrg[AC_ARG_ENABLE([libtool-lock],
123086dafe34Smrg  [AS_HELP_STRING([--disable-libtool-lock],
123186dafe34Smrg    [avoid locking (might break parallel builds)])])
123286dafe34Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
123376888252Smrg
123486dafe34Smrg# Some flags need to be propagated to the compiler or linker for good
123586dafe34Smrg# libtool support.
123686dafe34Smrgcase $host in
123786dafe34Smrgia64-*-hpux*)
123886dafe34Smrg  # Find out which ABI we are using.
123986dafe34Smrg  echo 'int i;' > conftest.$ac_ext
124086dafe34Smrg  if AC_TRY_EVAL(ac_compile); then
124186dafe34Smrg    case `/usr/bin/file conftest.$ac_objext` in
124286dafe34Smrg      *ELF-32*)
124386dafe34Smrg	HPUX_IA64_MODE="32"
124486dafe34Smrg	;;
124586dafe34Smrg      *ELF-64*)
124686dafe34Smrg	HPUX_IA64_MODE="64"
124786dafe34Smrg	;;
124886dafe34Smrg    esac
124986dafe34Smrg  fi
125086dafe34Smrg  rm -rf conftest*
125186dafe34Smrg  ;;
125286dafe34Smrg*-*-irix6*)
125386dafe34Smrg  # Find out which ABI we are using.
125486dafe34Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
125586dafe34Smrg  if AC_TRY_EVAL(ac_compile); then
125686dafe34Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
125786dafe34Smrg      case `/usr/bin/file conftest.$ac_objext` in
125886dafe34Smrg	*32-bit*)
125986dafe34Smrg	  LD="${LD-ld} -melf32bsmip"
126086dafe34Smrg	  ;;
126186dafe34Smrg	*N32*)
126286dafe34Smrg	  LD="${LD-ld} -melf32bmipn32"
126386dafe34Smrg	  ;;
126486dafe34Smrg	*64-bit*)
126586dafe34Smrg	  LD="${LD-ld} -melf64bmip"
126686dafe34Smrg	;;
126786dafe34Smrg      esac
126886dafe34Smrg    else
126986dafe34Smrg      case `/usr/bin/file conftest.$ac_objext` in
127086dafe34Smrg	*32-bit*)
127186dafe34Smrg	  LD="${LD-ld} -32"
127286dafe34Smrg	  ;;
127386dafe34Smrg	*N32*)
127486dafe34Smrg	  LD="${LD-ld} -n32"
127586dafe34Smrg	  ;;
127686dafe34Smrg	*64-bit*)
127786dafe34Smrg	  LD="${LD-ld} -64"
127886dafe34Smrg	  ;;
127986dafe34Smrg      esac
128086dafe34Smrg    fi
128186dafe34Smrg  fi
128286dafe34Smrg  rm -rf conftest*
128386dafe34Smrg  ;;
128476888252Smrg
128586dafe34Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
128686dafe34Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
128786dafe34Smrg  # Find out which ABI we are using.
128886dafe34Smrg  echo 'int i;' > conftest.$ac_ext
128986dafe34Smrg  if AC_TRY_EVAL(ac_compile); then
129086dafe34Smrg    case `/usr/bin/file conftest.o` in
129186dafe34Smrg      *32-bit*)
129286dafe34Smrg	case $host in
129386dafe34Smrg	  x86_64-*kfreebsd*-gnu)
129486dafe34Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
129586dafe34Smrg	    ;;
129686dafe34Smrg	  x86_64-*linux*)
129786dafe34Smrg	    LD="${LD-ld} -m elf_i386"
129886dafe34Smrg	    ;;
129986dafe34Smrg	  ppc64-*linux*|powerpc64-*linux*)
130086dafe34Smrg	    LD="${LD-ld} -m elf32ppclinux"
130186dafe34Smrg	    ;;
130286dafe34Smrg	  s390x-*linux*)
130386dafe34Smrg	    LD="${LD-ld} -m elf_s390"
130486dafe34Smrg	    ;;
130586dafe34Smrg	  sparc64-*linux*)
130686dafe34Smrg	    LD="${LD-ld} -m elf32_sparc"
130786dafe34Smrg	    ;;
130886dafe34Smrg	esac
130986dafe34Smrg	;;
131086dafe34Smrg      *64-bit*)
131186dafe34Smrg	case $host in
131286dafe34Smrg	  x86_64-*kfreebsd*-gnu)
131386dafe34Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
131486dafe34Smrg	    ;;
131586dafe34Smrg	  x86_64-*linux*)
131686dafe34Smrg	    LD="${LD-ld} -m elf_x86_64"
131786dafe34Smrg	    ;;
131886dafe34Smrg	  ppc*-*linux*|powerpc*-*linux*)
131986dafe34Smrg	    LD="${LD-ld} -m elf64ppc"
132086dafe34Smrg	    ;;
132186dafe34Smrg	  s390*-*linux*|s390*-*tpf*)
132286dafe34Smrg	    LD="${LD-ld} -m elf64_s390"
132386dafe34Smrg	    ;;
132486dafe34Smrg	  sparc*-*linux*)
132586dafe34Smrg	    LD="${LD-ld} -m elf64_sparc"
132686dafe34Smrg	    ;;
132786dafe34Smrg	esac
132886dafe34Smrg	;;
132986dafe34Smrg    esac
133086dafe34Smrg  fi
133186dafe34Smrg  rm -rf conftest*
133286dafe34Smrg  ;;
133376888252Smrg
133486dafe34Smrg*-*-sco3.2v5*)
133586dafe34Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
133686dafe34Smrg  SAVE_CFLAGS="$CFLAGS"
133786dafe34Smrg  CFLAGS="$CFLAGS -belf"
133886dafe34Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
133986dafe34Smrg    [AC_LANG_PUSH(C)
134086dafe34Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
134186dafe34Smrg     AC_LANG_POP])
134286dafe34Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
134386dafe34Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
134486dafe34Smrg    CFLAGS="$SAVE_CFLAGS"
134586dafe34Smrg  fi
134686dafe34Smrg  ;;
134786dafe34Smrgsparc*-*solaris*)
134886dafe34Smrg  # Find out which ABI we are using.
134986dafe34Smrg  echo 'int i;' > conftest.$ac_ext
135086dafe34Smrg  if AC_TRY_EVAL(ac_compile); then
135186dafe34Smrg    case `/usr/bin/file conftest.o` in
135286dafe34Smrg    *64-bit*)
135386dafe34Smrg      case $lt_cv_prog_gnu_ld in
135486dafe34Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
135586dafe34Smrg      *)
135686dafe34Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
135786dafe34Smrg	  LD="${LD-ld} -64"
135886dafe34Smrg	fi
135986dafe34Smrg	;;
136086dafe34Smrg      esac
136186dafe34Smrg      ;;
136286dafe34Smrg    esac
136386dafe34Smrg  fi
136486dafe34Smrg  rm -rf conftest*
136586dafe34Smrg  ;;
136686dafe34Smrgesac
136776888252Smrg
136886dafe34Smrgneed_locks="$enable_libtool_lock"
136986dafe34Smrg])# _LT_ENABLE_LOCK
137076888252Smrg
137176888252Smrg
137286dafe34Smrg# _LT_CMD_OLD_ARCHIVE
137386dafe34Smrg# -------------------
137486dafe34Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
137586dafe34Smrg[AC_CHECK_TOOL(AR, ar, false)
137686dafe34Smrgtest -z "$AR" && AR=ar
137786dafe34Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
137886dafe34Smrg_LT_DECL([], [AR], [1], [The archiver])
137986dafe34Smrg_LT_DECL([], [AR_FLAGS], [1])
138076888252Smrg
138186dafe34SmrgAC_CHECK_TOOL(STRIP, strip, :)
138286dafe34Smrgtest -z "$STRIP" && STRIP=:
138386dafe34Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
138476888252Smrg
138586dafe34SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
138686dafe34Smrgtest -z "$RANLIB" && RANLIB=:
138786dafe34Smrg_LT_DECL([], [RANLIB], [1],
138886dafe34Smrg    [Commands used to install an old-style archive])
138976888252Smrg
139086dafe34Smrg# Determine commands to create old-style static archives.
139186dafe34Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
139286dafe34Smrgold_postinstall_cmds='chmod 644 $oldlib'
139386dafe34Smrgold_postuninstall_cmds=
139476888252Smrg
139586dafe34Smrgif test -n "$RANLIB"; then
139686dafe34Smrg  case $host_os in
139786dafe34Smrg  openbsd*)
139886dafe34Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
139986dafe34Smrg    ;;
140086dafe34Smrg  *)
140186dafe34Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
140286dafe34Smrg    ;;
140386dafe34Smrg  esac
140486dafe34Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
140586dafe34Smrgfi
140686dafe34Smrg_LT_DECL([], [old_postinstall_cmds], [2])
140786dafe34Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
140886dafe34Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
140986dafe34Smrg    [Commands used to build an old-style archive])
141086dafe34Smrg])# _LT_CMD_OLD_ARCHIVE
141176888252Smrg
141276888252Smrg
141386dafe34Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
141486dafe34Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
141586dafe34Smrg# ----------------------------------------------------------------
141686dafe34Smrg# Check whether the given compiler option works
141786dafe34SmrgAC_DEFUN([_LT_COMPILER_OPTION],
141886dafe34Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
141986dafe34Smrgm4_require([_LT_DECL_SED])dnl
142086dafe34SmrgAC_CACHE_CHECK([$1], [$2],
142186dafe34Smrg  [$2=no
142286dafe34Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
142386dafe34Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
142486dafe34Smrg   lt_compiler_flag="$3"
142586dafe34Smrg   # Insert the option either (1) after the last *FLAGS variable, or
142686dafe34Smrg   # (2) before a word containing "conftest.", or (3) at the end.
142786dafe34Smrg   # Note that $ac_compile itself does not contain backslashes and begins
142886dafe34Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
142986dafe34Smrg   # The option is referenced via a variable to avoid confusing sed.
143086dafe34Smrg   lt_compile=`echo "$ac_compile" | $SED \
143186dafe34Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
143286dafe34Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
143386dafe34Smrg   -e 's:$: $lt_compiler_flag:'`
143486dafe34Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
143586dafe34Smrg   (eval "$lt_compile" 2>conftest.err)
143686dafe34Smrg   ac_status=$?
143786dafe34Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
143886dafe34Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
143986dafe34Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
144086dafe34Smrg     # The compiler can only warn and ignore the option if not recognized
144186dafe34Smrg     # So say no if there are warnings other than the usual output.
144286dafe34Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
144386dafe34Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
144486dafe34Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
144586dafe34Smrg       $2=yes
144686dafe34Smrg     fi
144786dafe34Smrg   fi
144886dafe34Smrg   $RM conftest*
144986dafe34Smrg])
145076888252Smrg
145186dafe34Smrgif test x"[$]$2" = xyes; then
145286dafe34Smrg    m4_if([$5], , :, [$5])
145386dafe34Smrgelse
145486dafe34Smrg    m4_if([$6], , :, [$6])
145586dafe34Smrgfi
145686dafe34Smrg])# _LT_COMPILER_OPTION
145776888252Smrg
145886dafe34Smrg# Old name:
145986dafe34SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
146086dafe34Smrgdnl aclocal-1.4 backwards compatibility:
146186dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
146276888252Smrg
146376888252Smrg
146486dafe34Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
146586dafe34Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
146686dafe34Smrg# ----------------------------------------------------
146786dafe34Smrg# Check whether the given linker option works
146886dafe34SmrgAC_DEFUN([_LT_LINKER_OPTION],
146986dafe34Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
147086dafe34Smrgm4_require([_LT_DECL_SED])dnl
147186dafe34SmrgAC_CACHE_CHECK([$1], [$2],
147286dafe34Smrg  [$2=no
147386dafe34Smrg   save_LDFLAGS="$LDFLAGS"
147486dafe34Smrg   LDFLAGS="$LDFLAGS $3"
147586dafe34Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
147686dafe34Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
147786dafe34Smrg     # The linker can only warn and ignore the option if not recognized
147886dafe34Smrg     # So say no if there are warnings
147986dafe34Smrg     if test -s conftest.err; then
148086dafe34Smrg       # Append any errors to the config.log.
148186dafe34Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
148286dafe34Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
148386dafe34Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
148486dafe34Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
148586dafe34Smrg         $2=yes
148686dafe34Smrg       fi
148786dafe34Smrg     else
148886dafe34Smrg       $2=yes
148986dafe34Smrg     fi
14901ae1b5e8Smrg   fi
149186dafe34Smrg   $RM -r conftest*
149286dafe34Smrg   LDFLAGS="$save_LDFLAGS"
149386dafe34Smrg])
149476888252Smrg
149586dafe34Smrgif test x"[$]$2" = xyes; then
149686dafe34Smrg    m4_if([$4], , :, [$4])
149776888252Smrgelse
149886dafe34Smrg    m4_if([$5], , :, [$5])
149976888252Smrgfi
150086dafe34Smrg])# _LT_LINKER_OPTION
150176888252Smrg
150286dafe34Smrg# Old name:
150386dafe34SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
150486dafe34Smrgdnl aclocal-1.4 backwards compatibility:
150586dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
150676888252Smrg
150776888252Smrg
150886dafe34Smrg# LT_CMD_MAX_LEN
150986dafe34Smrg#---------------
151086dafe34SmrgAC_DEFUN([LT_CMD_MAX_LEN],
151186dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
151286dafe34Smrg# find the maximum length of command line arguments
151386dafe34SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
151486dafe34SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
151586dafe34Smrg  i=0
151686dafe34Smrg  teststring="ABCD"
151776888252Smrg
151886dafe34Smrg  case $build_os in
151986dafe34Smrg  msdosdjgpp*)
152086dafe34Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
152186dafe34Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
152286dafe34Smrg    # during glob expansion).  Even if it were fixed, the result of this
152386dafe34Smrg    # check would be larger than it should be.
152486dafe34Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
152586dafe34Smrg    ;;
152676888252Smrg
152786dafe34Smrg  gnu*)
152886dafe34Smrg    # Under GNU Hurd, this test is not required because there is
152986dafe34Smrg    # no limit to the length of command line arguments.
153086dafe34Smrg    # Libtool will interpret -1 as no limit whatsoever
153186dafe34Smrg    lt_cv_sys_max_cmd_len=-1;
153286dafe34Smrg    ;;
153376888252Smrg
153486dafe34Smrg  cygwin* | mingw* | cegcc*)
153586dafe34Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
153686dafe34Smrg    # about 5 minutes as the teststring grows exponentially.
153786dafe34Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
153886dafe34Smrg    # you end up with a "frozen" computer, even though with patience
153986dafe34Smrg    # the test eventually succeeds (with a max line length of 256k).
154086dafe34Smrg    # Instead, let's just punt: use the minimum linelength reported by
154186dafe34Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
154286dafe34Smrg    lt_cv_sys_max_cmd_len=8192;
154386dafe34Smrg    ;;
154476888252Smrg
154586dafe34Smrg  amigaos*)
154686dafe34Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
154786dafe34Smrg    # So we just punt and use a minimum line length of 8192.
154886dafe34Smrg    lt_cv_sys_max_cmd_len=8192;
154986dafe34Smrg    ;;
155076888252Smrg
155186dafe34Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
155286dafe34Smrg    # This has been around since 386BSD, at least.  Likely further.
155386dafe34Smrg    if test -x /sbin/sysctl; then
155486dafe34Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
155586dafe34Smrg    elif test -x /usr/sbin/sysctl; then
155686dafe34Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
155786dafe34Smrg    else
155886dafe34Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
155986dafe34Smrg    fi
156086dafe34Smrg    # And add a safety zone
156186dafe34Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
156286dafe34Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
156376888252Smrg    ;;
156486dafe34Smrg
156586dafe34Smrg  interix*)
156686dafe34Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
156786dafe34Smrg    lt_cv_sys_max_cmd_len=196608
15681ae1b5e8Smrg    ;;
156986dafe34Smrg
157086dafe34Smrg  osf*)
157186dafe34Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
157286dafe34Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
157386dafe34Smrg    # nice to cause kernel panics so lets avoid the loop below.
157486dafe34Smrg    # First set a reasonable default.
157586dafe34Smrg    lt_cv_sys_max_cmd_len=16384
157686dafe34Smrg    #
157786dafe34Smrg    if test -x /sbin/sysconfig; then
157886dafe34Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
157986dafe34Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
158086dafe34Smrg      esac
158186dafe34Smrg    fi
15821ae1b5e8Smrg    ;;
158386dafe34Smrg  sco3.2v5*)
158486dafe34Smrg    lt_cv_sys_max_cmd_len=102400
15851ae1b5e8Smrg    ;;
158686dafe34Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
158786dafe34Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
158886dafe34Smrg    if test -n "$kargmax"; then
158986dafe34Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
159086dafe34Smrg    else
159186dafe34Smrg      lt_cv_sys_max_cmd_len=32768
159286dafe34Smrg    fi
159386dafe34Smrg    ;;
159486dafe34Smrg  *)
159586dafe34Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
159686dafe34Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
159786dafe34Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
159886dafe34Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
159986dafe34Smrg    else
160086dafe34Smrg      # Make teststring a little bigger before we do anything with it.
160186dafe34Smrg      # a 1K string should be a reasonable start.
160286dafe34Smrg      for i in 1 2 3 4 5 6 7 8 ; do
160386dafe34Smrg        teststring=$teststring$teststring
160486dafe34Smrg      done
160586dafe34Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
160686dafe34Smrg      # If test is not a shell built-in, we'll probably end up computing a
160786dafe34Smrg      # maximum length that is only half of the actual maximum length, but
160886dafe34Smrg      # we can't tell.
160986dafe34Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
161086dafe34Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
161186dafe34Smrg	      test $i != 17 # 1/2 MB should be enough
161286dafe34Smrg      do
161386dafe34Smrg        i=`expr $i + 1`
161486dafe34Smrg        teststring=$teststring$teststring
161586dafe34Smrg      done
161686dafe34Smrg      # Only check the string length outside the loop.
161786dafe34Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
161886dafe34Smrg      teststring=
161986dafe34Smrg      # Add a significant safety factor because C++ compilers can tack on
162086dafe34Smrg      # massive amounts of additional arguments before passing them to the
162186dafe34Smrg      # linker.  It appears as though 1/2 is a usable value.
162286dafe34Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
162386dafe34Smrg    fi
162476888252Smrg    ;;
162576888252Smrg  esac
162686dafe34Smrg])
162786dafe34Smrgif test -n $lt_cv_sys_max_cmd_len ; then
162886dafe34Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
162986dafe34Smrgelse
163086dafe34Smrg  AC_MSG_RESULT(none)
163186dafe34Smrgfi
163286dafe34Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
163386dafe34Smrg_LT_DECL([], [max_cmd_len], [0],
163486dafe34Smrg    [What is the maximum length of a command?])
163586dafe34Smrg])# LT_CMD_MAX_LEN
163676888252Smrg
163786dafe34Smrg# Old name:
163886dafe34SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
163986dafe34Smrgdnl aclocal-1.4 backwards compatibility:
164086dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
16411ae1b5e8Smrg
164276888252Smrg
164386dafe34Smrg# _LT_HEADER_DLFCN
164486dafe34Smrg# ----------------
164586dafe34Smrgm4_defun([_LT_HEADER_DLFCN],
164686dafe34Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
164786dafe34Smrg])# _LT_HEADER_DLFCN
164876888252Smrg
164976888252Smrg
165086dafe34Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
165186dafe34Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
165286dafe34Smrg# ----------------------------------------------------------------
165386dafe34Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
165486dafe34Smrg[m4_require([_LT_HEADER_DLFCN])dnl
165586dafe34Smrgif test "$cross_compiling" = yes; then :
165686dafe34Smrg  [$4]
16571ae1b5e8Smrgelse
165886dafe34Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
165986dafe34Smrg  lt_status=$lt_dlunknown
166086dafe34Smrg  cat > conftest.$ac_ext <<_LT_EOF
166186dafe34Smrg[#line __oline__ "configure"
166286dafe34Smrg#include "confdefs.h"
166376888252Smrg
166486dafe34Smrg#if HAVE_DLFCN_H
166586dafe34Smrg#include <dlfcn.h>
166686dafe34Smrg#endif
166776888252Smrg
166886dafe34Smrg#include <stdio.h>
166976888252Smrg
167086dafe34Smrg#ifdef RTLD_GLOBAL
167186dafe34Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
167286dafe34Smrg#else
167386dafe34Smrg#  ifdef DL_GLOBAL
167486dafe34Smrg#    define LT_DLGLOBAL		DL_GLOBAL
167586dafe34Smrg#  else
167686dafe34Smrg#    define LT_DLGLOBAL		0
167786dafe34Smrg#  endif
167886dafe34Smrg#endif
167976888252Smrg
168086dafe34Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
168186dafe34Smrg   find out it does not work in some platform. */
168286dafe34Smrg#ifndef LT_DLLAZY_OR_NOW
168386dafe34Smrg#  ifdef RTLD_LAZY
168486dafe34Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
168586dafe34Smrg#  else
168686dafe34Smrg#    ifdef DL_LAZY
168786dafe34Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
168886dafe34Smrg#    else
168986dafe34Smrg#      ifdef RTLD_NOW
169086dafe34Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
169186dafe34Smrg#      else
169286dafe34Smrg#        ifdef DL_NOW
169386dafe34Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
169486dafe34Smrg#        else
169586dafe34Smrg#          define LT_DLLAZY_OR_NOW	0
169686dafe34Smrg#        endif
169786dafe34Smrg#      endif
169886dafe34Smrg#    endif
169986dafe34Smrg#  endif
170086dafe34Smrg#endif
170176888252Smrg
170286dafe34Smrgvoid fnord() { int i=42;}
170386dafe34Smrgint main ()
170486dafe34Smrg{
170586dafe34Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
170686dafe34Smrg  int status = $lt_dlunknown;
170776888252Smrg
170886dafe34Smrg  if (self)
170986dafe34Smrg    {
171086dafe34Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
171186dafe34Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
171286dafe34Smrg      /* dlclose (self); */
171386dafe34Smrg    }
171486dafe34Smrg  else
171586dafe34Smrg    puts (dlerror ());
171676888252Smrg
171786dafe34Smrg  return status;
171886dafe34Smrg}]
171986dafe34Smrg_LT_EOF
172086dafe34Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
172186dafe34Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
172286dafe34Smrg    lt_status=$?
172386dafe34Smrg    case x$lt_status in
172486dafe34Smrg      x$lt_dlno_uscore) $1 ;;
172586dafe34Smrg      x$lt_dlneed_uscore) $2 ;;
172686dafe34Smrg      x$lt_dlunknown|x*) $3 ;;
17271ae1b5e8Smrg    esac
172886dafe34Smrg  else :
172986dafe34Smrg    # compilation failed
173086dafe34Smrg    $3
173186dafe34Smrg  fi
17321ae1b5e8Smrgfi
173386dafe34Smrgrm -fr conftest*
173486dafe34Smrg])# _LT_TRY_DLOPEN_SELF
173576888252Smrg
173676888252Smrg
173786dafe34Smrg# LT_SYS_DLOPEN_SELF
173886dafe34Smrg# ------------------
173986dafe34SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
174086dafe34Smrg[m4_require([_LT_HEADER_DLFCN])dnl
174186dafe34Smrgif test "x$enable_dlopen" != xyes; then
174286dafe34Smrg  enable_dlopen=unknown
174386dafe34Smrg  enable_dlopen_self=unknown
174486dafe34Smrg  enable_dlopen_self_static=unknown
174586dafe34Smrgelse
174686dafe34Smrg  lt_cv_dlopen=no
174786dafe34Smrg  lt_cv_dlopen_libs=
174876888252Smrg
174986dafe34Smrg  case $host_os in
175086dafe34Smrg  beos*)
175186dafe34Smrg    lt_cv_dlopen="load_add_on"
175286dafe34Smrg    lt_cv_dlopen_libs=
175386dafe34Smrg    lt_cv_dlopen_self=yes
175486dafe34Smrg    ;;
175576888252Smrg
175686dafe34Smrg  mingw* | pw32* | cegcc*)
175786dafe34Smrg    lt_cv_dlopen="LoadLibrary"
175886dafe34Smrg    lt_cv_dlopen_libs=
175986dafe34Smrg    ;;
176076888252Smrg
176186dafe34Smrg  cygwin*)
176286dafe34Smrg    lt_cv_dlopen="dlopen"
176386dafe34Smrg    lt_cv_dlopen_libs=
176486dafe34Smrg    ;;
176576888252Smrg
176686dafe34Smrg  darwin*)
176786dafe34Smrg  # if libdl is installed we need to link against it
176886dafe34Smrg    AC_CHECK_LIB([dl], [dlopen],
176986dafe34Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
177086dafe34Smrg    lt_cv_dlopen="dyld"
177186dafe34Smrg    lt_cv_dlopen_libs=
177286dafe34Smrg    lt_cv_dlopen_self=yes
177386dafe34Smrg    ])
177486dafe34Smrg    ;;
177576888252Smrg
177686dafe34Smrg  *)
177786dafe34Smrg    AC_CHECK_FUNC([shl_load],
177886dafe34Smrg	  [lt_cv_dlopen="shl_load"],
177986dafe34Smrg      [AC_CHECK_LIB([dld], [shl_load],
178086dafe34Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
178186dafe34Smrg	[AC_CHECK_FUNC([dlopen],
178286dafe34Smrg	      [lt_cv_dlopen="dlopen"],
178386dafe34Smrg	  [AC_CHECK_LIB([dl], [dlopen],
178486dafe34Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
178586dafe34Smrg	    [AC_CHECK_LIB([svld], [dlopen],
178686dafe34Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
178786dafe34Smrg	      [AC_CHECK_LIB([dld], [dld_link],
178886dafe34Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
178986dafe34Smrg	      ])
179086dafe34Smrg	    ])
179186dafe34Smrg	  ])
179286dafe34Smrg	])
179386dafe34Smrg      ])
179486dafe34Smrg    ;;
179586dafe34Smrg  esac
179676888252Smrg
179786dafe34Smrg  if test "x$lt_cv_dlopen" != xno; then
179886dafe34Smrg    enable_dlopen=yes
179986dafe34Smrg  else
180086dafe34Smrg    enable_dlopen=no
180186dafe34Smrg  fi
180276888252Smrg
180386dafe34Smrg  case $lt_cv_dlopen in
180486dafe34Smrg  dlopen)
180586dafe34Smrg    save_CPPFLAGS="$CPPFLAGS"
180686dafe34Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
180776888252Smrg
180886dafe34Smrg    save_LDFLAGS="$LDFLAGS"
180986dafe34Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
181076888252Smrg
181186dafe34Smrg    save_LIBS="$LIBS"
181286dafe34Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
181376888252Smrg
181486dafe34Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
181586dafe34Smrg	  lt_cv_dlopen_self, [dnl
181686dafe34Smrg	  _LT_TRY_DLOPEN_SELF(
181786dafe34Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
181886dafe34Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
181986dafe34Smrg    ])
182076888252Smrg
182186dafe34Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
182286dafe34Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
182386dafe34Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
182486dafe34Smrg	  lt_cv_dlopen_self_static, [dnl
182586dafe34Smrg	  _LT_TRY_DLOPEN_SELF(
182686dafe34Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
182786dafe34Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
182886dafe34Smrg      ])
182986dafe34Smrg    fi
183076888252Smrg
183186dafe34Smrg    CPPFLAGS="$save_CPPFLAGS"
183286dafe34Smrg    LDFLAGS="$save_LDFLAGS"
183386dafe34Smrg    LIBS="$save_LIBS"
183486dafe34Smrg    ;;
183586dafe34Smrg  esac
183676888252Smrg
183786dafe34Smrg  case $lt_cv_dlopen_self in
183886dafe34Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
183986dafe34Smrg  *) enable_dlopen_self=unknown ;;
184086dafe34Smrg  esac
184176888252Smrg
184286dafe34Smrg  case $lt_cv_dlopen_self_static in
184386dafe34Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
184486dafe34Smrg  *) enable_dlopen_self_static=unknown ;;
184586dafe34Smrg  esac
184686dafe34Smrgfi
184786dafe34Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
184886dafe34Smrg	 [Whether dlopen is supported])
184986dafe34Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
185086dafe34Smrg	 [Whether dlopen of programs is supported])
185186dafe34Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
185286dafe34Smrg	 [Whether dlopen of statically linked programs is supported])
185386dafe34Smrg])# LT_SYS_DLOPEN_SELF
185476888252Smrg
185586dafe34Smrg# Old name:
185686dafe34SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
185786dafe34Smrgdnl aclocal-1.4 backwards compatibility:
185886dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
185976888252Smrg
18601ae1b5e8Smrg
186186dafe34Smrg# _LT_COMPILER_C_O([TAGNAME])
186286dafe34Smrg# ---------------------------
186386dafe34Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
186486dafe34Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
186586dafe34Smrgm4_defun([_LT_COMPILER_C_O],
186686dafe34Smrg[m4_require([_LT_DECL_SED])dnl
186786dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
186886dafe34Smrgm4_require([_LT_TAG_COMPILER])dnl
186986dafe34SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
187086dafe34Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
187186dafe34Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
187286dafe34Smrg   $RM -r conftest 2>/dev/null
187386dafe34Smrg   mkdir conftest
187486dafe34Smrg   cd conftest
187586dafe34Smrg   mkdir out
187686dafe34Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18771ae1b5e8Smrg
187886dafe34Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
187986dafe34Smrg   # Insert the option either (1) after the last *FLAGS variable, or
188086dafe34Smrg   # (2) before a word containing "conftest.", or (3) at the end.
188186dafe34Smrg   # Note that $ac_compile itself does not contain backslashes and begins
188286dafe34Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
188386dafe34Smrg   lt_compile=`echo "$ac_compile" | $SED \
188486dafe34Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
188586dafe34Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
188686dafe34Smrg   -e 's:$: $lt_compiler_flag:'`
188786dafe34Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
188886dafe34Smrg   (eval "$lt_compile" 2>out/conftest.err)
188986dafe34Smrg   ac_status=$?
189086dafe34Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
189186dafe34Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
189286dafe34Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
189386dafe34Smrg   then
189486dafe34Smrg     # The compiler can only warn and ignore the option if not recognized
189586dafe34Smrg     # So say no if there are warnings
189686dafe34Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
189786dafe34Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
189886dafe34Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
189986dafe34Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
190086dafe34Smrg     fi
190186dafe34Smrg   fi
190286dafe34Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
190386dafe34Smrg   $RM conftest*
190486dafe34Smrg   # SGI C++ compiler will create directory out/ii_files/ for
190586dafe34Smrg   # template instantiation
190686dafe34Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
190786dafe34Smrg   $RM out/* && rmdir out
190886dafe34Smrg   cd ..
190986dafe34Smrg   $RM -r conftest
191086dafe34Smrg   $RM conftest*
191186dafe34Smrg])
191286dafe34Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
191386dafe34Smrg	[Does compiler simultaneously support -c and -o options?])
191486dafe34Smrg])# _LT_COMPILER_C_O
19151ae1b5e8Smrg
191676888252Smrg
191786dafe34Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
191886dafe34Smrg# ----------------------------------
191986dafe34Smrg# Check to see if we can do hard links to lock some files if needed
192086dafe34Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
192186dafe34Smrg[m4_require([_LT_ENABLE_LOCK])dnl
192286dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
192386dafe34Smrg_LT_COMPILER_C_O([$1])
192476888252Smrg
192586dafe34Smrghard_links="nottested"
192686dafe34Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
192786dafe34Smrg  # do not overwrite the value of need_locks provided by the user
192886dafe34Smrg  AC_MSG_CHECKING([if we can lock with hard links])
192986dafe34Smrg  hard_links=yes
193086dafe34Smrg  $RM conftest*
193186dafe34Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193286dafe34Smrg  touch conftest.a
193386dafe34Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
193486dafe34Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193586dafe34Smrg  AC_MSG_RESULT([$hard_links])
193686dafe34Smrg  if test "$hard_links" = no; then
193786dafe34Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
193886dafe34Smrg    need_locks=warn
193986dafe34Smrg  fi
194086dafe34Smrgelse
194186dafe34Smrg  need_locks=no
19421ae1b5e8Smrgfi
194386dafe34Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
194486dafe34Smrg])# _LT_COMPILER_FILE_LOCKS
194576888252Smrg
194676888252Smrg
194786dafe34Smrg# _LT_CHECK_OBJDIR
194886dafe34Smrg# ----------------
194986dafe34Smrgm4_defun([_LT_CHECK_OBJDIR],
195086dafe34Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
195186dafe34Smrg[rm -f .libs 2>/dev/null
195286dafe34Smrgmkdir .libs 2>/dev/null
195386dafe34Smrgif test -d .libs; then
195486dafe34Smrg  lt_cv_objdir=.libs
195586dafe34Smrgelse
195686dafe34Smrg  # MS-DOS does not allow filenames that begin with a dot.
195786dafe34Smrg  lt_cv_objdir=_libs
195886dafe34Smrgfi
195986dafe34Smrgrmdir .libs 2>/dev/null])
196086dafe34Smrgobjdir=$lt_cv_objdir
196186dafe34Smrg_LT_DECL([], [objdir], [0],
196286dafe34Smrg         [The name of the directory that contains temporary libtool files])dnl
196386dafe34Smrgm4_pattern_allow([LT_OBJDIR])dnl
196486dafe34SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
196586dafe34Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
196686dafe34Smrg])# _LT_CHECK_OBJDIR
196776888252Smrg
196876888252Smrg
196986dafe34Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
197086dafe34Smrg# --------------------------------------
197186dafe34Smrg# Check hardcoding attributes.
197286dafe34Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
197386dafe34Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
197486dafe34Smrg_LT_TAGVAR(hardcode_action, $1)=
197586dafe34Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
197686dafe34Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
197786dafe34Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
197876888252Smrg
197986dafe34Smrg  # We can hardcode non-existent directories.
198086dafe34Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
198186dafe34Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
198286dafe34Smrg     # have to relink, otherwise we might link with an installed library
198386dafe34Smrg     # when we should be linking with a yet-to-be-installed one
198486dafe34Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
198586dafe34Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
198686dafe34Smrg    # Linking always hardcodes the temporary library directory.
198786dafe34Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
198886dafe34Smrg  else
198986dafe34Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
199086dafe34Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
199186dafe34Smrg  fi
199286dafe34Smrgelse
199386dafe34Smrg  # We cannot hardcode anything, or else we can only hardcode existing
199486dafe34Smrg  # directories.
199586dafe34Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
19961ae1b5e8Smrgfi
199786dafe34SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
199876888252Smrg
199986dafe34Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
200086dafe34Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
200186dafe34Smrg  # Fast installation is not supported
200286dafe34Smrg  enable_fast_install=no
200386dafe34Smrgelif test "$shlibpath_overrides_runpath" = yes ||
200486dafe34Smrg     test "$enable_shared" = no; then
200586dafe34Smrg  # Fast installation is not necessary
200686dafe34Smrg  enable_fast_install=needless
20071ae1b5e8Smrgfi
200886dafe34Smrg_LT_TAGDECL([], [hardcode_action], [0],
200986dafe34Smrg    [How to hardcode a shared library path into an executable])
201086dafe34Smrg])# _LT_LINKER_HARDCODE_LIBPATH
201176888252Smrg
201276888252Smrg
201386dafe34Smrg# _LT_CMD_STRIPLIB
20141ae1b5e8Smrg# ----------------
201586dafe34Smrgm4_defun([_LT_CMD_STRIPLIB],
201686dafe34Smrg[m4_require([_LT_DECL_EGREP])
201786dafe34Smrgstriplib=
201886dafe34Smrgold_striplib=
201986dafe34SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
202086dafe34Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
202186dafe34Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
202286dafe34Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
202386dafe34Smrg  AC_MSG_RESULT([yes])
20241ae1b5e8Smrgelse
202586dafe34Smrg# FIXME - insert some real tests, host_os isn't really good enough
202686dafe34Smrg  case $host_os in
202786dafe34Smrg  darwin*)
202886dafe34Smrg    if test -n "$STRIP" ; then
202986dafe34Smrg      striplib="$STRIP -x"
203086dafe34Smrg      old_striplib="$STRIP -S"
203186dafe34Smrg      AC_MSG_RESULT([yes])
203286dafe34Smrg    else
203386dafe34Smrg      AC_MSG_RESULT([no])
203486dafe34Smrg    fi
203586dafe34Smrg    ;;
203686dafe34Smrg  *)
203786dafe34Smrg    AC_MSG_RESULT([no])
203886dafe34Smrg    ;;
203986dafe34Smrg  esac
204076888252Smrgfi
204186dafe34Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
204286dafe34Smrg_LT_DECL([], [striplib], [1])
204386dafe34Smrg])# _LT_CMD_STRIPLIB
204476888252Smrg
204576888252Smrg
204686dafe34Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
204786dafe34Smrg# -----------------------------
204886dafe34Smrg# PORTME Fill in your ld.so characteristics
204986dafe34Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
205086dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
205186dafe34Smrgm4_require([_LT_DECL_EGREP])dnl
205286dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
205386dafe34Smrgm4_require([_LT_DECL_OBJDUMP])dnl
205486dafe34Smrgm4_require([_LT_DECL_SED])dnl
205586dafe34SmrgAC_MSG_CHECKING([dynamic linker characteristics])
205686dafe34Smrgm4_if([$1],
205786dafe34Smrg	[], [
205886dafe34Smrgif test "$GCC" = yes; then
205986dafe34Smrg  case $host_os in
206086dafe34Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
206186dafe34Smrg    *) lt_awk_arg="/^libraries:/" ;;
206286dafe34Smrg  esac
206386dafe34Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
206486dafe34Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
206586dafe34Smrg    # if the path contains ";" then we assume it to be the separator
206686dafe34Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
206786dafe34Smrg    # assumed that no part of a normal pathname contains ";" but that should
206886dafe34Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
206986dafe34Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
207086dafe34Smrg  else
207186dafe34Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
207286dafe34Smrg  fi
207386dafe34Smrg  # Ok, now we have the path, separated by spaces, we can step through it
207486dafe34Smrg  # and add multilib dir if necessary.
207586dafe34Smrg  lt_tmp_lt_search_path_spec=
207686dafe34Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
207786dafe34Smrg  for lt_sys_path in $lt_search_path_spec; do
207886dafe34Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
207986dafe34Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
208086dafe34Smrg    else
208186dafe34Smrg      test -d "$lt_sys_path" && \
208286dafe34Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
208386dafe34Smrg    fi
208486dafe34Smrg  done
208586dafe34Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
208686dafe34SmrgBEGIN {RS=" "; FS="/|\n";} {
208786dafe34Smrg  lt_foo="";
208886dafe34Smrg  lt_count=0;
208986dafe34Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
209086dafe34Smrg    if ($lt_i != "" && $lt_i != ".") {
209186dafe34Smrg      if ($lt_i == "..") {
209286dafe34Smrg        lt_count++;
209386dafe34Smrg      } else {
209486dafe34Smrg        if (lt_count == 0) {
209586dafe34Smrg          lt_foo="/" $lt_i lt_foo;
209686dafe34Smrg        } else {
209786dafe34Smrg          lt_count--;
209886dafe34Smrg        }
209986dafe34Smrg      }
210086dafe34Smrg    }
210186dafe34Smrg  }
210286dafe34Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
210386dafe34Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
210486dafe34Smrg}'`
210586dafe34Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
210686dafe34Smrgelse
210786dafe34Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
210886dafe34Smrgfi])
210986dafe34Smrglibrary_names_spec=
211086dafe34Smrglibname_spec='lib$name'
211186dafe34Smrgsoname_spec=
211286dafe34Smrgshrext_cmds=".so"
211386dafe34Smrgpostinstall_cmds=
211486dafe34Smrgpostuninstall_cmds=
211586dafe34Smrgfinish_cmds=
211686dafe34Smrgfinish_eval=
211786dafe34Smrgshlibpath_var=
211886dafe34Smrgshlibpath_overrides_runpath=unknown
211986dafe34Smrgversion_type=none
212086dafe34Smrgdynamic_linker="$host_os ld.so"
212186dafe34Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
212286dafe34Smrgneed_lib_prefix=unknown
212386dafe34Smrghardcode_into_libs=no
212476888252Smrg
212586dafe34Smrg# when you set need_version to no, make sure it does not cause -set_version
212686dafe34Smrg# flags to be left without arguments
212786dafe34Smrgneed_version=unknown
212876888252Smrg
212986dafe34Smrgcase $host_os in
213086dafe34Smrgaix3*)
213186dafe34Smrg  version_type=linux
213286dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
213386dafe34Smrg  shlibpath_var=LIBPATH
213476888252Smrg
213586dafe34Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
213686dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
213786dafe34Smrg  ;;
213876888252Smrg
213986dafe34Smrgaix[[4-9]]*)
214086dafe34Smrg  version_type=linux
214186dafe34Smrg  need_lib_prefix=no
214286dafe34Smrg  need_version=no
214386dafe34Smrg  hardcode_into_libs=yes
214486dafe34Smrg  if test "$host_cpu" = ia64; then
214586dafe34Smrg    # AIX 5 supports IA64
214686dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
214786dafe34Smrg    shlibpath_var=LD_LIBRARY_PATH
214886dafe34Smrg  else
214986dafe34Smrg    # With GCC up to 2.95.x, collect2 would create an import file
215086dafe34Smrg    # for dependence libraries.  The import file would start with
215186dafe34Smrg    # the line `#! .'.  This would cause the generated library to
215286dafe34Smrg    # depend on `.', always an invalid library.  This was fixed in
215386dafe34Smrg    # development snapshots of GCC prior to 3.0.
215486dafe34Smrg    case $host_os in
215586dafe34Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
215686dafe34Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
215786dafe34Smrg	   echo ' yes '
215886dafe34Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
215986dafe34Smrg	:
216086dafe34Smrg      else
216186dafe34Smrg	can_build_shared=no
216286dafe34Smrg      fi
216386dafe34Smrg      ;;
21641ae1b5e8Smrg    esac
216586dafe34Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
216686dafe34Smrg    # soname into executable. Probably we can add versioning support to
216786dafe34Smrg    # collect2, so additional links can be useful in future.
216886dafe34Smrg    if test "$aix_use_runtimelinking" = yes; then
216986dafe34Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
217086dafe34Smrg      # instead of lib<name>.a to let people know that these are not
217186dafe34Smrg      # typical AIX shared libraries.
217286dafe34Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
217386dafe34Smrg    else
217486dafe34Smrg      # We preserve .a as extension for shared libraries through AIX4.2
217586dafe34Smrg      # and later when we are not doing run time linking.
217686dafe34Smrg      library_names_spec='${libname}${release}.a $libname.a'
217786dafe34Smrg      soname_spec='${libname}${release}${shared_ext}$major'
21781ae1b5e8Smrg    fi
217986dafe34Smrg    shlibpath_var=LIBPATH
218086dafe34Smrg  fi
218186dafe34Smrg  ;;
21821ae1b5e8Smrg
218386dafe34Smrgamigaos*)
218486dafe34Smrg  case $host_cpu in
218586dafe34Smrg  powerpc)
218686dafe34Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
218786dafe34Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
218886dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
218986dafe34Smrg    ;;
219086dafe34Smrg  m68k)
219186dafe34Smrg    library_names_spec='$libname.ixlibrary $libname.a'
219286dafe34Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
219386dafe34Smrg    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'
219486dafe34Smrg    ;;
219586dafe34Smrg  esac
21961ae1b5e8Smrg  ;;
21971ae1b5e8Smrg
219886dafe34Smrgbeos*)
219986dafe34Smrg  library_names_spec='${libname}${shared_ext}'
220086dafe34Smrg  dynamic_linker="$host_os ld.so"
220186dafe34Smrg  shlibpath_var=LIBRARY_PATH
220286dafe34Smrg  ;;
22031ae1b5e8Smrg
220486dafe34Smrgbsdi[[45]]*)
220586dafe34Smrg  version_type=linux
220686dafe34Smrg  need_version=no
220786dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
220886dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
220986dafe34Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
221086dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
221186dafe34Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
221286dafe34Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
221386dafe34Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
221486dafe34Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
221586dafe34Smrg  # libtool to hard-code these into programs
221686dafe34Smrg  ;;
22171ae1b5e8Smrg
221886dafe34Smrgcygwin* | mingw* | pw32* | cegcc*)
221986dafe34Smrg  version_type=windows
222086dafe34Smrg  shrext_cmds=".dll"
222186dafe34Smrg  need_version=no
222286dafe34Smrg  need_lib_prefix=no
22231ae1b5e8Smrg
222486dafe34Smrg  case $GCC,$host_os in
222586dafe34Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
222686dafe34Smrg    library_names_spec='$libname.dll.a'
222786dafe34Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
222886dafe34Smrg    postinstall_cmds='base_file=`basename \${file}`~
222986dafe34Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
223086dafe34Smrg      dldir=$destdir/`dirname \$dlpath`~
223186dafe34Smrg      test -d \$dldir || mkdir -p \$dldir~
223286dafe34Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
223386dafe34Smrg      chmod a+x \$dldir/$dlname~
223486dafe34Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
223586dafe34Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
223686dafe34Smrg      fi'
223786dafe34Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
223886dafe34Smrg      dlpath=$dir/\$dldll~
223986dafe34Smrg       $RM \$dlpath'
224086dafe34Smrg    shlibpath_overrides_runpath=yes
22411ae1b5e8Smrg
224286dafe34Smrg    case $host_os in
224386dafe34Smrg    cygwin*)
224486dafe34Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
224586dafe34Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
224686dafe34Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
224786dafe34Smrg      ;;
224886dafe34Smrg    mingw* | cegcc*)
224986dafe34Smrg      # MinGW DLLs use traditional 'lib' prefix
225086dafe34Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
225186dafe34Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
225286dafe34Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
225386dafe34Smrg        # It is most probably a Windows format PATH printed by
225486dafe34Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
225586dafe34Smrg        # path with ; separators, and with drive letters. We can handle the
225686dafe34Smrg        # drive letters (cygwin fileutils understands them), so leave them,
225786dafe34Smrg        # especially as we might pass files found there to a mingw objdump,
225886dafe34Smrg        # which wouldn't understand a cygwinified path. Ahh.
225986dafe34Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
226086dafe34Smrg      else
226186dafe34Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
226286dafe34Smrg      fi
226386dafe34Smrg      ;;
226486dafe34Smrg    pw32*)
226586dafe34Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
226686dafe34Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
226786dafe34Smrg      ;;
226886dafe34Smrg    esac
226976888252Smrg    ;;
227086dafe34Smrg
227176888252Smrg  *)
227286dafe34Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
227376888252Smrg    ;;
227476888252Smrg  esac
227586dafe34Smrg  dynamic_linker='Win32 ld.exe'
227686dafe34Smrg  # FIXME: first we should search . and the directory the executable is in
227786dafe34Smrg  shlibpath_var=PATH
227886dafe34Smrg  ;;
227976888252Smrg
228086dafe34Smrgdarwin* | rhapsody*)
228186dafe34Smrg  dynamic_linker="$host_os dyld"
228286dafe34Smrg  version_type=darwin
228386dafe34Smrg  need_lib_prefix=no
228486dafe34Smrg  need_version=no
228586dafe34Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
228686dafe34Smrg  soname_spec='${libname}${release}${major}$shared_ext'
228786dafe34Smrg  shlibpath_overrides_runpath=yes
228886dafe34Smrg  shlibpath_var=DYLD_LIBRARY_PATH
228986dafe34Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
229086dafe34Smrgm4_if([$1], [],[
229186dafe34Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
229286dafe34Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
229376888252Smrg  ;;
229476888252Smrg
229586dafe34Smrgdgux*)
229686dafe34Smrg  version_type=linux
229786dafe34Smrg  need_lib_prefix=no
229886dafe34Smrg  need_version=no
229986dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
230086dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
230186dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
230286dafe34Smrg  ;;
230376888252Smrg
230486dafe34Smrgfreebsd1*)
230586dafe34Smrg  dynamic_linker=no
230686dafe34Smrg  ;;
230776888252Smrg
230886dafe34Smrgfreebsd* | dragonfly*)
230986dafe34Smrg  # DragonFly does not have aout.  When/if they implement a new
231086dafe34Smrg  # versioning mechanism, adjust this.
231186dafe34Smrg  if test -x /usr/bin/objformat; then
231286dafe34Smrg    objformat=`/usr/bin/objformat`
231386dafe34Smrg  else
231486dafe34Smrg    case $host_os in
231586dafe34Smrg    freebsd[[123]]*) objformat=aout ;;
231686dafe34Smrg    *) objformat=elf ;;
231786dafe34Smrg    esac
231886dafe34Smrg  fi
231986dafe34Smrg  version_type=freebsd-$objformat
232086dafe34Smrg  case $version_type in
232186dafe34Smrg    freebsd-elf*)
232286dafe34Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
232386dafe34Smrg      need_version=no
232486dafe34Smrg      need_lib_prefix=no
232586dafe34Smrg      ;;
232686dafe34Smrg    freebsd-*)
232786dafe34Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
232886dafe34Smrg      need_version=yes
232986dafe34Smrg      ;;
233076888252Smrg  esac
233186dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
233286dafe34Smrg  case $host_os in
233386dafe34Smrg  freebsd2*)
233486dafe34Smrg    shlibpath_overrides_runpath=yes
233586dafe34Smrg    ;;
233686dafe34Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
233786dafe34Smrg    shlibpath_overrides_runpath=yes
233886dafe34Smrg    hardcode_into_libs=yes
233986dafe34Smrg    ;;
234086dafe34Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
234186dafe34Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
234286dafe34Smrg    shlibpath_overrides_runpath=no
234386dafe34Smrg    hardcode_into_libs=yes
234486dafe34Smrg    ;;
234586dafe34Smrg  *) # from 4.6 on, and DragonFly
234686dafe34Smrg    shlibpath_overrides_runpath=yes
234786dafe34Smrg    hardcode_into_libs=yes
234886dafe34Smrg    ;;
234986dafe34Smrg  esac
235086dafe34Smrg  ;;
235176888252Smrg
235286dafe34Smrggnu*)
235386dafe34Smrg  version_type=linux
235486dafe34Smrg  need_lib_prefix=no
235586dafe34Smrg  need_version=no
235686dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
235786dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
235886dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
235986dafe34Smrg  hardcode_into_libs=yes
236086dafe34Smrg  ;;
236176888252Smrg
236286dafe34Smrghpux9* | hpux10* | hpux11*)
236386dafe34Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
236486dafe34Smrg  # link against other versions.
236586dafe34Smrg  version_type=sunos
236686dafe34Smrg  need_lib_prefix=no
236786dafe34Smrg  need_version=no
236886dafe34Smrg  case $host_cpu in
236986dafe34Smrg  ia64*)
237086dafe34Smrg    shrext_cmds='.so'
237186dafe34Smrg    hardcode_into_libs=yes
237286dafe34Smrg    dynamic_linker="$host_os dld.so"
237386dafe34Smrg    shlibpath_var=LD_LIBRARY_PATH
237486dafe34Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
237586dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
237686dafe34Smrg    soname_spec='${libname}${release}${shared_ext}$major'
237786dafe34Smrg    if test "X$HPUX_IA64_MODE" = X32; then
237886dafe34Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
237986dafe34Smrg    else
238086dafe34Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
238186dafe34Smrg    fi
238286dafe34Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
238386dafe34Smrg    ;;
238486dafe34Smrg  hppa*64*)
238586dafe34Smrg    shrext_cmds='.sl'
238686dafe34Smrg    hardcode_into_libs=yes
238786dafe34Smrg    dynamic_linker="$host_os dld.sl"
238886dafe34Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
238986dafe34Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
239086dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
239186dafe34Smrg    soname_spec='${libname}${release}${shared_ext}$major'
239286dafe34Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
239386dafe34Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
239486dafe34Smrg    ;;
239586dafe34Smrg  *)
239686dafe34Smrg    shrext_cmds='.sl'
239786dafe34Smrg    dynamic_linker="$host_os dld.sl"
239886dafe34Smrg    shlibpath_var=SHLIB_PATH
239986dafe34Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
240086dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
240186dafe34Smrg    soname_spec='${libname}${release}${shared_ext}$major'
240286dafe34Smrg    ;;
240386dafe34Smrg  esac
240486dafe34Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
240586dafe34Smrg  postinstall_cmds='chmod 555 $lib'
240686dafe34Smrg  ;;
240776888252Smrg
240886dafe34Smrginterix[[3-9]]*)
240986dafe34Smrg  version_type=linux
241086dafe34Smrg  need_lib_prefix=no
241186dafe34Smrg  need_version=no
241286dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
241386dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
241486dafe34Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
241586dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
241686dafe34Smrg  shlibpath_overrides_runpath=no
241786dafe34Smrg  hardcode_into_libs=yes
241886dafe34Smrg  ;;
241976888252Smrg
242086dafe34Smrgirix5* | irix6* | nonstopux*)
242186dafe34Smrg  case $host_os in
242286dafe34Smrg    nonstopux*) version_type=nonstopux ;;
242386dafe34Smrg    *)
242486dafe34Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
242586dafe34Smrg		version_type=linux
242686dafe34Smrg	else
242786dafe34Smrg		version_type=irix
242886dafe34Smrg	fi ;;
242986dafe34Smrg  esac
243086dafe34Smrg  need_lib_prefix=no
243186dafe34Smrg  need_version=no
243286dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
243386dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
243486dafe34Smrg  case $host_os in
243586dafe34Smrg  irix5* | nonstopux*)
243686dafe34Smrg    libsuff= shlibsuff=
243786dafe34Smrg    ;;
243886dafe34Smrg  *)
243986dafe34Smrg    case $LD in # libtool.m4 will add one of these switches to LD
244086dafe34Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
244186dafe34Smrg      libsuff= shlibsuff= libmagic=32-bit;;
244286dafe34Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
244386dafe34Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
244486dafe34Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
244586dafe34Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
244686dafe34Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
244786dafe34Smrg    esac
244886dafe34Smrg    ;;
244986dafe34Smrg  esac
245086dafe34Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
245186dafe34Smrg  shlibpath_overrides_runpath=no
245286dafe34Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
245386dafe34Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
245486dafe34Smrg  hardcode_into_libs=yes
245586dafe34Smrg  ;;
245676888252Smrg
245786dafe34Smrg# No shared lib support for Linux oldld, aout, or coff.
245886dafe34Smrglinux*oldld* | linux*aout* | linux*coff*)
245986dafe34Smrg  dynamic_linker=no
246086dafe34Smrg  ;;
246176888252Smrg
246286dafe34Smrg# This must be Linux ELF.
246386dafe34Smrglinux* | k*bsd*-gnu)
246486dafe34Smrg  version_type=linux
246586dafe34Smrg  need_lib_prefix=no
246686dafe34Smrg  need_version=no
246786dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
246886dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
246986dafe34Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
247086dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
247186dafe34Smrg  shlibpath_overrides_runpath=no
247286dafe34Smrg  # Some binutils ld are patched to set DT_RUNPATH
247386dafe34Smrg  save_LDFLAGS=$LDFLAGS
247486dafe34Smrg  save_libdir=$libdir
247586dafe34Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
247686dafe34Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
247786dafe34Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
247886dafe34Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
247986dafe34Smrg       [shlibpath_overrides_runpath=yes])])
248086dafe34Smrg  LDFLAGS=$save_LDFLAGS
248186dafe34Smrg  libdir=$save_libdir
248276888252Smrg
248386dafe34Smrg  # This implies no fast_install, which is unacceptable.
248486dafe34Smrg  # Some rework will be needed to allow for fast_install
248586dafe34Smrg  # before this can be enabled.
248686dafe34Smrg  hardcode_into_libs=yes
248776888252Smrg
248886dafe34Smrg  # Add ABI-specific directories to the system library path.
248986dafe34Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
249076888252Smrg
249186dafe34Smrg  # Append ld.so.conf contents to the search path
249286dafe34Smrg  if test -f /etc/ld.so.conf; then
249386dafe34Smrg    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' ' '`
249486dafe34Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
249586dafe34Smrg  fi
249676888252Smrg
249786dafe34Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
249886dafe34Smrg  # powerpc, because MkLinux only supported shared libraries with the
249986dafe34Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
250086dafe34Smrg  # most powerpc-linux boxes support dynamic linking these days and
250186dafe34Smrg  # people can always --disable-shared, the test was removed, and we
250286dafe34Smrg  # assume the GNU/Linux dynamic linker is in use.
250386dafe34Smrg  dynamic_linker='GNU/Linux ld.so'
250486dafe34Smrg  ;;
250576888252Smrg
250686dafe34Smrgnetbsd*)
250786dafe34Smrg  version_type=sunos
250886dafe34Smrg  need_lib_prefix=no
250986dafe34Smrg  need_version=no
251086dafe34Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
251186dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
251286dafe34Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
251386dafe34Smrg    dynamic_linker='NetBSD (a.out) ld.so'
251486dafe34Smrg  else
251586dafe34Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
251686dafe34Smrg    soname_spec='${libname}${release}${shared_ext}$major'
251786dafe34Smrg    dynamic_linker='NetBSD ld.elf_so'
251886dafe34Smrg  fi
251986dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
252086dafe34Smrg  shlibpath_overrides_runpath=yes
252186dafe34Smrg  hardcode_into_libs=yes
252276888252Smrg  ;;
252376888252Smrg
252486dafe34Smrgnewsos6)
252586dafe34Smrg  version_type=linux
252686dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
252786dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
252886dafe34Smrg  shlibpath_overrides_runpath=yes
252986dafe34Smrg  ;;
253076888252Smrg
253186dafe34Smrg*nto* | *qnx*)
253286dafe34Smrg  version_type=qnx
253386dafe34Smrg  need_lib_prefix=no
253486dafe34Smrg  need_version=no
253586dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
253686dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
253786dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
253886dafe34Smrg  shlibpath_overrides_runpath=no
253986dafe34Smrg  hardcode_into_libs=yes
254086dafe34Smrg  dynamic_linker='ldqnx.so'
254186dafe34Smrg  ;;
254276888252Smrg
254386dafe34Smrgopenbsd*)
254486dafe34Smrg  version_type=sunos
254586dafe34Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
254686dafe34Smrg  need_lib_prefix=no
254786dafe34Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
254886dafe34Smrg  case $host_os in
254986dafe34Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
255086dafe34Smrg    *)				need_version=no  ;;
255186dafe34Smrg  esac
255286dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
255386dafe34Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
255486dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
255586dafe34Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
255686dafe34Smrg    case $host_os in
255786dafe34Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
255886dafe34Smrg	shlibpath_overrides_runpath=no
255986dafe34Smrg	;;
256086dafe34Smrg      *)
256186dafe34Smrg	shlibpath_overrides_runpath=yes
256286dafe34Smrg	;;
256386dafe34Smrg      esac
256486dafe34Smrg  else
256586dafe34Smrg    shlibpath_overrides_runpath=yes
25661ae1b5e8Smrg  fi
256786dafe34Smrg  ;;
256876888252Smrg
256986dafe34Smrgos2*)
257086dafe34Smrg  libname_spec='$name'
257186dafe34Smrg  shrext_cmds=".dll"
257286dafe34Smrg  need_lib_prefix=no
257386dafe34Smrg  library_names_spec='$libname${shared_ext} $libname.a'
257486dafe34Smrg  dynamic_linker='OS/2 ld.exe'
257586dafe34Smrg  shlibpath_var=LIBPATH
257686dafe34Smrg  ;;
257776888252Smrg
257886dafe34Smrgosf3* | osf4* | osf5*)
257986dafe34Smrg  version_type=osf
258086dafe34Smrg  need_lib_prefix=no
258186dafe34Smrg  need_version=no
258286dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
258386dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
258486dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
258586dafe34Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
258686dafe34Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
258786dafe34Smrg  ;;
258876888252Smrg
258986dafe34Smrgrdos*)
259086dafe34Smrg  dynamic_linker=no
259186dafe34Smrg  ;;
259276888252Smrg
259386dafe34Smrgsolaris*)
259486dafe34Smrg  version_type=linux
259586dafe34Smrg  need_lib_prefix=no
259686dafe34Smrg  need_version=no
259786dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
259886dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
259986dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
260086dafe34Smrg  shlibpath_overrides_runpath=yes
260186dafe34Smrg  hardcode_into_libs=yes
260286dafe34Smrg  # ldd complains unless libraries are executable
260386dafe34Smrg  postinstall_cmds='chmod +x $lib'
260486dafe34Smrg  ;;
260576888252Smrg
260686dafe34Smrgsunos4*)
260786dafe34Smrg  version_type=sunos
260886dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
260986dafe34Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
261086dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
261186dafe34Smrg  shlibpath_overrides_runpath=yes
261286dafe34Smrg  if test "$with_gnu_ld" = yes; then
261386dafe34Smrg    need_lib_prefix=no
26141ae1b5e8Smrg  fi
261586dafe34Smrg  need_version=yes
26161ae1b5e8Smrg  ;;
261786dafe34Smrg
261886dafe34Smrgsysv4 | sysv4.3*)
261986dafe34Smrg  version_type=linux
262086dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
262186dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
262286dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
262386dafe34Smrg  case $host_vendor in
262486dafe34Smrg    sni)
262586dafe34Smrg      shlibpath_overrides_runpath=no
262686dafe34Smrg      need_lib_prefix=no
262786dafe34Smrg      runpath_var=LD_RUN_PATH
26281ae1b5e8Smrg      ;;
262986dafe34Smrg    siemens)
263086dafe34Smrg      need_lib_prefix=no
26311ae1b5e8Smrg      ;;
263286dafe34Smrg    motorola)
263386dafe34Smrg      need_lib_prefix=no
263486dafe34Smrg      need_version=no
263586dafe34Smrg      shlibpath_overrides_runpath=no
263686dafe34Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
26371ae1b5e8Smrg      ;;
263886dafe34Smrg  esac
26391ae1b5e8Smrg  ;;
264076888252Smrg
264186dafe34Smrgsysv4*MP*)
264286dafe34Smrg  if test -d /usr/nec ;then
264386dafe34Smrg    version_type=linux
264486dafe34Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
264586dafe34Smrg    soname_spec='$libname${shared_ext}.$major'
264686dafe34Smrg    shlibpath_var=LD_LIBRARY_PATH
26471ae1b5e8Smrg  fi
26481ae1b5e8Smrg  ;;
264976888252Smrg
265086dafe34Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
265186dafe34Smrg  version_type=freebsd-elf
265286dafe34Smrg  need_lib_prefix=no
265386dafe34Smrg  need_version=no
265486dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
265586dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
265686dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
265786dafe34Smrg  shlibpath_overrides_runpath=yes
265886dafe34Smrg  hardcode_into_libs=yes
265986dafe34Smrg  if test "$with_gnu_ld" = yes; then
266086dafe34Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
266186dafe34Smrg  else
266286dafe34Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
266386dafe34Smrg    case $host_os in
266486dafe34Smrg      sco3.2v5*)
266586dafe34Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
266686dafe34Smrg	;;
26671ae1b5e8Smrg    esac
26681ae1b5e8Smrg  fi
266986dafe34Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
26701ae1b5e8Smrg  ;;
267176888252Smrg
267286dafe34Smrgtpf*)
267386dafe34Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
267486dafe34Smrg  version_type=linux
267586dafe34Smrg  need_lib_prefix=no
267686dafe34Smrg  need_version=no
267786dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
267886dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
267986dafe34Smrg  shlibpath_overrides_runpath=no
268086dafe34Smrg  hardcode_into_libs=yes
26811ae1b5e8Smrg  ;;
268276888252Smrg
268386dafe34Smrguts4*)
268486dafe34Smrg  version_type=linux
268586dafe34Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
268686dafe34Smrg  soname_spec='${libname}${release}${shared_ext}$major'
268786dafe34Smrg  shlibpath_var=LD_LIBRARY_PATH
268886dafe34Smrg  ;;
268976888252Smrg
269086dafe34Smrg*)
269186dafe34Smrg  dynamic_linker=no
269286dafe34Smrg  ;;
269386dafe34Smrgesac
269486dafe34SmrgAC_MSG_RESULT([$dynamic_linker])
269586dafe34Smrgtest "$dynamic_linker" = no && can_build_shared=no
269686dafe34Smrg
269786dafe34Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
269886dafe34Smrgif test "$GCC" = yes; then
269986dafe34Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
27001ae1b5e8Smrgfi
270176888252Smrg
270286dafe34Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
270386dafe34Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
270486dafe34Smrgfi
270586dafe34Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
270686dafe34Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
270786dafe34Smrgfi
270876888252Smrg
270986dafe34Smrg_LT_DECL([], [variables_saved_for_relink], [1],
271086dafe34Smrg    [Variables whose values should be saved in libtool wrapper scripts and
271186dafe34Smrg    restored at link time])
271286dafe34Smrg_LT_DECL([], [need_lib_prefix], [0],
271386dafe34Smrg    [Do we need the "lib" prefix for modules?])
271486dafe34Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
271586dafe34Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
271686dafe34Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
271786dafe34Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
271886dafe34Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
271986dafe34Smrg    [Is shlibpath searched before the hard-coded library search path?])
272086dafe34Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
272186dafe34Smrg_LT_DECL([], [library_names_spec], [1],
272286dafe34Smrg    [[List of archive names.  First name is the real one, the rest are links.
272386dafe34Smrg    The last name is the one that the linker finds with -lNAME]])
272486dafe34Smrg_LT_DECL([], [soname_spec], [1],
272586dafe34Smrg    [[The coded name of the library, if different from the real name]])
272686dafe34Smrg_LT_DECL([], [postinstall_cmds], [2],
272786dafe34Smrg    [Command to use after installation of a shared archive])
272886dafe34Smrg_LT_DECL([], [postuninstall_cmds], [2],
272986dafe34Smrg    [Command to use after uninstallation of a shared archive])
273086dafe34Smrg_LT_DECL([], [finish_cmds], [2],
273186dafe34Smrg    [Commands used to finish a libtool library installation in a directory])
273286dafe34Smrg_LT_DECL([], [finish_eval], [1],
273386dafe34Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
273486dafe34Smrg    not shown]])
273586dafe34Smrg_LT_DECL([], [hardcode_into_libs], [0],
273686dafe34Smrg    [Whether we should hardcode library paths into libraries])
273786dafe34Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
273886dafe34Smrg    [Compile-time system search path for libraries])
273986dafe34Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
274086dafe34Smrg    [Run-time system search path for libraries])
274186dafe34Smrg])# _LT_SYS_DYNAMIC_LINKER
274286dafe34Smrg
274386dafe34Smrg
274486dafe34Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
274586dafe34Smrg# --------------------------
274686dafe34Smrg# find a file program which can recognize shared library
274786dafe34SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
274886dafe34Smrg[m4_require([_LT_DECL_EGREP])dnl
274986dafe34SmrgAC_MSG_CHECKING([for $1])
275086dafe34SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
275186dafe34Smrg[case $MAGIC_CMD in
275286dafe34Smrg[[\\/*] |  ?:[\\/]*])
275386dafe34Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
275486dafe34Smrg  ;;
275586dafe34Smrg*)
275686dafe34Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
275786dafe34Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
275886dafe34Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
275986dafe34Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
276086dafe34Smrgdnl not every word.  This closes a longstanding sh security hole.
276186dafe34Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
276286dafe34Smrg  for ac_dir in $ac_dummy; do
276386dafe34Smrg    IFS="$lt_save_ifs"
276486dafe34Smrg    test -z "$ac_dir" && ac_dir=.
276586dafe34Smrg    if test -f $ac_dir/$1; then
276686dafe34Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
276786dafe34Smrg      if test -n "$file_magic_test_file"; then
276886dafe34Smrg	case $deplibs_check_method in
276986dafe34Smrg	"file_magic "*)
277086dafe34Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
277186dafe34Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
277286dafe34Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
277386dafe34Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
277486dafe34Smrg	    :
277586dafe34Smrg	  else
277686dafe34Smrg	    cat <<_LT_EOF 1>&2
277776888252Smrg
277886dafe34Smrg*** Warning: the command libtool uses to detect shared libraries,
277986dafe34Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
278086dafe34Smrg*** The result is that libtool may fail to recognize shared libraries
278186dafe34Smrg*** as such.  This will affect the creation of libtool libraries that
278286dafe34Smrg*** depend on shared libraries, but programs linked with such libtool
278386dafe34Smrg*** libraries will work regardless of this problem.  Nevertheless, you
278486dafe34Smrg*** may want to report the problem to your system manager and/or to
278586dafe34Smrg*** bug-libtool@gnu.org
278686dafe34Smrg
278786dafe34Smrg_LT_EOF
278886dafe34Smrg	  fi ;;
278986dafe34Smrg	esac
279086dafe34Smrg      fi
279186dafe34Smrg      break
279286dafe34Smrg    fi
279386dafe34Smrg  done
279486dafe34Smrg  IFS="$lt_save_ifs"
279586dafe34Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
279686dafe34Smrg  ;;
279786dafe34Smrgesac])
279886dafe34SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
279986dafe34Smrgif test -n "$MAGIC_CMD"; then
280086dafe34Smrg  AC_MSG_RESULT($MAGIC_CMD)
28011ae1b5e8Smrgelse
280286dafe34Smrg  AC_MSG_RESULT(no)
28031ae1b5e8Smrgfi
280486dafe34Smrg_LT_DECL([], [MAGIC_CMD], [0],
280586dafe34Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
280686dafe34Smrg])# _LT_PATH_TOOL_PREFIX
280776888252Smrg
280886dafe34Smrg# Old name:
280986dafe34SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
281086dafe34Smrgdnl aclocal-1.4 backwards compatibility:
281186dafe34Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
281276888252Smrg
281376888252Smrg
281486dafe34Smrg# _LT_PATH_MAGIC
281586dafe34Smrg# --------------
281686dafe34Smrg# find a file program which can recognize a shared library
281786dafe34Smrgm4_defun([_LT_PATH_MAGIC],
281886dafe34Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
281986dafe34Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
282086dafe34Smrg  if test -n "$ac_tool_prefix"; then
282186dafe34Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
282286dafe34Smrg  else
282386dafe34Smrg    MAGIC_CMD=:
282486dafe34Smrg  fi
282586dafe34Smrgfi
282686dafe34Smrg])# _LT_PATH_MAGIC
282776888252Smrg
282876888252Smrg
282986dafe34Smrg# LT_PATH_LD
283086dafe34Smrg# ----------
283186dafe34Smrg# find the pathname to the GNU or non-GNU linker
283286dafe34SmrgAC_DEFUN([LT_PATH_LD],
283386dafe34Smrg[AC_REQUIRE([AC_PROG_CC])dnl
283486dafe34SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
283586dafe34SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
283686dafe34Smrgm4_require([_LT_DECL_SED])dnl
283786dafe34Smrgm4_require([_LT_DECL_EGREP])dnl
283876888252Smrg
283986dafe34SmrgAC_ARG_WITH([gnu-ld],
284086dafe34Smrg    [AS_HELP_STRING([--with-gnu-ld],
284186dafe34Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
284286dafe34Smrg    [test "$withval" = no || with_gnu_ld=yes],
284386dafe34Smrg    [with_gnu_ld=no])dnl
284476888252Smrg
284586dafe34Smrgac_prog=ld
284686dafe34Smrgif test "$GCC" = yes; then
284786dafe34Smrg  # Check if gcc -print-prog-name=ld gives a path.
284886dafe34Smrg  AC_MSG_CHECKING([for ld used by $CC])
284986dafe34Smrg  case $host in
285086dafe34Smrg  *-*-mingw*)
285186dafe34Smrg    # gcc leaves a trailing carriage return which upsets mingw
285286dafe34Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
285386dafe34Smrg  *)
285486dafe34Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
285586dafe34Smrg  esac
285686dafe34Smrg  case $ac_prog in
285786dafe34Smrg    # Accept absolute paths.
285886dafe34Smrg    [[\\/]]* | ?:[[\\/]]*)
285986dafe34Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
286086dafe34Smrg      # Canonicalize the pathname of ld
286186dafe34Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
286286dafe34Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
286386dafe34Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
286486dafe34Smrg      done
286586dafe34Smrg      test -z "$LD" && LD="$ac_prog"
286686dafe34Smrg      ;;
286786dafe34Smrg  "")
286886dafe34Smrg    # If it fails, then pretend we aren't using GCC.
286986dafe34Smrg    ac_prog=ld
28701ae1b5e8Smrg    ;;
28711ae1b5e8Smrg  *)
287286dafe34Smrg    # If it is relative, then search for the first ld in PATH.
287386dafe34Smrg    with_gnu_ld=unknown
28741ae1b5e8Smrg    ;;
28751ae1b5e8Smrg  esac
287686dafe34Smrgelif test "$with_gnu_ld" = yes; then
287786dafe34Smrg  AC_MSG_CHECKING([for GNU ld])
28781ae1b5e8Smrgelse
287986dafe34Smrg  AC_MSG_CHECKING([for non-GNU ld])
28801ae1b5e8Smrgfi
288186dafe34SmrgAC_CACHE_VAL(lt_cv_path_LD,
288286dafe34Smrg[if test -z "$LD"; then
288386dafe34Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
288486dafe34Smrg  for ac_dir in $PATH; do
288586dafe34Smrg    IFS="$lt_save_ifs"
288686dafe34Smrg    test -z "$ac_dir" && ac_dir=.
288786dafe34Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
288886dafe34Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
288986dafe34Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
289086dafe34Smrg      # but apparently some variants of GNU ld only accept -v.
289186dafe34Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
289286dafe34Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
289386dafe34Smrg      *GNU* | *'with BFD'*)
289486dafe34Smrg	test "$with_gnu_ld" != no && break
289586dafe34Smrg	;;
289686dafe34Smrg      *)
289786dafe34Smrg	test "$with_gnu_ld" != yes && break
289886dafe34Smrg	;;
289986dafe34Smrg      esac
290086dafe34Smrg    fi
290186dafe34Smrg  done
290286dafe34Smrg  IFS="$lt_save_ifs"
290386dafe34Smrgelse
290486dafe34Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
290586dafe34Smrgfi])
290686dafe34SmrgLD="$lt_cv_path_LD"
290786dafe34Smrgif test -n "$LD"; then
290886dafe34Smrg  AC_MSG_RESULT($LD)
290986dafe34Smrgelse
291086dafe34Smrg  AC_MSG_RESULT(no)
291186dafe34Smrgfi
291286dafe34Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
291386dafe34Smrg_LT_PATH_LD_GNU
291486dafe34SmrgAC_SUBST([LD])
291576888252Smrg
291686dafe34Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
291786dafe34Smrg])# LT_PATH_LD
291876888252Smrg
291986dafe34Smrg# Old names:
292086dafe34SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
292186dafe34SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
292286dafe34Smrgdnl aclocal-1.4 backwards compatibility:
292386dafe34Smrgdnl AC_DEFUN([AM_PROG_LD], [])
292486dafe34Smrgdnl AC_DEFUN([AC_PROG_LD], [])
292576888252Smrg
292676888252Smrg
292786dafe34Smrg# _LT_PATH_LD_GNU
292886dafe34Smrg#- --------------
292986dafe34Smrgm4_defun([_LT_PATH_LD_GNU],
293086dafe34Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
293186dafe34Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
293286dafe34Smrgcase `$LD -v 2>&1 </dev/null` in
293386dafe34Smrg*GNU* | *'with BFD'*)
293486dafe34Smrg  lt_cv_prog_gnu_ld=yes
293586dafe34Smrg  ;;
293686dafe34Smrg*)
293786dafe34Smrg  lt_cv_prog_gnu_ld=no
293886dafe34Smrg  ;;
293986dafe34Smrgesac])
294086dafe34Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
294186dafe34Smrg])# _LT_PATH_LD_GNU
294276888252Smrg
294376888252Smrg
294486dafe34Smrg# _LT_CMD_RELOAD
294586dafe34Smrg# --------------
294686dafe34Smrg# find reload flag for linker
294786dafe34Smrg#   -- PORTME Some linkers may need a different reload flag.
294886dafe34Smrgm4_defun([_LT_CMD_RELOAD],
294986dafe34Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
295086dafe34Smrg  lt_cv_ld_reload_flag,
295186dafe34Smrg  [lt_cv_ld_reload_flag='-r'])
295286dafe34Smrgreload_flag=$lt_cv_ld_reload_flag
295386dafe34Smrgcase $reload_flag in
295486dafe34Smrg"" | " "*) ;;
295586dafe34Smrg*) reload_flag=" $reload_flag" ;;
295686dafe34Smrgesac
295786dafe34Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
295886dafe34Smrgcase $host_os in
295986dafe34Smrg  darwin*)
296086dafe34Smrg    if test "$GCC" = yes; then
296186dafe34Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
296286dafe34Smrg    else
296386dafe34Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
296486dafe34Smrg    fi
296586dafe34Smrg    ;;
296686dafe34Smrgesac
296786dafe34Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
296886dafe34Smrg_LT_DECL([], [reload_cmds], [2])dnl
296986dafe34Smrg])# _LT_CMD_RELOAD
297076888252Smrg
297176888252Smrg
297286dafe34Smrg# _LT_CHECK_MAGIC_METHOD
29731ae1b5e8Smrg# ----------------------
297486dafe34Smrg# how to check for library dependencies
297586dafe34Smrg#  -- PORTME fill in with the dynamic library characteristics
297686dafe34Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
297786dafe34Smrg[m4_require([_LT_DECL_EGREP])
297886dafe34Smrgm4_require([_LT_DECL_OBJDUMP])
297986dafe34SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
298086dafe34Smrglt_cv_deplibs_check_method,
298186dafe34Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
298286dafe34Smrglt_cv_file_magic_test_file=
298386dafe34Smrglt_cv_deplibs_check_method='unknown'
298486dafe34Smrg# Need to set the preceding variable on all platforms that support
298586dafe34Smrg# interlibrary dependencies.
298686dafe34Smrg# 'none' -- dependencies not supported.
298786dafe34Smrg# `unknown' -- same as none, but documents that we really don't know.
298886dafe34Smrg# 'pass_all' -- all dependencies passed with no checks.
298986dafe34Smrg# 'test_compile' -- check by making test program.
299086dafe34Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
299186dafe34Smrg# which responds to the $file_magic_cmd with a given extended regex.
299286dafe34Smrg# If you have `file' or equivalent on your system and you're not sure
299386dafe34Smrg# whether `pass_all' will *always* work, you probably want this one.
299476888252Smrg
299586dafe34Smrgcase $host_os in
299686dafe34Smrgaix[[4-9]]*)
299786dafe34Smrg  lt_cv_deplibs_check_method=pass_all
299886dafe34Smrg  ;;
299976888252Smrg
300086dafe34Smrgbeos*)
300186dafe34Smrg  lt_cv_deplibs_check_method=pass_all
300286dafe34Smrg  ;;
300376888252Smrg
300486dafe34Smrgbsdi[[45]]*)
300586dafe34Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
300686dafe34Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
300786dafe34Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
300886dafe34Smrg  ;;
300976888252Smrg
301086dafe34Smrgcygwin*)
301186dafe34Smrg  # func_win32_libid is a shell function defined in ltmain.sh
301286dafe34Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
301386dafe34Smrg  lt_cv_file_magic_cmd='func_win32_libid'
301486dafe34Smrg  ;;
301576888252Smrg
301686dafe34Smrgmingw* | pw32*)
301786dafe34Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
301886dafe34Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
301986dafe34Smrg  # unless we find 'file', for example because we are cross-compiling.
302086dafe34Smrg  if ( file / ) >/dev/null 2>&1; then
302186dafe34Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
302286dafe34Smrg    lt_cv_file_magic_cmd='func_win32_libid'
30231ae1b5e8Smrg  else
302486dafe34Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
302586dafe34Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
30261ae1b5e8Smrg  fi
302786dafe34Smrg  ;;
302876888252Smrg
302986dafe34Smrgcegcc)
303086dafe34Smrg  # use the weaker test based on 'objdump'. See mingw*.
303186dafe34Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
303286dafe34Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
303386dafe34Smrg  ;;
303476888252Smrg
303586dafe34Smrgdarwin* | rhapsody*)
303686dafe34Smrg  lt_cv_deplibs_check_method=pass_all
303786dafe34Smrg  ;;
30381ae1b5e8Smrg
303986dafe34Smrgfreebsd* | dragonfly*)
304086dafe34Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
304186dafe34Smrg    case $host_cpu in
304286dafe34Smrg    i*86 )
304386dafe34Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
304486dafe34Smrg      # Let's accept both of them until this is cleared up.
304586dafe34Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
304686dafe34Smrg      lt_cv_file_magic_cmd=/usr/bin/file
304786dafe34Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
304886dafe34Smrg      ;;
304986dafe34Smrg    esac
305086dafe34Smrg  else
305186dafe34Smrg    lt_cv_deplibs_check_method=pass_all
305286dafe34Smrg  fi
305386dafe34Smrg  ;;
30541ae1b5e8Smrg
305586dafe34Smrggnu*)
305686dafe34Smrg  lt_cv_deplibs_check_method=pass_all
305786dafe34Smrg  ;;
305876888252Smrg
305986dafe34Smrghpux10.20* | hpux11*)
306086dafe34Smrg  lt_cv_file_magic_cmd=/usr/bin/file
306186dafe34Smrg  case $host_cpu in
306286dafe34Smrg  ia64*)
306386dafe34Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
306486dafe34Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
306586dafe34Smrg    ;;
306686dafe34Smrg  hppa*64*)
306786dafe34Smrg    [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]']
306886dafe34Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
306986dafe34Smrg    ;;
307086dafe34Smrg  *)
307186dafe34Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
307286dafe34Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
307376888252Smrg    ;;
30741ae1b5e8Smrg  esac
307586dafe34Smrg  ;;
307676888252Smrg
307786dafe34Smrginterix[[3-9]]*)
307886dafe34Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
307986dafe34Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
308086dafe34Smrg  ;;
308176888252Smrg
308286dafe34Smrgirix5* | irix6* | nonstopux*)
308386dafe34Smrg  case $LD in
308486dafe34Smrg  *-32|*"-32 ") libmagic=32-bit;;
308586dafe34Smrg  *-n32|*"-n32 ") libmagic=N32;;
308686dafe34Smrg  *-64|*"-64 ") libmagic=64-bit;;
308786dafe34Smrg  *) libmagic=never-match;;
30881ae1b5e8Smrg  esac
308986dafe34Smrg  lt_cv_deplibs_check_method=pass_all
309086dafe34Smrg  ;;
309176888252Smrg
309286dafe34Smrg# This must be Linux ELF.
309386dafe34Smrglinux* | k*bsd*-gnu)
309486dafe34Smrg  lt_cv_deplibs_check_method=pass_all
309586dafe34Smrg  ;;
309676888252Smrg
309786dafe34Smrgnetbsd*)
309886dafe34Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
309986dafe34Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
310086dafe34Smrg  else
310186dafe34Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
310286dafe34Smrg  fi
310386dafe34Smrg  ;;
310476888252Smrg
310586dafe34Smrgnewos6*)
310686dafe34Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
310786dafe34Smrg  lt_cv_file_magic_cmd=/usr/bin/file
310886dafe34Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
310986dafe34Smrg  ;;
311086dafe34Smrg
311186dafe34Smrg*nto* | *qnx*)
311286dafe34Smrg  lt_cv_deplibs_check_method=pass_all
311386dafe34Smrg  ;;
311486dafe34Smrg
311586dafe34Smrgopenbsd*)
311686dafe34Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
311786dafe34Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
311886dafe34Smrg  else
311986dafe34Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
312086dafe34Smrg  fi
312186dafe34Smrg  ;;
312286dafe34Smrg
312386dafe34Smrgosf3* | osf4* | osf5*)
312486dafe34Smrg  lt_cv_deplibs_check_method=pass_all
312586dafe34Smrg  ;;
312686dafe34Smrg
312786dafe34Smrgrdos*)
312886dafe34Smrg  lt_cv_deplibs_check_method=pass_all
312986dafe34Smrg  ;;
313086dafe34Smrg
313186dafe34Smrgsolaris*)
313286dafe34Smrg  lt_cv_deplibs_check_method=pass_all
313386dafe34Smrg  ;;
313486dafe34Smrg
313586dafe34Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
313686dafe34Smrg  lt_cv_deplibs_check_method=pass_all
313786dafe34Smrg  ;;
313886dafe34Smrg
313986dafe34Smrgsysv4 | sysv4.3*)
314086dafe34Smrg  case $host_vendor in
314186dafe34Smrg  motorola)
314286dafe34Smrg    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]]'
314386dafe34Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
314486dafe34Smrg    ;;
314586dafe34Smrg  ncr)
314686dafe34Smrg    lt_cv_deplibs_check_method=pass_all
314786dafe34Smrg    ;;
314886dafe34Smrg  sequent)
314986dafe34Smrg    lt_cv_file_magic_cmd='/bin/file'
315086dafe34Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
315186dafe34Smrg    ;;
315286dafe34Smrg  sni)
315386dafe34Smrg    lt_cv_file_magic_cmd='/bin/file'
315486dafe34Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
315586dafe34Smrg    lt_cv_file_magic_test_file=/lib/libc.so
315686dafe34Smrg    ;;
315786dafe34Smrg  siemens)
315886dafe34Smrg    lt_cv_deplibs_check_method=pass_all
315986dafe34Smrg    ;;
316086dafe34Smrg  pc)
316186dafe34Smrg    lt_cv_deplibs_check_method=pass_all
316286dafe34Smrg    ;;
316386dafe34Smrg  esac
316486dafe34Smrg  ;;
316586dafe34Smrg
316686dafe34Smrgtpf*)
316786dafe34Smrg  lt_cv_deplibs_check_method=pass_all
316886dafe34Smrg  ;;
316986dafe34Smrgesac
31701ae1b5e8Smrg])
317186dafe34Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
317286dafe34Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
317386dafe34Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
317476888252Smrg
317586dafe34Smrg_LT_DECL([], [deplibs_check_method], [1],
317686dafe34Smrg    [Method to check whether dependent libraries are shared objects])
317786dafe34Smrg_LT_DECL([], [file_magic_cmd], [1],
317886dafe34Smrg    [Command to use when deplibs_check_method == "file_magic"])
317986dafe34Smrg])# _LT_CHECK_MAGIC_METHOD
318076888252Smrg
318176888252Smrg
318286dafe34Smrg# LT_PATH_NM
318386dafe34Smrg# ----------
318486dafe34Smrg# find the pathname to a BSD- or MS-compatible name lister
318586dafe34SmrgAC_DEFUN([LT_PATH_NM],
318686dafe34Smrg[AC_REQUIRE([AC_PROG_CC])dnl
318786dafe34SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
318886dafe34Smrg[if test -n "$NM"; then
318986dafe34Smrg  # Let the user override the test.
319086dafe34Smrg  lt_cv_path_NM="$NM"
319186dafe34Smrgelse
319286dafe34Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
319386dafe34Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
319486dafe34Smrg    lt_nm_to_check="$lt_nm_to_check nm"
31951ae1b5e8Smrg  fi
319686dafe34Smrg  for lt_tmp_nm in $lt_nm_to_check; do
319786dafe34Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
319886dafe34Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
319986dafe34Smrg      IFS="$lt_save_ifs"
320086dafe34Smrg      test -z "$ac_dir" && ac_dir=.
320186dafe34Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
320286dafe34Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
320386dafe34Smrg	# Check to see if the nm accepts a BSD-compat flag.
320486dafe34Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
320586dafe34Smrg	#   nm: unknown option "B" ignored
320686dafe34Smrg	# Tru64's nm complains that /dev/null is an invalid object file
320786dafe34Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
320886dafe34Smrg	*/dev/null* | *'Invalid file or object type'*)
320986dafe34Smrg	  lt_cv_path_NM="$tmp_nm -B"
321086dafe34Smrg	  break
321186dafe34Smrg	  ;;
321286dafe34Smrg	*)
321386dafe34Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
321486dafe34Smrg	  */dev/null*)
321586dafe34Smrg	    lt_cv_path_NM="$tmp_nm -p"
321686dafe34Smrg	    break
321786dafe34Smrg	    ;;
321886dafe34Smrg	  *)
321986dafe34Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
322086dafe34Smrg	    continue # so that we can try to find one that supports BSD flags
322186dafe34Smrg	    ;;
322286dafe34Smrg	  esac
322386dafe34Smrg	  ;;
322486dafe34Smrg	esac
322586dafe34Smrg      fi
322686dafe34Smrg    done
322786dafe34Smrg    IFS="$lt_save_ifs"
322886dafe34Smrg  done
322986dafe34Smrg  : ${lt_cv_path_NM=no}
323086dafe34Smrgfi])
323186dafe34Smrgif test "$lt_cv_path_NM" != "no"; then
323286dafe34Smrg  NM="$lt_cv_path_NM"
32331ae1b5e8Smrgelse
323486dafe34Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
323586dafe34Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
323686dafe34Smrg  AC_SUBST([DUMPBIN])
323786dafe34Smrg  if test "$DUMPBIN" != ":"; then
323886dafe34Smrg    NM="$DUMPBIN"
323986dafe34Smrg  fi
32401ae1b5e8Smrgfi
324186dafe34Smrgtest -z "$NM" && NM=nm
324286dafe34SmrgAC_SUBST([NM])
324386dafe34Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
324486dafe34Smrg
324586dafe34SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
324686dafe34Smrg  [lt_cv_nm_interface="BSD nm"
324786dafe34Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
324886dafe34Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
324986dafe34Smrg  (eval "$ac_compile" 2>conftest.err)
325086dafe34Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
325186dafe34Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
325286dafe34Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
325386dafe34Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
325486dafe34Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
325586dafe34Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
325686dafe34Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
325786dafe34Smrg    lt_cv_nm_interface="MS dumpbin"
325886dafe34Smrg  fi
325986dafe34Smrg  rm -f conftest*])
326086dafe34Smrg])# LT_PATH_NM
326176888252Smrg
326286dafe34Smrg# Old names:
326386dafe34SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
326486dafe34SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
326586dafe34Smrgdnl aclocal-1.4 backwards compatibility:
326686dafe34Smrgdnl AC_DEFUN([AM_PROG_NM], [])
326786dafe34Smrgdnl AC_DEFUN([AC_PROG_NM], [])
326876888252Smrg
326976888252Smrg
327086dafe34Smrg# LT_LIB_M
327186dafe34Smrg# --------
327286dafe34Smrg# check for math library
327386dafe34SmrgAC_DEFUN([LT_LIB_M],
327486dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
327586dafe34SmrgLIBM=
327686dafe34Smrgcase $host in
327786dafe34Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
327886dafe34Smrg  # These system don't have libm, or don't need it
327986dafe34Smrg  ;;
328086dafe34Smrg*-ncr-sysv4.3*)
328186dafe34Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
328286dafe34Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
328386dafe34Smrg  ;;
328486dafe34Smrg*)
328586dafe34Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
328686dafe34Smrg  ;;
328786dafe34Smrgesac
328886dafe34SmrgAC_SUBST([LIBM])
328986dafe34Smrg])# LT_LIB_M
329086dafe34Smrg
329186dafe34Smrg# Old name:
329286dafe34SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
329386dafe34Smrgdnl aclocal-1.4 backwards compatibility:
329486dafe34Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
329576888252Smrg
329676888252Smrg
329786dafe34Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
329886dafe34Smrg# -------------------------------
329986dafe34Smrgm4_defun([_LT_COMPILER_NO_RTTI],
330086dafe34Smrg[m4_require([_LT_TAG_COMPILER])dnl
330176888252Smrg
330286dafe34Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
330386dafe34Smrg
330486dafe34Smrgif test "$GCC" = yes; then
330586dafe34Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
330686dafe34Smrg
330786dafe34Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
330886dafe34Smrg    lt_cv_prog_compiler_rtti_exceptions,
330986dafe34Smrg    [-fno-rtti -fno-exceptions], [],
331086dafe34Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
33111ae1b5e8Smrgfi
331286dafe34Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
331386dafe34Smrg	[Compiler flag to turn off builtin functions])
331486dafe34Smrg])# _LT_COMPILER_NO_RTTI
33151ae1b5e8Smrg
33161ae1b5e8Smrg
331786dafe34Smrg# _LT_CMD_GLOBAL_SYMBOLS
331886dafe34Smrg# ----------------------
331986dafe34Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
332086dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
332186dafe34SmrgAC_REQUIRE([AC_PROG_CC])dnl
332286dafe34SmrgAC_REQUIRE([LT_PATH_NM])dnl
332386dafe34SmrgAC_REQUIRE([LT_PATH_LD])dnl
332486dafe34Smrgm4_require([_LT_DECL_SED])dnl
332586dafe34Smrgm4_require([_LT_DECL_EGREP])dnl
332686dafe34Smrgm4_require([_LT_TAG_COMPILER])dnl
332776888252Smrg
332886dafe34Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
332986dafe34SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
333086dafe34SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
333186dafe34Smrg[
333286dafe34Smrg# These are sane defaults that work on at least a few old systems.
333386dafe34Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
333476888252Smrg
333586dafe34Smrg# Character class describing NM global symbol codes.
333686dafe34Smrgsymcode='[[BCDEGRST]]'
333776888252Smrg
333886dafe34Smrg# Regexp to match symbols that can be accessed directly from C.
333986dafe34Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
334076888252Smrg
334186dafe34Smrg# Define system-specific variables.
33421ae1b5e8Smrgcase $host_os in
334386dafe34Smrgaix*)
334486dafe34Smrg  symcode='[[BCDT]]'
33451ae1b5e8Smrg  ;;
334686dafe34Smrgcygwin* | mingw* | pw32* | cegcc*)
334786dafe34Smrg  symcode='[[ABCDGISTW]]'
334886dafe34Smrg  ;;
334986dafe34Smrghpux*)
33501ae1b5e8Smrg  if test "$host_cpu" = ia64; then
335186dafe34Smrg    symcode='[[ABCDEGRST]]'
33521ae1b5e8Smrg  fi
33531ae1b5e8Smrg  ;;
335486dafe34Smrgirix* | nonstopux*)
335586dafe34Smrg  symcode='[[BCDEGRST]]'
33561ae1b5e8Smrg  ;;
335786dafe34Smrgosf*)
335886dafe34Smrg  symcode='[[BCDEGQRST]]'
33591ae1b5e8Smrg  ;;
336086dafe34Smrgsolaris*)
336186dafe34Smrg  symcode='[[BDRT]]'
336286dafe34Smrg  ;;
336386dafe34Smrgsco3.2v5*)
336486dafe34Smrg  symcode='[[DT]]'
336586dafe34Smrg  ;;
336686dafe34Smrgsysv4.2uw2*)
336786dafe34Smrg  symcode='[[DT]]'
336886dafe34Smrg  ;;
336986dafe34Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
337086dafe34Smrg  symcode='[[ABDT]]'
33711ae1b5e8Smrg  ;;
337286dafe34Smrgsysv4)
337386dafe34Smrg  symcode='[[DFNSTU]]'
337486dafe34Smrg  ;;
337586dafe34Smrgesac
337676888252Smrg
337786dafe34Smrg# If we're using GNU nm, then use its standard symbol codes.
337886dafe34Smrgcase `$NM -V 2>&1` in
337986dafe34Smrg*GNU* | *'with BFD'*)
338086dafe34Smrg  symcode='[[ABCDGIRSTW]]' ;;
338186dafe34Smrgesac
338276888252Smrg
338386dafe34Smrg# Transform an extracted symbol line into a proper C declaration.
338486dafe34Smrg# Some systems (esp. on ia64) link data and code symbols differently,
338586dafe34Smrg# so use this general approach.
338686dafe34Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
338776888252Smrg
338886dafe34Smrg# Transform an extracted symbol line into symbol name and symbol address
338986dafe34Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
339086dafe34Smrglt_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'"
339176888252Smrg
339286dafe34Smrg# Handle CRLF in mingw tool chain
339386dafe34Smrgopt_cr=
339486dafe34Smrgcase $build_os in
339586dafe34Smrgmingw*)
339686dafe34Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
33971ae1b5e8Smrg  ;;
339886dafe34Smrgesac
339976888252Smrg
340086dafe34Smrg# Try without a prefix underscore, then with it.
340186dafe34Smrgfor ac_symprfx in "" "_"; do
340286dafe34Smrg
340386dafe34Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
340486dafe34Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
340586dafe34Smrg
340686dafe34Smrg  # Write the raw and C identifiers.
340786dafe34Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
340886dafe34Smrg    # Fake it for dumpbin and say T for any non-static function
340986dafe34Smrg    # and D for any global variable.
341086dafe34Smrg    # Also find C++ and __fastcall symbols from MSVC++,
341186dafe34Smrg    # which start with @ or ?.
341286dafe34Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
341386dafe34Smrg"     {last_section=section; section=\$ 3};"\
341486dafe34Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
341586dafe34Smrg"     \$ 0!~/External *\|/{next};"\
341686dafe34Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
341786dafe34Smrg"     {if(hide[section]) next};"\
341886dafe34Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
341986dafe34Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
342086dafe34Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
342186dafe34Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
342286dafe34Smrg"     ' prfx=^$ac_symprfx]"
34231ae1b5e8Smrg  else
342486dafe34Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
34251ae1b5e8Smrg  fi
342676888252Smrg
342786dafe34Smrg  # Check to see that the pipe works correctly.
342886dafe34Smrg  pipe_works=no
342976888252Smrg
343086dafe34Smrg  rm -f conftest*
343186dafe34Smrg  cat > conftest.$ac_ext <<_LT_EOF
343286dafe34Smrg#ifdef __cplusplus
343386dafe34Smrgextern "C" {
343486dafe34Smrg#endif
343586dafe34Smrgchar nm_test_var;
343686dafe34Smrgvoid nm_test_func(void);
343786dafe34Smrgvoid nm_test_func(void){}
343886dafe34Smrg#ifdef __cplusplus
343986dafe34Smrg}
344086dafe34Smrg#endif
344186dafe34Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
344286dafe34Smrg_LT_EOF
344376888252Smrg
344486dafe34Smrg  if AC_TRY_EVAL(ac_compile); then
344586dafe34Smrg    # Now try to grab the symbols.
344686dafe34Smrg    nlist=conftest.nm
344786dafe34Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
344886dafe34Smrg      # Try sorting and uniquifying the output.
344986dafe34Smrg      if sort "$nlist" | uniq > "$nlist"T; then
345086dafe34Smrg	mv -f "$nlist"T "$nlist"
345186dafe34Smrg      else
345286dafe34Smrg	rm -f "$nlist"T
345386dafe34Smrg      fi
34541ae1b5e8Smrg
345586dafe34Smrg      # Make sure that we snagged all the symbols we need.
345686dafe34Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
345786dafe34Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
345886dafe34Smrg	  cat <<_LT_EOF > conftest.$ac_ext
345986dafe34Smrg#ifdef __cplusplus
346086dafe34Smrgextern "C" {
346186dafe34Smrg#endif
346276888252Smrg
346386dafe34Smrg_LT_EOF
346486dafe34Smrg	  # Now generate the symbol file.
346586dafe34Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
346676888252Smrg
346786dafe34Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
346876888252Smrg
346986dafe34Smrg/* The mapping between symbol names and symbols.  */
347086dafe34Smrgconst struct {
347186dafe34Smrg  const char *name;
347286dafe34Smrg  void       *address;
347386dafe34Smrg}
347486dafe34Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
347586dafe34Smrg{
347686dafe34Smrg  { "@PROGRAM@", (void *) 0 },
347786dafe34Smrg_LT_EOF
347886dafe34Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
347986dafe34Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
348086dafe34Smrg  {0, (void *) 0}
348186dafe34Smrg};
348276888252Smrg
348386dafe34Smrg/* This works around a problem in FreeBSD linker */
348486dafe34Smrg#ifdef FREEBSD_WORKAROUND
348586dafe34Smrgstatic const void *lt_preloaded_setup() {
348686dafe34Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
348786dafe34Smrg}
348886dafe34Smrg#endif
348976888252Smrg
349086dafe34Smrg#ifdef __cplusplus
349186dafe34Smrg}
349286dafe34Smrg#endif
349386dafe34Smrg_LT_EOF
349486dafe34Smrg	  # Now try linking the two files.
349586dafe34Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
349686dafe34Smrg	  lt_save_LIBS="$LIBS"
349786dafe34Smrg	  lt_save_CFLAGS="$CFLAGS"
349886dafe34Smrg	  LIBS="conftstm.$ac_objext"
349986dafe34Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
350086dafe34Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
350186dafe34Smrg	    pipe_works=yes
350286dafe34Smrg	  fi
350386dafe34Smrg	  LIBS="$lt_save_LIBS"
350486dafe34Smrg	  CFLAGS="$lt_save_CFLAGS"
350586dafe34Smrg	else
350686dafe34Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
350786dafe34Smrg	fi
350886dafe34Smrg      else
350986dafe34Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
351086dafe34Smrg      fi
351186dafe34Smrg    else
351286dafe34Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
351386dafe34Smrg    fi
351486dafe34Smrg  else
351586dafe34Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
351686dafe34Smrg    cat conftest.$ac_ext >&5
35171ae1b5e8Smrg  fi
351886dafe34Smrg  rm -rf conftest* conftst*
351976888252Smrg
352086dafe34Smrg  # Do not use the global_symbol_pipe unless it works.
352186dafe34Smrg  if test "$pipe_works" = yes; then
352286dafe34Smrg    break
35231ae1b5e8Smrg  else
352486dafe34Smrg    lt_cv_sys_global_symbol_pipe=
35251ae1b5e8Smrg  fi
352686dafe34Smrgdone
352786dafe34Smrg])
352886dafe34Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
352986dafe34Smrg  lt_cv_sys_global_symbol_to_cdecl=
353086dafe34Smrgfi
353186dafe34Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
353286dafe34Smrg  AC_MSG_RESULT(failed)
353386dafe34Smrgelse
353486dafe34Smrg  AC_MSG_RESULT(ok)
353586dafe34Smrgfi
353676888252Smrg
353786dafe34Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
353886dafe34Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
353986dafe34Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
354086dafe34Smrg    [Transform the output of nm in a proper C declaration])
354186dafe34Smrg_LT_DECL([global_symbol_to_c_name_address],
354286dafe34Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
354386dafe34Smrg    [Transform the output of nm in a C name address pair])
354486dafe34Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
354586dafe34Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
354686dafe34Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
354786dafe34Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
354876888252Smrg
354976888252Smrg
355086dafe34Smrg# _LT_COMPILER_PIC([TAGNAME])
355186dafe34Smrg# ---------------------------
355286dafe34Smrgm4_defun([_LT_COMPILER_PIC],
355386dafe34Smrg[m4_require([_LT_TAG_COMPILER])dnl
355486dafe34Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
355586dafe34Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
355686dafe34Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
355776888252Smrg
355886dafe34SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
355986dafe34Smrgm4_if([$1], [CXX], [
356086dafe34Smrg  # C++ specific cases for pic, static, wl, etc.
356186dafe34Smrg  if test "$GXX" = yes; then
356286dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
356386dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
356476888252Smrg
356586dafe34Smrg    case $host_os in
356686dafe34Smrg    aix*)
356786dafe34Smrg      # All AIX code is PIC.
356886dafe34Smrg      if test "$host_cpu" = ia64; then
356986dafe34Smrg	# AIX 5 now supports IA64 processor
357086dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
357186dafe34Smrg      fi
357286dafe34Smrg      ;;
357376888252Smrg
357486dafe34Smrg    amigaos*)
357586dafe34Smrg      case $host_cpu in
357686dafe34Smrg      powerpc)
357786dafe34Smrg            # see comment about AmigaOS4 .so support
357886dafe34Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
357986dafe34Smrg        ;;
358086dafe34Smrg      m68k)
358186dafe34Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
358286dafe34Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
358386dafe34Smrg            # like `-m68040'.
358486dafe34Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
358586dafe34Smrg        ;;
358686dafe34Smrg      esac
358786dafe34Smrg      ;;
358876888252Smrg
358986dafe34Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
359086dafe34Smrg      # PIC is the default for these OSes.
35911ae1b5e8Smrg      ;;
359286dafe34Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
359386dafe34Smrg      # This hack is so that the source file can tell whether it is being
359486dafe34Smrg      # built for inclusion in a dll (and should export symbols for example).
359586dafe34Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
359686dafe34Smrg      # (--disable-auto-import) libraries
359786dafe34Smrg      m4_if([$1], [GCJ], [],
359886dafe34Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
35991ae1b5e8Smrg      ;;
360086dafe34Smrg    darwin* | rhapsody*)
360186dafe34Smrg      # PIC is the default on this platform
360286dafe34Smrg      # Common symbols not allowed in MH_DYLIB files
360386dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
36041ae1b5e8Smrg      ;;
360586dafe34Smrg    *djgpp*)
360686dafe34Smrg      # DJGPP does not support shared libraries at all
360786dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
360886dafe34Smrg      ;;
360986dafe34Smrg    interix[[3-9]]*)
361086dafe34Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
361186dafe34Smrg      # Instead, we relocate shared libraries at runtime.
361286dafe34Smrg      ;;
361386dafe34Smrg    sysv4*MP*)
361486dafe34Smrg      if test -d /usr/nec; then
361586dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
361686dafe34Smrg      fi
361786dafe34Smrg      ;;
361886dafe34Smrg    hpux*)
361986dafe34Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
362086dafe34Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
362186dafe34Smrg      # sets the default TLS model and affects inlining.
362286dafe34Smrg      case $host_cpu in
362386dafe34Smrg      hppa*64*)
36241ae1b5e8Smrg	;;
362586dafe34Smrg      *)
362686dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36271ae1b5e8Smrg	;;
362886dafe34Smrg      esac
362986dafe34Smrg      ;;
363086dafe34Smrg    *qnx* | *nto*)
363186dafe34Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
363286dafe34Smrg      # it will coredump.
363386dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
363486dafe34Smrg      ;;
363586dafe34Smrg    *)
363686dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
363786dafe34Smrg      ;;
36381ae1b5e8Smrg    esac
363986dafe34Smrg  else
364086dafe34Smrg    case $host_os in
364186dafe34Smrg      aix[[4-9]]*)
364286dafe34Smrg	# All AIX code is PIC.
364386dafe34Smrg	if test "$host_cpu" = ia64; then
364486dafe34Smrg	  # AIX 5 now supports IA64 processor
364586dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
36461ae1b5e8Smrg	else
364786dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
36481ae1b5e8Smrg	fi
36491ae1b5e8Smrg	;;
365086dafe34Smrg      chorus*)
365186dafe34Smrg	case $cc_basename in
365286dafe34Smrg	cxch68*)
365386dafe34Smrg	  # Green Hills C++ Compiler
365486dafe34Smrg	  # _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"
365586dafe34Smrg	  ;;
365686dafe34Smrg	esac
36571ae1b5e8Smrg	;;
365886dafe34Smrg      dgux*)
365986dafe34Smrg	case $cc_basename in
366086dafe34Smrg	  ec++*)
366186dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
366286dafe34Smrg	    ;;
366386dafe34Smrg	  ghcx*)
366486dafe34Smrg	    # Green Hills C++ Compiler
366586dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
366686dafe34Smrg	    ;;
366786dafe34Smrg	  *)
366886dafe34Smrg	    ;;
366986dafe34Smrg	esac
36701ae1b5e8Smrg	;;
367186dafe34Smrg      freebsd* | dragonfly*)
367286dafe34Smrg	# FreeBSD uses GNU C++
36731ae1b5e8Smrg	;;
367486dafe34Smrg      hpux9* | hpux10* | hpux11*)
367586dafe34Smrg	case $cc_basename in
367686dafe34Smrg	  CC*)
367786dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
367886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
367986dafe34Smrg	    if test "$host_cpu" != ia64; then
368086dafe34Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
368186dafe34Smrg	    fi
368286dafe34Smrg	    ;;
368386dafe34Smrg	  aCC*)
368486dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
368586dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
368686dafe34Smrg	    case $host_cpu in
368786dafe34Smrg	    hppa*64*|ia64*)
368886dafe34Smrg	      # +Z the default
368986dafe34Smrg	      ;;
369086dafe34Smrg	    *)
369186dafe34Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
369286dafe34Smrg	      ;;
369386dafe34Smrg	    esac
369486dafe34Smrg	    ;;
369586dafe34Smrg	  *)
369686dafe34Smrg	    ;;
369786dafe34Smrg	esac
36981ae1b5e8Smrg	;;
369986dafe34Smrg      interix*)
370086dafe34Smrg	# This is c89, which is MS Visual C++ (no shared libs)
370186dafe34Smrg	# Anyone wants to do a port?
370286dafe34Smrg	;;
370386dafe34Smrg      irix5* | irix6* | nonstopux*)
370486dafe34Smrg	case $cc_basename in
370586dafe34Smrg	  CC*)
370686dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
370786dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
370886dafe34Smrg	    # CC pic flag -KPIC is the default.
370986dafe34Smrg	    ;;
371086dafe34Smrg	  *)
371186dafe34Smrg	    ;;
371286dafe34Smrg	esac
371386dafe34Smrg	;;
371486dafe34Smrg      linux* | k*bsd*-gnu)
371586dafe34Smrg	case $cc_basename in
371686dafe34Smrg	  KCC*)
371786dafe34Smrg	    # KAI C++ Compiler
371886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
371986dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
372086dafe34Smrg	    ;;
372186dafe34Smrg	  ecpc* )
372286dafe34Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
372386dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
372486dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
372586dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
372686dafe34Smrg	    ;;
372786dafe34Smrg	  icpc* )
372886dafe34Smrg	    # Intel C++, used to be incompatible with GCC.
372986dafe34Smrg	    # ICC 10 doesn't accept -KPIC any more.
373086dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
373186dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
373286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
373386dafe34Smrg	    ;;
373486dafe34Smrg	  pgCC* | pgcpp*)
373586dafe34Smrg	    # Portland Group C++ compiler
373686dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
373786dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
373886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
373986dafe34Smrg	    ;;
374086dafe34Smrg	  cxx*)
374186dafe34Smrg	    # Compaq C++
374286dafe34Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
374386dafe34Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
374486dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
374586dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
374686dafe34Smrg	    ;;
374786dafe34Smrg	  xlc* | xlC*)
374886dafe34Smrg	    # IBM XL 8.0 on PPC
374986dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
375086dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
375186dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
375286dafe34Smrg	    ;;
375386dafe34Smrg	  *)
375486dafe34Smrg	    case `$CC -V 2>&1 | sed 5q` in
375586dafe34Smrg	    *Sun\ C*)
375686dafe34Smrg	      # Sun C++ 5.9
375786dafe34Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
375886dafe34Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
375986dafe34Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
376086dafe34Smrg	      ;;
376186dafe34Smrg	    esac
376286dafe34Smrg	    ;;
376386dafe34Smrg	esac
376486dafe34Smrg	;;
376586dafe34Smrg      lynxos*)
376686dafe34Smrg	;;
376786dafe34Smrg      m88k*)
376886dafe34Smrg	;;
376986dafe34Smrg      mvs*)
377086dafe34Smrg	case $cc_basename in
377186dafe34Smrg	  cxx*)
377286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
377386dafe34Smrg	    ;;
377486dafe34Smrg	  *)
377586dafe34Smrg	    ;;
377686dafe34Smrg	esac
377786dafe34Smrg	;;
377886dafe34Smrg      netbsd*)
377986dafe34Smrg	;;
378086dafe34Smrg      *qnx* | *nto*)
378186dafe34Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
378286dafe34Smrg        # it will coredump.
378386dafe34Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
378486dafe34Smrg        ;;
378586dafe34Smrg      osf3* | osf4* | osf5*)
378686dafe34Smrg	case $cc_basename in
378786dafe34Smrg	  KCC*)
378886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
378986dafe34Smrg	    ;;
379086dafe34Smrg	  RCC*)
379186dafe34Smrg	    # Rational C++ 2.4.1
379286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
379386dafe34Smrg	    ;;
379486dafe34Smrg	  cxx*)
379586dafe34Smrg	    # Digital/Compaq C++
379686dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
379786dafe34Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
379886dafe34Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
379986dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
380086dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
380186dafe34Smrg	    ;;
380286dafe34Smrg	  *)
380386dafe34Smrg	    ;;
380486dafe34Smrg	esac
380586dafe34Smrg	;;
380686dafe34Smrg      psos*)
380786dafe34Smrg	;;
380886dafe34Smrg      solaris*)
380986dafe34Smrg	case $cc_basename in
381086dafe34Smrg	  CC*)
381186dafe34Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
381286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
381386dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
381486dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
381586dafe34Smrg	    ;;
381686dafe34Smrg	  gcx*)
381786dafe34Smrg	    # Green Hills C++ Compiler
381886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
381986dafe34Smrg	    ;;
382086dafe34Smrg	  *)
382186dafe34Smrg	    ;;
382286dafe34Smrg	esac
382386dafe34Smrg	;;
382486dafe34Smrg      sunos4*)
382586dafe34Smrg	case $cc_basename in
382686dafe34Smrg	  CC*)
382786dafe34Smrg	    # Sun C++ 4.x
382886dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
382986dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
383086dafe34Smrg	    ;;
383186dafe34Smrg	  lcc*)
383286dafe34Smrg	    # Lucid
383386dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
383486dafe34Smrg	    ;;
383586dafe34Smrg	  *)
383686dafe34Smrg	    ;;
383786dafe34Smrg	esac
383886dafe34Smrg	;;
383986dafe34Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
384086dafe34Smrg	case $cc_basename in
384186dafe34Smrg	  CC*)
384286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
384386dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
384486dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
384586dafe34Smrg	    ;;
384686dafe34Smrg	esac
384786dafe34Smrg	;;
384886dafe34Smrg      tandem*)
384986dafe34Smrg	case $cc_basename in
385086dafe34Smrg	  NCC*)
385186dafe34Smrg	    # NonStop-UX NCC 3.20
385286dafe34Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
385386dafe34Smrg	    ;;
385486dafe34Smrg	  *)
385586dafe34Smrg	    ;;
385686dafe34Smrg	esac
385786dafe34Smrg	;;
385886dafe34Smrg      vxworks*)
385986dafe34Smrg	;;
386086dafe34Smrg      *)
386186dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
386286dafe34Smrg	;;
386386dafe34Smrg    esac
386486dafe34Smrg  fi
386586dafe34Smrg],
386686dafe34Smrg[
386786dafe34Smrg  if test "$GCC" = yes; then
386886dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
386986dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
387076888252Smrg
387186dafe34Smrg    case $host_os in
387286dafe34Smrg      aix*)
387386dafe34Smrg      # All AIX code is PIC.
387486dafe34Smrg      if test "$host_cpu" = ia64; then
387586dafe34Smrg	# AIX 5 now supports IA64 processor
387686dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
387786dafe34Smrg      fi
38781ae1b5e8Smrg      ;;
387976888252Smrg
388086dafe34Smrg    amigaos*)
388186dafe34Smrg      case $host_cpu in
388286dafe34Smrg      powerpc)
388386dafe34Smrg            # see comment about AmigaOS4 .so support
388486dafe34Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
388586dafe34Smrg        ;;
388686dafe34Smrg      m68k)
388786dafe34Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
388886dafe34Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
388986dafe34Smrg            # like `-m68040'.
389086dafe34Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
389186dafe34Smrg        ;;
389286dafe34Smrg      esac
389386dafe34Smrg      ;;
389476888252Smrg
389586dafe34Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
389686dafe34Smrg      # PIC is the default for these OSes.
389786dafe34Smrg      ;;
389876888252Smrg
389986dafe34Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
390086dafe34Smrg      # This hack is so that the source file can tell whether it is being
390186dafe34Smrg      # built for inclusion in a dll (and should export symbols for example).
390286dafe34Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
390386dafe34Smrg      # (--disable-auto-import) libraries
390486dafe34Smrg      m4_if([$1], [GCJ], [],
390586dafe34Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
390686dafe34Smrg      ;;
390776888252Smrg
390886dafe34Smrg    darwin* | rhapsody*)
390986dafe34Smrg      # PIC is the default on this platform
391086dafe34Smrg      # Common symbols not allowed in MH_DYLIB files
391186dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
39121ae1b5e8Smrg      ;;
391376888252Smrg
391486dafe34Smrg    hpux*)
391586dafe34Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
391686dafe34Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
391786dafe34Smrg      # sets the default TLS model and affects inlining.
391886dafe34Smrg      case $host_cpu in
391986dafe34Smrg      hppa*64*)
392086dafe34Smrg	# +Z the default
392186dafe34Smrg	;;
392286dafe34Smrg      *)
392386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
392486dafe34Smrg	;;
392586dafe34Smrg      esac
392686dafe34Smrg      ;;
392776888252Smrg
392886dafe34Smrg    interix[[3-9]]*)
392986dafe34Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
393086dafe34Smrg      # Instead, we relocate shared libraries at runtime.
393186dafe34Smrg      ;;
393276888252Smrg
393386dafe34Smrg    msdosdjgpp*)
393486dafe34Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
393586dafe34Smrg      # on systems that don't support them.
393686dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
393786dafe34Smrg      enable_shared=no
393886dafe34Smrg      ;;
393976888252Smrg
394086dafe34Smrg    *nto* | *qnx*)
394186dafe34Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
394286dafe34Smrg      # it will coredump.
394386dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
39441ae1b5e8Smrg      ;;
394576888252Smrg
394686dafe34Smrg    sysv4*MP*)
394786dafe34Smrg      if test -d /usr/nec; then
394886dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
394986dafe34Smrg      fi
395086dafe34Smrg      ;;
395176888252Smrg
395286dafe34Smrg    *)
395386dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
395486dafe34Smrg      ;;
395586dafe34Smrg    esac
395686dafe34Smrg  else
395786dafe34Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
395886dafe34Smrg    case $host_os in
395986dafe34Smrg    aix*)
396086dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
396186dafe34Smrg      if test "$host_cpu" = ia64; then
396286dafe34Smrg	# AIX 5 now supports IA64 processor
396386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
396486dafe34Smrg      else
396586dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
396686dafe34Smrg      fi
396786dafe34Smrg      ;;
396876888252Smrg
396986dafe34Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
397086dafe34Smrg      # This hack is so that the source file can tell whether it is being
397186dafe34Smrg      # built for inclusion in a dll (and should export symbols for example).
397286dafe34Smrg      m4_if([$1], [GCJ], [],
397386dafe34Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
397486dafe34Smrg      ;;
397576888252Smrg
397686dafe34Smrg    hpux9* | hpux10* | hpux11*)
397786dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
397886dafe34Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
397986dafe34Smrg      # not for PA HP-UX.
398086dafe34Smrg      case $host_cpu in
398186dafe34Smrg      hppa*64*|ia64*)
398286dafe34Smrg	# +Z the default
398386dafe34Smrg	;;
398486dafe34Smrg      *)
398586dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
398686dafe34Smrg	;;
398786dafe34Smrg      esac
398886dafe34Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
398986dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
399086dafe34Smrg      ;;
399176888252Smrg
399286dafe34Smrg    irix5* | irix6* | nonstopux*)
399386dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
399486dafe34Smrg      # PIC (with -KPIC) is the default.
399586dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
399686dafe34Smrg      ;;
399776888252Smrg
399886dafe34Smrg    linux* | k*bsd*-gnu)
399986dafe34Smrg      case $cc_basename in
400086dafe34Smrg      # old Intel for x86_64 which still supported -KPIC.
400186dafe34Smrg      ecc*)
400286dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
400386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
400486dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
400586dafe34Smrg        ;;
400686dafe34Smrg      # icc used to be incompatible with GCC.
400786dafe34Smrg      # ICC 10 doesn't accept -KPIC any more.
400886dafe34Smrg      icc* | ifort*)
400986dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
401086dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
401186dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
401286dafe34Smrg        ;;
401386dafe34Smrg      # Lahey Fortran 8.1.
401486dafe34Smrg      lf95*)
401586dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
401686dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
401786dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
401886dafe34Smrg	;;
401986dafe34Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
402086dafe34Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
402186dafe34Smrg	# which looks to be a dead project)
402286dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
402486dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
402586dafe34Smrg        ;;
402686dafe34Smrg      ccc*)
402786dafe34Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402886dafe34Smrg        # All Alpha code is PIC.
402986dafe34Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
403086dafe34Smrg        ;;
403186dafe34Smrg      xl*)
403286dafe34Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
403386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
403486dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
403586dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
403686dafe34Smrg	;;
403786dafe34Smrg      *)
403886dafe34Smrg	case `$CC -V 2>&1 | sed 5q` in
403986dafe34Smrg	*Sun\ C*)
404086dafe34Smrg	  # Sun C 5.9
404186dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
404286dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404386dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
404486dafe34Smrg	  ;;
404586dafe34Smrg	*Sun\ F*)
404686dafe34Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
404786dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
404886dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404986dafe34Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
405086dafe34Smrg	  ;;
40511ae1b5e8Smrg	esac
405286dafe34Smrg	;;
405386dafe34Smrg      esac
405486dafe34Smrg      ;;
405576888252Smrg
405686dafe34Smrg    newsos6)
405786dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
405886dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
405986dafe34Smrg      ;;
406076888252Smrg
406186dafe34Smrg    *nto* | *qnx*)
406286dafe34Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
406386dafe34Smrg      # it will coredump.
406486dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
406586dafe34Smrg      ;;
406676888252Smrg
406786dafe34Smrg    osf3* | osf4* | osf5*)
406886dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
406986dafe34Smrg      # All OSF/1 code is PIC.
407086dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
407186dafe34Smrg      ;;
407276888252Smrg
407386dafe34Smrg    rdos*)
407486dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40751ae1b5e8Smrg      ;;
407686dafe34Smrg
407786dafe34Smrg    solaris*)
407886dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
407986dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
408086dafe34Smrg      case $cc_basename in
408186dafe34Smrg      f77* | f90* | f95*)
408286dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
40831ae1b5e8Smrg      *)
408486dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
40851ae1b5e8Smrg      esac
408686dafe34Smrg      ;;
408776888252Smrg
408886dafe34Smrg    sunos4*)
408986dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
409086dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
409186dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
409286dafe34Smrg      ;;
409376888252Smrg
409486dafe34Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
409586dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
409686dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
409786dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
409886dafe34Smrg      ;;
409976888252Smrg
410086dafe34Smrg    sysv4*MP*)
410186dafe34Smrg      if test -d /usr/nec ;then
410286dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
410386dafe34Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
410486dafe34Smrg      fi
410586dafe34Smrg      ;;
410676888252Smrg
410786dafe34Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
410886dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
410986dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
411086dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
411186dafe34Smrg      ;;
411286dafe34Smrg
411386dafe34Smrg    unicos*)
411486dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
411586dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
411686dafe34Smrg      ;;
411786dafe34Smrg
411886dafe34Smrg    uts4*)
411986dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
412086dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
412186dafe34Smrg      ;;
412286dafe34Smrg
412386dafe34Smrg    *)
412486dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
412586dafe34Smrg      ;;
412686dafe34Smrg    esac
412786dafe34Smrg  fi
412886dafe34Smrg])
41291ae1b5e8Smrgcase $host_os in
413086dafe34Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
413186dafe34Smrg  *djgpp*)
413286dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
413386dafe34Smrg    ;;
413486dafe34Smrg  *)
413586dafe34Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
41361ae1b5e8Smrg    ;;
41371ae1b5e8Smrgesac
413886dafe34SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
413986dafe34Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
414086dafe34Smrg	[How to pass a linker flag through the compiler])
414176888252Smrg
414286dafe34Smrg#
414386dafe34Smrg# Check to make sure the PIC flag actually works.
414486dafe34Smrg#
414586dafe34Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
414686dafe34Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
414786dafe34Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
414886dafe34Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
414986dafe34Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
415086dafe34Smrg     "" | " "*) ;;
415186dafe34Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
415286dafe34Smrg     esac],
415386dafe34Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
415486dafe34Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
415586dafe34Smrgfi
415686dafe34Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
415786dafe34Smrg	[Additional compiler flags for building library objects])
415876888252Smrg
415986dafe34Smrg#
416086dafe34Smrg# Check to make sure the static flag actually works.
416186dafe34Smrg#
416286dafe34Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
416386dafe34Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
416486dafe34Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
416586dafe34Smrg  $lt_tmp_static_flag,
416686dafe34Smrg  [],
416786dafe34Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
416886dafe34Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
416986dafe34Smrg	[Compiler flag to prevent dynamic linking])
417086dafe34Smrg])# _LT_COMPILER_PIC
417176888252Smrg
417276888252Smrg
417386dafe34Smrg# _LT_LINKER_SHLIBS([TAGNAME])
417486dafe34Smrg# ----------------------------
417586dafe34Smrg# See if the linker supports building shared libraries.
417686dafe34Smrgm4_defun([_LT_LINKER_SHLIBS],
417786dafe34Smrg[AC_REQUIRE([LT_PATH_LD])dnl
417886dafe34SmrgAC_REQUIRE([LT_PATH_NM])dnl
417986dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
418086dafe34Smrgm4_require([_LT_DECL_EGREP])dnl
418186dafe34Smrgm4_require([_LT_DECL_SED])dnl
418286dafe34Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
418386dafe34Smrgm4_require([_LT_TAG_COMPILER])dnl
418486dafe34SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
418586dafe34Smrgm4_if([$1], [CXX], [
418686dafe34Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
418786dafe34Smrg  case $host_os in
418886dafe34Smrg  aix[[4-9]]*)
418986dafe34Smrg    # If we're using GNU nm, then we don't want the "-C" option.
419086dafe34Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
419186dafe34Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
419286dafe34Smrg      _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'
419386dafe34Smrg    else
419486dafe34Smrg      _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'
419586dafe34Smrg    fi
419686dafe34Smrg    ;;
419786dafe34Smrg  pw32*)
419886dafe34Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
41991ae1b5e8Smrg  ;;
420086dafe34Smrg  cygwin* | mingw* | cegcc*)
420186dafe34Smrg    _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'
42021ae1b5e8Smrg  ;;
420386dafe34Smrg  *)
420486dafe34Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
42051ae1b5e8Smrg  ;;
420686dafe34Smrg  esac
420786dafe34Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
420886dafe34Smrg], [
420986dafe34Smrg  runpath_var=
421086dafe34Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
421186dafe34Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
421286dafe34Smrg  _LT_TAGVAR(archive_cmds, $1)=
421386dafe34Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
421486dafe34Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
421586dafe34Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
421686dafe34Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
421786dafe34Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
421886dafe34Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
421986dafe34Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
422086dafe34Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
422186dafe34Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
422286dafe34Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
422386dafe34Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
422486dafe34Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
422586dafe34Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
422686dafe34Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
422786dafe34Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
422886dafe34Smrg  _LT_TAGVAR(module_cmds, $1)=
422986dafe34Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
423086dafe34Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
423186dafe34Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
423286dafe34Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
423386dafe34Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
423486dafe34Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
423586dafe34Smrg  # included in the symbol list
423686dafe34Smrg  _LT_TAGVAR(include_expsyms, $1)=
423786dafe34Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
423886dafe34Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
423986dafe34Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
424086dafe34Smrg  # as well as any symbol that contains `d'.
424186dafe34Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
424286dafe34Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
424386dafe34Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
424486dafe34Smrg  # the symbol is explicitly referenced.  Since portable code cannot
424586dafe34Smrg  # rely on this symbol name, it's probably fine to never include it in
424686dafe34Smrg  # preloaded symbol tables.
424786dafe34Smrg  # Exclude shared library initialization/finalization symbols.
424886dafe34Smrgdnl Note also adjust exclude_expsyms for C++ above.
424986dafe34Smrg  extract_expsyms_cmds=
425076888252Smrg
425186dafe34Smrg  case $host_os in
425286dafe34Smrg  cygwin* | mingw* | pw32* | cegcc*)
425386dafe34Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
425486dafe34Smrg    # When not using gcc, we currently assume that we are using
425586dafe34Smrg    # Microsoft Visual C++.
425686dafe34Smrg    if test "$GCC" != yes; then
425786dafe34Smrg      with_gnu_ld=no
425886dafe34Smrg    fi
425986dafe34Smrg    ;;
426086dafe34Smrg  interix*)
426186dafe34Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
426286dafe34Smrg    with_gnu_ld=yes
426386dafe34Smrg    ;;
426486dafe34Smrg  openbsd*)
426586dafe34Smrg    with_gnu_ld=no
426686dafe34Smrg    ;;
426786dafe34Smrg  esac
426876888252Smrg
426986dafe34Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
427086dafe34Smrg  if test "$with_gnu_ld" = yes; then
427186dafe34Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
427286dafe34Smrg    wlarc='${wl}'
427376888252Smrg
427486dafe34Smrg    # Set some defaults for GNU ld with shared library support. These
427586dafe34Smrg    # are reset later if shared libraries are not supported. Putting them
427686dafe34Smrg    # here allows them to be overridden if necessary.
427786dafe34Smrg    runpath_var=LD_RUN_PATH
427886dafe34Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
427986dafe34Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
428086dafe34Smrg    # ancient GNU ld didn't support --whole-archive et. al.
428186dafe34Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
428286dafe34Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
428386dafe34Smrg    else
428486dafe34Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
428586dafe34Smrg    fi
428686dafe34Smrg    supports_anon_versioning=no
428786dafe34Smrg    case `$LD -v 2>&1` in
428886dafe34Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
428986dafe34Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
429086dafe34Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
429186dafe34Smrg      *\ 2.11.*) ;; # other 2.11 versions
429286dafe34Smrg      *) supports_anon_versioning=yes ;;
42931ae1b5e8Smrg    esac
429476888252Smrg
429586dafe34Smrg    # See if GNU ld supports shared libraries.
429686dafe34Smrg    case $host_os in
429786dafe34Smrg    aix[[3-9]]*)
429886dafe34Smrg      # On AIX/PPC, the GNU linker is very broken
429986dafe34Smrg      if test "$host_cpu" != ia64; then
430086dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
430186dafe34Smrg	cat <<_LT_EOF 1>&2
430276888252Smrg
430386dafe34Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
430486dafe34Smrg*** to be unable to reliably create shared libraries on AIX.
430586dafe34Smrg*** Therefore, libtool is disabling shared libraries support.  If you
430686dafe34Smrg*** really care for shared libraries, you may want to modify your PATH
430786dafe34Smrg*** so that a non-GNU linker is found, and then restart.
430876888252Smrg
430986dafe34Smrg_LT_EOF
431086dafe34Smrg      fi
431186dafe34Smrg      ;;
431276888252Smrg
431386dafe34Smrg    amigaos*)
431486dafe34Smrg      case $host_cpu in
431586dafe34Smrg      powerpc)
431686dafe34Smrg            # see comment about AmigaOS4 .so support
431786dafe34Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
431886dafe34Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
431986dafe34Smrg        ;;
432086dafe34Smrg      m68k)
432186dafe34Smrg            _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)'
432286dafe34Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
432386dafe34Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
432486dafe34Smrg        ;;
432586dafe34Smrg      esac
432686dafe34Smrg      ;;
432776888252Smrg
432886dafe34Smrg    beos*)
432986dafe34Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
433086dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
433186dafe34Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
433286dafe34Smrg	# support --undefined.  This deserves some investigation.  FIXME
433386dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
433486dafe34Smrg      else
433586dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
433686dafe34Smrg      fi
433786dafe34Smrg      ;;
433876888252Smrg
433986dafe34Smrg    cygwin* | mingw* | pw32* | cegcc*)
434086dafe34Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
434186dafe34Smrg      # as there is no search path for DLLs.
434286dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
434386dafe34Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
434486dafe34Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
434586dafe34Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
434686dafe34Smrg      _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'
434786dafe34Smrg
434886dafe34Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
434986dafe34Smrg        _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'
435086dafe34Smrg	# If the export-symbols file already is a .def file (1st line
435186dafe34Smrg	# is EXPORTS), use it as is; otherwise, prepend...
435286dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
435386dafe34Smrg	  cp $export_symbols $output_objdir/$soname.def;
435486dafe34Smrg	else
435586dafe34Smrg	  echo EXPORTS > $output_objdir/$soname.def;
435686dafe34Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
435786dafe34Smrg	fi~
435886dafe34Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
435986dafe34Smrg      else
436086dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
436186dafe34Smrg      fi
436286dafe34Smrg      ;;
436376888252Smrg
436486dafe34Smrg    interix[[3-9]]*)
436586dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
436686dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
436786dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
436886dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
436986dafe34Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
437086dafe34Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
437186dafe34Smrg      # default) and relocated if they conflict, which is a slow very memory
437286dafe34Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
437386dafe34Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
437486dafe34Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
437586dafe34Smrg      _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'
437686dafe34Smrg      _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'
437786dafe34Smrg      ;;
437876888252Smrg
437986dafe34Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
438086dafe34Smrg      tmp_diet=no
438186dafe34Smrg      if test "$host_os" = linux-dietlibc; then
438286dafe34Smrg	case $cc_basename in
438386dafe34Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
438486dafe34Smrg	esac
438586dafe34Smrg      fi
438686dafe34Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
438786dafe34Smrg	 && test "$tmp_diet" = no
438886dafe34Smrg      then
438986dafe34Smrg	tmp_addflag=
439086dafe34Smrg	tmp_sharedflag='-shared'
439186dafe34Smrg	case $cc_basename,$host_cpu in
439286dafe34Smrg        pgcc*)				# Portland Group C compiler
439386dafe34Smrg	  _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'
439486dafe34Smrg	  tmp_addflag=' $pic_flag'
439586dafe34Smrg	  ;;
439686dafe34Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
439786dafe34Smrg	  _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'
439886dafe34Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
439986dafe34Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
440086dafe34Smrg	  tmp_addflag=' -i_dynamic' ;;
440186dafe34Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
440286dafe34Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
440386dafe34Smrg	ifc* | ifort*)			# Intel Fortran compiler
440486dafe34Smrg	  tmp_addflag=' -nofor_main' ;;
440586dafe34Smrg	lf95*)				# Lahey Fortran 8.1
440686dafe34Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
440786dafe34Smrg	  tmp_sharedflag='--shared' ;;
440886dafe34Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
440986dafe34Smrg	  tmp_sharedflag='-qmkshrobj'
441086dafe34Smrg	  tmp_addflag= ;;
441186dafe34Smrg	esac
441286dafe34Smrg	case `$CC -V 2>&1 | sed 5q` in
441386dafe34Smrg	*Sun\ C*)			# Sun C 5.9
441486dafe34Smrg	  _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'
441586dafe34Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
441686dafe34Smrg	  tmp_sharedflag='-G' ;;
441786dafe34Smrg	*Sun\ F*)			# Sun Fortran 8.3
441886dafe34Smrg	  tmp_sharedflag='-G' ;;
441986dafe34Smrg	esac
442086dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
442176888252Smrg
442286dafe34Smrg        if test "x$supports_anon_versioning" = xyes; then
442386dafe34Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
442486dafe34Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
442586dafe34Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
442686dafe34Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
442786dafe34Smrg        fi
442876888252Smrg
442986dafe34Smrg	case $cc_basename in
443086dafe34Smrg	xlf*)
443186dafe34Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
443286dafe34Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
443386dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
443486dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
443586dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
443686dafe34Smrg	  if test "x$supports_anon_versioning" = xyes; then
443786dafe34Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
443886dafe34Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
443986dafe34Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
444086dafe34Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
444186dafe34Smrg	  fi
444286dafe34Smrg	  ;;
444386dafe34Smrg	esac
444486dafe34Smrg      else
444586dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
444686dafe34Smrg      fi
444786dafe34Smrg      ;;
444876888252Smrg
444986dafe34Smrg    netbsd*)
445086dafe34Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
445186dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
445286dafe34Smrg	wlarc=
445386dafe34Smrg      else
445486dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
445586dafe34Smrg	_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'
445686dafe34Smrg      fi
445786dafe34Smrg      ;;
445876888252Smrg
445986dafe34Smrg    solaris*)
446086dafe34Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
446186dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
446286dafe34Smrg	cat <<_LT_EOF 1>&2
446376888252Smrg
446486dafe34Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
446586dafe34Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
446686dafe34Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
446786dafe34Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
446886dafe34Smrg*** your PATH or compiler configuration so that the native linker is
446986dafe34Smrg*** used, and then restart.
447076888252Smrg
447186dafe34Smrg_LT_EOF
447286dafe34Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
447386dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
447486dafe34Smrg	_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'
447586dafe34Smrg      else
447686dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
447786dafe34Smrg      fi
447886dafe34Smrg      ;;
447976888252Smrg
448086dafe34Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
448186dafe34Smrg      case `$LD -v 2>&1` in
448286dafe34Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
448386dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
448486dafe34Smrg	cat <<_LT_EOF 1>&2
448576888252Smrg
448686dafe34Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
448786dafe34Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
448886dafe34Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
448986dafe34Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
449086dafe34Smrg*** your PATH or compiler configuration so that the native linker is
449186dafe34Smrg*** used, and then restart.
449276888252Smrg
449386dafe34Smrg_LT_EOF
449486dafe34Smrg	;;
449586dafe34Smrg	*)
449686dafe34Smrg	  # For security reasons, it is highly recommended that you always
449786dafe34Smrg	  # use absolute paths for naming shared libraries, and exclude the
449886dafe34Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
449986dafe34Smrg	  # requires that you compile everything twice, which is a pain.
450086dafe34Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
450186dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
450286dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
450386dafe34Smrg	    _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'
450486dafe34Smrg	  else
450586dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
450686dafe34Smrg	  fi
450786dafe34Smrg	;;
450886dafe34Smrg      esac
450986dafe34Smrg      ;;
451076888252Smrg
451186dafe34Smrg    sunos4*)
451286dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
451386dafe34Smrg      wlarc=
451486dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
451586dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
451686dafe34Smrg      ;;
451776888252Smrg
451886dafe34Smrg    *)
451986dafe34Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
452086dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
452186dafe34Smrg	_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'
452286dafe34Smrg      else
452386dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
452486dafe34Smrg      fi
452586dafe34Smrg      ;;
452686dafe34Smrg    esac
452776888252Smrg
452886dafe34Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
452986dafe34Smrg      runpath_var=
453086dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
453186dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
453286dafe34Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
453386dafe34Smrg    fi
45341ae1b5e8Smrg  else
453586dafe34Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
453686dafe34Smrg    case $host_os in
453786dafe34Smrg    aix3*)
453886dafe34Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
453986dafe34Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
454086dafe34Smrg      _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'
454186dafe34Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
454286dafe34Smrg      # are no directories specified by -L.
454386dafe34Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
454486dafe34Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
454586dafe34Smrg	# Neither direct hardcoding nor static linking is supported with a
454686dafe34Smrg	# broken collect2.
454786dafe34Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
454886dafe34Smrg      fi
454986dafe34Smrg      ;;
455076888252Smrg
455186dafe34Smrg    aix[[4-9]]*)
455286dafe34Smrg      if test "$host_cpu" = ia64; then
455386dafe34Smrg	# On IA64, the linker does run time linking by default, so we don't
455486dafe34Smrg	# have to do anything special.
455586dafe34Smrg	aix_use_runtimelinking=no
455686dafe34Smrg	exp_sym_flag='-Bexport'
455786dafe34Smrg	no_entry_flag=""
455886dafe34Smrg      else
455986dafe34Smrg	# If we're using GNU nm, then we don't want the "-C" option.
456086dafe34Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
456186dafe34Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
456286dafe34Smrg	  _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'
456386dafe34Smrg	else
456486dafe34Smrg	  _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'
456586dafe34Smrg	fi
456686dafe34Smrg	aix_use_runtimelinking=no
456776888252Smrg
456886dafe34Smrg	# Test if we are trying to use run time linking or normal
456986dafe34Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
457086dafe34Smrg	# need to do runtime linking.
457186dafe34Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
457286dafe34Smrg	  for ld_flag in $LDFLAGS; do
457386dafe34Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
457486dafe34Smrg	    aix_use_runtimelinking=yes
457586dafe34Smrg	    break
457686dafe34Smrg	  fi
457786dafe34Smrg	  done
457886dafe34Smrg	  ;;
457986dafe34Smrg	esac
458076888252Smrg
458186dafe34Smrg	exp_sym_flag='-bexport'
458286dafe34Smrg	no_entry_flag='-bnoentry'
458386dafe34Smrg      fi
458476888252Smrg
458586dafe34Smrg      # When large executables or shared objects are built, AIX ld can
458686dafe34Smrg      # have problems creating the table of contents.  If linking a library
458786dafe34Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
458886dafe34Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
458986dafe34Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
459076888252Smrg
459186dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)=''
459286dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
459386dafe34Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
459486dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
459586dafe34Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
459686dafe34Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
459776888252Smrg
459886dafe34Smrg      if test "$GCC" = yes; then
459986dafe34Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
460086dafe34Smrg	# We only want to do this on AIX 4.2 and lower, the check
460186dafe34Smrg	# below for broken collect2 doesn't work under 4.3+
460286dafe34Smrg	  collect2name=`${CC} -print-prog-name=collect2`
460386dafe34Smrg	  if test -f "$collect2name" &&
460486dafe34Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
460586dafe34Smrg	  then
460686dafe34Smrg	  # We have reworked collect2
460786dafe34Smrg	  :
460886dafe34Smrg	  else
460986dafe34Smrg	  # We have old collect2
461086dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
461186dafe34Smrg	  # It fails to find uninstalled libraries when the uninstalled
461286dafe34Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
461386dafe34Smrg	  # to unsupported forces relinking
461486dafe34Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
461586dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
461686dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
461786dafe34Smrg	  fi
461886dafe34Smrg	  ;;
461986dafe34Smrg	esac
462086dafe34Smrg	shared_flag='-shared'
462186dafe34Smrg	if test "$aix_use_runtimelinking" = yes; then
462286dafe34Smrg	  shared_flag="$shared_flag "'${wl}-G'
462386dafe34Smrg	fi
462486dafe34Smrg      else
462586dafe34Smrg	# not using gcc
462686dafe34Smrg	if test "$host_cpu" = ia64; then
462786dafe34Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
462886dafe34Smrg	# chokes on -Wl,-G. The following line is correct:
462986dafe34Smrg	  shared_flag='-G'
463086dafe34Smrg	else
463186dafe34Smrg	  if test "$aix_use_runtimelinking" = yes; then
463286dafe34Smrg	    shared_flag='${wl}-G'
463386dafe34Smrg	  else
463486dafe34Smrg	    shared_flag='${wl}-bM:SRE'
463586dafe34Smrg	  fi
463686dafe34Smrg	fi
463786dafe34Smrg      fi
463876888252Smrg
463986dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
464086dafe34Smrg      # It seems that -bexpall does not export symbols beginning with
464186dafe34Smrg      # underscore (_), so it is better to generate a list of symbols to export.
464286dafe34Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
464386dafe34Smrg      if test "$aix_use_runtimelinking" = yes; then
464486dafe34Smrg	# Warning - without using the other runtime loading flags (-brtl),
464586dafe34Smrg	# -berok will link without error, but may produce a broken library.
464686dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
464786dafe34Smrg        # Determine the default libpath from the value encoded in an
464886dafe34Smrg        # empty executable.
464986dafe34Smrg        _LT_SYS_MODULE_PATH_AIX
465086dafe34Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
465186dafe34Smrg        _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"
465286dafe34Smrg      else
465386dafe34Smrg	if test "$host_cpu" = ia64; then
465486dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
465586dafe34Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
465686dafe34Smrg	  _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"
465786dafe34Smrg	else
465886dafe34Smrg	 # Determine the default libpath from the value encoded in an
465986dafe34Smrg	 # empty executable.
466086dafe34Smrg	 _LT_SYS_MODULE_PATH_AIX
466186dafe34Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
466286dafe34Smrg	  # Warning - without using the other run time loading flags,
466386dafe34Smrg	  # -berok will link without error, but may produce a broken library.
466486dafe34Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
466586dafe34Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
466686dafe34Smrg	  # Exported symbols can be pulled into shared objects from archives
466786dafe34Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
466886dafe34Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
466986dafe34Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
467086dafe34Smrg	  _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'
467186dafe34Smrg	fi
467286dafe34Smrg      fi
467386dafe34Smrg      ;;
467476888252Smrg
467586dafe34Smrg    amigaos*)
467686dafe34Smrg      case $host_cpu in
467786dafe34Smrg      powerpc)
467886dafe34Smrg            # see comment about AmigaOS4 .so support
467986dafe34Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
468086dafe34Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
468186dafe34Smrg        ;;
468286dafe34Smrg      m68k)
468386dafe34Smrg            _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)'
468486dafe34Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
468586dafe34Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
468686dafe34Smrg        ;;
468786dafe34Smrg      esac
468886dafe34Smrg      ;;
468976888252Smrg
469086dafe34Smrg    bsdi[[45]]*)
469186dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
469286dafe34Smrg      ;;
469376888252Smrg
469486dafe34Smrg    cygwin* | mingw* | pw32* | cegcc*)
469586dafe34Smrg      # When not using gcc, we currently assume that we are using
469686dafe34Smrg      # Microsoft Visual C++.
469786dafe34Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
469886dafe34Smrg      # no search path for DLLs.
469986dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
470086dafe34Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
470186dafe34Smrg      # Tell ltmain to make .lib files, not .a files.
470286dafe34Smrg      libext=lib
470386dafe34Smrg      # Tell ltmain to make .dll files, not .so files.
470486dafe34Smrg      shrext_cmds=".dll"
470586dafe34Smrg      # FIXME: Setting linknames here is a bad hack.
470686dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
470786dafe34Smrg      # The linker will automatically build a .lib file if we build a DLL.
470886dafe34Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
470986dafe34Smrg      # FIXME: Should let the user specify the lib program.
471086dafe34Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
471186dafe34Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
471286dafe34Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
471386dafe34Smrg      ;;
471476888252Smrg
471586dafe34Smrg    darwin* | rhapsody*)
471686dafe34Smrg      _LT_DARWIN_LINKER_FEATURES($1)
471786dafe34Smrg      ;;
471876888252Smrg
471986dafe34Smrg    dgux*)
472086dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
472186dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
472286dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
472386dafe34Smrg      ;;
472476888252Smrg
472586dafe34Smrg    freebsd1*)
472686dafe34Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
472786dafe34Smrg      ;;
472876888252Smrg
472986dafe34Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
473086dafe34Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
473186dafe34Smrg    # does not break anything, and helps significantly (at the cost of a little
473286dafe34Smrg    # extra space).
473386dafe34Smrg    freebsd2.2*)
473486dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
473586dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
473686dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
473786dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
473886dafe34Smrg      ;;
473976888252Smrg
474086dafe34Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
474186dafe34Smrg    freebsd2*)
474286dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
474386dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
474486dafe34Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
474586dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
474686dafe34Smrg      ;;
474776888252Smrg
474886dafe34Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
474986dafe34Smrg    freebsd* | dragonfly*)
475086dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
475186dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
475286dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
475386dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
475486dafe34Smrg      ;;
475576888252Smrg
475686dafe34Smrg    hpux9*)
475786dafe34Smrg      if test "$GCC" = yes; then
475886dafe34Smrg	_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'
475986dafe34Smrg      else
476086dafe34Smrg	_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'
476186dafe34Smrg      fi
476286dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
476386dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
476486dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
476576888252Smrg
476686dafe34Smrg      # hardcode_minus_L: Not really in the search PATH,
476786dafe34Smrg      # but as the default location of the library.
476886dafe34Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
476986dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
477086dafe34Smrg      ;;
477176888252Smrg
477286dafe34Smrg    hpux10*)
477386dafe34Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
477486dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
477586dafe34Smrg      else
477686dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
477786dafe34Smrg      fi
477886dafe34Smrg      if test "$with_gnu_ld" = no; then
477986dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
478086dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
478186dafe34Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
478286dafe34Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
478386dafe34Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
478486dafe34Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
478586dafe34Smrg	# hardcode_minus_L: Not really in the search PATH,
478686dafe34Smrg	# but as the default location of the library.
478786dafe34Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
478886dafe34Smrg      fi
478986dafe34Smrg      ;;
479076888252Smrg
479186dafe34Smrg    hpux11*)
479286dafe34Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
479386dafe34Smrg	case $host_cpu in
479486dafe34Smrg	hppa*64*)
479586dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
479686dafe34Smrg	  ;;
479786dafe34Smrg	ia64*)
479886dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
479986dafe34Smrg	  ;;
480086dafe34Smrg	*)
480186dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
480286dafe34Smrg	  ;;
480386dafe34Smrg	esac
480486dafe34Smrg      else
480586dafe34Smrg	case $host_cpu in
480686dafe34Smrg	hppa*64*)
480786dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
480886dafe34Smrg	  ;;
480986dafe34Smrg	ia64*)
481086dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
481186dafe34Smrg	  ;;
481286dafe34Smrg	*)
481386dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
481486dafe34Smrg	  ;;
481586dafe34Smrg	esac
481686dafe34Smrg      fi
481786dafe34Smrg      if test "$with_gnu_ld" = no; then
481886dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
481986dafe34Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
482076888252Smrg
482186dafe34Smrg	case $host_cpu in
482286dafe34Smrg	hppa*64*|ia64*)
482386dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
482486dafe34Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
482586dafe34Smrg	  ;;
482686dafe34Smrg	*)
482786dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
482886dafe34Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
482986dafe34Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
483076888252Smrg
483186dafe34Smrg	  # hardcode_minus_L: Not really in the search PATH,
483286dafe34Smrg	  # but as the default location of the library.
483386dafe34Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
483486dafe34Smrg	  ;;
483586dafe34Smrg	esac
483686dafe34Smrg      fi
483786dafe34Smrg      ;;
483876888252Smrg
483986dafe34Smrg    irix5* | irix6* | nonstopux*)
484086dafe34Smrg      if test "$GCC" = yes; then
484186dafe34Smrg	_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'
484286dafe34Smrg	# Try to use the -exported_symbol ld option, if it does not
484386dafe34Smrg	# work, assume that -exports_file does not work either and
484486dafe34Smrg	# implicitly export all symbols.
484586dafe34Smrg        save_LDFLAGS="$LDFLAGS"
484686dafe34Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
484786dafe34Smrg        AC_LINK_IFELSE(int foo(void) {},
484886dafe34Smrg          _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'
484986dafe34Smrg        )
485086dafe34Smrg        LDFLAGS="$save_LDFLAGS"
485186dafe34Smrg      else
485286dafe34Smrg	_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'
485386dafe34Smrg	_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'
485486dafe34Smrg      fi
485586dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
485686dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
485786dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
485886dafe34Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
485986dafe34Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
486086dafe34Smrg      ;;
486176888252Smrg
486286dafe34Smrg    netbsd*)
486386dafe34Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
486486dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
486586dafe34Smrg      else
486686dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
486786dafe34Smrg      fi
486886dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
486986dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
487086dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
487186dafe34Smrg      ;;
487276888252Smrg
487386dafe34Smrg    newsos6)
487486dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
487586dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
487686dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
487786dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
487886dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
487986dafe34Smrg      ;;
488076888252Smrg
488186dafe34Smrg    *nto* | *qnx*)
488286dafe34Smrg      ;;
488376888252Smrg
488486dafe34Smrg    openbsd*)
488586dafe34Smrg      if test -f /usr/libexec/ld.so; then
488686dafe34Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
488786dafe34Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
488886dafe34Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
488986dafe34Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
489086dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
489186dafe34Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
489286dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
489386dafe34Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
489486dafe34Smrg	else
489586dafe34Smrg	  case $host_os in
489686dafe34Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
489786dafe34Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
489886dafe34Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
489986dafe34Smrg	     ;;
490086dafe34Smrg	   *)
490186dafe34Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
490286dafe34Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
490386dafe34Smrg	     ;;
490486dafe34Smrg	  esac
490586dafe34Smrg	fi
490686dafe34Smrg      else
490786dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
490886dafe34Smrg      fi
490986dafe34Smrg      ;;
491076888252Smrg
491186dafe34Smrg    os2*)
491286dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
491386dafe34Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
491486dafe34Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
491586dafe34Smrg      _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'
491686dafe34Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
491786dafe34Smrg      ;;
491876888252Smrg
491986dafe34Smrg    osf3*)
492086dafe34Smrg      if test "$GCC" = yes; then
492186dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
492286dafe34Smrg	_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'
492386dafe34Smrg      else
492486dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
492586dafe34Smrg	_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'
492686dafe34Smrg      fi
492786dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
492886dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
492986dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
493086dafe34Smrg      ;;
493176888252Smrg
493286dafe34Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
493386dafe34Smrg      if test "$GCC" = yes; then
493486dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
493586dafe34Smrg	_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'
493686dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
493786dafe34Smrg      else
493886dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
493986dafe34Smrg	_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'
494086dafe34Smrg	_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~
494186dafe34Smrg	$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'
494276888252Smrg
494386dafe34Smrg	# Both c and cxx compiler support -rpath directly
494486dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
494586dafe34Smrg      fi
494686dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
494786dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
494886dafe34Smrg      ;;
494976888252Smrg
495086dafe34Smrg    solaris*)
495186dafe34Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
495286dafe34Smrg      if test "$GCC" = yes; then
495386dafe34Smrg	wlarc='${wl}'
495486dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
495586dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
495686dafe34Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
495786dafe34Smrg      else
495886dafe34Smrg	case `$CC -V 2>&1` in
495986dafe34Smrg	*"Compilers 5.0"*)
496086dafe34Smrg	  wlarc=''
496186dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
496286dafe34Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496386dafe34Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
496486dafe34Smrg	  ;;
496586dafe34Smrg	*)
496686dafe34Smrg	  wlarc='${wl}'
496786dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
496886dafe34Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496986dafe34Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
497086dafe34Smrg	  ;;
497186dafe34Smrg	esac
497286dafe34Smrg      fi
497386dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
497486dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
497586dafe34Smrg      case $host_os in
497686dafe34Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
497786dafe34Smrg      *)
497886dafe34Smrg	# The compiler driver will combine and reorder linker options,
497986dafe34Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
498086dafe34Smrg	# but is careful enough not to reorder.
498186dafe34Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
498286dafe34Smrg	if test "$GCC" = yes; then
498386dafe34Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
498486dafe34Smrg	else
498586dafe34Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
498686dafe34Smrg	fi
498786dafe34Smrg	;;
498886dafe34Smrg      esac
498986dafe34Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
499086dafe34Smrg      ;;
499176888252Smrg
499286dafe34Smrg    sunos4*)
499386dafe34Smrg      if test "x$host_vendor" = xsequent; then
499486dafe34Smrg	# Use $CC to link under sequent, because it throws in some extra .o
499586dafe34Smrg	# files that make .init and .fini sections work.
499686dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
499786dafe34Smrg      else
499886dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
499986dafe34Smrg      fi
500086dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
500186dafe34Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
500286dafe34Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
500386dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
500486dafe34Smrg      ;;
500576888252Smrg
500686dafe34Smrg    sysv4)
500786dafe34Smrg      case $host_vendor in
500886dafe34Smrg	sni)
500986dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
501086dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
501186dafe34Smrg	;;
501286dafe34Smrg	siemens)
501386dafe34Smrg	  ## LD is ld it makes a PLAMLIB
501486dafe34Smrg	  ## CC just makes a GrossModule.
501586dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
501686dafe34Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
501786dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
501886dafe34Smrg        ;;
501986dafe34Smrg	motorola)
502086dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
502186dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
502286dafe34Smrg	;;
502386dafe34Smrg      esac
502486dafe34Smrg      runpath_var='LD_RUN_PATH'
502586dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
502686dafe34Smrg      ;;
502776888252Smrg
502886dafe34Smrg    sysv4.3*)
502986dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
503086dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
503186dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
503286dafe34Smrg      ;;
503376888252Smrg
503486dafe34Smrg    sysv4*MP*)
503586dafe34Smrg      if test -d /usr/nec; then
503686dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
503786dafe34Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
503886dafe34Smrg	runpath_var=LD_RUN_PATH
503986dafe34Smrg	hardcode_runpath_var=yes
504086dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
504186dafe34Smrg      fi
504286dafe34Smrg      ;;
504376888252Smrg
504486dafe34Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
504586dafe34Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
504686dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
504786dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
504886dafe34Smrg      runpath_var='LD_RUN_PATH'
504976888252Smrg
505086dafe34Smrg      if test "$GCC" = yes; then
505186dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505286dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505386dafe34Smrg      else
505486dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505586dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505686dafe34Smrg      fi
505786dafe34Smrg      ;;
505876888252Smrg
505986dafe34Smrg    sysv5* | sco3.2v5* | sco5v6*)
506086dafe34Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
506186dafe34Smrg      # link with -lc, and that would cause any symbols used from libc to
506286dafe34Smrg      # always be unresolved, which means just about no library would
506386dafe34Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
506486dafe34Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
506586dafe34Smrg      # as -z defs.
506686dafe34Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
506786dafe34Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
506886dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
506986dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
507086dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
507186dafe34Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
507286dafe34Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
507386dafe34Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
507486dafe34Smrg      runpath_var='LD_RUN_PATH'
507576888252Smrg
507686dafe34Smrg      if test "$GCC" = yes; then
507786dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507886dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507986dafe34Smrg      else
508086dafe34Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
508186dafe34Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
508286dafe34Smrg      fi
508386dafe34Smrg      ;;
508476888252Smrg
508586dafe34Smrg    uts4*)
508686dafe34Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
508786dafe34Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
508886dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
508986dafe34Smrg      ;;
509076888252Smrg
509186dafe34Smrg    *)
509286dafe34Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
509386dafe34Smrg      ;;
509486dafe34Smrg    esac
509576888252Smrg
509686dafe34Smrg    if test x$host_vendor = xsni; then
509786dafe34Smrg      case $host in
509886dafe34Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
509986dafe34Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
51001ae1b5e8Smrg	;;
51011ae1b5e8Smrg      esac
51021ae1b5e8Smrg    fi
510386dafe34Smrg  fi
510486dafe34Smrg])
510586dafe34SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
510686dafe34Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
510776888252Smrg
510886dafe34Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
510976888252Smrg
511086dafe34Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
511186dafe34Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
511286dafe34Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
511386dafe34Smrg    [The commands to extract the exported symbol list from a shared archive])
511476888252Smrg
511586dafe34Smrg#
511686dafe34Smrg# Do we need to explicitly link libc?
511786dafe34Smrg#
511886dafe34Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
511986dafe34Smrgx|xyes)
512086dafe34Smrg  # Assume -lc should be added
512186dafe34Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
512276888252Smrg
512386dafe34Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
512486dafe34Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
512586dafe34Smrg    *'~'*)
512686dafe34Smrg      # FIXME: we may have to deal with multi-command sequences.
512786dafe34Smrg      ;;
512886dafe34Smrg    '$CC '*)
512986dafe34Smrg      # Test whether the compiler implicitly links with -lc since on some
513086dafe34Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
513186dafe34Smrg      # to ld, don't add -lc before -lgcc.
513286dafe34Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
513386dafe34Smrg      $RM conftest*
513486dafe34Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
513586dafe34Smrg
513686dafe34Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
513786dafe34Smrg        soname=conftest
513886dafe34Smrg        lib=conftest
513986dafe34Smrg        libobjs=conftest.$ac_objext
514086dafe34Smrg        deplibs=
514186dafe34Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
514286dafe34Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
514386dafe34Smrg        compiler_flags=-v
514486dafe34Smrg        linker_flags=-v
514586dafe34Smrg        verstring=
514686dafe34Smrg        output_objdir=.
514786dafe34Smrg        libname=conftest
514886dafe34Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
514986dafe34Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
515086dafe34Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
515186dafe34Smrg        then
515286dafe34Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
515386dafe34Smrg        else
515486dafe34Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
515586dafe34Smrg        fi
515686dafe34Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
51571ae1b5e8Smrg      else
515886dafe34Smrg        cat conftest.err 1>&5
51591ae1b5e8Smrg      fi
516086dafe34Smrg      $RM conftest*
516186dafe34Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
516286dafe34Smrg      ;;
51631ae1b5e8Smrg    esac
516486dafe34Smrg  fi
516586dafe34Smrg  ;;
516686dafe34Smrgesac
516776888252Smrg
516886dafe34Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
516986dafe34Smrg    [Whether or not to add -lc for building shared libraries])
517086dafe34Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
517186dafe34Smrg    [enable_shared_with_static_runtimes], [0],
517286dafe34Smrg    [Whether or not to disallow shared libs when runtime libs are static])
517386dafe34Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
517486dafe34Smrg    [Compiler flag to allow reflexive dlopens])
517586dafe34Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
517686dafe34Smrg    [Compiler flag to generate shared objects directly from archives])
517786dafe34Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
517886dafe34Smrg    [Whether the compiler copes with passing no objects directly])
517986dafe34Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
518086dafe34Smrg    [Create an old-style archive from a shared archive])
518186dafe34Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
518286dafe34Smrg    [Create a temporary old-style archive to link instead of a shared archive])
518386dafe34Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
518486dafe34Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
518586dafe34Smrg_LT_TAGDECL([], [module_cmds], [2],
518686dafe34Smrg    [Commands used to build a loadable module if different from building
518786dafe34Smrg    a shared archive.])
518886dafe34Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
518986dafe34Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
519086dafe34Smrg    [Whether we are building with GNU ld or not])
519186dafe34Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
519286dafe34Smrg    [Flag that allows shared libraries with undefined symbols to be built])
519386dafe34Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
519486dafe34Smrg    [Flag that enforces no undefined symbols])
519586dafe34Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
519686dafe34Smrg    [Flag to hardcode $libdir into a binary during linking.
519786dafe34Smrg    This must work even if $libdir does not exist])
519886dafe34Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
519986dafe34Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
520086dafe34Smrg    during linking.  This must work even if $libdir does not exist]])
520186dafe34Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
520286dafe34Smrg    [Whether we need a single "-rpath" flag with a separated argument])
520386dafe34Smrg_LT_TAGDECL([], [hardcode_direct], [0],
520486dafe34Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520586dafe34Smrg    DIR into the resulting binary])
520686dafe34Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
520786dafe34Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520886dafe34Smrg    DIR into the resulting binary and the resulting library dependency is
520986dafe34Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
521086dafe34Smrg    library is relocated])
521186dafe34Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
521286dafe34Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
521386dafe34Smrg    into the resulting binary])
521486dafe34Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
521586dafe34Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
521686dafe34Smrg    into the resulting binary])
521786dafe34Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
521886dafe34Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
521986dafe34Smrg    into the library and all subsequent libraries and executables linked
522086dafe34Smrg    against it])
522186dafe34Smrg_LT_TAGDECL([], [inherit_rpath], [0],
522286dafe34Smrg    [Set to yes if linker adds runtime paths of dependent libraries
522386dafe34Smrg    to runtime path list])
522486dafe34Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
522586dafe34Smrg    [Whether libtool must link a program against all its dependency libraries])
522686dafe34Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
522786dafe34Smrg    [Fix the shell variable $srcfile for the compiler])
522886dafe34Smrg_LT_TAGDECL([], [always_export_symbols], [0],
522986dafe34Smrg    [Set to "yes" if exported symbols are required])
523086dafe34Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
523186dafe34Smrg    [The commands to list exported symbols])
523286dafe34Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
523386dafe34Smrg    [Symbols that should not be listed in the preloaded symbols])
523486dafe34Smrg_LT_TAGDECL([], [include_expsyms], [1],
523586dafe34Smrg    [Symbols that must always be exported])
523686dafe34Smrg_LT_TAGDECL([], [prelink_cmds], [2],
523786dafe34Smrg    [Commands necessary for linking programs (against libraries) with templates])
523886dafe34Smrg_LT_TAGDECL([], [file_list_spec], [1],
523986dafe34Smrg    [Specify filename containing input files])
524086dafe34Smrgdnl FIXME: Not yet implemented
524186dafe34Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
524286dafe34Smrgdnl    [Compiler flag to generate thread safe objects])
524386dafe34Smrg])# _LT_LINKER_SHLIBS
524486dafe34Smrg
524586dafe34Smrg
524686dafe34Smrg# _LT_LANG_C_CONFIG([TAG])
524786dafe34Smrg# ------------------------
524886dafe34Smrg# Ensure that the configuration variables for a C compiler are suitably
524986dafe34Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
525086dafe34Smrg# the compiler configuration to `libtool'.
525186dafe34Smrgm4_defun([_LT_LANG_C_CONFIG],
525286dafe34Smrg[m4_require([_LT_DECL_EGREP])dnl
525386dafe34Smrglt_save_CC="$CC"
525486dafe34SmrgAC_LANG_PUSH(C)
525586dafe34Smrg
525686dafe34Smrg# Source file extension for C test sources.
525786dafe34Smrgac_ext=c
525886dafe34Smrg
525986dafe34Smrg# Object file extension for compiled C test sources.
526086dafe34Smrgobjext=o
526186dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
526286dafe34Smrg
526386dafe34Smrg# Code to be used in simple compile tests
526486dafe34Smrglt_simple_compile_test_code="int some_variable = 0;"
526586dafe34Smrg
526686dafe34Smrg# Code to be used in simple link tests
526786dafe34Smrglt_simple_link_test_code='int main(){return(0);}'
526886dafe34Smrg
526986dafe34Smrg_LT_TAG_COMPILER
527086dafe34Smrg# Save the default compiler, since it gets overwritten when the other
527186dafe34Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
527286dafe34Smrgcompiler_DEFAULT=$CC
527386dafe34Smrg
527486dafe34Smrg# save warnings/boilerplate of simple test code
527586dafe34Smrg_LT_COMPILER_BOILERPLATE
527686dafe34Smrg_LT_LINKER_BOILERPLATE
527786dafe34Smrg
527886dafe34Smrgif test -n "$compiler"; then
527986dafe34Smrg  _LT_COMPILER_NO_RTTI($1)
528086dafe34Smrg  _LT_COMPILER_PIC($1)
528186dafe34Smrg  _LT_COMPILER_C_O($1)
528286dafe34Smrg  _LT_COMPILER_FILE_LOCKS($1)
528386dafe34Smrg  _LT_LINKER_SHLIBS($1)
528486dafe34Smrg  _LT_SYS_DYNAMIC_LINKER($1)
528586dafe34Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
528686dafe34Smrg  LT_SYS_DLOPEN_SELF
528786dafe34Smrg  _LT_CMD_STRIPLIB
528886dafe34Smrg
528986dafe34Smrg  # Report which library types will actually be built
529086dafe34Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
529186dafe34Smrg  AC_MSG_RESULT([$can_build_shared])
529286dafe34Smrg
529386dafe34Smrg  AC_MSG_CHECKING([whether to build shared libraries])
529486dafe34Smrg  test "$can_build_shared" = "no" && enable_shared=no
529586dafe34Smrg
529686dafe34Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
529786dafe34Smrg  # are all built from PIC.
529886dafe34Smrg  case $host_os in
529986dafe34Smrg  aix3*)
530086dafe34Smrg    test "$enable_shared" = yes && enable_static=no
530186dafe34Smrg    if test -n "$RANLIB"; then
530286dafe34Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
530386dafe34Smrg      postinstall_cmds='$RANLIB $lib'
530486dafe34Smrg    fi
530586dafe34Smrg    ;;
530686dafe34Smrg
530786dafe34Smrg  aix[[4-9]]*)
530886dafe34Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
530986dafe34Smrg      test "$enable_shared" = yes && enable_static=no
531086dafe34Smrg    fi
531186dafe34Smrg    ;;
531286dafe34Smrg  esac
531386dafe34Smrg  AC_MSG_RESULT([$enable_shared])
531486dafe34Smrg
531586dafe34Smrg  AC_MSG_CHECKING([whether to build static libraries])
531686dafe34Smrg  # Make sure either enable_shared or enable_static is yes.
531786dafe34Smrg  test "$enable_shared" = yes || enable_static=yes
531886dafe34Smrg  AC_MSG_RESULT([$enable_static])
531986dafe34Smrg
532086dafe34Smrg  _LT_CONFIG($1)
532186dafe34Smrgfi
532286dafe34SmrgAC_LANG_POP
532386dafe34SmrgCC="$lt_save_CC"
532486dafe34Smrg])# _LT_LANG_C_CONFIG
532586dafe34Smrg
532686dafe34Smrg
532786dafe34Smrg# _LT_PROG_CXX
532886dafe34Smrg# ------------
532986dafe34Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
533086dafe34Smrg# compiler, we have our own version here.
533186dafe34Smrgm4_defun([_LT_PROG_CXX],
533286dafe34Smrg[
533386dafe34Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
533486dafe34SmrgAC_PROG_CXX
533586dafe34Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
533686dafe34Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
533786dafe34Smrg    (test "X$CXX" != "Xg++"))) ; then
533886dafe34Smrg  AC_PROG_CXXCPP
533986dafe34Smrgelse
534086dafe34Smrg  _lt_caught_CXX_error=yes
534186dafe34Smrgfi
534286dafe34Smrgpopdef([AC_MSG_ERROR])
534386dafe34Smrg])# _LT_PROG_CXX
534486dafe34Smrg
534586dafe34Smrgdnl aclocal-1.4 backwards compatibility:
534686dafe34Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
534786dafe34Smrg
534886dafe34Smrg
534986dafe34Smrg# _LT_LANG_CXX_CONFIG([TAG])
535086dafe34Smrg# --------------------------
535186dafe34Smrg# Ensure that the configuration variables for a C++ compiler are suitably
535286dafe34Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
535386dafe34Smrg# the compiler configuration to `libtool'.
535486dafe34Smrgm4_defun([_LT_LANG_CXX_CONFIG],
535586dafe34Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
535686dafe34Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
535786dafe34Smrgm4_require([_LT_DECL_EGREP])dnl
535886dafe34Smrg
535986dafe34SmrgAC_LANG_PUSH(C++)
536086dafe34Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
536186dafe34Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
536286dafe34Smrg_LT_TAGVAR(always_export_symbols, $1)=no
536386dafe34Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
536486dafe34Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
536586dafe34Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
536686dafe34Smrg_LT_TAGVAR(hardcode_direct, $1)=no
536786dafe34Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
536886dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
536986dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
537086dafe34Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
537186dafe34Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
537286dafe34Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
537386dafe34Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
537486dafe34Smrg_LT_TAGVAR(inherit_rpath, $1)=no
537586dafe34Smrg_LT_TAGVAR(module_cmds, $1)=
537686dafe34Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
537786dafe34Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
537886dafe34Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
537986dafe34Smrg_LT_TAGVAR(no_undefined_flag, $1)=
538086dafe34Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
538186dafe34Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
538286dafe34Smrg
538386dafe34Smrg# Source file extension for C++ test sources.
538486dafe34Smrgac_ext=cpp
538586dafe34Smrg
538686dafe34Smrg# Object file extension for compiled C++ test sources.
538786dafe34Smrgobjext=o
538886dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
538986dafe34Smrg
539086dafe34Smrg# No sense in running all these tests if we already determined that
539186dafe34Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
539286dafe34Smrg# are currently assumed to apply to all compilers on this platform,
539386dafe34Smrg# and will be corrupted by setting them based on a non-working compiler.
539486dafe34Smrgif test "$_lt_caught_CXX_error" != yes; then
539586dafe34Smrg  # Code to be used in simple compile tests
539686dafe34Smrg  lt_simple_compile_test_code="int some_variable = 0;"
539786dafe34Smrg
539886dafe34Smrg  # Code to be used in simple link tests
539986dafe34Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
540086dafe34Smrg
540186dafe34Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
540286dafe34Smrg  _LT_TAG_COMPILER
540386dafe34Smrg
540486dafe34Smrg  # save warnings/boilerplate of simple test code
540586dafe34Smrg  _LT_COMPILER_BOILERPLATE
540686dafe34Smrg  _LT_LINKER_BOILERPLATE
540786dafe34Smrg
540886dafe34Smrg  # Allow CC to be a program name with arguments.
540986dafe34Smrg  lt_save_CC=$CC
541086dafe34Smrg  lt_save_LD=$LD
541186dafe34Smrg  lt_save_GCC=$GCC
541286dafe34Smrg  GCC=$GXX
541386dafe34Smrg  lt_save_with_gnu_ld=$with_gnu_ld
541486dafe34Smrg  lt_save_path_LD=$lt_cv_path_LD
541586dafe34Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
541686dafe34Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
541786dafe34Smrg  else
541886dafe34Smrg    $as_unset lt_cv_prog_gnu_ld
541986dafe34Smrg  fi
542086dafe34Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
542186dafe34Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
542286dafe34Smrg  else
542386dafe34Smrg    $as_unset lt_cv_path_LD
542486dafe34Smrg  fi
542586dafe34Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
542686dafe34Smrg  CC=${CXX-"c++"}
542786dafe34Smrg  compiler=$CC
542886dafe34Smrg  _LT_TAGVAR(compiler, $1)=$CC
542986dafe34Smrg  _LT_CC_BASENAME([$compiler])
543086dafe34Smrg
543186dafe34Smrg  if test -n "$compiler"; then
543286dafe34Smrg    # We don't want -fno-exception when compiling C++ code, so set the
543386dafe34Smrg    # no_builtin_flag separately
543486dafe34Smrg    if test "$GXX" = yes; then
543586dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
54361ae1b5e8Smrg    else
543786dafe34Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
54381ae1b5e8Smrg    fi
543986dafe34Smrg
544086dafe34Smrg    if test "$GXX" = yes; then
544186dafe34Smrg      # Set up default GNU C++ configuration
544286dafe34Smrg
544386dafe34Smrg      LT_PATH_LD
544486dafe34Smrg
544586dafe34Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
544686dafe34Smrg      # archiving commands below assume that GNU ld is being used.
544786dafe34Smrg      if test "$with_gnu_ld" = yes; then
544886dafe34Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
544986dafe34Smrg        _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'
545086dafe34Smrg
545186dafe34Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
545286dafe34Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
545386dafe34Smrg
545486dafe34Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
545586dafe34Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
545686dafe34Smrg        #     investigate it a little bit more. (MM)
545786dafe34Smrg        wlarc='${wl}'
545886dafe34Smrg
545986dafe34Smrg        # ancient GNU ld didn't support --whole-archive et. al.
546086dafe34Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
546186dafe34Smrg	  $GREP 'no-whole-archive' > /dev/null; then
546286dafe34Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
546386dafe34Smrg        else
546486dafe34Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
54651ae1b5e8Smrg        fi
54661ae1b5e8Smrg      else
546786dafe34Smrg        with_gnu_ld=no
546886dafe34Smrg        wlarc=
546986dafe34Smrg
547086dafe34Smrg        # A generic and very simple default shared library creation
547186dafe34Smrg        # command for GNU C++ for the case where it uses the native
547286dafe34Smrg        # linker, instead of GNU ld.  If possible, this setting should
547386dafe34Smrg        # overridden to take advantage of the native linker features on
547486dafe34Smrg        # the platform it is being used on.
547586dafe34Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
54761ae1b5e8Smrg      fi
547776888252Smrg
54781ae1b5e8Smrg      # Commands to make compiler produce verbose output that lists
54791ae1b5e8Smrg      # what "hidden" libraries, object files and flags are used when
54801ae1b5e8Smrg      # linking a shared library.
548186dafe34Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
54821ae1b5e8Smrg
548386dafe34Smrg    else
548486dafe34Smrg      GXX=no
548586dafe34Smrg      with_gnu_ld=no
548686dafe34Smrg      wlarc=
54871ae1b5e8Smrg    fi
54881ae1b5e8Smrg
548986dafe34Smrg    # PORTME: fill in a description of your system's C++ link characteristics
549086dafe34Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
549186dafe34Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
549286dafe34Smrg    case $host_os in
549386dafe34Smrg      aix3*)
549486dafe34Smrg        # FIXME: insert proper C++ library support
549586dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
549686dafe34Smrg        ;;
549786dafe34Smrg      aix[[4-9]]*)
549886dafe34Smrg        if test "$host_cpu" = ia64; then
549986dafe34Smrg          # On IA64, the linker does run time linking by default, so we don't
550086dafe34Smrg          # have to do anything special.
550186dafe34Smrg          aix_use_runtimelinking=no
550286dafe34Smrg          exp_sym_flag='-Bexport'
550386dafe34Smrg          no_entry_flag=""
550486dafe34Smrg        else
550586dafe34Smrg          aix_use_runtimelinking=no
550686dafe34Smrg
550786dafe34Smrg          # Test if we are trying to use run time linking or normal
550886dafe34Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
550986dafe34Smrg          # need to do runtime linking.
551086dafe34Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
551186dafe34Smrg	    for ld_flag in $LDFLAGS; do
551286dafe34Smrg	      case $ld_flag in
551386dafe34Smrg	      *-brtl*)
551486dafe34Smrg	        aix_use_runtimelinking=yes
551586dafe34Smrg	        break
551686dafe34Smrg	        ;;
551786dafe34Smrg	      esac
551886dafe34Smrg	    done
551986dafe34Smrg	    ;;
552086dafe34Smrg          esac
552186dafe34Smrg
552286dafe34Smrg          exp_sym_flag='-bexport'
552386dafe34Smrg          no_entry_flag='-bnoentry'
552486dafe34Smrg        fi
552586dafe34Smrg
552686dafe34Smrg        # When large executables or shared objects are built, AIX ld can
552786dafe34Smrg        # have problems creating the table of contents.  If linking a library
552886dafe34Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
552986dafe34Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
553086dafe34Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
553186dafe34Smrg
553286dafe34Smrg        _LT_TAGVAR(archive_cmds, $1)=''
553386dafe34Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
553486dafe34Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
553586dafe34Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
553686dafe34Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
553786dafe34Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
553886dafe34Smrg
553986dafe34Smrg        if test "$GXX" = yes; then
554086dafe34Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
554186dafe34Smrg          # We only want to do this on AIX 4.2 and lower, the check
554286dafe34Smrg          # below for broken collect2 doesn't work under 4.3+
554386dafe34Smrg	  collect2name=`${CC} -print-prog-name=collect2`
554486dafe34Smrg	  if test -f "$collect2name" &&
554586dafe34Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
554686dafe34Smrg	  then
554786dafe34Smrg	    # We have reworked collect2
554886dafe34Smrg	    :
55491ae1b5e8Smrg	  else
555086dafe34Smrg	    # We have old collect2
555186dafe34Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
555286dafe34Smrg	    # It fails to find uninstalled libraries when the uninstalled
555386dafe34Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
555486dafe34Smrg	    # to unsupported forces relinking
555586dafe34Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
555686dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
555786dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
555886dafe34Smrg	  fi
555986dafe34Smrg          esac
556086dafe34Smrg          shared_flag='-shared'
556186dafe34Smrg	  if test "$aix_use_runtimelinking" = yes; then
556286dafe34Smrg	    shared_flag="$shared_flag "'${wl}-G'
55631ae1b5e8Smrg	  fi
556486dafe34Smrg        else
556586dafe34Smrg          # not using gcc
556686dafe34Smrg          if test "$host_cpu" = ia64; then
556786dafe34Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
556886dafe34Smrg	  # chokes on -Wl,-G. The following line is correct:
556986dafe34Smrg	  shared_flag='-G'
557086dafe34Smrg          else
557186dafe34Smrg	    if test "$aix_use_runtimelinking" = yes; then
557286dafe34Smrg	      shared_flag='${wl}-G'
557386dafe34Smrg	    else
557486dafe34Smrg	      shared_flag='${wl}-bM:SRE'
557586dafe34Smrg	    fi
557686dafe34Smrg          fi
557786dafe34Smrg        fi
557886dafe34Smrg
557986dafe34Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
558086dafe34Smrg        # It seems that -bexpall does not export symbols beginning with
558186dafe34Smrg        # underscore (_), so it is better to generate a list of symbols to
558286dafe34Smrg	# export.
558386dafe34Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
558486dafe34Smrg        if test "$aix_use_runtimelinking" = yes; then
558586dafe34Smrg          # Warning - without using the other runtime loading flags (-brtl),
558686dafe34Smrg          # -berok will link without error, but may produce a broken library.
558786dafe34Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
558886dafe34Smrg          # Determine the default libpath from the value encoded in an empty
558986dafe34Smrg          # executable.
559086dafe34Smrg          _LT_SYS_MODULE_PATH_AIX
559186dafe34Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
559286dafe34Smrg
559386dafe34Smrg          _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"
559486dafe34Smrg        else
559586dafe34Smrg          if test "$host_cpu" = ia64; then
559686dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
559786dafe34Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
559886dafe34Smrg	    _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"
559986dafe34Smrg          else
560086dafe34Smrg	    # Determine the default libpath from the value encoded in an
560186dafe34Smrg	    # empty executable.
560286dafe34Smrg	    _LT_SYS_MODULE_PATH_AIX
560386dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
560486dafe34Smrg	    # Warning - without using the other run time loading flags,
560586dafe34Smrg	    # -berok will link without error, but may produce a broken library.
560686dafe34Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
560786dafe34Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
560886dafe34Smrg	    # Exported symbols can be pulled into shared objects from archives
560986dafe34Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
561086dafe34Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
561186dafe34Smrg	    # This is similar to how AIX traditionally builds its shared
561286dafe34Smrg	    # libraries.
561386dafe34Smrg	    _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'
561486dafe34Smrg          fi
561586dafe34Smrg        fi
561686dafe34Smrg        ;;
561786dafe34Smrg
561886dafe34Smrg      beos*)
561986dafe34Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
562086dafe34Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
562186dafe34Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
562286dafe34Smrg	  # support --undefined.  This deserves some investigation.  FIXME
562386dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
562486dafe34Smrg	else
562586dafe34Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56261ae1b5e8Smrg	fi
562776888252Smrg	;;
562886dafe34Smrg
562986dafe34Smrg      chorus*)
563086dafe34Smrg        case $cc_basename in
563186dafe34Smrg          *)
563286dafe34Smrg	  # FIXME: insert proper C++ library support
563386dafe34Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56341ae1b5e8Smrg	  ;;
563586dafe34Smrg        esac
56361ae1b5e8Smrg        ;;
56371ae1b5e8Smrg
563886dafe34Smrg      cygwin* | mingw* | pw32* | cegcc*)
563986dafe34Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
564086dafe34Smrg        # as there is no search path for DLLs.
564186dafe34Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
564286dafe34Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
564386dafe34Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
564486dafe34Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
564586dafe34Smrg
564686dafe34Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
564786dafe34Smrg          _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'
564886dafe34Smrg          # If the export-symbols file already is a .def file (1st line
564986dafe34Smrg          # is EXPORTS), use it as is; otherwise, prepend...
565086dafe34Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
565186dafe34Smrg	    cp $export_symbols $output_objdir/$soname.def;
565286dafe34Smrg          else
565386dafe34Smrg	    echo EXPORTS > $output_objdir/$soname.def;
565486dafe34Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
565586dafe34Smrg          fi~
565686dafe34Smrg          $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'
565786dafe34Smrg        else
565886dafe34Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
565986dafe34Smrg        fi
566086dafe34Smrg        ;;
566186dafe34Smrg      darwin* | rhapsody*)
566286dafe34Smrg        _LT_DARWIN_LINKER_FEATURES($1)
566376888252Smrg	;;
56641ae1b5e8Smrg
566586dafe34Smrg      dgux*)
566686dafe34Smrg        case $cc_basename in
566786dafe34Smrg          ec++*)
566886dafe34Smrg	    # FIXME: insert proper C++ library support
566986dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567086dafe34Smrg	    ;;
567186dafe34Smrg          ghcx*)
567286dafe34Smrg	    # Green Hills C++ Compiler
567386dafe34Smrg	    # FIXME: insert proper C++ library support
567486dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567586dafe34Smrg	    ;;
567686dafe34Smrg          *)
567786dafe34Smrg	    # FIXME: insert proper C++ library support
567886dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
567986dafe34Smrg	    ;;
568086dafe34Smrg        esac
568186dafe34Smrg        ;;
56821ae1b5e8Smrg
568386dafe34Smrg      freebsd[[12]]*)
568486dafe34Smrg        # C++ shared libraries reported to be fairly broken before
568586dafe34Smrg	# switch to ELF
568686dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
568786dafe34Smrg        ;;
56881ae1b5e8Smrg
568986dafe34Smrg      freebsd-elf*)
569086dafe34Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
569186dafe34Smrg        ;;
56921ae1b5e8Smrg
569386dafe34Smrg      freebsd* | dragonfly*)
569486dafe34Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
569586dafe34Smrg        # conventions
569686dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
569786dafe34Smrg        ;;
56981ae1b5e8Smrg
569986dafe34Smrg      gnu*)
570086dafe34Smrg        ;;
57011ae1b5e8Smrg
570286dafe34Smrg      hpux9*)
570386dafe34Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
570486dafe34Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
570586dafe34Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
570686dafe34Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
570786dafe34Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
570886dafe34Smrg				             # but as the default
570986dafe34Smrg				             # location of the library.
571086dafe34Smrg
571186dafe34Smrg        case $cc_basename in
571286dafe34Smrg          CC*)
571386dafe34Smrg            # FIXME: insert proper C++ library support
571486dafe34Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
571586dafe34Smrg            ;;
571686dafe34Smrg          aCC*)
571786dafe34Smrg            _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'
571886dafe34Smrg            # Commands to make compiler produce verbose output that lists
571986dafe34Smrg            # what "hidden" libraries, object files and flags are used when
572086dafe34Smrg            # linking a shared library.
572186dafe34Smrg            #
572286dafe34Smrg            # There doesn't appear to be a way to prevent this compiler from
572386dafe34Smrg            # explicitly linking system object files so we need to strip them
572486dafe34Smrg            # from the output so that they don't get included in the library
572586dafe34Smrg            # dependencies.
572686dafe34Smrg            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'
572786dafe34Smrg            ;;
572886dafe34Smrg          *)
572986dafe34Smrg            if test "$GXX" = yes; then
573086dafe34Smrg              _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'
573186dafe34Smrg            else
573286dafe34Smrg              # FIXME: insert proper C++ library support
573386dafe34Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
573486dafe34Smrg            fi
573586dafe34Smrg            ;;
573686dafe34Smrg        esac
573786dafe34Smrg        ;;
57381ae1b5e8Smrg
573986dafe34Smrg      hpux10*|hpux11*)
574086dafe34Smrg        if test $with_gnu_ld = no; then
574186dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
574286dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
574386dafe34Smrg
574486dafe34Smrg          case $host_cpu in
574586dafe34Smrg            hppa*64*|ia64*)
574686dafe34Smrg              ;;
574786dafe34Smrg            *)
574886dafe34Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
574986dafe34Smrg              ;;
575086dafe34Smrg          esac
575186dafe34Smrg        fi
575286dafe34Smrg        case $host_cpu in
575386dafe34Smrg          hppa*64*|ia64*)
575486dafe34Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
575586dafe34Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
575686dafe34Smrg            ;;
575786dafe34Smrg          *)
575886dafe34Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
575986dafe34Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
576086dafe34Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
576186dafe34Smrg					         # but as the default
576286dafe34Smrg					         # location of the library.
576386dafe34Smrg            ;;
576486dafe34Smrg        esac
57651ae1b5e8Smrg
576686dafe34Smrg        case $cc_basename in
576786dafe34Smrg          CC*)
576886dafe34Smrg	    # FIXME: insert proper C++ library support
576986dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
57701ae1b5e8Smrg	    ;;
577186dafe34Smrg          aCC*)
577286dafe34Smrg	    case $host_cpu in
577386dafe34Smrg	      hppa*64*)
577486dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577586dafe34Smrg	        ;;
577686dafe34Smrg	      ia64*)
577786dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577886dafe34Smrg	        ;;
577986dafe34Smrg	      *)
578086dafe34Smrg	        _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'
578186dafe34Smrg	        ;;
578286dafe34Smrg	    esac
57831ae1b5e8Smrg	    # Commands to make compiler produce verbose output that lists
57841ae1b5e8Smrg	    # what "hidden" libraries, object files and flags are used when
57851ae1b5e8Smrg	    # linking a shared library.
578686dafe34Smrg	    #
578786dafe34Smrg	    # There doesn't appear to be a way to prevent this compiler from
578886dafe34Smrg	    # explicitly linking system object files so we need to strip them
578986dafe34Smrg	    # from the output so that they don't get included in the library
579086dafe34Smrg	    # dependencies.
579186dafe34Smrg	    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'
579286dafe34Smrg	    ;;
579386dafe34Smrg          *)
579486dafe34Smrg	    if test "$GXX" = yes; then
579586dafe34Smrg	      if test $with_gnu_ld = no; then
579686dafe34Smrg	        case $host_cpu in
579786dafe34Smrg	          hppa*64*)
579886dafe34Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
579986dafe34Smrg	            ;;
580086dafe34Smrg	          ia64*)
580186dafe34Smrg	            _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'
580286dafe34Smrg	            ;;
580386dafe34Smrg	          *)
580486dafe34Smrg	            _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'
580586dafe34Smrg	            ;;
580686dafe34Smrg	        esac
580786dafe34Smrg	      fi
580886dafe34Smrg	    else
580986dafe34Smrg	      # FIXME: insert proper C++ library support
581086dafe34Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
581186dafe34Smrg	    fi
581286dafe34Smrg	    ;;
581386dafe34Smrg        esac
581486dafe34Smrg        ;;
581586dafe34Smrg
581686dafe34Smrg      interix[[3-9]]*)
581786dafe34Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
581886dafe34Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
581986dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
582086dafe34Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
582186dafe34Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
582286dafe34Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
582386dafe34Smrg	# default) and relocated if they conflict, which is a slow very memory
582486dafe34Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
582586dafe34Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
582686dafe34Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
582786dafe34Smrg	_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'
582886dafe34Smrg	_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'
582986dafe34Smrg	;;
583086dafe34Smrg      irix5* | irix6*)
583186dafe34Smrg        case $cc_basename in
583286dafe34Smrg          CC*)
583386dafe34Smrg	    # SGI C++
583486dafe34Smrg	    _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'
583586dafe34Smrg
583686dafe34Smrg	    # Archives containing C++ object files must be created using
583786dafe34Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
583886dafe34Smrg	    # necessary to make sure instantiated templates are included
583986dafe34Smrg	    # in the archive.
584086dafe34Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
584186dafe34Smrg	    ;;
584286dafe34Smrg          *)
584386dafe34Smrg	    if test "$GXX" = yes; then
584486dafe34Smrg	      if test "$with_gnu_ld" = no; then
584586dafe34Smrg	        _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'
584686dafe34Smrg	      else
584786dafe34Smrg	        _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'
584886dafe34Smrg	      fi
584986dafe34Smrg	    fi
585086dafe34Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
585186dafe34Smrg	    ;;
585286dafe34Smrg        esac
585386dafe34Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
585486dafe34Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
585586dafe34Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
585686dafe34Smrg        ;;
58571ae1b5e8Smrg
585886dafe34Smrg      linux* | k*bsd*-gnu)
585986dafe34Smrg        case $cc_basename in
586086dafe34Smrg          KCC*)
586186dafe34Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
586286dafe34Smrg
586386dafe34Smrg	    # KCC will only create a shared library if the output file
586486dafe34Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
586586dafe34Smrg	    # to its proper name (with version) after linking.
586686dafe34Smrg	    _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'
586786dafe34Smrg	    _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'
58681ae1b5e8Smrg	    # Commands to make compiler produce verbose output that lists
58691ae1b5e8Smrg	    # what "hidden" libraries, object files and flags are used when
58701ae1b5e8Smrg	    # linking a shared library.
587186dafe34Smrg	    #
587286dafe34Smrg	    # There doesn't appear to be a way to prevent this compiler from
587386dafe34Smrg	    # explicitly linking system object files so we need to strip them
587486dafe34Smrg	    # from the output so that they don't get included in the library
587586dafe34Smrg	    # dependencies.
587686dafe34Smrg	    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'
587786dafe34Smrg
587886dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
587986dafe34Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
588086dafe34Smrg
588186dafe34Smrg	    # Archives containing C++ object files must be created using
588286dafe34Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
588386dafe34Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
588486dafe34Smrg	    ;;
588586dafe34Smrg	  icpc* | ecpc* )
588686dafe34Smrg	    # Intel C++
588786dafe34Smrg	    with_gnu_ld=yes
588886dafe34Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
588986dafe34Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
589086dafe34Smrg	    # earlier do not add the objects themselves.
589186dafe34Smrg	    case `$CC -V 2>&1` in
589286dafe34Smrg	      *"Version 7."*)
589386dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
589486dafe34Smrg		_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'
589586dafe34Smrg		;;
589686dafe34Smrg	      *)  # Version 8.0 or newer
589786dafe34Smrg	        tmp_idyn=
589886dafe34Smrg	        case $host_cpu in
589986dafe34Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
590086dafe34Smrg		esac
590186dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
590286dafe34Smrg		_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'
590386dafe34Smrg		;;
590486dafe34Smrg	    esac
590586dafe34Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
590686dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
590786dafe34Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
590886dafe34Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
590986dafe34Smrg	    ;;
591086dafe34Smrg          pgCC* | pgcpp*)
591186dafe34Smrg            # Portland Group C++ compiler
591286dafe34Smrg	    case `$CC -V` in
591386dafe34Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
591486dafe34Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
591586dafe34Smrg		rm -rf $tpldir~
591686dafe34Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
591786dafe34Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
591886dafe34Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
591986dafe34Smrg		rm -rf $tpldir~
592086dafe34Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
592186dafe34Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
592286dafe34Smrg		$RANLIB $oldlib'
592386dafe34Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
592486dafe34Smrg		rm -rf $tpldir~
592586dafe34Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
592686dafe34Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
592786dafe34Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
592886dafe34Smrg		rm -rf $tpldir~
592986dafe34Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
593086dafe34Smrg		$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'
593186dafe34Smrg	      ;;
593286dafe34Smrg	    *) # Version 6 will use weak symbols
593386dafe34Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
593486dafe34Smrg	      _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'
593586dafe34Smrg	      ;;
593686dafe34Smrg	    esac
59371ae1b5e8Smrg
593886dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
593986dafe34Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
594086dafe34Smrg	    _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'
594186dafe34Smrg            ;;
594286dafe34Smrg	  cxx*)
594386dafe34Smrg	    # Compaq C++
594486dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
594586dafe34Smrg	    _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'
594686dafe34Smrg
594786dafe34Smrg	    runpath_var=LD_RUN_PATH
594886dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
594986dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
595086dafe34Smrg
595186dafe34Smrg	    # Commands to make compiler produce verbose output that lists
595286dafe34Smrg	    # what "hidden" libraries, object files and flags are used when
595386dafe34Smrg	    # linking a shared library.
595486dafe34Smrg	    #
595586dafe34Smrg	    # There doesn't appear to be a way to prevent this compiler from
595686dafe34Smrg	    # explicitly linking system object files so we need to strip them
595786dafe34Smrg	    # from the output so that they don't get included in the library
595886dafe34Smrg	    # dependencies.
595986dafe34Smrg	    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'
596086dafe34Smrg	    ;;
596186dafe34Smrg	  xl*)
596286dafe34Smrg	    # IBM XL 8.0 on PPC, with GNU ld
596386dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
596486dafe34Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
596586dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
596686dafe34Smrg	    if test "x$supports_anon_versioning" = xyes; then
596786dafe34Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
596886dafe34Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
596986dafe34Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
597086dafe34Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
597186dafe34Smrg	    fi
597286dafe34Smrg	    ;;
597386dafe34Smrg	  *)
597486dafe34Smrg	    case `$CC -V 2>&1 | sed 5q` in
597586dafe34Smrg	    *Sun\ C*)
597686dafe34Smrg	      # Sun C++ 5.9
597786dafe34Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
597886dafe34Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
597986dafe34Smrg	      _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'
598086dafe34Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
598186dafe34Smrg	      _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'
598286dafe34Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
598386dafe34Smrg
598486dafe34Smrg	      # Not sure whether something based on
598586dafe34Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
598686dafe34Smrg	      # would be better.
598786dafe34Smrg	      output_verbose_link_cmd='echo'
598886dafe34Smrg
598986dafe34Smrg	      # Archives containing C++ object files must be created using
599086dafe34Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
599186dafe34Smrg	      # necessary to make sure instantiated templates are included
599286dafe34Smrg	      # in the archive.
599386dafe34Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
599486dafe34Smrg	      ;;
599586dafe34Smrg	    esac
599686dafe34Smrg	    ;;
599786dafe34Smrg	esac
59981ae1b5e8Smrg	;;
599986dafe34Smrg
600086dafe34Smrg      lynxos*)
600186dafe34Smrg        # FIXME: insert proper C++ library support
600286dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60031ae1b5e8Smrg	;;
600486dafe34Smrg
600586dafe34Smrg      m88k*)
600686dafe34Smrg        # FIXME: insert proper C++ library support
600786dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
60081ae1b5e8Smrg	;;
600986dafe34Smrg
601086dafe34Smrg      mvs*)
601186dafe34Smrg        case $cc_basename in
601286dafe34Smrg          cxx*)
601386dafe34Smrg	    # FIXME: insert proper C++ library support
601486dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
601586dafe34Smrg	    ;;
601686dafe34Smrg	  *)
601786dafe34Smrg	    # FIXME: insert proper C++ library support
601886dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
601986dafe34Smrg	    ;;
602086dafe34Smrg	esac
60211ae1b5e8Smrg	;;
602286dafe34Smrg
602386dafe34Smrg      netbsd*)
602486dafe34Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
602586dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
602686dafe34Smrg	  wlarc=
602786dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
602886dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
602986dafe34Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
603086dafe34Smrg	fi
603186dafe34Smrg	# Workaround some broken pre-1.5 toolchains
603286dafe34Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
60331ae1b5e8Smrg	;;
603486dafe34Smrg
603586dafe34Smrg      *nto* | *qnx*)
603686dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
60371ae1b5e8Smrg	;;
603886dafe34Smrg
603986dafe34Smrg      openbsd2*)
604086dafe34Smrg        # C++ shared libraries are fairly broken
604186dafe34Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60421ae1b5e8Smrg	;;
60431ae1b5e8Smrg
604486dafe34Smrg      openbsd*)
604586dafe34Smrg	if test -f /usr/libexec/ld.so; then
604686dafe34Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
604786dafe34Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
604886dafe34Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
604986dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
605086dafe34Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
605186dafe34Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
605286dafe34Smrg	    _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'
605386dafe34Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
605486dafe34Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
605586dafe34Smrg	  fi
605686dafe34Smrg	  output_verbose_link_cmd=echo
605786dafe34Smrg	else
605886dafe34Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
605986dafe34Smrg	fi
606086dafe34Smrg	;;
606186dafe34Smrg
606286dafe34Smrg      osf3* | osf4* | osf5*)
606386dafe34Smrg        case $cc_basename in
606486dafe34Smrg          KCC*)
606586dafe34Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
606686dafe34Smrg
606786dafe34Smrg	    # KCC will only create a shared library if the output file
606886dafe34Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
606986dafe34Smrg	    # to its proper name (with version) after linking.
607086dafe34Smrg	    _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'
607186dafe34Smrg
607286dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
607386dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
607486dafe34Smrg
607586dafe34Smrg	    # Archives containing C++ object files must be created using
607686dafe34Smrg	    # the KAI C++ compiler.
607786dafe34Smrg	    case $host in
607886dafe34Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
607986dafe34Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
608086dafe34Smrg	    esac
608186dafe34Smrg	    ;;
608286dafe34Smrg          RCC*)
608386dafe34Smrg	    # Rational C++ 2.4.1
608486dafe34Smrg	    # FIXME: insert proper C++ library support
608586dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
608686dafe34Smrg	    ;;
608786dafe34Smrg          cxx*)
608886dafe34Smrg	    case $host in
608986dafe34Smrg	      osf3*)
609086dafe34Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
609186dafe34Smrg	        _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'
609286dafe34Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
609386dafe34Smrg		;;
609486dafe34Smrg	      *)
609586dafe34Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
609686dafe34Smrg	        _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'
609786dafe34Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
609886dafe34Smrg	          echo "-hidden">> $lib.exp~
609986dafe34Smrg	          $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~
610086dafe34Smrg	          $RM $lib.exp'
610186dafe34Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
610286dafe34Smrg		;;
610386dafe34Smrg	    esac
610486dafe34Smrg
610586dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
610686dafe34Smrg
610786dafe34Smrg	    # Commands to make compiler produce verbose output that lists
610886dafe34Smrg	    # what "hidden" libraries, object files and flags are used when
610986dafe34Smrg	    # linking a shared library.
611086dafe34Smrg	    #
611186dafe34Smrg	    # There doesn't appear to be a way to prevent this compiler from
611286dafe34Smrg	    # explicitly linking system object files so we need to strip them
611386dafe34Smrg	    # from the output so that they don't get included in the library
611486dafe34Smrg	    # dependencies.
611586dafe34Smrg	    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'
611686dafe34Smrg	    ;;
611786dafe34Smrg	  *)
611886dafe34Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
611986dafe34Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
612086dafe34Smrg	      case $host in
612186dafe34Smrg	        osf3*)
612286dafe34Smrg	          _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'
612386dafe34Smrg		  ;;
612486dafe34Smrg	        *)
612586dafe34Smrg	          _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'
612686dafe34Smrg		  ;;
612786dafe34Smrg	      esac
612886dafe34Smrg
612986dafe34Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
613086dafe34Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
613186dafe34Smrg
613286dafe34Smrg	      # Commands to make compiler produce verbose output that lists
613386dafe34Smrg	      # what "hidden" libraries, object files and flags are used when
613486dafe34Smrg	      # linking a shared library.
613586dafe34Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
613686dafe34Smrg
613786dafe34Smrg	    else
613886dafe34Smrg	      # FIXME: insert proper C++ library support
613986dafe34Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
614086dafe34Smrg	    fi
614186dafe34Smrg	    ;;
614286dafe34Smrg        esac
614386dafe34Smrg        ;;
614486dafe34Smrg
614586dafe34Smrg      psos*)
614686dafe34Smrg        # FIXME: insert proper C++ library support
614786dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
614886dafe34Smrg        ;;
614986dafe34Smrg
615086dafe34Smrg      sunos4*)
615186dafe34Smrg        case $cc_basename in
615286dafe34Smrg          CC*)
615386dafe34Smrg	    # Sun C++ 4.x
615486dafe34Smrg	    # FIXME: insert proper C++ library support
615586dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
615686dafe34Smrg	    ;;
615786dafe34Smrg          lcc*)
615886dafe34Smrg	    # Lucid
615986dafe34Smrg	    # FIXME: insert proper C++ library support
616086dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
616186dafe34Smrg	    ;;
616286dafe34Smrg          *)
616386dafe34Smrg	    # FIXME: insert proper C++ library support
616486dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
616586dafe34Smrg	    ;;
616686dafe34Smrg        esac
616786dafe34Smrg        ;;
616886dafe34Smrg
616986dafe34Smrg      solaris*)
617086dafe34Smrg        case $cc_basename in
617186dafe34Smrg          CC*)
617286dafe34Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
617386dafe34Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
617486dafe34Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
617586dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
617686dafe34Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
617786dafe34Smrg	      $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'
617886dafe34Smrg
617986dafe34Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
618086dafe34Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
618186dafe34Smrg	    case $host_os in
618286dafe34Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
618386dafe34Smrg	      *)
618486dafe34Smrg		# The compiler driver will combine and reorder linker options,
618586dafe34Smrg		# but understands `-z linker_flag'.
618686dafe34Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
618786dafe34Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
618886dafe34Smrg	        ;;
618986dafe34Smrg	    esac
619086dafe34Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
619186dafe34Smrg
619286dafe34Smrg	    output_verbose_link_cmd='echo'
619386dafe34Smrg
619486dafe34Smrg	    # Archives containing C++ object files must be created using
619586dafe34Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
619686dafe34Smrg	    # necessary to make sure instantiated templates are included
619786dafe34Smrg	    # in the archive.
619886dafe34Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
619986dafe34Smrg	    ;;
620086dafe34Smrg          gcx*)
620186dafe34Smrg	    # Green Hills C++ Compiler
620286dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
620386dafe34Smrg
620486dafe34Smrg	    # The C++ compiler must be used to create the archive.
620586dafe34Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
620686dafe34Smrg	    ;;
620786dafe34Smrg          *)
620886dafe34Smrg	    # GNU C++ compiler with Solaris linker
620986dafe34Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
621086dafe34Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
621186dafe34Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
621286dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
621386dafe34Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
621486dafe34Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
621586dafe34Smrg
621686dafe34Smrg	        # Commands to make compiler produce verbose output that lists
621786dafe34Smrg	        # what "hidden" libraries, object files and flags are used when
621886dafe34Smrg	        # linking a shared library.
621986dafe34Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
622086dafe34Smrg	      else
622186dafe34Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
622286dafe34Smrg	        # platform.
622386dafe34Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
622486dafe34Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
622586dafe34Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
622686dafe34Smrg
622786dafe34Smrg	        # Commands to make compiler produce verbose output that lists
622886dafe34Smrg	        # what "hidden" libraries, object files and flags are used when
622986dafe34Smrg	        # linking a shared library.
623086dafe34Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
623186dafe34Smrg	      fi
623286dafe34Smrg
623386dafe34Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
623486dafe34Smrg	      case $host_os in
623586dafe34Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
623686dafe34Smrg		*)
623786dafe34Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
623886dafe34Smrg		  ;;
623986dafe34Smrg	      esac
624086dafe34Smrg	    fi
624186dafe34Smrg	    ;;
624286dafe34Smrg        esac
624386dafe34Smrg        ;;
624486dafe34Smrg
624586dafe34Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
624686dafe34Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
624786dafe34Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
624886dafe34Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
624986dafe34Smrg      runpath_var='LD_RUN_PATH'
625086dafe34Smrg
625186dafe34Smrg      case $cc_basename in
625286dafe34Smrg        CC*)
625386dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625486dafe34Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625586dafe34Smrg	  ;;
625686dafe34Smrg	*)
625786dafe34Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625886dafe34Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625986dafe34Smrg	  ;;
626086dafe34Smrg      esac
626186dafe34Smrg      ;;
626286dafe34Smrg
626386dafe34Smrg      sysv5* | sco3.2v5* | sco5v6*)
626486dafe34Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
626586dafe34Smrg	# link with -lc, and that would cause any symbols used from libc to
626686dafe34Smrg	# always be unresolved, which means just about no library would
626786dafe34Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
626886dafe34Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
626986dafe34Smrg	# as -z defs.
627086dafe34Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
627186dafe34Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
627286dafe34Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
627386dafe34Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
627486dafe34Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
627586dafe34Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
627686dafe34Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
627786dafe34Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
627886dafe34Smrg	runpath_var='LD_RUN_PATH'
627986dafe34Smrg
628086dafe34Smrg	case $cc_basename in
628186dafe34Smrg          CC*)
628286dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628386dafe34Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628486dafe34Smrg	    ;;
628586dafe34Smrg	  *)
628686dafe34Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628786dafe34Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628886dafe34Smrg	    ;;
628986dafe34Smrg	esac
629086dafe34Smrg      ;;
629186dafe34Smrg
629286dafe34Smrg      tandem*)
629386dafe34Smrg        case $cc_basename in
629486dafe34Smrg          NCC*)
629586dafe34Smrg	    # NonStop-UX NCC 3.20
629686dafe34Smrg	    # FIXME: insert proper C++ library support
629786dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
629886dafe34Smrg	    ;;
629986dafe34Smrg          *)
630086dafe34Smrg	    # FIXME: insert proper C++ library support
630186dafe34Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
630286dafe34Smrg	    ;;
630386dafe34Smrg        esac
630486dafe34Smrg        ;;
630586dafe34Smrg
630686dafe34Smrg      vxworks*)
630786dafe34Smrg        # FIXME: insert proper C++ library support
630886dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
630986dafe34Smrg        ;;
63101ae1b5e8Smrg
631186dafe34Smrg      *)
631286dafe34Smrg        # FIXME: insert proper C++ library support
631386dafe34Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
631486dafe34Smrg        ;;
631586dafe34Smrg    esac
63161ae1b5e8Smrg
631786dafe34Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
631886dafe34Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
631986dafe34Smrg
632086dafe34Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
632186dafe34Smrg    _LT_TAGVAR(LD, $1)="$LD"
632286dafe34Smrg
632386dafe34Smrg    ## CAVEAT EMPTOR:
632486dafe34Smrg    ## There is no encapsulation within the following macros, do not change
632586dafe34Smrg    ## the running order or otherwise move them around unless you know exactly
632686dafe34Smrg    ## what you are doing...
632786dafe34Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
632886dafe34Smrg    _LT_COMPILER_PIC($1)
632986dafe34Smrg    _LT_COMPILER_C_O($1)
633086dafe34Smrg    _LT_COMPILER_FILE_LOCKS($1)
633186dafe34Smrg    _LT_LINKER_SHLIBS($1)
633286dafe34Smrg    _LT_SYS_DYNAMIC_LINKER($1)
633386dafe34Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
633486dafe34Smrg
633586dafe34Smrg    _LT_CONFIG($1)
633686dafe34Smrg  fi # test -n "$compiler"
633786dafe34Smrg
633886dafe34Smrg  CC=$lt_save_CC
633986dafe34Smrg  LDCXX=$LD
634086dafe34Smrg  LD=$lt_save_LD
634186dafe34Smrg  GCC=$lt_save_GCC
634286dafe34Smrg  with_gnu_ld=$lt_save_with_gnu_ld
634386dafe34Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
634486dafe34Smrg  lt_cv_path_LD=$lt_save_path_LD
634586dafe34Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
634686dafe34Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
634786dafe34Smrgfi # test "$_lt_caught_CXX_error" != yes
63481ae1b5e8Smrg
63491ae1b5e8SmrgAC_LANG_POP
635086dafe34Smrg])# _LT_LANG_CXX_CONFIG
635186dafe34Smrg
635286dafe34Smrg
635386dafe34Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
635486dafe34Smrg# ---------------------------------
63551ae1b5e8Smrg# Figure out "hidden" library dependencies from verbose
63561ae1b5e8Smrg# compiler output when linking a shared library.
63571ae1b5e8Smrg# Parse the compiler output and extract the necessary
63581ae1b5e8Smrg# objects, libraries and library flags.
635986dafe34Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
636086dafe34Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
636186dafe34Smrg# Dependencies to place before and after the object being linked:
636286dafe34Smrg_LT_TAGVAR(predep_objects, $1)=
636386dafe34Smrg_LT_TAGVAR(postdep_objects, $1)=
636486dafe34Smrg_LT_TAGVAR(predeps, $1)=
636586dafe34Smrg_LT_TAGVAR(postdeps, $1)=
636686dafe34Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
636786dafe34Smrg
63681ae1b5e8Smrgdnl we can't use the lt_simple_compile_test_code here,
63691ae1b5e8Smrgdnl because it contains code intended for an executable,
63701ae1b5e8Smrgdnl not a library.  It's possible we should let each
63711ae1b5e8Smrgdnl tag define a new lt_????_link_test_code variable,
63721ae1b5e8Smrgdnl but it's only used here...
637386dafe34Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
63741ae1b5e8Smrgint a;
63751ae1b5e8Smrgvoid foo (void) { a = 0; }
637686dafe34Smrg_LT_EOF
637786dafe34Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
63781ae1b5e8Smrgclass Foo
63791ae1b5e8Smrg{
63801ae1b5e8Smrgpublic:
63811ae1b5e8Smrg  Foo (void) { a = 0; }
63821ae1b5e8Smrgprivate:
63831ae1b5e8Smrg  int a;
63841ae1b5e8Smrg};
638586dafe34Smrg_LT_EOF
638686dafe34Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
63871ae1b5e8Smrg      subroutine foo
63881ae1b5e8Smrg      implicit none
63891ae1b5e8Smrg      integer*4 a
63901ae1b5e8Smrg      a=0
63911ae1b5e8Smrg      return
63921ae1b5e8Smrg      end
639386dafe34Smrg_LT_EOF
639486dafe34Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
639586dafe34Smrg      subroutine foo
639686dafe34Smrg      implicit none
639786dafe34Smrg      integer a
639886dafe34Smrg      a=0
639986dafe34Smrg      return
640086dafe34Smrg      end
640186dafe34Smrg_LT_EOF
640286dafe34Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
64031ae1b5e8Smrgpublic class foo {
64041ae1b5e8Smrg  private int a;
64051ae1b5e8Smrg  public void bar (void) {
64061ae1b5e8Smrg    a = 0;
64071ae1b5e8Smrg  }
64081ae1b5e8Smrg};
640986dafe34Smrg_LT_EOF
64101ae1b5e8Smrg])
64111ae1b5e8Smrgdnl Parse the compiler output and extract the necessary
64121ae1b5e8Smrgdnl objects, libraries and library flags.
64131ae1b5e8Smrgif AC_TRY_EVAL(ac_compile); then
64141ae1b5e8Smrg  # Parse the compiler output and extract the necessary
64151ae1b5e8Smrg  # objects, libraries and library flags.
64161ae1b5e8Smrg
64171ae1b5e8Smrg  # Sentinel used to keep track of whether or not we are before
64181ae1b5e8Smrg  # the conftest object file.
64191ae1b5e8Smrg  pre_test_object_deps_done=no
64201ae1b5e8Smrg
642186dafe34Smrg  for p in `eval "$output_verbose_link_cmd"`; do
64221ae1b5e8Smrg    case $p in
64231ae1b5e8Smrg
64241ae1b5e8Smrg    -L* | -R* | -l*)
64251ae1b5e8Smrg       # Some compilers place space between "-{L,R}" and the path.
64261ae1b5e8Smrg       # Remove the space.
642786dafe34Smrg       if test $p = "-L" ||
642886dafe34Smrg          test $p = "-R"; then
64291ae1b5e8Smrg	 prev=$p
64301ae1b5e8Smrg	 continue
64311ae1b5e8Smrg       else
64321ae1b5e8Smrg	 prev=
64331ae1b5e8Smrg       fi
64341ae1b5e8Smrg
64351ae1b5e8Smrg       if test "$pre_test_object_deps_done" = no; then
64361ae1b5e8Smrg	 case $p in
64371ae1b5e8Smrg	 -L* | -R*)
64381ae1b5e8Smrg	   # Internal compiler library paths should come after those
64391ae1b5e8Smrg	   # provided the user.  The postdeps already come after the
64401ae1b5e8Smrg	   # user supplied libs so there is no need to process them.
644186dafe34Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
644286dafe34Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
64431ae1b5e8Smrg	   else
644486dafe34Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
64451ae1b5e8Smrg	   fi
64461ae1b5e8Smrg	   ;;
64471ae1b5e8Smrg	 # The "-l" case would never come before the object being
64481ae1b5e8Smrg	 # linked, so don't bother handling this case.
64491ae1b5e8Smrg	 esac
64501ae1b5e8Smrg       else
645186dafe34Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
645286dafe34Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
64531ae1b5e8Smrg	 else
645486dafe34Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
64551ae1b5e8Smrg	 fi
64561ae1b5e8Smrg       fi
64571ae1b5e8Smrg       ;;
64581ae1b5e8Smrg
64591ae1b5e8Smrg    *.$objext)
64601ae1b5e8Smrg       # This assumes that the test object file only shows up
64611ae1b5e8Smrg       # once in the compiler output.
64621ae1b5e8Smrg       if test "$p" = "conftest.$objext"; then
64631ae1b5e8Smrg	 pre_test_object_deps_done=yes
64641ae1b5e8Smrg	 continue
64651ae1b5e8Smrg       fi
64661ae1b5e8Smrg
64671ae1b5e8Smrg       if test "$pre_test_object_deps_done" = no; then
646886dafe34Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
646986dafe34Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
64701ae1b5e8Smrg	 else
647186dafe34Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
64721ae1b5e8Smrg	 fi
64731ae1b5e8Smrg       else
647486dafe34Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
647586dafe34Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
64761ae1b5e8Smrg	 else
647786dafe34Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
64781ae1b5e8Smrg	 fi
64791ae1b5e8Smrg       fi
64801ae1b5e8Smrg       ;;
64811ae1b5e8Smrg
64821ae1b5e8Smrg    *) ;; # Ignore the rest.
64831ae1b5e8Smrg
64841ae1b5e8Smrg    esac
64851ae1b5e8Smrg  done
64861ae1b5e8Smrg
64871ae1b5e8Smrg  # Clean up.
64881ae1b5e8Smrg  rm -f a.out a.exe
64891ae1b5e8Smrgelse
64901ae1b5e8Smrg  echo "libtool.m4: error: problem compiling $1 test program"
64911ae1b5e8Smrgfi
64921ae1b5e8Smrg
649386dafe34Smrg$RM -f confest.$objext
64941ae1b5e8Smrg
64951ae1b5e8Smrg# PORTME: override above test on systems where it is broken
649686dafe34Smrgm4_if([$1], [CXX],
64971ae1b5e8Smrg[case $host_os in
649886dafe34Smrginterix[[3-9]]*)
64991ae1b5e8Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
65001ae1b5e8Smrg  # hack all around it, let's just trust "g++" to DTRT.
650186dafe34Smrg  _LT_TAGVAR(predep_objects,$1)=
650286dafe34Smrg  _LT_TAGVAR(postdep_objects,$1)=
650386dafe34Smrg  _LT_TAGVAR(postdeps,$1)=
650486dafe34Smrg  ;;
650586dafe34Smrg
650686dafe34Smrglinux*)
650786dafe34Smrg  case `$CC -V 2>&1 | sed 5q` in
650886dafe34Smrg  *Sun\ C*)
650986dafe34Smrg    # Sun C++ 5.9
651086dafe34Smrg
651186dafe34Smrg    # The more standards-conforming stlport4 library is
651286dafe34Smrg    # incompatible with the Cstd library. Avoid specifying
651386dafe34Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
651486dafe34Smrg    # -library=stlport4 depends on it.
651586dafe34Smrg    case " $CXX $CXXFLAGS " in
651686dafe34Smrg    *" -library=stlport4 "*)
651786dafe34Smrg      solaris_use_stlport4=yes
651886dafe34Smrg      ;;
651986dafe34Smrg    esac
652086dafe34Smrg
652186dafe34Smrg    if test "$solaris_use_stlport4" != yes; then
652286dafe34Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
652386dafe34Smrg    fi
652486dafe34Smrg    ;;
652586dafe34Smrg  esac
65261ae1b5e8Smrg  ;;
65271ae1b5e8Smrg
65281ae1b5e8Smrgsolaris*)
65291ae1b5e8Smrg  case $cc_basename in
65301ae1b5e8Smrg  CC*)
653186dafe34Smrg    # The more standards-conforming stlport4 library is
653286dafe34Smrg    # incompatible with the Cstd library. Avoid specifying
653386dafe34Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
653486dafe34Smrg    # -library=stlport4 depends on it.
653586dafe34Smrg    case " $CXX $CXXFLAGS " in
653686dafe34Smrg    *" -library=stlport4 "*)
653786dafe34Smrg      solaris_use_stlport4=yes
653886dafe34Smrg      ;;
653986dafe34Smrg    esac
654086dafe34Smrg
65411ae1b5e8Smrg    # Adding this requires a known-good setup of shared libraries for
65421ae1b5e8Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
65431ae1b5e8Smrg    # archive will be linked into the output, leading to subtle bugs.
654486dafe34Smrg    if test "$solaris_use_stlport4" != yes; then
654586dafe34Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
654686dafe34Smrg    fi
65471ae1b5e8Smrg    ;;
65481ae1b5e8Smrg  esac
65491ae1b5e8Smrg  ;;
65501ae1b5e8Smrgesac
65511ae1b5e8Smrg])
65521ae1b5e8Smrg
655386dafe34Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
655486dafe34Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
65551ae1b5e8Smrgesac
655686dafe34Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
655786dafe34Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
655886dafe34Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
655986dafe34Smrgfi
656086dafe34Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
656186dafe34Smrg    [The directories searched by this compiler when creating a shared library])
656286dafe34Smrg_LT_TAGDECL([], [predep_objects], [1],
656386dafe34Smrg    [Dependencies to place before and after the objects being linked to
656486dafe34Smrg    create a shared library])
656586dafe34Smrg_LT_TAGDECL([], [postdep_objects], [1])
656686dafe34Smrg_LT_TAGDECL([], [predeps], [1])
656786dafe34Smrg_LT_TAGDECL([], [postdeps], [1])
656886dafe34Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
656986dafe34Smrg    [The library search path used internally by the compiler when linking
657086dafe34Smrg    a shared library])
657186dafe34Smrg])# _LT_SYS_HIDDEN_LIBDEPS
657286dafe34Smrg
657386dafe34Smrg
657486dafe34Smrg# _LT_PROG_F77
657586dafe34Smrg# ------------
657686dafe34Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
657786dafe34Smrg# if there is no fortran compiler, we have our own version here.
657886dafe34Smrgm4_defun([_LT_PROG_F77],
657986dafe34Smrg[
658086dafe34Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
658186dafe34SmrgAC_PROG_F77
658286dafe34Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
658386dafe34Smrg  _lt_disable_F77=yes
658486dafe34Smrgfi
658586dafe34Smrgpopdef([AC_MSG_ERROR])
658686dafe34Smrg])# _LT_PROG_F77
658786dafe34Smrg
658886dafe34Smrgdnl aclocal-1.4 backwards compatibility:
658986dafe34Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
659086dafe34Smrg
65911ae1b5e8Smrg
659286dafe34Smrg# _LT_LANG_F77_CONFIG([TAG])
65931ae1b5e8Smrg# --------------------------
659486dafe34Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
659586dafe34Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
659686dafe34Smrg# to write the compiler configuration to `libtool'.
659786dafe34Smrgm4_defun([_LT_LANG_F77_CONFIG],
659886dafe34Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
65991ae1b5e8SmrgAC_LANG_PUSH(Fortran 77)
66001ae1b5e8Smrg
660186dafe34Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
660286dafe34Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
660386dafe34Smrg_LT_TAGVAR(always_export_symbols, $1)=no
660486dafe34Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
660586dafe34Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
660686dafe34Smrg_LT_TAGVAR(hardcode_direct, $1)=no
660786dafe34Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
660886dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
660986dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
661086dafe34Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
661186dafe34Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
661286dafe34Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
661386dafe34Smrg_LT_TAGVAR(inherit_rpath, $1)=no
661486dafe34Smrg_LT_TAGVAR(module_cmds, $1)=
661586dafe34Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
661686dafe34Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
661786dafe34Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
661886dafe34Smrg_LT_TAGVAR(no_undefined_flag, $1)=
661986dafe34Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
662086dafe34Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
66211ae1b5e8Smrg
66221ae1b5e8Smrg# Source file extension for f77 test sources.
66231ae1b5e8Smrgac_ext=f
66241ae1b5e8Smrg
66251ae1b5e8Smrg# Object file extension for compiled f77 test sources.
66261ae1b5e8Smrgobjext=o
662786dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
662886dafe34Smrg
662986dafe34Smrg# No sense in running all these tests if we already determined that
663086dafe34Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
663186dafe34Smrg# are currently assumed to apply to all compilers on this platform,
663286dafe34Smrg# and will be corrupted by setting them based on a non-working compiler.
663386dafe34Smrgif test "$_lt_disable_F77" != yes; then
663486dafe34Smrg  # Code to be used in simple compile tests
663586dafe34Smrg  lt_simple_compile_test_code="\
663686dafe34Smrg      subroutine t
663786dafe34Smrg      return
663886dafe34Smrg      end
663986dafe34Smrg"
66401ae1b5e8Smrg
664186dafe34Smrg  # Code to be used in simple link tests
664286dafe34Smrg  lt_simple_link_test_code="\
664386dafe34Smrg      program t
664486dafe34Smrg      end
664586dafe34Smrg"
66461ae1b5e8Smrg
664786dafe34Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
664886dafe34Smrg  _LT_TAG_COMPILER
66491ae1b5e8Smrg
665086dafe34Smrg  # save warnings/boilerplate of simple test code
665186dafe34Smrg  _LT_COMPILER_BOILERPLATE
665286dafe34Smrg  _LT_LINKER_BOILERPLATE
66531ae1b5e8Smrg
665486dafe34Smrg  # Allow CC to be a program name with arguments.
665586dafe34Smrg  lt_save_CC="$CC"
665686dafe34Smrg  lt_save_GCC=$GCC
665786dafe34Smrg  CC=${F77-"f77"}
665886dafe34Smrg  compiler=$CC
665986dafe34Smrg  _LT_TAGVAR(compiler, $1)=$CC
666086dafe34Smrg  _LT_CC_BASENAME([$compiler])
666186dafe34Smrg  GCC=$G77
666286dafe34Smrg  if test -n "$compiler"; then
666386dafe34Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
666486dafe34Smrg    AC_MSG_RESULT([$can_build_shared])
66651ae1b5e8Smrg
666686dafe34Smrg    AC_MSG_CHECKING([whether to build shared libraries])
666786dafe34Smrg    test "$can_build_shared" = "no" && enable_shared=no
666886dafe34Smrg
666986dafe34Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
667086dafe34Smrg    # are all built from PIC.
667186dafe34Smrg    case $host_os in
667286dafe34Smrg      aix3*)
667386dafe34Smrg        test "$enable_shared" = yes && enable_static=no
667486dafe34Smrg        if test -n "$RANLIB"; then
667586dafe34Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
667686dafe34Smrg          postinstall_cmds='$RANLIB $lib'
667786dafe34Smrg        fi
667886dafe34Smrg        ;;
667986dafe34Smrg      aix[[4-9]]*)
668086dafe34Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
668186dafe34Smrg	  test "$enable_shared" = yes && enable_static=no
668286dafe34Smrg	fi
668386dafe34Smrg        ;;
668486dafe34Smrg    esac
668586dafe34Smrg    AC_MSG_RESULT([$enable_shared])
668686dafe34Smrg
668786dafe34Smrg    AC_MSG_CHECKING([whether to build static libraries])
668886dafe34Smrg    # Make sure either enable_shared or enable_static is yes.
668986dafe34Smrg    test "$enable_shared" = yes || enable_static=yes
669086dafe34Smrg    AC_MSG_RESULT([$enable_static])
669186dafe34Smrg
669286dafe34Smrg    _LT_TAGVAR(GCC, $1)="$G77"
669386dafe34Smrg    _LT_TAGVAR(LD, $1)="$LD"
669486dafe34Smrg
669586dafe34Smrg    ## CAVEAT EMPTOR:
669686dafe34Smrg    ## There is no encapsulation within the following macros, do not change
669786dafe34Smrg    ## the running order or otherwise move them around unless you know exactly
669886dafe34Smrg    ## what you are doing...
669986dafe34Smrg    _LT_COMPILER_PIC($1)
670086dafe34Smrg    _LT_COMPILER_C_O($1)
670186dafe34Smrg    _LT_COMPILER_FILE_LOCKS($1)
670286dafe34Smrg    _LT_LINKER_SHLIBS($1)
670386dafe34Smrg    _LT_SYS_DYNAMIC_LINKER($1)
670486dafe34Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
670586dafe34Smrg
670686dafe34Smrg    _LT_CONFIG($1)
670786dafe34Smrg  fi # test -n "$compiler"
670886dafe34Smrg
670986dafe34Smrg  GCC=$lt_save_GCC
671086dafe34Smrg  CC="$lt_save_CC"
671186dafe34Smrgfi # test "$_lt_disable_F77" != yes
67121ae1b5e8Smrg
671386dafe34SmrgAC_LANG_POP
671486dafe34Smrg])# _LT_LANG_F77_CONFIG
67151ae1b5e8Smrg
67161ae1b5e8Smrg
671786dafe34Smrg# _LT_PROG_FC
671886dafe34Smrg# -----------
671986dafe34Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
672086dafe34Smrg# if there is no fortran compiler, we have our own version here.
672186dafe34Smrgm4_defun([_LT_PROG_FC],
672286dafe34Smrg[
672386dafe34Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
672486dafe34SmrgAC_PROG_FC
672586dafe34Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
672686dafe34Smrg  _lt_disable_FC=yes
672786dafe34Smrgfi
672886dafe34Smrgpopdef([AC_MSG_ERROR])
672986dafe34Smrg])# _LT_PROG_FC
673086dafe34Smrg
673186dafe34Smrgdnl aclocal-1.4 backwards compatibility:
673286dafe34Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
673386dafe34Smrg
673486dafe34Smrg
673586dafe34Smrg# _LT_LANG_FC_CONFIG([TAG])
673686dafe34Smrg# -------------------------
673786dafe34Smrg# Ensure that the configuration variables for a Fortran compiler are
673886dafe34Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
673986dafe34Smrg# to write the compiler configuration to `libtool'.
674086dafe34Smrgm4_defun([_LT_LANG_FC_CONFIG],
674186dafe34Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
674286dafe34SmrgAC_LANG_PUSH(Fortran)
674386dafe34Smrg
674486dafe34Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
674586dafe34Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
674686dafe34Smrg_LT_TAGVAR(always_export_symbols, $1)=no
674786dafe34Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
674886dafe34Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
674986dafe34Smrg_LT_TAGVAR(hardcode_direct, $1)=no
675086dafe34Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
675186dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
675286dafe34Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
675386dafe34Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
675486dafe34Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
675586dafe34Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
675686dafe34Smrg_LT_TAGVAR(inherit_rpath, $1)=no
675786dafe34Smrg_LT_TAGVAR(module_cmds, $1)=
675886dafe34Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
675986dafe34Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
676086dafe34Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
676186dafe34Smrg_LT_TAGVAR(no_undefined_flag, $1)=
676286dafe34Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
676386dafe34Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
676486dafe34Smrg
676586dafe34Smrg# Source file extension for fc test sources.
676686dafe34Smrgac_ext=${ac_fc_srcext-f}
676786dafe34Smrg
676886dafe34Smrg# Object file extension for compiled fc test sources.
676986dafe34Smrgobjext=o
677086dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
677186dafe34Smrg
677286dafe34Smrg# No sense in running all these tests if we already determined that
677386dafe34Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
677486dafe34Smrg# are currently assumed to apply to all compilers on this platform,
677586dafe34Smrg# and will be corrupted by setting them based on a non-working compiler.
677686dafe34Smrgif test "$_lt_disable_FC" != yes; then
677786dafe34Smrg  # Code to be used in simple compile tests
677886dafe34Smrg  lt_simple_compile_test_code="\
677986dafe34Smrg      subroutine t
678086dafe34Smrg      return
678186dafe34Smrg      end
678286dafe34Smrg"
678386dafe34Smrg
678486dafe34Smrg  # Code to be used in simple link tests
678586dafe34Smrg  lt_simple_link_test_code="\
678686dafe34Smrg      program t
678786dafe34Smrg      end
678886dafe34Smrg"
678986dafe34Smrg
679086dafe34Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
679186dafe34Smrg  _LT_TAG_COMPILER
679286dafe34Smrg
679386dafe34Smrg  # save warnings/boilerplate of simple test code
679486dafe34Smrg  _LT_COMPILER_BOILERPLATE
679586dafe34Smrg  _LT_LINKER_BOILERPLATE
67961ae1b5e8Smrg
679786dafe34Smrg  # Allow CC to be a program name with arguments.
679886dafe34Smrg  lt_save_CC="$CC"
679986dafe34Smrg  lt_save_GCC=$GCC
680086dafe34Smrg  CC=${FC-"f95"}
680186dafe34Smrg  compiler=$CC
680286dafe34Smrg  GCC=$ac_cv_fc_compiler_gnu
68031ae1b5e8Smrg
680486dafe34Smrg  _LT_TAGVAR(compiler, $1)=$CC
680586dafe34Smrg  _LT_CC_BASENAME([$compiler])
680686dafe34Smrg
680786dafe34Smrg  if test -n "$compiler"; then
680886dafe34Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
680986dafe34Smrg    AC_MSG_RESULT([$can_build_shared])
68101ae1b5e8Smrg
681186dafe34Smrg    AC_MSG_CHECKING([whether to build shared libraries])
681286dafe34Smrg    test "$can_build_shared" = "no" && enable_shared=no
68131ae1b5e8Smrg
681486dafe34Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
681586dafe34Smrg    # are all built from PIC.
681686dafe34Smrg    case $host_os in
681786dafe34Smrg      aix3*)
681886dafe34Smrg        test "$enable_shared" = yes && enable_static=no
681986dafe34Smrg        if test -n "$RANLIB"; then
682086dafe34Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
682186dafe34Smrg          postinstall_cmds='$RANLIB $lib'
682286dafe34Smrg        fi
682386dafe34Smrg        ;;
682486dafe34Smrg      aix[[4-9]]*)
682586dafe34Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
682686dafe34Smrg	  test "$enable_shared" = yes && enable_static=no
682786dafe34Smrg	fi
682886dafe34Smrg        ;;
682986dafe34Smrg    esac
683086dafe34Smrg    AC_MSG_RESULT([$enable_shared])
683186dafe34Smrg
683286dafe34Smrg    AC_MSG_CHECKING([whether to build static libraries])
683386dafe34Smrg    # Make sure either enable_shared or enable_static is yes.
683486dafe34Smrg    test "$enable_shared" = yes || enable_static=yes
683586dafe34Smrg    AC_MSG_RESULT([$enable_static])
683686dafe34Smrg
683786dafe34Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
683886dafe34Smrg    _LT_TAGVAR(LD, $1)="$LD"
683986dafe34Smrg
684086dafe34Smrg    ## CAVEAT EMPTOR:
684186dafe34Smrg    ## There is no encapsulation within the following macros, do not change
684286dafe34Smrg    ## the running order or otherwise move them around unless you know exactly
684386dafe34Smrg    ## what you are doing...
684486dafe34Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
684586dafe34Smrg    _LT_COMPILER_PIC($1)
684686dafe34Smrg    _LT_COMPILER_C_O($1)
684786dafe34Smrg    _LT_COMPILER_FILE_LOCKS($1)
684886dafe34Smrg    _LT_LINKER_SHLIBS($1)
684986dafe34Smrg    _LT_SYS_DYNAMIC_LINKER($1)
685086dafe34Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
685186dafe34Smrg
685286dafe34Smrg    _LT_CONFIG($1)
685386dafe34Smrg  fi # test -n "$compiler"
685486dafe34Smrg
685586dafe34Smrg  GCC=$lt_save_GCC
685686dafe34Smrg  CC="$lt_save_CC"
685786dafe34Smrgfi # test "$_lt_disable_FC" != yes
68581ae1b5e8Smrg
68591ae1b5e8SmrgAC_LANG_POP
686086dafe34Smrg])# _LT_LANG_FC_CONFIG
68611ae1b5e8Smrg
68621ae1b5e8Smrg
686386dafe34Smrg# _LT_LANG_GCJ_CONFIG([TAG])
68641ae1b5e8Smrg# --------------------------
686586dafe34Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
686686dafe34Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
686786dafe34Smrg# to write the compiler configuration to `libtool'.
686886dafe34Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
686986dafe34Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
687086dafe34SmrgAC_LANG_SAVE
68711ae1b5e8Smrg
68721ae1b5e8Smrg# Source file extension for Java test sources.
68731ae1b5e8Smrgac_ext=java
68741ae1b5e8Smrg
68751ae1b5e8Smrg# Object file extension for compiled Java test sources.
68761ae1b5e8Smrgobjext=o
687786dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
68781ae1b5e8Smrg
68791ae1b5e8Smrg# Code to be used in simple compile tests
688086dafe34Smrglt_simple_compile_test_code="class foo {}"
68811ae1b5e8Smrg
68821ae1b5e8Smrg# Code to be used in simple link tests
688386dafe34Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
68841ae1b5e8Smrg
68851ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
688686dafe34Smrg_LT_TAG_COMPILER
68871ae1b5e8Smrg
68881ae1b5e8Smrg# save warnings/boilerplate of simple test code
68891ae1b5e8Smrg_LT_COMPILER_BOILERPLATE
68901ae1b5e8Smrg_LT_LINKER_BOILERPLATE
68911ae1b5e8Smrg
68921ae1b5e8Smrg# Allow CC to be a program name with arguments.
68931ae1b5e8Smrglt_save_CC="$CC"
689486dafe34Smrglt_save_GCC=$GCC
689586dafe34SmrgGCC=yes
68961ae1b5e8SmrgCC=${GCJ-"gcj"}
68971ae1b5e8Smrgcompiler=$CC
689886dafe34Smrg_LT_TAGVAR(compiler, $1)=$CC
689986dafe34Smrg_LT_TAGVAR(LD, $1)="$LD"
69001ae1b5e8Smrg_LT_CC_BASENAME([$compiler])
69011ae1b5e8Smrg
69021ae1b5e8Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
690386dafe34Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69041ae1b5e8Smrg
690586dafe34Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69061ae1b5e8Smrg
690786dafe34Smrgif test -n "$compiler"; then
690886dafe34Smrg  _LT_COMPILER_NO_RTTI($1)
690986dafe34Smrg  _LT_COMPILER_PIC($1)
691086dafe34Smrg  _LT_COMPILER_C_O($1)
691186dafe34Smrg  _LT_COMPILER_FILE_LOCKS($1)
691286dafe34Smrg  _LT_LINKER_SHLIBS($1)
691386dafe34Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
69141ae1b5e8Smrg
691586dafe34Smrg  _LT_CONFIG($1)
691686dafe34Smrgfi
69171ae1b5e8Smrg
69181ae1b5e8SmrgAC_LANG_RESTORE
691986dafe34Smrg
692086dafe34SmrgGCC=$lt_save_GCC
69211ae1b5e8SmrgCC="$lt_save_CC"
692286dafe34Smrg])# _LT_LANG_GCJ_CONFIG
69231ae1b5e8Smrg
69241ae1b5e8Smrg
692586dafe34Smrg# _LT_LANG_RC_CONFIG([TAG])
69261ae1b5e8Smrg# -------------------------
692786dafe34Smrg# Ensure that the configuration variables for the Windows resource compiler
692886dafe34Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
692986dafe34Smrg# to write the compiler configuration to `libtool'.
693086dafe34Smrgm4_defun([_LT_LANG_RC_CONFIG],
693186dafe34Smrg[AC_REQUIRE([LT_PROG_RC])dnl
693286dafe34SmrgAC_LANG_SAVE
69331ae1b5e8Smrg
69341ae1b5e8Smrg# Source file extension for RC test sources.
69351ae1b5e8Smrgac_ext=rc
69361ae1b5e8Smrg
69371ae1b5e8Smrg# Object file extension for compiled RC test sources.
69381ae1b5e8Smrgobjext=o
693986dafe34Smrg_LT_TAGVAR(objext, $1)=$objext
69401ae1b5e8Smrg
69411ae1b5e8Smrg# Code to be used in simple compile tests
694286dafe34Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
69431ae1b5e8Smrg
69441ae1b5e8Smrg# Code to be used in simple link tests
69451ae1b5e8Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
69461ae1b5e8Smrg
69471ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
694886dafe34Smrg_LT_TAG_COMPILER
69491ae1b5e8Smrg
69501ae1b5e8Smrg# save warnings/boilerplate of simple test code
69511ae1b5e8Smrg_LT_COMPILER_BOILERPLATE
69521ae1b5e8Smrg_LT_LINKER_BOILERPLATE
69531ae1b5e8Smrg
69541ae1b5e8Smrg# Allow CC to be a program name with arguments.
69551ae1b5e8Smrglt_save_CC="$CC"
695686dafe34Smrglt_save_GCC=$GCC
695786dafe34SmrgGCC=
69581ae1b5e8SmrgCC=${RC-"windres"}
69591ae1b5e8Smrgcompiler=$CC
696086dafe34Smrg_LT_TAGVAR(compiler, $1)=$CC
69611ae1b5e8Smrg_LT_CC_BASENAME([$compiler])
696286dafe34Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
69631ae1b5e8Smrg
696486dafe34Smrgif test -n "$compiler"; then
696586dafe34Smrg  :
696686dafe34Smrg  _LT_CONFIG($1)
696786dafe34Smrgfi
69681ae1b5e8Smrg
696986dafe34SmrgGCC=$lt_save_GCC
69701ae1b5e8SmrgAC_LANG_RESTORE
69711ae1b5e8SmrgCC="$lt_save_CC"
697286dafe34Smrg])# _LT_LANG_RC_CONFIG
69731ae1b5e8Smrg
69741ae1b5e8Smrg
697586dafe34Smrg# LT_PROG_GCJ
697686dafe34Smrg# -----------
697786dafe34SmrgAC_DEFUN([LT_PROG_GCJ],
697886dafe34Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
697986dafe34Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
698086dafe34Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
698186dafe34Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
698286dafe34Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
698386dafe34Smrg])
69841ae1b5e8Smrg
698586dafe34Smrg# Old name:
698686dafe34SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
698786dafe34Smrgdnl aclocal-1.4 backwards compatibility:
698886dafe34Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
69891ae1b5e8Smrg
69901ae1b5e8Smrg
699186dafe34Smrg# LT_PROG_RC
699286dafe34Smrg# ----------
699386dafe34SmrgAC_DEFUN([LT_PROG_RC],
699486dafe34Smrg[AC_CHECK_TOOL(RC, windres,)
699586dafe34Smrg])
69961ae1b5e8Smrg
699786dafe34Smrg# Old name:
699886dafe34SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
699986dafe34Smrgdnl aclocal-1.4 backwards compatibility:
700086dafe34Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
70011ae1b5e8Smrg
70021ae1b5e8Smrg
700386dafe34Smrg# _LT_DECL_EGREP
700486dafe34Smrg# --------------
700586dafe34Smrg# If we don't have a new enough Autoconf to choose the best grep
700686dafe34Smrg# available, choose the one first in the user's PATH.
700786dafe34Smrgm4_defun([_LT_DECL_EGREP],
700886dafe34Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
700986dafe34SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
701086dafe34Smrgtest -z "$GREP" && GREP=grep
701186dafe34Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
701286dafe34Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
701386dafe34Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
701486dafe34Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
701586dafe34SmrgAC_SUBST([GREP])
701686dafe34Smrg])
70171ae1b5e8Smrg
70181ae1b5e8Smrg
701986dafe34Smrg# _LT_DECL_OBJDUMP
702086dafe34Smrg# --------------
702186dafe34Smrg# If we don't have a new enough Autoconf to choose the best objdump
702286dafe34Smrg# available, choose the one first in the user's PATH.
702386dafe34Smrgm4_defun([_LT_DECL_OBJDUMP],
702486dafe34Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
702586dafe34Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
702686dafe34Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
702786dafe34SmrgAC_SUBST([OBJDUMP])
702886dafe34Smrg])
70291ae1b5e8Smrg
70301ae1b5e8Smrg
703186dafe34Smrg# _LT_DECL_SED
703286dafe34Smrg# ------------
703386dafe34Smrg# Check for a fully-functional sed program, that truncates
703486dafe34Smrg# as few characters as possible.  Prefer GNU sed if found.
703586dafe34Smrgm4_defun([_LT_DECL_SED],
703686dafe34Smrg[AC_PROG_SED
703786dafe34Smrgtest -z "$SED" && SED=sed
703886dafe34SmrgXsed="$SED -e 1s/^X//"
703986dafe34Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
704086dafe34Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
704186dafe34Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
704286dafe34Smrg])# _LT_DECL_SED
70431ae1b5e8Smrg
704486dafe34Smrgm4_ifndef([AC_PROG_SED], [
704586dafe34Smrg# NOTE: This macro has been submitted for inclusion into   #
704686dafe34Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
704786dafe34Smrg#  a released version of Autoconf we should remove this    #
704886dafe34Smrg#  macro and use it instead.                               #
70491ae1b5e8Smrg
705086dafe34Smrgm4_defun([AC_PROG_SED],
705186dafe34Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
705286dafe34SmrgAC_CACHE_VAL(lt_cv_path_SED,
705386dafe34Smrg[# Loop through the user's path and test for sed and gsed.
705486dafe34Smrg# Then use that list of sed's as ones to test for truncation.
705586dafe34Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
705686dafe34Smrgfor as_dir in $PATH
705786dafe34Smrgdo
705886dafe34Smrg  IFS=$as_save_IFS
705986dafe34Smrg  test -z "$as_dir" && as_dir=.
706086dafe34Smrg  for lt_ac_prog in sed gsed; do
706186dafe34Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
706286dafe34Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
706386dafe34Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
706486dafe34Smrg      fi
706586dafe34Smrg    done
706686dafe34Smrg  done
706786dafe34Smrgdone
706886dafe34SmrgIFS=$as_save_IFS
706986dafe34Smrglt_ac_max=0
707086dafe34Smrglt_ac_count=0
707186dafe34Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
707286dafe34Smrg# along with /bin/sed that truncates output.
707386dafe34Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
707486dafe34Smrg  test ! -f $lt_ac_sed && continue
707586dafe34Smrg  cat /dev/null > conftest.in
707686dafe34Smrg  lt_ac_count=0
707786dafe34Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
707886dafe34Smrg  # Check for GNU sed and select it if it is found.
707986dafe34Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
708086dafe34Smrg    lt_cv_path_SED=$lt_ac_sed
708186dafe34Smrg    break
708286dafe34Smrg  fi
708386dafe34Smrg  while true; do
708486dafe34Smrg    cat conftest.in conftest.in >conftest.tmp
708586dafe34Smrg    mv conftest.tmp conftest.in
708686dafe34Smrg    cp conftest.in conftest.nl
708786dafe34Smrg    echo >>conftest.nl
708886dafe34Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
708986dafe34Smrg    cmp -s conftest.out conftest.nl || break
709086dafe34Smrg    # 10000 chars as input seems more than enough
709186dafe34Smrg    test $lt_ac_count -gt 10 && break
709286dafe34Smrg    lt_ac_count=`expr $lt_ac_count + 1`
709386dafe34Smrg    if test $lt_ac_count -gt $lt_ac_max; then
709486dafe34Smrg      lt_ac_max=$lt_ac_count
709586dafe34Smrg      lt_cv_path_SED=$lt_ac_sed
709686dafe34Smrg    fi
709786dafe34Smrg  done
709886dafe34Smrgdone
709986dafe34Smrg])
710086dafe34SmrgSED=$lt_cv_path_SED
710186dafe34SmrgAC_SUBST([SED])
710286dafe34SmrgAC_MSG_RESULT([$SED])
710386dafe34Smrg])#AC_PROG_SED
710486dafe34Smrg])#m4_ifndef
710576888252Smrg
710686dafe34Smrg# Old name:
710786dafe34SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
710886dafe34Smrgdnl aclocal-1.4 backwards compatibility:
710986dafe34Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
711076888252Smrg
711176888252Smrg
711286dafe34Smrg# _LT_CHECK_SHELL_FEATURES
711386dafe34Smrg# ------------------------
711486dafe34Smrg# Find out whether the shell is Bourne or XSI compatible,
711586dafe34Smrg# or has some other useful features.
711686dafe34Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
711786dafe34Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
711886dafe34Smrg# Try some XSI features
711986dafe34Smrgxsi_shell=no
712086dafe34Smrg( _lt_dummy="a/b/c"
712186dafe34Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
712286dafe34Smrg      = c,a/b,, \
712386dafe34Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
712486dafe34Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
712586dafe34Smrg  && xsi_shell=yes
712686dafe34SmrgAC_MSG_RESULT([$xsi_shell])
712786dafe34Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
712886dafe34Smrg
712986dafe34SmrgAC_MSG_CHECKING([whether the shell understands "+="])
713086dafe34Smrglt_shell_append=no
713186dafe34Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
713286dafe34Smrg    >/dev/null 2>&1 \
713386dafe34Smrg  && lt_shell_append=yes
713486dafe34SmrgAC_MSG_RESULT([$lt_shell_append])
713586dafe34Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
713686dafe34Smrg
713786dafe34Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
713886dafe34Smrg  lt_unset=unset
713986dafe34Smrgelse
714086dafe34Smrg  lt_unset=false
714186dafe34Smrgfi
714286dafe34Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
714386dafe34Smrg
714486dafe34Smrg# test EBCDIC or ASCII
714586dafe34Smrgcase `echo X|tr X '\101'` in
714686dafe34Smrg A) # ASCII based system
714786dafe34Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
714886dafe34Smrg  lt_SP2NL='tr \040 \012'
714986dafe34Smrg  lt_NL2SP='tr \015\012 \040\040'
715086dafe34Smrg  ;;
715186dafe34Smrg *) # EBCDIC based system
715286dafe34Smrg  lt_SP2NL='tr \100 \n'
715386dafe34Smrg  lt_NL2SP='tr \r\n \100\100'
715486dafe34Smrg  ;;
715586dafe34Smrgesac
715686dafe34Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
715786dafe34Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
715886dafe34Smrg])# _LT_CHECK_SHELL_FEATURES
715976888252Smrg
716076888252Smrg
716186dafe34Smrg# _LT_PROG_XSI_SHELLFNS
716286dafe34Smrg# ---------------------
716386dafe34Smrg# Bourne and XSI compatible variants of some useful shell functions.
716486dafe34Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
716586dafe34Smrg[case $xsi_shell in
716686dafe34Smrg  yes)
716786dafe34Smrg    cat << \_LT_EOF >> "$cfgfile"
716886dafe34Smrg
716986dafe34Smrg# func_dirname file append nondir_replacement
717086dafe34Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
717186dafe34Smrg# otherwise set result to NONDIR_REPLACEMENT.
717286dafe34Smrgfunc_dirname ()
717386dafe34Smrg{
717486dafe34Smrg  case ${1} in
717586dafe34Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
717686dafe34Smrg    *  ) func_dirname_result="${3}" ;;
717786dafe34Smrg  esac
717886dafe34Smrg}
717976888252Smrg
718086dafe34Smrg# func_basename file
718186dafe34Smrgfunc_basename ()
718286dafe34Smrg{
718386dafe34Smrg  func_basename_result="${1##*/}"
718486dafe34Smrg}
718576888252Smrg
718686dafe34Smrg# func_dirname_and_basename file append nondir_replacement
718786dafe34Smrg# perform func_basename and func_dirname in a single function
718886dafe34Smrg# call:
718986dafe34Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
719086dafe34Smrg#             add APPEND to the result, otherwise set result
719186dafe34Smrg#             to NONDIR_REPLACEMENT.
719286dafe34Smrg#             value returned in "$func_dirname_result"
719386dafe34Smrg#   basename: Compute filename of FILE.
719486dafe34Smrg#             value retuned in "$func_basename_result"
719586dafe34Smrg# Implementation must be kept synchronized with func_dirname
719686dafe34Smrg# and func_basename. For efficiency, we do not delegate to
719786dafe34Smrg# those functions but instead duplicate the functionality here.
719886dafe34Smrgfunc_dirname_and_basename ()
719986dafe34Smrg{
720086dafe34Smrg  case ${1} in
720186dafe34Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
720286dafe34Smrg    *  ) func_dirname_result="${3}" ;;
720386dafe34Smrg  esac
720486dafe34Smrg  func_basename_result="${1##*/}"
720586dafe34Smrg}
720676888252Smrg
720786dafe34Smrg# func_stripname prefix suffix name
720886dafe34Smrg# strip PREFIX and SUFFIX off of NAME.
720986dafe34Smrg# PREFIX and SUFFIX must not contain globbing or regex special
721086dafe34Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
721186dafe34Smrg# dot (in which case that matches only a dot).
721286dafe34Smrgfunc_stripname ()
721386dafe34Smrg{
721486dafe34Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
721586dafe34Smrg  # positional parameters, so assign one to ordinary parameter first.
721686dafe34Smrg  func_stripname_result=${3}
721786dafe34Smrg  func_stripname_result=${func_stripname_result#"${1}"}
721886dafe34Smrg  func_stripname_result=${func_stripname_result%"${2}"}
721986dafe34Smrg}
722076888252Smrg
722186dafe34Smrg# func_opt_split
722286dafe34Smrgfunc_opt_split ()
722386dafe34Smrg{
722486dafe34Smrg  func_opt_split_opt=${1%%=*}
722586dafe34Smrg  func_opt_split_arg=${1#*=}
722686dafe34Smrg}
722776888252Smrg
722886dafe34Smrg# func_lo2o object
722986dafe34Smrgfunc_lo2o ()
723086dafe34Smrg{
723186dafe34Smrg  case ${1} in
723286dafe34Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
723386dafe34Smrg    *)    func_lo2o_result=${1} ;;
723486dafe34Smrg  esac
723586dafe34Smrg}
723676888252Smrg
723786dafe34Smrg# func_xform libobj-or-source
723886dafe34Smrgfunc_xform ()
723986dafe34Smrg{
724086dafe34Smrg  func_xform_result=${1%.*}.lo
724186dafe34Smrg}
724276888252Smrg
724386dafe34Smrg# func_arith arithmetic-term...
724486dafe34Smrgfunc_arith ()
724586dafe34Smrg{
724686dafe34Smrg  func_arith_result=$(( $[*] ))
724786dafe34Smrg}
724876888252Smrg
724986dafe34Smrg# func_len string
725086dafe34Smrg# STRING may not start with a hyphen.
725186dafe34Smrgfunc_len ()
725286dafe34Smrg{
725386dafe34Smrg  func_len_result=${#1}
725486dafe34Smrg}
725576888252Smrg
725686dafe34Smrg_LT_EOF
725786dafe34Smrg    ;;
725886dafe34Smrg  *) # Bourne compatible functions.
725986dafe34Smrg    cat << \_LT_EOF >> "$cfgfile"
726076888252Smrg
726186dafe34Smrg# func_dirname file append nondir_replacement
726286dafe34Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
726386dafe34Smrg# otherwise set result to NONDIR_REPLACEMENT.
726486dafe34Smrgfunc_dirname ()
726586dafe34Smrg{
726686dafe34Smrg  # Extract subdirectory from the argument.
726786dafe34Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
726886dafe34Smrg  if test "X$func_dirname_result" = "X${1}"; then
726986dafe34Smrg    func_dirname_result="${3}"
727086dafe34Smrg  else
727186dafe34Smrg    func_dirname_result="$func_dirname_result${2}"
727286dafe34Smrg  fi
727386dafe34Smrg}
727476888252Smrg
727586dafe34Smrg# func_basename file
727686dafe34Smrgfunc_basename ()
727786dafe34Smrg{
727886dafe34Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
727986dafe34Smrg}
728076888252Smrg
728186dafe34Smrgdnl func_dirname_and_basename
728286dafe34Smrgdnl A portable version of this function is already defined in general.m4sh
728386dafe34Smrgdnl so there is no need for it here.
728486dafe34Smrg
728586dafe34Smrg# func_stripname prefix suffix name
728686dafe34Smrg# strip PREFIX and SUFFIX off of NAME.
728786dafe34Smrg# PREFIX and SUFFIX must not contain globbing or regex special
728886dafe34Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
728986dafe34Smrg# dot (in which case that matches only a dot).
729086dafe34Smrg# func_strip_suffix prefix name
729186dafe34Smrgfunc_stripname ()
729286dafe34Smrg{
729386dafe34Smrg  case ${2} in
729486dafe34Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
729586dafe34Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
729686dafe34Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
729786dafe34Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
729886dafe34Smrg  esac
729986dafe34Smrg}
730076888252Smrg
730186dafe34Smrg# sed scripts:
730286dafe34Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
730386dafe34Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
730476888252Smrg
730586dafe34Smrg# func_opt_split
730686dafe34Smrgfunc_opt_split ()
730786dafe34Smrg{
730886dafe34Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
730986dafe34Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
731086dafe34Smrg}
731176888252Smrg
731286dafe34Smrg# func_lo2o object
731386dafe34Smrgfunc_lo2o ()
731486dafe34Smrg{
731586dafe34Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
731686dafe34Smrg}
731776888252Smrg
731886dafe34Smrg# func_xform libobj-or-source
731986dafe34Smrgfunc_xform ()
732086dafe34Smrg{
732186dafe34Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
732286dafe34Smrg}
73231ae1b5e8Smrg
732486dafe34Smrg# func_arith arithmetic-term...
732586dafe34Smrgfunc_arith ()
732686dafe34Smrg{
732786dafe34Smrg  func_arith_result=`expr "$[@]"`
732886dafe34Smrg}
73291ae1b5e8Smrg
733086dafe34Smrg# func_len string
733186dafe34Smrg# STRING may not start with a hyphen.
733286dafe34Smrgfunc_len ()
733386dafe34Smrg{
733486dafe34Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
733586dafe34Smrg}
73361ae1b5e8Smrg
733786dafe34Smrg_LT_EOF
733886dafe34Smrgesac
73391ae1b5e8Smrg
734086dafe34Smrgcase $lt_shell_append in
734186dafe34Smrg  yes)
734286dafe34Smrg    cat << \_LT_EOF >> "$cfgfile"
73431ae1b5e8Smrg
734486dafe34Smrg# func_append var value
734586dafe34Smrg# Append VALUE to the end of shell variable VAR.
734686dafe34Smrgfunc_append ()
734786dafe34Smrg{
734886dafe34Smrg  eval "$[1]+=\$[2]"
734986dafe34Smrg}
735086dafe34Smrg_LT_EOF
735186dafe34Smrg    ;;
735286dafe34Smrg  *)
735386dafe34Smrg    cat << \_LT_EOF >> "$cfgfile"
73541ae1b5e8Smrg
735586dafe34Smrg# func_append var value
735686dafe34Smrg# Append VALUE to the end of shell variable VAR.
735786dafe34Smrgfunc_append ()
735886dafe34Smrg{
735986dafe34Smrg  eval "$[1]=\$$[1]\$[2]"
736086dafe34Smrg}
73611ae1b5e8Smrg
736286dafe34Smrg_LT_EOF
736386dafe34Smrg    ;;
736486dafe34Smrg  esac
736586dafe34Smrg])
73661ae1b5e8Smrg
736786dafe34Smrg# Helper functions for option handling.                    -*- Autoconf -*-
736886dafe34Smrg#
736986dafe34Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
737086dafe34Smrg#   Written by Gary V. Vaughan, 2004
737186dafe34Smrg#
737286dafe34Smrg# This file is free software; the Free Software Foundation gives
737386dafe34Smrg# unlimited permission to copy and/or distribute it, with or without
737486dafe34Smrg# modifications, as long as this notice is preserved.
73751ae1b5e8Smrg
737686dafe34Smrg# serial 6 ltoptions.m4
73771ae1b5e8Smrg
737886dafe34Smrg# This is to help aclocal find these macros, as it can't see m4_define.
737986dafe34SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
73801ae1b5e8Smrg
73811ae1b5e8Smrg
738286dafe34Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
738386dafe34Smrg# ------------------------------------------
738486dafe34Smrgm4_define([_LT_MANGLE_OPTION],
738586dafe34Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
73861ae1b5e8Smrg
738776888252Smrg
738886dafe34Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
738986dafe34Smrg# ---------------------------------------
739086dafe34Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
739186dafe34Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
739286dafe34Smrg# saved as a flag.
739386dafe34Smrgm4_define([_LT_SET_OPTION],
739486dafe34Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
739586dafe34Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
739686dafe34Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
739786dafe34Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
739886dafe34Smrg])
739976888252Smrg
740076888252Smrg
740186dafe34Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
740286dafe34Smrg# ------------------------------------------------------------
740386dafe34Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
740486dafe34Smrgm4_define([_LT_IF_OPTION],
740586dafe34Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
740686dafe34Smrg
740786dafe34Smrg
740886dafe34Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
740986dafe34Smrg# -------------------------------------------------------
741086dafe34Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
741186dafe34Smrg# are set.
741286dafe34Smrgm4_define([_LT_UNLESS_OPTIONS],
741386dafe34Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
741486dafe34Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
741586dafe34Smrg		      [m4_define([$0_found])])])[]dnl
741686dafe34Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
741786dafe34Smrg])[]dnl
741886dafe34Smrg])
741976888252Smrg
742076888252Smrg
742186dafe34Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
742286dafe34Smrg# ----------------------------------------
742386dafe34Smrg# OPTION-LIST is a space-separated list of Libtool options associated
742486dafe34Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
742586dafe34Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
742686dafe34Smrg# the unknown option and exit.
742786dafe34Smrgm4_defun([_LT_SET_OPTIONS],
742886dafe34Smrg[# Set options
742986dafe34Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
743086dafe34Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
743186dafe34Smrg
743286dafe34Smrgm4_if([$1],[LT_INIT],[
743386dafe34Smrg  dnl
743486dafe34Smrg  dnl Simply set some default values (i.e off) if boolean options were not
743586dafe34Smrg  dnl specified:
743686dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
743786dafe34Smrg  ])
743886dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
743986dafe34Smrg  ])
744086dafe34Smrg  dnl
744186dafe34Smrg  dnl If no reference was made to various pairs of opposing options, then
744286dafe34Smrg  dnl we run the default mode handler for the pair.  For example, if neither
744386dafe34Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
744486dafe34Smrg  dnl archives by default:
744586dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
744686dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
744786dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
744886dafe34Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
744986dafe34Smrg  		   [_LT_ENABLE_FAST_INSTALL])
745086dafe34Smrg  ])
745186dafe34Smrg])# _LT_SET_OPTIONS
745276888252Smrg
745376888252Smrg
745476888252Smrg
745586dafe34Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
745686dafe34Smrg# -----------------------------------------
745786dafe34Smrgm4_define([_LT_MANGLE_DEFUN],
745886dafe34Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
745976888252Smrg
746076888252Smrg
746186dafe34Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
746286dafe34Smrg# -----------------------------------------------
746386dafe34Smrgm4_define([LT_OPTION_DEFINE],
746486dafe34Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
746586dafe34Smrg])# LT_OPTION_DEFINE
746676888252Smrg
746776888252Smrg
746886dafe34Smrg# dlopen
746986dafe34Smrg# ------
747086dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
747186dafe34Smrg])
747276888252Smrg
747386dafe34SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
747486dafe34Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
747586dafe34SmrgAC_DIAGNOSE([obsolete],
747686dafe34Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
747786dafe34Smrgput the `dlopen' option into LT_INIT's first parameter.])
747886dafe34Smrg])
747976888252Smrg
748086dafe34Smrgdnl aclocal-1.4 backwards compatibility:
748186dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
748276888252Smrg
748376888252Smrg
748486dafe34Smrg# win32-dll
748586dafe34Smrg# ---------
748686dafe34Smrg# Declare package support for building win32 dll's.
748786dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
748886dafe34Smrg[enable_win32_dll=yes
748976888252Smrg
749086dafe34Smrgcase $host in
749186dafe34Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
749286dafe34Smrg  AC_CHECK_TOOL(AS, as, false)
749386dafe34Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
749486dafe34Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
749586dafe34Smrg  ;;
749686dafe34Smrgesac
749776888252Smrg
749886dafe34Smrgtest -z "$AS" && AS=as
749986dafe34Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
750076888252Smrg
750186dafe34Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
750286dafe34Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
750376888252Smrg
750486dafe34Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
750586dafe34Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
750686dafe34Smrg])# win32-dll
750776888252Smrg
750886dafe34SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
750986dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
751086dafe34Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
751186dafe34SmrgAC_DIAGNOSE([obsolete],
751286dafe34Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
751386dafe34Smrgput the `win32-dll' option into LT_INIT's first parameter.])
751486dafe34Smrg])
751576888252Smrg
751686dafe34Smrgdnl aclocal-1.4 backwards compatibility:
751786dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
751876888252Smrg
751976888252Smrg
752086dafe34Smrg# _LT_ENABLE_SHARED([DEFAULT])
752186dafe34Smrg# ----------------------------
752286dafe34Smrg# implement the --enable-shared flag, and supports the `shared' and
752386dafe34Smrg# `disable-shared' LT_INIT options.
752486dafe34Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
752586dafe34Smrgm4_define([_LT_ENABLE_SHARED],
752686dafe34Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
752786dafe34SmrgAC_ARG_ENABLE([shared],
752886dafe34Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
752986dafe34Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
753086dafe34Smrg    [p=${PACKAGE-default}
753186dafe34Smrg    case $enableval in
753286dafe34Smrg    yes) enable_shared=yes ;;
753386dafe34Smrg    no) enable_shared=no ;;
753486dafe34Smrg    *)
753586dafe34Smrg      enable_shared=no
753686dafe34Smrg      # Look at the argument we got.  We use all the common list separators.
753786dafe34Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
753886dafe34Smrg      for pkg in $enableval; do
753986dafe34Smrg	IFS="$lt_save_ifs"
754086dafe34Smrg	if test "X$pkg" = "X$p"; then
754186dafe34Smrg	  enable_shared=yes
754286dafe34Smrg	fi
754386dafe34Smrg      done
754486dafe34Smrg      IFS="$lt_save_ifs"
754586dafe34Smrg      ;;
754686dafe34Smrg    esac],
754786dafe34Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
754876888252Smrg
754986dafe34Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
755086dafe34Smrg	[Whether or not to build shared libraries])
755186dafe34Smrg])# _LT_ENABLE_SHARED
755276888252Smrg
755386dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
755486dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
755576888252Smrg
755686dafe34Smrg# Old names:
755786dafe34SmrgAC_DEFUN([AC_ENABLE_SHARED],
755886dafe34Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
755986dafe34Smrg])
756076888252Smrg
756186dafe34SmrgAC_DEFUN([AC_DISABLE_SHARED],
756286dafe34Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
756386dafe34Smrg])
756476888252Smrg
756586dafe34SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
756686dafe34SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
756776888252Smrg
756886dafe34Smrgdnl aclocal-1.4 backwards compatibility:
756986dafe34Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
757086dafe34Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
757176888252Smrg
757276888252Smrg
757376888252Smrg
757486dafe34Smrg# _LT_ENABLE_STATIC([DEFAULT])
757586dafe34Smrg# ----------------------------
757686dafe34Smrg# implement the --enable-static flag, and support the `static' and
757786dafe34Smrg# `disable-static' LT_INIT options.
757886dafe34Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
757986dafe34Smrgm4_define([_LT_ENABLE_STATIC],
758086dafe34Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
758186dafe34SmrgAC_ARG_ENABLE([static],
758286dafe34Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
758386dafe34Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
758486dafe34Smrg    [p=${PACKAGE-default}
758586dafe34Smrg    case $enableval in
758686dafe34Smrg    yes) enable_static=yes ;;
758786dafe34Smrg    no) enable_static=no ;;
758886dafe34Smrg    *)
758986dafe34Smrg     enable_static=no
759086dafe34Smrg      # Look at the argument we got.  We use all the common list separators.
759186dafe34Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
759286dafe34Smrg      for pkg in $enableval; do
759386dafe34Smrg	IFS="$lt_save_ifs"
759486dafe34Smrg	if test "X$pkg" = "X$p"; then
759586dafe34Smrg	  enable_static=yes
759686dafe34Smrg	fi
759786dafe34Smrg      done
759886dafe34Smrg      IFS="$lt_save_ifs"
759986dafe34Smrg      ;;
760086dafe34Smrg    esac],
760186dafe34Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
760276888252Smrg
760386dafe34Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
760486dafe34Smrg	[Whether or not to build static libraries])
760586dafe34Smrg])# _LT_ENABLE_STATIC
760676888252Smrg
760786dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
760886dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
760976888252Smrg
761086dafe34Smrg# Old names:
761186dafe34SmrgAC_DEFUN([AC_ENABLE_STATIC],
761286dafe34Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
761386dafe34Smrg])
761476888252Smrg
761586dafe34SmrgAC_DEFUN([AC_DISABLE_STATIC],
761686dafe34Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
761786dafe34Smrg])
761876888252Smrg
761986dafe34SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
762086dafe34SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
762176888252Smrg
762286dafe34Smrgdnl aclocal-1.4 backwards compatibility:
762386dafe34Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
762486dafe34Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
762576888252Smrg
762676888252Smrg
762776888252Smrg
762886dafe34Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
762986dafe34Smrg# ----------------------------------
763086dafe34Smrg# implement the --enable-fast-install flag, and support the `fast-install'
763186dafe34Smrg# and `disable-fast-install' LT_INIT options.
763286dafe34Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
763386dafe34Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
763486dafe34Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
763586dafe34SmrgAC_ARG_ENABLE([fast-install],
763686dafe34Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
763786dafe34Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
763886dafe34Smrg    [p=${PACKAGE-default}
763986dafe34Smrg    case $enableval in
764086dafe34Smrg    yes) enable_fast_install=yes ;;
764186dafe34Smrg    no) enable_fast_install=no ;;
764286dafe34Smrg    *)
764386dafe34Smrg      enable_fast_install=no
764486dafe34Smrg      # Look at the argument we got.  We use all the common list separators.
764586dafe34Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
764686dafe34Smrg      for pkg in $enableval; do
764786dafe34Smrg	IFS="$lt_save_ifs"
764886dafe34Smrg	if test "X$pkg" = "X$p"; then
764986dafe34Smrg	  enable_fast_install=yes
765086dafe34Smrg	fi
765186dafe34Smrg      done
765286dafe34Smrg      IFS="$lt_save_ifs"
765386dafe34Smrg      ;;
765486dafe34Smrg    esac],
765586dafe34Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
765676888252Smrg
765786dafe34Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
765886dafe34Smrg	 [Whether or not to optimize for fast installation])dnl
765986dafe34Smrg])# _LT_ENABLE_FAST_INSTALL
766076888252Smrg
766186dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
766286dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
766376888252Smrg
766486dafe34Smrg# Old names:
766586dafe34SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
766686dafe34Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
766786dafe34SmrgAC_DIAGNOSE([obsolete],
766886dafe34Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
766986dafe34Smrgthe `fast-install' option into LT_INIT's first parameter.])
767086dafe34Smrg])
767176888252Smrg
767286dafe34SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
767386dafe34Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
767486dafe34SmrgAC_DIAGNOSE([obsolete],
767586dafe34Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
767686dafe34Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
767786dafe34Smrg])
767876888252Smrg
767986dafe34Smrgdnl aclocal-1.4 backwards compatibility:
768086dafe34Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
768186dafe34Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
768276888252Smrg
768376888252Smrg
768486dafe34Smrg# _LT_WITH_PIC([MODE])
768586dafe34Smrg# --------------------
768686dafe34Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
768786dafe34Smrg# LT_INIT options.
768886dafe34Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
768986dafe34Smrgm4_define([_LT_WITH_PIC],
769086dafe34Smrg[AC_ARG_WITH([pic],
769186dafe34Smrg    [AS_HELP_STRING([--with-pic],
769286dafe34Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
769386dafe34Smrg    [pic_mode="$withval"],
769486dafe34Smrg    [pic_mode=default])
769576888252Smrg
769686dafe34Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
769776888252Smrg
769886dafe34Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
769986dafe34Smrg])# _LT_WITH_PIC
770076888252Smrg
770186dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
770286dafe34SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
770376888252Smrg
770486dafe34Smrg# Old name:
770586dafe34SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
770686dafe34Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
770786dafe34SmrgAC_DIAGNOSE([obsolete],
770886dafe34Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
770986dafe34Smrgput the `pic-only' option into LT_INIT's first parameter.])
771086dafe34Smrg])
771176888252Smrg
771286dafe34Smrgdnl aclocal-1.4 backwards compatibility:
771386dafe34Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
771476888252Smrg
771576888252Smrg
771686dafe34Smrgm4_define([_LTDL_MODE], [])
771786dafe34SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
771886dafe34Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
771986dafe34SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
772086dafe34Smrg		 [m4_define([_LTDL_MODE], [recursive])])
772186dafe34SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
772286dafe34Smrg		 [m4_define([_LTDL_MODE], [subproject])])
772376888252Smrg
772486dafe34Smrgm4_define([_LTDL_TYPE], [])
772586dafe34SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
772686dafe34Smrg		 [m4_define([_LTDL_TYPE], [installable])])
772786dafe34SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
772886dafe34Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
772976888252Smrg
773086dafe34Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
773186dafe34Smrg#
773286dafe34Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
773386dafe34Smrg# Written by Gary V. Vaughan, 2004
773486dafe34Smrg#
773586dafe34Smrg# This file is free software; the Free Software Foundation gives
773686dafe34Smrg# unlimited permission to copy and/or distribute it, with or without
773786dafe34Smrg# modifications, as long as this notice is preserved.
773876888252Smrg
773986dafe34Smrg# serial 6 ltsugar.m4
774076888252Smrg
774186dafe34Smrg# This is to help aclocal find these macros, as it can't see m4_define.
774286dafe34SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
774376888252Smrg
774476888252Smrg
774586dafe34Smrg# lt_join(SEP, ARG1, [ARG2...])
774686dafe34Smrg# -----------------------------
774786dafe34Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
774886dafe34Smrg# associated separator.
774986dafe34Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
775086dafe34Smrg# versions in m4sugar had bugs.
775186dafe34Smrgm4_define([lt_join],
775286dafe34Smrg[m4_if([$#], [1], [],
775386dafe34Smrg       [$#], [2], [[$2]],
775486dafe34Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
775586dafe34Smrgm4_define([_lt_join],
775686dafe34Smrg[m4_if([$#$2], [2], [],
775786dafe34Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
775886dafe34Smrg
775986dafe34Smrg
776086dafe34Smrg# lt_car(LIST)
776186dafe34Smrg# lt_cdr(LIST)
776286dafe34Smrg# ------------
776386dafe34Smrg# Manipulate m4 lists.
776486dafe34Smrg# These macros are necessary as long as will still need to support
776586dafe34Smrg# Autoconf-2.59 which quotes differently.
776686dafe34Smrgm4_define([lt_car], [[$1]])
776786dafe34Smrgm4_define([lt_cdr],
776886dafe34Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
776986dafe34Smrg       [$#], 1, [],
777086dafe34Smrg       [m4_dquote(m4_shift($@))])])
777186dafe34Smrgm4_define([lt_unquote], $1)
777286dafe34Smrg
777386dafe34Smrg
777486dafe34Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
777586dafe34Smrg# ------------------------------------------
777686dafe34Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
777786dafe34Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
777886dafe34Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
777986dafe34Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
778086dafe34Smrg# than defined and empty).
778186dafe34Smrg#
778286dafe34Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
778386dafe34Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
778486dafe34Smrgm4_define([lt_append],
778586dafe34Smrg[m4_define([$1],
778686dafe34Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
778786dafe34Smrg
778886dafe34Smrg
778986dafe34Smrg
779086dafe34Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
779186dafe34Smrg# ----------------------------------------------------------
779286dafe34Smrg# Produce a SEP delimited list of all paired combinations of elements of
779386dafe34Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
779486dafe34Smrg# has the form PREFIXmINFIXSUFFIXn.
779586dafe34Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
779686dafe34Smrgm4_define([lt_combine],
779786dafe34Smrg[m4_if(m4_eval([$# > 3]), [1],
779886dafe34Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
779986dafe34Smrg[[m4_foreach([_Lt_prefix], [$2],
780086dafe34Smrg	     [m4_foreach([_Lt_suffix],
780186dafe34Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
780286dafe34Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
780386dafe34Smrg
780486dafe34Smrg
780586dafe34Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
780686dafe34Smrg# -----------------------------------------------------------------------
780786dafe34Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
780886dafe34Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
780986dafe34Smrgm4_define([lt_if_append_uniq],
781086dafe34Smrg[m4_ifdef([$1],
781186dafe34Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
781286dafe34Smrg		 [lt_append([$1], [$2], [$3])$4],
781386dafe34Smrg		 [$5])],
781486dafe34Smrg	  [lt_append([$1], [$2], [$3])$4])])
781586dafe34Smrg
781686dafe34Smrg
781786dafe34Smrg# lt_dict_add(DICT, KEY, VALUE)
781886dafe34Smrg# -----------------------------
781986dafe34Smrgm4_define([lt_dict_add],
782086dafe34Smrg[m4_define([$1($2)], [$3])])
782176888252Smrg
782276888252Smrg
782386dafe34Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
782486dafe34Smrg# --------------------------------------------
782586dafe34Smrgm4_define([lt_dict_add_subkey],
782686dafe34Smrg[m4_define([$1($2:$3)], [$4])])
78271ae1b5e8Smrg
78281ae1b5e8Smrg
782986dafe34Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
783086dafe34Smrg# ----------------------------------
783186dafe34Smrgm4_define([lt_dict_fetch],
783286dafe34Smrg[m4_ifval([$3],
783386dafe34Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
783486dafe34Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
78351ae1b5e8Smrg
783676888252Smrg
783786dafe34Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
783886dafe34Smrg# -----------------------------------------------------------------
783986dafe34Smrgm4_define([lt_if_dict_fetch],
784086dafe34Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
784186dafe34Smrg	[$5],
784286dafe34Smrg    [$6])])
784376888252Smrg
784476888252Smrg
784586dafe34Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
784686dafe34Smrg# --------------------------------------------------------------
784786dafe34Smrgm4_define([lt_dict_filter],
784886dafe34Smrg[m4_if([$5], [], [],
784986dafe34Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
785086dafe34Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
785186dafe34Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
785286dafe34Smrg])
785376888252Smrg
785486dafe34Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
785586dafe34Smrg#
785686dafe34Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
785786dafe34Smrg#   Written by Scott James Remnant, 2004
785886dafe34Smrg#
785986dafe34Smrg# This file is free software; the Free Software Foundation gives
786086dafe34Smrg# unlimited permission to copy and/or distribute it, with or without
786186dafe34Smrg# modifications, as long as this notice is preserved.
786276888252Smrg
786386dafe34Smrg# Generated from ltversion.in.
786476888252Smrg
786586dafe34Smrg# serial 3012 ltversion.m4
786686dafe34Smrg# This file is part of GNU Libtool
786776888252Smrg
786886dafe34Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
786986dafe34Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
787076888252Smrg
787186dafe34SmrgAC_DEFUN([LTVERSION_VERSION],
787286dafe34Smrg[macro_version='2.2.6'
787386dafe34Smrgmacro_revision='1.3012'
787486dafe34Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
787586dafe34Smrg_LT_DECL(, macro_revision, 0)
787686dafe34Smrg])
787776888252Smrg
787886dafe34Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
787986dafe34Smrg#
788086dafe34Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
788186dafe34Smrg#   Written by Scott James Remnant, 2004.
788286dafe34Smrg#
788386dafe34Smrg# This file is free software; the Free Software Foundation gives
788486dafe34Smrg# unlimited permission to copy and/or distribute it, with or without
788586dafe34Smrg# modifications, as long as this notice is preserved.
788676888252Smrg
788786dafe34Smrg# serial 4 lt~obsolete.m4
788876888252Smrg
788986dafe34Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
789086dafe34Smrg#
789186dafe34Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
789286dafe34Smrg# which have later been changed to m4_define as they aren't part of the
789386dafe34Smrg# exported API, or moved to Autoconf or Automake where they belong.
789486dafe34Smrg#
789586dafe34Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
789686dafe34Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
789786dafe34Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
789886dafe34Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
789986dafe34Smrg# and doesn't know about Autoconf macros at all.)
790086dafe34Smrg#
790186dafe34Smrg# So we provide this file, which has a silly filename so it's always
790286dafe34Smrg# included after everything else.  This provides aclocal with the
790386dafe34Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
790486dafe34Smrg# because those macros already exist, or will be overwritten later.
790586dafe34Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
790686dafe34Smrg#
790786dafe34Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
790886dafe34Smrg# Yes, that means every name once taken will need to remain here until
790986dafe34Smrg# we give up compatibility with versions before 1.7, at which point
791086dafe34Smrg# we need to keep only those names which we still refer to.
791186dafe34Smrg
791286dafe34Smrg# This is to help aclocal find these macros, as it can't see m4_define.
791386dafe34SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
791486dafe34Smrg
791586dafe34Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
791686dafe34Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
791786dafe34Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
791886dafe34Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
791986dafe34Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
792086dafe34Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
792186dafe34Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
792286dafe34Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
792386dafe34Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
792486dafe34Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
792586dafe34Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
792686dafe34Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
792786dafe34Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
792886dafe34Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
792986dafe34Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
793086dafe34Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
793186dafe34Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
793286dafe34Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
793386dafe34Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
793486dafe34Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
793586dafe34Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
793686dafe34Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
793786dafe34Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
793886dafe34Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
793986dafe34Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
794086dafe34Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
794186dafe34Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
794286dafe34Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
794386dafe34Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
794486dafe34Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
794586dafe34Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
794686dafe34Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
794786dafe34Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
794886dafe34Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
794986dafe34Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
795086dafe34Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
795186dafe34Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
795286dafe34Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
795386dafe34Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
795486dafe34Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
795586dafe34Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
795686dafe34Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
795786dafe34Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
795886dafe34Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
795986dafe34Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
796086dafe34Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
796186dafe34Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
796286dafe34Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
796386dafe34Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
796486dafe34Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
796586dafe34Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
796686dafe34Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
796786dafe34Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
796886dafe34Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
796986dafe34Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
797076888252Smrg
797186dafe34Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
797286dafe34Smrg# 
797386dafe34Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
797486dafe34Smrg#
797586dafe34Smrg# This program is free software; you can redistribute it and/or modify
797686dafe34Smrg# it under the terms of the GNU General Public License as published by
797786dafe34Smrg# the Free Software Foundation; either version 2 of the License, or
797886dafe34Smrg# (at your option) any later version.
797986dafe34Smrg#
798086dafe34Smrg# This program is distributed in the hope that it will be useful, but
798186dafe34Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
798286dafe34Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
798386dafe34Smrg# General Public License for more details.
798486dafe34Smrg#
798586dafe34Smrg# You should have received a copy of the GNU General Public License
798686dafe34Smrg# along with this program; if not, write to the Free Software
798786dafe34Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
798886dafe34Smrg#
798986dafe34Smrg# As a special exception to the GNU General Public License, if you
799086dafe34Smrg# distribute this file as part of a program that contains a
799186dafe34Smrg# configuration script generated by Autoconf, you may include it under
799286dafe34Smrg# the same distribution terms that you use for the rest of that program.
799376888252Smrg
799486dafe34Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
799586dafe34Smrg# ----------------------------------
799686dafe34SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
799786dafe34Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
799886dafe34Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
799986dafe34SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
800086dafe34Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
800186dafe34Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
800286dafe34Smrgfi
800386dafe34Smrgif test -n "$PKG_CONFIG"; then
800486dafe34Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
800586dafe34Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
800686dafe34Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
800786dafe34Smrg		AC_MSG_RESULT([yes])
80081ae1b5e8Smrg	else
800986dafe34Smrg		AC_MSG_RESULT([no])
801086dafe34Smrg		PKG_CONFIG=""
80111ae1b5e8Smrg	fi
801286dafe34Smrg		
801386dafe34Smrgfi[]dnl
801486dafe34Smrg])# PKG_PROG_PKG_CONFIG
801576888252Smrg
801686dafe34Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
801786dafe34Smrg#
801886dafe34Smrg# Check to see whether a particular set of modules exists.  Similar
801986dafe34Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
802086dafe34Smrg#
802186dafe34Smrg#
802286dafe34Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
802386dafe34Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
802486dafe34Smrg# PKG_CHECK_EXISTS manually
802586dafe34Smrg# --------------------------------------------------------------
802686dafe34SmrgAC_DEFUN([PKG_CHECK_EXISTS],
802786dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
802886dafe34Smrgif test -n "$PKG_CONFIG" && \
802986dafe34Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
803086dafe34Smrg  m4_ifval([$2], [$2], [:])
803186dafe34Smrgm4_ifvaln([$3], [else
803286dafe34Smrg  $3])dnl
803386dafe34Smrgfi])
803476888252Smrg
803576888252Smrg
803686dafe34Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
803786dafe34Smrg# ---------------------------------------------
803886dafe34Smrgm4_define([_PKG_CONFIG],
803986dafe34Smrg[if test -n "$$1"; then
804086dafe34Smrg    pkg_cv_[]$1="$$1"
804186dafe34Smrg elif test -n "$PKG_CONFIG"; then
804286dafe34Smrg    PKG_CHECK_EXISTS([$3],
804386dafe34Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
804486dafe34Smrg		     [pkg_failed=yes])
804586dafe34Smrg else
804686dafe34Smrg    pkg_failed=untried
804786dafe34Smrgfi[]dnl
804886dafe34Smrg])# _PKG_CONFIG
804976888252Smrg
805086dafe34Smrg# _PKG_SHORT_ERRORS_SUPPORTED
805186dafe34Smrg# -----------------------------
805286dafe34SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
805386dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
805486dafe34Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
805586dafe34Smrg        _pkg_short_errors_supported=yes
805686dafe34Smrgelse
805786dafe34Smrg        _pkg_short_errors_supported=no
805886dafe34Smrgfi[]dnl
805986dafe34Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
806076888252Smrg
806186dafe34Smrg
806286dafe34Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
806386dafe34Smrg# [ACTION-IF-NOT-FOUND])
806486dafe34Smrg#
806586dafe34Smrg#
806686dafe34Smrg# Note that if there is a possibility the first call to
806786dafe34Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
806886dafe34Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
806986dafe34Smrg#
807086dafe34Smrg#
807186dafe34Smrg# --------------------------------------------------------------
807286dafe34SmrgAC_DEFUN([PKG_CHECK_MODULES],
807386dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
807486dafe34SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
807586dafe34SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
807686dafe34Smrg
807786dafe34Smrgpkg_failed=no
807886dafe34SmrgAC_MSG_CHECKING([for $1])
807986dafe34Smrg
808086dafe34Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
808186dafe34Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
808286dafe34Smrg
808386dafe34Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
808486dafe34Smrgand $1[]_LIBS to avoid the need to call pkg-config.
808586dafe34SmrgSee the pkg-config man page for more details.])
808686dafe34Smrg
808786dafe34Smrgif test $pkg_failed = yes; then
808886dafe34Smrg        _PKG_SHORT_ERRORS_SUPPORTED
808986dafe34Smrg        if test $_pkg_short_errors_supported = yes; then
809086dafe34Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
809186dafe34Smrg        else 
809286dafe34Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
809386dafe34Smrg        fi
809486dafe34Smrg	# Put the nasty error message in config.log where it belongs
809586dafe34Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
809686dafe34Smrg
809786dafe34Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
809886dafe34Smrg[Package requirements ($2) were not met:
809986dafe34Smrg
810086dafe34Smrg$$1_PKG_ERRORS
810186dafe34Smrg
810286dafe34SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
810386dafe34Smrginstalled software in a non-standard prefix.
810486dafe34Smrg
810586dafe34Smrg_PKG_TEXT
810686dafe34Smrg])],
810786dafe34Smrg		[AC_MSG_RESULT([no])
810886dafe34Smrg                $4])
810986dafe34Smrgelif test $pkg_failed = untried; then
811086dafe34Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
811186dafe34Smrg[The pkg-config script could not be found or is too old.  Make sure it
811286dafe34Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
811386dafe34Smrgpath to pkg-config.
811486dafe34Smrg
811586dafe34Smrg_PKG_TEXT
811686dafe34Smrg
811786dafe34SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
811886dafe34Smrg		[$4])
811986dafe34Smrgelse
812086dafe34Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
812186dafe34Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
812286dafe34Smrg        AC_MSG_RESULT([yes])
812386dafe34Smrg	ifelse([$3], , :, [$3])
812486dafe34Smrgfi[]dnl
812586dafe34Smrg])# PKG_CHECK_MODULES
812686dafe34Smrg
812786dafe34Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
812886dafe34Smrgdnl
812986dafe34Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
813086dafe34Smrgdnl 
813186dafe34Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
813286dafe34Smrgdnl copy of this software and associated documentation files (the
813386dafe34Smrgdnl "Software"), to deal in the Software without restriction, including
813486dafe34Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
813586dafe34Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
813686dafe34Smrgdnl to whom the Software is furnished to do so, provided that the above
813786dafe34Smrgdnl copyright notice(s) and this permission notice appear in all copies of
813886dafe34Smrgdnl the Software and that both the above copyright notice(s) and this
813986dafe34Smrgdnl permission notice appear in supporting documentation.
814086dafe34Smrgdnl
814186dafe34Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
814286dafe34Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
814386dafe34Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
814486dafe34Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
814586dafe34Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
814686dafe34Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
814786dafe34Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
814886dafe34Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
814986dafe34Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
815086dafe34Smrgdnl
815186dafe34Smrgdnl Except as contained in this notice, the name of a copyright holder
815286dafe34Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
815386dafe34Smrgdnl or other dealings in this Software without prior written authorization
815486dafe34Smrgdnl of the copyright holder.
815586dafe34Smrg
815686dafe34Smrg# XORG_MACROS_VERSION(required-version)
815786dafe34Smrg# -------------------------------------
815886dafe34Smrg# Minimum version: 1.1.0
815986dafe34Smrg#
816086dafe34Smrg# If you're using a macro added in Version 1.1 or newer, include this in
816186dafe34Smrg# your configure.ac with the minimum required version, such as:
816286dafe34Smrg# XORG_MACROS_VERSION(1.1)
816386dafe34Smrg#
816486dafe34Smrg# To force at least a version with this macro defined, also add:
816586dafe34Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
816686dafe34Smrg#
816786dafe34Smrg#
816886dafe34Smrg# See the "minimum version" comment for each macro you use to see what 
816986dafe34Smrg# version you require.
817086dafe34SmrgAC_DEFUN([XORG_MACROS_VERSION],[
817186dafe34Smrg	[XORG_MACROS_needed_version=$1
817286dafe34Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
817386dafe34Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817486dafe34Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
817586dafe34Smrg	[XORG_MACROS_version=1.2.1
817686dafe34Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
817786dafe34Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817886dafe34Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
817986dafe34Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
818086dafe34Smrg	fi
818186dafe34Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
818286dafe34Smrg		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])
818386dafe34Smrg	fi
818486dafe34Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
818586dafe34Smrg]) # XORG_MACROS_VERSION
818686dafe34Smrg
818786dafe34Smrg# XORG_PROG_RAWCPP()
818886dafe34Smrg# ------------------
818986dafe34Smrg# Minimum version: 1.0.0
819086dafe34Smrg#
819186dafe34Smrg# Find cpp program and necessary flags for use in pre-processing text files
819286dafe34Smrg# such as man pages and config files
819386dafe34SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
819486dafe34SmrgAC_REQUIRE([AC_PROG_CPP])
819586dafe34SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
819686dafe34Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
819786dafe34Smrg
819886dafe34Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
819986dafe34Smrg# which is not the best choice for supporting other OS'es, but covers most
820086dafe34Smrg# of the ones we need for now.
820186dafe34SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
820286dafe34SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
820386dafe34Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820486dafe34Smrg	AC_MSG_RESULT([no])
820586dafe34Smrgelse
820686dafe34Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820786dafe34Smrg		RAWCPPFLAGS=-undef
820886dafe34Smrg		AC_MSG_RESULT([yes])
820986dafe34Smrg	# under Cygwin unix is still defined even with -undef
821086dafe34Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
821186dafe34Smrg		RAWCPPFLAGS="-undef -ansi"
821286dafe34Smrg		AC_MSG_RESULT([yes, with -ansi])
821386dafe34Smrg	else
821486dafe34Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
821586dafe34Smrg	fi
821686dafe34Smrgfi
821786dafe34Smrgrm -f conftest.$ac_ext
821886dafe34Smrg
821986dafe34SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
822086dafe34SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
822186dafe34Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822286dafe34Smrg	AC_MSG_RESULT([no])
822386dafe34Smrgelse
822486dafe34Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822586dafe34Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
822686dafe34Smrg		AC_MSG_RESULT([yes])
822786dafe34Smrg	else
822886dafe34Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
822986dafe34Smrg	fi
823086dafe34Smrgfi
823186dafe34Smrgrm -f conftest.$ac_ext
823286dafe34SmrgAC_SUBST(RAWCPPFLAGS)
823386dafe34Smrg]) # XORG_PROG_RAWCPP
823486dafe34Smrg
823586dafe34Smrg# XORG_MANPAGE_SECTIONS()
823686dafe34Smrg# -----------------------
823786dafe34Smrg# Minimum version: 1.0.0
823886dafe34Smrg#
823986dafe34Smrg# Determine which sections man pages go in for the different man page types
824086dafe34Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
824186dafe34Smrg# Not sure if there's any better way than just hardcoding by OS name.
824286dafe34Smrg# Override default settings by setting environment variables
824386dafe34Smrg
824486dafe34SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
824586dafe34SmrgAC_REQUIRE([AC_CANONICAL_HOST])
824686dafe34Smrg
824786dafe34Smrgif test x$APP_MAN_SUFFIX = x    ; then
824886dafe34Smrg    APP_MAN_SUFFIX=1
824986dafe34Smrgfi
825086dafe34Smrgif test x$APP_MAN_DIR = x    ; then
825186dafe34Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
825286dafe34Smrgfi
825386dafe34Smrg
825486dafe34Smrgif test x$LIB_MAN_SUFFIX = x    ; then
825586dafe34Smrg    LIB_MAN_SUFFIX=3
825686dafe34Smrgfi
825786dafe34Smrgif test x$LIB_MAN_DIR = x    ; then
825886dafe34Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
825986dafe34Smrgfi
826086dafe34Smrg
826186dafe34Smrgif test x$FILE_MAN_SUFFIX = x    ; then
826286dafe34Smrg    case $host_os in
826386dafe34Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
826486dafe34Smrg	*)		FILE_MAN_SUFFIX=5  ;;
82651ae1b5e8Smrg    esac
826686dafe34Smrgfi
826786dafe34Smrgif test x$FILE_MAN_DIR = x    ; then
826886dafe34Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
826986dafe34Smrgfi
827076888252Smrg
827186dafe34Smrgif test x$MISC_MAN_SUFFIX = x    ; then
82721ae1b5e8Smrg    case $host_os in
827386dafe34Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
827486dafe34Smrg	*)		MISC_MAN_SUFFIX=7  ;;
827586dafe34Smrg    esac
827686dafe34Smrgfi
827786dafe34Smrgif test x$MISC_MAN_DIR = x    ; then
827886dafe34Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
827986dafe34Smrgfi
828076888252Smrg
828186dafe34Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
828286dafe34Smrg    case $host_os in
828386dafe34Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
828486dafe34Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
828586dafe34Smrg    esac
828686dafe34Smrgfi
828786dafe34Smrgif test x$DRIVER_MAN_DIR = x    ; then
828886dafe34Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
828986dafe34Smrgfi
829076888252Smrg
829186dafe34Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
829286dafe34Smrg    case $host_os in
829386dafe34Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
829486dafe34Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
829586dafe34Smrg    esac
829686dafe34Smrgfi
829786dafe34Smrgif test x$ADMIN_MAN_DIR = x    ; then
829886dafe34Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
829986dafe34Smrgfi
830076888252Smrg
830176888252Smrg
830286dafe34SmrgAC_SUBST([APP_MAN_SUFFIX])
830386dafe34SmrgAC_SUBST([LIB_MAN_SUFFIX])
830486dafe34SmrgAC_SUBST([FILE_MAN_SUFFIX])
830586dafe34SmrgAC_SUBST([MISC_MAN_SUFFIX])
830686dafe34SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
830786dafe34SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
830886dafe34SmrgAC_SUBST([APP_MAN_DIR])
830986dafe34SmrgAC_SUBST([LIB_MAN_DIR])
831086dafe34SmrgAC_SUBST([FILE_MAN_DIR])
831186dafe34SmrgAC_SUBST([MISC_MAN_DIR])
831286dafe34SmrgAC_SUBST([DRIVER_MAN_DIR])
831386dafe34SmrgAC_SUBST([ADMIN_MAN_DIR])
831486dafe34Smrg]) # XORG_MANPAGE_SECTIONS
831576888252Smrg
831686dafe34Smrg# XORG_CHECK_LINUXDOC
831786dafe34Smrg# -------------------
831886dafe34Smrg# Minimum version: 1.0.0
831986dafe34Smrg#
832086dafe34Smrg# Defines the variable MAKE_TEXT if the necessary tools and
832186dafe34Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
832286dafe34Smrg# Whether or not the necessary tools and files are found can be checked
832386dafe34Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
832486dafe34SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
832586dafe34Smrgif test x$XORG_SGML_PATH = x ; then
832686dafe34Smrg    XORG_SGML_PATH=$prefix/share/sgml
832786dafe34Smrgfi
832886dafe34SmrgHAVE_DEFS_ENT=
832986dafe34Smrg
833086dafe34Smrgif test x"$cross_compiling" = x"yes" ; then
833186dafe34Smrg  HAVE_DEFS_ENT=no
833286dafe34Smrgelse
833386dafe34Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
833486dafe34Smrgfi
833586dafe34Smrg
833686dafe34SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
833786dafe34SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
833886dafe34Smrg
833986dafe34SmrgAC_MSG_CHECKING([Whether to build documentation])
834086dafe34Smrg
834186dafe34Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
834286dafe34Smrg   BUILDDOC=yes
834386dafe34Smrgelse
834486dafe34Smrg   BUILDDOC=no
834586dafe34Smrgfi
834686dafe34Smrg
834786dafe34SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
834886dafe34Smrg
834986dafe34SmrgAC_MSG_RESULT([$BUILDDOC])
835086dafe34Smrg
835186dafe34SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
835286dafe34Smrg
835386dafe34Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
835486dafe34Smrg   BUILDPDFDOC=yes
835586dafe34Smrgelse
835686dafe34Smrg   BUILDPDFDOC=no
835786dafe34Smrgfi
835886dafe34Smrg
835986dafe34SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
836086dafe34Smrg
836186dafe34SmrgAC_MSG_RESULT([$BUILDPDFDOC])
836286dafe34Smrg
836386dafe34SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
836486dafe34SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
836586dafe34SmrgMAKE_PDF="$PS2PDF"
836686dafe34SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
836786dafe34Smrg
836886dafe34SmrgAC_SUBST(MAKE_TEXT)
836986dafe34SmrgAC_SUBST(MAKE_PS)
837086dafe34SmrgAC_SUBST(MAKE_PDF)
837186dafe34SmrgAC_SUBST(MAKE_HTML)
837286dafe34Smrg]) # XORG_CHECK_LINUXDOC
837386dafe34Smrg
837486dafe34Smrg# XORG_CHECK_DOCBOOK
837586dafe34Smrg# -------------------
837686dafe34Smrg# Minimum version: 1.0.0
837786dafe34Smrg#
837886dafe34Smrg# Checks for the ability to build output formats from SGML DocBook source.
837986dafe34Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
838086dafe34Smrg# indicates whether the necessary tools and files are found and, if set,
838186dafe34Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
838286dafe34SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
838386dafe34Smrgif test x$XORG_SGML_PATH = x ; then
838486dafe34Smrg    XORG_SGML_PATH=$prefix/share/sgml
838586dafe34Smrgfi
838686dafe34SmrgHAVE_DEFS_ENT=
838786dafe34SmrgBUILDTXTDOC=no
838886dafe34SmrgBUILDPDFDOC=no
838986dafe34SmrgBUILDPSDOC=no
839086dafe34SmrgBUILDHTMLDOC=no
839186dafe34Smrg
839286dafe34SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
839386dafe34Smrg
839486dafe34SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
839586dafe34SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
839686dafe34SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
839786dafe34SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
839886dafe34Smrg
839986dafe34SmrgAC_MSG_CHECKING([Whether to build text documentation])
840086dafe34Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
840186dafe34Smrg   test x$BUILD_TXTDOC != xno; then
840286dafe34Smrg	BUILDTXTDOC=yes
840386dafe34Smrgfi
840486dafe34SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
840586dafe34SmrgAC_MSG_RESULT([$BUILDTXTDOC])
840676888252Smrg
840786dafe34SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
840886dafe34Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
840986dafe34Smrg   test x$BUILD_PDFDOC != xno; then
841086dafe34Smrg	BUILDPDFDOC=yes
841186dafe34Smrgfi
841286dafe34SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
841386dafe34SmrgAC_MSG_RESULT([$BUILDPDFDOC])
841476888252Smrg
841586dafe34SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
841686dafe34Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
841786dafe34Smrg   test x$BUILD_PSDOC != xno; then
841886dafe34Smrg	BUILDPSDOC=yes
841986dafe34Smrgfi
842086dafe34SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
842186dafe34SmrgAC_MSG_RESULT([$BUILDPSDOC])
842276888252Smrg
842386dafe34SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
842486dafe34Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
842586dafe34Smrg   test x$BUILD_HTMLDOC != xno; then
842686dafe34Smrg	BUILDHTMLDOC=yes
842786dafe34Smrgfi
842886dafe34SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
842986dafe34SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
843076888252Smrg
843186dafe34SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
843286dafe34SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
843386dafe34SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
843486dafe34SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
843576888252Smrg
843686dafe34SmrgAC_SUBST(MAKE_TEXT)
843786dafe34SmrgAC_SUBST(MAKE_PS)
843886dafe34SmrgAC_SUBST(MAKE_PDF)
843986dafe34SmrgAC_SUBST(MAKE_HTML)
844086dafe34Smrg]) # XORG_CHECK_DOCBOOK
844176888252Smrg
844286dafe34Smrg# XORG_CHECK_MALLOC_ZERO
844386dafe34Smrg# ----------------------
844486dafe34Smrg# Minimum version: 1.0.0
844586dafe34Smrg#
844686dafe34Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
844786dafe34Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
844886dafe34Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
844986dafe34SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
845086dafe34SmrgAC_ARG_ENABLE(malloc0returnsnull,
845186dafe34Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
845286dafe34Smrg		       [malloc(0) returns NULL (default: auto)]),
845386dafe34Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
845486dafe34Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
845576888252Smrg
845686dafe34SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
845786dafe34Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
845886dafe34Smrg	AC_RUN_IFELSE([
845986dafe34Smrgchar *malloc();
846086dafe34Smrgchar *realloc();
846186dafe34Smrgchar *calloc();
846286dafe34Smrgmain() {
846386dafe34Smrg    char *m0, *r0, *c0, *p;
846486dafe34Smrg    m0 = malloc(0);
846586dafe34Smrg    p = malloc(10);
846686dafe34Smrg    r0 = realloc(p,0);
846786dafe34Smrg    c0 = calloc(0);
846886dafe34Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
846986dafe34Smrg}],
847086dafe34Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
847186dafe34Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
847286dafe34Smrgfi
847386dafe34SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
847476888252Smrg
847586dafe34Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
847686dafe34Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
847786dafe34Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
847886dafe34Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
847986dafe34Smrgelse
848086dafe34Smrg	MALLOC_ZERO_CFLAGS=""
848186dafe34Smrg	XMALLOC_ZERO_CFLAGS=""
848286dafe34Smrg	XTMALLOC_ZERO_CFLAGS=""
848386dafe34Smrgfi
848476888252Smrg
848586dafe34SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
848686dafe34SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
848786dafe34SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
848886dafe34Smrg]) # XORG_CHECK_MALLOC_ZERO
848976888252Smrg
849086dafe34Smrg# XORG_WITH_LINT()
849186dafe34Smrg# ----------------
849286dafe34Smrg# Minimum version: 1.1.0
849386dafe34Smrg#
849486dafe34Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
849586dafe34Smrg# is specified.   (Use --with-lint=sparse for sparse.)
849686dafe34Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
849786dafe34Smrg# Sets $LINT_FLAGS to flags to pass to source checker
849886dafe34Smrg# Sets LINT automake conditional if enabled (default: disabled)
849986dafe34Smrg#
850086dafe34SmrgAC_DEFUN([XORG_WITH_LINT],[
850176888252Smrg
850286dafe34Smrg# Allow checking code with lint, sparse, etc.
850386dafe34SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
850486dafe34Smrg		[Use a lint-style source code checker (default: disabled)])],
850586dafe34Smrg		[use_lint=$withval], [use_lint=no])
850686dafe34Smrgif test "x$use_lint" = "xyes" ; then
850786dafe34Smrg	LINT="lint"
850886dafe34Smrgelse
850986dafe34Smrg	LINT="$use_lint"
851086dafe34Smrgfi
851186dafe34Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
851286dafe34Smrg    case $LINT in
851386dafe34Smrg	lint|*/lint)
851486dafe34Smrg	    case $host_os in
851586dafe34Smrg		solaris*)
851686dafe34Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
851786dafe34Smrg			;;
851886dafe34Smrg	    esac
851986dafe34Smrg	    ;;
852086dafe34Smrg    esac
852186dafe34Smrgfi
852276888252Smrg
852386dafe34SmrgAC_SUBST(LINT)
852486dafe34SmrgAC_SUBST(LINT_FLAGS)
852586dafe34SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
852676888252Smrg
852786dafe34Smrg]) # XORG_WITH_LINT
852876888252Smrg
852986dafe34Smrg# XORG_LINT_LIBRARY(LIBNAME)
853086dafe34Smrg# --------------------------
853186dafe34Smrg# Minimum version: 1.1.0
853286dafe34Smrg#
853386dafe34Smrg# Sets up flags for building lint libraries for checking programs that call
853486dafe34Smrg# functions in the library.
853586dafe34Smrg# Disabled by default, enable with --enable-lint-library
853686dafe34Smrg# Sets: 
853786dafe34Smrg#	@LINTLIB@		- name of lint library file to make
853886dafe34Smrg#	MAKE_LINT_LIB		- automake conditional
853986dafe34Smrg#
854076888252Smrg
854186dafe34SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
854286dafe34SmrgAC_REQUIRE([XORG_WITH_LINT])
854386dafe34Smrg# Build lint "library" for more indepth checks of programs calling this library
854486dafe34SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
854586dafe34Smrg	[Create lint library (default: disabled)])],
854686dafe34Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
854786dafe34Smrgif test "x$make_lint_lib" != "xno" ; then
854886dafe34Smrg	if test "x$LINT" = "xno" ; then
854986dafe34Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
855086dafe34Smrg	fi
855186dafe34Smrg	if test "x$make_lint_lib" = "xyes" ; then
855286dafe34Smrg		LINTLIB=llib-l$1.ln
855386dafe34Smrg	else
855486dafe34Smrg		LINTLIB=$make_lint_lib
855586dafe34Smrg	fi
855686dafe34Smrgfi
855786dafe34SmrgAC_SUBST(LINTLIB)
855886dafe34SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
855976888252Smrg
856086dafe34Smrg]) # XORG_LINT_LIBRARY
856176888252Smrg
856286dafe34Smrg# XORG_CWARNFLAGS
856386dafe34Smrg# ---------------
856486dafe34Smrg# Minimum version: 1.2.0
856586dafe34Smrg#
856686dafe34Smrg# Defines CWARNFLAGS to enable C compiler warnings.
856786dafe34Smrg#
856886dafe34SmrgAC_DEFUN([XORG_CWARNFLAGS], [
856986dafe34SmrgAC_REQUIRE([AC_PROG_CC])
857086dafe34Smrgif  test "x$GCC" = xyes ; then
857186dafe34Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
857286dafe34Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
857386dafe34Smrg-Wbad-function-cast"
857486dafe34Smrg    case `gcc -dumpversion` in
857586dafe34Smrg    3.4.* | 4.*)
857686dafe34Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
857786dafe34Smrg	;;
857886dafe34Smrg    esac
857986dafe34Smrgelse
858086dafe34Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
858186dafe34Smrg    if test "x$SUNCC" = "xyes"; then
858286dafe34Smrg	CWARNFLAGS="-v"
858386dafe34Smrg    fi
858486dafe34Smrgfi
858586dafe34SmrgAC_SUBST(CWARNFLAGS)
858686dafe34Smrg]) # XORG_CWARNFLAGS
858786dafe34Smrgdnl Copyright 2005 Red Hat, Inc
858886dafe34Smrgdnl
858986dafe34Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
859086dafe34Smrgdnl documentation for any purpose is hereby granted without fee, provided that
859186dafe34Smrgdnl the above copyright notice appear in all copies and that both that
859286dafe34Smrgdnl copyright notice and this permission notice appear in supporting
859386dafe34Smrgdnl documentation.
859486dafe34Smrgdnl
859586dafe34Smrgdnl The above copyright notice and this permission notice shall be included
859686dafe34Smrgdnl in all copies or substantial portions of the Software.
859786dafe34Smrgdnl
859886dafe34Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
859986dafe34Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
860086dafe34Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
860186dafe34Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
860286dafe34Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
860386dafe34Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
860486dafe34Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
860586dafe34Smrgdnl
860686dafe34Smrgdnl Except as contained in this notice, the name of the copyright holders shall
860786dafe34Smrgdnl not be used in advertising or otherwise to promote the sale, use or
860886dafe34Smrgdnl other dealings in this Software without prior written authorization
860986dafe34Smrgdnl from the copyright holders.
861086dafe34Smrgdnl
861176888252Smrg
861286dafe34Smrg# XORG_RELEASE_VERSION
861386dafe34Smrg# --------------------
861486dafe34Smrg# Adds --with/without-release-string and changes the PACKAGE and
861586dafe34Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
861686dafe34Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
861786dafe34Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
861886dafe34Smrg 
861986dafe34SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
862086dafe34Smrg	AC_ARG_WITH(release-version,
862186dafe34Smrg			AC_HELP_STRING([--with-release-version=STRING],
862286dafe34Smrg				[Use release version string in package name]),
862386dafe34Smrg			[RELEASE_VERSION="$withval"],
862486dafe34Smrg			[RELEASE_VERSION=""])
862586dafe34Smrg	if test "x$RELEASE_VERSION" != "x"; then
862686dafe34Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
862786dafe34Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
862886dafe34Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
862986dafe34Smrg	fi
863086dafe34Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
863186dafe34Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
863286dafe34Smrg		[Major version of this package])
863386dafe34Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
863486dafe34Smrg	if test "x$PVM" = "x"; then
863586dafe34Smrg		PVM="0"
863686dafe34Smrg	fi
863786dafe34Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
863886dafe34Smrg		[$PVM],
863986dafe34Smrg		[Minor version of this package])
864086dafe34Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
864186dafe34Smrg	if test "x$PVP" = "x"; then
864286dafe34Smrg		PVP="0"
864386dafe34Smrg	fi
864486dafe34Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
864586dafe34Smrg		[$PVP],
864686dafe34Smrg		[Patch version of this package])
86471ae1b5e8Smrg])
86481ae1b5e8Smrg
864986dafe34Smrg# XORG_CHANGELOG()
865086dafe34Smrg# ----------------
865186dafe34Smrg# Minimum version: 1.2.0
86521ae1b5e8Smrg#
865386dafe34Smrg# Defines the variable CHANGELOG_CMD as the command to generate
865486dafe34Smrg# ChangeLog from git.
86551ae1b5e8Smrg#
865686dafe34Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
86571ae1b5e8Smrg#
865886dafe34SmrgAC_DEFUN([XORG_CHANGELOG], [
865986dafe34SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
866086dafe34Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
866186dafe34Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
866286dafe34SmrgAC_SUBST([CHANGELOG_CMD])
866386dafe34SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
866486dafe34Smrg]) # XORG_CHANGELOG
866576888252Smrg
866686dafe34Smrgdnl Copyright 2005 Red Hat, Inc
866786dafe34Smrgdnl 
866886dafe34Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
866986dafe34Smrgdnl documentation for any purpose is hereby granted without fee, provided that
867086dafe34Smrgdnl the above copyright notice appear in all copies and that both that
867186dafe34Smrgdnl copyright notice and this permission notice appear in supporting
867286dafe34Smrgdnl documentation.
867386dafe34Smrgdnl 
867486dafe34Smrgdnl The above copyright notice and this permission notice shall be included
867586dafe34Smrgdnl in all copies or substantial portions of the Software.
867686dafe34Smrgdnl 
867786dafe34Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
867886dafe34Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
867986dafe34Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
868086dafe34Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
868186dafe34Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
868286dafe34Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
868386dafe34Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
868486dafe34Smrgdnl 
868586dafe34Smrgdnl Except as contained in this notice, the name of the copyright holders shall
868686dafe34Smrgdnl not be used in advertising or otherwise to promote the sale, use or
868786dafe34Smrgdnl other dealings in this Software without prior written authorization
868886dafe34Smrgdnl from the copyright holders.
868986dafe34Smrgdnl 
869076888252Smrg
869186dafe34Smrg# XORG_DRIVER_CHECK_EXT()
869286dafe34Smrg# --------------------------
869386dafe34Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
869486dafe34Smrg# is defined, then add $1 to $REQUIRED_MODULES.
869576888252Smrg
869686dafe34SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
869786dafe34Smrg	SAVE_CFLAGS="$CFLAGS"
869886dafe34Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
869986dafe34Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
870086dafe34Smrg#include "xorg-server.h"
870186dafe34Smrg#if !defined $1
870286dafe34Smrg#error $1 not defined
870386dafe34Smrg#endif
870486dafe34Smrg		]])],
870586dafe34Smrg		[_EXT_CHECK=yes],
870686dafe34Smrg		[_EXT_CHECK=no])
870786dafe34Smrg	CFLAGS="$SAVE_CFLAGS"
870886dafe34Smrg	AC_MSG_CHECKING([if $1 is defined])
870986dafe34Smrg	AC_MSG_RESULT([$_EXT_CHECK])
871086dafe34Smrg	if test "$_EXT_CHECK" != no; then
871186dafe34Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
871286dafe34Smrg	fi
871386dafe34Smrg])
87141ae1b5e8Smrg
871586dafe34Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
871686dafe34Smrg#
871786dafe34Smrg# This file is free software; the Free Software Foundation
871886dafe34Smrg# gives unlimited permission to copy and/or distribute it,
871986dafe34Smrg# with or without modifications, as long as this notice is preserved.
872076888252Smrg
872186dafe34Smrg# AM_AUTOMAKE_VERSION(VERSION)
872286dafe34Smrg# ----------------------------
872386dafe34Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
872486dafe34Smrg# generated from the m4 files accompanying Automake X.Y.
872586dafe34Smrg# (This private macro should not be called outside this file.)
872686dafe34SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
872786dafe34Smrg[am__api_version='1.10'
872886dafe34Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
872986dafe34Smrgdnl require some minimum version.  Point them to the right macro.
873086dafe34Smrgm4_if([$1], [1.10.2], [],
873186dafe34Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
873286dafe34Smrg])
873376888252Smrg
873486dafe34Smrg# _AM_AUTOCONF_VERSION(VERSION)
873586dafe34Smrg# -----------------------------
873686dafe34Smrg# aclocal traces this macro to find the Autoconf version.
873786dafe34Smrg# This is a private macro too.  Using m4_define simplifies
873886dafe34Smrg# the logic in aclocal, which can simply ignore this definition.
873986dafe34Smrgm4_define([_AM_AUTOCONF_VERSION], [])
874076888252Smrg
874186dafe34Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
874286dafe34Smrg# -------------------------------
874386dafe34Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
874486dafe34Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
874586dafe34SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
874686dafe34Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
874786dafe34Smrgm4_ifndef([AC_AUTOCONF_VERSION],
874886dafe34Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
874986dafe34Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
875076888252Smrg
875186dafe34Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
875276888252Smrg
875386dafe34Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
875486dafe34Smrg#
875586dafe34Smrg# This file is free software; the Free Software Foundation
875686dafe34Smrg# gives unlimited permission to copy and/or distribute it,
875786dafe34Smrg# with or without modifications, as long as this notice is preserved.
875876888252Smrg
875986dafe34Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
876086dafe34Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
876186dafe34Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
876286dafe34Smrg#
876386dafe34Smrg# Of course, Automake must honor this variable whenever it calls a
876486dafe34Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
876586dafe34Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
876686dafe34Smrg# depending on how configure is run.  This is pretty annoying, since
876786dafe34Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
876886dafe34Smrg# source directory, any form will work fine, but in subdirectories a
876986dafe34Smrg# relative path needs to be adjusted first.
877086dafe34Smrg#
877186dafe34Smrg# $ac_aux_dir/missing
877286dafe34Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
877386dafe34Smrg# $top_srcdir/$ac_aux_dir/missing
877486dafe34Smrg#    fails if $ac_aux_dir is absolute,
877586dafe34Smrg#    fails when called from a subdirectory in a VPATH build with
877686dafe34Smrg#          a relative $ac_aux_dir
877786dafe34Smrg#
877886dafe34Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
877986dafe34Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
878086dafe34Smrg# harmless because $srcdir is `.', but things will broke when you
878186dafe34Smrg# start a VPATH build or use an absolute $srcdir.
878286dafe34Smrg#
878386dafe34Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
878486dafe34Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
878586dafe34Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
878686dafe34Smrg# and then we would define $MISSING as
878786dafe34Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
878886dafe34Smrg# This will work as long as MISSING is not called from configure, because
878986dafe34Smrg# unfortunately $(top_srcdir) has no meaning in configure.
879086dafe34Smrg# However there are other variables, like CC, which are often used in
879186dafe34Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
879286dafe34Smrg#
879386dafe34Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
879486dafe34Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
879586dafe34Smrg# configured tree to be moved without reconfiguration.
879676888252Smrg
879786dafe34SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
879886dafe34Smrg[dnl Rely on autoconf to set up CDPATH properly.
879986dafe34SmrgAC_PREREQ([2.50])dnl
880086dafe34Smrg# expand $ac_aux_dir to an absolute path
880186dafe34Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
880286dafe34Smrg])
880376888252Smrg
880486dafe34Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
880576888252Smrg
880686dafe34Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
880786dafe34Smrg# Free Software Foundation, Inc.
880886dafe34Smrg#
880986dafe34Smrg# This file is free software; the Free Software Foundation
881086dafe34Smrg# gives unlimited permission to copy and/or distribute it,
881186dafe34Smrg# with or without modifications, as long as this notice is preserved.
881276888252Smrg
881386dafe34Smrg# serial 8
881476888252Smrg
881586dafe34Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
881686dafe34Smrg# -------------------------------------
881786dafe34Smrg# Define a conditional.
881886dafe34SmrgAC_DEFUN([AM_CONDITIONAL],
881986dafe34Smrg[AC_PREREQ(2.52)dnl
882086dafe34Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
882186dafe34Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
882286dafe34SmrgAC_SUBST([$1_TRUE])dnl
882386dafe34SmrgAC_SUBST([$1_FALSE])dnl
882486dafe34Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
882586dafe34Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
882686dafe34Smrgif $2; then
882786dafe34Smrg  $1_TRUE=
882886dafe34Smrg  $1_FALSE='#'
882986dafe34Smrgelse
883086dafe34Smrg  $1_TRUE='#'
883186dafe34Smrg  $1_FALSE=
883286dafe34Smrgfi
883386dafe34SmrgAC_CONFIG_COMMANDS_PRE(
883486dafe34Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
883586dafe34Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
883686dafe34SmrgUsually this means the macro was only invoked conditionally.]])
883786dafe34Smrgfi])])
883876888252Smrg
883986dafe34Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
884086dafe34Smrg# Free Software Foundation, Inc.
884186dafe34Smrg#
884286dafe34Smrg# This file is free software; the Free Software Foundation
884386dafe34Smrg# gives unlimited permission to copy and/or distribute it,
884486dafe34Smrg# with or without modifications, as long as this notice is preserved.
884576888252Smrg
884686dafe34Smrg# serial 9
884776888252Smrg
884886dafe34Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
884986dafe34Smrg# written in clear, in which case automake, when reading aclocal.m4,
885086dafe34Smrg# will think it sees a *use*, and therefore will trigger all it's
885186dafe34Smrg# C support machinery.  Also note that it means that autoscan, seeing
885286dafe34Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
885376888252Smrg
885476888252Smrg
885586dafe34Smrg# _AM_DEPENDENCIES(NAME)
885686dafe34Smrg# ----------------------
885786dafe34Smrg# See how the compiler implements dependency checking.
885886dafe34Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
885986dafe34Smrg# We try a few techniques and use that to set a single cache variable.
886086dafe34Smrg#
886186dafe34Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
886286dafe34Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
886386dafe34Smrg# dependency, and given that the user is not expected to run this macro,
886486dafe34Smrg# just rely on AC_PROG_CC.
886586dafe34SmrgAC_DEFUN([_AM_DEPENDENCIES],
886686dafe34Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
886786dafe34SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
886886dafe34SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
886986dafe34SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
887076888252Smrg
887186dafe34Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
887286dafe34Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
887386dafe34Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
887486dafe34Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
887586dafe34Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
887686dafe34Smrg                   [depcc="$$1"   am_compiler_list=])
887786dafe34Smrg
887886dafe34SmrgAC_CACHE_CHECK([dependency style of $depcc],
887986dafe34Smrg               [am_cv_$1_dependencies_compiler_type],
888086dafe34Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
888186dafe34Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
888286dafe34Smrg  # making bogus files that we don't know about and never remove.  For
888386dafe34Smrg  # instance it was reported that on HP-UX the gcc test will end up
888486dafe34Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
888586dafe34Smrg  # in D'.
888686dafe34Smrg  mkdir conftest.dir
888786dafe34Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
888886dafe34Smrg  # using a relative directory.
888986dafe34Smrg  cp "$am_depcomp" conftest.dir
889086dafe34Smrg  cd conftest.dir
889186dafe34Smrg  # We will build objects and dependencies in a subdirectory because
889286dafe34Smrg  # it helps to detect inapplicable dependency modes.  For instance
889386dafe34Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
889486dafe34Smrg  # side effect of compilation, but ICC will put the dependencies in
889586dafe34Smrg  # the current directory while Tru64 will put them in the object
889686dafe34Smrg  # directory.
889786dafe34Smrg  mkdir sub
889876888252Smrg
889986dafe34Smrg  am_cv_$1_dependencies_compiler_type=none
890086dafe34Smrg  if test "$am_compiler_list" = ""; then
890186dafe34Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
890286dafe34Smrg  fi
890386dafe34Smrg  for depmode in $am_compiler_list; do
890486dafe34Smrg    # Setup a source with many dependencies, because some compilers
890586dafe34Smrg    # like to wrap large dependency lists on column 80 (with \), and
890686dafe34Smrg    # we should not choose a depcomp mode which is confused by this.
890786dafe34Smrg    #
890886dafe34Smrg    # We need to recreate these files for each test, as the compiler may
890986dafe34Smrg    # overwrite some of them when testing with obscure command lines.
891086dafe34Smrg    # This happens at least with the AIX C compiler.
891186dafe34Smrg    : > sub/conftest.c
891286dafe34Smrg    for i in 1 2 3 4 5 6; do
891386dafe34Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
891486dafe34Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
891586dafe34Smrg      # Solaris 8's {/usr,}/bin/sh.
891686dafe34Smrg      touch sub/conftst$i.h
891786dafe34Smrg    done
891886dafe34Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
891976888252Smrg
892086dafe34Smrg    case $depmode in
892186dafe34Smrg    nosideeffect)
892286dafe34Smrg      # after this tag, mechanisms are not by side-effect, so they'll
892386dafe34Smrg      # only be used when explicitly requested
892486dafe34Smrg      if test "x$enable_dependency_tracking" = xyes; then
892586dafe34Smrg	continue
89261ae1b5e8Smrg      else
892786dafe34Smrg	break
89281ae1b5e8Smrg      fi
89291ae1b5e8Smrg      ;;
893086dafe34Smrg    none) break ;;
893186dafe34Smrg    esac
893286dafe34Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
893386dafe34Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
893486dafe34Smrg    # handle `-M -o', and we need to detect this.
893586dafe34Smrg    if depmode=$depmode \
893686dafe34Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
893786dafe34Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
893886dafe34Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
893986dafe34Smrg         >/dev/null 2>conftest.err &&
894086dafe34Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
894186dafe34Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
894286dafe34Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
894386dafe34Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
894486dafe34Smrg      # icc doesn't choke on unknown options, it will just issue warnings
894586dafe34Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
894686dafe34Smrg      # that says an option was ignored or not supported.
894786dafe34Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
894886dafe34Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
894986dafe34Smrg      # The diagnosis changed in icc 8.0:
895086dafe34Smrg      #   icc: Command line remark: option '-MP' not supported
895186dafe34Smrg      if (grep 'ignoring option' conftest.err ||
895286dafe34Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
895386dafe34Smrg        am_cv_$1_dependencies_compiler_type=$depmode
895486dafe34Smrg        break
895586dafe34Smrg      fi
895686dafe34Smrg    fi
895786dafe34Smrg  done
895876888252Smrg
895986dafe34Smrg  cd ..
896086dafe34Smrg  rm -rf conftest.dir
896186dafe34Smrgelse
896286dafe34Smrg  am_cv_$1_dependencies_compiler_type=none
896386dafe34Smrgfi
896486dafe34Smrg])
896586dafe34SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
896686dafe34SmrgAM_CONDITIONAL([am__fastdep$1], [
896786dafe34Smrg  test "x$enable_dependency_tracking" != xno \
896886dafe34Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
896986dafe34Smrg])
897076888252Smrg
897176888252Smrg
897286dafe34Smrg# AM_SET_DEPDIR
897386dafe34Smrg# -------------
897486dafe34Smrg# Choose a directory name for dependency files.
897586dafe34Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
897686dafe34SmrgAC_DEFUN([AM_SET_DEPDIR],
897786dafe34Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
897886dafe34SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
897986dafe34Smrg])
898076888252Smrg
898176888252Smrg
898286dafe34Smrg# AM_DEP_TRACK
898386dafe34Smrg# ------------
898486dafe34SmrgAC_DEFUN([AM_DEP_TRACK],
898586dafe34Smrg[AC_ARG_ENABLE(dependency-tracking,
898686dafe34Smrg[  --disable-dependency-tracking  speeds up one-time build
898786dafe34Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
898886dafe34Smrgif test "x$enable_dependency_tracking" != xno; then
898986dafe34Smrg  am_depcomp="$ac_aux_dir/depcomp"
899086dafe34Smrg  AMDEPBACKSLASH='\'
899186dafe34Smrgfi
899286dafe34SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
899386dafe34SmrgAC_SUBST([AMDEPBACKSLASH])dnl
899486dafe34Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
899586dafe34Smrg])
899676888252Smrg
899786dafe34Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
899876888252Smrg
899986dafe34Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
900086dafe34Smrg# Free Software Foundation, Inc.
900186dafe34Smrg#
900286dafe34Smrg# This file is free software; the Free Software Foundation
900386dafe34Smrg# gives unlimited permission to copy and/or distribute it,
900486dafe34Smrg# with or without modifications, as long as this notice is preserved.
900576888252Smrg
900686dafe34Smrg#serial 4
900776888252Smrg
900886dafe34Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
900986dafe34Smrg# ------------------------------
901086dafe34SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
901186dafe34Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
901286dafe34Smrg# are listed without --file.  Let's play safe and only enable the eval
901386dafe34Smrg# if we detect the quoting.
901486dafe34Smrgcase $CONFIG_FILES in
901586dafe34Smrg*\'*) eval set x "$CONFIG_FILES" ;;
901686dafe34Smrg*)   set x $CONFIG_FILES ;;
901786dafe34Smrgesac
901886dafe34Smrgshift
901986dafe34Smrgfor mf
902086dafe34Smrgdo
902186dafe34Smrg  # Strip MF so we end up with the name of the file.
902286dafe34Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
902386dafe34Smrg  # Check whether this is an Automake generated Makefile or not.
902486dafe34Smrg  # We used to match only the files named `Makefile.in', but
902586dafe34Smrg  # some people rename them; so instead we look at the file content.
902686dafe34Smrg  # Grep'ing the first line is not enough: some people post-process
902786dafe34Smrg  # each Makefile.in and add a new line on top of each file to say so.
902886dafe34Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
902986dafe34Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
903086dafe34Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
903186dafe34Smrg    dirpart=`AS_DIRNAME("$mf")`
903286dafe34Smrg  else
903386dafe34Smrg    continue
903486dafe34Smrg  fi
903586dafe34Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
903686dafe34Smrg  # from the Makefile without running `make'.
903786dafe34Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
903886dafe34Smrg  test -z "$DEPDIR" && continue
903986dafe34Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
904086dafe34Smrg  test -z "am__include" && continue
904186dafe34Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
904286dafe34Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
904386dafe34Smrg  U=`sed -n 's/^U = //p' < "$mf"`
904486dafe34Smrg  # Find all dependency output files, they are included files with
904586dafe34Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
904686dafe34Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
904786dafe34Smrg  # expansion.
904886dafe34Smrg  for file in `sed -n "
904986dafe34Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
905086dafe34Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
905186dafe34Smrg    # Make sure the directory exists.
905286dafe34Smrg    test -f "$dirpart/$file" && continue
905386dafe34Smrg    fdir=`AS_DIRNAME(["$file"])`
905486dafe34Smrg    AS_MKDIR_P([$dirpart/$fdir])
905586dafe34Smrg    # echo "creating $dirpart/$file"
905686dafe34Smrg    echo '# dummy' > "$dirpart/$file"
905786dafe34Smrg  done
905886dafe34Smrgdone
905986dafe34Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
906076888252Smrg
90611ae1b5e8Smrg
906286dafe34Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
906386dafe34Smrg# -----------------------------
906486dafe34Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
906586dafe34Smrg#
906686dafe34Smrg# This code is only required when automatic dependency tracking
906786dafe34Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
906886dafe34Smrg# need in order to bootstrap the dependency handling code.
906986dafe34SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
907086dafe34Smrg[AC_CONFIG_COMMANDS([depfiles],
907186dafe34Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
907286dafe34Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
907386dafe34Smrg])
90741ae1b5e8Smrg
907586dafe34Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
907686dafe34Smrg# Free Software Foundation, Inc.
907786dafe34Smrg#
907886dafe34Smrg# This file is free software; the Free Software Foundation
907986dafe34Smrg# gives unlimited permission to copy and/or distribute it,
908086dafe34Smrg# with or without modifications, as long as this notice is preserved.
90811ae1b5e8Smrg
908286dafe34Smrg# serial 8
90831ae1b5e8Smrg
908486dafe34Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
908586dafe34SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
908676888252Smrg
908786dafe34Smrg# Do all the work for Automake.                             -*- Autoconf -*-
908876888252Smrg
908986dafe34Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
909086dafe34Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
909186dafe34Smrg#
909286dafe34Smrg# This file is free software; the Free Software Foundation
909386dafe34Smrg# gives unlimited permission to copy and/or distribute it,
909486dafe34Smrg# with or without modifications, as long as this notice is preserved.
909576888252Smrg
909686dafe34Smrg# serial 13
909776888252Smrg
909886dafe34Smrg# This macro actually does too much.  Some checks are only needed if
909986dafe34Smrg# your package does certain things.  But this isn't really a big deal.
910076888252Smrg
910186dafe34Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
910286dafe34Smrg# AM_INIT_AUTOMAKE([OPTIONS])
910386dafe34Smrg# -----------------------------------------------
910486dafe34Smrg# The call with PACKAGE and VERSION arguments is the old style
910586dafe34Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
910686dafe34Smrg# and VERSION should now be passed to AC_INIT and removed from
910786dafe34Smrg# the call to AM_INIT_AUTOMAKE.
910886dafe34Smrg# We support both call styles for the transition.  After
910986dafe34Smrg# the next Automake release, Autoconf can make the AC_INIT
911086dafe34Smrg# arguments mandatory, and then we can depend on a new Autoconf
911186dafe34Smrg# release and drop the old call support.
911286dafe34SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
911386dafe34Smrg[AC_PREREQ([2.60])dnl
911486dafe34Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
911586dafe34Smrgdnl the ones we care about.
911686dafe34Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
911786dafe34SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
911886dafe34SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
911986dafe34Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
912086dafe34Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
912186dafe34Smrg  # is not polluted with repeated "-I."
912286dafe34Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
912386dafe34Smrg  # test to see if srcdir already configured
912486dafe34Smrg  if test -f $srcdir/config.status; then
912586dafe34Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
912686dafe34Smrg  fi
912786dafe34Smrgfi
912876888252Smrg
912986dafe34Smrg# test whether we have cygpath
913086dafe34Smrgif test -z "$CYGPATH_W"; then
913186dafe34Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
913286dafe34Smrg    CYGPATH_W='cygpath -w'
913386dafe34Smrg  else
913486dafe34Smrg    CYGPATH_W=echo
913586dafe34Smrg  fi
913686dafe34Smrgfi
913786dafe34SmrgAC_SUBST([CYGPATH_W])
913876888252Smrg
913986dafe34Smrg# Define the identity of the package.
914086dafe34Smrgdnl Distinguish between old-style and new-style calls.
914186dafe34Smrgm4_ifval([$2],
914286dafe34Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
914386dafe34Smrg AC_SUBST([PACKAGE], [$1])dnl
914486dafe34Smrg AC_SUBST([VERSION], [$2])],
914586dafe34Smrg[_AM_SET_OPTIONS([$1])dnl
914686dafe34Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
914786dafe34Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
914886dafe34Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
914986dafe34Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
915086dafe34Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
915176888252Smrg
915286dafe34Smrg_AM_IF_OPTION([no-define],,
915386dafe34Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
915486dafe34Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
915576888252Smrg
915686dafe34Smrg# Some tools Automake needs.
915786dafe34SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
915886dafe34SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
915986dafe34SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
916086dafe34SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
916186dafe34SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
916286dafe34SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
916386dafe34SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
916486dafe34SmrgAM_PROG_INSTALL_SH
916586dafe34SmrgAM_PROG_INSTALL_STRIP
916686dafe34SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
916786dafe34Smrg# We need awk for the "check" target.  The system "awk" is bad on
916886dafe34Smrg# some platforms.
916986dafe34SmrgAC_REQUIRE([AC_PROG_AWK])dnl
917086dafe34SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
917186dafe34SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
917286dafe34Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
917386dafe34Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
917486dafe34Smrg	      		     [_AM_PROG_TAR([v7])])])
917586dafe34Smrg_AM_IF_OPTION([no-dependencies],,
917686dafe34Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
917786dafe34Smrg                  [_AM_DEPENDENCIES(CC)],
917886dafe34Smrg                  [define([AC_PROG_CC],
917986dafe34Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
918086dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
918186dafe34Smrg                  [_AM_DEPENDENCIES(CXX)],
918286dafe34Smrg                  [define([AC_PROG_CXX],
918386dafe34Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
918486dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
918586dafe34Smrg                  [_AM_DEPENDENCIES(OBJC)],
918686dafe34Smrg                  [define([AC_PROG_OBJC],
918786dafe34Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
918886dafe34Smrg])
918986dafe34Smrg])
919076888252Smrg
919176888252Smrg
919286dafe34Smrg# When config.status generates a header, we must update the stamp-h file.
919386dafe34Smrg# This file resides in the same directory as the config header
919486dafe34Smrg# that is generated.  The stamp files are numbered to have different names.
919576888252Smrg
919686dafe34Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
919786dafe34Smrg# loop where config.status creates the headers, so we can generate
919886dafe34Smrg# our stamp files there.
919986dafe34SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
920086dafe34Smrg[# Compute $1's index in $config_headers.
920186dafe34Smrg_am_arg=$1
920286dafe34Smrg_am_stamp_count=1
920386dafe34Smrgfor _am_header in $config_headers :; do
920486dafe34Smrg  case $_am_header in
920586dafe34Smrg    $_am_arg | $_am_arg:* )
920686dafe34Smrg      break ;;
920786dafe34Smrg    * )
920886dafe34Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
920986dafe34Smrg  esac
921086dafe34Smrgdone
921186dafe34Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
921276888252Smrg
921386dafe34Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
921486dafe34Smrg#
921586dafe34Smrg# This file is free software; the Free Software Foundation
921686dafe34Smrg# gives unlimited permission to copy and/or distribute it,
921786dafe34Smrg# with or without modifications, as long as this notice is preserved.
921876888252Smrg
921986dafe34Smrg# AM_PROG_INSTALL_SH
922086dafe34Smrg# ------------------
922186dafe34Smrg# Define $install_sh.
922286dafe34SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
922386dafe34Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
922486dafe34Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
922586dafe34SmrgAC_SUBST(install_sh)])
922676888252Smrg
922786dafe34Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
922886dafe34Smrg#
922986dafe34Smrg# This file is free software; the Free Software Foundation
923086dafe34Smrg# gives unlimited permission to copy and/or distribute it,
923186dafe34Smrg# with or without modifications, as long as this notice is preserved.
923276888252Smrg
923386dafe34Smrg# serial 2
923476888252Smrg
923586dafe34Smrg# Check whether the underlying file-system supports filenames
923686dafe34Smrg# with a leading dot.  For instance MS-DOS doesn't.
923786dafe34SmrgAC_DEFUN([AM_SET_LEADING_DOT],
923886dafe34Smrg[rm -rf .tst 2>/dev/null
923986dafe34Smrgmkdir .tst 2>/dev/null
924086dafe34Smrgif test -d .tst; then
924186dafe34Smrg  am__leading_dot=.
924286dafe34Smrgelse
924386dafe34Smrg  am__leading_dot=_
924486dafe34Smrgfi
924586dafe34Smrgrmdir .tst 2>/dev/null
924686dafe34SmrgAC_SUBST([am__leading_dot])])
924776888252Smrg
924886dafe34Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
924986dafe34Smrg# From Jim Meyering
925086dafe34Smrg
925186dafe34Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
925286dafe34Smrg# Free Software Foundation, Inc.
925386dafe34Smrg#
925486dafe34Smrg# This file is free software; the Free Software Foundation
925586dafe34Smrg# gives unlimited permission to copy and/or distribute it,
925686dafe34Smrg# with or without modifications, as long as this notice is preserved.
925786dafe34Smrg
925886dafe34Smrg# serial 4
925986dafe34Smrg
926086dafe34SmrgAC_DEFUN([AM_MAINTAINER_MODE],
926186dafe34Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
926286dafe34Smrg  dnl maintainer-mode is disabled by default
926386dafe34Smrg  AC_ARG_ENABLE(maintainer-mode,
926486dafe34Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
926586dafe34Smrg			  (and sometimes confusing) to the casual installer],
926686dafe34Smrg      USE_MAINTAINER_MODE=$enableval,
926786dafe34Smrg      USE_MAINTAINER_MODE=no)
926886dafe34Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
926986dafe34Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
927086dafe34Smrg  MAINT=$MAINTAINER_MODE_TRUE
927186dafe34Smrg  AC_SUBST(MAINT)dnl
927286dafe34Smrg]
927386dafe34Smrg)
927476888252Smrg
927586dafe34SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
927676888252Smrg
927786dafe34Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
927876888252Smrg
927986dafe34Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
928076888252Smrg#
928186dafe34Smrg# This file is free software; the Free Software Foundation
928286dafe34Smrg# gives unlimited permission to copy and/or distribute it,
928386dafe34Smrg# with or without modifications, as long as this notice is preserved.
928476888252Smrg
928586dafe34Smrg# serial 3
928676888252Smrg
928786dafe34Smrg# AM_MAKE_INCLUDE()
928886dafe34Smrg# -----------------
928986dafe34Smrg# Check to see how make treats includes.
929086dafe34SmrgAC_DEFUN([AM_MAKE_INCLUDE],
929186dafe34Smrg[am_make=${MAKE-make}
929286dafe34Smrgcat > confinc << 'END'
929386dafe34Smrgam__doit:
929486dafe34Smrg	@echo done
929586dafe34Smrg.PHONY: am__doit
929686dafe34SmrgEND
929786dafe34Smrg# If we don't find an include directive, just comment out the code.
929886dafe34SmrgAC_MSG_CHECKING([for style of include used by $am_make])
929986dafe34Smrgam__include="#"
930086dafe34Smrgam__quote=
930186dafe34Smrg_am_result=none
930286dafe34Smrg# First try GNU make style include.
930386dafe34Smrgecho "include confinc" > confmf
930486dafe34Smrg# We grep out `Entering directory' and `Leaving directory'
930586dafe34Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
930686dafe34Smrg# In particular we don't look at `^make:' because GNU make might
930786dafe34Smrg# be invoked under some other name (usually "gmake"), in which
930886dafe34Smrg# case it prints its new name instead of `make'.
930986dafe34Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
931086dafe34Smrg   am__include=include
931186dafe34Smrg   am__quote=
931286dafe34Smrg   _am_result=GNU
931386dafe34Smrgfi
931486dafe34Smrg# Now try BSD make style include.
931586dafe34Smrgif test "$am__include" = "#"; then
931686dafe34Smrg   echo '.include "confinc"' > confmf
931786dafe34Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
931886dafe34Smrg      am__include=.include
931986dafe34Smrg      am__quote="\""
932086dafe34Smrg      _am_result=BSD
932186dafe34Smrg   fi
932286dafe34Smrgfi
932386dafe34SmrgAC_SUBST([am__include])
932486dafe34SmrgAC_SUBST([am__quote])
932586dafe34SmrgAC_MSG_RESULT([$_am_result])
932686dafe34Smrgrm -f confinc confmf
932786dafe34Smrg])
932876888252Smrg
932986dafe34Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
933076888252Smrg
933186dafe34Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
933286dafe34Smrg# Free Software Foundation, Inc.
93331ae1b5e8Smrg#
933486dafe34Smrg# This file is free software; the Free Software Foundation
933586dafe34Smrg# gives unlimited permission to copy and/or distribute it,
933686dafe34Smrg# with or without modifications, as long as this notice is preserved.
933776888252Smrg
933886dafe34Smrg# serial 5
933976888252Smrg
934086dafe34Smrg# AM_MISSING_PROG(NAME, PROGRAM)
934186dafe34Smrg# ------------------------------
934286dafe34SmrgAC_DEFUN([AM_MISSING_PROG],
934386dafe34Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
934486dafe34Smrg$1=${$1-"${am_missing_run}$2"}
934586dafe34SmrgAC_SUBST($1)])
934676888252Smrg
934776888252Smrg
934886dafe34Smrg# AM_MISSING_HAS_RUN
934986dafe34Smrg# ------------------
935086dafe34Smrg# Define MISSING if not defined so far and test if it supports --run.
935186dafe34Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
935286dafe34SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
935386dafe34Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
935486dafe34SmrgAC_REQUIRE_AUX_FILE([missing])dnl
935586dafe34Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
935686dafe34Smrg# Use eval to expand $SHELL
935786dafe34Smrgif eval "$MISSING --run true"; then
935886dafe34Smrg  am_missing_run="$MISSING --run "
935986dafe34Smrgelse
936086dafe34Smrg  am_missing_run=
936186dafe34Smrg  AC_MSG_WARN([`missing' script is too old or missing])
936286dafe34Smrgfi
93631ae1b5e8Smrg])
936476888252Smrg
936586dafe34Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
936686dafe34Smrg#
936786dafe34Smrg# This file is free software; the Free Software Foundation
936886dafe34Smrg# gives unlimited permission to copy and/or distribute it,
936986dafe34Smrg# with or without modifications, as long as this notice is preserved.
937076888252Smrg
937186dafe34Smrg# AM_PROG_MKDIR_P
937286dafe34Smrg# ---------------
937386dafe34Smrg# Check for `mkdir -p'.
937486dafe34SmrgAC_DEFUN([AM_PROG_MKDIR_P],
937586dafe34Smrg[AC_PREREQ([2.60])dnl
937686dafe34SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
937786dafe34Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
937886dafe34Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
937986dafe34Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
938086dafe34Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
938186dafe34Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
938286dafe34Smrgdnl adjustment using top_builddir (which is defined more often than
938386dafe34Smrgdnl MKDIR_P).
938486dafe34SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
938586dafe34Smrgcase $mkdir_p in
938686dafe34Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
938786dafe34Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
938886dafe34Smrgesac
93891ae1b5e8Smrg])
939076888252Smrg
939186dafe34Smrg# Helper functions for option handling.                     -*- Autoconf -*-
939276888252Smrg
939386dafe34Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
93941ae1b5e8Smrg#
939586dafe34Smrg# This file is free software; the Free Software Foundation
939686dafe34Smrg# gives unlimited permission to copy and/or distribute it,
939786dafe34Smrg# with or without modifications, as long as this notice is preserved.
939886dafe34Smrg
939986dafe34Smrg# serial 4
940086dafe34Smrg
940186dafe34Smrg# _AM_MANGLE_OPTION(NAME)
940286dafe34Smrg# -----------------------
940386dafe34SmrgAC_DEFUN([_AM_MANGLE_OPTION],
940486dafe34Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
940586dafe34Smrg
940686dafe34Smrg# _AM_SET_OPTION(NAME)
940786dafe34Smrg# ------------------------------
940886dafe34Smrg# Set option NAME.  Presently that only means defining a flag for this option.
940986dafe34SmrgAC_DEFUN([_AM_SET_OPTION],
941086dafe34Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
941186dafe34Smrg
941286dafe34Smrg# _AM_SET_OPTIONS(OPTIONS)
941386dafe34Smrg# ----------------------------------
941486dafe34Smrg# OPTIONS is a space-separated list of Automake options.
941586dafe34SmrgAC_DEFUN([_AM_SET_OPTIONS],
941686dafe34Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
941786dafe34Smrg
941886dafe34Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
941986dafe34Smrg# -------------------------------------------
942086dafe34Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
942186dafe34SmrgAC_DEFUN([_AM_IF_OPTION],
942286dafe34Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
942386dafe34Smrg
942486dafe34Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
942586dafe34Smrg
942686dafe34Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
942786dafe34Smrg# Free Software Foundation, Inc.
94281ae1b5e8Smrg#
942986dafe34Smrg# This file is free software; the Free Software Foundation
943086dafe34Smrg# gives unlimited permission to copy and/or distribute it,
943186dafe34Smrg# with or without modifications, as long as this notice is preserved.
943276888252Smrg
943386dafe34Smrg# serial 4
943476888252Smrg
943586dafe34Smrg# AM_SANITY_CHECK
943686dafe34Smrg# ---------------
943786dafe34SmrgAC_DEFUN([AM_SANITY_CHECK],
943886dafe34Smrg[AC_MSG_CHECKING([whether build environment is sane])
943986dafe34Smrg# Just in case
944086dafe34Smrgsleep 1
944186dafe34Smrgecho timestamp > conftest.file
944286dafe34Smrg# Do `set' in a subshell so we don't clobber the current shell's
944386dafe34Smrg# arguments.  Must try -L first in case configure is actually a
944486dafe34Smrg# symlink; some systems play weird games with the mod time of symlinks
944586dafe34Smrg# (eg FreeBSD returns the mod time of the symlink's containing
944686dafe34Smrg# directory).
944786dafe34Smrgif (
944886dafe34Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
944986dafe34Smrg   if test "$[*]" = "X"; then
945086dafe34Smrg      # -L didn't work.
945186dafe34Smrg      set X `ls -t $srcdir/configure conftest.file`
945286dafe34Smrg   fi
945386dafe34Smrg   rm -f conftest.file
945486dafe34Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
945586dafe34Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
945686dafe34Smrg
945786dafe34Smrg      # If neither matched, then we have a broken ls.  This can happen
945886dafe34Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
945986dafe34Smrg      # broken ls alias from the environment.  This has actually
946086dafe34Smrg      # happened.  Such a system could not be considered "sane".
946186dafe34Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
946286dafe34Smrgalias in your environment])
946386dafe34Smrg   fi
946486dafe34Smrg
946586dafe34Smrg   test "$[2]" = conftest.file
946686dafe34Smrg   )
946786dafe34Smrgthen
946886dafe34Smrg   # Ok.
946986dafe34Smrg   :
947076888252Smrgelse
947186dafe34Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
947286dafe34SmrgCheck your system clock])
947386dafe34Smrgfi
947486dafe34SmrgAC_MSG_RESULT(yes)])
947576888252Smrg
947686dafe34Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
94771ae1b5e8Smrg#
947886dafe34Smrg# This file is free software; the Free Software Foundation
947986dafe34Smrg# gives unlimited permission to copy and/or distribute it,
948086dafe34Smrg# with or without modifications, as long as this notice is preserved.
948186dafe34Smrg
948286dafe34Smrg# AM_PROG_INSTALL_STRIP
948386dafe34Smrg# ---------------------
948486dafe34Smrg# One issue with vendor `install' (even GNU) is that you can't
948586dafe34Smrg# specify the program used to strip binaries.  This is especially
948686dafe34Smrg# annoying in cross-compiling environments, where the build's strip
948786dafe34Smrg# is unlikely to handle the host's binaries.
948886dafe34Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
948986dafe34Smrg# always use install-sh in `make install-strip', and initialize
949086dafe34Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
949186dafe34SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
949286dafe34Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
949386dafe34Smrg# Installed binaries are usually stripped using `strip' when the user
949486dafe34Smrg# run `make install-strip'.  However `strip' might not be the right
949586dafe34Smrg# tool to use in cross-compilation environments, therefore Automake
949686dafe34Smrg# will honor the `STRIP' environment variable to overrule this program.
949786dafe34Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
949886dafe34Smrgif test "$cross_compiling" != no; then
949986dafe34Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
950086dafe34Smrgfi
950186dafe34SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
950286dafe34SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
950386dafe34Smrg
950486dafe34Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
95051ae1b5e8Smrg#
950686dafe34Smrg# This file is free software; the Free Software Foundation
950786dafe34Smrg# gives unlimited permission to copy and/or distribute it,
950886dafe34Smrg# with or without modifications, as long as this notice is preserved.
950976888252Smrg
951086dafe34Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
951186dafe34Smrg# ---------------------------
951286dafe34Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
951386dafe34Smrg# This macro is traced by Automake.
951486dafe34SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
951576888252Smrg
951686dafe34Smrg# Check how to create a tarball.                            -*- Autoconf -*-
951776888252Smrg
951886dafe34Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
951986dafe34Smrg#
952086dafe34Smrg# This file is free software; the Free Software Foundation
952186dafe34Smrg# gives unlimited permission to copy and/or distribute it,
952286dafe34Smrg# with or without modifications, as long as this notice is preserved.
952376888252Smrg
952486dafe34Smrg# serial 2
952576888252Smrg
952686dafe34Smrg# _AM_PROG_TAR(FORMAT)
952786dafe34Smrg# --------------------
952886dafe34Smrg# Check how to create a tarball in format FORMAT.
952986dafe34Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
953086dafe34Smrg#
953186dafe34Smrg# Substitute a variable $(am__tar) that is a command
953286dafe34Smrg# writing to stdout a FORMAT-tarball containing the directory
953386dafe34Smrg# $tardir.
953486dafe34Smrg#     tardir=directory && $(am__tar) > result.tar
953586dafe34Smrg#
953686dafe34Smrg# Substitute a variable $(am__untar) that extract such
953786dafe34Smrg# a tarball read from stdin.
953886dafe34Smrg#     $(am__untar) < result.tar
953986dafe34SmrgAC_DEFUN([_AM_PROG_TAR],
954086dafe34Smrg[# Always define AMTAR for backward compatibility.
954186dafe34SmrgAM_MISSING_PROG([AMTAR], [tar])
954286dafe34Smrgm4_if([$1], [v7],
954386dafe34Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
954486dafe34Smrg     [m4_case([$1], [ustar],, [pax],,
954586dafe34Smrg              [m4_fatal([Unknown tar format])])
954686dafe34SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
954786dafe34Smrg# Loop over all known methods to create a tar archive until one works.
954886dafe34Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
954986dafe34Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
955086dafe34Smrg# Do not fold the above two line into one, because Tru64 sh and
955186dafe34Smrg# Solaris sh will not grok spaces in the rhs of `-'.
955286dafe34Smrgfor _am_tool in $_am_tools
955386dafe34Smrgdo
955486dafe34Smrg  case $_am_tool in
955586dafe34Smrg  gnutar)
955686dafe34Smrg    for _am_tar in tar gnutar gtar;
955786dafe34Smrg    do
955886dafe34Smrg      AM_RUN_LOG([$_am_tar --version]) && break
955986dafe34Smrg    done
956086dafe34Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
956186dafe34Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
956286dafe34Smrg    am__untar="$_am_tar -xf -"
956386dafe34Smrg    ;;
956486dafe34Smrg  plaintar)
956586dafe34Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
956686dafe34Smrg    # ustar tarball either.
956786dafe34Smrg    (tar --version) >/dev/null 2>&1 && continue
956886dafe34Smrg    am__tar='tar chf - "$$tardir"'
956986dafe34Smrg    am__tar_='tar chf - "$tardir"'
957086dafe34Smrg    am__untar='tar xf -'
957186dafe34Smrg    ;;
957286dafe34Smrg  pax)
957386dafe34Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
957486dafe34Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
957586dafe34Smrg    am__untar='pax -r'
957686dafe34Smrg    ;;
957786dafe34Smrg  cpio)
957886dafe34Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
957986dafe34Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
958086dafe34Smrg    am__untar='cpio -i -H $1 -d'
958186dafe34Smrg    ;;
958286dafe34Smrg  none)
958386dafe34Smrg    am__tar=false
958486dafe34Smrg    am__tar_=false
958586dafe34Smrg    am__untar=false
958686dafe34Smrg    ;;
958786dafe34Smrg  esac
958876888252Smrg
958986dafe34Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
959086dafe34Smrg  # and am__untar set.
959186dafe34Smrg  test -n "${am_cv_prog_tar_$1}" && break
959276888252Smrg
959386dafe34Smrg  # tar/untar a dummy directory, and stop if the command works
959486dafe34Smrg  rm -rf conftest.dir
959586dafe34Smrg  mkdir conftest.dir
959686dafe34Smrg  echo GrepMe > conftest.dir/file
959786dafe34Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
959886dafe34Smrg  rm -rf conftest.dir
959986dafe34Smrg  if test -s conftest.tar; then
960086dafe34Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
960186dafe34Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
960286dafe34Smrg  fi
960386dafe34Smrgdone
960486dafe34Smrgrm -rf conftest.dir
960586dafe34Smrg
960686dafe34SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
960786dafe34SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
960886dafe34SmrgAC_SUBST([am__tar])
960986dafe34SmrgAC_SUBST([am__untar])
961086dafe34Smrg]) # _AM_PROG_TAR
961176888252Smrg
9612