aclocal.m4 revision 72313efb
172313efbSmrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2bdcaa8d0Smrg
3bdcaa8d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
472313efbSmrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5bdcaa8d0Smrg# This file is free software; the Free Software Foundation
6bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
7bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
8bdcaa8d0Smrg
9bdcaa8d0Smrg# This program is distributed in the hope that it will be useful,
10bdcaa8d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11bdcaa8d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12bdcaa8d0Smrg# PARTICULAR PURPOSE.
13bdcaa8d0Smrg
1472313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION],
1572313efbSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1672313efbSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
1772313efbSmrg[m4_warning([this file was generated for autoconf 2.63.
1872313efbSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
1972313efbSmrgIf you have problems, you may need to regenerate the build system entirely.
2072313efbSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2172313efbSmrg
22bdcaa8d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2372313efbSmrg#
2472313efbSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2572313efbSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
2672313efbSmrg#   Written by Gordon Matzigkeit, 1996
2772313efbSmrg#
2872313efbSmrg# This file is free software; the Free Software Foundation gives
2972313efbSmrg# unlimited permission to copy and/or distribute it, with or without
3072313efbSmrg# modifications, as long as this notice is preserved.
3172313efbSmrg
3272313efbSmrgm4_define([_LT_COPYING], [dnl
3372313efbSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3472313efbSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
3572313efbSmrg#   Written by Gordon Matzigkeit, 1996
3672313efbSmrg#
3772313efbSmrg#   This file is part of GNU Libtool.
3872313efbSmrg#
3972313efbSmrg# GNU Libtool is free software; you can redistribute it and/or
4072313efbSmrg# modify it under the terms of the GNU General Public License as
4172313efbSmrg# published by the Free Software Foundation; either version 2 of
4272313efbSmrg# the License, or (at your option) any later version.
4372313efbSmrg#
4472313efbSmrg# As a special exception to the GNU General Public License,
4572313efbSmrg# if you distribute this file as part of a program or library that
4672313efbSmrg# is built using GNU Libtool, you may include this file under the
4772313efbSmrg# same distribution terms that you use for the rest of that program.
4872313efbSmrg#
4972313efbSmrg# GNU Libtool is distributed in the hope that it will be useful,
5072313efbSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
5172313efbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5272313efbSmrg# GNU General Public License for more details.
5372313efbSmrg#
5472313efbSmrg# You should have received a copy of the GNU General Public License
5572313efbSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
5672313efbSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
5772313efbSmrg# obtained by writing to the Free Software Foundation, Inc.,
5872313efbSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5972313efbSmrg])
60bdcaa8d0Smrg
6172313efbSmrg# serial 56 LT_INIT
62bdcaa8d0Smrg
63bdcaa8d0Smrg
6472313efbSmrg# LT_PREREQ(VERSION)
6572313efbSmrg# ------------------
6672313efbSmrg# Complain and exit if this libtool version is less that VERSION.
6772313efbSmrgm4_defun([LT_PREREQ],
6872313efbSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
6972313efbSmrg       [m4_default([$3],
7072313efbSmrg		   [m4_fatal([Libtool version $1 or higher is required],
7172313efbSmrg		             63)])],
7272313efbSmrg       [$2])])
73bdcaa8d0Smrg
74bdcaa8d0Smrg
7572313efbSmrg# _LT_CHECK_BUILDDIR
7672313efbSmrg# ------------------
7772313efbSmrg# Complain if the absolute build directory name contains unusual characters
7872313efbSmrgm4_defun([_LT_CHECK_BUILDDIR],
7972313efbSmrg[case `pwd` in
8072313efbSmrg  *\ * | *\	*)
8172313efbSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
8272313efbSmrgesac
8372313efbSmrg])
8472313efbSmrg
8572313efbSmrg
8672313efbSmrg# LT_INIT([OPTIONS])
8772313efbSmrg# ------------------
8872313efbSmrgAC_DEFUN([LT_INIT],
8972313efbSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
9072313efbSmrgAC_BEFORE([$0], [LT_LANG])dnl
9172313efbSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
9272313efbSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
9372313efbSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
9472313efbSmrg
9572313efbSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
9672313efbSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
9772313efbSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
9872313efbSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
9972313efbSmrgdnl unless we require an AC_DEFUNed macro:
10072313efbSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
10172313efbSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
10272313efbSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
10372313efbSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
10472313efbSmrgm4_require([_LT_PROG_LTMAIN])dnl
10572313efbSmrg
10672313efbSmrgdnl Parse OPTIONS
10772313efbSmrg_LT_SET_OPTIONS([$0], [$1])
108bdcaa8d0Smrg
109bdcaa8d0Smrg# This can be used to rebuild libtool when needed
11072313efbSmrgLIBTOOL_DEPS="$ltmain"
111bdcaa8d0Smrg
112bdcaa8d0Smrg# Always use our own libtool.
113bdcaa8d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114bdcaa8d0SmrgAC_SUBST(LIBTOOL)dnl
115bdcaa8d0Smrg
11672313efbSmrg_LT_SETUP
117bdcaa8d0Smrg
11872313efbSmrg# Only expand once:
11972313efbSmrgm4_define([LT_INIT])
12072313efbSmrg])# LT_INIT
121bdcaa8d0Smrg
12272313efbSmrg# Old names:
12372313efbSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12472313efbSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12572313efbSmrgdnl aclocal-1.4 backwards compatibility:
12672313efbSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12772313efbSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12872313efbSmrg
12972313efbSmrg
13072313efbSmrg# _LT_CC_BASENAME(CC)
13172313efbSmrg# -------------------
13272313efbSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
13372313efbSmrgm4_defun([_LT_CC_BASENAME],
13472313efbSmrg[for cc_temp in $1""; do
13572313efbSmrg  case $cc_temp in
13672313efbSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
13772313efbSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
13872313efbSmrg    \-*) ;;
13972313efbSmrg    *) break;;
14072313efbSmrg  esac
14172313efbSmrgdone
14272313efbSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14372313efbSmrg])
14472313efbSmrg
14572313efbSmrg
14672313efbSmrg# _LT_FILEUTILS_DEFAULTS
14772313efbSmrg# ----------------------
14872313efbSmrg# It is okay to use these file commands and assume they have been set
14972313efbSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
15072313efbSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
15172313efbSmrg[: ${CP="cp -f"}
15272313efbSmrg: ${MV="mv -f"}
15372313efbSmrg: ${RM="rm -f"}
15472313efbSmrg])# _LT_FILEUTILS_DEFAULTS
15572313efbSmrg
15672313efbSmrg
15772313efbSmrg# _LT_SETUP
15872313efbSmrg# ---------
15972313efbSmrgm4_defun([_LT_SETUP],
16072313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
16272313efbSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
16372313efbSmrg_LT_DECL([], [host], [0])dnl
16472313efbSmrg_LT_DECL([], [host_os], [0])dnl
16572313efbSmrgdnl
16672313efbSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
16772313efbSmrg_LT_DECL([], [build], [0])dnl
16872313efbSmrg_LT_DECL([], [build_os], [0])dnl
16972313efbSmrgdnl
170bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CC])dnl
17172313efbSmrgAC_REQUIRE([LT_PATH_LD])dnl
17272313efbSmrgAC_REQUIRE([LT_PATH_NM])dnl
17372313efbSmrgdnl
174bdcaa8d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
17572313efbSmrgtest -z "$LN_S" && LN_S="ln -s"
17672313efbSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177bdcaa8d0Smrgdnl
17872313efbSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
17972313efbSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
18072313efbSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
18172313efbSmrgdnl
18272313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18372313efbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
18472313efbSmrgm4_require([_LT_CMD_RELOAD])dnl
18572313efbSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
18672313efbSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
18772313efbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
18872313efbSmrg
18972313efbSmrg_LT_CONFIG_LIBTOOL_INIT([
19072313efbSmrg# See if we are running on zsh, and set the options which allow our
19172313efbSmrg# commands through without removal of \ escapes INIT.
19272313efbSmrgif test -n "\${ZSH_VERSION+set}" ; then
19372313efbSmrg   setopt NO_GLOB_SUBST
19472313efbSmrgfi
19572313efbSmrg])
19672313efbSmrgif test -n "${ZSH_VERSION+set}" ; then
19772313efbSmrg   setopt NO_GLOB_SUBST
19872313efbSmrgfi
199bdcaa8d0Smrg
20072313efbSmrg_LT_CHECK_OBJDIR
201bdcaa8d0Smrg
20272313efbSmrgm4_require([_LT_TAG_COMPILER])dnl
20372313efbSmrg_LT_PROG_ECHO_BACKSLASH
204bdcaa8d0Smrg
205bdcaa8d0Smrgcase $host_os in
206bdcaa8d0Smrgaix3*)
207bdcaa8d0Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208bdcaa8d0Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209bdcaa8d0Smrg  # vanish in a puff of smoke.
210bdcaa8d0Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211bdcaa8d0Smrg    COLLECT_NAMES=
212bdcaa8d0Smrg    export COLLECT_NAMES
213bdcaa8d0Smrg  fi
214bdcaa8d0Smrg  ;;
215bdcaa8d0Smrgesac
216bdcaa8d0Smrg
217bdcaa8d0Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
218bdcaa8d0Smrg# metacharacters that are still active within double-quoted strings.
21972313efbSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220bdcaa8d0Smrg
221bdcaa8d0Smrg# Same as above, but do not quote variable references.
22272313efbSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223bdcaa8d0Smrg
224bdcaa8d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a
225bdcaa8d0Smrg# double_quote_subst'ed string.
226bdcaa8d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227bdcaa8d0Smrg
22872313efbSmrg# Sed substitution to delay expansion of an escaped single quote.
22972313efbSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
23072313efbSmrg
231bdcaa8d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions
232bdcaa8d0Smrgno_glob_subst='s/\*/\\\*/g'
233bdcaa8d0Smrg
234bdcaa8d0Smrg# Global variables:
23572313efbSmrgofile=libtool
236bdcaa8d0Smrgcan_build_shared=yes
237bdcaa8d0Smrg
238bdcaa8d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
239bdcaa8d0Smrg# which needs '.lib').
240bdcaa8d0Smrglibext=a
241bdcaa8d0Smrg
24272313efbSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243bdcaa8d0Smrg
244bdcaa8d0Smrgold_CC="$CC"
245bdcaa8d0Smrgold_CFLAGS="$CFLAGS"
246bdcaa8d0Smrg
247bdcaa8d0Smrg# Set sane defaults for various variables
248bdcaa8d0Smrgtest -z "$CC" && CC=cc
249bdcaa8d0Smrgtest -z "$LTCC" && LTCC=$CC
250bdcaa8d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251bdcaa8d0Smrgtest -z "$LD" && LD=ld
252bdcaa8d0Smrgtest -z "$ac_objext" && ac_objext=o
253bdcaa8d0Smrg
254bdcaa8d0Smrg_LT_CC_BASENAME([$compiler])
255bdcaa8d0Smrg
256bdcaa8d0Smrg# Only perform the check for file, if the check method requires it
25772313efbSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258bdcaa8d0Smrgcase $deplibs_check_method in
259bdcaa8d0Smrgfile_magic*)
260bdcaa8d0Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
26172313efbSmrg    _LT_PATH_MAGIC
262bdcaa8d0Smrg  fi
263bdcaa8d0Smrg  ;;
264bdcaa8d0Smrgesac
265bdcaa8d0Smrg
26672313efbSmrg# Use C for the default configuration in the libtool script
26772313efbSmrgLT_SUPPORTED_TAG([CC])
26872313efbSmrg_LT_LANG_C_CONFIG
26972313efbSmrg_LT_LANG_DEFAULT_CONFIG
27072313efbSmrg_LT_CONFIG_COMMANDS
27172313efbSmrg])# _LT_SETUP
272bdcaa8d0Smrg
273bdcaa8d0Smrg
27472313efbSmrg# _LT_PROG_LTMAIN
27572313efbSmrg# ---------------
27672313efbSmrg# Note that this code is called both from `configure', and `config.status'
27772313efbSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
27872313efbSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
27972313efbSmrg# so we pass a copy along to make sure it has a sensible value anyway.
28072313efbSmrgm4_defun([_LT_PROG_LTMAIN],
28172313efbSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
28272313efbSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
28372313efbSmrgltmain="$ac_aux_dir/ltmain.sh"
28472313efbSmrg])# _LT_PROG_LTMAIN
285bdcaa8d0Smrg
286bdcaa8d0Smrg
287bdcaa8d0Smrg
28872313efbSmrg# So that we can recreate a full libtool script including additional
28972313efbSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
29072313efbSmrg# in macros and then make a single call at the end using the `libtool'
29172313efbSmrg# label.
292bdcaa8d0Smrg
293bdcaa8d0Smrg
29472313efbSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
29572313efbSmrg# ----------------------------------------
29672313efbSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
29772313efbSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
29872313efbSmrg[m4_ifval([$1],
29972313efbSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
30072313efbSmrg                     [$1
30172313efbSmrg])])])
302bdcaa8d0Smrg
30372313efbSmrg# Initialize.
30472313efbSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305bdcaa8d0Smrg
306bdcaa8d0Smrg
30772313efbSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
30872313efbSmrg# ------------------------------
30972313efbSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
31072313efbSmrgm4_define([_LT_CONFIG_LIBTOOL],
31172313efbSmrg[m4_ifval([$1],
31272313efbSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
31372313efbSmrg                     [$1
31472313efbSmrg])])])
31572313efbSmrg
31672313efbSmrg# Initialize.
31772313efbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
31872313efbSmrg
31972313efbSmrg
32072313efbSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
32172313efbSmrg# -----------------------------------------------------
32272313efbSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
32372313efbSmrg[_LT_CONFIG_LIBTOOL([$1])
32472313efbSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
325bdcaa8d0Smrg])
326bdcaa8d0Smrg
327bdcaa8d0Smrg
32872313efbSmrg# _LT_FORMAT_COMMENT([COMMENT])
32972313efbSmrg# -----------------------------
33072313efbSmrg# Add leading comment marks to the start of each line, and a trailing
33172313efbSmrg# full-stop to the whole comment if one is not present already.
33272313efbSmrgm4_define([_LT_FORMAT_COMMENT],
33372313efbSmrg[m4_ifval([$1], [
33472313efbSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
33572313efbSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
33672313efbSmrg)])
33772313efbSmrg
33872313efbSmrg
33972313efbSmrg
34072313efbSmrg
34172313efbSmrg
34272313efbSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
34372313efbSmrg# -------------------------------------------------------------------
34472313efbSmrg# CONFIGNAME is the name given to the value in the libtool script.
34572313efbSmrg# VARNAME is the (base) name used in the configure script.
34672313efbSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
34772313efbSmrg# VARNAME.  Any other value will be used directly.
34872313efbSmrgm4_define([_LT_DECL],
34972313efbSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
35072313efbSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
35172313efbSmrg	[m4_ifval([$1], [$1], [$2])])
35272313efbSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
35372313efbSmrg    m4_ifval([$4],
35472313efbSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
35572313efbSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
35672313efbSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
35772313efbSmrg])
358bdcaa8d0Smrg
359bdcaa8d0Smrg
36072313efbSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
36172313efbSmrg# --------------------------------------------------------
36272313efbSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363bdcaa8d0Smrg
364bdcaa8d0Smrg
36572313efbSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
36672313efbSmrg# ------------------------------------------------
36772313efbSmrgm4_define([lt_decl_tag_varnames],
36872313efbSmrg[_lt_decl_filter([tagged?], [yes], $@)])
369bdcaa8d0Smrg
370bdcaa8d0Smrg
37172313efbSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
37272313efbSmrg# ---------------------------------------------------------
37372313efbSmrgm4_define([_lt_decl_filter],
37472313efbSmrg[m4_case([$#],
37572313efbSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
37672313efbSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
37772313efbSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
37872313efbSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
37972313efbSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
38072313efbSmrg])
381bdcaa8d0Smrg
382bdcaa8d0Smrg
38372313efbSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
38472313efbSmrg# --------------------------------------------------
38572313efbSmrgm4_define([lt_decl_quote_varnames],
38672313efbSmrg[_lt_decl_filter([value], [1], $@)])
387bdcaa8d0Smrg
388bdcaa8d0Smrg
38972313efbSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
39072313efbSmrg# ---------------------------------------------------
39172313efbSmrgm4_define([lt_decl_dquote_varnames],
39272313efbSmrg[_lt_decl_filter([value], [2], $@)])
393bdcaa8d0Smrg
394bdcaa8d0Smrg
39572313efbSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
39672313efbSmrg# ---------------------------------------------------
39772313efbSmrgm4_define([lt_decl_varnames_tagged],
39872313efbSmrg[m4_assert([$# <= 2])dnl
39972313efbSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
40072313efbSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
40172313efbSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
40272313efbSmrgm4_define([_lt_decl_varnames_tagged],
40372313efbSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404bdcaa8d0Smrg
405bdcaa8d0Smrg
40672313efbSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
40772313efbSmrg# ------------------------------------------------
40872313efbSmrgm4_define([lt_decl_all_varnames],
40972313efbSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
41072313efbSmrg     m4_if([$2], [],
41172313efbSmrg	   m4_quote(lt_decl_varnames),
41272313efbSmrg	m4_quote(m4_shift($@))))[]dnl
41372313efbSmrg])
41472313efbSmrgm4_define([_lt_decl_all_varnames],
41572313efbSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
41672313efbSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
41772313efbSmrg])
418bdcaa8d0Smrg
419bdcaa8d0Smrg
42072313efbSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
42172313efbSmrg# ------------------------------------
42272313efbSmrg# Quote a variable value, and forward it to `config.status' so that its
42372313efbSmrg# declaration there will have the same value as in `configure'.  VARNAME
42472313efbSmrg# must have a single quote delimited value for this to work.
42572313efbSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
42672313efbSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427bdcaa8d0Smrg
428bdcaa8d0Smrg
42972313efbSmrg# _LT_CONFIG_STATUS_DECLARATIONS
43072313efbSmrg# ------------------------------
43172313efbSmrg# We delimit libtool config variables with single quotes, so when
43272313efbSmrg# we write them to config.status, we have to be sure to quote all
43372313efbSmrg# embedded single quotes properly.  In configure, this macro expands
43472313efbSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
43572313efbSmrg#
43672313efbSmrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
43772313efbSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
43872313efbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
43972313efbSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440bdcaa8d0Smrg
441bdcaa8d0Smrg
44272313efbSmrg# _LT_LIBTOOL_TAGS
44372313efbSmrg# ----------------
44472313efbSmrg# Output comment and list of tags supported by the script
44572313efbSmrgm4_defun([_LT_LIBTOOL_TAGS],
44672313efbSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
44772313efbSmrgavailable_tags="_LT_TAGS"dnl
44872313efbSmrg])
449bdcaa8d0Smrg
450bdcaa8d0Smrg
45172313efbSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
45272313efbSmrg# -----------------------------------
45372313efbSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
45472313efbSmrg# expand to a commented shell variable setting:
45572313efbSmrg#
45672313efbSmrg#    # Some comment about what VAR is for.
45772313efbSmrg#    visible_name=$lt_internal_name
45872313efbSmrgm4_define([_LT_LIBTOOL_DECLARE],
45972313efbSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
46072313efbSmrg					   [description])))[]dnl
46172313efbSmrgm4_pushdef([_libtool_name],
46272313efbSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
46372313efbSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
46472313efbSmrg    [0], [_libtool_name=[$]$1],
46572313efbSmrg    [1], [_libtool_name=$lt_[]$1],
46672313efbSmrg    [2], [_libtool_name=$lt_[]$1],
46772313efbSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
46872313efbSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
46972313efbSmrg])
470bdcaa8d0Smrg
47172313efbSmrg
47272313efbSmrg# _LT_LIBTOOL_CONFIG_VARS
47372313efbSmrg# -----------------------
47472313efbSmrg# Produce commented declarations of non-tagged libtool config variables
47572313efbSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
47672313efbSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
47772313efbSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
47872313efbSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
47972313efbSmrg[m4_foreach([_lt_var],
48072313efbSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
48172313efbSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
48272313efbSmrg
48372313efbSmrg
48472313efbSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
48572313efbSmrg# -------------------------
48672313efbSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
48772313efbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
48872313efbSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
48972313efbSmrg
49072313efbSmrg
49172313efbSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
49272313efbSmrg# ------------------------------
49372313efbSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
49472313efbSmrg
49572313efbSmrg
49672313efbSmrg# _LT_CONFIG_COMMANDS
49772313efbSmrg# -------------------
49872313efbSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
49972313efbSmrg# variables for single and double quote escaping we saved from calls
50072313efbSmrg# to _LT_DECL, we can put quote escaped variables declarations
50172313efbSmrg# into `config.status', and then the shell code to quote escape them in
50272313efbSmrg# for loops in `config.status'.  Finally, any additional code accumulated
50372313efbSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
50472313efbSmrgm4_defun([_LT_CONFIG_COMMANDS],
50572313efbSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
50672313efbSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
50772313efbSmrg	dnl instead of duplicating it all over again into config.status,
50872313efbSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
50972313efbSmrg	dnl needs to know what name is stored there:
51072313efbSmrg        [AC_CONFIG_COMMANDS([libtool],
51172313efbSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
51272313efbSmrg    dnl If the libtool generation code is destined for config.status,
51372313efbSmrg    dnl expand the accumulated commands and init code now:
51472313efbSmrg    [AC_CONFIG_COMMANDS([libtool],
51572313efbSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
51672313efbSmrg])#_LT_CONFIG_COMMANDS
51772313efbSmrg
51872313efbSmrg
51972313efbSmrg# Initialize.
52072313efbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
52172313efbSmrg[
52272313efbSmrg
52372313efbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
52472313efbSmrg# if CDPATH is set.
52572313efbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52672313efbSmrg
52772313efbSmrgsed_quote_subst='$sed_quote_subst'
52872313efbSmrgdouble_quote_subst='$double_quote_subst'
52972313efbSmrgdelay_variable_subst='$delay_variable_subst'
53072313efbSmrg_LT_CONFIG_STATUS_DECLARATIONS
53172313efbSmrgLTCC='$LTCC'
53272313efbSmrgLTCFLAGS='$LTCFLAGS'
53372313efbSmrgcompiler='$compiler_DEFAULT'
53472313efbSmrg
53572313efbSmrg# Quote evaled strings.
53672313efbSmrgfor var in lt_decl_all_varnames([[ \
53772313efbSmrg]], lt_decl_quote_varnames); do
53872313efbSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
53972313efbSmrg    *[[\\\\\\\`\\"\\\$]]*)
54072313efbSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541bdcaa8d0Smrg      ;;
54272313efbSmrg    *)
54372313efbSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544bdcaa8d0Smrg      ;;
545bdcaa8d0Smrg    esac
54672313efbSmrgdone
54772313efbSmrg
54872313efbSmrg# Double-quote double-evaled strings.
54972313efbSmrgfor var in lt_decl_all_varnames([[ \
55072313efbSmrg]], lt_decl_dquote_varnames); do
55172313efbSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
55272313efbSmrg    *[[\\\\\\\`\\"\\\$]]*)
55372313efbSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554bdcaa8d0Smrg      ;;
55572313efbSmrg    *)
55672313efbSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557bdcaa8d0Smrg      ;;
558bdcaa8d0Smrg    esac
55972313efbSmrgdone
560bdcaa8d0Smrg
56172313efbSmrg# Fix-up fallback echo if it was mangled by the above quoting rules.
56272313efbSmrgcase \$lt_ECHO in
56372313efbSmrg*'\\\[$]0 --fallback-echo"')dnl "
56472313efbSmrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565bdcaa8d0Smrg  ;;
56672313efbSmrgesac
567bdcaa8d0Smrg
56872313efbSmrg_LT_OUTPUT_LIBTOOL_INIT
56972313efbSmrg])
570bdcaa8d0Smrg
571bdcaa8d0Smrg
57272313efbSmrg# LT_OUTPUT
57372313efbSmrg# ---------
57472313efbSmrg# This macro allows early generation of the libtool script (before
57572313efbSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
57672313efbSmrg# tests.
57772313efbSmrgAC_DEFUN([LT_OUTPUT],
57872313efbSmrg[: ${CONFIG_LT=./config.lt}
57972313efbSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
58072313efbSmrgcat >"$CONFIG_LT" <<_LTEOF
58172313efbSmrg#! $SHELL
58272313efbSmrg# Generated by $as_me.
58372313efbSmrg# Run this file to recreate a libtool stub with the current configuration.
58472313efbSmrg
58572313efbSmrglt_cl_silent=false
58672313efbSmrgSHELL=\${CONFIG_SHELL-$SHELL}
58772313efbSmrg_LTEOF
58872313efbSmrg
58972313efbSmrgcat >>"$CONFIG_LT" <<\_LTEOF
59072313efbSmrgAS_SHELL_SANITIZE
59172313efbSmrg_AS_PREPARE
59272313efbSmrg
59372313efbSmrgexec AS_MESSAGE_FD>&1
59472313efbSmrgexec AS_MESSAGE_LOG_FD>>config.log
59572313efbSmrg{
59672313efbSmrg  echo
59772313efbSmrg  AS_BOX([Running $as_me.])
59872313efbSmrg} >&AS_MESSAGE_LOG_FD
599bdcaa8d0Smrg
60072313efbSmrglt_cl_help="\
60172313efbSmrg\`$as_me' creates a local libtool stub from the current configuration,
60272313efbSmrgfor use in further configure time tests before the real libtool is
60372313efbSmrggenerated.
604bdcaa8d0Smrg
60572313efbSmrgUsage: $[0] [[OPTIONS]]
606bdcaa8d0Smrg
60772313efbSmrg  -h, --help      print this help, then exit
60872313efbSmrg  -V, --version   print version number, then exit
60972313efbSmrg  -q, --quiet     do not print progress messages
61072313efbSmrg  -d, --debug     don't remove temporary files
611bdcaa8d0Smrg
61272313efbSmrgReport bugs to <bug-libtool@gnu.org>."
613bdcaa8d0Smrg
61472313efbSmrglt_cl_version="\
61572313efbSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
61672313efbSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
61772313efbSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618bdcaa8d0Smrg
61972313efbSmrgCopyright (C) 2008 Free Software Foundation, Inc.
62072313efbSmrgThis config.lt script is free software; the Free Software Foundation
62172313efbSmrggives unlimited permision to copy, distribute and modify it."
622bdcaa8d0Smrg
62372313efbSmrgwhile test $[#] != 0
62472313efbSmrgdo
62572313efbSmrg  case $[1] in
62672313efbSmrg    --version | --v* | -V )
62772313efbSmrg      echo "$lt_cl_version"; exit 0 ;;
62872313efbSmrg    --help | --h* | -h )
62972313efbSmrg      echo "$lt_cl_help"; exit 0 ;;
63072313efbSmrg    --debug | --d* | -d )
63172313efbSmrg      debug=: ;;
63272313efbSmrg    --quiet | --q* | --silent | --s* | -q )
63372313efbSmrg      lt_cl_silent=: ;;
63472313efbSmrg
63572313efbSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
63672313efbSmrgTry \`$[0] --help' for more information.]) ;;
63772313efbSmrg
63872313efbSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
63972313efbSmrgTry \`$[0] --help' for more information.]) ;;
64072313efbSmrg  esac
64172313efbSmrg  shift
64272313efbSmrgdone
643bdcaa8d0Smrg
64472313efbSmrgif $lt_cl_silent; then
64572313efbSmrg  exec AS_MESSAGE_FD>/dev/null
64672313efbSmrgfi
64772313efbSmrg_LTEOF
64872313efbSmrg
64972313efbSmrgcat >>"$CONFIG_LT" <<_LTEOF
65072313efbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
65172313efbSmrg_LTEOF
65272313efbSmrg
65372313efbSmrgcat >>"$CONFIG_LT" <<\_LTEOF
65472313efbSmrgAC_MSG_NOTICE([creating $ofile])
65572313efbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
65672313efbSmrgAS_EXIT(0)
65772313efbSmrg_LTEOF
65872313efbSmrgchmod +x "$CONFIG_LT"
65972313efbSmrg
66072313efbSmrg# configure is writing to config.log, but config.lt does its own redirection,
66172313efbSmrg# appending to config.log, which fails on DOS, as config.log is still kept
66272313efbSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
66372313efbSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
66472313efbSmrgif test "$no_create" != yes; then
66572313efbSmrg  lt_cl_success=:
66672313efbSmrg  test "$silent" = yes &&
66772313efbSmrg    lt_config_lt_args="$lt_config_lt_args --quiet"
66872313efbSmrg  exec AS_MESSAGE_LOG_FD>/dev/null
66972313efbSmrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
67072313efbSmrg  exec AS_MESSAGE_LOG_FD>>config.log
67172313efbSmrg  $lt_cl_success || AS_EXIT(1)
67272313efbSmrgfi
67372313efbSmrg])# LT_OUTPUT
674bdcaa8d0Smrg
675bdcaa8d0Smrg
67672313efbSmrg# _LT_CONFIG(TAG)
67772313efbSmrg# ---------------
67872313efbSmrg# If TAG is the built-in tag, create an initial libtool script with a
67972313efbSmrg# default configuration from the untagged config vars.  Otherwise add code
68072313efbSmrg# to config.status for appending the configuration named by TAG from the
68172313efbSmrg# matching tagged config vars.
68272313efbSmrgm4_defun([_LT_CONFIG],
68372313efbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
68472313efbSmrg_LT_CONFIG_SAVE_COMMANDS([
68572313efbSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
68672313efbSmrg  m4_if(_LT_TAG, [C], [
68772313efbSmrg    # See if we are running on zsh, and set the options which allow our
68872313efbSmrg    # commands through without removal of \ escapes.
68972313efbSmrg    if test -n "${ZSH_VERSION+set}" ; then
69072313efbSmrg      setopt NO_GLOB_SUBST
69172313efbSmrg    fi
692bdcaa8d0Smrg
69372313efbSmrg    cfgfile="${ofile}T"
69472313efbSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
69572313efbSmrg    $RM "$cfgfile"
696bdcaa8d0Smrg
69772313efbSmrg    cat <<_LT_EOF >> "$cfgfile"
69872313efbSmrg#! $SHELL
699bdcaa8d0Smrg
70072313efbSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
70172313efbSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
70272313efbSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
70372313efbSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
70472313efbSmrg#
70572313efbSmrg_LT_COPYING
70672313efbSmrg_LT_LIBTOOL_TAGS
707bdcaa8d0Smrg
70872313efbSmrg# ### BEGIN LIBTOOL CONFIG
70972313efbSmrg_LT_LIBTOOL_CONFIG_VARS
71072313efbSmrg_LT_LIBTOOL_TAG_VARS
71172313efbSmrg# ### END LIBTOOL CONFIG
712bdcaa8d0Smrg
71372313efbSmrg_LT_EOF
714bdcaa8d0Smrg
71572313efbSmrg  case $host_os in
71672313efbSmrg  aix3*)
71772313efbSmrg    cat <<\_LT_EOF >> "$cfgfile"
71872313efbSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
71972313efbSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
72072313efbSmrg# vanish in a puff of smoke.
72172313efbSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
72272313efbSmrg  COLLECT_NAMES=
72372313efbSmrg  export COLLECT_NAMES
72472313efbSmrgfi
72572313efbSmrg_LT_EOF
726bdcaa8d0Smrg    ;;
727bdcaa8d0Smrg  esac
728bdcaa8d0Smrg
72972313efbSmrg  _LT_PROG_LTMAIN
730bdcaa8d0Smrg
73172313efbSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
73272313efbSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
73372313efbSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
73472313efbSmrg  # is reportedly fixed, but why not run on old versions too?
73572313efbSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
73672313efbSmrg    || (rm -f "$cfgfile"; exit 1)
737bdcaa8d0Smrg
73872313efbSmrg  _LT_PROG_XSI_SHELLFNS
739bdcaa8d0Smrg
74072313efbSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
74172313efbSmrg    || (rm -f "$cfgfile"; exit 1)
742bdcaa8d0Smrg
74372313efbSmrg  mv -f "$cfgfile" "$ofile" ||
74472313efbSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
74572313efbSmrg  chmod +x "$ofile"
74672313efbSmrg],
74772313efbSmrg[cat <<_LT_EOF >> "$ofile"
748bdcaa8d0Smrg
74972313efbSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
75072313efbSmrgdnl in a comment (ie after a #).
75172313efbSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
75272313efbSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
75372313efbSmrg# ### END LIBTOOL TAG CONFIG: $1
75472313efbSmrg_LT_EOF
75572313efbSmrg])dnl /m4_if
75672313efbSmrg],
75772313efbSmrg[m4_if([$1], [], [
75872313efbSmrg    PACKAGE='$PACKAGE'
75972313efbSmrg    VERSION='$VERSION'
76072313efbSmrg    TIMESTAMP='$TIMESTAMP'
76172313efbSmrg    RM='$RM'
76272313efbSmrg    ofile='$ofile'], [])
76372313efbSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
76472313efbSmrg])# _LT_CONFIG
765bdcaa8d0Smrg
766bdcaa8d0Smrg
76772313efbSmrg# LT_SUPPORTED_TAG(TAG)
76872313efbSmrg# ---------------------
76972313efbSmrg# Trace this macro to discover what tags are supported by the libtool
77072313efbSmrg# --tag option, using:
77172313efbSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
77272313efbSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773bdcaa8d0Smrg
774bdcaa8d0Smrg
77572313efbSmrg# C support is built-in for now
77672313efbSmrgm4_define([_LT_LANG_C_enabled], [])
77772313efbSmrgm4_define([_LT_TAGS], [])
778bdcaa8d0Smrg
779bdcaa8d0Smrg
78072313efbSmrg# LT_LANG(LANG)
78172313efbSmrg# -------------
78272313efbSmrg# Enable libtool support for the given language if not already enabled.
78372313efbSmrgAC_DEFUN([LT_LANG],
78472313efbSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
78572313efbSmrgm4_case([$1],
78672313efbSmrg  [C],			[_LT_LANG(C)],
78772313efbSmrg  [C++],		[_LT_LANG(CXX)],
78872313efbSmrg  [Java],		[_LT_LANG(GCJ)],
78972313efbSmrg  [Fortran 77],		[_LT_LANG(F77)],
79072313efbSmrg  [Fortran],		[_LT_LANG(FC)],
79172313efbSmrg  [Windows Resource],	[_LT_LANG(RC)],
79272313efbSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
79372313efbSmrg    [_LT_LANG($1)],
79472313efbSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
79572313efbSmrg])# LT_LANG
79672313efbSmrg
79772313efbSmrg
79872313efbSmrg# _LT_LANG(LANGNAME)
79972313efbSmrg# ------------------
80072313efbSmrgm4_defun([_LT_LANG],
80172313efbSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
80272313efbSmrg  [LT_SUPPORTED_TAG([$1])dnl
80372313efbSmrg  m4_append([_LT_TAGS], [$1 ])dnl
80472313efbSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
80572313efbSmrg  _LT_LANG_$1_CONFIG($1)])dnl
80672313efbSmrg])# _LT_LANG
807bdcaa8d0Smrg
808bdcaa8d0Smrg
80972313efbSmrg# _LT_LANG_DEFAULT_CONFIG
81072313efbSmrg# -----------------------
81172313efbSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
81272313efbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
81372313efbSmrg  [LT_LANG(CXX)],
81472313efbSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
81572313efbSmrg
81672313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
81772313efbSmrg  [LT_LANG(F77)],
81872313efbSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
81972313efbSmrg
82072313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
82172313efbSmrg  [LT_LANG(FC)],
82272313efbSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
82372313efbSmrg
82472313efbSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
82572313efbSmrgdnl pulling things in needlessly.
82672313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
82772313efbSmrg  [LT_LANG(GCJ)],
82872313efbSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
82972313efbSmrg    [LT_LANG(GCJ)],
83072313efbSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
83172313efbSmrg      [LT_LANG(GCJ)],
83272313efbSmrg      [m4_ifdef([AC_PROG_GCJ],
83372313efbSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
83472313efbSmrg       m4_ifdef([A][M_PROG_GCJ],
83572313efbSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
83672313efbSmrg       m4_ifdef([LT_PROG_GCJ],
83772313efbSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
83872313efbSmrg
83972313efbSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
84072313efbSmrg  [LT_LANG(RC)],
84172313efbSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
84272313efbSmrg])# _LT_LANG_DEFAULT_CONFIG
84372313efbSmrg
84472313efbSmrg# Obsolete macros:
84572313efbSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
84672313efbSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
84772313efbSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
84872313efbSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
84972313efbSmrgdnl aclocal-1.4 backwards compatibility:
85072313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
85172313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
85272313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
85372313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
85472313efbSmrg
85572313efbSmrg
85672313efbSmrg# _LT_TAG_COMPILER
85772313efbSmrg# ----------------
85872313efbSmrgm4_defun([_LT_TAG_COMPILER],
85972313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
860bdcaa8d0Smrg
86172313efbSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
86272313efbSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
86372313efbSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
86472313efbSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865bdcaa8d0Smrg
86672313efbSmrg# If no C compiler was specified, use CC.
86772313efbSmrgLTCC=${LTCC-"$CC"}
868bdcaa8d0Smrg
86972313efbSmrg# If no C compiler flags were specified, use CFLAGS.
87072313efbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871bdcaa8d0Smrg
87272313efbSmrg# Allow CC to be a program name with arguments.
87372313efbSmrgcompiler=$CC
87472313efbSmrg])# _LT_TAG_COMPILER
875bdcaa8d0Smrg
876bdcaa8d0Smrg
87772313efbSmrg# _LT_COMPILER_BOILERPLATE
87872313efbSmrg# ------------------------
87972313efbSmrg# Check for compiler boilerplate output or warnings with
88072313efbSmrg# the simple compiler test code.
88172313efbSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
88272313efbSmrg[m4_require([_LT_DECL_SED])dnl
88372313efbSmrgac_outfile=conftest.$ac_objext
88472313efbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
88572313efbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
88672313efbSmrg_lt_compiler_boilerplate=`cat conftest.err`
88772313efbSmrg$RM conftest*
88872313efbSmrg])# _LT_COMPILER_BOILERPLATE
889bdcaa8d0Smrg
890bdcaa8d0Smrg
89172313efbSmrg# _LT_LINKER_BOILERPLATE
89272313efbSmrg# ----------------------
89372313efbSmrg# Check for linker boilerplate output or warnings with
89472313efbSmrg# the simple link test code.
89572313efbSmrgm4_defun([_LT_LINKER_BOILERPLATE],
89672313efbSmrg[m4_require([_LT_DECL_SED])dnl
89772313efbSmrgac_outfile=conftest.$ac_objext
89872313efbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
89972313efbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
90072313efbSmrg_lt_linker_boilerplate=`cat conftest.err`
90172313efbSmrg$RM -r conftest*
90272313efbSmrg])# _LT_LINKER_BOILERPLATE
903bdcaa8d0Smrg
90472313efbSmrg# _LT_REQUIRED_DARWIN_CHECKS
90572313efbSmrg# -------------------------
90672313efbSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
90772313efbSmrg  case $host_os in
90872313efbSmrg    rhapsody* | darwin*)
90972313efbSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
91072313efbSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
91172313efbSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
91272313efbSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
91372313efbSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
91472313efbSmrg    _LT_DECL([], [DSYMUTIL], [1],
91572313efbSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
91672313efbSmrg    _LT_DECL([], [NMEDIT], [1],
91772313efbSmrg      [Tool to change global to local symbols on Mac OS X])
91872313efbSmrg    _LT_DECL([], [LIPO], [1],
91972313efbSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
92072313efbSmrg    _LT_DECL([], [OTOOL], [1],
92172313efbSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
92272313efbSmrg    _LT_DECL([], [OTOOL64], [1],
92372313efbSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
92472313efbSmrg
92572313efbSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
92672313efbSmrg      [lt_cv_apple_cc_single_mod=no
92772313efbSmrg      if test -z "${LT_MULTI_MODULE}"; then
92872313efbSmrg	# By default we will add the -single_module flag. You can override
92972313efbSmrg	# by either setting the environment variable LT_MULTI_MODULE
93072313efbSmrg	# non-empty at configure time, or by adding -multi_module to the
93172313efbSmrg	# link flags.
93272313efbSmrg	rm -rf libconftest.dylib*
93372313efbSmrg	echo "int foo(void){return 1;}" > conftest.c
93472313efbSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93572313efbSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
93672313efbSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
93772313efbSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
93872313efbSmrg        _lt_result=$?
93972313efbSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
94072313efbSmrg	  lt_cv_apple_cc_single_mod=yes
94172313efbSmrg	else
94272313efbSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
94372313efbSmrg	fi
94472313efbSmrg	rm -rf libconftest.dylib*
94572313efbSmrg	rm -f conftest.*
94672313efbSmrg      fi])
94772313efbSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
94872313efbSmrg      [lt_cv_ld_exported_symbols_list],
94972313efbSmrg      [lt_cv_ld_exported_symbols_list=no
95072313efbSmrg      save_LDFLAGS=$LDFLAGS
95172313efbSmrg      echo "_main" > conftest.sym
95272313efbSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
95372313efbSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
95472313efbSmrg	[lt_cv_ld_exported_symbols_list=yes],
95572313efbSmrg	[lt_cv_ld_exported_symbols_list=no])
95672313efbSmrg	LDFLAGS="$save_LDFLAGS"
957bdcaa8d0Smrg    ])
95872313efbSmrg    case $host_os in
95972313efbSmrg    rhapsody* | darwin1.[[012]])
96072313efbSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
96172313efbSmrg    darwin1.*)
96272313efbSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
96372313efbSmrg    darwin*) # darwin 5.x on
96472313efbSmrg      # if running on 10.5 or later, the deployment target defaults
96572313efbSmrg      # to the OS version, if on x86, and 10.4, the deployment
96672313efbSmrg      # target defaults to 10.4. Don't you love it?
96772313efbSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
96872313efbSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
96972313efbSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
97072313efbSmrg	10.[[012]]*)
97172313efbSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
97272313efbSmrg	10.*)
97372313efbSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
97472313efbSmrg      esac
97572313efbSmrg    ;;
97672313efbSmrg  esac
97772313efbSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
97872313efbSmrg      _lt_dar_single_mod='$single_module'
97972313efbSmrg    fi
98072313efbSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
98172313efbSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
98272313efbSmrg    else
98372313efbSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
98472313efbSmrg    fi
98572313efbSmrg    if test "$DSYMUTIL" != ":"; then
98672313efbSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
98772313efbSmrg    else
98872313efbSmrg      _lt_dsymutil=
989bdcaa8d0Smrg    fi
990bdcaa8d0Smrg    ;;
991bdcaa8d0Smrg  esac
99272313efbSmrg])
993bdcaa8d0Smrg
994bdcaa8d0Smrg
99572313efbSmrg# _LT_DARWIN_LINKER_FEATURES
99672313efbSmrg# --------------------------
99772313efbSmrg# Checks for linker and compiler features on darwin
99872313efbSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
99972313efbSmrg[
100072313efbSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
100172313efbSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
100272313efbSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
100372313efbSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
100472313efbSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
100572313efbSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
100672313efbSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
100772313efbSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
100872313efbSmrg  case $cc_basename in
100972313efbSmrg     ifort*) _lt_dar_can_shared=yes ;;
101072313efbSmrg     *) _lt_dar_can_shared=$GCC ;;
1011bdcaa8d0Smrg  esac
101272313efbSmrg  if test "$_lt_dar_can_shared" = "yes"; then
101372313efbSmrg    output_verbose_link_cmd=echo
101472313efbSmrg    _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}"
101572313efbSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
101672313efbSmrg    _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}"
101772313efbSmrg    _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}"
101872313efbSmrg    m4_if([$1], [CXX],
101972313efbSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
102072313efbSmrg      _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}"
102172313efbSmrg      _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}"
102272313efbSmrg    fi
102372313efbSmrg],[])
102472313efbSmrg  else
102572313efbSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
102672313efbSmrg  fi
102772313efbSmrg])
1028bdcaa8d0Smrg
102972313efbSmrg# _LT_SYS_MODULE_PATH_AIX
103072313efbSmrg# -----------------------
103172313efbSmrg# Links a minimal program and checks the executable
103272313efbSmrg# for the system default hardcoded library path. In most cases,
103372313efbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
103472313efbSmrg# the location of the communication and MPI libs are included too.
103572313efbSmrg# If we don't find anything, use the default library path according
103672313efbSmrg# to the aix ld manual.
103772313efbSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
103872313efbSmrg[m4_require([_LT_DECL_SED])dnl
103972313efbSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
104072313efbSmrglt_aix_libpath_sed='
104172313efbSmrg    /Import File Strings/,/^$/ {
104272313efbSmrg	/^0/ {
104372313efbSmrg	    s/^0  *\(.*\)$/\1/
104472313efbSmrg	    p
104572313efbSmrg	}
104672313efbSmrg    }'
104772313efbSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
104872313efbSmrg# Check for a 64-bit object if we didn't find anything.
104972313efbSmrgif test -z "$aix_libpath"; then
105072313efbSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
105172313efbSmrgfi],[])
105272313efbSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
105372313efbSmrg])# _LT_SYS_MODULE_PATH_AIX
1054bdcaa8d0Smrg
1055bdcaa8d0Smrg
105672313efbSmrg# _LT_SHELL_INIT(ARG)
105772313efbSmrg# -------------------
105872313efbSmrgm4_define([_LT_SHELL_INIT],
105972313efbSmrg[ifdef([AC_DIVERSION_NOTICE],
106072313efbSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
106172313efbSmrg	 [AC_DIVERT_PUSH(NOTICE)])
106272313efbSmrg$1
106372313efbSmrgAC_DIVERT_POP
106472313efbSmrg])# _LT_SHELL_INIT
1065bdcaa8d0Smrg
1066bdcaa8d0Smrg
106772313efbSmrg# _LT_PROG_ECHO_BACKSLASH
106872313efbSmrg# -----------------------
106972313efbSmrg# Add some code to the start of the generated configure script which
107072313efbSmrg# will find an echo command which doesn't interpret backslashes.
107172313efbSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
107272313efbSmrg[_LT_SHELL_INIT([
107372313efbSmrg# Check that we are running under the correct shell.
107472313efbSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075bdcaa8d0Smrg
107672313efbSmrgcase X$lt_ECHO in
107772313efbSmrgX*--fallback-echo)
107872313efbSmrg  # Remove one level of quotation (which was required for Make).
107972313efbSmrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
108072313efbSmrg  ;;
108172313efbSmrgesac
108272313efbSmrg
108372313efbSmrgECHO=${lt_ECHO-echo}
108472313efbSmrgif test "X[$]1" = X--no-reexec; then
108572313efbSmrg  # Discard the --no-reexec flag, and continue.
108672313efbSmrg  shift
108772313efbSmrgelif test "X[$]1" = X--fallback-echo; then
108872313efbSmrg  # Avoid inline document here, it may be left over
108972313efbSmrg  :
109072313efbSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
109172313efbSmrg  # Yippee, $ECHO works!
109272313efbSmrg  :
1093bdcaa8d0Smrgelse
109472313efbSmrg  # Restart under the correct shell.
109572313efbSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096bdcaa8d0Smrgfi
1097bdcaa8d0Smrg
109872313efbSmrgif test "X[$]1" = X--fallback-echo; then
109972313efbSmrg  # used as fallback echo
110072313efbSmrg  shift
110172313efbSmrg  cat <<_LT_EOF
110272313efbSmrg[$]*
110372313efbSmrg_LT_EOF
110472313efbSmrg  exit 0
1105bdcaa8d0Smrgfi
1106bdcaa8d0Smrg
110772313efbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
110872313efbSmrg# if CDPATH is set.
110972313efbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110bdcaa8d0Smrg
111172313efbSmrgif test -z "$lt_ECHO"; then
111272313efbSmrg  if test "X${echo_test_string+set}" != Xset; then
111372313efbSmrg    # find a string as large as possible, as long as the shell can cope with it
111472313efbSmrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
111572313efbSmrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
111672313efbSmrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
111772313efbSmrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
111872313efbSmrg      then
111972313efbSmrg        break
112072313efbSmrg      fi
112172313efbSmrg    done
1122bdcaa8d0Smrg  fi
1123bdcaa8d0Smrg
112472313efbSmrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
112572313efbSmrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
112672313efbSmrg     test "X$echo_testing_string" = "X$echo_test_string"; then
112772313efbSmrg    :
112872313efbSmrg  else
112972313efbSmrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
113072313efbSmrg    # backslashes.  This makes it impossible to quote backslashes using
113172313efbSmrg    #   echo "$something" | sed 's/\\/\\\\/g'
113272313efbSmrg    #
113372313efbSmrg    # So, first we look for a working echo in the user's PATH.
1134bdcaa8d0Smrg
113572313efbSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
113672313efbSmrg    for dir in $PATH /usr/ucb; do
113772313efbSmrg      IFS="$lt_save_ifs"
113872313efbSmrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
113972313efbSmrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
114072313efbSmrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
114172313efbSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
114272313efbSmrg        ECHO="$dir/echo"
114372313efbSmrg        break
114472313efbSmrg      fi
114572313efbSmrg    done
114672313efbSmrg    IFS="$lt_save_ifs"
1147bdcaa8d0Smrg
114872313efbSmrg    if test "X$ECHO" = Xecho; then
114972313efbSmrg      # We didn't find a better echo, so look for alternatives.
115072313efbSmrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
115172313efbSmrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
115272313efbSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
115372313efbSmrg        # This shell has a builtin print -r that does the trick.
115472313efbSmrg        ECHO='print -r'
115572313efbSmrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
115672313efbSmrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
115772313efbSmrg        # If we have ksh, try running configure again with it.
115872313efbSmrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
115972313efbSmrg        export ORIGINAL_CONFIG_SHELL
116072313efbSmrg        CONFIG_SHELL=/bin/ksh
116172313efbSmrg        export CONFIG_SHELL
116272313efbSmrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
116372313efbSmrg      else
116472313efbSmrg        # Try using printf.
116572313efbSmrg        ECHO='printf %s\n'
116672313efbSmrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
116772313efbSmrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
116872313efbSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
116972313efbSmrg	  # Cool, printf works
117072313efbSmrg	  :
117172313efbSmrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
117272313efbSmrg	     test "X$echo_testing_string" = 'X\t' &&
117372313efbSmrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
117472313efbSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
117572313efbSmrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
117672313efbSmrg	  export CONFIG_SHELL
117772313efbSmrg	  SHELL="$CONFIG_SHELL"
117872313efbSmrg	  export SHELL
117972313efbSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118072313efbSmrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
118172313efbSmrg	     test "X$echo_testing_string" = 'X\t' &&
118272313efbSmrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
118372313efbSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
118472313efbSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
118572313efbSmrg        else
118672313efbSmrg	  # maybe with a smaller string...
118772313efbSmrg	  prev=:
1188bdcaa8d0Smrg
118972313efbSmrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
119072313efbSmrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
119172313efbSmrg	    then
119272313efbSmrg	      break
119372313efbSmrg	    fi
119472313efbSmrg	    prev="$cmd"
119572313efbSmrg	  done
1196bdcaa8d0Smrg
119772313efbSmrg	  if test "$prev" != 'sed 50q "[$]0"'; then
119872313efbSmrg	    echo_test_string=`eval $prev`
119972313efbSmrg	    export echo_test_string
120072313efbSmrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
120172313efbSmrg	  else
120272313efbSmrg	    # Oops.  We lost completely, so just stick with echo.
120372313efbSmrg	    ECHO=echo
120472313efbSmrg	  fi
120572313efbSmrg        fi
120672313efbSmrg      fi
120772313efbSmrg    fi
1208bdcaa8d0Smrg  fi
1209bdcaa8d0Smrgfi
1210bdcaa8d0Smrg
121172313efbSmrg# Copy echo and quote the copy suitably for passing to libtool from
121272313efbSmrg# the Makefile, instead of quoting the original, which is used later.
121372313efbSmrglt_ECHO=$ECHO
121472313efbSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
121572313efbSmrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
121672313efbSmrgfi
1217bdcaa8d0Smrg
121872313efbSmrgAC_SUBST(lt_ECHO)
121972313efbSmrg])
122072313efbSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
122172313efbSmrg_LT_DECL([], [ECHO], [1],
122272313efbSmrg    [An echo program that does not interpret backslashes])
122372313efbSmrg])# _LT_PROG_ECHO_BACKSLASH
1224bdcaa8d0Smrg
1225bdcaa8d0Smrg
122672313efbSmrg# _LT_ENABLE_LOCK
122772313efbSmrg# ---------------
122872313efbSmrgm4_defun([_LT_ENABLE_LOCK],
122972313efbSmrg[AC_ARG_ENABLE([libtool-lock],
123072313efbSmrg  [AS_HELP_STRING([--disable-libtool-lock],
123172313efbSmrg    [avoid locking (might break parallel builds)])])
123272313efbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
123372313efbSmrg
123472313efbSmrg# Some flags need to be propagated to the compiler or linker for good
123572313efbSmrg# libtool support.
123672313efbSmrgcase $host in
123772313efbSmrgia64-*-hpux*)
123872313efbSmrg  # Find out which ABI we are using.
123972313efbSmrg  echo 'int i;' > conftest.$ac_ext
124072313efbSmrg  if AC_TRY_EVAL(ac_compile); then
124172313efbSmrg    case `/usr/bin/file conftest.$ac_objext` in
124272313efbSmrg      *ELF-32*)
124372313efbSmrg	HPUX_IA64_MODE="32"
124472313efbSmrg	;;
124572313efbSmrg      *ELF-64*)
124672313efbSmrg	HPUX_IA64_MODE="64"
124772313efbSmrg	;;
1248bdcaa8d0Smrg    esac
124972313efbSmrg  fi
125072313efbSmrg  rm -rf conftest*
125172313efbSmrg  ;;
125272313efbSmrg*-*-irix6*)
125372313efbSmrg  # Find out which ABI we are using.
125472313efbSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
125572313efbSmrg  if AC_TRY_EVAL(ac_compile); then
125672313efbSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
125772313efbSmrg      case `/usr/bin/file conftest.$ac_objext` in
125872313efbSmrg	*32-bit*)
125972313efbSmrg	  LD="${LD-ld} -melf32bsmip"
126072313efbSmrg	  ;;
126172313efbSmrg	*N32*)
126272313efbSmrg	  LD="${LD-ld} -melf32bmipn32"
126372313efbSmrg	  ;;
126472313efbSmrg	*64-bit*)
126572313efbSmrg	  LD="${LD-ld} -melf64bmip"
126672313efbSmrg	;;
126772313efbSmrg      esac
1268bdcaa8d0Smrg    else
126972313efbSmrg      case `/usr/bin/file conftest.$ac_objext` in
127072313efbSmrg	*32-bit*)
127172313efbSmrg	  LD="${LD-ld} -32"
127272313efbSmrg	  ;;
127372313efbSmrg	*N32*)
127472313efbSmrg	  LD="${LD-ld} -n32"
127572313efbSmrg	  ;;
127672313efbSmrg	*64-bit*)
127772313efbSmrg	  LD="${LD-ld} -64"
127872313efbSmrg	  ;;
127972313efbSmrg      esac
1280bdcaa8d0Smrg    fi
1281bdcaa8d0Smrg  fi
128272313efbSmrg  rm -rf conftest*
1283bdcaa8d0Smrg  ;;
1284bdcaa8d0Smrg
128572313efbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
128672313efbSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
128772313efbSmrg  # Find out which ABI we are using.
128872313efbSmrg  echo 'int i;' > conftest.$ac_ext
128972313efbSmrg  if AC_TRY_EVAL(ac_compile); then
129072313efbSmrg    case `/usr/bin/file conftest.o` in
129172313efbSmrg      *32-bit*)
129272313efbSmrg	case $host in
129372313efbSmrg	  x86_64-*kfreebsd*-gnu)
129472313efbSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
129572313efbSmrg	    ;;
129672313efbSmrg	  x86_64-*linux*)
129772313efbSmrg	    LD="${LD-ld} -m elf_i386"
129872313efbSmrg	    ;;
129972313efbSmrg	  ppc64-*linux*|powerpc64-*linux*)
130072313efbSmrg	    LD="${LD-ld} -m elf32ppclinux"
130172313efbSmrg	    ;;
130272313efbSmrg	  s390x-*linux*)
130372313efbSmrg	    LD="${LD-ld} -m elf_s390"
130472313efbSmrg	    ;;
130572313efbSmrg	  sparc64-*linux*)
130672313efbSmrg	    LD="${LD-ld} -m elf32_sparc"
130772313efbSmrg	    ;;
130872313efbSmrg	esac
130972313efbSmrg	;;
131072313efbSmrg      *64-bit*)
131172313efbSmrg	case $host in
131272313efbSmrg	  x86_64-*kfreebsd*-gnu)
131372313efbSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
131472313efbSmrg	    ;;
131572313efbSmrg	  x86_64-*linux*)
131672313efbSmrg	    LD="${LD-ld} -m elf_x86_64"
131772313efbSmrg	    ;;
131872313efbSmrg	  ppc*-*linux*|powerpc*-*linux*)
131972313efbSmrg	    LD="${LD-ld} -m elf64ppc"
132072313efbSmrg	    ;;
132172313efbSmrg	  s390*-*linux*|s390*-*tpf*)
132272313efbSmrg	    LD="${LD-ld} -m elf64_s390"
132372313efbSmrg	    ;;
132472313efbSmrg	  sparc*-*linux*)
132572313efbSmrg	    LD="${LD-ld} -m elf64_sparc"
132672313efbSmrg	    ;;
132772313efbSmrg	esac
132872313efbSmrg	;;
132972313efbSmrg    esac
133072313efbSmrg  fi
133172313efbSmrg  rm -rf conftest*
1332bdcaa8d0Smrg  ;;
1333bdcaa8d0Smrg
133472313efbSmrg*-*-sco3.2v5*)
133572313efbSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
133672313efbSmrg  SAVE_CFLAGS="$CFLAGS"
133772313efbSmrg  CFLAGS="$CFLAGS -belf"
133872313efbSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
133972313efbSmrg    [AC_LANG_PUSH(C)
134072313efbSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
134172313efbSmrg     AC_LANG_POP])
134272313efbSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
134372313efbSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
134472313efbSmrg    CFLAGS="$SAVE_CFLAGS"
134572313efbSmrg  fi
1346bdcaa8d0Smrg  ;;
134772313efbSmrgsparc*-*solaris*)
134872313efbSmrg  # Find out which ABI we are using.
134972313efbSmrg  echo 'int i;' > conftest.$ac_ext
135072313efbSmrg  if AC_TRY_EVAL(ac_compile); then
135172313efbSmrg    case `/usr/bin/file conftest.o` in
135272313efbSmrg    *64-bit*)
135372313efbSmrg      case $lt_cv_prog_gnu_ld in
135472313efbSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
135572313efbSmrg      *)
135672313efbSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
135772313efbSmrg	  LD="${LD-ld} -64"
135872313efbSmrg	fi
135972313efbSmrg	;;
136072313efbSmrg      esac
136172313efbSmrg      ;;
136272313efbSmrg    esac
136372313efbSmrg  fi
136472313efbSmrg  rm -rf conftest*
1365bdcaa8d0Smrg  ;;
136672313efbSmrgesac
1367bdcaa8d0Smrg
136872313efbSmrgneed_locks="$enable_libtool_lock"
136972313efbSmrg])# _LT_ENABLE_LOCK
1370bdcaa8d0Smrg
1371bdcaa8d0Smrg
137272313efbSmrg# _LT_CMD_OLD_ARCHIVE
137372313efbSmrg# -------------------
137472313efbSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
137572313efbSmrg[AC_CHECK_TOOL(AR, ar, false)
137672313efbSmrgtest -z "$AR" && AR=ar
137772313efbSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
137872313efbSmrg_LT_DECL([], [AR], [1], [The archiver])
137972313efbSmrg_LT_DECL([], [AR_FLAGS], [1])
138072313efbSmrg
138172313efbSmrgAC_CHECK_TOOL(STRIP, strip, :)
138272313efbSmrgtest -z "$STRIP" && STRIP=:
138372313efbSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
138472313efbSmrg
138572313efbSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
138672313efbSmrgtest -z "$RANLIB" && RANLIB=:
138772313efbSmrg_LT_DECL([], [RANLIB], [1],
138872313efbSmrg    [Commands used to install an old-style archive])
138972313efbSmrg
139072313efbSmrg# Determine commands to create old-style static archives.
139172313efbSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
139272313efbSmrgold_postinstall_cmds='chmod 644 $oldlib'
139372313efbSmrgold_postuninstall_cmds=
1394bdcaa8d0Smrg
139572313efbSmrgif test -n "$RANLIB"; then
139672313efbSmrg  case $host_os in
139772313efbSmrg  openbsd*)
139872313efbSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
139972313efbSmrg    ;;
1400bdcaa8d0Smrg  *)
140172313efbSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402bdcaa8d0Smrg    ;;
1403bdcaa8d0Smrg  esac
140472313efbSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
140572313efbSmrgfi
140672313efbSmrg_LT_DECL([], [old_postinstall_cmds], [2])
140772313efbSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
140872313efbSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
140972313efbSmrg    [Commands used to build an old-style archive])
141072313efbSmrg])# _LT_CMD_OLD_ARCHIVE
1411bdcaa8d0Smrg
1412bdcaa8d0Smrg
141372313efbSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
141472313efbSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
141572313efbSmrg# ----------------------------------------------------------------
141672313efbSmrg# Check whether the given compiler option works
141772313efbSmrgAC_DEFUN([_LT_COMPILER_OPTION],
141872313efbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
141972313efbSmrgm4_require([_LT_DECL_SED])dnl
142072313efbSmrgAC_CACHE_CHECK([$1], [$2],
142172313efbSmrg  [$2=no
142272313efbSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
142372313efbSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
142472313efbSmrg   lt_compiler_flag="$3"
142572313efbSmrg   # Insert the option either (1) after the last *FLAGS variable, or
142672313efbSmrg   # (2) before a word containing "conftest.", or (3) at the end.
142772313efbSmrg   # Note that $ac_compile itself does not contain backslashes and begins
142872313efbSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
142972313efbSmrg   # The option is referenced via a variable to avoid confusing sed.
143072313efbSmrg   lt_compile=`echo "$ac_compile" | $SED \
143172313efbSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
143272313efbSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
143372313efbSmrg   -e 's:$: $lt_compiler_flag:'`
143472313efbSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
143572313efbSmrg   (eval "$lt_compile" 2>conftest.err)
143672313efbSmrg   ac_status=$?
143772313efbSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
143872313efbSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
143972313efbSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
144072313efbSmrg     # The compiler can only warn and ignore the option if not recognized
144172313efbSmrg     # So say no if there are warnings other than the usual output.
144272313efbSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
144372313efbSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
144472313efbSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
144572313efbSmrg       $2=yes
144672313efbSmrg     fi
144772313efbSmrg   fi
144872313efbSmrg   $RM conftest*
144972313efbSmrg])
1450bdcaa8d0Smrg
145172313efbSmrgif test x"[$]$2" = xyes; then
145272313efbSmrg    m4_if([$5], , :, [$5])
145372313efbSmrgelse
145472313efbSmrg    m4_if([$6], , :, [$6])
145572313efbSmrgfi
145672313efbSmrg])# _LT_COMPILER_OPTION
1457bdcaa8d0Smrg
145872313efbSmrg# Old name:
145972313efbSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
146072313efbSmrgdnl aclocal-1.4 backwards compatibility:
146172313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
146272313efbSmrg
146372313efbSmrg
146472313efbSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
146572313efbSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
146672313efbSmrg# ----------------------------------------------------
146772313efbSmrg# Check whether the given linker option works
146872313efbSmrgAC_DEFUN([_LT_LINKER_OPTION],
146972313efbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
147072313efbSmrgm4_require([_LT_DECL_SED])dnl
147172313efbSmrgAC_CACHE_CHECK([$1], [$2],
147272313efbSmrg  [$2=no
147372313efbSmrg   save_LDFLAGS="$LDFLAGS"
147472313efbSmrg   LDFLAGS="$LDFLAGS $3"
147572313efbSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
147672313efbSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
147772313efbSmrg     # The linker can only warn and ignore the option if not recognized
147872313efbSmrg     # So say no if there are warnings
147972313efbSmrg     if test -s conftest.err; then
148072313efbSmrg       # Append any errors to the config.log.
148172313efbSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
148272313efbSmrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
148372313efbSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
148472313efbSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
148572313efbSmrg         $2=yes
148672313efbSmrg       fi
148772313efbSmrg     else
148872313efbSmrg       $2=yes
148972313efbSmrg     fi
149072313efbSmrg   fi
149172313efbSmrg   $RM -r conftest*
149272313efbSmrg   LDFLAGS="$save_LDFLAGS"
149372313efbSmrg])
149472313efbSmrg
149572313efbSmrgif test x"[$]$2" = xyes; then
149672313efbSmrg    m4_if([$4], , :, [$4])
149772313efbSmrgelse
149872313efbSmrg    m4_if([$5], , :, [$5])
149972313efbSmrgfi
150072313efbSmrg])# _LT_LINKER_OPTION
150172313efbSmrg
150272313efbSmrg# Old name:
150372313efbSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
150472313efbSmrgdnl aclocal-1.4 backwards compatibility:
150572313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
150672313efbSmrg
150772313efbSmrg
150872313efbSmrg# LT_CMD_MAX_LEN
150972313efbSmrg#---------------
151072313efbSmrgAC_DEFUN([LT_CMD_MAX_LEN],
151172313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
151272313efbSmrg# find the maximum length of command line arguments
151372313efbSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
151472313efbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
151572313efbSmrg  i=0
151672313efbSmrg  teststring="ABCD"
151772313efbSmrg
151872313efbSmrg  case $build_os in
151972313efbSmrg  msdosdjgpp*)
152072313efbSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
152172313efbSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
152272313efbSmrg    # during glob expansion).  Even if it were fixed, the result of this
152372313efbSmrg    # check would be larger than it should be.
152472313efbSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525bdcaa8d0Smrg    ;;
152672313efbSmrg
152772313efbSmrg  gnu*)
152872313efbSmrg    # Under GNU Hurd, this test is not required because there is
152972313efbSmrg    # no limit to the length of command line arguments.
153072313efbSmrg    # Libtool will interpret -1 as no limit whatsoever
153172313efbSmrg    lt_cv_sys_max_cmd_len=-1;
1532bdcaa8d0Smrg    ;;
153372313efbSmrg
153472313efbSmrg  cygwin* | mingw* | cegcc*)
153572313efbSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
153672313efbSmrg    # about 5 minutes as the teststring grows exponentially.
153772313efbSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
153872313efbSmrg    # you end up with a "frozen" computer, even though with patience
153972313efbSmrg    # the test eventually succeeds (with a max line length of 256k).
154072313efbSmrg    # Instead, let's just punt: use the minimum linelength reported by
154172313efbSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
154272313efbSmrg    lt_cv_sys_max_cmd_len=8192;
1543bdcaa8d0Smrg    ;;
1544bdcaa8d0Smrg
154572313efbSmrg  amigaos*)
154672313efbSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
154772313efbSmrg    # So we just punt and use a minimum line length of 8192.
154872313efbSmrg    lt_cv_sys_max_cmd_len=8192;
154972313efbSmrg    ;;
1550bdcaa8d0Smrg
155172313efbSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
155272313efbSmrg    # This has been around since 386BSD, at least.  Likely further.
155372313efbSmrg    if test -x /sbin/sysctl; then
155472313efbSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
155572313efbSmrg    elif test -x /usr/sbin/sysctl; then
155672313efbSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557bdcaa8d0Smrg    else
155872313efbSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559bdcaa8d0Smrg    fi
156072313efbSmrg    # And add a safety zone
156172313efbSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
156272313efbSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563bdcaa8d0Smrg    ;;
1564bdcaa8d0Smrg
156572313efbSmrg  interix*)
156672313efbSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
156772313efbSmrg    lt_cv_sys_max_cmd_len=196608
156872313efbSmrg    ;;
1569bdcaa8d0Smrg
157072313efbSmrg  osf*)
157172313efbSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
157272313efbSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
157372313efbSmrg    # nice to cause kernel panics so lets avoid the loop below.
157472313efbSmrg    # First set a reasonable default.
157572313efbSmrg    lt_cv_sys_max_cmd_len=16384
157672313efbSmrg    #
157772313efbSmrg    if test -x /sbin/sysconfig; then
157872313efbSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
157972313efbSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
158072313efbSmrg      esac
158172313efbSmrg    fi
158272313efbSmrg    ;;
158372313efbSmrg  sco3.2v5*)
158472313efbSmrg    lt_cv_sys_max_cmd_len=102400
158572313efbSmrg    ;;
158672313efbSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
158772313efbSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
158872313efbSmrg    if test -n "$kargmax"; then
158972313efbSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
159072313efbSmrg    else
159172313efbSmrg      lt_cv_sys_max_cmd_len=32768
159272313efbSmrg    fi
1593bdcaa8d0Smrg    ;;
1594bdcaa8d0Smrg  *)
159572313efbSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
159672313efbSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
159772313efbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
159872313efbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
159972313efbSmrg    else
160072313efbSmrg      # Make teststring a little bigger before we do anything with it.
160172313efbSmrg      # a 1K string should be a reasonable start.
160272313efbSmrg      for i in 1 2 3 4 5 6 7 8 ; do
160372313efbSmrg        teststring=$teststring$teststring
160472313efbSmrg      done
160572313efbSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
160672313efbSmrg      # If test is not a shell built-in, we'll probably end up computing a
160772313efbSmrg      # maximum length that is only half of the actual maximum length, but
160872313efbSmrg      # we can't tell.
160972313efbSmrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
161072313efbSmrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
161172313efbSmrg	      test $i != 17 # 1/2 MB should be enough
161272313efbSmrg      do
161372313efbSmrg        i=`expr $i + 1`
161472313efbSmrg        teststring=$teststring$teststring
161572313efbSmrg      done
161672313efbSmrg      # Only check the string length outside the loop.
161772313efbSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
161872313efbSmrg      teststring=
161972313efbSmrg      # Add a significant safety factor because C++ compilers can tack on
162072313efbSmrg      # massive amounts of additional arguments before passing them to the
162172313efbSmrg      # linker.  It appears as though 1/2 is a usable value.
162272313efbSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
162372313efbSmrg    fi
1624bdcaa8d0Smrg    ;;
1625bdcaa8d0Smrg  esac
162672313efbSmrg])
162772313efbSmrgif test -n $lt_cv_sys_max_cmd_len ; then
162872313efbSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
162972313efbSmrgelse
163072313efbSmrg  AC_MSG_RESULT(none)
163172313efbSmrgfi
163272313efbSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
163372313efbSmrg_LT_DECL([], [max_cmd_len], [0],
163472313efbSmrg    [What is the maximum length of a command?])
163572313efbSmrg])# LT_CMD_MAX_LEN
1636bdcaa8d0Smrg
163772313efbSmrg# Old name:
163872313efbSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
163972313efbSmrgdnl aclocal-1.4 backwards compatibility:
164072313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641bdcaa8d0Smrg
1642bdcaa8d0Smrg
164372313efbSmrg# _LT_HEADER_DLFCN
164472313efbSmrg# ----------------
164572313efbSmrgm4_defun([_LT_HEADER_DLFCN],
164672313efbSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
164772313efbSmrg])# _LT_HEADER_DLFCN
1648bdcaa8d0Smrg
1649bdcaa8d0Smrg
165072313efbSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
165172313efbSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
165272313efbSmrg# ----------------------------------------------------------------
165372313efbSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
165472313efbSmrg[m4_require([_LT_HEADER_DLFCN])dnl
165572313efbSmrgif test "$cross_compiling" = yes; then :
165672313efbSmrg  [$4]
165772313efbSmrgelse
165872313efbSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
165972313efbSmrg  lt_status=$lt_dlunknown
166072313efbSmrg  cat > conftest.$ac_ext <<_LT_EOF
166172313efbSmrg[#line __oline__ "configure"
166272313efbSmrg#include "confdefs.h"
1663bdcaa8d0Smrg
166472313efbSmrg#if HAVE_DLFCN_H
166572313efbSmrg#include <dlfcn.h>
166672313efbSmrg#endif
1667bdcaa8d0Smrg
166872313efbSmrg#include <stdio.h>
1669bdcaa8d0Smrg
167072313efbSmrg#ifdef RTLD_GLOBAL
167172313efbSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
167272313efbSmrg#else
167372313efbSmrg#  ifdef DL_GLOBAL
167472313efbSmrg#    define LT_DLGLOBAL		DL_GLOBAL
167572313efbSmrg#  else
167672313efbSmrg#    define LT_DLGLOBAL		0
167772313efbSmrg#  endif
167872313efbSmrg#endif
1679bdcaa8d0Smrg
168072313efbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
168172313efbSmrg   find out it does not work in some platform. */
168272313efbSmrg#ifndef LT_DLLAZY_OR_NOW
168372313efbSmrg#  ifdef RTLD_LAZY
168472313efbSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
168572313efbSmrg#  else
168672313efbSmrg#    ifdef DL_LAZY
168772313efbSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
168872313efbSmrg#    else
168972313efbSmrg#      ifdef RTLD_NOW
169072313efbSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
169172313efbSmrg#      else
169272313efbSmrg#        ifdef DL_NOW
169372313efbSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
169472313efbSmrg#        else
169572313efbSmrg#          define LT_DLLAZY_OR_NOW	0
169672313efbSmrg#        endif
169772313efbSmrg#      endif
169872313efbSmrg#    endif
169972313efbSmrg#  endif
170072313efbSmrg#endif
170172313efbSmrg
170272313efbSmrgvoid fnord() { int i=42;}
170372313efbSmrgint main ()
170472313efbSmrg{
170572313efbSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
170672313efbSmrg  int status = $lt_dlunknown;
170772313efbSmrg
170872313efbSmrg  if (self)
170972313efbSmrg    {
171072313efbSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
171172313efbSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
171272313efbSmrg      /* dlclose (self); */
171372313efbSmrg    }
1714bdcaa8d0Smrg  else
171572313efbSmrg    puts (dlerror ());
171672313efbSmrg
171772313efbSmrg  return status;
171872313efbSmrg}]
171972313efbSmrg_LT_EOF
172072313efbSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
172172313efbSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
172272313efbSmrg    lt_status=$?
172372313efbSmrg    case x$lt_status in
172472313efbSmrg      x$lt_dlno_uscore) $1 ;;
172572313efbSmrg      x$lt_dlneed_uscore) $2 ;;
172672313efbSmrg      x$lt_dlunknown|x*) $3 ;;
172772313efbSmrg    esac
172872313efbSmrg  else :
172972313efbSmrg    # compilation failed
173072313efbSmrg    $3
1731bdcaa8d0Smrg  fi
173272313efbSmrgfi
173372313efbSmrgrm -fr conftest*
173472313efbSmrg])# _LT_TRY_DLOPEN_SELF
1735bdcaa8d0Smrg
1736bdcaa8d0Smrg
173772313efbSmrg# LT_SYS_DLOPEN_SELF
173872313efbSmrg# ------------------
173972313efbSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
174072313efbSmrg[m4_require([_LT_HEADER_DLFCN])dnl
174172313efbSmrgif test "x$enable_dlopen" != xyes; then
174272313efbSmrg  enable_dlopen=unknown
174372313efbSmrg  enable_dlopen_self=unknown
174472313efbSmrg  enable_dlopen_self_static=unknown
174572313efbSmrgelse
174672313efbSmrg  lt_cv_dlopen=no
174772313efbSmrg  lt_cv_dlopen_libs=
1748bdcaa8d0Smrg
174972313efbSmrg  case $host_os in
175072313efbSmrg  beos*)
175172313efbSmrg    lt_cv_dlopen="load_add_on"
175272313efbSmrg    lt_cv_dlopen_libs=
175372313efbSmrg    lt_cv_dlopen_self=yes
175472313efbSmrg    ;;
1755bdcaa8d0Smrg
175672313efbSmrg  mingw* | pw32* | cegcc*)
175772313efbSmrg    lt_cv_dlopen="LoadLibrary"
175872313efbSmrg    lt_cv_dlopen_libs=
175972313efbSmrg    ;;
1760bdcaa8d0Smrg
176172313efbSmrg  cygwin*)
176272313efbSmrg    lt_cv_dlopen="dlopen"
176372313efbSmrg    lt_cv_dlopen_libs=
176472313efbSmrg    ;;
1765bdcaa8d0Smrg
176672313efbSmrg  darwin*)
176772313efbSmrg  # if libdl is installed we need to link against it
176872313efbSmrg    AC_CHECK_LIB([dl], [dlopen],
176972313efbSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
177072313efbSmrg    lt_cv_dlopen="dyld"
177172313efbSmrg    lt_cv_dlopen_libs=
177272313efbSmrg    lt_cv_dlopen_self=yes
177372313efbSmrg    ])
177472313efbSmrg    ;;
1775bdcaa8d0Smrg
177672313efbSmrg  *)
177772313efbSmrg    AC_CHECK_FUNC([shl_load],
177872313efbSmrg	  [lt_cv_dlopen="shl_load"],
177972313efbSmrg      [AC_CHECK_LIB([dld], [shl_load],
178072313efbSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
178172313efbSmrg	[AC_CHECK_FUNC([dlopen],
178272313efbSmrg	      [lt_cv_dlopen="dlopen"],
178372313efbSmrg	  [AC_CHECK_LIB([dl], [dlopen],
178472313efbSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
178572313efbSmrg	    [AC_CHECK_LIB([svld], [dlopen],
178672313efbSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
178772313efbSmrg	      [AC_CHECK_LIB([dld], [dld_link],
178872313efbSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
178972313efbSmrg	      ])
179072313efbSmrg	    ])
179172313efbSmrg	  ])
179272313efbSmrg	])
179372313efbSmrg      ])
179472313efbSmrg    ;;
179572313efbSmrg  esac
179672313efbSmrg
179772313efbSmrg  if test "x$lt_cv_dlopen" != xno; then
179872313efbSmrg    enable_dlopen=yes
1799bdcaa8d0Smrg  else
180072313efbSmrg    enable_dlopen=no
1801bdcaa8d0Smrg  fi
1802bdcaa8d0Smrg
180372313efbSmrg  case $lt_cv_dlopen in
180472313efbSmrg  dlopen)
180572313efbSmrg    save_CPPFLAGS="$CPPFLAGS"
180672313efbSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807bdcaa8d0Smrg
180872313efbSmrg    save_LDFLAGS="$LDFLAGS"
180972313efbSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810bdcaa8d0Smrg
181172313efbSmrg    save_LIBS="$LIBS"
181272313efbSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813bdcaa8d0Smrg
181472313efbSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
181572313efbSmrg	  lt_cv_dlopen_self, [dnl
181672313efbSmrg	  _LT_TRY_DLOPEN_SELF(
181772313efbSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
181872313efbSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
181972313efbSmrg    ])
1820bdcaa8d0Smrg
182172313efbSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
182272313efbSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
182372313efbSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
182472313efbSmrg	  lt_cv_dlopen_self_static, [dnl
182572313efbSmrg	  _LT_TRY_DLOPEN_SELF(
182672313efbSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
182772313efbSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
182872313efbSmrg      ])
1829bdcaa8d0Smrg    fi
1830bdcaa8d0Smrg
183172313efbSmrg    CPPFLAGS="$save_CPPFLAGS"
183272313efbSmrg    LDFLAGS="$save_LDFLAGS"
183372313efbSmrg    LIBS="$save_LIBS"
183472313efbSmrg    ;;
183572313efbSmrg  esac
1836bdcaa8d0Smrg
183772313efbSmrg  case $lt_cv_dlopen_self in
183872313efbSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
183972313efbSmrg  *) enable_dlopen_self=unknown ;;
184072313efbSmrg  esac
1841bdcaa8d0Smrg
184272313efbSmrg  case $lt_cv_dlopen_self_static in
184372313efbSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
184472313efbSmrg  *) enable_dlopen_self_static=unknown ;;
184572313efbSmrg  esac
1846bdcaa8d0Smrgfi
184772313efbSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
184872313efbSmrg	 [Whether dlopen is supported])
184972313efbSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
185072313efbSmrg	 [Whether dlopen of programs is supported])
185172313efbSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
185272313efbSmrg	 [Whether dlopen of statically linked programs is supported])
185372313efbSmrg])# LT_SYS_DLOPEN_SELF
1854bdcaa8d0Smrg
185572313efbSmrg# Old name:
185672313efbSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
185772313efbSmrgdnl aclocal-1.4 backwards compatibility:
185872313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859bdcaa8d0Smrg
1860bdcaa8d0Smrg
186172313efbSmrg# _LT_COMPILER_C_O([TAGNAME])
186272313efbSmrg# ---------------------------
186372313efbSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
186472313efbSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
186572313efbSmrgm4_defun([_LT_COMPILER_C_O],
186672313efbSmrg[m4_require([_LT_DECL_SED])dnl
186772313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
186872313efbSmrgm4_require([_LT_TAG_COMPILER])dnl
186972313efbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
187072313efbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
187172313efbSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
187272313efbSmrg   $RM -r conftest 2>/dev/null
187372313efbSmrg   mkdir conftest
187472313efbSmrg   cd conftest
187572313efbSmrg   mkdir out
187672313efbSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877bdcaa8d0Smrg
187872313efbSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
187972313efbSmrg   # Insert the option either (1) after the last *FLAGS variable, or
188072313efbSmrg   # (2) before a word containing "conftest.", or (3) at the end.
188172313efbSmrg   # Note that $ac_compile itself does not contain backslashes and begins
188272313efbSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
188372313efbSmrg   lt_compile=`echo "$ac_compile" | $SED \
188472313efbSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
188572313efbSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
188672313efbSmrg   -e 's:$: $lt_compiler_flag:'`
188772313efbSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
188872313efbSmrg   (eval "$lt_compile" 2>out/conftest.err)
188972313efbSmrg   ac_status=$?
189072313efbSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
189172313efbSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
189272313efbSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
189372313efbSmrg   then
189472313efbSmrg     # The compiler can only warn and ignore the option if not recognized
189572313efbSmrg     # So say no if there are warnings
189672313efbSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
189772313efbSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
189872313efbSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
189972313efbSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
190072313efbSmrg     fi
190172313efbSmrg   fi
190272313efbSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
190372313efbSmrg   $RM conftest*
190472313efbSmrg   # SGI C++ compiler will create directory out/ii_files/ for
190572313efbSmrg   # template instantiation
190672313efbSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
190772313efbSmrg   $RM out/* && rmdir out
190872313efbSmrg   cd ..
190972313efbSmrg   $RM -r conftest
191072313efbSmrg   $RM conftest*
191172313efbSmrg])
191272313efbSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
191372313efbSmrg	[Does compiler simultaneously support -c and -o options?])
191472313efbSmrg])# _LT_COMPILER_C_O
1915bdcaa8d0Smrg
1916bdcaa8d0Smrg
191772313efbSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
191872313efbSmrg# ----------------------------------
191972313efbSmrg# Check to see if we can do hard links to lock some files if needed
192072313efbSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
192172313efbSmrg[m4_require([_LT_ENABLE_LOCK])dnl
192272313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
192372313efbSmrg_LT_COMPILER_C_O([$1])
1924bdcaa8d0Smrg
192572313efbSmrghard_links="nottested"
192672313efbSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
192772313efbSmrg  # do not overwrite the value of need_locks provided by the user
192872313efbSmrg  AC_MSG_CHECKING([if we can lock with hard links])
192972313efbSmrg  hard_links=yes
193072313efbSmrg  $RM conftest*
193172313efbSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193272313efbSmrg  touch conftest.a
193372313efbSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
193472313efbSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193572313efbSmrg  AC_MSG_RESULT([$hard_links])
193672313efbSmrg  if test "$hard_links" = no; then
193772313efbSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
193872313efbSmrg    need_locks=warn
193972313efbSmrg  fi
194072313efbSmrgelse
194172313efbSmrg  need_locks=no
194272313efbSmrgfi
194372313efbSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
194472313efbSmrg])# _LT_COMPILER_FILE_LOCKS
1945bdcaa8d0Smrg
1946bdcaa8d0Smrg
194772313efbSmrg# _LT_CHECK_OBJDIR
194872313efbSmrg# ----------------
194972313efbSmrgm4_defun([_LT_CHECK_OBJDIR],
195072313efbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
195172313efbSmrg[rm -f .libs 2>/dev/null
195272313efbSmrgmkdir .libs 2>/dev/null
195372313efbSmrgif test -d .libs; then
195472313efbSmrg  lt_cv_objdir=.libs
195572313efbSmrgelse
195672313efbSmrg  # MS-DOS does not allow filenames that begin with a dot.
195772313efbSmrg  lt_cv_objdir=_libs
195872313efbSmrgfi
195972313efbSmrgrmdir .libs 2>/dev/null])
196072313efbSmrgobjdir=$lt_cv_objdir
196172313efbSmrg_LT_DECL([], [objdir], [0],
196272313efbSmrg         [The name of the directory that contains temporary libtool files])dnl
196372313efbSmrgm4_pattern_allow([LT_OBJDIR])dnl
196472313efbSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
196572313efbSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
196672313efbSmrg])# _LT_CHECK_OBJDIR
1967bdcaa8d0Smrg
1968bdcaa8d0Smrg
196972313efbSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
197072313efbSmrg# --------------------------------------
197172313efbSmrg# Check hardcoding attributes.
197272313efbSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
197372313efbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
197472313efbSmrg_LT_TAGVAR(hardcode_action, $1)=
197572313efbSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
197672313efbSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
197772313efbSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978bdcaa8d0Smrg
197972313efbSmrg  # We can hardcode non-existent directories.
198072313efbSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
198172313efbSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
198272313efbSmrg     # have to relink, otherwise we might link with an installed library
198372313efbSmrg     # when we should be linking with a yet-to-be-installed one
198472313efbSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
198572313efbSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
198672313efbSmrg    # Linking always hardcodes the temporary library directory.
198772313efbSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
198872313efbSmrg  else
198972313efbSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
199072313efbSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
199172313efbSmrg  fi
199272313efbSmrgelse
199372313efbSmrg  # We cannot hardcode anything, or else we can only hardcode existing
199472313efbSmrg  # directories.
199572313efbSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
199672313efbSmrgfi
199772313efbSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998bdcaa8d0Smrg
199972313efbSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
200072313efbSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
200172313efbSmrg  # Fast installation is not supported
200272313efbSmrg  enable_fast_install=no
200372313efbSmrgelif test "$shlibpath_overrides_runpath" = yes ||
200472313efbSmrg     test "$enable_shared" = no; then
200572313efbSmrg  # Fast installation is not necessary
200672313efbSmrg  enable_fast_install=needless
200772313efbSmrgfi
200872313efbSmrg_LT_TAGDECL([], [hardcode_action], [0],
200972313efbSmrg    [How to hardcode a shared library path into an executable])
201072313efbSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2011bdcaa8d0Smrg
2012bdcaa8d0Smrg
201372313efbSmrg# _LT_CMD_STRIPLIB
201472313efbSmrg# ----------------
201572313efbSmrgm4_defun([_LT_CMD_STRIPLIB],
201672313efbSmrg[m4_require([_LT_DECL_EGREP])
201772313efbSmrgstriplib=
201872313efbSmrgold_striplib=
201972313efbSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
202072313efbSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
202172313efbSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
202272313efbSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
202372313efbSmrg  AC_MSG_RESULT([yes])
202472313efbSmrgelse
202572313efbSmrg# FIXME - insert some real tests, host_os isn't really good enough
202672313efbSmrg  case $host_os in
202772313efbSmrg  darwin*)
202872313efbSmrg    if test -n "$STRIP" ; then
202972313efbSmrg      striplib="$STRIP -x"
203072313efbSmrg      old_striplib="$STRIP -S"
203172313efbSmrg      AC_MSG_RESULT([yes])
203272313efbSmrg    else
203372313efbSmrg      AC_MSG_RESULT([no])
203472313efbSmrg    fi
203572313efbSmrg    ;;
203672313efbSmrg  *)
203772313efbSmrg    AC_MSG_RESULT([no])
203872313efbSmrg    ;;
203972313efbSmrg  esac
204072313efbSmrgfi
204172313efbSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
204272313efbSmrg_LT_DECL([], [striplib], [1])
204372313efbSmrg])# _LT_CMD_STRIPLIB
2044bdcaa8d0Smrg
2045bdcaa8d0Smrg
204672313efbSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
204772313efbSmrg# -----------------------------
204872313efbSmrg# PORTME Fill in your ld.so characteristics
204972313efbSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
205072313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
205172313efbSmrgm4_require([_LT_DECL_EGREP])dnl
205272313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
205372313efbSmrgm4_require([_LT_DECL_OBJDUMP])dnl
205472313efbSmrgm4_require([_LT_DECL_SED])dnl
205572313efbSmrgAC_MSG_CHECKING([dynamic linker characteristics])
205672313efbSmrgm4_if([$1],
205772313efbSmrg	[], [
205872313efbSmrgif test "$GCC" = yes; then
205972313efbSmrg  case $host_os in
206072313efbSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
206172313efbSmrg    *) lt_awk_arg="/^libraries:/" ;;
206272313efbSmrg  esac
206372313efbSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
206472313efbSmrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
206572313efbSmrg    # if the path contains ";" then we assume it to be the separator
206672313efbSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
206772313efbSmrg    # assumed that no part of a normal pathname contains ";" but that should
206872313efbSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
206972313efbSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
207072313efbSmrg  else
207172313efbSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
207272313efbSmrg  fi
207372313efbSmrg  # Ok, now we have the path, separated by spaces, we can step through it
207472313efbSmrg  # and add multilib dir if necessary.
207572313efbSmrg  lt_tmp_lt_search_path_spec=
207672313efbSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
207772313efbSmrg  for lt_sys_path in $lt_search_path_spec; do
207872313efbSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
207972313efbSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
208072313efbSmrg    else
208172313efbSmrg      test -d "$lt_sys_path" && \
208272313efbSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083bdcaa8d0Smrg    fi
2084bdcaa8d0Smrg  done
208572313efbSmrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
208672313efbSmrgBEGIN {RS=" "; FS="/|\n";} {
208772313efbSmrg  lt_foo="";
208872313efbSmrg  lt_count=0;
208972313efbSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
209072313efbSmrg    if ($lt_i != "" && $lt_i != ".") {
209172313efbSmrg      if ($lt_i == "..") {
209272313efbSmrg        lt_count++;
209372313efbSmrg      } else {
209472313efbSmrg        if (lt_count == 0) {
209572313efbSmrg          lt_foo="/" $lt_i lt_foo;
209672313efbSmrg        } else {
209772313efbSmrg          lt_count--;
209872313efbSmrg        }
209972313efbSmrg      }
210072313efbSmrg    }
210172313efbSmrg  }
210272313efbSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
210372313efbSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
210472313efbSmrg}'`
210572313efbSmrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106bdcaa8d0Smrgelse
210772313efbSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
210872313efbSmrgfi])
210972313efbSmrglibrary_names_spec=
211072313efbSmrglibname_spec='lib$name'
211172313efbSmrgsoname_spec=
211272313efbSmrgshrext_cmds=".so"
211372313efbSmrgpostinstall_cmds=
211472313efbSmrgpostuninstall_cmds=
211572313efbSmrgfinish_cmds=
211672313efbSmrgfinish_eval=
211772313efbSmrgshlibpath_var=
211872313efbSmrgshlibpath_overrides_runpath=unknown
211972313efbSmrgversion_type=none
212072313efbSmrgdynamic_linker="$host_os ld.so"
212172313efbSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
212272313efbSmrgneed_lib_prefix=unknown
212372313efbSmrghardcode_into_libs=no
2124bdcaa8d0Smrg
212572313efbSmrg# when you set need_version to no, make sure it does not cause -set_version
212672313efbSmrg# flags to be left without arguments
212772313efbSmrgneed_version=unknown
2128bdcaa8d0Smrg
212972313efbSmrgcase $host_os in
213072313efbSmrgaix3*)
213172313efbSmrg  version_type=linux
213272313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
213372313efbSmrg  shlibpath_var=LIBPATH
2134bdcaa8d0Smrg
213572313efbSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
213672313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
213772313efbSmrg  ;;
2138bdcaa8d0Smrg
213972313efbSmrgaix[[4-9]]*)
214072313efbSmrg  version_type=linux
214172313efbSmrg  need_lib_prefix=no
214272313efbSmrg  need_version=no
214372313efbSmrg  hardcode_into_libs=yes
214472313efbSmrg  if test "$host_cpu" = ia64; then
214572313efbSmrg    # AIX 5 supports IA64
214672313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
214772313efbSmrg    shlibpath_var=LD_LIBRARY_PATH
214872313efbSmrg  else
214972313efbSmrg    # With GCC up to 2.95.x, collect2 would create an import file
215072313efbSmrg    # for dependence libraries.  The import file would start with
215172313efbSmrg    # the line `#! .'.  This would cause the generated library to
215272313efbSmrg    # depend on `.', always an invalid library.  This was fixed in
215372313efbSmrg    # development snapshots of GCC prior to 3.0.
215472313efbSmrg    case $host_os in
215572313efbSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
215672313efbSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
215772313efbSmrg	   echo ' yes '
215872313efbSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
215972313efbSmrg	:
216072313efbSmrg      else
216172313efbSmrg	can_build_shared=no
216272313efbSmrg      fi
2163bdcaa8d0Smrg      ;;
216472313efbSmrg    esac
216572313efbSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
216672313efbSmrg    # soname into executable. Probably we can add versioning support to
216772313efbSmrg    # collect2, so additional links can be useful in future.
216872313efbSmrg    if test "$aix_use_runtimelinking" = yes; then
216972313efbSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
217072313efbSmrg      # instead of lib<name>.a to let people know that these are not
217172313efbSmrg      # typical AIX shared libraries.
217272313efbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
217372313efbSmrg    else
217472313efbSmrg      # We preserve .a as extension for shared libraries through AIX4.2
217572313efbSmrg      # and later when we are not doing run time linking.
217672313efbSmrg      library_names_spec='${libname}${release}.a $libname.a'
217772313efbSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2178bdcaa8d0Smrg    fi
217972313efbSmrg    shlibpath_var=LIBPATH
218072313efbSmrg  fi
2181bdcaa8d0Smrg  ;;
2182bdcaa8d0Smrg
218372313efbSmrgamigaos*)
218472313efbSmrg  case $host_cpu in
218572313efbSmrg  powerpc)
218672313efbSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
218772313efbSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
218872313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189bdcaa8d0Smrg    ;;
219072313efbSmrg  m68k)
219172313efbSmrg    library_names_spec='$libname.ixlibrary $libname.a'
219272313efbSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
219372313efbSmrg    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'
219472313efbSmrg    ;;
219572313efbSmrg  esac
2196bdcaa8d0Smrg  ;;
2197bdcaa8d0Smrg
2198bdcaa8d0Smrgbeos*)
219972313efbSmrg  library_names_spec='${libname}${shared_ext}'
220072313efbSmrg  dynamic_linker="$host_os ld.so"
220172313efbSmrg  shlibpath_var=LIBRARY_PATH
2202bdcaa8d0Smrg  ;;
2203bdcaa8d0Smrg
2204bdcaa8d0Smrgbsdi[[45]]*)
220572313efbSmrg  version_type=linux
220672313efbSmrg  need_version=no
220772313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
220872313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
220972313efbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
221072313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
221172313efbSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
221272313efbSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
221372313efbSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
221472313efbSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
221572313efbSmrg  # libtool to hard-code these into programs
2216bdcaa8d0Smrg  ;;
2217bdcaa8d0Smrg
221872313efbSmrgcygwin* | mingw* | pw32* | cegcc*)
221972313efbSmrg  version_type=windows
222072313efbSmrg  shrext_cmds=".dll"
222172313efbSmrg  need_version=no
222272313efbSmrg  need_lib_prefix=no
2223bdcaa8d0Smrg
222472313efbSmrg  case $GCC,$host_os in
222572313efbSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
222672313efbSmrg    library_names_spec='$libname.dll.a'
222772313efbSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
222872313efbSmrg    postinstall_cmds='base_file=`basename \${file}`~
222972313efbSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
223072313efbSmrg      dldir=$destdir/`dirname \$dlpath`~
223172313efbSmrg      test -d \$dldir || mkdir -p \$dldir~
223272313efbSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
223372313efbSmrg      chmod a+x \$dldir/$dlname~
223472313efbSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
223572313efbSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
223672313efbSmrg      fi'
223772313efbSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
223872313efbSmrg      dlpath=$dir/\$dldll~
223972313efbSmrg       $RM \$dlpath'
224072313efbSmrg    shlibpath_overrides_runpath=yes
2241bdcaa8d0Smrg
224272313efbSmrg    case $host_os in
224372313efbSmrg    cygwin*)
224472313efbSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
224572313efbSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
224672313efbSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
224772313efbSmrg      ;;
224872313efbSmrg    mingw* | cegcc*)
224972313efbSmrg      # MinGW DLLs use traditional 'lib' prefix
225072313efbSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
225172313efbSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
225272313efbSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
225372313efbSmrg        # It is most probably a Windows format PATH printed by
225472313efbSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
225572313efbSmrg        # path with ; separators, and with drive letters. We can handle the
225672313efbSmrg        # drive letters (cygwin fileutils understands them), so leave them,
225772313efbSmrg        # especially as we might pass files found there to a mingw objdump,
225872313efbSmrg        # which wouldn't understand a cygwinified path. Ahh.
225972313efbSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
226072313efbSmrg      else
226172313efbSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
226272313efbSmrg      fi
226372313efbSmrg      ;;
226472313efbSmrg    pw32*)
226572313efbSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
226672313efbSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267bdcaa8d0Smrg      ;;
2268bdcaa8d0Smrg    esac
2269bdcaa8d0Smrg    ;;
227072313efbSmrg
2271bdcaa8d0Smrg  *)
227272313efbSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273bdcaa8d0Smrg    ;;
2274bdcaa8d0Smrg  esac
227572313efbSmrg  dynamic_linker='Win32 ld.exe'
227672313efbSmrg  # FIXME: first we should search . and the directory the executable is in
227772313efbSmrg  shlibpath_var=PATH
2278bdcaa8d0Smrg  ;;
2279bdcaa8d0Smrg
228072313efbSmrgdarwin* | rhapsody*)
228172313efbSmrg  dynamic_linker="$host_os dyld"
228272313efbSmrg  version_type=darwin
228372313efbSmrg  need_lib_prefix=no
228472313efbSmrg  need_version=no
228572313efbSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
228672313efbSmrg  soname_spec='${libname}${release}${major}$shared_ext'
228772313efbSmrg  shlibpath_overrides_runpath=yes
228872313efbSmrg  shlibpath_var=DYLD_LIBRARY_PATH
228972313efbSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
229072313efbSmrgm4_if([$1], [],[
229172313efbSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
229272313efbSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293bdcaa8d0Smrg  ;;
2294bdcaa8d0Smrg
229572313efbSmrgdgux*)
229672313efbSmrg  version_type=linux
229772313efbSmrg  need_lib_prefix=no
229872313efbSmrg  need_version=no
229972313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
230072313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
230172313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
2302bdcaa8d0Smrg  ;;
2303bdcaa8d0Smrg
230472313efbSmrgfreebsd1*)
230572313efbSmrg  dynamic_linker=no
2306bdcaa8d0Smrg  ;;
2307bdcaa8d0Smrg
230872313efbSmrgfreebsd* | dragonfly*)
230972313efbSmrg  # DragonFly does not have aout.  When/if they implement a new
231072313efbSmrg  # versioning mechanism, adjust this.
231172313efbSmrg  if test -x /usr/bin/objformat; then
231272313efbSmrg    objformat=`/usr/bin/objformat`
2313bdcaa8d0Smrg  else
231472313efbSmrg    case $host_os in
231572313efbSmrg    freebsd[[123]]*) objformat=aout ;;
231672313efbSmrg    *) objformat=elf ;;
231772313efbSmrg    esac
2318bdcaa8d0Smrg  fi
231972313efbSmrg  version_type=freebsd-$objformat
232072313efbSmrg  case $version_type in
232172313efbSmrg    freebsd-elf*)
232272313efbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
232372313efbSmrg      need_version=no
232472313efbSmrg      need_lib_prefix=no
232572313efbSmrg      ;;
232672313efbSmrg    freebsd-*)
232772313efbSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
232872313efbSmrg      need_version=yes
232972313efbSmrg      ;;
233072313efbSmrg  esac
233172313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
233272313efbSmrg  case $host_os in
233372313efbSmrg  freebsd2*)
233472313efbSmrg    shlibpath_overrides_runpath=yes
233572313efbSmrg    ;;
233672313efbSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
233772313efbSmrg    shlibpath_overrides_runpath=yes
233872313efbSmrg    hardcode_into_libs=yes
233972313efbSmrg    ;;
234072313efbSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
234172313efbSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
234272313efbSmrg    shlibpath_overrides_runpath=no
234372313efbSmrg    hardcode_into_libs=yes
234472313efbSmrg    ;;
234572313efbSmrg  *) # from 4.6 on, and DragonFly
234672313efbSmrg    shlibpath_overrides_runpath=yes
234772313efbSmrg    hardcode_into_libs=yes
234872313efbSmrg    ;;
234972313efbSmrg  esac
2350bdcaa8d0Smrg  ;;
2351bdcaa8d0Smrg
235272313efbSmrggnu*)
235372313efbSmrg  version_type=linux
235472313efbSmrg  need_lib_prefix=no
235572313efbSmrg  need_version=no
235672313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
235772313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
235872313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
235972313efbSmrg  hardcode_into_libs=yes
2360bdcaa8d0Smrg  ;;
2361bdcaa8d0Smrg
236272313efbSmrghpux9* | hpux10* | hpux11*)
236372313efbSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
236472313efbSmrg  # link against other versions.
236572313efbSmrg  version_type=sunos
236672313efbSmrg  need_lib_prefix=no
236772313efbSmrg  need_version=no
236872313efbSmrg  case $host_cpu in
236972313efbSmrg  ia64*)
237072313efbSmrg    shrext_cmds='.so'
237172313efbSmrg    hardcode_into_libs=yes
237272313efbSmrg    dynamic_linker="$host_os dld.so"
237372313efbSmrg    shlibpath_var=LD_LIBRARY_PATH
237472313efbSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
237572313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
237672313efbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
237772313efbSmrg    if test "X$HPUX_IA64_MODE" = X32; then
237872313efbSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
237972313efbSmrg    else
238072313efbSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
238172313efbSmrg    fi
238272313efbSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383bdcaa8d0Smrg    ;;
238472313efbSmrg  hppa*64*)
238572313efbSmrg    shrext_cmds='.sl'
238672313efbSmrg    hardcode_into_libs=yes
238772313efbSmrg    dynamic_linker="$host_os dld.sl"
238872313efbSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
238972313efbSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
239072313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
239172313efbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
239272313efbSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
239372313efbSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394bdcaa8d0Smrg    ;;
239572313efbSmrg  *)
239672313efbSmrg    shrext_cmds='.sl'
239772313efbSmrg    dynamic_linker="$host_os dld.sl"
239872313efbSmrg    shlibpath_var=SHLIB_PATH
239972313efbSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
240072313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
240172313efbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2402bdcaa8d0Smrg    ;;
240372313efbSmrg  esac
240472313efbSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
240572313efbSmrg  postinstall_cmds='chmod 555 $lib'
240672313efbSmrg  ;;
240772313efbSmrg
240872313efbSmrginterix[[3-9]]*)
240972313efbSmrg  version_type=linux
241072313efbSmrg  need_lib_prefix=no
241172313efbSmrg  need_version=no
241272313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
241372313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
241472313efbSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
241572313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
241672313efbSmrg  shlibpath_overrides_runpath=no
241772313efbSmrg  hardcode_into_libs=yes
241872313efbSmrg  ;;
241972313efbSmrg
242072313efbSmrgirix5* | irix6* | nonstopux*)
242172313efbSmrg  case $host_os in
242272313efbSmrg    nonstopux*) version_type=nonstopux ;;
242372313efbSmrg    *)
242472313efbSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
242572313efbSmrg		version_type=linux
242672313efbSmrg	else
242772313efbSmrg		version_type=irix
242872313efbSmrg	fi ;;
242972313efbSmrg  esac
243072313efbSmrg  need_lib_prefix=no
243172313efbSmrg  need_version=no
243272313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
243372313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
243472313efbSmrg  case $host_os in
243572313efbSmrg  irix5* | nonstopux*)
243672313efbSmrg    libsuff= shlibsuff=
2437bdcaa8d0Smrg    ;;
243872313efbSmrg  *)
243972313efbSmrg    case $LD in # libtool.m4 will add one of these switches to LD
244072313efbSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
244172313efbSmrg      libsuff= shlibsuff= libmagic=32-bit;;
244272313efbSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
244372313efbSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
244472313efbSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
244572313efbSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
244672313efbSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
244772313efbSmrg    esac
2448bdcaa8d0Smrg    ;;
2449bdcaa8d0Smrg  esac
245072313efbSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
245172313efbSmrg  shlibpath_overrides_runpath=no
245272313efbSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
245372313efbSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
245472313efbSmrg  hardcode_into_libs=yes
2455bdcaa8d0Smrg  ;;
2456bdcaa8d0Smrg
245772313efbSmrg# No shared lib support for Linux oldld, aout, or coff.
245872313efbSmrglinux*oldld* | linux*aout* | linux*coff*)
245972313efbSmrg  dynamic_linker=no
2460bdcaa8d0Smrg  ;;
2461bdcaa8d0Smrg
246272313efbSmrg# This must be Linux ELF.
246372313efbSmrglinux* | k*bsd*-gnu)
246472313efbSmrg  version_type=linux
246572313efbSmrg  need_lib_prefix=no
246672313efbSmrg  need_version=no
246772313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
246872313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
246972313efbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
247072313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
247172313efbSmrg  shlibpath_overrides_runpath=no
247272313efbSmrg  # Some binutils ld are patched to set DT_RUNPATH
247372313efbSmrg  save_LDFLAGS=$LDFLAGS
247472313efbSmrg  save_libdir=$libdir
247572313efbSmrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
247672313efbSmrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
247772313efbSmrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
247872313efbSmrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
247972313efbSmrg       [shlibpath_overrides_runpath=yes])])
248072313efbSmrg  LDFLAGS=$save_LDFLAGS
248172313efbSmrg  libdir=$save_libdir
2482bdcaa8d0Smrg
248372313efbSmrg  # This implies no fast_install, which is unacceptable.
248472313efbSmrg  # Some rework will be needed to allow for fast_install
248572313efbSmrg  # before this can be enabled.
248672313efbSmrg  hardcode_into_libs=yes
248772313efbSmrg
248872313efbSmrg  # Append ld.so.conf contents to the search path
248972313efbSmrg  if test -f /etc/ld.so.conf; then
249072313efbSmrg    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' ' '`
249172313efbSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2492bdcaa8d0Smrg  fi
2493bdcaa8d0Smrg
249472313efbSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
249572313efbSmrg  # powerpc, because MkLinux only supported shared libraries with the
249672313efbSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
249772313efbSmrg  # most powerpc-linux boxes support dynamic linking these days and
249872313efbSmrg  # people can always --disable-shared, the test was removed, and we
249972313efbSmrg  # assume the GNU/Linux dynamic linker is in use.
250072313efbSmrg  dynamic_linker='GNU/Linux ld.so'
2501bdcaa8d0Smrg  ;;
250272313efbSmrg
250372313efbSmrgnetbsd*)
250472313efbSmrg  version_type=sunos
250572313efbSmrg  need_lib_prefix=no
250672313efbSmrg  need_version=no
250772313efbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
250872313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
250972313efbSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
251072313efbSmrg    dynamic_linker='NetBSD (a.out) ld.so'
251172313efbSmrg  else
251272313efbSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
251372313efbSmrg    soname_spec='${libname}${release}${shared_ext}$major'
251472313efbSmrg    dynamic_linker='NetBSD ld.elf_so'
251572313efbSmrg  fi
251672313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
251772313efbSmrg  shlibpath_overrides_runpath=yes
251872313efbSmrg  hardcode_into_libs=yes
2519bdcaa8d0Smrg  ;;
252072313efbSmrg
252172313efbSmrgnewsos6)
252272313efbSmrg  version_type=linux
252372313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
252472313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
252572313efbSmrg  shlibpath_overrides_runpath=yes
2526bdcaa8d0Smrg  ;;
2527bdcaa8d0Smrg
252872313efbSmrg*nto* | *qnx*)
252972313efbSmrg  version_type=qnx
253072313efbSmrg  need_lib_prefix=no
253172313efbSmrg  need_version=no
253272313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
253372313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
253472313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
253572313efbSmrg  shlibpath_overrides_runpath=no
253672313efbSmrg  hardcode_into_libs=yes
253772313efbSmrg  dynamic_linker='ldqnx.so'
253872313efbSmrg  ;;
2539bdcaa8d0Smrg
254072313efbSmrgopenbsd*)
254172313efbSmrg  version_type=sunos
254272313efbSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
254372313efbSmrg  need_lib_prefix=no
254472313efbSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
254572313efbSmrg  case $host_os in
254672313efbSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
254772313efbSmrg    *)				need_version=no  ;;
2548bdcaa8d0Smrg  esac
254972313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
255072313efbSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
255172313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
255272313efbSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
255372313efbSmrg    case $host_os in
255472313efbSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
255572313efbSmrg	shlibpath_overrides_runpath=no
255672313efbSmrg	;;
255772313efbSmrg      *)
255872313efbSmrg	shlibpath_overrides_runpath=yes
255972313efbSmrg	;;
256072313efbSmrg      esac
2561bdcaa8d0Smrg  else
256272313efbSmrg    shlibpath_overrides_runpath=yes
2563bdcaa8d0Smrg  fi
256472313efbSmrg  ;;
2565bdcaa8d0Smrg
256672313efbSmrgos2*)
256772313efbSmrg  libname_spec='$name'
256872313efbSmrg  shrext_cmds=".dll"
256972313efbSmrg  need_lib_prefix=no
257072313efbSmrg  library_names_spec='$libname${shared_ext} $libname.a'
257172313efbSmrg  dynamic_linker='OS/2 ld.exe'
257272313efbSmrg  shlibpath_var=LIBPATH
257372313efbSmrg  ;;
2574bdcaa8d0Smrg
257572313efbSmrgosf3* | osf4* | osf5*)
257672313efbSmrg  version_type=osf
257772313efbSmrg  need_lib_prefix=no
257872313efbSmrg  need_version=no
257972313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
258072313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
258172313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
258272313efbSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
258372313efbSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
258472313efbSmrg  ;;
2585bdcaa8d0Smrg
258672313efbSmrgrdos*)
258772313efbSmrg  dynamic_linker=no
258872313efbSmrg  ;;
2589bdcaa8d0Smrg
259072313efbSmrgsolaris*)
259172313efbSmrg  version_type=linux
259272313efbSmrg  need_lib_prefix=no
259372313efbSmrg  need_version=no
259472313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
259572313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
259672313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
259772313efbSmrg  shlibpath_overrides_runpath=yes
259872313efbSmrg  hardcode_into_libs=yes
259972313efbSmrg  # ldd complains unless libraries are executable
260072313efbSmrg  postinstall_cmds='chmod +x $lib'
260172313efbSmrg  ;;
2602bdcaa8d0Smrg
260372313efbSmrgsunos4*)
260472313efbSmrg  version_type=sunos
260572313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
260672313efbSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
260772313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
260872313efbSmrg  shlibpath_overrides_runpath=yes
260972313efbSmrg  if test "$with_gnu_ld" = yes; then
261072313efbSmrg    need_lib_prefix=no
261172313efbSmrg  fi
261272313efbSmrg  need_version=yes
261372313efbSmrg  ;;
2614bdcaa8d0Smrg
261572313efbSmrgsysv4 | sysv4.3*)
261672313efbSmrg  version_type=linux
261772313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
261872313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
261972313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
262072313efbSmrg  case $host_vendor in
262172313efbSmrg    sni)
262272313efbSmrg      shlibpath_overrides_runpath=no
262372313efbSmrg      need_lib_prefix=no
262472313efbSmrg      runpath_var=LD_RUN_PATH
262572313efbSmrg      ;;
262672313efbSmrg    siemens)
262772313efbSmrg      need_lib_prefix=no
262872313efbSmrg      ;;
262972313efbSmrg    motorola)
263072313efbSmrg      need_lib_prefix=no
263172313efbSmrg      need_version=no
263272313efbSmrg      shlibpath_overrides_runpath=no
263372313efbSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
263472313efbSmrg      ;;
263572313efbSmrg  esac
263672313efbSmrg  ;;
2637bdcaa8d0Smrg
263872313efbSmrgsysv4*MP*)
263972313efbSmrg  if test -d /usr/nec ;then
264072313efbSmrg    version_type=linux
264172313efbSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
264272313efbSmrg    soname_spec='$libname${shared_ext}.$major'
264372313efbSmrg    shlibpath_var=LD_LIBRARY_PATH
2644bdcaa8d0Smrg  fi
2645bdcaa8d0Smrg  ;;
2646bdcaa8d0Smrg
264772313efbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
264872313efbSmrg  version_type=freebsd-elf
264972313efbSmrg  need_lib_prefix=no
265072313efbSmrg  need_version=no
265172313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
265272313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
265372313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
265472313efbSmrg  shlibpath_overrides_runpath=yes
265572313efbSmrg  hardcode_into_libs=yes
265672313efbSmrg  if test "$with_gnu_ld" = yes; then
265772313efbSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
265872313efbSmrg  else
265972313efbSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
266072313efbSmrg    case $host_os in
266172313efbSmrg      sco3.2v5*)
266272313efbSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
266372313efbSmrg	;;
266472313efbSmrg    esac
2665bdcaa8d0Smrg  fi
266672313efbSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
266772313efbSmrg  ;;
2668bdcaa8d0Smrg
266972313efbSmrgtpf*)
267072313efbSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
267172313efbSmrg  version_type=linux
267272313efbSmrg  need_lib_prefix=no
267372313efbSmrg  need_version=no
267472313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
267572313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
267672313efbSmrg  shlibpath_overrides_runpath=no
267772313efbSmrg  hardcode_into_libs=yes
267872313efbSmrg  ;;
2679bdcaa8d0Smrg
268072313efbSmrguts4*)
268172313efbSmrg  version_type=linux
268272313efbSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
268372313efbSmrg  soname_spec='${libname}${release}${shared_ext}$major'
268472313efbSmrg  shlibpath_var=LD_LIBRARY_PATH
268572313efbSmrg  ;;
2686bdcaa8d0Smrg
268772313efbSmrg*)
268872313efbSmrg  dynamic_linker=no
268972313efbSmrg  ;;
269072313efbSmrgesac
269172313efbSmrgAC_MSG_RESULT([$dynamic_linker])
269272313efbSmrgtest "$dynamic_linker" = no && can_build_shared=no
2693bdcaa8d0Smrg
269472313efbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
269572313efbSmrgif test "$GCC" = yes; then
269672313efbSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
269772313efbSmrgfi
2698bdcaa8d0Smrg
269972313efbSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
270072313efbSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
270172313efbSmrgfi
270272313efbSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
270372313efbSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
270472313efbSmrgfi
2705bdcaa8d0Smrg
270672313efbSmrg_LT_DECL([], [variables_saved_for_relink], [1],
270772313efbSmrg    [Variables whose values should be saved in libtool wrapper scripts and
270872313efbSmrg    restored at link time])
270972313efbSmrg_LT_DECL([], [need_lib_prefix], [0],
271072313efbSmrg    [Do we need the "lib" prefix for modules?])
271172313efbSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
271272313efbSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
271372313efbSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
271472313efbSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
271572313efbSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
271672313efbSmrg    [Is shlibpath searched before the hard-coded library search path?])
271772313efbSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
271872313efbSmrg_LT_DECL([], [library_names_spec], [1],
271972313efbSmrg    [[List of archive names.  First name is the real one, the rest are links.
272072313efbSmrg    The last name is the one that the linker finds with -lNAME]])
272172313efbSmrg_LT_DECL([], [soname_spec], [1],
272272313efbSmrg    [[The coded name of the library, if different from the real name]])
272372313efbSmrg_LT_DECL([], [postinstall_cmds], [2],
272472313efbSmrg    [Command to use after installation of a shared archive])
272572313efbSmrg_LT_DECL([], [postuninstall_cmds], [2],
272672313efbSmrg    [Command to use after uninstallation of a shared archive])
272772313efbSmrg_LT_DECL([], [finish_cmds], [2],
272872313efbSmrg    [Commands used to finish a libtool library installation in a directory])
272972313efbSmrg_LT_DECL([], [finish_eval], [1],
273072313efbSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
273172313efbSmrg    not shown]])
273272313efbSmrg_LT_DECL([], [hardcode_into_libs], [0],
273372313efbSmrg    [Whether we should hardcode library paths into libraries])
273472313efbSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
273572313efbSmrg    [Compile-time system search path for libraries])
273672313efbSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
273772313efbSmrg    [Run-time system search path for libraries])
273872313efbSmrg])# _LT_SYS_DYNAMIC_LINKER
273972313efbSmrg
274072313efbSmrg
274172313efbSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
274272313efbSmrg# --------------------------
274372313efbSmrg# find a file program which can recognize shared library
274472313efbSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
274572313efbSmrg[m4_require([_LT_DECL_EGREP])dnl
274672313efbSmrgAC_MSG_CHECKING([for $1])
274772313efbSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
274872313efbSmrg[case $MAGIC_CMD in
274972313efbSmrg[[\\/*] |  ?:[\\/]*])
275072313efbSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
275172313efbSmrg  ;;
275272313efbSmrg*)
275372313efbSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
275472313efbSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
275572313efbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
275672313efbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
275772313efbSmrgdnl not every word.  This closes a longstanding sh security hole.
275872313efbSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
275972313efbSmrg  for ac_dir in $ac_dummy; do
276072313efbSmrg    IFS="$lt_save_ifs"
276172313efbSmrg    test -z "$ac_dir" && ac_dir=.
276272313efbSmrg    if test -f $ac_dir/$1; then
276372313efbSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
276472313efbSmrg      if test -n "$file_magic_test_file"; then
276572313efbSmrg	case $deplibs_check_method in
276672313efbSmrg	"file_magic "*)
276772313efbSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
276872313efbSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
276972313efbSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
277072313efbSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
277172313efbSmrg	    :
277272313efbSmrg	  else
277372313efbSmrg	    cat <<_LT_EOF 1>&2
2774bdcaa8d0Smrg
277572313efbSmrg*** Warning: the command libtool uses to detect shared libraries,
277672313efbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
277772313efbSmrg*** The result is that libtool may fail to recognize shared libraries
277872313efbSmrg*** as such.  This will affect the creation of libtool libraries that
277972313efbSmrg*** depend on shared libraries, but programs linked with such libtool
278072313efbSmrg*** libraries will work regardless of this problem.  Nevertheless, you
278172313efbSmrg*** may want to report the problem to your system manager and/or to
278272313efbSmrg*** bug-libtool@gnu.org
2783bdcaa8d0Smrg
278472313efbSmrg_LT_EOF
278572313efbSmrg	  fi ;;
278672313efbSmrg	esac
278772313efbSmrg      fi
278872313efbSmrg      break
278972313efbSmrg    fi
279072313efbSmrg  done
279172313efbSmrg  IFS="$lt_save_ifs"
279272313efbSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
279372313efbSmrg  ;;
279472313efbSmrgesac])
279572313efbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
279672313efbSmrgif test -n "$MAGIC_CMD"; then
279772313efbSmrg  AC_MSG_RESULT($MAGIC_CMD)
279872313efbSmrgelse
279972313efbSmrg  AC_MSG_RESULT(no)
280072313efbSmrgfi
280172313efbSmrg_LT_DECL([], [MAGIC_CMD], [0],
280272313efbSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
280372313efbSmrg])# _LT_PATH_TOOL_PREFIX
2804bdcaa8d0Smrg
280572313efbSmrg# Old name:
280672313efbSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
280772313efbSmrgdnl aclocal-1.4 backwards compatibility:
280872313efbSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2809bdcaa8d0Smrg
2810bdcaa8d0Smrg
281172313efbSmrg# _LT_PATH_MAGIC
281272313efbSmrg# --------------
281372313efbSmrg# find a file program which can recognize a shared library
281472313efbSmrgm4_defun([_LT_PATH_MAGIC],
281572313efbSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
281672313efbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
281772313efbSmrg  if test -n "$ac_tool_prefix"; then
281872313efbSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
281972313efbSmrg  else
282072313efbSmrg    MAGIC_CMD=:
282172313efbSmrg  fi
282272313efbSmrgfi
282372313efbSmrg])# _LT_PATH_MAGIC
2824bdcaa8d0Smrg
282572313efbSmrg
282672313efbSmrg# LT_PATH_LD
282772313efbSmrg# ----------
282872313efbSmrg# find the pathname to the GNU or non-GNU linker
282972313efbSmrgAC_DEFUN([LT_PATH_LD],
283072313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
283172313efbSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
283272313efbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
283372313efbSmrgm4_require([_LT_DECL_SED])dnl
283472313efbSmrgm4_require([_LT_DECL_EGREP])dnl
283572313efbSmrg
283672313efbSmrgAC_ARG_WITH([gnu-ld],
283772313efbSmrg    [AS_HELP_STRING([--with-gnu-ld],
283872313efbSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
283972313efbSmrg    [test "$withval" = no || with_gnu_ld=yes],
284072313efbSmrg    [with_gnu_ld=no])dnl
284172313efbSmrg
284272313efbSmrgac_prog=ld
284372313efbSmrgif test "$GCC" = yes; then
284472313efbSmrg  # Check if gcc -print-prog-name=ld gives a path.
284572313efbSmrg  AC_MSG_CHECKING([for ld used by $CC])
284672313efbSmrg  case $host in
284772313efbSmrg  *-*-mingw*)
284872313efbSmrg    # gcc leaves a trailing carriage return which upsets mingw
284972313efbSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
285072313efbSmrg  *)
285172313efbSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
285272313efbSmrg  esac
285372313efbSmrg  case $ac_prog in
285472313efbSmrg    # Accept absolute paths.
285572313efbSmrg    [[\\/]]* | ?:[[\\/]]*)
285672313efbSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
285772313efbSmrg      # Canonicalize the pathname of ld
285872313efbSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
285972313efbSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
286072313efbSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
286172313efbSmrg      done
286272313efbSmrg      test -z "$LD" && LD="$ac_prog"
286372313efbSmrg      ;;
286472313efbSmrg  "")
286572313efbSmrg    # If it fails, then pretend we aren't using GCC.
286672313efbSmrg    ac_prog=ld
286772313efbSmrg    ;;
286872313efbSmrg  *)
286972313efbSmrg    # If it is relative, then search for the first ld in PATH.
287072313efbSmrg    with_gnu_ld=unknown
287172313efbSmrg    ;;
287272313efbSmrg  esac
287372313efbSmrgelif test "$with_gnu_ld" = yes; then
287472313efbSmrg  AC_MSG_CHECKING([for GNU ld])
2875bdcaa8d0Smrgelse
287672313efbSmrg  AC_MSG_CHECKING([for non-GNU ld])
2877bdcaa8d0Smrgfi
287872313efbSmrgAC_CACHE_VAL(lt_cv_path_LD,
287972313efbSmrg[if test -z "$LD"; then
288072313efbSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
288172313efbSmrg  for ac_dir in $PATH; do
288272313efbSmrg    IFS="$lt_save_ifs"
288372313efbSmrg    test -z "$ac_dir" && ac_dir=.
288472313efbSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
288572313efbSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
288672313efbSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
288772313efbSmrg      # but apparently some variants of GNU ld only accept -v.
288872313efbSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
288972313efbSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
289072313efbSmrg      *GNU* | *'with BFD'*)
289172313efbSmrg	test "$with_gnu_ld" != no && break
289272313efbSmrg	;;
289372313efbSmrg      *)
289472313efbSmrg	test "$with_gnu_ld" != yes && break
289572313efbSmrg	;;
289672313efbSmrg      esac
289772313efbSmrg    fi
289872313efbSmrg  done
289972313efbSmrg  IFS="$lt_save_ifs"
2900bdcaa8d0Smrgelse
290172313efbSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
290272313efbSmrgfi])
290372313efbSmrgLD="$lt_cv_path_LD"
290472313efbSmrgif test -n "$LD"; then
290572313efbSmrg  AC_MSG_RESULT($LD)
2906bdcaa8d0Smrgelse
290772313efbSmrg  AC_MSG_RESULT(no)
2908bdcaa8d0Smrgfi
290972313efbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
291072313efbSmrg_LT_PATH_LD_GNU
291172313efbSmrgAC_SUBST([LD])
2912bdcaa8d0Smrg
291372313efbSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
291472313efbSmrg])# LT_PATH_LD
2915bdcaa8d0Smrg
291672313efbSmrg# Old names:
291772313efbSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
291872313efbSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
291972313efbSmrgdnl aclocal-1.4 backwards compatibility:
292072313efbSmrgdnl AC_DEFUN([AM_PROG_LD], [])
292172313efbSmrgdnl AC_DEFUN([AC_PROG_LD], [])
2922bdcaa8d0Smrg
2923bdcaa8d0Smrg
292472313efbSmrg# _LT_PATH_LD_GNU
292572313efbSmrg#- --------------
292672313efbSmrgm4_defun([_LT_PATH_LD_GNU],
292772313efbSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
292872313efbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
292972313efbSmrgcase `$LD -v 2>&1 </dev/null` in
293072313efbSmrg*GNU* | *'with BFD'*)
293172313efbSmrg  lt_cv_prog_gnu_ld=yes
293272313efbSmrg  ;;
293372313efbSmrg*)
293472313efbSmrg  lt_cv_prog_gnu_ld=no
293572313efbSmrg  ;;
293672313efbSmrgesac])
293772313efbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
293872313efbSmrg])# _LT_PATH_LD_GNU
2939bdcaa8d0Smrg
2940bdcaa8d0Smrg
294172313efbSmrg# _LT_CMD_RELOAD
294272313efbSmrg# --------------
294372313efbSmrg# find reload flag for linker
294472313efbSmrg#   -- PORTME Some linkers may need a different reload flag.
294572313efbSmrgm4_defun([_LT_CMD_RELOAD],
294672313efbSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
294772313efbSmrg  lt_cv_ld_reload_flag,
294872313efbSmrg  [lt_cv_ld_reload_flag='-r'])
294972313efbSmrgreload_flag=$lt_cv_ld_reload_flag
295072313efbSmrgcase $reload_flag in
295172313efbSmrg"" | " "*) ;;
295272313efbSmrg*) reload_flag=" $reload_flag" ;;
295372313efbSmrgesac
295472313efbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
295572313efbSmrgcase $host_os in
295672313efbSmrg  darwin*)
295772313efbSmrg    if test "$GCC" = yes; then
295872313efbSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2959bdcaa8d0Smrg    else
296072313efbSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2961bdcaa8d0Smrg    fi
296272313efbSmrg    ;;
296372313efbSmrgesac
296472313efbSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
296572313efbSmrg_LT_DECL([], [reload_cmds], [2])dnl
296672313efbSmrg])# _LT_CMD_RELOAD
2967bdcaa8d0Smrg
2968bdcaa8d0Smrg
296972313efbSmrg# _LT_CHECK_MAGIC_METHOD
297072313efbSmrg# ----------------------
297172313efbSmrg# how to check for library dependencies
297272313efbSmrg#  -- PORTME fill in with the dynamic library characteristics
297372313efbSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
297472313efbSmrg[m4_require([_LT_DECL_EGREP])
297572313efbSmrgm4_require([_LT_DECL_OBJDUMP])
297672313efbSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
297772313efbSmrglt_cv_deplibs_check_method,
297872313efbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
297972313efbSmrglt_cv_file_magic_test_file=
298072313efbSmrglt_cv_deplibs_check_method='unknown'
298172313efbSmrg# Need to set the preceding variable on all platforms that support
298272313efbSmrg# interlibrary dependencies.
298372313efbSmrg# 'none' -- dependencies not supported.
298472313efbSmrg# `unknown' -- same as none, but documents that we really don't know.
298572313efbSmrg# 'pass_all' -- all dependencies passed with no checks.
298672313efbSmrg# 'test_compile' -- check by making test program.
298772313efbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
298872313efbSmrg# which responds to the $file_magic_cmd with a given extended regex.
298972313efbSmrg# If you have `file' or equivalent on your system and you're not sure
299072313efbSmrg# whether `pass_all' will *always* work, you probably want this one.
2991bdcaa8d0Smrg
2992bdcaa8d0Smrgcase $host_os in
299372313efbSmrgaix[[4-9]]*)
299472313efbSmrg  lt_cv_deplibs_check_method=pass_all
299572313efbSmrg  ;;
2996bdcaa8d0Smrg
299772313efbSmrgbeos*)
299872313efbSmrg  lt_cv_deplibs_check_method=pass_all
299972313efbSmrg  ;;
3000bdcaa8d0Smrg
300172313efbSmrgbsdi[[45]]*)
300272313efbSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
300372313efbSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
300472313efbSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
300572313efbSmrg  ;;
3006bdcaa8d0Smrg
300772313efbSmrgcygwin*)
300872313efbSmrg  # func_win32_libid is a shell function defined in ltmain.sh
300972313efbSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
301072313efbSmrg  lt_cv_file_magic_cmd='func_win32_libid'
301172313efbSmrg  ;;
3012bdcaa8d0Smrg
301372313efbSmrgmingw* | pw32*)
301472313efbSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
301572313efbSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
301672313efbSmrg  # unless we find 'file', for example because we are cross-compiling.
301772313efbSmrg  if ( file / ) >/dev/null 2>&1; then
301872313efbSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
301972313efbSmrg    lt_cv_file_magic_cmd='func_win32_libid'
302072313efbSmrg  else
302172313efbSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
302272313efbSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
302372313efbSmrg  fi
302472313efbSmrg  ;;
3025bdcaa8d0Smrg
302672313efbSmrgcegcc)
302772313efbSmrg  # use the weaker test based on 'objdump'. See mingw*.
302872313efbSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
302972313efbSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3030bdcaa8d0Smrg  ;;
3031bdcaa8d0Smrg
303272313efbSmrgdarwin* | rhapsody*)
303372313efbSmrg  lt_cv_deplibs_check_method=pass_all
303472313efbSmrg  ;;
3035bdcaa8d0Smrg
303672313efbSmrgfreebsd* | dragonfly*)
303772313efbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3038bdcaa8d0Smrg    case $host_cpu in
303972313efbSmrg    i*86 )
304072313efbSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
304172313efbSmrg      # Let's accept both of them until this is cleared up.
304272313efbSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
304372313efbSmrg      lt_cv_file_magic_cmd=/usr/bin/file
304472313efbSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3045bdcaa8d0Smrg      ;;
3046bdcaa8d0Smrg    esac
304772313efbSmrg  else
304872313efbSmrg    lt_cv_deplibs_check_method=pass_all
304972313efbSmrg  fi
305072313efbSmrg  ;;
3051bdcaa8d0Smrg
305272313efbSmrggnu*)
305372313efbSmrg  lt_cv_deplibs_check_method=pass_all
305472313efbSmrg  ;;
3055bdcaa8d0Smrg
305672313efbSmrghpux10.20* | hpux11*)
305772313efbSmrg  lt_cv_file_magic_cmd=/usr/bin/file
305872313efbSmrg  case $host_cpu in
305972313efbSmrg  ia64*)
306072313efbSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
306172313efbSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3062bdcaa8d0Smrg    ;;
306372313efbSmrg  hppa*64*)
306472313efbSmrg    [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]']
306572313efbSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3066bdcaa8d0Smrg    ;;
306772313efbSmrg  *)
306872313efbSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
306972313efbSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3070bdcaa8d0Smrg    ;;
307172313efbSmrg  esac
307272313efbSmrg  ;;
3073bdcaa8d0Smrg
307472313efbSmrginterix[[3-9]]*)
307572313efbSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
307672313efbSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
307772313efbSmrg  ;;
3078bdcaa8d0Smrg
307972313efbSmrgirix5* | irix6* | nonstopux*)
308072313efbSmrg  case $LD in
308172313efbSmrg  *-32|*"-32 ") libmagic=32-bit;;
308272313efbSmrg  *-n32|*"-n32 ") libmagic=N32;;
308372313efbSmrg  *-64|*"-64 ") libmagic=64-bit;;
308472313efbSmrg  *) libmagic=never-match;;
308572313efbSmrg  esac
308672313efbSmrg  lt_cv_deplibs_check_method=pass_all
308772313efbSmrg  ;;
3088bdcaa8d0Smrg
308972313efbSmrg# This must be Linux ELF.
309072313efbSmrglinux* | k*bsd*-gnu)
309172313efbSmrg  lt_cv_deplibs_check_method=pass_all
309272313efbSmrg  ;;
3093bdcaa8d0Smrg
309472313efbSmrgnetbsd*)
309572313efbSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
309672313efbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
309772313efbSmrg  else
309872313efbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
309972313efbSmrg  fi
310072313efbSmrg  ;;
3101bdcaa8d0Smrg
310272313efbSmrgnewos6*)
310372313efbSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
310472313efbSmrg  lt_cv_file_magic_cmd=/usr/bin/file
310572313efbSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
310672313efbSmrg  ;;
3107bdcaa8d0Smrg
310872313efbSmrg*nto* | *qnx*)
310972313efbSmrg  lt_cv_deplibs_check_method=pass_all
311072313efbSmrg  ;;
3111bdcaa8d0Smrg
311272313efbSmrgopenbsd*)
311372313efbSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
311472313efbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
311572313efbSmrg  else
311672313efbSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
311772313efbSmrg  fi
311872313efbSmrg  ;;
3119bdcaa8d0Smrg
312072313efbSmrgosf3* | osf4* | osf5*)
312172313efbSmrg  lt_cv_deplibs_check_method=pass_all
312272313efbSmrg  ;;
3123bdcaa8d0Smrg
312472313efbSmrgrdos*)
312572313efbSmrg  lt_cv_deplibs_check_method=pass_all
312672313efbSmrg  ;;
3127bdcaa8d0Smrg
312872313efbSmrgsolaris*)
312972313efbSmrg  lt_cv_deplibs_check_method=pass_all
313072313efbSmrg  ;;
313172313efbSmrg
313272313efbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
313372313efbSmrg  lt_cv_deplibs_check_method=pass_all
313472313efbSmrg  ;;
313572313efbSmrg
313672313efbSmrgsysv4 | sysv4.3*)
313772313efbSmrg  case $host_vendor in
313872313efbSmrg  motorola)
313972313efbSmrg    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]]'
314072313efbSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
314172313efbSmrg    ;;
314272313efbSmrg  ncr)
314372313efbSmrg    lt_cv_deplibs_check_method=pass_all
3144bdcaa8d0Smrg    ;;
314572313efbSmrg  sequent)
314672313efbSmrg    lt_cv_file_magic_cmd='/bin/file'
314772313efbSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3148bdcaa8d0Smrg    ;;
314972313efbSmrg  sni)
315072313efbSmrg    lt_cv_file_magic_cmd='/bin/file'
315172313efbSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
315272313efbSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3153bdcaa8d0Smrg    ;;
315472313efbSmrg  siemens)
315572313efbSmrg    lt_cv_deplibs_check_method=pass_all
315672313efbSmrg    ;;
315772313efbSmrg  pc)
315872313efbSmrg    lt_cv_deplibs_check_method=pass_all
315972313efbSmrg    ;;
316072313efbSmrg  esac
316172313efbSmrg  ;;
3162bdcaa8d0Smrg
316372313efbSmrgtpf*)
316472313efbSmrg  lt_cv_deplibs_check_method=pass_all
316572313efbSmrg  ;;
316672313efbSmrgesac
316772313efbSmrg])
316872313efbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
316972313efbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
317072313efbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3171bdcaa8d0Smrg
317272313efbSmrg_LT_DECL([], [deplibs_check_method], [1],
317372313efbSmrg    [Method to check whether dependent libraries are shared objects])
317472313efbSmrg_LT_DECL([], [file_magic_cmd], [1],
317572313efbSmrg    [Command to use when deplibs_check_method == "file_magic"])
317672313efbSmrg])# _LT_CHECK_MAGIC_METHOD
3177bdcaa8d0Smrg
3178bdcaa8d0Smrg
317972313efbSmrg# LT_PATH_NM
318072313efbSmrg# ----------
318172313efbSmrg# find the pathname to a BSD- or MS-compatible name lister
318272313efbSmrgAC_DEFUN([LT_PATH_NM],
318372313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl
318472313efbSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
318572313efbSmrg[if test -n "$NM"; then
318672313efbSmrg  # Let the user override the test.
318772313efbSmrg  lt_cv_path_NM="$NM"
318872313efbSmrgelse
318972313efbSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
319072313efbSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
319172313efbSmrg    lt_nm_to_check="$lt_nm_to_check nm"
319272313efbSmrg  fi
319372313efbSmrg  for lt_tmp_nm in $lt_nm_to_check; do
319472313efbSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
319572313efbSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
319672313efbSmrg      IFS="$lt_save_ifs"
319772313efbSmrg      test -z "$ac_dir" && ac_dir=.
319872313efbSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
319972313efbSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
320072313efbSmrg	# Check to see if the nm accepts a BSD-compat flag.
320172313efbSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
320272313efbSmrg	#   nm: unknown option "B" ignored
320372313efbSmrg	# Tru64's nm complains that /dev/null is an invalid object file
320472313efbSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
320572313efbSmrg	*/dev/null* | *'Invalid file or object type'*)
320672313efbSmrg	  lt_cv_path_NM="$tmp_nm -B"
320772313efbSmrg	  break
320872313efbSmrg	  ;;
320972313efbSmrg	*)
321072313efbSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
321172313efbSmrg	  */dev/null*)
321272313efbSmrg	    lt_cv_path_NM="$tmp_nm -p"
321372313efbSmrg	    break
321472313efbSmrg	    ;;
321572313efbSmrg	  *)
321672313efbSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
321772313efbSmrg	    continue # so that we can try to find one that supports BSD flags
321872313efbSmrg	    ;;
321972313efbSmrg	  esac
322072313efbSmrg	  ;;
322172313efbSmrg	esac
322272313efbSmrg      fi
322372313efbSmrg    done
322472313efbSmrg    IFS="$lt_save_ifs"
3225bdcaa8d0Smrg  done
322672313efbSmrg  : ${lt_cv_path_NM=no}
322772313efbSmrgfi])
322872313efbSmrgif test "$lt_cv_path_NM" != "no"; then
322972313efbSmrg  NM="$lt_cv_path_NM"
3230bdcaa8d0Smrgelse
323172313efbSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
323272313efbSmrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
323372313efbSmrg  AC_SUBST([DUMPBIN])
323472313efbSmrg  if test "$DUMPBIN" != ":"; then
323572313efbSmrg    NM="$DUMPBIN"
323672313efbSmrg  fi
3237bdcaa8d0Smrgfi
323872313efbSmrgtest -z "$NM" && NM=nm
323972313efbSmrgAC_SUBST([NM])
324072313efbSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
324172313efbSmrg
324272313efbSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
324372313efbSmrg  [lt_cv_nm_interface="BSD nm"
324472313efbSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
324572313efbSmrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
324672313efbSmrg  (eval "$ac_compile" 2>conftest.err)
324772313efbSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
324872313efbSmrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
324972313efbSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
325072313efbSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
325172313efbSmrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
325272313efbSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
325372313efbSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
325472313efbSmrg    lt_cv_nm_interface="MS dumpbin"
325572313efbSmrg  fi
325672313efbSmrg  rm -f conftest*])
325772313efbSmrg])# LT_PATH_NM
3258bdcaa8d0Smrg
325972313efbSmrg# Old names:
326072313efbSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
326172313efbSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
326272313efbSmrgdnl aclocal-1.4 backwards compatibility:
326372313efbSmrgdnl AC_DEFUN([AM_PROG_NM], [])
326472313efbSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3265bdcaa8d0Smrg
3266bdcaa8d0Smrg
326772313efbSmrg# LT_LIB_M
326872313efbSmrg# --------
326972313efbSmrg# check for math library
327072313efbSmrgAC_DEFUN([LT_LIB_M],
327172313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
327272313efbSmrgLIBM=
327372313efbSmrgcase $host in
327472313efbSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
327572313efbSmrg  # These system don't have libm, or don't need it
327672313efbSmrg  ;;
327772313efbSmrg*-ncr-sysv4.3*)
327872313efbSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
327972313efbSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
328072313efbSmrg  ;;
328172313efbSmrg*)
328272313efbSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3283bdcaa8d0Smrg  ;;
3284bdcaa8d0Smrgesac
328572313efbSmrgAC_SUBST([LIBM])
328672313efbSmrg])# LT_LIB_M
3287bdcaa8d0Smrg
328872313efbSmrg# Old name:
328972313efbSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
329072313efbSmrgdnl aclocal-1.4 backwards compatibility:
329172313efbSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3292bdcaa8d0Smrg
3293bdcaa8d0Smrg
329472313efbSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
329572313efbSmrg# -------------------------------
329672313efbSmrgm4_defun([_LT_COMPILER_NO_RTTI],
329772313efbSmrg[m4_require([_LT_TAG_COMPILER])dnl
3298bdcaa8d0Smrg
329972313efbSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3300bdcaa8d0Smrg
330172313efbSmrgif test "$GCC" = yes; then
330272313efbSmrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3303bdcaa8d0Smrg
330472313efbSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
330572313efbSmrg    lt_cv_prog_compiler_rtti_exceptions,
330672313efbSmrg    [-fno-rtti -fno-exceptions], [],
330772313efbSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
330872313efbSmrgfi
330972313efbSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
331072313efbSmrg	[Compiler flag to turn off builtin functions])
331172313efbSmrg])# _LT_COMPILER_NO_RTTI
3312bdcaa8d0Smrg
3313bdcaa8d0Smrg
331472313efbSmrg# _LT_CMD_GLOBAL_SYMBOLS
331572313efbSmrg# ----------------------
331672313efbSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
331772313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
331872313efbSmrgAC_REQUIRE([AC_PROG_CC])dnl
331972313efbSmrgAC_REQUIRE([LT_PATH_NM])dnl
332072313efbSmrgAC_REQUIRE([LT_PATH_LD])dnl
332172313efbSmrgm4_require([_LT_DECL_SED])dnl
332272313efbSmrgm4_require([_LT_DECL_EGREP])dnl
332372313efbSmrgm4_require([_LT_TAG_COMPILER])dnl
3324bdcaa8d0Smrg
332572313efbSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
332672313efbSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
332772313efbSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
332872313efbSmrg[
332972313efbSmrg# These are sane defaults that work on at least a few old systems.
333072313efbSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3331bdcaa8d0Smrg
333272313efbSmrg# Character class describing NM global symbol codes.
333372313efbSmrgsymcode='[[BCDEGRST]]'
3334bdcaa8d0Smrg
333572313efbSmrg# Regexp to match symbols that can be accessed directly from C.
333672313efbSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3337bdcaa8d0Smrg
333872313efbSmrg# Define system-specific variables.
3339bdcaa8d0Smrgcase $host_os in
334072313efbSmrgaix*)
334172313efbSmrg  symcode='[[BCDT]]'
3342bdcaa8d0Smrg  ;;
334372313efbSmrgcygwin* | mingw* | pw32* | cegcc*)
334472313efbSmrg  symcode='[[ABCDGISTW]]'
334572313efbSmrg  ;;
334672313efbSmrghpux*)
334772313efbSmrg  if test "$host_cpu" = ia64; then
334872313efbSmrg    symcode='[[ABCDEGRST]]'
3349bdcaa8d0Smrg  fi
3350bdcaa8d0Smrg  ;;
335172313efbSmrgirix* | nonstopux*)
335272313efbSmrg  symcode='[[BCDEGRST]]'
335372313efbSmrg  ;;
335472313efbSmrgosf*)
335572313efbSmrg  symcode='[[BCDEGQRST]]'
335672313efbSmrg  ;;
335772313efbSmrgsolaris*)
335872313efbSmrg  symcode='[[BDRT]]'
335972313efbSmrg  ;;
336072313efbSmrgsco3.2v5*)
336172313efbSmrg  symcode='[[DT]]'
336272313efbSmrg  ;;
336372313efbSmrgsysv4.2uw2*)
336472313efbSmrg  symcode='[[DT]]'
336572313efbSmrg  ;;
336672313efbSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
336772313efbSmrg  symcode='[[ABDT]]'
336872313efbSmrg  ;;
336972313efbSmrgsysv4)
337072313efbSmrg  symcode='[[DFNSTU]]'
337172313efbSmrg  ;;
3372bdcaa8d0Smrgesac
3373bdcaa8d0Smrg
337472313efbSmrg# If we're using GNU nm, then use its standard symbol codes.
337572313efbSmrgcase `$NM -V 2>&1` in
337672313efbSmrg*GNU* | *'with BFD'*)
337772313efbSmrg  symcode='[[ABCDGIRSTW]]' ;;
337872313efbSmrgesac
3379bdcaa8d0Smrg
338072313efbSmrg# Transform an extracted symbol line into a proper C declaration.
338172313efbSmrg# Some systems (esp. on ia64) link data and code symbols differently,
338272313efbSmrg# so use this general approach.
338372313efbSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3384bdcaa8d0Smrg
338572313efbSmrg# Transform an extracted symbol line into symbol name and symbol address
338672313efbSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
338772313efbSmrglt_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'"
3388bdcaa8d0Smrg
338972313efbSmrg# Handle CRLF in mingw tool chain
339072313efbSmrgopt_cr=
339172313efbSmrgcase $build_os in
339272313efbSmrgmingw*)
339372313efbSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
339472313efbSmrg  ;;
339572313efbSmrgesac
3396bdcaa8d0Smrg
339772313efbSmrg# Try without a prefix underscore, then with it.
339872313efbSmrgfor ac_symprfx in "" "_"; do
3399bdcaa8d0Smrg
340072313efbSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
340172313efbSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3402bdcaa8d0Smrg
340372313efbSmrg  # Write the raw and C identifiers.
340472313efbSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
340572313efbSmrg    # Fake it for dumpbin and say T for any non-static function
340672313efbSmrg    # and D for any global variable.
340772313efbSmrg    # Also find C++ and __fastcall symbols from MSVC++,
340872313efbSmrg    # which start with @ or ?.
340972313efbSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
341072313efbSmrg"     {last_section=section; section=\$ 3};"\
341172313efbSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
341272313efbSmrg"     \$ 0!~/External *\|/{next};"\
341372313efbSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
341472313efbSmrg"     {if(hide[section]) next};"\
341572313efbSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
341672313efbSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
341772313efbSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
341872313efbSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
341972313efbSmrg"     ' prfx=^$ac_symprfx]"
342072313efbSmrg  else
342172313efbSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
342272313efbSmrg  fi
3423bdcaa8d0Smrg
342472313efbSmrg  # Check to see that the pipe works correctly.
342572313efbSmrg  pipe_works=no
3426bdcaa8d0Smrg
342772313efbSmrg  rm -f conftest*
342872313efbSmrg  cat > conftest.$ac_ext <<_LT_EOF
342972313efbSmrg#ifdef __cplusplus
343072313efbSmrgextern "C" {
343172313efbSmrg#endif
343272313efbSmrgchar nm_test_var;
343372313efbSmrgvoid nm_test_func(void);
343472313efbSmrgvoid nm_test_func(void){}
343572313efbSmrg#ifdef __cplusplus
343672313efbSmrg}
343772313efbSmrg#endif
343872313efbSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
343972313efbSmrg_LT_EOF
3440bdcaa8d0Smrg
344172313efbSmrg  if AC_TRY_EVAL(ac_compile); then
344272313efbSmrg    # Now try to grab the symbols.
344372313efbSmrg    nlist=conftest.nm
344472313efbSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
344572313efbSmrg      # Try sorting and uniquifying the output.
344672313efbSmrg      if sort "$nlist" | uniq > "$nlist"T; then
344772313efbSmrg	mv -f "$nlist"T "$nlist"
344872313efbSmrg      else
344972313efbSmrg	rm -f "$nlist"T
345072313efbSmrg      fi
3451bdcaa8d0Smrg
345272313efbSmrg      # Make sure that we snagged all the symbols we need.
345372313efbSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
345472313efbSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
345572313efbSmrg	  cat <<_LT_EOF > conftest.$ac_ext
345672313efbSmrg#ifdef __cplusplus
345772313efbSmrgextern "C" {
345872313efbSmrg#endif
3459bdcaa8d0Smrg
346072313efbSmrg_LT_EOF
346172313efbSmrg	  # Now generate the symbol file.
346272313efbSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3463bdcaa8d0Smrg
346472313efbSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3465bdcaa8d0Smrg
346672313efbSmrg/* The mapping between symbol names and symbols.  */
346772313efbSmrgconst struct {
346872313efbSmrg  const char *name;
346972313efbSmrg  void       *address;
347072313efbSmrg}
347172313efbSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
347272313efbSmrg{
347372313efbSmrg  { "@PROGRAM@", (void *) 0 },
347472313efbSmrg_LT_EOF
347572313efbSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
347672313efbSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
347772313efbSmrg  {0, (void *) 0}
347872313efbSmrg};
3479bdcaa8d0Smrg
348072313efbSmrg/* This works around a problem in FreeBSD linker */
348172313efbSmrg#ifdef FREEBSD_WORKAROUND
348272313efbSmrgstatic const void *lt_preloaded_setup() {
348372313efbSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
348472313efbSmrg}
348572313efbSmrg#endif
3486bdcaa8d0Smrg
348772313efbSmrg#ifdef __cplusplus
348872313efbSmrg}
348972313efbSmrg#endif
349072313efbSmrg_LT_EOF
349172313efbSmrg	  # Now try linking the two files.
349272313efbSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
349372313efbSmrg	  lt_save_LIBS="$LIBS"
349472313efbSmrg	  lt_save_CFLAGS="$CFLAGS"
349572313efbSmrg	  LIBS="conftstm.$ac_objext"
349672313efbSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
349772313efbSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
349872313efbSmrg	    pipe_works=yes
349972313efbSmrg	  fi
350072313efbSmrg	  LIBS="$lt_save_LIBS"
350172313efbSmrg	  CFLAGS="$lt_save_CFLAGS"
350272313efbSmrg	else
350372313efbSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
350472313efbSmrg	fi
350572313efbSmrg      else
350672313efbSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
350772313efbSmrg      fi
350872313efbSmrg    else
350972313efbSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
351072313efbSmrg    fi
351172313efbSmrg  else
351272313efbSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
351372313efbSmrg    cat conftest.$ac_ext >&5
351472313efbSmrg  fi
351572313efbSmrg  rm -rf conftest* conftst*
3516bdcaa8d0Smrg
351772313efbSmrg  # Do not use the global_symbol_pipe unless it works.
351872313efbSmrg  if test "$pipe_works" = yes; then
351972313efbSmrg    break
352072313efbSmrg  else
352172313efbSmrg    lt_cv_sys_global_symbol_pipe=
352272313efbSmrg  fi
352372313efbSmrgdone
352472313efbSmrg])
352572313efbSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
352672313efbSmrg  lt_cv_sys_global_symbol_to_cdecl=
352772313efbSmrgfi
352872313efbSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
352972313efbSmrg  AC_MSG_RESULT(failed)
353072313efbSmrgelse
353172313efbSmrg  AC_MSG_RESULT(ok)
353272313efbSmrgfi
3533bdcaa8d0Smrg
353472313efbSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
353572313efbSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
353672313efbSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
353772313efbSmrg    [Transform the output of nm in a proper C declaration])
353872313efbSmrg_LT_DECL([global_symbol_to_c_name_address],
353972313efbSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
354072313efbSmrg    [Transform the output of nm in a C name address pair])
354172313efbSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
354272313efbSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
354372313efbSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
354472313efbSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3545bdcaa8d0Smrg
3546bdcaa8d0Smrg
354772313efbSmrg# _LT_COMPILER_PIC([TAGNAME])
354872313efbSmrg# ---------------------------
354972313efbSmrgm4_defun([_LT_COMPILER_PIC],
355072313efbSmrg[m4_require([_LT_TAG_COMPILER])dnl
355172313efbSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
355272313efbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
355372313efbSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3554bdcaa8d0Smrg
355572313efbSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
355672313efbSmrgm4_if([$1], [CXX], [
355772313efbSmrg  # C++ specific cases for pic, static, wl, etc.
355872313efbSmrg  if test "$GXX" = yes; then
355972313efbSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
356072313efbSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3561bdcaa8d0Smrg
356272313efbSmrg    case $host_os in
356372313efbSmrg    aix*)
356472313efbSmrg      # All AIX code is PIC.
356572313efbSmrg      if test "$host_cpu" = ia64; then
356672313efbSmrg	# AIX 5 now supports IA64 processor
356772313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
356872313efbSmrg      fi
356972313efbSmrg      ;;
3570bdcaa8d0Smrg
357172313efbSmrg    amigaos*)
357272313efbSmrg      case $host_cpu in
357372313efbSmrg      powerpc)
357472313efbSmrg            # see comment about AmigaOS4 .so support
357572313efbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
357672313efbSmrg        ;;
357772313efbSmrg      m68k)
357872313efbSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
357972313efbSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
358072313efbSmrg            # like `-m68040'.
358172313efbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
358272313efbSmrg        ;;
358372313efbSmrg      esac
358472313efbSmrg      ;;
3585bdcaa8d0Smrg
358672313efbSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
358772313efbSmrg      # PIC is the default for these OSes.
358872313efbSmrg      ;;
358972313efbSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
359072313efbSmrg      # This hack is so that the source file can tell whether it is being
359172313efbSmrg      # built for inclusion in a dll (and should export symbols for example).
359272313efbSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
359372313efbSmrg      # (--disable-auto-import) libraries
359472313efbSmrg      m4_if([$1], [GCJ], [],
359572313efbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
359672313efbSmrg      ;;
359772313efbSmrg    darwin* | rhapsody*)
359872313efbSmrg      # PIC is the default on this platform
359972313efbSmrg      # Common symbols not allowed in MH_DYLIB files
360072313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
360172313efbSmrg      ;;
360272313efbSmrg    *djgpp*)
360372313efbSmrg      # DJGPP does not support shared libraries at all
360472313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
360572313efbSmrg      ;;
360672313efbSmrg    interix[[3-9]]*)
360772313efbSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
360872313efbSmrg      # Instead, we relocate shared libraries at runtime.
360972313efbSmrg      ;;
361072313efbSmrg    sysv4*MP*)
361172313efbSmrg      if test -d /usr/nec; then
361272313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
361372313efbSmrg      fi
361472313efbSmrg      ;;
361572313efbSmrg    hpux*)
361672313efbSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
361772313efbSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
361872313efbSmrg      # sets the default TLS model and affects inlining.
361972313efbSmrg      case $host_cpu in
362072313efbSmrg      hppa*64*)
362172313efbSmrg	;;
362272313efbSmrg      *)
362372313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
362472313efbSmrg	;;
362572313efbSmrg      esac
362672313efbSmrg      ;;
362772313efbSmrg    *qnx* | *nto*)
362872313efbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
362972313efbSmrg      # it will coredump.
363072313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3631bdcaa8d0Smrg      ;;
3632bdcaa8d0Smrg    *)
363372313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3634bdcaa8d0Smrg      ;;
3635bdcaa8d0Smrg    esac
363672313efbSmrg  else
363772313efbSmrg    case $host_os in
363872313efbSmrg      aix[[4-9]]*)
363972313efbSmrg	# All AIX code is PIC.
364072313efbSmrg	if test "$host_cpu" = ia64; then
364172313efbSmrg	  # AIX 5 now supports IA64 processor
364272313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
364372313efbSmrg	else
364472313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
364572313efbSmrg	fi
364672313efbSmrg	;;
364772313efbSmrg      chorus*)
364872313efbSmrg	case $cc_basename in
364972313efbSmrg	cxch68*)
365072313efbSmrg	  # Green Hills C++ Compiler
365172313efbSmrg	  # _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"
365272313efbSmrg	  ;;
365372313efbSmrg	esac
365472313efbSmrg	;;
365572313efbSmrg      dgux*)
365672313efbSmrg	case $cc_basename in
365772313efbSmrg	  ec++*)
365872313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
365972313efbSmrg	    ;;
366072313efbSmrg	  ghcx*)
366172313efbSmrg	    # Green Hills C++ Compiler
366272313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
366372313efbSmrg	    ;;
366472313efbSmrg	  *)
366572313efbSmrg	    ;;
366672313efbSmrg	esac
366772313efbSmrg	;;
366872313efbSmrg      freebsd* | dragonfly*)
366972313efbSmrg	# FreeBSD uses GNU C++
367072313efbSmrg	;;
367172313efbSmrg      hpux9* | hpux10* | hpux11*)
367272313efbSmrg	case $cc_basename in
367372313efbSmrg	  CC*)
367472313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
367572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
367672313efbSmrg	    if test "$host_cpu" != ia64; then
367772313efbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
367872313efbSmrg	    fi
367972313efbSmrg	    ;;
368072313efbSmrg	  aCC*)
368172313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
368272313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
368372313efbSmrg	    case $host_cpu in
368472313efbSmrg	    hppa*64*|ia64*)
368572313efbSmrg	      # +Z the default
368672313efbSmrg	      ;;
368772313efbSmrg	    *)
368872313efbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
368972313efbSmrg	      ;;
369072313efbSmrg	    esac
369172313efbSmrg	    ;;
369272313efbSmrg	  *)
369372313efbSmrg	    ;;
369472313efbSmrg	esac
369572313efbSmrg	;;
369672313efbSmrg      interix*)
369772313efbSmrg	# This is c89, which is MS Visual C++ (no shared libs)
369872313efbSmrg	# Anyone wants to do a port?
369972313efbSmrg	;;
370072313efbSmrg      irix5* | irix6* | nonstopux*)
370172313efbSmrg	case $cc_basename in
370272313efbSmrg	  CC*)
370372313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
370472313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
370572313efbSmrg	    # CC pic flag -KPIC is the default.
370672313efbSmrg	    ;;
370772313efbSmrg	  *)
370872313efbSmrg	    ;;
370972313efbSmrg	esac
371072313efbSmrg	;;
371172313efbSmrg      linux* | k*bsd*-gnu)
371272313efbSmrg	case $cc_basename in
371372313efbSmrg	  KCC*)
371472313efbSmrg	    # KAI C++ Compiler
371572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
371672313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
371772313efbSmrg	    ;;
371872313efbSmrg	  ecpc* )
371972313efbSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
372072313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
372172313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
372272313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
372372313efbSmrg	    ;;
372472313efbSmrg	  icpc* )
372572313efbSmrg	    # Intel C++, used to be incompatible with GCC.
372672313efbSmrg	    # ICC 10 doesn't accept -KPIC any more.
372772313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
372872313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
372972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
373072313efbSmrg	    ;;
373172313efbSmrg	  pgCC* | pgcpp*)
373272313efbSmrg	    # Portland Group C++ compiler
373372313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
373472313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
373572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
373672313efbSmrg	    ;;
373772313efbSmrg	  cxx*)
373872313efbSmrg	    # Compaq C++
373972313efbSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
374072313efbSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
374172313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
374272313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
374372313efbSmrg	    ;;
374472313efbSmrg	  xlc* | xlC*)
374572313efbSmrg	    # IBM XL 8.0 on PPC
374672313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
374772313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
374872313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
374972313efbSmrg	    ;;
375072313efbSmrg	  *)
375172313efbSmrg	    case `$CC -V 2>&1 | sed 5q` in
375272313efbSmrg	    *Sun\ C*)
375372313efbSmrg	      # Sun C++ 5.9
375472313efbSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
375572313efbSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
375672313efbSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
375772313efbSmrg	      ;;
375872313efbSmrg	    esac
375972313efbSmrg	    ;;
376072313efbSmrg	esac
376172313efbSmrg	;;
376272313efbSmrg      lynxos*)
376372313efbSmrg	;;
376472313efbSmrg      m88k*)
376572313efbSmrg	;;
376672313efbSmrg      mvs*)
376772313efbSmrg	case $cc_basename in
376872313efbSmrg	  cxx*)
376972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
377072313efbSmrg	    ;;
377172313efbSmrg	  *)
377272313efbSmrg	    ;;
377372313efbSmrg	esac
377472313efbSmrg	;;
377572313efbSmrg      netbsd*)
377672313efbSmrg	;;
377772313efbSmrg      *qnx* | *nto*)
377872313efbSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
377972313efbSmrg        # it will coredump.
378072313efbSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
378172313efbSmrg        ;;
378272313efbSmrg      osf3* | osf4* | osf5*)
378372313efbSmrg	case $cc_basename in
378472313efbSmrg	  KCC*)
378572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
378672313efbSmrg	    ;;
378772313efbSmrg	  RCC*)
378872313efbSmrg	    # Rational C++ 2.4.1
378972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
379072313efbSmrg	    ;;
379172313efbSmrg	  cxx*)
379272313efbSmrg	    # Digital/Compaq C++
379372313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
379472313efbSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
379572313efbSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
379672313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
379772313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
379872313efbSmrg	    ;;
379972313efbSmrg	  *)
380072313efbSmrg	    ;;
380172313efbSmrg	esac
380272313efbSmrg	;;
380372313efbSmrg      psos*)
380472313efbSmrg	;;
380572313efbSmrg      solaris*)
380672313efbSmrg	case $cc_basename in
380772313efbSmrg	  CC*)
380872313efbSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
380972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
381072313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
381172313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
381272313efbSmrg	    ;;
381372313efbSmrg	  gcx*)
381472313efbSmrg	    # Green Hills C++ Compiler
381572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
381672313efbSmrg	    ;;
381772313efbSmrg	  *)
381872313efbSmrg	    ;;
381972313efbSmrg	esac
382072313efbSmrg	;;
382172313efbSmrg      sunos4*)
382272313efbSmrg	case $cc_basename in
382372313efbSmrg	  CC*)
382472313efbSmrg	    # Sun C++ 4.x
382572313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
382672313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
382772313efbSmrg	    ;;
382872313efbSmrg	  lcc*)
382972313efbSmrg	    # Lucid
383072313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
383172313efbSmrg	    ;;
383272313efbSmrg	  *)
383372313efbSmrg	    ;;
383472313efbSmrg	esac
383572313efbSmrg	;;
383672313efbSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
383772313efbSmrg	case $cc_basename in
383872313efbSmrg	  CC*)
383972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
384072313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
384172313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
384272313efbSmrg	    ;;
384372313efbSmrg	esac
384472313efbSmrg	;;
384572313efbSmrg      tandem*)
384672313efbSmrg	case $cc_basename in
384772313efbSmrg	  NCC*)
384872313efbSmrg	    # NonStop-UX NCC 3.20
384972313efbSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
385072313efbSmrg	    ;;
385172313efbSmrg	  *)
385272313efbSmrg	    ;;
385372313efbSmrg	esac
385472313efbSmrg	;;
385572313efbSmrg      vxworks*)
385672313efbSmrg	;;
385772313efbSmrg      *)
385872313efbSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
385972313efbSmrg	;;
386072313efbSmrg    esac
386172313efbSmrg  fi
386272313efbSmrg],
386372313efbSmrg[
386472313efbSmrg  if test "$GCC" = yes; then
386572313efbSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
386672313efbSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3867bdcaa8d0Smrg
386872313efbSmrg    case $host_os in
386972313efbSmrg      aix*)
387072313efbSmrg      # All AIX code is PIC.
387172313efbSmrg      if test "$host_cpu" = ia64; then
387272313efbSmrg	# AIX 5 now supports IA64 processor
387372313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
387472313efbSmrg      fi
387572313efbSmrg      ;;
3876bdcaa8d0Smrg
387772313efbSmrg    amigaos*)
387872313efbSmrg      case $host_cpu in
387972313efbSmrg      powerpc)
388072313efbSmrg            # see comment about AmigaOS4 .so support
388172313efbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
388272313efbSmrg        ;;
388372313efbSmrg      m68k)
388472313efbSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
388572313efbSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
388672313efbSmrg            # like `-m68040'.
388772313efbSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
388872313efbSmrg        ;;
388972313efbSmrg      esac
389072313efbSmrg      ;;
3891bdcaa8d0Smrg
389272313efbSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
389372313efbSmrg      # PIC is the default for these OSes.
389472313efbSmrg      ;;
3895bdcaa8d0Smrg
389672313efbSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
389772313efbSmrg      # This hack is so that the source file can tell whether it is being
389872313efbSmrg      # built for inclusion in a dll (and should export symbols for example).
389972313efbSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
390072313efbSmrg      # (--disable-auto-import) libraries
390172313efbSmrg      m4_if([$1], [GCJ], [],
390272313efbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
390372313efbSmrg      ;;
3904bdcaa8d0Smrg
390572313efbSmrg    darwin* | rhapsody*)
390672313efbSmrg      # PIC is the default on this platform
390772313efbSmrg      # Common symbols not allowed in MH_DYLIB files
390872313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
390972313efbSmrg      ;;
3910bdcaa8d0Smrg
391172313efbSmrg    hpux*)
391272313efbSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
391372313efbSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
391472313efbSmrg      # sets the default TLS model and affects inlining.
391572313efbSmrg      case $host_cpu in
391672313efbSmrg      hppa*64*)
391772313efbSmrg	# +Z the default
391872313efbSmrg	;;
391972313efbSmrg      *)
392072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
392172313efbSmrg	;;
392272313efbSmrg      esac
392372313efbSmrg      ;;
3924bdcaa8d0Smrg
392572313efbSmrg    interix[[3-9]]*)
392672313efbSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
392772313efbSmrg      # Instead, we relocate shared libraries at runtime.
392872313efbSmrg      ;;
3929bdcaa8d0Smrg
393072313efbSmrg    msdosdjgpp*)
393172313efbSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
393272313efbSmrg      # on systems that don't support them.
393372313efbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
393472313efbSmrg      enable_shared=no
393572313efbSmrg      ;;
3936bdcaa8d0Smrg
393772313efbSmrg    *nto* | *qnx*)
393872313efbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
393972313efbSmrg      # it will coredump.
394072313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
394172313efbSmrg      ;;
3942bdcaa8d0Smrg
394372313efbSmrg    sysv4*MP*)
394472313efbSmrg      if test -d /usr/nec; then
394572313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
394672313efbSmrg      fi
394772313efbSmrg      ;;
3948bdcaa8d0Smrg
394972313efbSmrg    *)
395072313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
395172313efbSmrg      ;;
395272313efbSmrg    esac
395372313efbSmrg  else
395472313efbSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
395572313efbSmrg    case $host_os in
395672313efbSmrg    aix*)
395772313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
395872313efbSmrg      if test "$host_cpu" = ia64; then
395972313efbSmrg	# AIX 5 now supports IA64 processor
396072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
396172313efbSmrg      else
396272313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
396372313efbSmrg      fi
396472313efbSmrg      ;;
3965bdcaa8d0Smrg
396672313efbSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
396772313efbSmrg      # This hack is so that the source file can tell whether it is being
396872313efbSmrg      # built for inclusion in a dll (and should export symbols for example).
396972313efbSmrg      m4_if([$1], [GCJ], [],
397072313efbSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
397172313efbSmrg      ;;
3972bdcaa8d0Smrg
397372313efbSmrg    hpux9* | hpux10* | hpux11*)
397472313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
397572313efbSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
397672313efbSmrg      # not for PA HP-UX.
397772313efbSmrg      case $host_cpu in
397872313efbSmrg      hppa*64*|ia64*)
397972313efbSmrg	# +Z the default
398072313efbSmrg	;;
398172313efbSmrg      *)
398272313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
398372313efbSmrg	;;
398472313efbSmrg      esac
398572313efbSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
398672313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
398772313efbSmrg      ;;
3988bdcaa8d0Smrg
398972313efbSmrg    irix5* | irix6* | nonstopux*)
399072313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
399172313efbSmrg      # PIC (with -KPIC) is the default.
399272313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
399372313efbSmrg      ;;
3994bdcaa8d0Smrg
399572313efbSmrg    linux* | k*bsd*-gnu)
399672313efbSmrg      case $cc_basename in
399772313efbSmrg      # old Intel for x86_64 which still supported -KPIC.
399872313efbSmrg      ecc*)
399972313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
400072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
400172313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
400272313efbSmrg        ;;
400372313efbSmrg      # icc used to be incompatible with GCC.
400472313efbSmrg      # ICC 10 doesn't accept -KPIC any more.
400572313efbSmrg      icc* | ifort*)
400672313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
400772313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
400872313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
400972313efbSmrg        ;;
401072313efbSmrg      # Lahey Fortran 8.1.
401172313efbSmrg      lf95*)
401272313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
401372313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
401472313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
401572313efbSmrg	;;
401672313efbSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
401772313efbSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
401872313efbSmrg	# which looks to be a dead project)
401972313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
402172313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
402272313efbSmrg        ;;
402372313efbSmrg      ccc*)
402472313efbSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
402572313efbSmrg        # All Alpha code is PIC.
402672313efbSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
402772313efbSmrg        ;;
402872313efbSmrg      xl*)
402972313efbSmrg	# IBM XL C 8.0/Fortran 10.1 on PPC
403072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
403172313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
403272313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
403372313efbSmrg	;;
403472313efbSmrg      *)
403572313efbSmrg	case `$CC -V 2>&1 | sed 5q` in
403672313efbSmrg	*Sun\ C*)
403772313efbSmrg	  # Sun C 5.9
403872313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
403972313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404072313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
404172313efbSmrg	  ;;
404272313efbSmrg	*Sun\ F*)
404372313efbSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
404472313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
404572313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
404672313efbSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
404772313efbSmrg	  ;;
404872313efbSmrg	esac
404972313efbSmrg	;;
405072313efbSmrg      esac
405172313efbSmrg      ;;
4052bdcaa8d0Smrg
405372313efbSmrg    newsos6)
405472313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
405572313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
405672313efbSmrg      ;;
4057bdcaa8d0Smrg
405872313efbSmrg    *nto* | *qnx*)
405972313efbSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
406072313efbSmrg      # it will coredump.
406172313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
406272313efbSmrg      ;;
4063bdcaa8d0Smrg
406472313efbSmrg    osf3* | osf4* | osf5*)
406572313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
406672313efbSmrg      # All OSF/1 code is PIC.
406772313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
406872313efbSmrg      ;;
4069bdcaa8d0Smrg
407072313efbSmrg    rdos*)
407172313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
407272313efbSmrg      ;;
4073bdcaa8d0Smrg
407472313efbSmrg    solaris*)
407572313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
407672313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
407772313efbSmrg      case $cc_basename in
407872313efbSmrg      f77* | f90* | f95*)
407972313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
408072313efbSmrg      *)
408172313efbSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
408272313efbSmrg      esac
408372313efbSmrg      ;;
4084bdcaa8d0Smrg
408572313efbSmrg    sunos4*)
408672313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
408772313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
408872313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
408972313efbSmrg      ;;
4090bdcaa8d0Smrg
409172313efbSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
409272313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
409372313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
409472313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
409572313efbSmrg      ;;
4096bdcaa8d0Smrg
409772313efbSmrg    sysv4*MP*)
409872313efbSmrg      if test -d /usr/nec ;then
409972313efbSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
410072313efbSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
410172313efbSmrg      fi
410272313efbSmrg      ;;
4103bdcaa8d0Smrg
410472313efbSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
410572313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
410672313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
410772313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
410872313efbSmrg      ;;
4109bdcaa8d0Smrg
411072313efbSmrg    unicos*)
411172313efbSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
411272313efbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
411372313efbSmrg      ;;
4114bdcaa8d0Smrg
411572313efbSmrg    uts4*)
411672313efbSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
411772313efbSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
411872313efbSmrg      ;;
4119bdcaa8d0Smrg
412072313efbSmrg    *)
412172313efbSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
412272313efbSmrg      ;;
412372313efbSmrg    esac
412472313efbSmrg  fi
412572313efbSmrg])
412672313efbSmrgcase $host_os in
412772313efbSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
412872313efbSmrg  *djgpp*)
412972313efbSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
413072313efbSmrg    ;;
413172313efbSmrg  *)
413272313efbSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
413372313efbSmrg    ;;
413472313efbSmrgesac
413572313efbSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
413672313efbSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
413772313efbSmrg	[How to pass a linker flag through the compiler])
4138bdcaa8d0Smrg
413972313efbSmrg#
414072313efbSmrg# Check to make sure the PIC flag actually works.
414172313efbSmrg#
414272313efbSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
414372313efbSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
414472313efbSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
414572313efbSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
414672313efbSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
414772313efbSmrg     "" | " "*) ;;
414872313efbSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
414972313efbSmrg     esac],
415072313efbSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
415172313efbSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
415272313efbSmrgfi
415372313efbSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
415472313efbSmrg	[Additional compiler flags for building library objects])
4155bdcaa8d0Smrg
415672313efbSmrg#
415772313efbSmrg# Check to make sure the static flag actually works.
415872313efbSmrg#
415972313efbSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
416072313efbSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
416172313efbSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
416272313efbSmrg  $lt_tmp_static_flag,
416372313efbSmrg  [],
416472313efbSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
416572313efbSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
416672313efbSmrg	[Compiler flag to prevent dynamic linking])
416772313efbSmrg])# _LT_COMPILER_PIC
4168bdcaa8d0Smrg
4169bdcaa8d0Smrg
417072313efbSmrg# _LT_LINKER_SHLIBS([TAGNAME])
417172313efbSmrg# ----------------------------
417272313efbSmrg# See if the linker supports building shared libraries.
417372313efbSmrgm4_defun([_LT_LINKER_SHLIBS],
417472313efbSmrg[AC_REQUIRE([LT_PATH_LD])dnl
417572313efbSmrgAC_REQUIRE([LT_PATH_NM])dnl
417672313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
417772313efbSmrgm4_require([_LT_DECL_EGREP])dnl
417872313efbSmrgm4_require([_LT_DECL_SED])dnl
417972313efbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
418072313efbSmrgm4_require([_LT_TAG_COMPILER])dnl
418172313efbSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
418272313efbSmrgm4_if([$1], [CXX], [
418372313efbSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
418472313efbSmrg  case $host_os in
418572313efbSmrg  aix[[4-9]]*)
418672313efbSmrg    # If we're using GNU nm, then we don't want the "-C" option.
418772313efbSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
418872313efbSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
418972313efbSmrg      _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'
419072313efbSmrg    else
419172313efbSmrg      _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'
419272313efbSmrg    fi
419372313efbSmrg    ;;
419472313efbSmrg  pw32*)
419572313efbSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
419672313efbSmrg  ;;
419772313efbSmrg  cygwin* | mingw* | cegcc*)
419872313efbSmrg    _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'
419972313efbSmrg  ;;
420072313efbSmrg  *)
420172313efbSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
420272313efbSmrg  ;;
420372313efbSmrg  esac
420472313efbSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
420572313efbSmrg], [
420672313efbSmrg  runpath_var=
420772313efbSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
420872313efbSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
420972313efbSmrg  _LT_TAGVAR(archive_cmds, $1)=
421072313efbSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
421172313efbSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
421272313efbSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
421372313efbSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
421472313efbSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
421572313efbSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
421672313efbSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
421772313efbSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
421872313efbSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
421972313efbSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
422072313efbSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
422172313efbSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
422272313efbSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
422372313efbSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
422472313efbSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
422572313efbSmrg  _LT_TAGVAR(module_cmds, $1)=
422672313efbSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
422772313efbSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
422872313efbSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
422972313efbSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
423072313efbSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
423172313efbSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
423272313efbSmrg  # included in the symbol list
423372313efbSmrg  _LT_TAGVAR(include_expsyms, $1)=
423472313efbSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
423572313efbSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
423672313efbSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
423772313efbSmrg  # as well as any symbol that contains `d'.
423872313efbSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
423972313efbSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
424072313efbSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
424172313efbSmrg  # the symbol is explicitly referenced.  Since portable code cannot
424272313efbSmrg  # rely on this symbol name, it's probably fine to never include it in
424372313efbSmrg  # preloaded symbol tables.
424472313efbSmrg  # Exclude shared library initialization/finalization symbols.
424572313efbSmrgdnl Note also adjust exclude_expsyms for C++ above.
424672313efbSmrg  extract_expsyms_cmds=
4247bdcaa8d0Smrg
424872313efbSmrg  case $host_os in
424972313efbSmrg  cygwin* | mingw* | pw32* | cegcc*)
425072313efbSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
425172313efbSmrg    # When not using gcc, we currently assume that we are using
425272313efbSmrg    # Microsoft Visual C++.
425372313efbSmrg    if test "$GCC" != yes; then
425472313efbSmrg      with_gnu_ld=no
425572313efbSmrg    fi
425672313efbSmrg    ;;
425772313efbSmrg  interix*)
425872313efbSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
425972313efbSmrg    with_gnu_ld=yes
426072313efbSmrg    ;;
426172313efbSmrg  openbsd*)
426272313efbSmrg    with_gnu_ld=no
426372313efbSmrg    ;;
426472313efbSmrg  esac
4265bdcaa8d0Smrg
426672313efbSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
426772313efbSmrg  if test "$with_gnu_ld" = yes; then
426872313efbSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
426972313efbSmrg    wlarc='${wl}'
4270bdcaa8d0Smrg
427172313efbSmrg    # Set some defaults for GNU ld with shared library support. These
427272313efbSmrg    # are reset later if shared libraries are not supported. Putting them
427372313efbSmrg    # here allows them to be overridden if necessary.
427472313efbSmrg    runpath_var=LD_RUN_PATH
427572313efbSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
427672313efbSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
427772313efbSmrg    # ancient GNU ld didn't support --whole-archive et. al.
427872313efbSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
427972313efbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
428072313efbSmrg    else
428172313efbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
428272313efbSmrg    fi
428372313efbSmrg    supports_anon_versioning=no
428472313efbSmrg    case `$LD -v 2>&1` in
428572313efbSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
428672313efbSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
428772313efbSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
428872313efbSmrg      *\ 2.11.*) ;; # other 2.11 versions
428972313efbSmrg      *) supports_anon_versioning=yes ;;
429072313efbSmrg    esac
4291bdcaa8d0Smrg
429272313efbSmrg    # See if GNU ld supports shared libraries.
429372313efbSmrg    case $host_os in
429472313efbSmrg    aix[[3-9]]*)
429572313efbSmrg      # On AIX/PPC, the GNU linker is very broken
429672313efbSmrg      if test "$host_cpu" != ia64; then
429772313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
429872313efbSmrg	cat <<_LT_EOF 1>&2
4299bdcaa8d0Smrg
430072313efbSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
430172313efbSmrg*** to be unable to reliably create shared libraries on AIX.
430272313efbSmrg*** Therefore, libtool is disabling shared libraries support.  If you
430372313efbSmrg*** really care for shared libraries, you may want to modify your PATH
430472313efbSmrg*** so that a non-GNU linker is found, and then restart.
4305bdcaa8d0Smrg
430672313efbSmrg_LT_EOF
430772313efbSmrg      fi
430872313efbSmrg      ;;
4309bdcaa8d0Smrg
431072313efbSmrg    amigaos*)
431172313efbSmrg      case $host_cpu in
431272313efbSmrg      powerpc)
431372313efbSmrg            # see comment about AmigaOS4 .so support
431472313efbSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
431572313efbSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
431672313efbSmrg        ;;
431772313efbSmrg      m68k)
431872313efbSmrg            _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)'
431972313efbSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
432072313efbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
432172313efbSmrg        ;;
432272313efbSmrg      esac
432372313efbSmrg      ;;
4324bdcaa8d0Smrg
432572313efbSmrg    beos*)
432672313efbSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
432772313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
432872313efbSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
432972313efbSmrg	# support --undefined.  This deserves some investigation.  FIXME
433072313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
433172313efbSmrg      else
433272313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
433372313efbSmrg      fi
433472313efbSmrg      ;;
4335bdcaa8d0Smrg
433672313efbSmrg    cygwin* | mingw* | pw32* | cegcc*)
433772313efbSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
433872313efbSmrg      # as there is no search path for DLLs.
433972313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
434072313efbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
434172313efbSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
434272313efbSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
434372313efbSmrg      _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'
434472313efbSmrg
434572313efbSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
434672313efbSmrg        _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'
434772313efbSmrg	# If the export-symbols file already is a .def file (1st line
434872313efbSmrg	# is EXPORTS), use it as is; otherwise, prepend...
434972313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
435072313efbSmrg	  cp $export_symbols $output_objdir/$soname.def;
435172313efbSmrg	else
435272313efbSmrg	  echo EXPORTS > $output_objdir/$soname.def;
435372313efbSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
435472313efbSmrg	fi~
435572313efbSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
435672313efbSmrg      else
435772313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
435872313efbSmrg      fi
435972313efbSmrg      ;;
4360bdcaa8d0Smrg
436172313efbSmrg    interix[[3-9]]*)
436272313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
436372313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
436472313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
436572313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
436672313efbSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
436772313efbSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
436872313efbSmrg      # default) and relocated if they conflict, which is a slow very memory
436972313efbSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
437072313efbSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
437172313efbSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
437272313efbSmrg      _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'
437372313efbSmrg      _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'
437472313efbSmrg      ;;
4375bdcaa8d0Smrg
437672313efbSmrg    gnu* | linux* | tpf* | k*bsd*-gnu)
437772313efbSmrg      tmp_diet=no
437872313efbSmrg      if test "$host_os" = linux-dietlibc; then
437972313efbSmrg	case $cc_basename in
438072313efbSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
438172313efbSmrg	esac
438272313efbSmrg      fi
438372313efbSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
438472313efbSmrg	 && test "$tmp_diet" = no
438572313efbSmrg      then
438672313efbSmrg	tmp_addflag=
438772313efbSmrg	tmp_sharedflag='-shared'
438872313efbSmrg	case $cc_basename,$host_cpu in
438972313efbSmrg        pgcc*)				# Portland Group C compiler
439072313efbSmrg	  _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'
439172313efbSmrg	  tmp_addflag=' $pic_flag'
439272313efbSmrg	  ;;
439372313efbSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
439472313efbSmrg	  _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'
439572313efbSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
439672313efbSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
439772313efbSmrg	  tmp_addflag=' -i_dynamic' ;;
439872313efbSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
439972313efbSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
440072313efbSmrg	ifc* | ifort*)			# Intel Fortran compiler
440172313efbSmrg	  tmp_addflag=' -nofor_main' ;;
440272313efbSmrg	lf95*)				# Lahey Fortran 8.1
440372313efbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
440472313efbSmrg	  tmp_sharedflag='--shared' ;;
440572313efbSmrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
440672313efbSmrg	  tmp_sharedflag='-qmkshrobj'
440772313efbSmrg	  tmp_addflag= ;;
440872313efbSmrg	esac
440972313efbSmrg	case `$CC -V 2>&1 | sed 5q` in
441072313efbSmrg	*Sun\ C*)			# Sun C 5.9
441172313efbSmrg	  _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'
441272313efbSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
441372313efbSmrg	  tmp_sharedflag='-G' ;;
441472313efbSmrg	*Sun\ F*)			# Sun Fortran 8.3
441572313efbSmrg	  tmp_sharedflag='-G' ;;
441672313efbSmrg	esac
441772313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4418bdcaa8d0Smrg
441972313efbSmrg        if test "x$supports_anon_versioning" = xyes; then
442072313efbSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
442172313efbSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
442272313efbSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
442372313efbSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
442472313efbSmrg        fi
4425bdcaa8d0Smrg
442672313efbSmrg	case $cc_basename in
442772313efbSmrg	xlf*)
442872313efbSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
442972313efbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
443072313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
443172313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
443272313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
443372313efbSmrg	  if test "x$supports_anon_versioning" = xyes; then
443472313efbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
443572313efbSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
443672313efbSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
443772313efbSmrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
443872313efbSmrg	  fi
443972313efbSmrg	  ;;
444072313efbSmrg	esac
444172313efbSmrg      else
444272313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
444372313efbSmrg      fi
444472313efbSmrg      ;;
4445bdcaa8d0Smrg
444672313efbSmrg    netbsd*)
444772313efbSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
444872313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
444972313efbSmrg	wlarc=
445072313efbSmrg      else
445172313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
445272313efbSmrg	_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'
445372313efbSmrg      fi
445472313efbSmrg      ;;
4455bdcaa8d0Smrg
445672313efbSmrg    solaris*)
445772313efbSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
445872313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
445972313efbSmrg	cat <<_LT_EOF 1>&2
4460bdcaa8d0Smrg
446172313efbSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
446272313efbSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
446372313efbSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
446472313efbSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
446572313efbSmrg*** your PATH or compiler configuration so that the native linker is
446672313efbSmrg*** used, and then restart.
4467bdcaa8d0Smrg
446872313efbSmrg_LT_EOF
446972313efbSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
447072313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
447172313efbSmrg	_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'
447272313efbSmrg      else
447372313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
447472313efbSmrg      fi
447572313efbSmrg      ;;
4476bdcaa8d0Smrg
447772313efbSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
447872313efbSmrg      case `$LD -v 2>&1` in
447972313efbSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
448072313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
448172313efbSmrg	cat <<_LT_EOF 1>&2
4482bdcaa8d0Smrg
448372313efbSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
448472313efbSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
448572313efbSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
448672313efbSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
448772313efbSmrg*** your PATH or compiler configuration so that the native linker is
448872313efbSmrg*** used, and then restart.
4489bdcaa8d0Smrg
449072313efbSmrg_LT_EOF
449172313efbSmrg	;;
449272313efbSmrg	*)
449372313efbSmrg	  # For security reasons, it is highly recommended that you always
449472313efbSmrg	  # use absolute paths for naming shared libraries, and exclude the
449572313efbSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
449672313efbSmrg	  # requires that you compile everything twice, which is a pain.
449772313efbSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
449872313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
449972313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
450072313efbSmrg	    _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'
450172313efbSmrg	  else
450272313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
450372313efbSmrg	  fi
450472313efbSmrg	;;
450572313efbSmrg      esac
450672313efbSmrg      ;;
4507bdcaa8d0Smrg
450872313efbSmrg    sunos4*)
450972313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
451072313efbSmrg      wlarc=
451172313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
451272313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
451372313efbSmrg      ;;
4514bdcaa8d0Smrg
451572313efbSmrg    *)
451672313efbSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
451772313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
451872313efbSmrg	_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'
451972313efbSmrg      else
452072313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
452172313efbSmrg      fi
452272313efbSmrg      ;;
452372313efbSmrg    esac
4524bdcaa8d0Smrg
452572313efbSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
452672313efbSmrg      runpath_var=
452772313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
452872313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
452972313efbSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
453072313efbSmrg    fi
453172313efbSmrg  else
453272313efbSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
453372313efbSmrg    case $host_os in
453472313efbSmrg    aix3*)
453572313efbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
453672313efbSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
453772313efbSmrg      _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'
453872313efbSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
453972313efbSmrg      # are no directories specified by -L.
454072313efbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
454172313efbSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
454272313efbSmrg	# Neither direct hardcoding nor static linking is supported with a
454372313efbSmrg	# broken collect2.
454472313efbSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
454572313efbSmrg      fi
454672313efbSmrg      ;;
4547bdcaa8d0Smrg
454872313efbSmrg    aix[[4-9]]*)
454972313efbSmrg      if test "$host_cpu" = ia64; then
455072313efbSmrg	# On IA64, the linker does run time linking by default, so we don't
455172313efbSmrg	# have to do anything special.
455272313efbSmrg	aix_use_runtimelinking=no
455372313efbSmrg	exp_sym_flag='-Bexport'
455472313efbSmrg	no_entry_flag=""
455572313efbSmrg      else
455672313efbSmrg	# If we're using GNU nm, then we don't want the "-C" option.
455772313efbSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
455872313efbSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
455972313efbSmrg	  _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'
456072313efbSmrg	else
456172313efbSmrg	  _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'
456272313efbSmrg	fi
456372313efbSmrg	aix_use_runtimelinking=no
4564bdcaa8d0Smrg
456572313efbSmrg	# Test if we are trying to use run time linking or normal
456672313efbSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
456772313efbSmrg	# need to do runtime linking.
456872313efbSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
456972313efbSmrg	  for ld_flag in $LDFLAGS; do
457072313efbSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
457172313efbSmrg	    aix_use_runtimelinking=yes
457272313efbSmrg	    break
457372313efbSmrg	  fi
457472313efbSmrg	  done
457572313efbSmrg	  ;;
457672313efbSmrg	esac
4577bdcaa8d0Smrg
457872313efbSmrg	exp_sym_flag='-bexport'
457972313efbSmrg	no_entry_flag='-bnoentry'
458072313efbSmrg      fi
4581bdcaa8d0Smrg
458272313efbSmrg      # When large executables or shared objects are built, AIX ld can
458372313efbSmrg      # have problems creating the table of contents.  If linking a library
458472313efbSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
458572313efbSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
458672313efbSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4587bdcaa8d0Smrg
458872313efbSmrg      _LT_TAGVAR(archive_cmds, $1)=''
458972313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
459072313efbSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
459172313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
459272313efbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
459372313efbSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4594bdcaa8d0Smrg
459572313efbSmrg      if test "$GCC" = yes; then
459672313efbSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
459772313efbSmrg	# We only want to do this on AIX 4.2 and lower, the check
459872313efbSmrg	# below for broken collect2 doesn't work under 4.3+
459972313efbSmrg	  collect2name=`${CC} -print-prog-name=collect2`
460072313efbSmrg	  if test -f "$collect2name" &&
460172313efbSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
460272313efbSmrg	  then
460372313efbSmrg	  # We have reworked collect2
460472313efbSmrg	  :
460572313efbSmrg	  else
460672313efbSmrg	  # We have old collect2
460772313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
460872313efbSmrg	  # It fails to find uninstalled libraries when the uninstalled
460972313efbSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
461072313efbSmrg	  # to unsupported forces relinking
461172313efbSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
461272313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
461372313efbSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
461472313efbSmrg	  fi
461572313efbSmrg	  ;;
461672313efbSmrg	esac
461772313efbSmrg	shared_flag='-shared'
461872313efbSmrg	if test "$aix_use_runtimelinking" = yes; then
461972313efbSmrg	  shared_flag="$shared_flag "'${wl}-G'
462072313efbSmrg	fi
462172313efbSmrg      else
462272313efbSmrg	# not using gcc
462372313efbSmrg	if test "$host_cpu" = ia64; then
462472313efbSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
462572313efbSmrg	# chokes on -Wl,-G. The following line is correct:
462672313efbSmrg	  shared_flag='-G'
462772313efbSmrg	else
462872313efbSmrg	  if test "$aix_use_runtimelinking" = yes; then
462972313efbSmrg	    shared_flag='${wl}-G'
463072313efbSmrg	  else
463172313efbSmrg	    shared_flag='${wl}-bM:SRE'
463272313efbSmrg	  fi
463372313efbSmrg	fi
463472313efbSmrg      fi
4635bdcaa8d0Smrg
463672313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
463772313efbSmrg      # It seems that -bexpall does not export symbols beginning with
463872313efbSmrg      # underscore (_), so it is better to generate a list of symbols to export.
463972313efbSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
464072313efbSmrg      if test "$aix_use_runtimelinking" = yes; then
464172313efbSmrg	# Warning - without using the other runtime loading flags (-brtl),
464272313efbSmrg	# -berok will link without error, but may produce a broken library.
464372313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
464472313efbSmrg        # Determine the default libpath from the value encoded in an
464572313efbSmrg        # empty executable.
464672313efbSmrg        _LT_SYS_MODULE_PATH_AIX
464772313efbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
464872313efbSmrg        _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"
464972313efbSmrg      else
465072313efbSmrg	if test "$host_cpu" = ia64; then
465172313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
465272313efbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
465372313efbSmrg	  _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"
465472313efbSmrg	else
465572313efbSmrg	 # Determine the default libpath from the value encoded in an
465672313efbSmrg	 # empty executable.
465772313efbSmrg	 _LT_SYS_MODULE_PATH_AIX
465872313efbSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
465972313efbSmrg	  # Warning - without using the other run time loading flags,
466072313efbSmrg	  # -berok will link without error, but may produce a broken library.
466172313efbSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
466272313efbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
466372313efbSmrg	  # Exported symbols can be pulled into shared objects from archives
466472313efbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
466572313efbSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
466672313efbSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
466772313efbSmrg	  _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'
466872313efbSmrg	fi
466972313efbSmrg      fi
467072313efbSmrg      ;;
4671bdcaa8d0Smrg
467272313efbSmrg    amigaos*)
467372313efbSmrg      case $host_cpu in
467472313efbSmrg      powerpc)
467572313efbSmrg            # see comment about AmigaOS4 .so support
467672313efbSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
467772313efbSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
467872313efbSmrg        ;;
467972313efbSmrg      m68k)
468072313efbSmrg            _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)'
468172313efbSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
468272313efbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
468372313efbSmrg        ;;
468472313efbSmrg      esac
468572313efbSmrg      ;;
4686bdcaa8d0Smrg
468772313efbSmrg    bsdi[[45]]*)
468872313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
468972313efbSmrg      ;;
4690bdcaa8d0Smrg
469172313efbSmrg    cygwin* | mingw* | pw32* | cegcc*)
469272313efbSmrg      # When not using gcc, we currently assume that we are using
469372313efbSmrg      # Microsoft Visual C++.
469472313efbSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
469572313efbSmrg      # no search path for DLLs.
469672313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
469772313efbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
469872313efbSmrg      # Tell ltmain to make .lib files, not .a files.
469972313efbSmrg      libext=lib
470072313efbSmrg      # Tell ltmain to make .dll files, not .so files.
470172313efbSmrg      shrext_cmds=".dll"
470272313efbSmrg      # FIXME: Setting linknames here is a bad hack.
470372313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
470472313efbSmrg      # The linker will automatically build a .lib file if we build a DLL.
470572313efbSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
470672313efbSmrg      # FIXME: Should let the user specify the lib program.
470772313efbSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
470872313efbSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
470972313efbSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
471072313efbSmrg      ;;
4711bdcaa8d0Smrg
471272313efbSmrg    darwin* | rhapsody*)
471372313efbSmrg      _LT_DARWIN_LINKER_FEATURES($1)
471472313efbSmrg      ;;
4715bdcaa8d0Smrg
471672313efbSmrg    dgux*)
471772313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
471872313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
471972313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
472072313efbSmrg      ;;
4721bdcaa8d0Smrg
472272313efbSmrg    freebsd1*)
472372313efbSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
472472313efbSmrg      ;;
4725bdcaa8d0Smrg
472672313efbSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
472772313efbSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
472872313efbSmrg    # does not break anything, and helps significantly (at the cost of a little
472972313efbSmrg    # extra space).
473072313efbSmrg    freebsd2.2*)
473172313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
473272313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
473372313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
473472313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
473572313efbSmrg      ;;
4736bdcaa8d0Smrg
473772313efbSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
473872313efbSmrg    freebsd2*)
473972313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
474072313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
474172313efbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
474272313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
474372313efbSmrg      ;;
4744bdcaa8d0Smrg
474572313efbSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
474672313efbSmrg    freebsd* | dragonfly*)
474772313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
474872313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
474972313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
475072313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
475172313efbSmrg      ;;
4752bdcaa8d0Smrg
475372313efbSmrg    hpux9*)
475472313efbSmrg      if test "$GCC" = yes; then
475572313efbSmrg	_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'
475672313efbSmrg      else
475772313efbSmrg	_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'
475872313efbSmrg      fi
475972313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
476072313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
476172313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4762bdcaa8d0Smrg
476372313efbSmrg      # hardcode_minus_L: Not really in the search PATH,
476472313efbSmrg      # but as the default location of the library.
476572313efbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
476672313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
476772313efbSmrg      ;;
4768bdcaa8d0Smrg
476972313efbSmrg    hpux10*)
477072313efbSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
477172313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
477272313efbSmrg      else
477372313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
477472313efbSmrg      fi
477572313efbSmrg      if test "$with_gnu_ld" = no; then
477672313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
477772313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
477872313efbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
477972313efbSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
478072313efbSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
478172313efbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
478272313efbSmrg	# hardcode_minus_L: Not really in the search PATH,
478372313efbSmrg	# but as the default location of the library.
478472313efbSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
478572313efbSmrg      fi
478672313efbSmrg      ;;
4787bdcaa8d0Smrg
478872313efbSmrg    hpux11*)
478972313efbSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
479072313efbSmrg	case $host_cpu in
479172313efbSmrg	hppa*64*)
479272313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
479372313efbSmrg	  ;;
479472313efbSmrg	ia64*)
479572313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
479672313efbSmrg	  ;;
479772313efbSmrg	*)
479872313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
479972313efbSmrg	  ;;
480072313efbSmrg	esac
480172313efbSmrg      else
480272313efbSmrg	case $host_cpu in
480372313efbSmrg	hppa*64*)
480472313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
480572313efbSmrg	  ;;
480672313efbSmrg	ia64*)
480772313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
480872313efbSmrg	  ;;
480972313efbSmrg	*)
481072313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
481172313efbSmrg	  ;;
481272313efbSmrg	esac
481372313efbSmrg      fi
481472313efbSmrg      if test "$with_gnu_ld" = no; then
481572313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
481672313efbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4817bdcaa8d0Smrg
481872313efbSmrg	case $host_cpu in
481972313efbSmrg	hppa*64*|ia64*)
482072313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
482172313efbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
482272313efbSmrg	  ;;
482372313efbSmrg	*)
482472313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
482572313efbSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
482672313efbSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4827bdcaa8d0Smrg
482872313efbSmrg	  # hardcode_minus_L: Not really in the search PATH,
482972313efbSmrg	  # but as the default location of the library.
483072313efbSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
483172313efbSmrg	  ;;
483272313efbSmrg	esac
483372313efbSmrg      fi
483472313efbSmrg      ;;
4835bdcaa8d0Smrg
483672313efbSmrg    irix5* | irix6* | nonstopux*)
483772313efbSmrg      if test "$GCC" = yes; then
483872313efbSmrg	_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'
483972313efbSmrg	# Try to use the -exported_symbol ld option, if it does not
484072313efbSmrg	# work, assume that -exports_file does not work either and
484172313efbSmrg	# implicitly export all symbols.
484272313efbSmrg        save_LDFLAGS="$LDFLAGS"
484372313efbSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
484472313efbSmrg        AC_LINK_IFELSE(int foo(void) {},
484572313efbSmrg          _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'
484672313efbSmrg        )
484772313efbSmrg        LDFLAGS="$save_LDFLAGS"
484872313efbSmrg      else
484972313efbSmrg	_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'
485072313efbSmrg	_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'
485172313efbSmrg      fi
485272313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
485372313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
485472313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
485572313efbSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
485672313efbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
485772313efbSmrg      ;;
4858bdcaa8d0Smrg
485972313efbSmrg    netbsd*)
486072313efbSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
486172313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
486272313efbSmrg      else
486372313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
486472313efbSmrg      fi
486572313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
486672313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
486772313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
486872313efbSmrg      ;;
4869bdcaa8d0Smrg
487072313efbSmrg    newsos6)
487172313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
487272313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
487372313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
487472313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
487572313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
487672313efbSmrg      ;;
4877bdcaa8d0Smrg
487872313efbSmrg    *nto* | *qnx*)
487972313efbSmrg      ;;
4880bdcaa8d0Smrg
488172313efbSmrg    openbsd*)
488272313efbSmrg      if test -f /usr/libexec/ld.so; then
488372313efbSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
488472313efbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
488572313efbSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
488672313efbSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
488772313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
488872313efbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
488972313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
489072313efbSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
489172313efbSmrg	else
489272313efbSmrg	  case $host_os in
489372313efbSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
489472313efbSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
489572313efbSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
489672313efbSmrg	     ;;
489772313efbSmrg	   *)
489872313efbSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
489972313efbSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
490072313efbSmrg	     ;;
490172313efbSmrg	  esac
490272313efbSmrg	fi
490372313efbSmrg      else
490472313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
490572313efbSmrg      fi
490672313efbSmrg      ;;
4907bdcaa8d0Smrg
490872313efbSmrg    os2*)
490972313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
491072313efbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
491172313efbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
491272313efbSmrg      _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'
491372313efbSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
491472313efbSmrg      ;;
4915bdcaa8d0Smrg
491672313efbSmrg    osf3*)
491772313efbSmrg      if test "$GCC" = yes; then
491872313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
491972313efbSmrg	_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'
492072313efbSmrg      else
492172313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
492272313efbSmrg	_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'
492372313efbSmrg      fi
492472313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
492572313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
492672313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
492772313efbSmrg      ;;
4928bdcaa8d0Smrg
492972313efbSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
493072313efbSmrg      if test "$GCC" = yes; then
493172313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
493272313efbSmrg	_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'
493372313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
493472313efbSmrg      else
493572313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
493672313efbSmrg	_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'
493772313efbSmrg	_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~
493872313efbSmrg	$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'
4939bdcaa8d0Smrg
494072313efbSmrg	# Both c and cxx compiler support -rpath directly
494172313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
494272313efbSmrg      fi
494372313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
494472313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
494572313efbSmrg      ;;
4946bdcaa8d0Smrg
494772313efbSmrg    solaris*)
494872313efbSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
494972313efbSmrg      if test "$GCC" = yes; then
495072313efbSmrg	wlarc='${wl}'
495172313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
495272313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
495372313efbSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
495472313efbSmrg      else
495572313efbSmrg	case `$CC -V 2>&1` in
495672313efbSmrg	*"Compilers 5.0"*)
495772313efbSmrg	  wlarc=''
495872313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
495972313efbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496072313efbSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
496172313efbSmrg	  ;;
496272313efbSmrg	*)
496372313efbSmrg	  wlarc='${wl}'
496472313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
496572313efbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
496672313efbSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
496772313efbSmrg	  ;;
496872313efbSmrg	esac
496972313efbSmrg      fi
497072313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
497172313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
497272313efbSmrg      case $host_os in
497372313efbSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
497472313efbSmrg      *)
497572313efbSmrg	# The compiler driver will combine and reorder linker options,
497672313efbSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
497772313efbSmrg	# but is careful enough not to reorder.
497872313efbSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
497972313efbSmrg	if test "$GCC" = yes; then
498072313efbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
498172313efbSmrg	else
498272313efbSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
498372313efbSmrg	fi
498472313efbSmrg	;;
498572313efbSmrg      esac
498672313efbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
498772313efbSmrg      ;;
4988bdcaa8d0Smrg
498972313efbSmrg    sunos4*)
499072313efbSmrg      if test "x$host_vendor" = xsequent; then
499172313efbSmrg	# Use $CC to link under sequent, because it throws in some extra .o
499272313efbSmrg	# files that make .init and .fini sections work.
499372313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
499472313efbSmrg      else
499572313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
499672313efbSmrg      fi
499772313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
499872313efbSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
499972313efbSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
500072313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
500172313efbSmrg      ;;
5002bdcaa8d0Smrg
500372313efbSmrg    sysv4)
500472313efbSmrg      case $host_vendor in
500572313efbSmrg	sni)
500672313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
500772313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
500872313efbSmrg	;;
500972313efbSmrg	siemens)
501072313efbSmrg	  ## LD is ld it makes a PLAMLIB
501172313efbSmrg	  ## CC just makes a GrossModule.
501272313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
501372313efbSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
501472313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
501572313efbSmrg        ;;
501672313efbSmrg	motorola)
501772313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
501872313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
501972313efbSmrg	;;
502072313efbSmrg      esac
502172313efbSmrg      runpath_var='LD_RUN_PATH'
502272313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
502372313efbSmrg      ;;
5024bdcaa8d0Smrg
502572313efbSmrg    sysv4.3*)
502672313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
502772313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
502872313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
502972313efbSmrg      ;;
5030bdcaa8d0Smrg
503172313efbSmrg    sysv4*MP*)
503272313efbSmrg      if test -d /usr/nec; then
503372313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
503472313efbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
503572313efbSmrg	runpath_var=LD_RUN_PATH
503672313efbSmrg	hardcode_runpath_var=yes
503772313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
503872313efbSmrg      fi
503972313efbSmrg      ;;
5040bdcaa8d0Smrg
504172313efbSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
504272313efbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
504372313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
504472313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
504572313efbSmrg      runpath_var='LD_RUN_PATH'
5046bdcaa8d0Smrg
504772313efbSmrg      if test "$GCC" = yes; then
504872313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
504972313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505072313efbSmrg      else
505172313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505272313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
505372313efbSmrg      fi
505472313efbSmrg      ;;
5055bdcaa8d0Smrg
505672313efbSmrg    sysv5* | sco3.2v5* | sco5v6*)
505772313efbSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
505872313efbSmrg      # link with -lc, and that would cause any symbols used from libc to
505972313efbSmrg      # always be unresolved, which means just about no library would
506072313efbSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
506172313efbSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
506272313efbSmrg      # as -z defs.
506372313efbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
506472313efbSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
506572313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
506672313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
506772313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
506872313efbSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
506972313efbSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
507072313efbSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
507172313efbSmrg      runpath_var='LD_RUN_PATH'
5072bdcaa8d0Smrg
507372313efbSmrg      if test "$GCC" = yes; then
507472313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507572313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507672313efbSmrg      else
507772313efbSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507872313efbSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
507972313efbSmrg      fi
508072313efbSmrg      ;;
5081bdcaa8d0Smrg
508272313efbSmrg    uts4*)
508372313efbSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
508472313efbSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
508572313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
508672313efbSmrg      ;;
5087bdcaa8d0Smrg
508872313efbSmrg    *)
508972313efbSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
509072313efbSmrg      ;;
509172313efbSmrg    esac
5092bdcaa8d0Smrg
509372313efbSmrg    if test x$host_vendor = xsni; then
509472313efbSmrg      case $host in
509572313efbSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
509672313efbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
509772313efbSmrg	;;
509872313efbSmrg      esac
509972313efbSmrg    fi
510072313efbSmrg  fi
510172313efbSmrg])
510272313efbSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
510372313efbSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5104bdcaa8d0Smrg
510572313efbSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5106bdcaa8d0Smrg
510772313efbSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
510872313efbSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
510972313efbSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
511072313efbSmrg    [The commands to extract the exported symbol list from a shared archive])
5111bdcaa8d0Smrg
511272313efbSmrg#
511372313efbSmrg# Do we need to explicitly link libc?
511472313efbSmrg#
511572313efbSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
511672313efbSmrgx|xyes)
511772313efbSmrg  # Assume -lc should be added
511872313efbSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5119bdcaa8d0Smrg
512072313efbSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
512172313efbSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
512272313efbSmrg    *'~'*)
512372313efbSmrg      # FIXME: we may have to deal with multi-command sequences.
512472313efbSmrg      ;;
512572313efbSmrg    '$CC '*)
512672313efbSmrg      # Test whether the compiler implicitly links with -lc since on some
512772313efbSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
512872313efbSmrg      # to ld, don't add -lc before -lgcc.
512972313efbSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
513072313efbSmrg      $RM conftest*
513172313efbSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
513272313efbSmrg
513372313efbSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
513472313efbSmrg        soname=conftest
513572313efbSmrg        lib=conftest
513672313efbSmrg        libobjs=conftest.$ac_objext
513772313efbSmrg        deplibs=
513872313efbSmrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
513972313efbSmrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
514072313efbSmrg        compiler_flags=-v
514172313efbSmrg        linker_flags=-v
514272313efbSmrg        verstring=
514372313efbSmrg        output_objdir=.
514472313efbSmrg        libname=conftest
514572313efbSmrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
514672313efbSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=
514772313efbSmrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
514872313efbSmrg        then
514972313efbSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
515072313efbSmrg        else
515172313efbSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
515272313efbSmrg        fi
515372313efbSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
515472313efbSmrg      else
515572313efbSmrg        cat conftest.err 1>&5
515672313efbSmrg      fi
515772313efbSmrg      $RM conftest*
515872313efbSmrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
515972313efbSmrg      ;;
516072313efbSmrg    esac
5161bdcaa8d0Smrg  fi
5162bdcaa8d0Smrg  ;;
5163bdcaa8d0Smrgesac
5164bdcaa8d0Smrg
516572313efbSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
516672313efbSmrg    [Whether or not to add -lc for building shared libraries])
516772313efbSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
516872313efbSmrg    [enable_shared_with_static_runtimes], [0],
516972313efbSmrg    [Whether or not to disallow shared libs when runtime libs are static])
517072313efbSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
517172313efbSmrg    [Compiler flag to allow reflexive dlopens])
517272313efbSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
517372313efbSmrg    [Compiler flag to generate shared objects directly from archives])
517472313efbSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
517572313efbSmrg    [Whether the compiler copes with passing no objects directly])
517672313efbSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
517772313efbSmrg    [Create an old-style archive from a shared archive])
517872313efbSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
517972313efbSmrg    [Create a temporary old-style archive to link instead of a shared archive])
518072313efbSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
518172313efbSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
518272313efbSmrg_LT_TAGDECL([], [module_cmds], [2],
518372313efbSmrg    [Commands used to build a loadable module if different from building
518472313efbSmrg    a shared archive.])
518572313efbSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
518672313efbSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
518772313efbSmrg    [Whether we are building with GNU ld or not])
518872313efbSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
518972313efbSmrg    [Flag that allows shared libraries with undefined symbols to be built])
519072313efbSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
519172313efbSmrg    [Flag that enforces no undefined symbols])
519272313efbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
519372313efbSmrg    [Flag to hardcode $libdir into a binary during linking.
519472313efbSmrg    This must work even if $libdir does not exist])
519572313efbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
519672313efbSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
519772313efbSmrg    during linking.  This must work even if $libdir does not exist]])
519872313efbSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
519972313efbSmrg    [Whether we need a single "-rpath" flag with a separated argument])
520072313efbSmrg_LT_TAGDECL([], [hardcode_direct], [0],
520172313efbSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520272313efbSmrg    DIR into the resulting binary])
520372313efbSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
520472313efbSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
520572313efbSmrg    DIR into the resulting binary and the resulting library dependency is
520672313efbSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
520772313efbSmrg    library is relocated])
520872313efbSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
520972313efbSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
521072313efbSmrg    into the resulting binary])
521172313efbSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
521272313efbSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
521372313efbSmrg    into the resulting binary])
521472313efbSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
521572313efbSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
521672313efbSmrg    into the library and all subsequent libraries and executables linked
521772313efbSmrg    against it])
521872313efbSmrg_LT_TAGDECL([], [inherit_rpath], [0],
521972313efbSmrg    [Set to yes if linker adds runtime paths of dependent libraries
522072313efbSmrg    to runtime path list])
522172313efbSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
522272313efbSmrg    [Whether libtool must link a program against all its dependency libraries])
522372313efbSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
522472313efbSmrg    [Fix the shell variable $srcfile for the compiler])
522572313efbSmrg_LT_TAGDECL([], [always_export_symbols], [0],
522672313efbSmrg    [Set to "yes" if exported symbols are required])
522772313efbSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
522872313efbSmrg    [The commands to list exported symbols])
522972313efbSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
523072313efbSmrg    [Symbols that should not be listed in the preloaded symbols])
523172313efbSmrg_LT_TAGDECL([], [include_expsyms], [1],
523272313efbSmrg    [Symbols that must always be exported])
523372313efbSmrg_LT_TAGDECL([], [prelink_cmds], [2],
523472313efbSmrg    [Commands necessary for linking programs (against libraries) with templates])
523572313efbSmrg_LT_TAGDECL([], [file_list_spec], [1],
523672313efbSmrg    [Specify filename containing input files])
523772313efbSmrgdnl FIXME: Not yet implemented
523872313efbSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
523972313efbSmrgdnl    [Compiler flag to generate thread safe objects])
524072313efbSmrg])# _LT_LINKER_SHLIBS
524172313efbSmrg
524272313efbSmrg
524372313efbSmrg# _LT_LANG_C_CONFIG([TAG])
524472313efbSmrg# ------------------------
524572313efbSmrg# Ensure that the configuration variables for a C compiler are suitably
524672313efbSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
524772313efbSmrg# the compiler configuration to `libtool'.
524872313efbSmrgm4_defun([_LT_LANG_C_CONFIG],
524972313efbSmrg[m4_require([_LT_DECL_EGREP])dnl
525072313efbSmrglt_save_CC="$CC"
525172313efbSmrgAC_LANG_PUSH(C)
5252bdcaa8d0Smrg
525372313efbSmrg# Source file extension for C test sources.
525472313efbSmrgac_ext=c
5255bdcaa8d0Smrg
525672313efbSmrg# Object file extension for compiled C test sources.
525772313efbSmrgobjext=o
525872313efbSmrg_LT_TAGVAR(objext, $1)=$objext
5259bdcaa8d0Smrg
526072313efbSmrg# Code to be used in simple compile tests
526172313efbSmrglt_simple_compile_test_code="int some_variable = 0;"
5262bdcaa8d0Smrg
526372313efbSmrg# Code to be used in simple link tests
526472313efbSmrglt_simple_link_test_code='int main(){return(0);}'
5265bdcaa8d0Smrg
526672313efbSmrg_LT_TAG_COMPILER
526772313efbSmrg# Save the default compiler, since it gets overwritten when the other
526872313efbSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
526972313efbSmrgcompiler_DEFAULT=$CC
5270bdcaa8d0Smrg
527172313efbSmrg# save warnings/boilerplate of simple test code
527272313efbSmrg_LT_COMPILER_BOILERPLATE
527372313efbSmrg_LT_LINKER_BOILERPLATE
5274bdcaa8d0Smrg
527572313efbSmrgif test -n "$compiler"; then
527672313efbSmrg  _LT_COMPILER_NO_RTTI($1)
527772313efbSmrg  _LT_COMPILER_PIC($1)
527872313efbSmrg  _LT_COMPILER_C_O($1)
527972313efbSmrg  _LT_COMPILER_FILE_LOCKS($1)
528072313efbSmrg  _LT_LINKER_SHLIBS($1)
528172313efbSmrg  _LT_SYS_DYNAMIC_LINKER($1)
528272313efbSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
528372313efbSmrg  LT_SYS_DLOPEN_SELF
528472313efbSmrg  _LT_CMD_STRIPLIB
528572313efbSmrg
528672313efbSmrg  # Report which library types will actually be built
528772313efbSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
528872313efbSmrg  AC_MSG_RESULT([$can_build_shared])
528972313efbSmrg
529072313efbSmrg  AC_MSG_CHECKING([whether to build shared libraries])
529172313efbSmrg  test "$can_build_shared" = "no" && enable_shared=no
529272313efbSmrg
529372313efbSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
529472313efbSmrg  # are all built from PIC.
529572313efbSmrg  case $host_os in
529672313efbSmrg  aix3*)
529772313efbSmrg    test "$enable_shared" = yes && enable_static=no
529872313efbSmrg    if test -n "$RANLIB"; then
529972313efbSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
530072313efbSmrg      postinstall_cmds='$RANLIB $lib'
530172313efbSmrg    fi
530272313efbSmrg    ;;
5303bdcaa8d0Smrg
530472313efbSmrg  aix[[4-9]]*)
530572313efbSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
530672313efbSmrg      test "$enable_shared" = yes && enable_static=no
530772313efbSmrg    fi
530872313efbSmrg    ;;
530972313efbSmrg  esac
531072313efbSmrg  AC_MSG_RESULT([$enable_shared])
5311bdcaa8d0Smrg
531272313efbSmrg  AC_MSG_CHECKING([whether to build static libraries])
531372313efbSmrg  # Make sure either enable_shared or enable_static is yes.
531472313efbSmrg  test "$enable_shared" = yes || enable_static=yes
531572313efbSmrg  AC_MSG_RESULT([$enable_static])
5316bdcaa8d0Smrg
531772313efbSmrg  _LT_CONFIG($1)
531872313efbSmrgfi
531972313efbSmrgAC_LANG_POP
532072313efbSmrgCC="$lt_save_CC"
532172313efbSmrg])# _LT_LANG_C_CONFIG
5322bdcaa8d0Smrg
5323bdcaa8d0Smrg
532472313efbSmrg# _LT_PROG_CXX
532572313efbSmrg# ------------
532672313efbSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
532772313efbSmrg# compiler, we have our own version here.
532872313efbSmrgm4_defun([_LT_PROG_CXX],
532972313efbSmrg[
533072313efbSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
533172313efbSmrgAC_PROG_CXX
533272313efbSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
533372313efbSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
533472313efbSmrg    (test "X$CXX" != "Xg++"))) ; then
533572313efbSmrg  AC_PROG_CXXCPP
533672313efbSmrgelse
533772313efbSmrg  _lt_caught_CXX_error=yes
533872313efbSmrgfi
533972313efbSmrgpopdef([AC_MSG_ERROR])
534072313efbSmrg])# _LT_PROG_CXX
534172313efbSmrg
534272313efbSmrgdnl aclocal-1.4 backwards compatibility:
534372313efbSmrgdnl AC_DEFUN([_LT_PROG_CXX], [])
534472313efbSmrg
534572313efbSmrg
534672313efbSmrg# _LT_LANG_CXX_CONFIG([TAG])
534772313efbSmrg# --------------------------
534872313efbSmrg# Ensure that the configuration variables for a C++ compiler are suitably
534972313efbSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
535072313efbSmrg# the compiler configuration to `libtool'.
535172313efbSmrgm4_defun([_LT_LANG_CXX_CONFIG],
535272313efbSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl
535372313efbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
535472313efbSmrgm4_require([_LT_DECL_EGREP])dnl
535572313efbSmrg
535672313efbSmrgAC_LANG_PUSH(C++)
535772313efbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
535872313efbSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
535972313efbSmrg_LT_TAGVAR(always_export_symbols, $1)=no
536072313efbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
536172313efbSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
536272313efbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
536372313efbSmrg_LT_TAGVAR(hardcode_direct, $1)=no
536472313efbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
536572313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
536672313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
536772313efbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
536872313efbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
536972313efbSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
537072313efbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
537172313efbSmrg_LT_TAGVAR(inherit_rpath, $1)=no
537272313efbSmrg_LT_TAGVAR(module_cmds, $1)=
537372313efbSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
537472313efbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
537572313efbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
537672313efbSmrg_LT_TAGVAR(no_undefined_flag, $1)=
537772313efbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
537872313efbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
537972313efbSmrg
538072313efbSmrg# Source file extension for C++ test sources.
538172313efbSmrgac_ext=cpp
538272313efbSmrg
538372313efbSmrg# Object file extension for compiled C++ test sources.
538472313efbSmrgobjext=o
538572313efbSmrg_LT_TAGVAR(objext, $1)=$objext
538672313efbSmrg
538772313efbSmrg# No sense in running all these tests if we already determined that
538872313efbSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
538972313efbSmrg# are currently assumed to apply to all compilers on this platform,
539072313efbSmrg# and will be corrupted by setting them based on a non-working compiler.
539172313efbSmrgif test "$_lt_caught_CXX_error" != yes; then
539272313efbSmrg  # Code to be used in simple compile tests
539372313efbSmrg  lt_simple_compile_test_code="int some_variable = 0;"
539472313efbSmrg
539572313efbSmrg  # Code to be used in simple link tests
539672313efbSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
539772313efbSmrg
539872313efbSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
539972313efbSmrg  _LT_TAG_COMPILER
540072313efbSmrg
540172313efbSmrg  # save warnings/boilerplate of simple test code
540272313efbSmrg  _LT_COMPILER_BOILERPLATE
540372313efbSmrg  _LT_LINKER_BOILERPLATE
540472313efbSmrg
540572313efbSmrg  # Allow CC to be a program name with arguments.
540672313efbSmrg  lt_save_CC=$CC
540772313efbSmrg  lt_save_LD=$LD
540872313efbSmrg  lt_save_GCC=$GCC
540972313efbSmrg  GCC=$GXX
541072313efbSmrg  lt_save_with_gnu_ld=$with_gnu_ld
541172313efbSmrg  lt_save_path_LD=$lt_cv_path_LD
541272313efbSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
541372313efbSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5414bdcaa8d0Smrg  else
541572313efbSmrg    $as_unset lt_cv_prog_gnu_ld
5416bdcaa8d0Smrg  fi
541772313efbSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
541872313efbSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5419bdcaa8d0Smrg  else
542072313efbSmrg    $as_unset lt_cv_path_LD
5421bdcaa8d0Smrg  fi
542272313efbSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
542372313efbSmrg  CC=${CXX-"c++"}
542472313efbSmrg  compiler=$CC
542572313efbSmrg  _LT_TAGVAR(compiler, $1)=$CC
542672313efbSmrg  _LT_CC_BASENAME([$compiler])
5427bdcaa8d0Smrg
542872313efbSmrg  if test -n "$compiler"; then
542972313efbSmrg    # We don't want -fno-exception when compiling C++ code, so set the
543072313efbSmrg    # no_builtin_flag separately
543172313efbSmrg    if test "$GXX" = yes; then
543272313efbSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
543372313efbSmrg    else
543472313efbSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
543572313efbSmrg    fi
5436bdcaa8d0Smrg
543772313efbSmrg    if test "$GXX" = yes; then
543872313efbSmrg      # Set up default GNU C++ configuration
5439bdcaa8d0Smrg
544072313efbSmrg      LT_PATH_LD
5441bdcaa8d0Smrg
544272313efbSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
544372313efbSmrg      # archiving commands below assume that GNU ld is being used.
544472313efbSmrg      if test "$with_gnu_ld" = yes; then
544572313efbSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
544672313efbSmrg        _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'
544772313efbSmrg
544872313efbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
544972313efbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
545072313efbSmrg
545172313efbSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
545272313efbSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
545372313efbSmrg        #     investigate it a little bit more. (MM)
545472313efbSmrg        wlarc='${wl}'
545572313efbSmrg
545672313efbSmrg        # ancient GNU ld didn't support --whole-archive et. al.
545772313efbSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
545872313efbSmrg	  $GREP 'no-whole-archive' > /dev/null; then
545972313efbSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
546072313efbSmrg        else
546172313efbSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
546272313efbSmrg        fi
546372313efbSmrg      else
546472313efbSmrg        with_gnu_ld=no
546572313efbSmrg        wlarc=
546672313efbSmrg
546772313efbSmrg        # A generic and very simple default shared library creation
546872313efbSmrg        # command for GNU C++ for the case where it uses the native
546972313efbSmrg        # linker, instead of GNU ld.  If possible, this setting should
547072313efbSmrg        # overridden to take advantage of the native linker features on
547172313efbSmrg        # the platform it is being used on.
547272313efbSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5473bdcaa8d0Smrg      fi
547472313efbSmrg
547572313efbSmrg      # Commands to make compiler produce verbose output that lists
547672313efbSmrg      # what "hidden" libraries, object files and flags are used when
547772313efbSmrg      # linking a shared library.
547872313efbSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
547972313efbSmrg
548072313efbSmrg    else
548172313efbSmrg      GXX=no
548272313efbSmrg      with_gnu_ld=no
548372313efbSmrg      wlarc=
548472313efbSmrg    fi
548572313efbSmrg
548672313efbSmrg    # PORTME: fill in a description of your system's C++ link characteristics
548772313efbSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
548872313efbSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5489bdcaa8d0Smrg    case $host_os in
549072313efbSmrg      aix3*)
549172313efbSmrg        # FIXME: insert proper C++ library support
549272313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
549372313efbSmrg        ;;
549472313efbSmrg      aix[[4-9]]*)
549572313efbSmrg        if test "$host_cpu" = ia64; then
549672313efbSmrg          # On IA64, the linker does run time linking by default, so we don't
549772313efbSmrg          # have to do anything special.
549872313efbSmrg          aix_use_runtimelinking=no
549972313efbSmrg          exp_sym_flag='-Bexport'
550072313efbSmrg          no_entry_flag=""
550172313efbSmrg        else
550272313efbSmrg          aix_use_runtimelinking=no
550372313efbSmrg
550472313efbSmrg          # Test if we are trying to use run time linking or normal
550572313efbSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
550672313efbSmrg          # need to do runtime linking.
550772313efbSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
550872313efbSmrg	    for ld_flag in $LDFLAGS; do
550972313efbSmrg	      case $ld_flag in
551072313efbSmrg	      *-brtl*)
551172313efbSmrg	        aix_use_runtimelinking=yes
551272313efbSmrg	        break
551372313efbSmrg	        ;;
551472313efbSmrg	      esac
551572313efbSmrg	    done
551672313efbSmrg	    ;;
551772313efbSmrg          esac
551872313efbSmrg
551972313efbSmrg          exp_sym_flag='-bexport'
552072313efbSmrg          no_entry_flag='-bnoentry'
552172313efbSmrg        fi
552272313efbSmrg
552372313efbSmrg        # When large executables or shared objects are built, AIX ld can
552472313efbSmrg        # have problems creating the table of contents.  If linking a library
552572313efbSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
552672313efbSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
552772313efbSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
552872313efbSmrg
552972313efbSmrg        _LT_TAGVAR(archive_cmds, $1)=''
553072313efbSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
553172313efbSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
553272313efbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
553372313efbSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
553472313efbSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
553572313efbSmrg
553672313efbSmrg        if test "$GXX" = yes; then
553772313efbSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
553872313efbSmrg          # We only want to do this on AIX 4.2 and lower, the check
553972313efbSmrg          # below for broken collect2 doesn't work under 4.3+
554072313efbSmrg	  collect2name=`${CC} -print-prog-name=collect2`
554172313efbSmrg	  if test -f "$collect2name" &&
554272313efbSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
554372313efbSmrg	  then
554472313efbSmrg	    # We have reworked collect2
554572313efbSmrg	    :
554672313efbSmrg	  else
554772313efbSmrg	    # We have old collect2
554872313efbSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
554972313efbSmrg	    # It fails to find uninstalled libraries when the uninstalled
555072313efbSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
555172313efbSmrg	    # to unsupported forces relinking
555272313efbSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
555372313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
555472313efbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
555572313efbSmrg	  fi
555672313efbSmrg          esac
555772313efbSmrg          shared_flag='-shared'
555872313efbSmrg	  if test "$aix_use_runtimelinking" = yes; then
555972313efbSmrg	    shared_flag="$shared_flag "'${wl}-G'
556072313efbSmrg	  fi
556172313efbSmrg        else
556272313efbSmrg          # not using gcc
556372313efbSmrg          if test "$host_cpu" = ia64; then
556472313efbSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
556572313efbSmrg	  # chokes on -Wl,-G. The following line is correct:
556672313efbSmrg	  shared_flag='-G'
556772313efbSmrg          else
556872313efbSmrg	    if test "$aix_use_runtimelinking" = yes; then
556972313efbSmrg	      shared_flag='${wl}-G'
557072313efbSmrg	    else
557172313efbSmrg	      shared_flag='${wl}-bM:SRE'
557272313efbSmrg	    fi
557372313efbSmrg          fi
557472313efbSmrg        fi
557572313efbSmrg
557672313efbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
557772313efbSmrg        # It seems that -bexpall does not export symbols beginning with
557872313efbSmrg        # underscore (_), so it is better to generate a list of symbols to
557972313efbSmrg	# export.
558072313efbSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
558172313efbSmrg        if test "$aix_use_runtimelinking" = yes; then
558272313efbSmrg          # Warning - without using the other runtime loading flags (-brtl),
558372313efbSmrg          # -berok will link without error, but may produce a broken library.
558472313efbSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
558572313efbSmrg          # Determine the default libpath from the value encoded in an empty
558672313efbSmrg          # executable.
558772313efbSmrg          _LT_SYS_MODULE_PATH_AIX
558872313efbSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
558972313efbSmrg
559072313efbSmrg          _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"
559172313efbSmrg        else
559272313efbSmrg          if test "$host_cpu" = ia64; then
559372313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
559472313efbSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
559572313efbSmrg	    _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"
559672313efbSmrg          else
559772313efbSmrg	    # Determine the default libpath from the value encoded in an
559872313efbSmrg	    # empty executable.
559972313efbSmrg	    _LT_SYS_MODULE_PATH_AIX
560072313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
560172313efbSmrg	    # Warning - without using the other run time loading flags,
560272313efbSmrg	    # -berok will link without error, but may produce a broken library.
560372313efbSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
560472313efbSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
560572313efbSmrg	    # Exported symbols can be pulled into shared objects from archives
560672313efbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
560772313efbSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
560872313efbSmrg	    # This is similar to how AIX traditionally builds its shared
560972313efbSmrg	    # libraries.
561072313efbSmrg	    _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'
561172313efbSmrg          fi
561272313efbSmrg        fi
561372313efbSmrg        ;;
561472313efbSmrg
561572313efbSmrg      beos*)
561672313efbSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
561772313efbSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
561872313efbSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
561972313efbSmrg	  # support --undefined.  This deserves some investigation.  FIXME
562072313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5621bdcaa8d0Smrg	else
562272313efbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5623bdcaa8d0Smrg	fi
5624bdcaa8d0Smrg	;;
562572313efbSmrg
5626bdcaa8d0Smrg      chorus*)
562772313efbSmrg        case $cc_basename in
562872313efbSmrg          *)
562972313efbSmrg	  # FIXME: insert proper C++ library support
563072313efbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5631bdcaa8d0Smrg	  ;;
563272313efbSmrg        esac
563372313efbSmrg        ;;
563472313efbSmrg
563572313efbSmrg      cygwin* | mingw* | pw32* | cegcc*)
563672313efbSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
563772313efbSmrg        # as there is no search path for DLLs.
563872313efbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
563972313efbSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
564072313efbSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
564172313efbSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
564272313efbSmrg
564372313efbSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
564472313efbSmrg          _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'
564572313efbSmrg          # If the export-symbols file already is a .def file (1st line
564672313efbSmrg          # is EXPORTS), use it as is; otherwise, prepend...
564772313efbSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
564872313efbSmrg	    cp $export_symbols $output_objdir/$soname.def;
564972313efbSmrg          else
565072313efbSmrg	    echo EXPORTS > $output_objdir/$soname.def;
565172313efbSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
565272313efbSmrg          fi~
565372313efbSmrg          $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'
565472313efbSmrg        else
565572313efbSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
565672313efbSmrg        fi
565772313efbSmrg        ;;
565872313efbSmrg      darwin* | rhapsody*)
565972313efbSmrg        _LT_DARWIN_LINKER_FEATURES($1)
5660bdcaa8d0Smrg	;;
566172313efbSmrg
5662bdcaa8d0Smrg      dgux*)
566372313efbSmrg        case $cc_basename in
566472313efbSmrg          ec++*)
566572313efbSmrg	    # FIXME: insert proper C++ library support
566672313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5667bdcaa8d0Smrg	    ;;
566872313efbSmrg          ghcx*)
5669bdcaa8d0Smrg	    # Green Hills C++ Compiler
567072313efbSmrg	    # FIXME: insert proper C++ library support
567172313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5672bdcaa8d0Smrg	    ;;
567372313efbSmrg          *)
567472313efbSmrg	    # FIXME: insert proper C++ library support
567572313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5676bdcaa8d0Smrg	    ;;
567772313efbSmrg        esac
567872313efbSmrg        ;;
567972313efbSmrg
568072313efbSmrg      freebsd[[12]]*)
568172313efbSmrg        # C++ shared libraries reported to be fairly broken before
568272313efbSmrg	# switch to ELF
568372313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
568472313efbSmrg        ;;
568572313efbSmrg
568672313efbSmrg      freebsd-elf*)
568772313efbSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
568872313efbSmrg        ;;
568972313efbSmrg
5690bdcaa8d0Smrg      freebsd* | dragonfly*)
569172313efbSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
569272313efbSmrg        # conventions
569372313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
569472313efbSmrg        ;;
569572313efbSmrg
569672313efbSmrg      gnu*)
569772313efbSmrg        ;;
569872313efbSmrg
569972313efbSmrg      hpux9*)
570072313efbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
570172313efbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
570272313efbSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
570372313efbSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
570472313efbSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
570572313efbSmrg				             # but as the default
570672313efbSmrg				             # location of the library.
570772313efbSmrg
570872313efbSmrg        case $cc_basename in
570972313efbSmrg          CC*)
571072313efbSmrg            # FIXME: insert proper C++ library support
571172313efbSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
571272313efbSmrg            ;;
571372313efbSmrg          aCC*)
571472313efbSmrg            _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'
571572313efbSmrg            # Commands to make compiler produce verbose output that lists
571672313efbSmrg            # what "hidden" libraries, object files and flags are used when
571772313efbSmrg            # linking a shared library.
571872313efbSmrg            #
571972313efbSmrg            # There doesn't appear to be a way to prevent this compiler from
572072313efbSmrg            # explicitly linking system object files so we need to strip them
572172313efbSmrg            # from the output so that they don't get included in the library
572272313efbSmrg            # dependencies.
572372313efbSmrg            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'
572472313efbSmrg            ;;
572572313efbSmrg          *)
572672313efbSmrg            if test "$GXX" = yes; then
572772313efbSmrg              _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'
572872313efbSmrg            else
572972313efbSmrg              # FIXME: insert proper C++ library support
573072313efbSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
573172313efbSmrg            fi
573272313efbSmrg            ;;
573372313efbSmrg        esac
573472313efbSmrg        ;;
573572313efbSmrg
573672313efbSmrg      hpux10*|hpux11*)
573772313efbSmrg        if test $with_gnu_ld = no; then
573872313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
573972313efbSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
574072313efbSmrg
574172313efbSmrg          case $host_cpu in
574272313efbSmrg            hppa*64*|ia64*)
574372313efbSmrg              ;;
574472313efbSmrg            *)
574572313efbSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
574672313efbSmrg              ;;
574772313efbSmrg          esac
574872313efbSmrg        fi
574972313efbSmrg        case $host_cpu in
575072313efbSmrg          hppa*64*|ia64*)
575172313efbSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
575272313efbSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
575372313efbSmrg            ;;
575472313efbSmrg          *)
575572313efbSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
575672313efbSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
575772313efbSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
575872313efbSmrg					         # but as the default
575972313efbSmrg					         # location of the library.
576072313efbSmrg            ;;
576172313efbSmrg        esac
576272313efbSmrg
576372313efbSmrg        case $cc_basename in
576472313efbSmrg          CC*)
576572313efbSmrg	    # FIXME: insert proper C++ library support
576672313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5767bdcaa8d0Smrg	    ;;
576872313efbSmrg          aCC*)
5769bdcaa8d0Smrg	    case $host_cpu in
577072313efbSmrg	      hppa*64*)
577172313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577272313efbSmrg	        ;;
577372313efbSmrg	      ia64*)
577472313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
577572313efbSmrg	        ;;
577672313efbSmrg	      *)
577772313efbSmrg	        _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'
577872313efbSmrg	        ;;
5779bdcaa8d0Smrg	    esac
578072313efbSmrg	    # Commands to make compiler produce verbose output that lists
578172313efbSmrg	    # what "hidden" libraries, object files and flags are used when
578272313efbSmrg	    # linking a shared library.
578372313efbSmrg	    #
578472313efbSmrg	    # There doesn't appear to be a way to prevent this compiler from
578572313efbSmrg	    # explicitly linking system object files so we need to strip them
578672313efbSmrg	    # from the output so that they don't get included in the library
578772313efbSmrg	    # dependencies.
578872313efbSmrg	    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'
5789bdcaa8d0Smrg	    ;;
579072313efbSmrg          *)
579172313efbSmrg	    if test "$GXX" = yes; then
579272313efbSmrg	      if test $with_gnu_ld = no; then
579372313efbSmrg	        case $host_cpu in
579472313efbSmrg	          hppa*64*)
579572313efbSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
579672313efbSmrg	            ;;
579772313efbSmrg	          ia64*)
579872313efbSmrg	            _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'
579972313efbSmrg	            ;;
580072313efbSmrg	          *)
580172313efbSmrg	            _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'
580272313efbSmrg	            ;;
580372313efbSmrg	        esac
580472313efbSmrg	      fi
580572313efbSmrg	    else
580672313efbSmrg	      # FIXME: insert proper C++ library support
580772313efbSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
580872313efbSmrg	    fi
5809bdcaa8d0Smrg	    ;;
581072313efbSmrg        esac
581172313efbSmrg        ;;
581272313efbSmrg
581372313efbSmrg      interix[[3-9]]*)
581472313efbSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
581572313efbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
581672313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
581772313efbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
581872313efbSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
581972313efbSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
582072313efbSmrg	# default) and relocated if they conflict, which is a slow very memory
582172313efbSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
582272313efbSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
582372313efbSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
582472313efbSmrg	_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'
582572313efbSmrg	_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'
5826bdcaa8d0Smrg	;;
582772313efbSmrg      irix5* | irix6*)
582872313efbSmrg        case $cc_basename in
582972313efbSmrg          CC*)
583072313efbSmrg	    # SGI C++
583172313efbSmrg	    _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'
583272313efbSmrg
583372313efbSmrg	    # Archives containing C++ object files must be created using
583472313efbSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
583572313efbSmrg	    # necessary to make sure instantiated templates are included
583672313efbSmrg	    # in the archive.
583772313efbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5838bdcaa8d0Smrg	    ;;
583972313efbSmrg          *)
584072313efbSmrg	    if test "$GXX" = yes; then
584172313efbSmrg	      if test "$with_gnu_ld" = no; then
584272313efbSmrg	        _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'
584372313efbSmrg	      else
584472313efbSmrg	        _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'
584572313efbSmrg	      fi
584672313efbSmrg	    fi
584772313efbSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5848bdcaa8d0Smrg	    ;;
584972313efbSmrg        esac
585072313efbSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
585172313efbSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
585272313efbSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
585372313efbSmrg        ;;
585472313efbSmrg
5855bdcaa8d0Smrg      linux* | k*bsd*-gnu)
585672313efbSmrg        case $cc_basename in
585772313efbSmrg          KCC*)
585872313efbSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
585972313efbSmrg
586072313efbSmrg	    # KCC will only create a shared library if the output file
586172313efbSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
586272313efbSmrg	    # to its proper name (with version) after linking.
586372313efbSmrg	    _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'
586472313efbSmrg	    _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'
586572313efbSmrg	    # Commands to make compiler produce verbose output that lists
586672313efbSmrg	    # what "hidden" libraries, object files and flags are used when
586772313efbSmrg	    # linking a shared library.
586872313efbSmrg	    #
586972313efbSmrg	    # There doesn't appear to be a way to prevent this compiler from
587072313efbSmrg	    # explicitly linking system object files so we need to strip them
587172313efbSmrg	    # from the output so that they don't get included in the library
587272313efbSmrg	    # dependencies.
587372313efbSmrg	    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'
587472313efbSmrg
587572313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
587672313efbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
587772313efbSmrg
587872313efbSmrg	    # Archives containing C++ object files must be created using
587972313efbSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
588072313efbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5881bdcaa8d0Smrg	    ;;
588272313efbSmrg	  icpc* | ecpc* )
5883bdcaa8d0Smrg	    # Intel C++
588472313efbSmrg	    with_gnu_ld=yes
588572313efbSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
588672313efbSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
588772313efbSmrg	    # earlier do not add the objects themselves.
588872313efbSmrg	    case `$CC -V 2>&1` in
588972313efbSmrg	      *"Version 7."*)
589072313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
589172313efbSmrg		_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'
589272313efbSmrg		;;
589372313efbSmrg	      *)  # Version 8.0 or newer
589472313efbSmrg	        tmp_idyn=
589572313efbSmrg	        case $host_cpu in
589672313efbSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
589772313efbSmrg		esac
589872313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
589972313efbSmrg		_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'
590072313efbSmrg		;;
590172313efbSmrg	    esac
590272313efbSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
590372313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
590472313efbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
590572313efbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5906bdcaa8d0Smrg	    ;;
590772313efbSmrg          pgCC* | pgcpp*)
590872313efbSmrg            # Portland Group C++ compiler
590972313efbSmrg	    case `$CC -V` in
591072313efbSmrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
591172313efbSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
591272313efbSmrg		rm -rf $tpldir~
591372313efbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
591472313efbSmrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
591572313efbSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
591672313efbSmrg		rm -rf $tpldir~
591772313efbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
591872313efbSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
591972313efbSmrg		$RANLIB $oldlib'
592072313efbSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
592172313efbSmrg		rm -rf $tpldir~
592272313efbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
592372313efbSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
592472313efbSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
592572313efbSmrg		rm -rf $tpldir~
592672313efbSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
592772313efbSmrg		$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'
592872313efbSmrg	      ;;
592972313efbSmrg	    *) # Version 6 will use weak symbols
593072313efbSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
593172313efbSmrg	      _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'
593272313efbSmrg	      ;;
593372313efbSmrg	    esac
593472313efbSmrg
593572313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
593672313efbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
593772313efbSmrg	    _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'
593872313efbSmrg            ;;
5939bdcaa8d0Smrg	  cxx*)
5940bdcaa8d0Smrg	    # Compaq C++
594172313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
594272313efbSmrg	    _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'
594372313efbSmrg
594472313efbSmrg	    runpath_var=LD_RUN_PATH
594572313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
594672313efbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
594772313efbSmrg
594872313efbSmrg	    # Commands to make compiler produce verbose output that lists
594972313efbSmrg	    # what "hidden" libraries, object files and flags are used when
595072313efbSmrg	    # linking a shared library.
595172313efbSmrg	    #
595272313efbSmrg	    # There doesn't appear to be a way to prevent this compiler from
595372313efbSmrg	    # explicitly linking system object files so we need to strip them
595472313efbSmrg	    # from the output so that they don't get included in the library
595572313efbSmrg	    # dependencies.
595672313efbSmrg	    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'
595772313efbSmrg	    ;;
595872313efbSmrg	  xl*)
595972313efbSmrg	    # IBM XL 8.0 on PPC, with GNU ld
596072313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
596172313efbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
596272313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
596372313efbSmrg	    if test "x$supports_anon_versioning" = xyes; then
596472313efbSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
596572313efbSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
596672313efbSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
596772313efbSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
596872313efbSmrg	    fi
5969bdcaa8d0Smrg	    ;;
5970bdcaa8d0Smrg	  *)
597172313efbSmrg	    case `$CC -V 2>&1 | sed 5q` in
597272313efbSmrg	    *Sun\ C*)
597372313efbSmrg	      # Sun C++ 5.9
597472313efbSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
597572313efbSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
597672313efbSmrg	      _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'
597772313efbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
597872313efbSmrg	      _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'
597972313efbSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
598072313efbSmrg
598172313efbSmrg	      # Not sure whether something based on
598272313efbSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
598372313efbSmrg	      # would be better.
598472313efbSmrg	      output_verbose_link_cmd='echo'
598572313efbSmrg
598672313efbSmrg	      # Archives containing C++ object files must be created using
598772313efbSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
598872313efbSmrg	      # necessary to make sure instantiated templates are included
598972313efbSmrg	      # in the archive.
599072313efbSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
599172313efbSmrg	      ;;
599272313efbSmrg	    esac
5993bdcaa8d0Smrg	    ;;
5994bdcaa8d0Smrg	esac
5995bdcaa8d0Smrg	;;
599672313efbSmrg
5997bdcaa8d0Smrg      lynxos*)
599872313efbSmrg        # FIXME: insert proper C++ library support
599972313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6000bdcaa8d0Smrg	;;
600172313efbSmrg
6002bdcaa8d0Smrg      m88k*)
600372313efbSmrg        # FIXME: insert proper C++ library support
600472313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6005bdcaa8d0Smrg	;;
600672313efbSmrg
6007bdcaa8d0Smrg      mvs*)
600872313efbSmrg        case $cc_basename in
600972313efbSmrg          cxx*)
601072313efbSmrg	    # FIXME: insert proper C++ library support
601172313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6012bdcaa8d0Smrg	    ;;
6013bdcaa8d0Smrg	  *)
601472313efbSmrg	    # FIXME: insert proper C++ library support
601572313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6016bdcaa8d0Smrg	    ;;
6017bdcaa8d0Smrg	esac
6018bdcaa8d0Smrg	;;
601972313efbSmrg
602072313efbSmrg      netbsd*)
602172313efbSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
602272313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
602372313efbSmrg	  wlarc=
602472313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
602572313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
602672313efbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
602772313efbSmrg	fi
602872313efbSmrg	# Workaround some broken pre-1.5 toolchains
602972313efbSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
603072313efbSmrg	;;
603172313efbSmrg
603272313efbSmrg      *nto* | *qnx*)
603372313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
603472313efbSmrg	;;
603572313efbSmrg
603672313efbSmrg      openbsd2*)
603772313efbSmrg        # C++ shared libraries are fairly broken
603872313efbSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
603972313efbSmrg	;;
604072313efbSmrg
604172313efbSmrg      openbsd*)
604272313efbSmrg	if test -f /usr/libexec/ld.so; then
604372313efbSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
604472313efbSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
604572313efbSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
604672313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
604772313efbSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
604872313efbSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
604972313efbSmrg	    _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'
605072313efbSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
605172313efbSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
605272313efbSmrg	  fi
605372313efbSmrg	  output_verbose_link_cmd=echo
605472313efbSmrg	else
605572313efbSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
605672313efbSmrg	fi
6057bdcaa8d0Smrg	;;
605872313efbSmrg
6059bdcaa8d0Smrg      osf3* | osf4* | osf5*)
606072313efbSmrg        case $cc_basename in
606172313efbSmrg          KCC*)
606272313efbSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
606372313efbSmrg
606472313efbSmrg	    # KCC will only create a shared library if the output file
606572313efbSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
606672313efbSmrg	    # to its proper name (with version) after linking.
606772313efbSmrg	    _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'
606872313efbSmrg
606972313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
607072313efbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
607172313efbSmrg
607272313efbSmrg	    # Archives containing C++ object files must be created using
607372313efbSmrg	    # the KAI C++ compiler.
607472313efbSmrg	    case $host in
607572313efbSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
607672313efbSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
607772313efbSmrg	    esac
6078bdcaa8d0Smrg	    ;;
607972313efbSmrg          RCC*)
6080bdcaa8d0Smrg	    # Rational C++ 2.4.1
608172313efbSmrg	    # FIXME: insert proper C++ library support
608272313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6083bdcaa8d0Smrg	    ;;
608472313efbSmrg          cxx*)
608572313efbSmrg	    case $host in
608672313efbSmrg	      osf3*)
608772313efbSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
608872313efbSmrg	        _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'
608972313efbSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
609072313efbSmrg		;;
609172313efbSmrg	      *)
609272313efbSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
609372313efbSmrg	        _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'
609472313efbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
609572313efbSmrg	          echo "-hidden">> $lib.exp~
609672313efbSmrg	          $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~
609772313efbSmrg	          $RM $lib.exp'
609872313efbSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
609972313efbSmrg		;;
610072313efbSmrg	    esac
610172313efbSmrg
610272313efbSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
610372313efbSmrg
610472313efbSmrg	    # Commands to make compiler produce verbose output that lists
610572313efbSmrg	    # what "hidden" libraries, object files and flags are used when
610672313efbSmrg	    # linking a shared library.
610772313efbSmrg	    #
610872313efbSmrg	    # There doesn't appear to be a way to prevent this compiler from
610972313efbSmrg	    # explicitly linking system object files so we need to strip them
611072313efbSmrg	    # from the output so that they don't get included in the library
611172313efbSmrg	    # dependencies.
611272313efbSmrg	    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'
6113bdcaa8d0Smrg	    ;;
6114bdcaa8d0Smrg	  *)
611572313efbSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
611672313efbSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
611772313efbSmrg	      case $host in
611872313efbSmrg	        osf3*)
611972313efbSmrg	          _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'
612072313efbSmrg		  ;;
612172313efbSmrg	        *)
612272313efbSmrg	          _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'
612372313efbSmrg		  ;;
612472313efbSmrg	      esac
612572313efbSmrg
612672313efbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
612772313efbSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
612872313efbSmrg
612972313efbSmrg	      # Commands to make compiler produce verbose output that lists
613072313efbSmrg	      # what "hidden" libraries, object files and flags are used when
613172313efbSmrg	      # linking a shared library.
613272313efbSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
613372313efbSmrg
613472313efbSmrg	    else
613572313efbSmrg	      # FIXME: insert proper C++ library support
613672313efbSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
613772313efbSmrg	    fi
6138bdcaa8d0Smrg	    ;;
613972313efbSmrg        esac
614072313efbSmrg        ;;
614172313efbSmrg
6142bdcaa8d0Smrg      psos*)
614372313efbSmrg        # FIXME: insert proper C++ library support
614472313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
614572313efbSmrg        ;;
614672313efbSmrg
614772313efbSmrg      sunos4*)
614872313efbSmrg        case $cc_basename in
614972313efbSmrg          CC*)
615072313efbSmrg	    # Sun C++ 4.x
615172313efbSmrg	    # FIXME: insert proper C++ library support
615272313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
615372313efbSmrg	    ;;
615472313efbSmrg          lcc*)
615572313efbSmrg	    # Lucid
615672313efbSmrg	    # FIXME: insert proper C++ library support
615772313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
615872313efbSmrg	    ;;
615972313efbSmrg          *)
616072313efbSmrg	    # FIXME: insert proper C++ library support
616172313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
616272313efbSmrg	    ;;
616372313efbSmrg        esac
616472313efbSmrg        ;;
616572313efbSmrg
6166bdcaa8d0Smrg      solaris*)
616772313efbSmrg        case $cc_basename in
616872313efbSmrg          CC*)
6169bdcaa8d0Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
617072313efbSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
617172313efbSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
617272313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
617372313efbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
617472313efbSmrg	      $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'
617572313efbSmrg
617672313efbSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
617772313efbSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
617872313efbSmrg	    case $host_os in
617972313efbSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
618072313efbSmrg	      *)
618172313efbSmrg		# The compiler driver will combine and reorder linker options,
618272313efbSmrg		# but understands `-z linker_flag'.
618372313efbSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
618472313efbSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
618572313efbSmrg	        ;;
618672313efbSmrg	    esac
618772313efbSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
618872313efbSmrg
618972313efbSmrg	    output_verbose_link_cmd='echo'
619072313efbSmrg
619172313efbSmrg	    # Archives containing C++ object files must be created using
619272313efbSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
619372313efbSmrg	    # necessary to make sure instantiated templates are included
619472313efbSmrg	    # in the archive.
619572313efbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6196bdcaa8d0Smrg	    ;;
619772313efbSmrg          gcx*)
6198bdcaa8d0Smrg	    # Green Hills C++ Compiler
619972313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
620072313efbSmrg
620172313efbSmrg	    # The C++ compiler must be used to create the archive.
620272313efbSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6203bdcaa8d0Smrg	    ;;
620472313efbSmrg          *)
620572313efbSmrg	    # GNU C++ compiler with Solaris linker
620672313efbSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
620772313efbSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
620872313efbSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
620972313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
621072313efbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
621172313efbSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
621272313efbSmrg
621372313efbSmrg	        # Commands to make compiler produce verbose output that lists
621472313efbSmrg	        # what "hidden" libraries, object files and flags are used when
621572313efbSmrg	        # linking a shared library.
621672313efbSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
621772313efbSmrg	      else
621872313efbSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
621972313efbSmrg	        # platform.
622072313efbSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
622172313efbSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
622272313efbSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
622372313efbSmrg
622472313efbSmrg	        # Commands to make compiler produce verbose output that lists
622572313efbSmrg	        # what "hidden" libraries, object files and flags are used when
622672313efbSmrg	        # linking a shared library.
622772313efbSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
622872313efbSmrg	      fi
622972313efbSmrg
623072313efbSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
623172313efbSmrg	      case $host_os in
623272313efbSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
623372313efbSmrg		*)
623472313efbSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
623572313efbSmrg		  ;;
623672313efbSmrg	      esac
623772313efbSmrg	    fi
6238bdcaa8d0Smrg	    ;;
623972313efbSmrg        esac
624072313efbSmrg        ;;
624172313efbSmrg
624272313efbSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
624372313efbSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
624472313efbSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
624572313efbSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
624672313efbSmrg      runpath_var='LD_RUN_PATH'
624772313efbSmrg
624872313efbSmrg      case $cc_basename in
624972313efbSmrg        CC*)
625072313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625172313efbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625272313efbSmrg	  ;;
625372313efbSmrg	*)
625472313efbSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625572313efbSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
625672313efbSmrg	  ;;
625772313efbSmrg      esac
625872313efbSmrg      ;;
625972313efbSmrg
626072313efbSmrg      sysv5* | sco3.2v5* | sco5v6*)
626172313efbSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
626272313efbSmrg	# link with -lc, and that would cause any symbols used from libc to
626372313efbSmrg	# always be unresolved, which means just about no library would
626472313efbSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
626572313efbSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
626672313efbSmrg	# as -z defs.
626772313efbSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
626872313efbSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
626972313efbSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
627072313efbSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
627172313efbSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
627272313efbSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
627372313efbSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
627472313efbSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
627572313efbSmrg	runpath_var='LD_RUN_PATH'
627672313efbSmrg
6277bdcaa8d0Smrg	case $cc_basename in
627872313efbSmrg          CC*)
627972313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628072313efbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6281bdcaa8d0Smrg	    ;;
6282bdcaa8d0Smrg	  *)
628372313efbSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
628472313efbSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6285bdcaa8d0Smrg	    ;;
6286bdcaa8d0Smrg	esac
628772313efbSmrg      ;;
628872313efbSmrg
6289bdcaa8d0Smrg      tandem*)
629072313efbSmrg        case $cc_basename in
629172313efbSmrg          NCC*)
6292bdcaa8d0Smrg	    # NonStop-UX NCC 3.20
629372313efbSmrg	    # FIXME: insert proper C++ library support
629472313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6295bdcaa8d0Smrg	    ;;
629672313efbSmrg          *)
629772313efbSmrg	    # FIXME: insert proper C++ library support
629872313efbSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6299bdcaa8d0Smrg	    ;;
630072313efbSmrg        esac
630172313efbSmrg        ;;
630272313efbSmrg
6303bdcaa8d0Smrg      vxworks*)
630472313efbSmrg        # FIXME: insert proper C++ library support
630572313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
630672313efbSmrg        ;;
630772313efbSmrg
6308bdcaa8d0Smrg      *)
630972313efbSmrg        # FIXME: insert proper C++ library support
631072313efbSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
631172313efbSmrg        ;;
6312bdcaa8d0Smrg    esac
6313bdcaa8d0Smrg
631472313efbSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
631572313efbSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
631672313efbSmrg
631772313efbSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
631872313efbSmrg    _LT_TAGVAR(LD, $1)="$LD"
631972313efbSmrg
632072313efbSmrg    ## CAVEAT EMPTOR:
632172313efbSmrg    ## There is no encapsulation within the following macros, do not change
632272313efbSmrg    ## the running order or otherwise move them around unless you know exactly
632372313efbSmrg    ## what you are doing...
632472313efbSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
632572313efbSmrg    _LT_COMPILER_PIC($1)
632672313efbSmrg    _LT_COMPILER_C_O($1)
632772313efbSmrg    _LT_COMPILER_FILE_LOCKS($1)
632872313efbSmrg    _LT_LINKER_SHLIBS($1)
632972313efbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
633072313efbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
633172313efbSmrg
633272313efbSmrg    _LT_CONFIG($1)
633372313efbSmrg  fi # test -n "$compiler"
633472313efbSmrg
633572313efbSmrg  CC=$lt_save_CC
633672313efbSmrg  LDCXX=$LD
633772313efbSmrg  LD=$lt_save_LD
633872313efbSmrg  GCC=$lt_save_GCC
633972313efbSmrg  with_gnu_ld=$lt_save_with_gnu_ld
634072313efbSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
634172313efbSmrg  lt_cv_path_LD=$lt_save_path_LD
634272313efbSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
634372313efbSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
634472313efbSmrgfi # test "$_lt_caught_CXX_error" != yes
6345bdcaa8d0Smrg
634672313efbSmrgAC_LANG_POP
634772313efbSmrg])# _LT_LANG_CXX_CONFIG
6348bdcaa8d0Smrg
6349bdcaa8d0Smrg
635072313efbSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
635172313efbSmrg# ---------------------------------
635272313efbSmrg# Figure out "hidden" library dependencies from verbose
635372313efbSmrg# compiler output when linking a shared library.
635472313efbSmrg# Parse the compiler output and extract the necessary
635572313efbSmrg# objects, libraries and library flags.
635672313efbSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
635772313efbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
635872313efbSmrg# Dependencies to place before and after the object being linked:
635972313efbSmrg_LT_TAGVAR(predep_objects, $1)=
636072313efbSmrg_LT_TAGVAR(postdep_objects, $1)=
636172313efbSmrg_LT_TAGVAR(predeps, $1)=
636272313efbSmrg_LT_TAGVAR(postdeps, $1)=
636372313efbSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6364bdcaa8d0Smrg
636572313efbSmrgdnl we can't use the lt_simple_compile_test_code here,
636672313efbSmrgdnl because it contains code intended for an executable,
636772313efbSmrgdnl not a library.  It's possible we should let each
636872313efbSmrgdnl tag define a new lt_????_link_test_code variable,
636972313efbSmrgdnl but it's only used here...
637072313efbSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
637172313efbSmrgint a;
637272313efbSmrgvoid foo (void) { a = 0; }
637372313efbSmrg_LT_EOF
637472313efbSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
637572313efbSmrgclass Foo
637672313efbSmrg{
637772313efbSmrgpublic:
637872313efbSmrg  Foo (void) { a = 0; }
637972313efbSmrgprivate:
638072313efbSmrg  int a;
638172313efbSmrg};
638272313efbSmrg_LT_EOF
638372313efbSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
638472313efbSmrg      subroutine foo
638572313efbSmrg      implicit none
638672313efbSmrg      integer*4 a
638772313efbSmrg      a=0
638872313efbSmrg      return
638972313efbSmrg      end
639072313efbSmrg_LT_EOF
639172313efbSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
639272313efbSmrg      subroutine foo
639372313efbSmrg      implicit none
639472313efbSmrg      integer a
639572313efbSmrg      a=0
639672313efbSmrg      return
639772313efbSmrg      end
639872313efbSmrg_LT_EOF
639972313efbSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
640072313efbSmrgpublic class foo {
640172313efbSmrg  private int a;
640272313efbSmrg  public void bar (void) {
640372313efbSmrg    a = 0;
640472313efbSmrg  }
640572313efbSmrg};
640672313efbSmrg_LT_EOF
640772313efbSmrg])
640872313efbSmrgdnl Parse the compiler output and extract the necessary
640972313efbSmrgdnl objects, libraries and library flags.
641072313efbSmrgif AC_TRY_EVAL(ac_compile); then
641172313efbSmrg  # Parse the compiler output and extract the necessary
641272313efbSmrg  # objects, libraries and library flags.
6413bdcaa8d0Smrg
641472313efbSmrg  # Sentinel used to keep track of whether or not we are before
641572313efbSmrg  # the conftest object file.
641672313efbSmrg  pre_test_object_deps_done=no
6417bdcaa8d0Smrg
641872313efbSmrg  for p in `eval "$output_verbose_link_cmd"`; do
641972313efbSmrg    case $p in
6420bdcaa8d0Smrg
642172313efbSmrg    -L* | -R* | -l*)
642272313efbSmrg       # Some compilers place space between "-{L,R}" and the path.
642372313efbSmrg       # Remove the space.
642472313efbSmrg       if test $p = "-L" ||
642572313efbSmrg          test $p = "-R"; then
642672313efbSmrg	 prev=$p
642772313efbSmrg	 continue
642872313efbSmrg       else
642972313efbSmrg	 prev=
643072313efbSmrg       fi
6431bdcaa8d0Smrg
643272313efbSmrg       if test "$pre_test_object_deps_done" = no; then
643372313efbSmrg	 case $p in
643472313efbSmrg	 -L* | -R*)
643572313efbSmrg	   # Internal compiler library paths should come after those
643672313efbSmrg	   # provided the user.  The postdeps already come after the
643772313efbSmrg	   # user supplied libs so there is no need to process them.
643872313efbSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
643972313efbSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
644072313efbSmrg	   else
644172313efbSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
644272313efbSmrg	   fi
644372313efbSmrg	   ;;
644472313efbSmrg	 # The "-l" case would never come before the object being
644572313efbSmrg	 # linked, so don't bother handling this case.
644672313efbSmrg	 esac
644772313efbSmrg       else
644872313efbSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
644972313efbSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
645072313efbSmrg	 else
645172313efbSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
645272313efbSmrg	 fi
645372313efbSmrg       fi
645472313efbSmrg       ;;
645572313efbSmrg
645672313efbSmrg    *.$objext)
645772313efbSmrg       # This assumes that the test object file only shows up
645872313efbSmrg       # once in the compiler output.
645972313efbSmrg       if test "$p" = "conftest.$objext"; then
646072313efbSmrg	 pre_test_object_deps_done=yes
646172313efbSmrg	 continue
646272313efbSmrg       fi
646372313efbSmrg
646472313efbSmrg       if test "$pre_test_object_deps_done" = no; then
646572313efbSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
646672313efbSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
646772313efbSmrg	 else
646872313efbSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
646972313efbSmrg	 fi
647072313efbSmrg       else
647172313efbSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
647272313efbSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
647372313efbSmrg	 else
647472313efbSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
647572313efbSmrg	 fi
647672313efbSmrg       fi
647772313efbSmrg       ;;
647872313efbSmrg
647972313efbSmrg    *) ;; # Ignore the rest.
648072313efbSmrg
648172313efbSmrg    esac
648272313efbSmrg  done
648372313efbSmrg
648472313efbSmrg  # Clean up.
648572313efbSmrg  rm -f a.out a.exe
648672313efbSmrgelse
648772313efbSmrg  echo "libtool.m4: error: problem compiling $1 test program"
648872313efbSmrgfi
648972313efbSmrg
649072313efbSmrg$RM -f confest.$objext
649172313efbSmrg
649272313efbSmrg# PORTME: override above test on systems where it is broken
649372313efbSmrgm4_if([$1], [CXX],
649472313efbSmrg[case $host_os in
649572313efbSmrginterix[[3-9]]*)
649672313efbSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
649772313efbSmrg  # hack all around it, let's just trust "g++" to DTRT.
649872313efbSmrg  _LT_TAGVAR(predep_objects,$1)=
649972313efbSmrg  _LT_TAGVAR(postdep_objects,$1)=
650072313efbSmrg  _LT_TAGVAR(postdeps,$1)=
650172313efbSmrg  ;;
650272313efbSmrg
650372313efbSmrglinux*)
650472313efbSmrg  case `$CC -V 2>&1 | sed 5q` in
650572313efbSmrg  *Sun\ C*)
650672313efbSmrg    # Sun C++ 5.9
650772313efbSmrg
650872313efbSmrg    # The more standards-conforming stlport4 library is
650972313efbSmrg    # incompatible with the Cstd library. Avoid specifying
651072313efbSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
651172313efbSmrg    # -library=stlport4 depends on it.
651272313efbSmrg    case " $CXX $CXXFLAGS " in
651372313efbSmrg    *" -library=stlport4 "*)
651472313efbSmrg      solaris_use_stlport4=yes
6515bdcaa8d0Smrg      ;;
651672313efbSmrg    esac
6517bdcaa8d0Smrg
651872313efbSmrg    if test "$solaris_use_stlport4" != yes; then
651972313efbSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
652072313efbSmrg    fi
652172313efbSmrg    ;;
652272313efbSmrg  esac
652372313efbSmrg  ;;
652472313efbSmrg
652572313efbSmrgsolaris*)
652672313efbSmrg  case $cc_basename in
652772313efbSmrg  CC*)
652872313efbSmrg    # The more standards-conforming stlport4 library is
652972313efbSmrg    # incompatible with the Cstd library. Avoid specifying
653072313efbSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
653172313efbSmrg    # -library=stlport4 depends on it.
653272313efbSmrg    case " $CXX $CXXFLAGS " in
653372313efbSmrg    *" -library=stlport4 "*)
653472313efbSmrg      solaris_use_stlport4=yes
6535bdcaa8d0Smrg      ;;
6536bdcaa8d0Smrg    esac
653772313efbSmrg
653872313efbSmrg    # Adding this requires a known-good setup of shared libraries for
653972313efbSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
654072313efbSmrg    # archive will be linked into the output, leading to subtle bugs.
654172313efbSmrg    if test "$solaris_use_stlport4" != yes; then
654272313efbSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
654372313efbSmrg    fi
654472313efbSmrg    ;;
654572313efbSmrg  esac
654672313efbSmrg  ;;
654772313efbSmrgesac
654872313efbSmrg])
654972313efbSmrg
655072313efbSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
655172313efbSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
655272313efbSmrgesac
655372313efbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
655472313efbSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
655572313efbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
655672313efbSmrgfi
655772313efbSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
655872313efbSmrg    [The directories searched by this compiler when creating a shared library])
655972313efbSmrg_LT_TAGDECL([], [predep_objects], [1],
656072313efbSmrg    [Dependencies to place before and after the objects being linked to
656172313efbSmrg    create a shared library])
656272313efbSmrg_LT_TAGDECL([], [postdep_objects], [1])
656372313efbSmrg_LT_TAGDECL([], [predeps], [1])
656472313efbSmrg_LT_TAGDECL([], [postdeps], [1])
656572313efbSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
656672313efbSmrg    [The library search path used internally by the compiler when linking
656772313efbSmrg    a shared library])
656872313efbSmrg])# _LT_SYS_HIDDEN_LIBDEPS
656972313efbSmrg
657072313efbSmrg
657172313efbSmrg# _LT_PROG_F77
657272313efbSmrg# ------------
657372313efbSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string
657472313efbSmrg# if there is no fortran compiler, we have our own version here.
657572313efbSmrgm4_defun([_LT_PROG_F77],
657672313efbSmrg[
657772313efbSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
657872313efbSmrgAC_PROG_F77
657972313efbSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
658072313efbSmrg  _lt_disable_F77=yes
658172313efbSmrgfi
658272313efbSmrgpopdef([AC_MSG_ERROR])
658372313efbSmrg])# _LT_PROG_F77
658472313efbSmrg
658572313efbSmrgdnl aclocal-1.4 backwards compatibility:
658672313efbSmrgdnl AC_DEFUN([_LT_PROG_F77], [])
658772313efbSmrg
658872313efbSmrg
658972313efbSmrg# _LT_LANG_F77_CONFIG([TAG])
659072313efbSmrg# --------------------------
659172313efbSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
659272313efbSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
659372313efbSmrg# to write the compiler configuration to `libtool'.
659472313efbSmrgm4_defun([_LT_LANG_F77_CONFIG],
659572313efbSmrg[AC_REQUIRE([_LT_PROG_F77])dnl
659672313efbSmrgAC_LANG_PUSH(Fortran 77)
659772313efbSmrg
659872313efbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
659972313efbSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
660072313efbSmrg_LT_TAGVAR(always_export_symbols, $1)=no
660172313efbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
660272313efbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
660372313efbSmrg_LT_TAGVAR(hardcode_direct, $1)=no
660472313efbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
660572313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
660672313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
660772313efbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
660872313efbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
660972313efbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
661072313efbSmrg_LT_TAGVAR(inherit_rpath, $1)=no
661172313efbSmrg_LT_TAGVAR(module_cmds, $1)=
661272313efbSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
661372313efbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
661472313efbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
661572313efbSmrg_LT_TAGVAR(no_undefined_flag, $1)=
661672313efbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
661772313efbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
661872313efbSmrg
661972313efbSmrg# Source file extension for f77 test sources.
662072313efbSmrgac_ext=f
662172313efbSmrg
662272313efbSmrg# Object file extension for compiled f77 test sources.
662372313efbSmrgobjext=o
662472313efbSmrg_LT_TAGVAR(objext, $1)=$objext
662572313efbSmrg
662672313efbSmrg# No sense in running all these tests if we already determined that
662772313efbSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
662872313efbSmrg# are currently assumed to apply to all compilers on this platform,
662972313efbSmrg# and will be corrupted by setting them based on a non-working compiler.
663072313efbSmrgif test "$_lt_disable_F77" != yes; then
663172313efbSmrg  # Code to be used in simple compile tests
663272313efbSmrg  lt_simple_compile_test_code="\
663372313efbSmrg      subroutine t
663472313efbSmrg      return
663572313efbSmrg      end
663672313efbSmrg"
663772313efbSmrg
663872313efbSmrg  # Code to be used in simple link tests
663972313efbSmrg  lt_simple_link_test_code="\
664072313efbSmrg      program t
664172313efbSmrg      end
664272313efbSmrg"
664372313efbSmrg
664472313efbSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
664572313efbSmrg  _LT_TAG_COMPILER
664672313efbSmrg
664772313efbSmrg  # save warnings/boilerplate of simple test code
664872313efbSmrg  _LT_COMPILER_BOILERPLATE
664972313efbSmrg  _LT_LINKER_BOILERPLATE
665072313efbSmrg
665172313efbSmrg  # Allow CC to be a program name with arguments.
665272313efbSmrg  lt_save_CC="$CC"
665372313efbSmrg  lt_save_GCC=$GCC
665472313efbSmrg  CC=${F77-"f77"}
665572313efbSmrg  compiler=$CC
665672313efbSmrg  _LT_TAGVAR(compiler, $1)=$CC
665772313efbSmrg  _LT_CC_BASENAME([$compiler])
665872313efbSmrg  GCC=$G77
665972313efbSmrg  if test -n "$compiler"; then
666072313efbSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
666172313efbSmrg    AC_MSG_RESULT([$can_build_shared])
666272313efbSmrg
666372313efbSmrg    AC_MSG_CHECKING([whether to build shared libraries])
666472313efbSmrg    test "$can_build_shared" = "no" && enable_shared=no
666572313efbSmrg
666672313efbSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
666772313efbSmrg    # are all built from PIC.
6668bdcaa8d0Smrg    case $host_os in
666972313efbSmrg      aix3*)
667072313efbSmrg        test "$enable_shared" = yes && enable_static=no
667172313efbSmrg        if test -n "$RANLIB"; then
667272313efbSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
667372313efbSmrg          postinstall_cmds='$RANLIB $lib'
667472313efbSmrg        fi
667572313efbSmrg        ;;
667672313efbSmrg      aix[[4-9]]*)
667772313efbSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
667872313efbSmrg	  test "$enable_shared" = yes && enable_static=no
667972313efbSmrg	fi
668072313efbSmrg        ;;
668172313efbSmrg    esac
668272313efbSmrg    AC_MSG_RESULT([$enable_shared])
668372313efbSmrg
668472313efbSmrg    AC_MSG_CHECKING([whether to build static libraries])
668572313efbSmrg    # Make sure either enable_shared or enable_static is yes.
668672313efbSmrg    test "$enable_shared" = yes || enable_static=yes
668772313efbSmrg    AC_MSG_RESULT([$enable_static])
668872313efbSmrg
668972313efbSmrg    _LT_TAGVAR(GCC, $1)="$G77"
669072313efbSmrg    _LT_TAGVAR(LD, $1)="$LD"
669172313efbSmrg
669272313efbSmrg    ## CAVEAT EMPTOR:
669372313efbSmrg    ## There is no encapsulation within the following macros, do not change
669472313efbSmrg    ## the running order or otherwise move them around unless you know exactly
669572313efbSmrg    ## what you are doing...
669672313efbSmrg    _LT_COMPILER_PIC($1)
669772313efbSmrg    _LT_COMPILER_C_O($1)
669872313efbSmrg    _LT_COMPILER_FILE_LOCKS($1)
669972313efbSmrg    _LT_LINKER_SHLIBS($1)
670072313efbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
670172313efbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
670272313efbSmrg
670372313efbSmrg    _LT_CONFIG($1)
670472313efbSmrg  fi # test -n "$compiler"
670572313efbSmrg
670672313efbSmrg  GCC=$lt_save_GCC
670772313efbSmrg  CC="$lt_save_CC"
670872313efbSmrgfi # test "$_lt_disable_F77" != yes
670972313efbSmrg
671072313efbSmrgAC_LANG_POP
671172313efbSmrg])# _LT_LANG_F77_CONFIG
671272313efbSmrg
671372313efbSmrg
671472313efbSmrg# _LT_PROG_FC
671572313efbSmrg# -----------
671672313efbSmrg# Since AC_PROG_FC is broken, in that it returns the empty string
671772313efbSmrg# if there is no fortran compiler, we have our own version here.
671872313efbSmrgm4_defun([_LT_PROG_FC],
671972313efbSmrg[
672072313efbSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
672172313efbSmrgAC_PROG_FC
672272313efbSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
672372313efbSmrg  _lt_disable_FC=yes
672472313efbSmrgfi
672572313efbSmrgpopdef([AC_MSG_ERROR])
672672313efbSmrg])# _LT_PROG_FC
672772313efbSmrg
672872313efbSmrgdnl aclocal-1.4 backwards compatibility:
672972313efbSmrgdnl AC_DEFUN([_LT_PROG_FC], [])
673072313efbSmrg
673172313efbSmrg
673272313efbSmrg# _LT_LANG_FC_CONFIG([TAG])
673372313efbSmrg# -------------------------
673472313efbSmrg# Ensure that the configuration variables for a Fortran compiler are
673572313efbSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
673672313efbSmrg# to write the compiler configuration to `libtool'.
673772313efbSmrgm4_defun([_LT_LANG_FC_CONFIG],
673872313efbSmrg[AC_REQUIRE([_LT_PROG_FC])dnl
673972313efbSmrgAC_LANG_PUSH(Fortran)
674072313efbSmrg
674172313efbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
674272313efbSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
674372313efbSmrg_LT_TAGVAR(always_export_symbols, $1)=no
674472313efbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
674572313efbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
674672313efbSmrg_LT_TAGVAR(hardcode_direct, $1)=no
674772313efbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
674872313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
674972313efbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
675072313efbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
675172313efbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
675272313efbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
675372313efbSmrg_LT_TAGVAR(inherit_rpath, $1)=no
675472313efbSmrg_LT_TAGVAR(module_cmds, $1)=
675572313efbSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
675672313efbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
675772313efbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
675872313efbSmrg_LT_TAGVAR(no_undefined_flag, $1)=
675972313efbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
676072313efbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
676172313efbSmrg
676272313efbSmrg# Source file extension for fc test sources.
676372313efbSmrgac_ext=${ac_fc_srcext-f}
676472313efbSmrg
676572313efbSmrg# Object file extension for compiled fc test sources.
676672313efbSmrgobjext=o
676772313efbSmrg_LT_TAGVAR(objext, $1)=$objext
676872313efbSmrg
676972313efbSmrg# No sense in running all these tests if we already determined that
677072313efbSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
677172313efbSmrg# are currently assumed to apply to all compilers on this platform,
677272313efbSmrg# and will be corrupted by setting them based on a non-working compiler.
677372313efbSmrgif test "$_lt_disable_FC" != yes; then
677472313efbSmrg  # Code to be used in simple compile tests
677572313efbSmrg  lt_simple_compile_test_code="\
677672313efbSmrg      subroutine t
677772313efbSmrg      return
677872313efbSmrg      end
677972313efbSmrg"
678072313efbSmrg
678172313efbSmrg  # Code to be used in simple link tests
678272313efbSmrg  lt_simple_link_test_code="\
678372313efbSmrg      program t
678472313efbSmrg      end
678572313efbSmrg"
678672313efbSmrg
678772313efbSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
678872313efbSmrg  _LT_TAG_COMPILER
678972313efbSmrg
679072313efbSmrg  # save warnings/boilerplate of simple test code
679172313efbSmrg  _LT_COMPILER_BOILERPLATE
679272313efbSmrg  _LT_LINKER_BOILERPLATE
679372313efbSmrg
679472313efbSmrg  # Allow CC to be a program name with arguments.
679572313efbSmrg  lt_save_CC="$CC"
679672313efbSmrg  lt_save_GCC=$GCC
679772313efbSmrg  CC=${FC-"f95"}
679872313efbSmrg  compiler=$CC
679972313efbSmrg  GCC=$ac_cv_fc_compiler_gnu
680072313efbSmrg
680172313efbSmrg  _LT_TAGVAR(compiler, $1)=$CC
680272313efbSmrg  _LT_CC_BASENAME([$compiler])
680372313efbSmrg
680472313efbSmrg  if test -n "$compiler"; then
680572313efbSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
680672313efbSmrg    AC_MSG_RESULT([$can_build_shared])
680772313efbSmrg
680872313efbSmrg    AC_MSG_CHECKING([whether to build shared libraries])
680972313efbSmrg    test "$can_build_shared" = "no" && enable_shared=no
681072313efbSmrg
681172313efbSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
681272313efbSmrg    # are all built from PIC.
681372313efbSmrg    case $host_os in
681472313efbSmrg      aix3*)
681572313efbSmrg        test "$enable_shared" = yes && enable_static=no
681672313efbSmrg        if test -n "$RANLIB"; then
681772313efbSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
681872313efbSmrg          postinstall_cmds='$RANLIB $lib'
681972313efbSmrg        fi
682072313efbSmrg        ;;
682172313efbSmrg      aix[[4-9]]*)
682272313efbSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
682372313efbSmrg	  test "$enable_shared" = yes && enable_static=no
682472313efbSmrg	fi
682572313efbSmrg        ;;
682672313efbSmrg    esac
682772313efbSmrg    AC_MSG_RESULT([$enable_shared])
682872313efbSmrg
682972313efbSmrg    AC_MSG_CHECKING([whether to build static libraries])
683072313efbSmrg    # Make sure either enable_shared or enable_static is yes.
683172313efbSmrg    test "$enable_shared" = yes || enable_static=yes
683272313efbSmrg    AC_MSG_RESULT([$enable_static])
683372313efbSmrg
683472313efbSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
683572313efbSmrg    _LT_TAGVAR(LD, $1)="$LD"
683672313efbSmrg
683772313efbSmrg    ## CAVEAT EMPTOR:
683872313efbSmrg    ## There is no encapsulation within the following macros, do not change
683972313efbSmrg    ## the running order or otherwise move them around unless you know exactly
684072313efbSmrg    ## what you are doing...
684172313efbSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
684272313efbSmrg    _LT_COMPILER_PIC($1)
684372313efbSmrg    _LT_COMPILER_C_O($1)
684472313efbSmrg    _LT_COMPILER_FILE_LOCKS($1)
684572313efbSmrg    _LT_LINKER_SHLIBS($1)
684672313efbSmrg    _LT_SYS_DYNAMIC_LINKER($1)
684772313efbSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
684872313efbSmrg
684972313efbSmrg    _LT_CONFIG($1)
685072313efbSmrg  fi # test -n "$compiler"
685172313efbSmrg
685272313efbSmrg  GCC=$lt_save_GCC
685372313efbSmrg  CC="$lt_save_CC"
685472313efbSmrgfi # test "$_lt_disable_FC" != yes
685572313efbSmrg
685672313efbSmrgAC_LANG_POP
685772313efbSmrg])# _LT_LANG_FC_CONFIG
685872313efbSmrg
685972313efbSmrg
686072313efbSmrg# _LT_LANG_GCJ_CONFIG([TAG])
686172313efbSmrg# --------------------------
686272313efbSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
686372313efbSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
686472313efbSmrg# to write the compiler configuration to `libtool'.
686572313efbSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
686672313efbSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
686772313efbSmrgAC_LANG_SAVE
686872313efbSmrg
686972313efbSmrg# Source file extension for Java test sources.
687072313efbSmrgac_ext=java
687172313efbSmrg
687272313efbSmrg# Object file extension for compiled Java test sources.
687372313efbSmrgobjext=o
687472313efbSmrg_LT_TAGVAR(objext, $1)=$objext
687572313efbSmrg
687672313efbSmrg# Code to be used in simple compile tests
687772313efbSmrglt_simple_compile_test_code="class foo {}"
687872313efbSmrg
687972313efbSmrg# Code to be used in simple link tests
688072313efbSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
688172313efbSmrg
688272313efbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
688372313efbSmrg_LT_TAG_COMPILER
688472313efbSmrg
688572313efbSmrg# save warnings/boilerplate of simple test code
688672313efbSmrg_LT_COMPILER_BOILERPLATE
688772313efbSmrg_LT_LINKER_BOILERPLATE
688872313efbSmrg
688972313efbSmrg# Allow CC to be a program name with arguments.
689072313efbSmrglt_save_CC="$CC"
689172313efbSmrglt_save_GCC=$GCC
689272313efbSmrgGCC=yes
689372313efbSmrgCC=${GCJ-"gcj"}
689472313efbSmrgcompiler=$CC
689572313efbSmrg_LT_TAGVAR(compiler, $1)=$CC
689672313efbSmrg_LT_TAGVAR(LD, $1)="$LD"
689772313efbSmrg_LT_CC_BASENAME([$compiler])
689872313efbSmrg
689972313efbSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
690072313efbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
690172313efbSmrg
690272313efbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
690372313efbSmrg
690472313efbSmrgif test -n "$compiler"; then
690572313efbSmrg  _LT_COMPILER_NO_RTTI($1)
690672313efbSmrg  _LT_COMPILER_PIC($1)
690772313efbSmrg  _LT_COMPILER_C_O($1)
690872313efbSmrg  _LT_COMPILER_FILE_LOCKS($1)
690972313efbSmrg  _LT_LINKER_SHLIBS($1)
691072313efbSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
691172313efbSmrg
691272313efbSmrg  _LT_CONFIG($1)
691372313efbSmrgfi
691472313efbSmrg
691572313efbSmrgAC_LANG_RESTORE
691672313efbSmrg
691772313efbSmrgGCC=$lt_save_GCC
691872313efbSmrgCC="$lt_save_CC"
691972313efbSmrg])# _LT_LANG_GCJ_CONFIG
692072313efbSmrg
692172313efbSmrg
692272313efbSmrg# _LT_LANG_RC_CONFIG([TAG])
692372313efbSmrg# -------------------------
692472313efbSmrg# Ensure that the configuration variables for the Windows resource compiler
692572313efbSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
692672313efbSmrg# to write the compiler configuration to `libtool'.
692772313efbSmrgm4_defun([_LT_LANG_RC_CONFIG],
692872313efbSmrg[AC_REQUIRE([LT_PROG_RC])dnl
692972313efbSmrgAC_LANG_SAVE
693072313efbSmrg
693172313efbSmrg# Source file extension for RC test sources.
693272313efbSmrgac_ext=rc
693372313efbSmrg
693472313efbSmrg# Object file extension for compiled RC test sources.
693572313efbSmrgobjext=o
693672313efbSmrg_LT_TAGVAR(objext, $1)=$objext
693772313efbSmrg
693872313efbSmrg# Code to be used in simple compile tests
693972313efbSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
694072313efbSmrg
694172313efbSmrg# Code to be used in simple link tests
694272313efbSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
694372313efbSmrg
694472313efbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
694572313efbSmrg_LT_TAG_COMPILER
694672313efbSmrg
694772313efbSmrg# save warnings/boilerplate of simple test code
694872313efbSmrg_LT_COMPILER_BOILERPLATE
694972313efbSmrg_LT_LINKER_BOILERPLATE
695072313efbSmrg
695172313efbSmrg# Allow CC to be a program name with arguments.
695272313efbSmrglt_save_CC="$CC"
695372313efbSmrglt_save_GCC=$GCC
695472313efbSmrgGCC=
695572313efbSmrgCC=${RC-"windres"}
695672313efbSmrgcompiler=$CC
695772313efbSmrg_LT_TAGVAR(compiler, $1)=$CC
695872313efbSmrg_LT_CC_BASENAME([$compiler])
695972313efbSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6960bdcaa8d0Smrg
696172313efbSmrgif test -n "$compiler"; then
696272313efbSmrg  :
696372313efbSmrg  _LT_CONFIG($1)
696472313efbSmrgfi
6965bdcaa8d0Smrg
696672313efbSmrgGCC=$lt_save_GCC
696772313efbSmrgAC_LANG_RESTORE
696872313efbSmrgCC="$lt_save_CC"
696972313efbSmrg])# _LT_LANG_RC_CONFIG
6970bdcaa8d0Smrg
6971bdcaa8d0Smrg
697272313efbSmrg# LT_PROG_GCJ
697372313efbSmrg# -----------
697472313efbSmrgAC_DEFUN([LT_PROG_GCJ],
697572313efbSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
697672313efbSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
697772313efbSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
697872313efbSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
697972313efbSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
698072313efbSmrg])
6981bdcaa8d0Smrg
698272313efbSmrg# Old name:
698372313efbSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
698472313efbSmrgdnl aclocal-1.4 backwards compatibility:
698572313efbSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6986bdcaa8d0Smrg
6987bdcaa8d0Smrg
698872313efbSmrg# LT_PROG_RC
698972313efbSmrg# ----------
699072313efbSmrgAC_DEFUN([LT_PROG_RC],
699172313efbSmrg[AC_CHECK_TOOL(RC, windres,)
699272313efbSmrg])
6993bdcaa8d0Smrg
699472313efbSmrg# Old name:
699572313efbSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
699672313efbSmrgdnl aclocal-1.4 backwards compatibility:
699772313efbSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
6998bdcaa8d0Smrg
6999bdcaa8d0Smrg
700072313efbSmrg# _LT_DECL_EGREP
700172313efbSmrg# --------------
700272313efbSmrg# If we don't have a new enough Autoconf to choose the best grep
700372313efbSmrg# available, choose the one first in the user's PATH.
700472313efbSmrgm4_defun([_LT_DECL_EGREP],
700572313efbSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
700672313efbSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
700772313efbSmrgtest -z "$GREP" && GREP=grep
700872313efbSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
700972313efbSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
701072313efbSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
701172313efbSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
701272313efbSmrgAC_SUBST([GREP])
701372313efbSmrg])
7014bdcaa8d0Smrg
7015bdcaa8d0Smrg
701672313efbSmrg# _LT_DECL_OBJDUMP
701772313efbSmrg# --------------
701872313efbSmrg# If we don't have a new enough Autoconf to choose the best objdump
701972313efbSmrg# available, choose the one first in the user's PATH.
702072313efbSmrgm4_defun([_LT_DECL_OBJDUMP],
702172313efbSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
702272313efbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
702372313efbSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
702472313efbSmrgAC_SUBST([OBJDUMP])
702572313efbSmrg])
7026bdcaa8d0Smrg
7027bdcaa8d0Smrg
702872313efbSmrg# _LT_DECL_SED
702972313efbSmrg# ------------
703072313efbSmrg# Check for a fully-functional sed program, that truncates
703172313efbSmrg# as few characters as possible.  Prefer GNU sed if found.
703272313efbSmrgm4_defun([_LT_DECL_SED],
703372313efbSmrg[AC_PROG_SED
703472313efbSmrgtest -z "$SED" && SED=sed
703572313efbSmrgXsed="$SED -e 1s/^X//"
703672313efbSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
703772313efbSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
703872313efbSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
703972313efbSmrg])# _LT_DECL_SED
704072313efbSmrg
704172313efbSmrgm4_ifndef([AC_PROG_SED], [
704272313efbSmrg# NOTE: This macro has been submitted for inclusion into   #
704372313efbSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
704472313efbSmrg#  a released version of Autoconf we should remove this    #
704572313efbSmrg#  macro and use it instead.                               #
704672313efbSmrg
704772313efbSmrgm4_defun([AC_PROG_SED],
704872313efbSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
704972313efbSmrgAC_CACHE_VAL(lt_cv_path_SED,
705072313efbSmrg[# Loop through the user's path and test for sed and gsed.
705172313efbSmrg# Then use that list of sed's as ones to test for truncation.
705272313efbSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
705372313efbSmrgfor as_dir in $PATH
705472313efbSmrgdo
705572313efbSmrg  IFS=$as_save_IFS
705672313efbSmrg  test -z "$as_dir" && as_dir=.
705772313efbSmrg  for lt_ac_prog in sed gsed; do
705872313efbSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
705972313efbSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
706072313efbSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
706172313efbSmrg      fi
706272313efbSmrg    done
706372313efbSmrg  done
706472313efbSmrgdone
706572313efbSmrgIFS=$as_save_IFS
706672313efbSmrglt_ac_max=0
706772313efbSmrglt_ac_count=0
706872313efbSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
706972313efbSmrg# along with /bin/sed that truncates output.
707072313efbSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
707172313efbSmrg  test ! -f $lt_ac_sed && continue
707272313efbSmrg  cat /dev/null > conftest.in
707372313efbSmrg  lt_ac_count=0
707472313efbSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
707572313efbSmrg  # Check for GNU sed and select it if it is found.
707672313efbSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
707772313efbSmrg    lt_cv_path_SED=$lt_ac_sed
707872313efbSmrg    break
7079bdcaa8d0Smrg  fi
708072313efbSmrg  while true; do
708172313efbSmrg    cat conftest.in conftest.in >conftest.tmp
708272313efbSmrg    mv conftest.tmp conftest.in
708372313efbSmrg    cp conftest.in conftest.nl
708472313efbSmrg    echo >>conftest.nl
708572313efbSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
708672313efbSmrg    cmp -s conftest.out conftest.nl || break
708772313efbSmrg    # 10000 chars as input seems more than enough
708872313efbSmrg    test $lt_ac_count -gt 10 && break
708972313efbSmrg    lt_ac_count=`expr $lt_ac_count + 1`
709072313efbSmrg    if test $lt_ac_count -gt $lt_ac_max; then
709172313efbSmrg      lt_ac_max=$lt_ac_count
709272313efbSmrg      lt_cv_path_SED=$lt_ac_sed
709372313efbSmrg    fi
709472313efbSmrg  done
709572313efbSmrgdone
7096bdcaa8d0Smrg])
709772313efbSmrgSED=$lt_cv_path_SED
709872313efbSmrgAC_SUBST([SED])
709972313efbSmrgAC_MSG_RESULT([$SED])
710072313efbSmrg])#AC_PROG_SED
710172313efbSmrg])#m4_ifndef
7102bdcaa8d0Smrg
710372313efbSmrg# Old name:
710472313efbSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
710572313efbSmrgdnl aclocal-1.4 backwards compatibility:
710672313efbSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
710772313efbSmrg
710872313efbSmrg
710972313efbSmrg# _LT_CHECK_SHELL_FEATURES
711072313efbSmrg# ------------------------
711172313efbSmrg# Find out whether the shell is Bourne or XSI compatible,
711272313efbSmrg# or has some other useful features.
711372313efbSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
711472313efbSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
711572313efbSmrg# Try some XSI features
711672313efbSmrgxsi_shell=no
711772313efbSmrg( _lt_dummy="a/b/c"
711872313efbSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
711972313efbSmrg      = c,a/b,, \
712072313efbSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
712172313efbSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
712272313efbSmrg  && xsi_shell=yes
712372313efbSmrgAC_MSG_RESULT([$xsi_shell])
712472313efbSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
712572313efbSmrg
712672313efbSmrgAC_MSG_CHECKING([whether the shell understands "+="])
712772313efbSmrglt_shell_append=no
712872313efbSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
712972313efbSmrg    >/dev/null 2>&1 \
713072313efbSmrg  && lt_shell_append=yes
713172313efbSmrgAC_MSG_RESULT([$lt_shell_append])
713272313efbSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
713372313efbSmrg
713472313efbSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
713572313efbSmrg  lt_unset=unset
713672313efbSmrgelse
713772313efbSmrg  lt_unset=false
7138bdcaa8d0Smrgfi
713972313efbSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
714072313efbSmrg
714172313efbSmrg# test EBCDIC or ASCII
714272313efbSmrgcase `echo X|tr X '\101'` in
714372313efbSmrg A) # ASCII based system
714472313efbSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
714572313efbSmrg  lt_SP2NL='tr \040 \012'
714672313efbSmrg  lt_NL2SP='tr \015\012 \040\040'
714772313efbSmrg  ;;
714872313efbSmrg *) # EBCDIC based system
714972313efbSmrg  lt_SP2NL='tr \100 \n'
715072313efbSmrg  lt_NL2SP='tr \r\n \100\100'
715172313efbSmrg  ;;
7152bdcaa8d0Smrgesac
715372313efbSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
715472313efbSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
715572313efbSmrg])# _LT_CHECK_SHELL_FEATURES
7156bdcaa8d0Smrg
7157bdcaa8d0Smrg
715872313efbSmrg# _LT_PROG_XSI_SHELLFNS
715972313efbSmrg# ---------------------
716072313efbSmrg# Bourne and XSI compatible variants of some useful shell functions.
716172313efbSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
716272313efbSmrg[case $xsi_shell in
716372313efbSmrg  yes)
716472313efbSmrg    cat << \_LT_EOF >> "$cfgfile"
716572313efbSmrg
716672313efbSmrg# func_dirname file append nondir_replacement
716772313efbSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
716872313efbSmrg# otherwise set result to NONDIR_REPLACEMENT.
716972313efbSmrgfunc_dirname ()
717072313efbSmrg{
717172313efbSmrg  case ${1} in
717272313efbSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
717372313efbSmrg    *  ) func_dirname_result="${3}" ;;
717472313efbSmrg  esac
717572313efbSmrg}
717672313efbSmrg
717772313efbSmrg# func_basename file
717872313efbSmrgfunc_basename ()
717972313efbSmrg{
718072313efbSmrg  func_basename_result="${1##*/}"
718172313efbSmrg}
7182bdcaa8d0Smrg
718372313efbSmrg# func_dirname_and_basename file append nondir_replacement
718472313efbSmrg# perform func_basename and func_dirname in a single function
718572313efbSmrg# call:
718672313efbSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
718772313efbSmrg#             add APPEND to the result, otherwise set result
718872313efbSmrg#             to NONDIR_REPLACEMENT.
718972313efbSmrg#             value returned in "$func_dirname_result"
719072313efbSmrg#   basename: Compute filename of FILE.
719172313efbSmrg#             value retuned in "$func_basename_result"
719272313efbSmrg# Implementation must be kept synchronized with func_dirname
719372313efbSmrg# and func_basename. For efficiency, we do not delegate to
719472313efbSmrg# those functions but instead duplicate the functionality here.
719572313efbSmrgfunc_dirname_and_basename ()
719672313efbSmrg{
719772313efbSmrg  case ${1} in
719872313efbSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
719972313efbSmrg    *  ) func_dirname_result="${3}" ;;
7200bdcaa8d0Smrg  esac
720172313efbSmrg  func_basename_result="${1##*/}"
720272313efbSmrg}
720372313efbSmrg
720472313efbSmrg# func_stripname prefix suffix name
720572313efbSmrg# strip PREFIX and SUFFIX off of NAME.
720672313efbSmrg# PREFIX and SUFFIX must not contain globbing or regex special
720772313efbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
720872313efbSmrg# dot (in which case that matches only a dot).
720972313efbSmrgfunc_stripname ()
721072313efbSmrg{
721172313efbSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
721272313efbSmrg  # positional parameters, so assign one to ordinary parameter first.
721372313efbSmrg  func_stripname_result=${3}
721472313efbSmrg  func_stripname_result=${func_stripname_result#"${1}"}
721572313efbSmrg  func_stripname_result=${func_stripname_result%"${2}"}
721672313efbSmrg}
721772313efbSmrg
721872313efbSmrg# func_opt_split
721972313efbSmrgfunc_opt_split ()
722072313efbSmrg{
722172313efbSmrg  func_opt_split_opt=${1%%=*}
722272313efbSmrg  func_opt_split_arg=${1#*=}
722372313efbSmrg}
722472313efbSmrg
722572313efbSmrg# func_lo2o object
722672313efbSmrgfunc_lo2o ()
722772313efbSmrg{
722872313efbSmrg  case ${1} in
722972313efbSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
723072313efbSmrg    *)    func_lo2o_result=${1} ;;
7231bdcaa8d0Smrg  esac
723272313efbSmrg}
7233bdcaa8d0Smrg
723472313efbSmrg# func_xform libobj-or-source
723572313efbSmrgfunc_xform ()
723672313efbSmrg{
723772313efbSmrg  func_xform_result=${1%.*}.lo
723872313efbSmrg}
7239bdcaa8d0Smrg
724072313efbSmrg# func_arith arithmetic-term...
724172313efbSmrgfunc_arith ()
724272313efbSmrg{
724372313efbSmrg  func_arith_result=$(( $[*] ))
724472313efbSmrg}
724572313efbSmrg
724672313efbSmrg# func_len string
724772313efbSmrg# STRING may not start with a hyphen.
724872313efbSmrgfunc_len ()
724972313efbSmrg{
725072313efbSmrg  func_len_result=${#1}
725172313efbSmrg}
725272313efbSmrg
725372313efbSmrg_LT_EOF
725472313efbSmrg    ;;
725572313efbSmrg  *) # Bourne compatible functions.
725672313efbSmrg    cat << \_LT_EOF >> "$cfgfile"
725772313efbSmrg
725872313efbSmrg# func_dirname file append nondir_replacement
725972313efbSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
726072313efbSmrg# otherwise set result to NONDIR_REPLACEMENT.
726172313efbSmrgfunc_dirname ()
726272313efbSmrg{
726372313efbSmrg  # Extract subdirectory from the argument.
726472313efbSmrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
726572313efbSmrg  if test "X$func_dirname_result" = "X${1}"; then
726672313efbSmrg    func_dirname_result="${3}"
726772313efbSmrg  else
726872313efbSmrg    func_dirname_result="$func_dirname_result${2}"
726972313efbSmrg  fi
727072313efbSmrg}
727172313efbSmrg
727272313efbSmrg# func_basename file
727372313efbSmrgfunc_basename ()
727472313efbSmrg{
727572313efbSmrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
727672313efbSmrg}
727772313efbSmrg
727872313efbSmrgdnl func_dirname_and_basename
727972313efbSmrgdnl A portable version of this function is already defined in general.m4sh
728072313efbSmrgdnl so there is no need for it here.
728172313efbSmrg
728272313efbSmrg# func_stripname prefix suffix name
728372313efbSmrg# strip PREFIX and SUFFIX off of NAME.
728472313efbSmrg# PREFIX and SUFFIX must not contain globbing or regex special
728572313efbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
728672313efbSmrg# dot (in which case that matches only a dot).
728772313efbSmrg# func_strip_suffix prefix name
728872313efbSmrgfunc_stripname ()
728972313efbSmrg{
729072313efbSmrg  case ${2} in
729172313efbSmrg    .*) func_stripname_result=`$ECHO "X${3}" \
729272313efbSmrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
729372313efbSmrg    *)  func_stripname_result=`$ECHO "X${3}" \
729472313efbSmrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
729572313efbSmrg  esac
729672313efbSmrg}
7297bdcaa8d0Smrg
729872313efbSmrg# sed scripts:
729972313efbSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
730072313efbSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7301bdcaa8d0Smrg
730272313efbSmrg# func_opt_split
730372313efbSmrgfunc_opt_split ()
730472313efbSmrg{
730572313efbSmrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
730672313efbSmrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
730772313efbSmrg}
7308bdcaa8d0Smrg
730972313efbSmrg# func_lo2o object
731072313efbSmrgfunc_lo2o ()
731172313efbSmrg{
731272313efbSmrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
731372313efbSmrg}
7314bdcaa8d0Smrg
731572313efbSmrg# func_xform libobj-or-source
731672313efbSmrgfunc_xform ()
731772313efbSmrg{
731872313efbSmrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
731972313efbSmrg}
7320bdcaa8d0Smrg
732172313efbSmrg# func_arith arithmetic-term...
732272313efbSmrgfunc_arith ()
732372313efbSmrg{
732472313efbSmrg  func_arith_result=`expr "$[@]"`
732572313efbSmrg}
7326bdcaa8d0Smrg
732772313efbSmrg# func_len string
732872313efbSmrg# STRING may not start with a hyphen.
732972313efbSmrgfunc_len ()
733072313efbSmrg{
733172313efbSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
733272313efbSmrg}
7333bdcaa8d0Smrg
733472313efbSmrg_LT_EOF
733572313efbSmrgesac
7336bdcaa8d0Smrg
733772313efbSmrgcase $lt_shell_append in
733872313efbSmrg  yes)
733972313efbSmrg    cat << \_LT_EOF >> "$cfgfile"
7340bdcaa8d0Smrg
734172313efbSmrg# func_append var value
734272313efbSmrg# Append VALUE to the end of shell variable VAR.
734372313efbSmrgfunc_append ()
734472313efbSmrg{
734572313efbSmrg  eval "$[1]+=\$[2]"
734672313efbSmrg}
734772313efbSmrg_LT_EOF
734872313efbSmrg    ;;
734972313efbSmrg  *)
735072313efbSmrg    cat << \_LT_EOF >> "$cfgfile"
7351bdcaa8d0Smrg
735272313efbSmrg# func_append var value
735372313efbSmrg# Append VALUE to the end of shell variable VAR.
735472313efbSmrgfunc_append ()
735572313efbSmrg{
735672313efbSmrg  eval "$[1]=\$$[1]\$[2]"
735772313efbSmrg}
7358bdcaa8d0Smrg
735972313efbSmrg_LT_EOF
736072313efbSmrg    ;;
736172313efbSmrg  esac
736272313efbSmrg])
7363bdcaa8d0Smrg
736472313efbSmrg# Helper functions for option handling.                    -*- Autoconf -*-
736572313efbSmrg#
736672313efbSmrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
736772313efbSmrg#   Written by Gary V. Vaughan, 2004
736872313efbSmrg#
736972313efbSmrg# This file is free software; the Free Software Foundation gives
737072313efbSmrg# unlimited permission to copy and/or distribute it, with or without
737172313efbSmrg# modifications, as long as this notice is preserved.
7372bdcaa8d0Smrg
737372313efbSmrg# serial 6 ltoptions.m4
7374bdcaa8d0Smrg
737572313efbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
737672313efbSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7377bdcaa8d0Smrg
7378bdcaa8d0Smrg
737972313efbSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
738072313efbSmrg# ------------------------------------------
738172313efbSmrgm4_define([_LT_MANGLE_OPTION],
738272313efbSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7383bdcaa8d0Smrg
7384bdcaa8d0Smrg
738572313efbSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
738672313efbSmrg# ---------------------------------------
738772313efbSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
738872313efbSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
738972313efbSmrg# saved as a flag.
739072313efbSmrgm4_define([_LT_SET_OPTION],
739172313efbSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
739272313efbSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
739372313efbSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
739472313efbSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
739572313efbSmrg])
7396bdcaa8d0Smrg
7397bdcaa8d0Smrg
739872313efbSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
739972313efbSmrg# ------------------------------------------------------------
740072313efbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
740172313efbSmrgm4_define([_LT_IF_OPTION],
740272313efbSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
740372313efbSmrg
740472313efbSmrg
740572313efbSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
740672313efbSmrg# -------------------------------------------------------
740772313efbSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
740872313efbSmrg# are set.
740972313efbSmrgm4_define([_LT_UNLESS_OPTIONS],
741072313efbSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
741172313efbSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
741272313efbSmrg		      [m4_define([$0_found])])])[]dnl
741372313efbSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
741472313efbSmrg])[]dnl
741572313efbSmrg])
7416bdcaa8d0Smrg
7417bdcaa8d0Smrg
741872313efbSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
741972313efbSmrg# ----------------------------------------
742072313efbSmrg# OPTION-LIST is a space-separated list of Libtool options associated
742172313efbSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
742272313efbSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
742372313efbSmrg# the unknown option and exit.
742472313efbSmrgm4_defun([_LT_SET_OPTIONS],
742572313efbSmrg[# Set options
742672313efbSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
742772313efbSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
742872313efbSmrg
742972313efbSmrgm4_if([$1],[LT_INIT],[
743072313efbSmrg  dnl
743172313efbSmrg  dnl Simply set some default values (i.e off) if boolean options were not
743272313efbSmrg  dnl specified:
743372313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
743472313efbSmrg  ])
743572313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
743672313efbSmrg  ])
743772313efbSmrg  dnl
743872313efbSmrg  dnl If no reference was made to various pairs of opposing options, then
743972313efbSmrg  dnl we run the default mode handler for the pair.  For example, if neither
744072313efbSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
744172313efbSmrg  dnl archives by default:
744272313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
744372313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
744472313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
744572313efbSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
744672313efbSmrg  		   [_LT_ENABLE_FAST_INSTALL])
744772313efbSmrg  ])
744872313efbSmrg])# _LT_SET_OPTIONS
7449bdcaa8d0Smrg
7450bdcaa8d0Smrg
7451bdcaa8d0Smrg
745272313efbSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
745372313efbSmrg# -----------------------------------------
745472313efbSmrgm4_define([_LT_MANGLE_DEFUN],
745572313efbSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7456bdcaa8d0Smrg
7457bdcaa8d0Smrg
745872313efbSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
745972313efbSmrg# -----------------------------------------------
746072313efbSmrgm4_define([LT_OPTION_DEFINE],
746172313efbSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
746272313efbSmrg])# LT_OPTION_DEFINE
7463bdcaa8d0Smrg
7464bdcaa8d0Smrg
746572313efbSmrg# dlopen
746672313efbSmrg# ------
746772313efbSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
746872313efbSmrg])
7469bdcaa8d0Smrg
747072313efbSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
747172313efbSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
747272313efbSmrgAC_DIAGNOSE([obsolete],
747372313efbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
747472313efbSmrgput the `dlopen' option into LT_INIT's first parameter.])
747572313efbSmrg])
7476bdcaa8d0Smrg
747772313efbSmrgdnl aclocal-1.4 backwards compatibility:
747872313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7479bdcaa8d0Smrg
7480bdcaa8d0Smrg
748172313efbSmrg# win32-dll
748272313efbSmrg# ---------
748372313efbSmrg# Declare package support for building win32 dll's.
748472313efbSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
748572313efbSmrg[enable_win32_dll=yes
748672313efbSmrg
748772313efbSmrgcase $host in
748872313efbSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
748972313efbSmrg  AC_CHECK_TOOL(AS, as, false)
749072313efbSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
749172313efbSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
749272313efbSmrg  ;;
749372313efbSmrgesac
7494bdcaa8d0Smrg
749572313efbSmrgtest -z "$AS" && AS=as
749672313efbSmrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7497bdcaa8d0Smrg
749872313efbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
749972313efbSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7500bdcaa8d0Smrg
750172313efbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
750272313efbSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
750372313efbSmrg])# win32-dll
7504bdcaa8d0Smrg
750572313efbSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
750672313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
750772313efbSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
750872313efbSmrgAC_DIAGNOSE([obsolete],
750972313efbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
751072313efbSmrgput the `win32-dll' option into LT_INIT's first parameter.])
751172313efbSmrg])
7512bdcaa8d0Smrg
751372313efbSmrgdnl aclocal-1.4 backwards compatibility:
751472313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7515bdcaa8d0Smrg
7516bdcaa8d0Smrg
751772313efbSmrg# _LT_ENABLE_SHARED([DEFAULT])
751872313efbSmrg# ----------------------------
751972313efbSmrg# implement the --enable-shared flag, and supports the `shared' and
752072313efbSmrg# `disable-shared' LT_INIT options.
752172313efbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
752272313efbSmrgm4_define([_LT_ENABLE_SHARED],
752372313efbSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
752472313efbSmrgAC_ARG_ENABLE([shared],
752572313efbSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
752672313efbSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
752772313efbSmrg    [p=${PACKAGE-default}
752872313efbSmrg    case $enableval in
752972313efbSmrg    yes) enable_shared=yes ;;
753072313efbSmrg    no) enable_shared=no ;;
753172313efbSmrg    *)
753272313efbSmrg      enable_shared=no
753372313efbSmrg      # Look at the argument we got.  We use all the common list separators.
753472313efbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
753572313efbSmrg      for pkg in $enableval; do
753672313efbSmrg	IFS="$lt_save_ifs"
753772313efbSmrg	if test "X$pkg" = "X$p"; then
753872313efbSmrg	  enable_shared=yes
753972313efbSmrg	fi
754072313efbSmrg      done
754172313efbSmrg      IFS="$lt_save_ifs"
7542bdcaa8d0Smrg      ;;
754372313efbSmrg    esac],
754472313efbSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7545bdcaa8d0Smrg
754672313efbSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
754772313efbSmrg	[Whether or not to build shared libraries])
754872313efbSmrg])# _LT_ENABLE_SHARED
7549bdcaa8d0Smrg
755072313efbSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
755172313efbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7552bdcaa8d0Smrg
755372313efbSmrg# Old names:
755472313efbSmrgAC_DEFUN([AC_ENABLE_SHARED],
755572313efbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
755672313efbSmrg])
7557bdcaa8d0Smrg
755872313efbSmrgAC_DEFUN([AC_DISABLE_SHARED],
755972313efbSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
756072313efbSmrg])
7561bdcaa8d0Smrg
756272313efbSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
756372313efbSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7564bdcaa8d0Smrg
756572313efbSmrgdnl aclocal-1.4 backwards compatibility:
756672313efbSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
756772313efbSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7568bdcaa8d0Smrg
7569bdcaa8d0Smrg
7570bdcaa8d0Smrg
757172313efbSmrg# _LT_ENABLE_STATIC([DEFAULT])
757272313efbSmrg# ----------------------------
757372313efbSmrg# implement the --enable-static flag, and support the `static' and
757472313efbSmrg# `disable-static' LT_INIT options.
757572313efbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
757672313efbSmrgm4_define([_LT_ENABLE_STATIC],
757772313efbSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
757872313efbSmrgAC_ARG_ENABLE([static],
757972313efbSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
758072313efbSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
758172313efbSmrg    [p=${PACKAGE-default}
758272313efbSmrg    case $enableval in
758372313efbSmrg    yes) enable_static=yes ;;
758472313efbSmrg    no) enable_static=no ;;
758572313efbSmrg    *)
758672313efbSmrg     enable_static=no
758772313efbSmrg      # Look at the argument we got.  We use all the common list separators.
758872313efbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
758972313efbSmrg      for pkg in $enableval; do
759072313efbSmrg	IFS="$lt_save_ifs"
759172313efbSmrg	if test "X$pkg" = "X$p"; then
759272313efbSmrg	  enable_static=yes
759372313efbSmrg	fi
759472313efbSmrg      done
759572313efbSmrg      IFS="$lt_save_ifs"
7596bdcaa8d0Smrg      ;;
759772313efbSmrg    esac],
759872313efbSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7599bdcaa8d0Smrg
760072313efbSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
760172313efbSmrg	[Whether or not to build static libraries])
760272313efbSmrg])# _LT_ENABLE_STATIC
7603bdcaa8d0Smrg
760472313efbSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
760572313efbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7606bdcaa8d0Smrg
760772313efbSmrg# Old names:
760872313efbSmrgAC_DEFUN([AC_ENABLE_STATIC],
760972313efbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
761072313efbSmrg])
7611bdcaa8d0Smrg
761272313efbSmrgAC_DEFUN([AC_DISABLE_STATIC],
761372313efbSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
761472313efbSmrg])
7615bdcaa8d0Smrg
761672313efbSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
761772313efbSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7618bdcaa8d0Smrg
761972313efbSmrgdnl aclocal-1.4 backwards compatibility:
762072313efbSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
762172313efbSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7622bdcaa8d0Smrg
7623bdcaa8d0Smrg
7624bdcaa8d0Smrg
762572313efbSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
762672313efbSmrg# ----------------------------------
762772313efbSmrg# implement the --enable-fast-install flag, and support the `fast-install'
762872313efbSmrg# and `disable-fast-install' LT_INIT options.
762972313efbSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
763072313efbSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
763172313efbSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
763272313efbSmrgAC_ARG_ENABLE([fast-install],
763372313efbSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
763472313efbSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
763572313efbSmrg    [p=${PACKAGE-default}
763672313efbSmrg    case $enableval in
763772313efbSmrg    yes) enable_fast_install=yes ;;
763872313efbSmrg    no) enable_fast_install=no ;;
763972313efbSmrg    *)
764072313efbSmrg      enable_fast_install=no
764172313efbSmrg      # Look at the argument we got.  We use all the common list separators.
764272313efbSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
764372313efbSmrg      for pkg in $enableval; do
764472313efbSmrg	IFS="$lt_save_ifs"
764572313efbSmrg	if test "X$pkg" = "X$p"; then
764672313efbSmrg	  enable_fast_install=yes
764772313efbSmrg	fi
764872313efbSmrg      done
764972313efbSmrg      IFS="$lt_save_ifs"
7650bdcaa8d0Smrg      ;;
765172313efbSmrg    esac],
765272313efbSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7653bdcaa8d0Smrg
765472313efbSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
765572313efbSmrg	 [Whether or not to optimize for fast installation])dnl
765672313efbSmrg])# _LT_ENABLE_FAST_INSTALL
7657bdcaa8d0Smrg
765872313efbSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
765972313efbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7660bdcaa8d0Smrg
766172313efbSmrg# Old names:
766272313efbSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
766372313efbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
766472313efbSmrgAC_DIAGNOSE([obsolete],
766572313efbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
766672313efbSmrgthe `fast-install' option into LT_INIT's first parameter.])
766772313efbSmrg])
7668bdcaa8d0Smrg
766972313efbSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
767072313efbSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
767172313efbSmrgAC_DIAGNOSE([obsolete],
767272313efbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
767372313efbSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7674bdcaa8d0Smrg])
7675bdcaa8d0Smrg
767672313efbSmrgdnl aclocal-1.4 backwards compatibility:
767772313efbSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
767872313efbSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7679bdcaa8d0Smrg
7680bdcaa8d0Smrg
768172313efbSmrg# _LT_WITH_PIC([MODE])
768272313efbSmrg# --------------------
768372313efbSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
768472313efbSmrg# LT_INIT options.
768572313efbSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
768672313efbSmrgm4_define([_LT_WITH_PIC],
768772313efbSmrg[AC_ARG_WITH([pic],
768872313efbSmrg    [AS_HELP_STRING([--with-pic],
768972313efbSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
769072313efbSmrg    [pic_mode="$withval"],
769172313efbSmrg    [pic_mode=default])
769272313efbSmrg
769372313efbSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
769472313efbSmrg
769572313efbSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
769672313efbSmrg])# _LT_WITH_PIC
769772313efbSmrg
769872313efbSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
769972313efbSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
770072313efbSmrg
770172313efbSmrg# Old name:
770272313efbSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
770372313efbSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
770472313efbSmrgAC_DIAGNOSE([obsolete],
770572313efbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
770672313efbSmrgput the `pic-only' option into LT_INIT's first parameter.])
770772313efbSmrg])
7708bdcaa8d0Smrg
770972313efbSmrgdnl aclocal-1.4 backwards compatibility:
771072313efbSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7711bdcaa8d0Smrg
771272313efbSmrg
771372313efbSmrgm4_define([_LTDL_MODE], [])
771472313efbSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
771572313efbSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
771672313efbSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
771772313efbSmrg		 [m4_define([_LTDL_MODE], [recursive])])
771872313efbSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
771972313efbSmrg		 [m4_define([_LTDL_MODE], [subproject])])
772072313efbSmrg
772172313efbSmrgm4_define([_LTDL_TYPE], [])
772272313efbSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
772372313efbSmrg		 [m4_define([_LTDL_TYPE], [installable])])
772472313efbSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
772572313efbSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
772672313efbSmrg
772772313efbSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7728bdcaa8d0Smrg#
772972313efbSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
773072313efbSmrg# Written by Gary V. Vaughan, 2004
7731bdcaa8d0Smrg#
773272313efbSmrg# This file is free software; the Free Software Foundation gives
773372313efbSmrg# unlimited permission to copy and/or distribute it, with or without
773472313efbSmrg# modifications, as long as this notice is preserved.
773572313efbSmrg
773672313efbSmrg# serial 6 ltsugar.m4
773772313efbSmrg
773872313efbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
773972313efbSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
774072313efbSmrg
774172313efbSmrg
774272313efbSmrg# lt_join(SEP, ARG1, [ARG2...])
774372313efbSmrg# -----------------------------
774472313efbSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
774572313efbSmrg# associated separator.
774672313efbSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
774772313efbSmrg# versions in m4sugar had bugs.
774872313efbSmrgm4_define([lt_join],
774972313efbSmrg[m4_if([$#], [1], [],
775072313efbSmrg       [$#], [2], [[$2]],
775172313efbSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
775272313efbSmrgm4_define([_lt_join],
775372313efbSmrg[m4_if([$#$2], [2], [],
775472313efbSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
775572313efbSmrg
775672313efbSmrg
775772313efbSmrg# lt_car(LIST)
775872313efbSmrg# lt_cdr(LIST)
775972313efbSmrg# ------------
776072313efbSmrg# Manipulate m4 lists.
776172313efbSmrg# These macros are necessary as long as will still need to support
776272313efbSmrg# Autoconf-2.59 which quotes differently.
776372313efbSmrgm4_define([lt_car], [[$1]])
776472313efbSmrgm4_define([lt_cdr],
776572313efbSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
776672313efbSmrg       [$#], 1, [],
776772313efbSmrg       [m4_dquote(m4_shift($@))])])
776872313efbSmrgm4_define([lt_unquote], $1)
776972313efbSmrg
777072313efbSmrg
777172313efbSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
777272313efbSmrg# ------------------------------------------
777372313efbSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
777472313efbSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
777572313efbSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
777672313efbSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
777772313efbSmrg# than defined and empty).
7778bdcaa8d0Smrg#
777972313efbSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
778072313efbSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
778172313efbSmrgm4_define([lt_append],
778272313efbSmrg[m4_define([$1],
778372313efbSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
778472313efbSmrg
778572313efbSmrg
778672313efbSmrg
778772313efbSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
778872313efbSmrg# ----------------------------------------------------------
778972313efbSmrg# Produce a SEP delimited list of all paired combinations of elements of
779072313efbSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
779172313efbSmrg# has the form PREFIXmINFIXSUFFIXn.
779272313efbSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
779372313efbSmrgm4_define([lt_combine],
779472313efbSmrg[m4_if(m4_eval([$# > 3]), [1],
779572313efbSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
779672313efbSmrg[[m4_foreach([_Lt_prefix], [$2],
779772313efbSmrg	     [m4_foreach([_Lt_suffix],
779872313efbSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
779972313efbSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
780072313efbSmrg
780172313efbSmrg
780272313efbSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
780372313efbSmrg# -----------------------------------------------------------------------
780472313efbSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
780572313efbSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
780672313efbSmrgm4_define([lt_if_append_uniq],
780772313efbSmrg[m4_ifdef([$1],
780872313efbSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
780972313efbSmrg		 [lt_append([$1], [$2], [$3])$4],
781072313efbSmrg		 [$5])],
781172313efbSmrg	  [lt_append([$1], [$2], [$3])$4])])
781272313efbSmrg
781372313efbSmrg
781472313efbSmrg# lt_dict_add(DICT, KEY, VALUE)
781572313efbSmrg# -----------------------------
781672313efbSmrgm4_define([lt_dict_add],
781772313efbSmrg[m4_define([$1($2)], [$3])])
7818bdcaa8d0Smrg
7819bdcaa8d0Smrg
782072313efbSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
782172313efbSmrg# --------------------------------------------
782272313efbSmrgm4_define([lt_dict_add_subkey],
782372313efbSmrg[m4_define([$1($2:$3)], [$4])])
7824bdcaa8d0Smrg
7825bdcaa8d0Smrg
782672313efbSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
782772313efbSmrg# ----------------------------------
782872313efbSmrgm4_define([lt_dict_fetch],
782972313efbSmrg[m4_ifval([$3],
783072313efbSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
783172313efbSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7832bdcaa8d0Smrg
7833bdcaa8d0Smrg
783472313efbSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
783572313efbSmrg# -----------------------------------------------------------------
783672313efbSmrgm4_define([lt_if_dict_fetch],
783772313efbSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
783872313efbSmrg	[$5],
783972313efbSmrg    [$6])])
7840bdcaa8d0Smrg
7841bdcaa8d0Smrg
784272313efbSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
784372313efbSmrg# --------------------------------------------------------------
784472313efbSmrgm4_define([lt_dict_filter],
784572313efbSmrg[m4_if([$5], [], [],
784672313efbSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
784772313efbSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
784872313efbSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7849bdcaa8d0Smrg])
785072313efbSmrg
785172313efbSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
785272313efbSmrg#
785372313efbSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
785472313efbSmrg#   Written by Scott James Remnant, 2004
785572313efbSmrg#
785672313efbSmrg# This file is free software; the Free Software Foundation gives
785772313efbSmrg# unlimited permission to copy and/or distribute it, with or without
785872313efbSmrg# modifications, as long as this notice is preserved.
785972313efbSmrg
786072313efbSmrg# Generated from ltversion.in.
786172313efbSmrg
786272313efbSmrg# serial 3012 ltversion.m4
786372313efbSmrg# This file is part of GNU Libtool
786472313efbSmrg
786572313efbSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
786672313efbSmrgm4_define([LT_PACKAGE_REVISION], [1.3012])
786772313efbSmrg
786872313efbSmrgAC_DEFUN([LTVERSION_VERSION],
786972313efbSmrg[macro_version='2.2.6'
787072313efbSmrgmacro_revision='1.3012'
787172313efbSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
787272313efbSmrg_LT_DECL(, macro_revision, 0)
7873bdcaa8d0Smrg])
7874bdcaa8d0Smrg
787572313efbSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
787672313efbSmrg#
787772313efbSmrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
787872313efbSmrg#   Written by Scott James Remnant, 2004.
787972313efbSmrg#
788072313efbSmrg# This file is free software; the Free Software Foundation gives
788172313efbSmrg# unlimited permission to copy and/or distribute it, with or without
788272313efbSmrg# modifications, as long as this notice is preserved.
788372313efbSmrg
788472313efbSmrg# serial 4 lt~obsolete.m4
788572313efbSmrg
788672313efbSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
788772313efbSmrg#
788872313efbSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
788972313efbSmrg# which have later been changed to m4_define as they aren't part of the
789072313efbSmrg# exported API, or moved to Autoconf or Automake where they belong.
789172313efbSmrg#
789272313efbSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
789372313efbSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
789472313efbSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
789572313efbSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
789672313efbSmrg# and doesn't know about Autoconf macros at all.)
789772313efbSmrg#
789872313efbSmrg# So we provide this file, which has a silly filename so it's always
789972313efbSmrg# included after everything else.  This provides aclocal with the
790072313efbSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
790172313efbSmrg# because those macros already exist, or will be overwritten later.
790272313efbSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
790372313efbSmrg#
790472313efbSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
790572313efbSmrg# Yes, that means every name once taken will need to remain here until
790672313efbSmrg# we give up compatibility with versions before 1.7, at which point
790772313efbSmrg# we need to keep only those names which we still refer to.
790872313efbSmrg
790972313efbSmrg# This is to help aclocal find these macros, as it can't see m4_define.
791072313efbSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
791172313efbSmrg
791272313efbSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
791372313efbSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
791472313efbSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
791572313efbSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
791672313efbSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
791772313efbSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
791872313efbSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
791972313efbSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
792072313efbSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
792172313efbSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
792272313efbSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
792372313efbSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
792472313efbSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
792572313efbSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
792672313efbSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
792772313efbSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
792872313efbSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
792972313efbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
793072313efbSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
793172313efbSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
793272313efbSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
793372313efbSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
793472313efbSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
793572313efbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
793672313efbSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
793772313efbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
793872313efbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
793972313efbSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
794072313efbSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
794172313efbSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
794272313efbSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
794372313efbSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
794472313efbSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
794572313efbSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
794672313efbSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
794772313efbSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
794872313efbSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
794972313efbSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
795072313efbSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
795172313efbSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
795272313efbSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
795372313efbSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
795472313efbSmrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
795572313efbSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
795672313efbSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
795772313efbSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
795872313efbSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
795972313efbSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
796072313efbSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
796172313efbSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
796272313efbSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
796372313efbSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
796472313efbSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
796572313efbSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
796672313efbSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
796772313efbSmrg
7968bdcaa8d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7969bdcaa8d0Smrg# 
7970bdcaa8d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7971bdcaa8d0Smrg#
7972bdcaa8d0Smrg# This program is free software; you can redistribute it and/or modify
7973bdcaa8d0Smrg# it under the terms of the GNU General Public License as published by
7974bdcaa8d0Smrg# the Free Software Foundation; either version 2 of the License, or
7975bdcaa8d0Smrg# (at your option) any later version.
7976bdcaa8d0Smrg#
7977bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, but
7978bdcaa8d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7979bdcaa8d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7980bdcaa8d0Smrg# General Public License for more details.
7981bdcaa8d0Smrg#
7982bdcaa8d0Smrg# You should have received a copy of the GNU General Public License
7983bdcaa8d0Smrg# along with this program; if not, write to the Free Software
7984bdcaa8d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7985bdcaa8d0Smrg#
7986bdcaa8d0Smrg# As a special exception to the GNU General Public License, if you
7987bdcaa8d0Smrg# distribute this file as part of a program that contains a
7988bdcaa8d0Smrg# configuration script generated by Autoconf, you may include it under
7989bdcaa8d0Smrg# the same distribution terms that you use for the rest of that program.
7990bdcaa8d0Smrg
7991bdcaa8d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7992bdcaa8d0Smrg# ----------------------------------
7993bdcaa8d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7994bdcaa8d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7995bdcaa8d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7996bdcaa8d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7997bdcaa8d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7998bdcaa8d0Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7999bdcaa8d0Smrgfi
8000bdcaa8d0Smrgif test -n "$PKG_CONFIG"; then
8001bdcaa8d0Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8002bdcaa8d0Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8003bdcaa8d0Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8004bdcaa8d0Smrg		AC_MSG_RESULT([yes])
8005bdcaa8d0Smrg	else
8006bdcaa8d0Smrg		AC_MSG_RESULT([no])
8007bdcaa8d0Smrg		PKG_CONFIG=""
8008bdcaa8d0Smrg	fi
8009bdcaa8d0Smrg		
8010bdcaa8d0Smrgfi[]dnl
8011bdcaa8d0Smrg])# PKG_PROG_PKG_CONFIG
8012bdcaa8d0Smrg
8013bdcaa8d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8014bdcaa8d0Smrg#
8015bdcaa8d0Smrg# Check to see whether a particular set of modules exists.  Similar
8016bdcaa8d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8017bdcaa8d0Smrg#
8018bdcaa8d0Smrg#
8019bdcaa8d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8020bdcaa8d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
8021bdcaa8d0Smrg# PKG_CHECK_EXISTS manually
8022bdcaa8d0Smrg# --------------------------------------------------------------
8023bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_EXISTS],
8024bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8025bdcaa8d0Smrgif test -n "$PKG_CONFIG" && \
8026bdcaa8d0Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8027bdcaa8d0Smrg  m4_ifval([$2], [$2], [:])
8028bdcaa8d0Smrgm4_ifvaln([$3], [else
8029bdcaa8d0Smrg  $3])dnl
8030bdcaa8d0Smrgfi])
8031bdcaa8d0Smrg
8032bdcaa8d0Smrg
8033bdcaa8d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8034bdcaa8d0Smrg# ---------------------------------------------
8035bdcaa8d0Smrgm4_define([_PKG_CONFIG],
803672313efbSmrg[if test -n "$$1"; then
803772313efbSmrg    pkg_cv_[]$1="$$1"
803872313efbSmrg elif test -n "$PKG_CONFIG"; then
803972313efbSmrg    PKG_CHECK_EXISTS([$3],
804072313efbSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
804172313efbSmrg		     [pkg_failed=yes])
804272313efbSmrg else
804372313efbSmrg    pkg_failed=untried
8044bdcaa8d0Smrgfi[]dnl
8045bdcaa8d0Smrg])# _PKG_CONFIG
8046bdcaa8d0Smrg
8047bdcaa8d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED
8048bdcaa8d0Smrg# -----------------------------
8049bdcaa8d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8050bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8051bdcaa8d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8052bdcaa8d0Smrg        _pkg_short_errors_supported=yes
8053bdcaa8d0Smrgelse
8054bdcaa8d0Smrg        _pkg_short_errors_supported=no
8055bdcaa8d0Smrgfi[]dnl
8056bdcaa8d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
8057bdcaa8d0Smrg
8058bdcaa8d0Smrg
8059bdcaa8d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8060bdcaa8d0Smrg# [ACTION-IF-NOT-FOUND])
8061bdcaa8d0Smrg#
8062bdcaa8d0Smrg#
8063bdcaa8d0Smrg# Note that if there is a possibility the first call to
8064bdcaa8d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8065bdcaa8d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8066bdcaa8d0Smrg#
8067bdcaa8d0Smrg#
8068bdcaa8d0Smrg# --------------------------------------------------------------
8069bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_MODULES],
8070bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8071bdcaa8d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8072bdcaa8d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8073bdcaa8d0Smrg
8074bdcaa8d0Smrgpkg_failed=no
8075bdcaa8d0SmrgAC_MSG_CHECKING([for $1])
8076bdcaa8d0Smrg
8077bdcaa8d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8078bdcaa8d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8079bdcaa8d0Smrg
8080bdcaa8d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8081bdcaa8d0Smrgand $1[]_LIBS to avoid the need to call pkg-config.
8082bdcaa8d0SmrgSee the pkg-config man page for more details.])
8083bdcaa8d0Smrg
8084bdcaa8d0Smrgif test $pkg_failed = yes; then
8085bdcaa8d0Smrg        _PKG_SHORT_ERRORS_SUPPORTED
8086bdcaa8d0Smrg        if test $_pkg_short_errors_supported = yes; then
808772313efbSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8088bdcaa8d0Smrg        else 
808972313efbSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8090bdcaa8d0Smrg        fi
8091bdcaa8d0Smrg	# Put the nasty error message in config.log where it belongs
8092bdcaa8d0Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8093bdcaa8d0Smrg
8094bdcaa8d0Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8095bdcaa8d0Smrg[Package requirements ($2) were not met:
8096bdcaa8d0Smrg
8097bdcaa8d0Smrg$$1_PKG_ERRORS
8098bdcaa8d0Smrg
8099bdcaa8d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8100bdcaa8d0Smrginstalled software in a non-standard prefix.
8101bdcaa8d0Smrg
8102bdcaa8d0Smrg_PKG_TEXT
8103bdcaa8d0Smrg])],
810472313efbSmrg		[AC_MSG_RESULT([no])
810572313efbSmrg                $4])
8106bdcaa8d0Smrgelif test $pkg_failed = untried; then
8107bdcaa8d0Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8108bdcaa8d0Smrg[The pkg-config script could not be found or is too old.  Make sure it
8109bdcaa8d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
8110bdcaa8d0Smrgpath to pkg-config.
8111bdcaa8d0Smrg
8112bdcaa8d0Smrg_PKG_TEXT
8113bdcaa8d0Smrg
811472313efbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8115bdcaa8d0Smrg		[$4])
8116bdcaa8d0Smrgelse
8117bdcaa8d0Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8118bdcaa8d0Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8119bdcaa8d0Smrg        AC_MSG_RESULT([yes])
8120bdcaa8d0Smrg	ifelse([$3], , :, [$3])
8121bdcaa8d0Smrgfi[]dnl
8122bdcaa8d0Smrg])# PKG_CHECK_MODULES
8123bdcaa8d0Smrg
812472313efbSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
8125bdcaa8d0Smrgdnl
8126bdcaa8d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
8127bdcaa8d0Smrgdnl 
8128bdcaa8d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
8129bdcaa8d0Smrgdnl copy of this software and associated documentation files (the
8130bdcaa8d0Smrgdnl "Software"), to deal in the Software without restriction, including
8131bdcaa8d0Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
8132bdcaa8d0Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
8133bdcaa8d0Smrgdnl to whom the Software is furnished to do so, provided that the above
8134bdcaa8d0Smrgdnl copyright notice(s) and this permission notice appear in all copies of
8135bdcaa8d0Smrgdnl the Software and that both the above copyright notice(s) and this
8136bdcaa8d0Smrgdnl permission notice appear in supporting documentation.
8137bdcaa8d0Smrgdnl
8138bdcaa8d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8139bdcaa8d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8140bdcaa8d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
8141bdcaa8d0Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
8142bdcaa8d0Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
8143bdcaa8d0Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
8144bdcaa8d0Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
8145bdcaa8d0Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
8146bdcaa8d0Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8147bdcaa8d0Smrgdnl
8148bdcaa8d0Smrgdnl Except as contained in this notice, the name of a copyright holder
8149bdcaa8d0Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
8150bdcaa8d0Smrgdnl or other dealings in this Software without prior written authorization
8151bdcaa8d0Smrgdnl of the copyright holder.
8152bdcaa8d0Smrg
8153bdcaa8d0Smrg# XORG_MACROS_VERSION(required-version)
8154bdcaa8d0Smrg# -------------------------------------
8155bdcaa8d0Smrg# Minimum version: 1.1.0
8156bdcaa8d0Smrg#
8157bdcaa8d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in
8158bdcaa8d0Smrg# your configure.ac with the minimum required version, such as:
8159bdcaa8d0Smrg# XORG_MACROS_VERSION(1.1)
8160bdcaa8d0Smrg#
8161bdcaa8d0Smrg# To force at least a version with this macro defined, also add:
8162bdcaa8d0Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
8163bdcaa8d0Smrg#
8164bdcaa8d0Smrg#
8165bdcaa8d0Smrg# See the "minimum version" comment for each macro you use to see what 
8166bdcaa8d0Smrg# version you require.
8167bdcaa8d0SmrgAC_DEFUN([XORG_MACROS_VERSION],[
8168bdcaa8d0Smrg	[XORG_MACROS_needed_version=$1
8169bdcaa8d0Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
8170bdcaa8d0Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
8171bdcaa8d0Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
817272313efbSmrg	[XORG_MACROS_version=1.2.1
8173bdcaa8d0Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
8174bdcaa8d0Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
8175bdcaa8d0Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
8176bdcaa8d0Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
8177bdcaa8d0Smrg	fi
8178bdcaa8d0Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
8179bdcaa8d0Smrg		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])
8180bdcaa8d0Smrg	fi
8181bdcaa8d0Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
8182bdcaa8d0Smrg]) # XORG_MACROS_VERSION
8183bdcaa8d0Smrg
8184bdcaa8d0Smrg# XORG_PROG_RAWCPP()
8185bdcaa8d0Smrg# ------------------
8186bdcaa8d0Smrg# Minimum version: 1.0.0
8187bdcaa8d0Smrg#
8188bdcaa8d0Smrg# Find cpp program and necessary flags for use in pre-processing text files
8189bdcaa8d0Smrg# such as man pages and config files
8190bdcaa8d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
8191bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CPP])
8192bdcaa8d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
8193bdcaa8d0Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
8194bdcaa8d0Smrg
8195bdcaa8d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
8196bdcaa8d0Smrg# which is not the best choice for supporting other OS'es, but covers most
8197bdcaa8d0Smrg# of the ones we need for now.
8198bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
8199bdcaa8d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
8200bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8201bdcaa8d0Smrg	AC_MSG_RESULT([no])
8202bdcaa8d0Smrgelse
8203bdcaa8d0Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8204bdcaa8d0Smrg		RAWCPPFLAGS=-undef
8205bdcaa8d0Smrg		AC_MSG_RESULT([yes])
820672313efbSmrg	# under Cygwin unix is still defined even with -undef
820772313efbSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820872313efbSmrg		RAWCPPFLAGS="-undef -ansi"
820972313efbSmrg		AC_MSG_RESULT([yes, with -ansi])
8210bdcaa8d0Smrg	else
8211bdcaa8d0Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
8212bdcaa8d0Smrg	fi
8213bdcaa8d0Smrgfi
8214bdcaa8d0Smrgrm -f conftest.$ac_ext
8215bdcaa8d0Smrg
8216bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
8217bdcaa8d0SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
8218bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8219bdcaa8d0Smrg	AC_MSG_RESULT([no])
8220bdcaa8d0Smrgelse
8221bdcaa8d0Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8222bdcaa8d0Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
8223bdcaa8d0Smrg		AC_MSG_RESULT([yes])
8224bdcaa8d0Smrg	else
8225bdcaa8d0Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
8226bdcaa8d0Smrg	fi
8227bdcaa8d0Smrgfi
8228bdcaa8d0Smrgrm -f conftest.$ac_ext
8229bdcaa8d0SmrgAC_SUBST(RAWCPPFLAGS)
8230bdcaa8d0Smrg]) # XORG_PROG_RAWCPP
8231bdcaa8d0Smrg
8232bdcaa8d0Smrg# XORG_MANPAGE_SECTIONS()
8233bdcaa8d0Smrg# -----------------------
8234bdcaa8d0Smrg# Minimum version: 1.0.0
8235bdcaa8d0Smrg#
8236bdcaa8d0Smrg# Determine which sections man pages go in for the different man page types
8237bdcaa8d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
8238bdcaa8d0Smrg# Not sure if there's any better way than just hardcoding by OS name.
8239bdcaa8d0Smrg# Override default settings by setting environment variables
8240bdcaa8d0Smrg
8241bdcaa8d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
8242bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])
8243bdcaa8d0Smrg
8244bdcaa8d0Smrgif test x$APP_MAN_SUFFIX = x    ; then
8245bdcaa8d0Smrg    APP_MAN_SUFFIX=1
8246bdcaa8d0Smrgfi
8247bdcaa8d0Smrgif test x$APP_MAN_DIR = x    ; then
8248bdcaa8d0Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
8249bdcaa8d0Smrgfi
8250bdcaa8d0Smrg
8251bdcaa8d0Smrgif test x$LIB_MAN_SUFFIX = x    ; then
8252bdcaa8d0Smrg    LIB_MAN_SUFFIX=3
8253bdcaa8d0Smrgfi
8254bdcaa8d0Smrgif test x$LIB_MAN_DIR = x    ; then
8255bdcaa8d0Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
8256bdcaa8d0Smrgfi
8257bdcaa8d0Smrg
8258bdcaa8d0Smrgif test x$FILE_MAN_SUFFIX = x    ; then
8259bdcaa8d0Smrg    case $host_os in
8260bdcaa8d0Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
8261bdcaa8d0Smrg	*)		FILE_MAN_SUFFIX=5  ;;
8262bdcaa8d0Smrg    esac
8263bdcaa8d0Smrgfi
8264bdcaa8d0Smrgif test x$FILE_MAN_DIR = x    ; then
8265bdcaa8d0Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
8266bdcaa8d0Smrgfi
8267bdcaa8d0Smrg
8268bdcaa8d0Smrgif test x$MISC_MAN_SUFFIX = x    ; then
8269bdcaa8d0Smrg    case $host_os in
8270bdcaa8d0Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
8271bdcaa8d0Smrg	*)		MISC_MAN_SUFFIX=7  ;;
8272bdcaa8d0Smrg    esac
8273bdcaa8d0Smrgfi
8274bdcaa8d0Smrgif test x$MISC_MAN_DIR = x    ; then
8275bdcaa8d0Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
8276bdcaa8d0Smrgfi
8277bdcaa8d0Smrg
8278bdcaa8d0Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
8279bdcaa8d0Smrg    case $host_os in
8280bdcaa8d0Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
8281bdcaa8d0Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
8282bdcaa8d0Smrg    esac
8283bdcaa8d0Smrgfi
8284bdcaa8d0Smrgif test x$DRIVER_MAN_DIR = x    ; then
8285bdcaa8d0Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
8286bdcaa8d0Smrgfi
8287bdcaa8d0Smrg
8288bdcaa8d0Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
8289bdcaa8d0Smrg    case $host_os in
8290bdcaa8d0Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
8291bdcaa8d0Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
8292bdcaa8d0Smrg    esac
8293bdcaa8d0Smrgfi
8294bdcaa8d0Smrgif test x$ADMIN_MAN_DIR = x    ; then
8295bdcaa8d0Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
8296bdcaa8d0Smrgfi
8297bdcaa8d0Smrg
8298bdcaa8d0Smrg
8299bdcaa8d0SmrgAC_SUBST([APP_MAN_SUFFIX])
8300bdcaa8d0SmrgAC_SUBST([LIB_MAN_SUFFIX])
8301bdcaa8d0SmrgAC_SUBST([FILE_MAN_SUFFIX])
8302bdcaa8d0SmrgAC_SUBST([MISC_MAN_SUFFIX])
8303bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
8304bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
8305bdcaa8d0SmrgAC_SUBST([APP_MAN_DIR])
8306bdcaa8d0SmrgAC_SUBST([LIB_MAN_DIR])
8307bdcaa8d0SmrgAC_SUBST([FILE_MAN_DIR])
8308bdcaa8d0SmrgAC_SUBST([MISC_MAN_DIR])
8309bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_DIR])
8310bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_DIR])
8311bdcaa8d0Smrg]) # XORG_MANPAGE_SECTIONS
8312bdcaa8d0Smrg
8313bdcaa8d0Smrg# XORG_CHECK_LINUXDOC
8314bdcaa8d0Smrg# -------------------
8315bdcaa8d0Smrg# Minimum version: 1.0.0
8316bdcaa8d0Smrg#
8317bdcaa8d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and
8318bdcaa8d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
8319bdcaa8d0Smrg# Whether or not the necessary tools and files are found can be checked
8320bdcaa8d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
8321bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
832272313efbSmrgif test x$XORG_SGML_PATH = x ; then
832372313efbSmrg    XORG_SGML_PATH=$prefix/share/sgml
832472313efbSmrgfi
8325bdcaa8d0SmrgHAVE_DEFS_ENT=
8326bdcaa8d0Smrg
832772313efbSmrgif test x"$cross_compiling" = x"yes" ; then
832872313efbSmrg  HAVE_DEFS_ENT=no
832972313efbSmrgelse
833072313efbSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
833172313efbSmrgfi
8332bdcaa8d0Smrg
8333bdcaa8d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
8334bdcaa8d0SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
8335bdcaa8d0Smrg
8336bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build documentation])
8337bdcaa8d0Smrg
8338bdcaa8d0Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
8339bdcaa8d0Smrg   BUILDDOC=yes
8340bdcaa8d0Smrgelse
8341bdcaa8d0Smrg   BUILDDOC=no
8342bdcaa8d0Smrgfi
8343bdcaa8d0Smrg
8344bdcaa8d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
8345bdcaa8d0Smrg
8346bdcaa8d0SmrgAC_MSG_RESULT([$BUILDDOC])
8347bdcaa8d0Smrg
8348bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
8349bdcaa8d0Smrg
8350bdcaa8d0Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
8351bdcaa8d0Smrg   BUILDPDFDOC=yes
8352bdcaa8d0Smrgelse
8353bdcaa8d0Smrg   BUILDPDFDOC=no
8354bdcaa8d0Smrgfi
8355bdcaa8d0Smrg
8356bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8357bdcaa8d0Smrg
8358bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC])
8359bdcaa8d0Smrg
8360bdcaa8d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
8361bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
8362bdcaa8d0SmrgMAKE_PDF="$PS2PDF"
8363bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
8364bdcaa8d0Smrg
8365bdcaa8d0SmrgAC_SUBST(MAKE_TEXT)
8366bdcaa8d0SmrgAC_SUBST(MAKE_PS)
8367bdcaa8d0SmrgAC_SUBST(MAKE_PDF)
8368bdcaa8d0SmrgAC_SUBST(MAKE_HTML)
8369bdcaa8d0Smrg]) # XORG_CHECK_LINUXDOC
8370bdcaa8d0Smrg
8371bdcaa8d0Smrg# XORG_CHECK_DOCBOOK
8372bdcaa8d0Smrg# -------------------
8373bdcaa8d0Smrg# Minimum version: 1.0.0
8374bdcaa8d0Smrg#
8375bdcaa8d0Smrg# Checks for the ability to build output formats from SGML DocBook source.
8376bdcaa8d0Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
8377bdcaa8d0Smrg# indicates whether the necessary tools and files are found and, if set,
8378bdcaa8d0Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
8379bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
838072313efbSmrgif test x$XORG_SGML_PATH = x ; then
838172313efbSmrg    XORG_SGML_PATH=$prefix/share/sgml
838272313efbSmrgfi
8383bdcaa8d0SmrgHAVE_DEFS_ENT=
8384bdcaa8d0SmrgBUILDTXTDOC=no
8385bdcaa8d0SmrgBUILDPDFDOC=no
8386bdcaa8d0SmrgBUILDPSDOC=no
8387bdcaa8d0SmrgBUILDHTMLDOC=no
8388bdcaa8d0Smrg
8389bdcaa8d0SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8390bdcaa8d0Smrg
8391bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
8392bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
8393bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
8394bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
8395bdcaa8d0Smrg
8396bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build text documentation])
8397bdcaa8d0Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
8398bdcaa8d0Smrg   test x$BUILD_TXTDOC != xno; then
8399bdcaa8d0Smrg	BUILDTXTDOC=yes
8400bdcaa8d0Smrgfi
8401bdcaa8d0SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
8402bdcaa8d0SmrgAC_MSG_RESULT([$BUILDTXTDOC])
8403bdcaa8d0Smrg
8404bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
8405bdcaa8d0Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
8406bdcaa8d0Smrg   test x$BUILD_PDFDOC != xno; then
8407bdcaa8d0Smrg	BUILDPDFDOC=yes
8408bdcaa8d0Smrgfi
8409bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8410bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC])
8411bdcaa8d0Smrg
8412bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
8413bdcaa8d0Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
8414bdcaa8d0Smrg   test x$BUILD_PSDOC != xno; then
8415bdcaa8d0Smrg	BUILDPSDOC=yes
8416bdcaa8d0Smrgfi
8417bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
8418bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPSDOC])
8419bdcaa8d0Smrg
8420bdcaa8d0SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
8421bdcaa8d0Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
8422bdcaa8d0Smrg   test x$BUILD_HTMLDOC != xno; then
8423bdcaa8d0Smrg	BUILDHTMLDOC=yes
8424bdcaa8d0Smrgfi
8425bdcaa8d0SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
8426bdcaa8d0SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
8427bdcaa8d0Smrg
8428bdcaa8d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
8429bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
8430bdcaa8d0SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
8431bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
8432bdcaa8d0Smrg
8433bdcaa8d0SmrgAC_SUBST(MAKE_TEXT)
8434bdcaa8d0SmrgAC_SUBST(MAKE_PS)
8435bdcaa8d0SmrgAC_SUBST(MAKE_PDF)
8436bdcaa8d0SmrgAC_SUBST(MAKE_HTML)
8437bdcaa8d0Smrg]) # XORG_CHECK_DOCBOOK
8438bdcaa8d0Smrg
8439bdcaa8d0Smrg# XORG_CHECK_MALLOC_ZERO
8440bdcaa8d0Smrg# ----------------------
8441bdcaa8d0Smrg# Minimum version: 1.0.0
8442bdcaa8d0Smrg#
8443bdcaa8d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
8444bdcaa8d0Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
8445bdcaa8d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
8446bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
8447bdcaa8d0SmrgAC_ARG_ENABLE(malloc0returnsnull,
8448bdcaa8d0Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
8449bdcaa8d0Smrg		       [malloc(0) returns NULL (default: auto)]),
8450bdcaa8d0Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
8451bdcaa8d0Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
8452bdcaa8d0Smrg
8453bdcaa8d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
8454bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
8455bdcaa8d0Smrg	AC_RUN_IFELSE([
8456bdcaa8d0Smrgchar *malloc();
8457bdcaa8d0Smrgchar *realloc();
8458bdcaa8d0Smrgchar *calloc();
8459bdcaa8d0Smrgmain() {
8460bdcaa8d0Smrg    char *m0, *r0, *c0, *p;
8461bdcaa8d0Smrg    m0 = malloc(0);
8462bdcaa8d0Smrg    p = malloc(10);
8463bdcaa8d0Smrg    r0 = realloc(p,0);
8464bdcaa8d0Smrg    c0 = calloc(0);
8465bdcaa8d0Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
8466bdcaa8d0Smrg}],
8467bdcaa8d0Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
8468bdcaa8d0Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
8469bdcaa8d0Smrgfi
8470bdcaa8d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
8471bdcaa8d0Smrg
8472bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
8473bdcaa8d0Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
8474bdcaa8d0Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
8475bdcaa8d0Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
8476bdcaa8d0Smrgelse
8477bdcaa8d0Smrg	MALLOC_ZERO_CFLAGS=""
8478bdcaa8d0Smrg	XMALLOC_ZERO_CFLAGS=""
8479bdcaa8d0Smrg	XTMALLOC_ZERO_CFLAGS=""
8480bdcaa8d0Smrgfi
8481bdcaa8d0Smrg
8482bdcaa8d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
8483bdcaa8d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
8484bdcaa8d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
8485bdcaa8d0Smrg]) # XORG_CHECK_MALLOC_ZERO
8486bdcaa8d0Smrg
8487bdcaa8d0Smrg# XORG_WITH_LINT()
8488bdcaa8d0Smrg# ----------------
8489bdcaa8d0Smrg# Minimum version: 1.1.0
8490bdcaa8d0Smrg#
8491bdcaa8d0Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
8492bdcaa8d0Smrg# is specified.   (Use --with-lint=sparse for sparse.)
8493bdcaa8d0Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
8494bdcaa8d0Smrg# Sets $LINT_FLAGS to flags to pass to source checker
8495bdcaa8d0Smrg# Sets LINT automake conditional if enabled (default: disabled)
8496bdcaa8d0Smrg#
8497bdcaa8d0SmrgAC_DEFUN([XORG_WITH_LINT],[
8498bdcaa8d0Smrg
8499bdcaa8d0Smrg# Allow checking code with lint, sparse, etc.
8500bdcaa8d0SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
8501bdcaa8d0Smrg		[Use a lint-style source code checker (default: disabled)])],
8502bdcaa8d0Smrg		[use_lint=$withval], [use_lint=no])
8503bdcaa8d0Smrgif test "x$use_lint" = "xyes" ; then
8504bdcaa8d0Smrg	LINT="lint"
8505bdcaa8d0Smrgelse
8506bdcaa8d0Smrg	LINT="$use_lint"
8507bdcaa8d0Smrgfi
8508bdcaa8d0Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
8509bdcaa8d0Smrg    case $LINT in
8510bdcaa8d0Smrg	lint|*/lint)
8511bdcaa8d0Smrg	    case $host_os in
8512bdcaa8d0Smrg		solaris*)
8513bdcaa8d0Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
8514bdcaa8d0Smrg			;;
8515bdcaa8d0Smrg	    esac
8516bdcaa8d0Smrg	    ;;
8517bdcaa8d0Smrg    esac
8518bdcaa8d0Smrgfi
8519bdcaa8d0Smrg
8520bdcaa8d0SmrgAC_SUBST(LINT)
8521bdcaa8d0SmrgAC_SUBST(LINT_FLAGS)
8522bdcaa8d0SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
8523bdcaa8d0Smrg
8524bdcaa8d0Smrg]) # XORG_WITH_LINT
8525bdcaa8d0Smrg
8526bdcaa8d0Smrg# XORG_LINT_LIBRARY(LIBNAME)
8527bdcaa8d0Smrg# --------------------------
8528bdcaa8d0Smrg# Minimum version: 1.1.0
8529bdcaa8d0Smrg#
8530bdcaa8d0Smrg# Sets up flags for building lint libraries for checking programs that call
8531bdcaa8d0Smrg# functions in the library.
8532bdcaa8d0Smrg# Disabled by default, enable with --enable-lint-library
8533bdcaa8d0Smrg# Sets: 
8534bdcaa8d0Smrg#	@LINTLIB@		- name of lint library file to make
8535bdcaa8d0Smrg#	MAKE_LINT_LIB		- automake conditional
8536bdcaa8d0Smrg#
8537bdcaa8d0Smrg
8538bdcaa8d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
8539bdcaa8d0SmrgAC_REQUIRE([XORG_WITH_LINT])
8540bdcaa8d0Smrg# Build lint "library" for more indepth checks of programs calling this library
8541bdcaa8d0SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
8542bdcaa8d0Smrg	[Create lint library (default: disabled)])],
8543bdcaa8d0Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
8544bdcaa8d0Smrgif test "x$make_lint_lib" != "xno" ; then
8545bdcaa8d0Smrg	if test "x$LINT" = "xno" ; then
8546bdcaa8d0Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
8547bdcaa8d0Smrg	fi
8548bdcaa8d0Smrg	if test "x$make_lint_lib" = "xyes" ; then
8549bdcaa8d0Smrg		LINTLIB=llib-l$1.ln
8550bdcaa8d0Smrg	else
8551bdcaa8d0Smrg		LINTLIB=$make_lint_lib
8552bdcaa8d0Smrg	fi
8553bdcaa8d0Smrgfi
8554bdcaa8d0SmrgAC_SUBST(LINTLIB)
8555bdcaa8d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
8556bdcaa8d0Smrg
8557bdcaa8d0Smrg]) # XORG_LINT_LIBRARY
8558bdcaa8d0Smrg
855972313efbSmrg# XORG_CWARNFLAGS
856072313efbSmrg# ---------------
856172313efbSmrg# Minimum version: 1.2.0
856272313efbSmrg#
856372313efbSmrg# Defines CWARNFLAGS to enable C compiler warnings.
856472313efbSmrg#
856572313efbSmrgAC_DEFUN([XORG_CWARNFLAGS], [
856672313efbSmrgAC_REQUIRE([AC_PROG_CC])
856772313efbSmrgif  test "x$GCC" = xyes ; then
856872313efbSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
856972313efbSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
857072313efbSmrg-Wbad-function-cast"
857172313efbSmrg    case `gcc -dumpversion` in
857272313efbSmrg    3.4.* | 4.*)
857372313efbSmrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
857472313efbSmrg	;;
857572313efbSmrg    esac
857672313efbSmrgelse
857772313efbSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
857872313efbSmrg    if test "x$SUNCC" = "xyes"; then
857972313efbSmrg	CWARNFLAGS="-v"
858072313efbSmrg    fi
858172313efbSmrgfi
858272313efbSmrgAC_SUBST(CWARNFLAGS)
858372313efbSmrg]) # XORG_CWARNFLAGS
8584bdcaa8d0Smrgdnl Copyright 2005 Red Hat, Inc
8585bdcaa8d0Smrgdnl
8586bdcaa8d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8587bdcaa8d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that
8588bdcaa8d0Smrgdnl the above copyright notice appear in all copies and that both that
8589bdcaa8d0Smrgdnl copyright notice and this permission notice appear in supporting
8590bdcaa8d0Smrgdnl documentation.
8591bdcaa8d0Smrgdnl
8592bdcaa8d0Smrgdnl The above copyright notice and this permission notice shall be included
8593bdcaa8d0Smrgdnl in all copies or substantial portions of the Software.
8594bdcaa8d0Smrgdnl
8595bdcaa8d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8596bdcaa8d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8597bdcaa8d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8598bdcaa8d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8599bdcaa8d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8600bdcaa8d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8601bdcaa8d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
8602bdcaa8d0Smrgdnl
8603bdcaa8d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall
8604bdcaa8d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or
8605bdcaa8d0Smrgdnl other dealings in this Software without prior written authorization
8606bdcaa8d0Smrgdnl from the copyright holders.
8607bdcaa8d0Smrgdnl
8608bdcaa8d0Smrg
8609bdcaa8d0Smrg# XORG_RELEASE_VERSION
8610bdcaa8d0Smrg# --------------------
8611bdcaa8d0Smrg# Adds --with/without-release-string and changes the PACKAGE and
8612bdcaa8d0Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
8613bdcaa8d0Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
8614bdcaa8d0Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
8615bdcaa8d0Smrg 
8616bdcaa8d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
8617bdcaa8d0Smrg	AC_ARG_WITH(release-version,
8618bdcaa8d0Smrg			AC_HELP_STRING([--with-release-version=STRING],
8619bdcaa8d0Smrg				[Use release version string in package name]),
8620bdcaa8d0Smrg			[RELEASE_VERSION="$withval"],
8621bdcaa8d0Smrg			[RELEASE_VERSION=""])
8622bdcaa8d0Smrg	if test "x$RELEASE_VERSION" != "x"; then
8623bdcaa8d0Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
8624bdcaa8d0Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
8625bdcaa8d0Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
8626bdcaa8d0Smrg	fi
8627bdcaa8d0Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
862872313efbSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
8629bdcaa8d0Smrg		[Major version of this package])
863072313efbSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
8631bdcaa8d0Smrg	if test "x$PVM" = "x"; then
8632bdcaa8d0Smrg		PVM="0"
8633bdcaa8d0Smrg	fi
8634bdcaa8d0Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
8635bdcaa8d0Smrg		[$PVM],
8636bdcaa8d0Smrg		[Minor version of this package])
863772313efbSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
8638bdcaa8d0Smrg	if test "x$PVP" = "x"; then
8639bdcaa8d0Smrg		PVP="0"
8640bdcaa8d0Smrg	fi
8641bdcaa8d0Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
8642bdcaa8d0Smrg		[$PVP],
8643bdcaa8d0Smrg		[Patch version of this package])
8644bdcaa8d0Smrg])
8645bdcaa8d0Smrg
864672313efbSmrg# XORG_CHANGELOG()
864772313efbSmrg# ----------------
864872313efbSmrg# Minimum version: 1.2.0
864972313efbSmrg#
865072313efbSmrg# Defines the variable CHANGELOG_CMD as the command to generate
865172313efbSmrg# ChangeLog from git.
865272313efbSmrg#
865372313efbSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
865472313efbSmrg#
865572313efbSmrgAC_DEFUN([XORG_CHANGELOG], [
865672313efbSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
865772313efbSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
865872313efbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
865972313efbSmrgAC_SUBST([CHANGELOG_CMD])
866072313efbSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
866172313efbSmrg]) # XORG_CHANGELOG
866272313efbSmrg
866372313efbSmrgdnl Copyright 2005 Red Hat, Inc
866472313efbSmrgdnl 
866572313efbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
866672313efbSmrgdnl documentation for any purpose is hereby granted without fee, provided that
866772313efbSmrgdnl the above copyright notice appear in all copies and that both that
866872313efbSmrgdnl copyright notice and this permission notice appear in supporting
866972313efbSmrgdnl documentation.
867072313efbSmrgdnl 
867172313efbSmrgdnl The above copyright notice and this permission notice shall be included
867272313efbSmrgdnl in all copies or substantial portions of the Software.
867372313efbSmrgdnl 
867472313efbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
867572313efbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
867672313efbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
867772313efbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
867872313efbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
867972313efbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
868072313efbSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
868172313efbSmrgdnl 
868272313efbSmrgdnl Except as contained in this notice, the name of the copyright holders shall
868372313efbSmrgdnl not be used in advertising or otherwise to promote the sale, use or
868472313efbSmrgdnl other dealings in this Software without prior written authorization
868572313efbSmrgdnl from the copyright holders.
868672313efbSmrgdnl 
868772313efbSmrg
868872313efbSmrg# XORG_DRIVER_CHECK_EXT()
868972313efbSmrg# --------------------------
869072313efbSmrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
869172313efbSmrg# is defined, then add $1 to $REQUIRED_MODULES.
869272313efbSmrg
869372313efbSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
869472313efbSmrg	SAVE_CFLAGS="$CFLAGS"
869572313efbSmrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
869672313efbSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
869772313efbSmrg#include "xorg-server.h"
869872313efbSmrg#if !defined $1
869972313efbSmrg#error $1 not defined
870072313efbSmrg#endif
870172313efbSmrg		]])],
870272313efbSmrg		[_EXT_CHECK=yes],
870372313efbSmrg		[_EXT_CHECK=no])
870472313efbSmrg	CFLAGS="$SAVE_CFLAGS"
870572313efbSmrg	AC_MSG_CHECKING([if $1 is defined])
870672313efbSmrg	AC_MSG_RESULT([$_EXT_CHECK])
870772313efbSmrg	if test "$_EXT_CHECK" != no; then
870872313efbSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
870972313efbSmrg	fi
871072313efbSmrg])
871172313efbSmrg
871272313efbSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8713bdcaa8d0Smrg#
8714bdcaa8d0Smrg# This file is free software; the Free Software Foundation
8715bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
8716bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
8717bdcaa8d0Smrg
8718bdcaa8d0Smrg# AM_AUTOMAKE_VERSION(VERSION)
8719bdcaa8d0Smrg# ----------------------------
8720bdcaa8d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
8721bdcaa8d0Smrg# generated from the m4 files accompanying Automake X.Y.
872272313efbSmrg# (This private macro should not be called outside this file.)
872372313efbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
872472313efbSmrg[am__api_version='1.10'
872572313efbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
872672313efbSmrgdnl require some minimum version.  Point them to the right macro.
872772313efbSmrgm4_if([$1], [1.10.2], [],
872872313efbSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
872972313efbSmrg])
873072313efbSmrg
873172313efbSmrg# _AM_AUTOCONF_VERSION(VERSION)
873272313efbSmrg# -----------------------------
873372313efbSmrg# aclocal traces this macro to find the Autoconf version.
873472313efbSmrg# This is a private macro too.  Using m4_define simplifies
873572313efbSmrg# the logic in aclocal, which can simply ignore this definition.
873672313efbSmrgm4_define([_AM_AUTOCONF_VERSION], [])
8737bdcaa8d0Smrg
8738bdcaa8d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
8739bdcaa8d0Smrg# -------------------------------
874072313efbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
874172313efbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8742bdcaa8d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
874372313efbSmrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
874472313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION],
874572313efbSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
874672313efbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8747bdcaa8d0Smrg
8748bdcaa8d0Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8749bdcaa8d0Smrg
8750bdcaa8d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8751bdcaa8d0Smrg#
8752bdcaa8d0Smrg# This file is free software; the Free Software Foundation
8753bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
8754bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
8755bdcaa8d0Smrg
8756bdcaa8d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8757bdcaa8d0Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8758bdcaa8d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8759bdcaa8d0Smrg#
8760bdcaa8d0Smrg# Of course, Automake must honor this variable whenever it calls a
8761bdcaa8d0Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
8762bdcaa8d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
8763bdcaa8d0Smrg# depending on how configure is run.  This is pretty annoying, since
8764bdcaa8d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8765bdcaa8d0Smrg# source directory, any form will work fine, but in subdirectories a
8766bdcaa8d0Smrg# relative path needs to be adjusted first.
8767bdcaa8d0Smrg#
8768bdcaa8d0Smrg# $ac_aux_dir/missing
8769bdcaa8d0Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8770bdcaa8d0Smrg# $top_srcdir/$ac_aux_dir/missing
8771bdcaa8d0Smrg#    fails if $ac_aux_dir is absolute,
8772bdcaa8d0Smrg#    fails when called from a subdirectory in a VPATH build with
8773bdcaa8d0Smrg#          a relative $ac_aux_dir
8774bdcaa8d0Smrg#
8775bdcaa8d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8776bdcaa8d0Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8777bdcaa8d0Smrg# harmless because $srcdir is `.', but things will broke when you
8778bdcaa8d0Smrg# start a VPATH build or use an absolute $srcdir.
8779bdcaa8d0Smrg#
8780bdcaa8d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8781bdcaa8d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8782bdcaa8d0Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8783bdcaa8d0Smrg# and then we would define $MISSING as
8784bdcaa8d0Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
8785bdcaa8d0Smrg# This will work as long as MISSING is not called from configure, because
8786bdcaa8d0Smrg# unfortunately $(top_srcdir) has no meaning in configure.
8787bdcaa8d0Smrg# However there are other variables, like CC, which are often used in
8788bdcaa8d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
8789bdcaa8d0Smrg#
8790bdcaa8d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
8791bdcaa8d0Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
8792bdcaa8d0Smrg# configured tree to be moved without reconfiguration.
8793bdcaa8d0Smrg
8794bdcaa8d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
8795bdcaa8d0Smrg[dnl Rely on autoconf to set up CDPATH properly.
8796bdcaa8d0SmrgAC_PREREQ([2.50])dnl
8797bdcaa8d0Smrg# expand $ac_aux_dir to an absolute path
8798bdcaa8d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
8799bdcaa8d0Smrg])
8800bdcaa8d0Smrg
8801bdcaa8d0Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
8802bdcaa8d0Smrg
880372313efbSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
8804bdcaa8d0Smrg# Free Software Foundation, Inc.
8805bdcaa8d0Smrg#
8806bdcaa8d0Smrg# This file is free software; the Free Software Foundation
8807bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
8808bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
8809bdcaa8d0Smrg
881072313efbSmrg# serial 8
8811bdcaa8d0Smrg
8812bdcaa8d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8813bdcaa8d0Smrg# -------------------------------------
8814bdcaa8d0Smrg# Define a conditional.
8815bdcaa8d0SmrgAC_DEFUN([AM_CONDITIONAL],
8816bdcaa8d0Smrg[AC_PREREQ(2.52)dnl
8817bdcaa8d0Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8818bdcaa8d0Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
881972313efbSmrgAC_SUBST([$1_TRUE])dnl
882072313efbSmrgAC_SUBST([$1_FALSE])dnl
882172313efbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
882272313efbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8823bdcaa8d0Smrgif $2; then
8824bdcaa8d0Smrg  $1_TRUE=
8825bdcaa8d0Smrg  $1_FALSE='#'
8826bdcaa8d0Smrgelse
8827bdcaa8d0Smrg  $1_TRUE='#'
8828bdcaa8d0Smrg  $1_FALSE=
8829bdcaa8d0Smrgfi
8830bdcaa8d0SmrgAC_CONFIG_COMMANDS_PRE(
8831bdcaa8d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8832bdcaa8d0Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
8833bdcaa8d0SmrgUsually this means the macro was only invoked conditionally.]])
8834bdcaa8d0Smrgfi])])
8835bdcaa8d0Smrg
883672313efbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
8837bdcaa8d0Smrg# Free Software Foundation, Inc.
8838bdcaa8d0Smrg#
8839bdcaa8d0Smrg# This file is free software; the Free Software Foundation
8840bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
8841bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
8842bdcaa8d0Smrg
884372313efbSmrg# serial 9
8844bdcaa8d0Smrg
8845bdcaa8d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8846bdcaa8d0Smrg# written in clear, in which case automake, when reading aclocal.m4,
8847bdcaa8d0Smrg# will think it sees a *use*, and therefore will trigger all it's
8848bdcaa8d0Smrg# C support machinery.  Also note that it means that autoscan, seeing
8849bdcaa8d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8850bdcaa8d0Smrg
8851bdcaa8d0Smrg
8852bdcaa8d0Smrg# _AM_DEPENDENCIES(NAME)
8853bdcaa8d0Smrg# ----------------------
8854bdcaa8d0Smrg# See how the compiler implements dependency checking.
8855bdcaa8d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8856bdcaa8d0Smrg# We try a few techniques and use that to set a single cache variable.
8857bdcaa8d0Smrg#
8858bdcaa8d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8859bdcaa8d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8860bdcaa8d0Smrg# dependency, and given that the user is not expected to run this macro,
8861bdcaa8d0Smrg# just rely on AC_PROG_CC.
8862bdcaa8d0SmrgAC_DEFUN([_AM_DEPENDENCIES],
8863bdcaa8d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8864bdcaa8d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8865bdcaa8d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8866bdcaa8d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8867bdcaa8d0Smrg
8868bdcaa8d0Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8869bdcaa8d0Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8870bdcaa8d0Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
887172313efbSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8872bdcaa8d0Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8873bdcaa8d0Smrg                   [depcc="$$1"   am_compiler_list=])
8874bdcaa8d0Smrg
8875bdcaa8d0SmrgAC_CACHE_CHECK([dependency style of $depcc],
8876bdcaa8d0Smrg               [am_cv_$1_dependencies_compiler_type],
8877bdcaa8d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8878bdcaa8d0Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
8879bdcaa8d0Smrg  # making bogus files that we don't know about and never remove.  For
8880bdcaa8d0Smrg  # instance it was reported that on HP-UX the gcc test will end up
8881bdcaa8d0Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
8882bdcaa8d0Smrg  # in D'.
8883bdcaa8d0Smrg  mkdir conftest.dir
8884bdcaa8d0Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8885bdcaa8d0Smrg  # using a relative directory.
8886bdcaa8d0Smrg  cp "$am_depcomp" conftest.dir
8887bdcaa8d0Smrg  cd conftest.dir
8888bdcaa8d0Smrg  # We will build objects and dependencies in a subdirectory because
8889bdcaa8d0Smrg  # it helps to detect inapplicable dependency modes.  For instance
8890bdcaa8d0Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8891bdcaa8d0Smrg  # side effect of compilation, but ICC will put the dependencies in
8892bdcaa8d0Smrg  # the current directory while Tru64 will put them in the object
8893bdcaa8d0Smrg  # directory.
8894bdcaa8d0Smrg  mkdir sub
8895bdcaa8d0Smrg
8896bdcaa8d0Smrg  am_cv_$1_dependencies_compiler_type=none
8897bdcaa8d0Smrg  if test "$am_compiler_list" = ""; then
8898bdcaa8d0Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8899bdcaa8d0Smrg  fi
8900bdcaa8d0Smrg  for depmode in $am_compiler_list; do
8901bdcaa8d0Smrg    # Setup a source with many dependencies, because some compilers
8902bdcaa8d0Smrg    # like to wrap large dependency lists on column 80 (with \), and
8903bdcaa8d0Smrg    # we should not choose a depcomp mode which is confused by this.
8904bdcaa8d0Smrg    #
8905bdcaa8d0Smrg    # We need to recreate these files for each test, as the compiler may
8906bdcaa8d0Smrg    # overwrite some of them when testing with obscure command lines.
8907bdcaa8d0Smrg    # This happens at least with the AIX C compiler.
8908bdcaa8d0Smrg    : > sub/conftest.c
8909bdcaa8d0Smrg    for i in 1 2 3 4 5 6; do
8910bdcaa8d0Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8911bdcaa8d0Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8912bdcaa8d0Smrg      # Solaris 8's {/usr,}/bin/sh.
8913bdcaa8d0Smrg      touch sub/conftst$i.h
8914bdcaa8d0Smrg    done
8915bdcaa8d0Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8916bdcaa8d0Smrg
8917bdcaa8d0Smrg    case $depmode in
8918bdcaa8d0Smrg    nosideeffect)
8919bdcaa8d0Smrg      # after this tag, mechanisms are not by side-effect, so they'll
8920bdcaa8d0Smrg      # only be used when explicitly requested
8921bdcaa8d0Smrg      if test "x$enable_dependency_tracking" = xyes; then
8922bdcaa8d0Smrg	continue
8923bdcaa8d0Smrg      else
8924bdcaa8d0Smrg	break
8925bdcaa8d0Smrg      fi
8926bdcaa8d0Smrg      ;;
8927bdcaa8d0Smrg    none) break ;;
8928bdcaa8d0Smrg    esac
8929bdcaa8d0Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8930bdcaa8d0Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8931bdcaa8d0Smrg    # handle `-M -o', and we need to detect this.
8932bdcaa8d0Smrg    if depmode=$depmode \
8933bdcaa8d0Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
8934bdcaa8d0Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8935bdcaa8d0Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
8936bdcaa8d0Smrg         >/dev/null 2>conftest.err &&
893772313efbSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8938bdcaa8d0Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8939bdcaa8d0Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
8940bdcaa8d0Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8941bdcaa8d0Smrg      # icc doesn't choke on unknown options, it will just issue warnings
8942bdcaa8d0Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
8943bdcaa8d0Smrg      # that says an option was ignored or not supported.
8944bdcaa8d0Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
8945bdcaa8d0Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
8946bdcaa8d0Smrg      # The diagnosis changed in icc 8.0:
8947bdcaa8d0Smrg      #   icc: Command line remark: option '-MP' not supported
8948bdcaa8d0Smrg      if (grep 'ignoring option' conftest.err ||
8949bdcaa8d0Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8950bdcaa8d0Smrg        am_cv_$1_dependencies_compiler_type=$depmode
8951bdcaa8d0Smrg        break
8952bdcaa8d0Smrg      fi
8953bdcaa8d0Smrg    fi
8954bdcaa8d0Smrg  done
8955bdcaa8d0Smrg
8956bdcaa8d0Smrg  cd ..
8957bdcaa8d0Smrg  rm -rf conftest.dir
8958bdcaa8d0Smrgelse
8959bdcaa8d0Smrg  am_cv_$1_dependencies_compiler_type=none
8960bdcaa8d0Smrgfi
8961bdcaa8d0Smrg])
8962bdcaa8d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8963bdcaa8d0SmrgAM_CONDITIONAL([am__fastdep$1], [
8964bdcaa8d0Smrg  test "x$enable_dependency_tracking" != xno \
8965bdcaa8d0Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8966bdcaa8d0Smrg])
8967bdcaa8d0Smrg
8968bdcaa8d0Smrg
8969bdcaa8d0Smrg# AM_SET_DEPDIR
8970bdcaa8d0Smrg# -------------
8971bdcaa8d0Smrg# Choose a directory name for dependency files.
8972bdcaa8d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8973bdcaa8d0SmrgAC_DEFUN([AM_SET_DEPDIR],
8974bdcaa8d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8975bdcaa8d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8976bdcaa8d0Smrg])
8977bdcaa8d0Smrg
8978bdcaa8d0Smrg
8979bdcaa8d0Smrg# AM_DEP_TRACK
8980bdcaa8d0Smrg# ------------
8981bdcaa8d0SmrgAC_DEFUN([AM_DEP_TRACK],
8982bdcaa8d0Smrg[AC_ARG_ENABLE(dependency-tracking,
8983bdcaa8d0Smrg[  --disable-dependency-tracking  speeds up one-time build
8984bdcaa8d0Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
8985bdcaa8d0Smrgif test "x$enable_dependency_tracking" != xno; then
8986bdcaa8d0Smrg  am_depcomp="$ac_aux_dir/depcomp"
8987bdcaa8d0Smrg  AMDEPBACKSLASH='\'
8988bdcaa8d0Smrgfi
8989bdcaa8d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
899072313efbSmrgAC_SUBST([AMDEPBACKSLASH])dnl
899172313efbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8992bdcaa8d0Smrg])
8993bdcaa8d0Smrg
8994bdcaa8d0Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
8995bdcaa8d0Smrg
899672313efbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8997bdcaa8d0Smrg# Free Software Foundation, Inc.
8998bdcaa8d0Smrg#
8999bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9000bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9001bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9002bdcaa8d0Smrg
900372313efbSmrg#serial 4
9004bdcaa8d0Smrg
9005bdcaa8d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
9006bdcaa8d0Smrg# ------------------------------
9007bdcaa8d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
900872313efbSmrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
900972313efbSmrg# are listed without --file.  Let's play safe and only enable the eval
901072313efbSmrg# if we detect the quoting.
901172313efbSmrgcase $CONFIG_FILES in
901272313efbSmrg*\'*) eval set x "$CONFIG_FILES" ;;
901372313efbSmrg*)   set x $CONFIG_FILES ;;
901472313efbSmrgesac
901572313efbSmrgshift
901672313efbSmrgfor mf
901772313efbSmrgdo
9018bdcaa8d0Smrg  # Strip MF so we end up with the name of the file.
9019bdcaa8d0Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
9020bdcaa8d0Smrg  # Check whether this is an Automake generated Makefile or not.
9021bdcaa8d0Smrg  # We used to match only the files named `Makefile.in', but
9022bdcaa8d0Smrg  # some people rename them; so instead we look at the file content.
9023bdcaa8d0Smrg  # Grep'ing the first line is not enough: some people post-process
9024bdcaa8d0Smrg  # each Makefile.in and add a new line on top of each file to say so.
902572313efbSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
902672313efbSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
902772313efbSmrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9028bdcaa8d0Smrg    dirpart=`AS_DIRNAME("$mf")`
9029bdcaa8d0Smrg  else
9030bdcaa8d0Smrg    continue
9031bdcaa8d0Smrg  fi
9032bdcaa8d0Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
9033bdcaa8d0Smrg  # from the Makefile without running `make'.
9034bdcaa8d0Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9035bdcaa8d0Smrg  test -z "$DEPDIR" && continue
9036bdcaa8d0Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
9037bdcaa8d0Smrg  test -z "am__include" && continue
9038bdcaa8d0Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9039bdcaa8d0Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
9040bdcaa8d0Smrg  U=`sed -n 's/^U = //p' < "$mf"`
9041bdcaa8d0Smrg  # Find all dependency output files, they are included files with
9042bdcaa8d0Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
9043bdcaa8d0Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
9044bdcaa8d0Smrg  # expansion.
9045bdcaa8d0Smrg  for file in `sed -n "
9046bdcaa8d0Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9047bdcaa8d0Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9048bdcaa8d0Smrg    # Make sure the directory exists.
9049bdcaa8d0Smrg    test -f "$dirpart/$file" && continue
9050bdcaa8d0Smrg    fdir=`AS_DIRNAME(["$file"])`
9051bdcaa8d0Smrg    AS_MKDIR_P([$dirpart/$fdir])
9052bdcaa8d0Smrg    # echo "creating $dirpart/$file"
9053bdcaa8d0Smrg    echo '# dummy' > "$dirpart/$file"
9054bdcaa8d0Smrg  done
9055bdcaa8d0Smrgdone
9056bdcaa8d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9057bdcaa8d0Smrg
9058bdcaa8d0Smrg
9059bdcaa8d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
9060bdcaa8d0Smrg# -----------------------------
9061bdcaa8d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
9062bdcaa8d0Smrg#
9063bdcaa8d0Smrg# This code is only required when automatic dependency tracking
9064bdcaa8d0Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
9065bdcaa8d0Smrg# need in order to bootstrap the dependency handling code.
9066bdcaa8d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9067bdcaa8d0Smrg[AC_CONFIG_COMMANDS([depfiles],
9068bdcaa8d0Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9069bdcaa8d0Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9070bdcaa8d0Smrg])
9071bdcaa8d0Smrg
9072bdcaa8d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9073bdcaa8d0Smrg# Free Software Foundation, Inc.
9074bdcaa8d0Smrg#
9075bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9076bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9077bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9078bdcaa8d0Smrg
9079bdcaa8d0Smrg# serial 8
9080bdcaa8d0Smrg
9081bdcaa8d0Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9082bdcaa8d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9083bdcaa8d0Smrg
9084bdcaa8d0Smrg# Do all the work for Automake.                             -*- Autoconf -*-
9085bdcaa8d0Smrg
908672313efbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
908772313efbSmrg# 2005, 2006, 2008 Free Software Foundation, Inc.
9088bdcaa8d0Smrg#
9089bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9090bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9091bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9092bdcaa8d0Smrg
909372313efbSmrg# serial 13
9094bdcaa8d0Smrg
9095bdcaa8d0Smrg# This macro actually does too much.  Some checks are only needed if
9096bdcaa8d0Smrg# your package does certain things.  But this isn't really a big deal.
9097bdcaa8d0Smrg
9098bdcaa8d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9099bdcaa8d0Smrg# AM_INIT_AUTOMAKE([OPTIONS])
9100bdcaa8d0Smrg# -----------------------------------------------
9101bdcaa8d0Smrg# The call with PACKAGE and VERSION arguments is the old style
9102bdcaa8d0Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9103bdcaa8d0Smrg# and VERSION should now be passed to AC_INIT and removed from
9104bdcaa8d0Smrg# the call to AM_INIT_AUTOMAKE.
9105bdcaa8d0Smrg# We support both call styles for the transition.  After
9106bdcaa8d0Smrg# the next Automake release, Autoconf can make the AC_INIT
9107bdcaa8d0Smrg# arguments mandatory, and then we can depend on a new Autoconf
9108bdcaa8d0Smrg# release and drop the old call support.
9109bdcaa8d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
911072313efbSmrg[AC_PREREQ([2.60])dnl
9111bdcaa8d0Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
9112bdcaa8d0Smrgdnl the ones we care about.
9113bdcaa8d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9114bdcaa8d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9115bdcaa8d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
911672313efbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
911772313efbSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
911872313efbSmrg  # is not polluted with repeated "-I."
911972313efbSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
912072313efbSmrg  # test to see if srcdir already configured
912172313efbSmrg  if test -f $srcdir/config.status; then
912272313efbSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
912372313efbSmrg  fi
9124bdcaa8d0Smrgfi
9125bdcaa8d0Smrg
9126bdcaa8d0Smrg# test whether we have cygpath
9127bdcaa8d0Smrgif test -z "$CYGPATH_W"; then
9128bdcaa8d0Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
9129bdcaa8d0Smrg    CYGPATH_W='cygpath -w'
9130bdcaa8d0Smrg  else
9131bdcaa8d0Smrg    CYGPATH_W=echo
9132bdcaa8d0Smrg  fi
9133bdcaa8d0Smrgfi
9134bdcaa8d0SmrgAC_SUBST([CYGPATH_W])
9135bdcaa8d0Smrg
9136bdcaa8d0Smrg# Define the identity of the package.
9137bdcaa8d0Smrgdnl Distinguish between old-style and new-style calls.
9138bdcaa8d0Smrgm4_ifval([$2],
9139bdcaa8d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9140bdcaa8d0Smrg AC_SUBST([PACKAGE], [$1])dnl
9141bdcaa8d0Smrg AC_SUBST([VERSION], [$2])],
9142bdcaa8d0Smrg[_AM_SET_OPTIONS([$1])dnl
914372313efbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
914472313efbSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
914572313efbSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9146bdcaa8d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9147bdcaa8d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9148bdcaa8d0Smrg
9149bdcaa8d0Smrg_AM_IF_OPTION([no-define],,
9150bdcaa8d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9151bdcaa8d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9152bdcaa8d0Smrg
9153bdcaa8d0Smrg# Some tools Automake needs.
9154bdcaa8d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
9155bdcaa8d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
9156bdcaa8d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9157bdcaa8d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
9158bdcaa8d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9159bdcaa8d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
9160bdcaa8d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
9161bdcaa8d0SmrgAM_PROG_INSTALL_SH
9162bdcaa8d0SmrgAM_PROG_INSTALL_STRIP
9163bdcaa8d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
9164bdcaa8d0Smrg# We need awk for the "check" target.  The system "awk" is bad on
9165bdcaa8d0Smrg# some platforms.
9166bdcaa8d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl
9167bdcaa8d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
9168bdcaa8d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
9169bdcaa8d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9170bdcaa8d0Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9171bdcaa8d0Smrg	      		     [_AM_PROG_TAR([v7])])])
9172bdcaa8d0Smrg_AM_IF_OPTION([no-dependencies],,
9173bdcaa8d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
9174bdcaa8d0Smrg                  [_AM_DEPENDENCIES(CC)],
9175bdcaa8d0Smrg                  [define([AC_PROG_CC],
9176bdcaa8d0Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9177bdcaa8d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
9178bdcaa8d0Smrg                  [_AM_DEPENDENCIES(CXX)],
9179bdcaa8d0Smrg                  [define([AC_PROG_CXX],
9180bdcaa8d0Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
918172313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
918272313efbSmrg                  [_AM_DEPENDENCIES(OBJC)],
918372313efbSmrg                  [define([AC_PROG_OBJC],
918472313efbSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9185bdcaa8d0Smrg])
9186bdcaa8d0Smrg])
9187bdcaa8d0Smrg
9188bdcaa8d0Smrg
9189bdcaa8d0Smrg# When config.status generates a header, we must update the stamp-h file.
9190bdcaa8d0Smrg# This file resides in the same directory as the config header
9191bdcaa8d0Smrg# that is generated.  The stamp files are numbered to have different names.
9192bdcaa8d0Smrg
9193bdcaa8d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9194bdcaa8d0Smrg# loop where config.status creates the headers, so we can generate
9195bdcaa8d0Smrg# our stamp files there.
9196bdcaa8d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9197bdcaa8d0Smrg[# Compute $1's index in $config_headers.
919872313efbSmrg_am_arg=$1
9199bdcaa8d0Smrg_am_stamp_count=1
9200bdcaa8d0Smrgfor _am_header in $config_headers :; do
9201bdcaa8d0Smrg  case $_am_header in
920272313efbSmrg    $_am_arg | $_am_arg:* )
9203bdcaa8d0Smrg      break ;;
9204bdcaa8d0Smrg    * )
9205bdcaa8d0Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9206bdcaa8d0Smrg  esac
9207bdcaa8d0Smrgdone
920872313efbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9209bdcaa8d0Smrg
9210bdcaa8d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9211bdcaa8d0Smrg#
9212bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9213bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9214bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9215bdcaa8d0Smrg
9216bdcaa8d0Smrg# AM_PROG_INSTALL_SH
9217bdcaa8d0Smrg# ------------------
9218bdcaa8d0Smrg# Define $install_sh.
9219bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
9220bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
922172313efbSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
9222bdcaa8d0SmrgAC_SUBST(install_sh)])
9223bdcaa8d0Smrg
9224bdcaa8d0Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9225bdcaa8d0Smrg#
9226bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9227bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9228bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9229bdcaa8d0Smrg
9230bdcaa8d0Smrg# serial 2
9231bdcaa8d0Smrg
9232bdcaa8d0Smrg# Check whether the underlying file-system supports filenames
9233bdcaa8d0Smrg# with a leading dot.  For instance MS-DOS doesn't.
9234bdcaa8d0SmrgAC_DEFUN([AM_SET_LEADING_DOT],
9235bdcaa8d0Smrg[rm -rf .tst 2>/dev/null
9236bdcaa8d0Smrgmkdir .tst 2>/dev/null
9237bdcaa8d0Smrgif test -d .tst; then
9238bdcaa8d0Smrg  am__leading_dot=.
9239bdcaa8d0Smrgelse
9240bdcaa8d0Smrg  am__leading_dot=_
9241bdcaa8d0Smrgfi
9242bdcaa8d0Smrgrmdir .tst 2>/dev/null
9243bdcaa8d0SmrgAC_SUBST([am__leading_dot])])
9244bdcaa8d0Smrg
9245bdcaa8d0Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9246bdcaa8d0Smrg# From Jim Meyering
9247bdcaa8d0Smrg
9248bdcaa8d0Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
9249bdcaa8d0Smrg# Free Software Foundation, Inc.
9250bdcaa8d0Smrg#
9251bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9252bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9253bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9254bdcaa8d0Smrg
9255bdcaa8d0Smrg# serial 4
9256bdcaa8d0Smrg
9257bdcaa8d0SmrgAC_DEFUN([AM_MAINTAINER_MODE],
9258bdcaa8d0Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
9259bdcaa8d0Smrg  dnl maintainer-mode is disabled by default
9260bdcaa8d0Smrg  AC_ARG_ENABLE(maintainer-mode,
9261bdcaa8d0Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
9262bdcaa8d0Smrg			  (and sometimes confusing) to the casual installer],
9263bdcaa8d0Smrg      USE_MAINTAINER_MODE=$enableval,
9264bdcaa8d0Smrg      USE_MAINTAINER_MODE=no)
9265bdcaa8d0Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9266bdcaa8d0Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
9267bdcaa8d0Smrg  MAINT=$MAINTAINER_MODE_TRUE
9268bdcaa8d0Smrg  AC_SUBST(MAINT)dnl
9269bdcaa8d0Smrg]
9270bdcaa8d0Smrg)
9271bdcaa8d0Smrg
9272bdcaa8d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9273bdcaa8d0Smrg
9274bdcaa8d0Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9275bdcaa8d0Smrg
9276bdcaa8d0Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
9277bdcaa8d0Smrg#
9278bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9279bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9280bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9281bdcaa8d0Smrg
9282bdcaa8d0Smrg# serial 3
9283bdcaa8d0Smrg
9284bdcaa8d0Smrg# AM_MAKE_INCLUDE()
9285bdcaa8d0Smrg# -----------------
9286bdcaa8d0Smrg# Check to see how make treats includes.
9287bdcaa8d0SmrgAC_DEFUN([AM_MAKE_INCLUDE],
9288bdcaa8d0Smrg[am_make=${MAKE-make}
9289bdcaa8d0Smrgcat > confinc << 'END'
9290bdcaa8d0Smrgam__doit:
9291bdcaa8d0Smrg	@echo done
9292bdcaa8d0Smrg.PHONY: am__doit
9293bdcaa8d0SmrgEND
9294bdcaa8d0Smrg# If we don't find an include directive, just comment out the code.
9295bdcaa8d0SmrgAC_MSG_CHECKING([for style of include used by $am_make])
9296bdcaa8d0Smrgam__include="#"
9297bdcaa8d0Smrgam__quote=
9298bdcaa8d0Smrg_am_result=none
9299bdcaa8d0Smrg# First try GNU make style include.
9300bdcaa8d0Smrgecho "include confinc" > confmf
9301bdcaa8d0Smrg# We grep out `Entering directory' and `Leaving directory'
9302bdcaa8d0Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
9303bdcaa8d0Smrg# In particular we don't look at `^make:' because GNU make might
9304bdcaa8d0Smrg# be invoked under some other name (usually "gmake"), in which
9305bdcaa8d0Smrg# case it prints its new name instead of `make'.
9306bdcaa8d0Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9307bdcaa8d0Smrg   am__include=include
9308bdcaa8d0Smrg   am__quote=
9309bdcaa8d0Smrg   _am_result=GNU
9310bdcaa8d0Smrgfi
9311bdcaa8d0Smrg# Now try BSD make style include.
9312bdcaa8d0Smrgif test "$am__include" = "#"; then
9313bdcaa8d0Smrg   echo '.include "confinc"' > confmf
9314bdcaa8d0Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9315bdcaa8d0Smrg      am__include=.include
9316bdcaa8d0Smrg      am__quote="\""
9317bdcaa8d0Smrg      _am_result=BSD
9318bdcaa8d0Smrg   fi
9319bdcaa8d0Smrgfi
9320bdcaa8d0SmrgAC_SUBST([am__include])
9321bdcaa8d0SmrgAC_SUBST([am__quote])
9322bdcaa8d0SmrgAC_MSG_RESULT([$_am_result])
9323bdcaa8d0Smrgrm -f confinc confmf
9324bdcaa8d0Smrg])
9325bdcaa8d0Smrg
9326bdcaa8d0Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9327bdcaa8d0Smrg
932872313efbSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
9329bdcaa8d0Smrg# Free Software Foundation, Inc.
9330bdcaa8d0Smrg#
9331bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9332bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9333bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9334bdcaa8d0Smrg
933572313efbSmrg# serial 5
9336bdcaa8d0Smrg
9337bdcaa8d0Smrg# AM_MISSING_PROG(NAME, PROGRAM)
9338bdcaa8d0Smrg# ------------------------------
9339bdcaa8d0SmrgAC_DEFUN([AM_MISSING_PROG],
9340bdcaa8d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
9341bdcaa8d0Smrg$1=${$1-"${am_missing_run}$2"}
9342bdcaa8d0SmrgAC_SUBST($1)])
9343bdcaa8d0Smrg
9344bdcaa8d0Smrg
9345bdcaa8d0Smrg# AM_MISSING_HAS_RUN
9346bdcaa8d0Smrg# ------------------
9347bdcaa8d0Smrg# Define MISSING if not defined so far and test if it supports --run.
9348bdcaa8d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
9349bdcaa8d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
9350bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
935172313efbSmrgAC_REQUIRE_AUX_FILE([missing])dnl
9352bdcaa8d0Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9353bdcaa8d0Smrg# Use eval to expand $SHELL
9354bdcaa8d0Smrgif eval "$MISSING --run true"; then
9355bdcaa8d0Smrg  am_missing_run="$MISSING --run "
9356bdcaa8d0Smrgelse
9357bdcaa8d0Smrg  am_missing_run=
9358bdcaa8d0Smrg  AC_MSG_WARN([`missing' script is too old or missing])
9359bdcaa8d0Smrgfi
9360bdcaa8d0Smrg])
9361bdcaa8d0Smrg
936272313efbSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9363bdcaa8d0Smrg#
9364bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9365bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9366bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9367bdcaa8d0Smrg
9368bdcaa8d0Smrg# AM_PROG_MKDIR_P
9369bdcaa8d0Smrg# ---------------
937072313efbSmrg# Check for `mkdir -p'.
9371bdcaa8d0SmrgAC_DEFUN([AM_PROG_MKDIR_P],
937272313efbSmrg[AC_PREREQ([2.60])dnl
937372313efbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
937472313efbSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
937572313efbSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
937672313efbSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
937772313efbSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
937872313efbSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
937972313efbSmrgdnl adjustment using top_builddir (which is defined more often than
938072313efbSmrgdnl MKDIR_P).
938172313efbSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
938272313efbSmrgcase $mkdir_p in
938372313efbSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
938472313efbSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
938572313efbSmrgesac
938672313efbSmrg])
9387bdcaa8d0Smrg
9388bdcaa8d0Smrg# Helper functions for option handling.                     -*- Autoconf -*-
9389bdcaa8d0Smrg
939072313efbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9391bdcaa8d0Smrg#
9392bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9393bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9394bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9395bdcaa8d0Smrg
939672313efbSmrg# serial 4
9397bdcaa8d0Smrg
9398bdcaa8d0Smrg# _AM_MANGLE_OPTION(NAME)
9399bdcaa8d0Smrg# -----------------------
9400bdcaa8d0SmrgAC_DEFUN([_AM_MANGLE_OPTION],
9401bdcaa8d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9402bdcaa8d0Smrg
9403bdcaa8d0Smrg# _AM_SET_OPTION(NAME)
9404bdcaa8d0Smrg# ------------------------------
9405bdcaa8d0Smrg# Set option NAME.  Presently that only means defining a flag for this option.
9406bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTION],
9407bdcaa8d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9408bdcaa8d0Smrg
9409bdcaa8d0Smrg# _AM_SET_OPTIONS(OPTIONS)
9410bdcaa8d0Smrg# ----------------------------------
9411bdcaa8d0Smrg# OPTIONS is a space-separated list of Automake options.
9412bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTIONS],
941372313efbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9414bdcaa8d0Smrg
9415bdcaa8d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9416bdcaa8d0Smrg# -------------------------------------------
9417bdcaa8d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9418bdcaa8d0SmrgAC_DEFUN([_AM_IF_OPTION],
9419bdcaa8d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9420bdcaa8d0Smrg
9421bdcaa8d0Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9422bdcaa8d0Smrg
9423bdcaa8d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9424bdcaa8d0Smrg# Free Software Foundation, Inc.
9425bdcaa8d0Smrg#
9426bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9427bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9428bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9429bdcaa8d0Smrg
9430bdcaa8d0Smrg# serial 4
9431bdcaa8d0Smrg
9432bdcaa8d0Smrg# AM_SANITY_CHECK
9433bdcaa8d0Smrg# ---------------
9434bdcaa8d0SmrgAC_DEFUN([AM_SANITY_CHECK],
9435bdcaa8d0Smrg[AC_MSG_CHECKING([whether build environment is sane])
9436bdcaa8d0Smrg# Just in case
9437bdcaa8d0Smrgsleep 1
9438bdcaa8d0Smrgecho timestamp > conftest.file
9439bdcaa8d0Smrg# Do `set' in a subshell so we don't clobber the current shell's
9440bdcaa8d0Smrg# arguments.  Must try -L first in case configure is actually a
9441bdcaa8d0Smrg# symlink; some systems play weird games with the mod time of symlinks
9442bdcaa8d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing
9443bdcaa8d0Smrg# directory).
9444bdcaa8d0Smrgif (
9445bdcaa8d0Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9446bdcaa8d0Smrg   if test "$[*]" = "X"; then
9447bdcaa8d0Smrg      # -L didn't work.
9448bdcaa8d0Smrg      set X `ls -t $srcdir/configure conftest.file`
9449bdcaa8d0Smrg   fi
9450bdcaa8d0Smrg   rm -f conftest.file
9451bdcaa8d0Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
9452bdcaa8d0Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9453bdcaa8d0Smrg
9454bdcaa8d0Smrg      # If neither matched, then we have a broken ls.  This can happen
9455bdcaa8d0Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
9456bdcaa8d0Smrg      # broken ls alias from the environment.  This has actually
9457bdcaa8d0Smrg      # happened.  Such a system could not be considered "sane".
9458bdcaa8d0Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9459bdcaa8d0Smrgalias in your environment])
9460bdcaa8d0Smrg   fi
9461bdcaa8d0Smrg
9462bdcaa8d0Smrg   test "$[2]" = conftest.file
9463bdcaa8d0Smrg   )
9464bdcaa8d0Smrgthen
9465bdcaa8d0Smrg   # Ok.
9466bdcaa8d0Smrg   :
9467bdcaa8d0Smrgelse
9468bdcaa8d0Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
9469bdcaa8d0SmrgCheck your system clock])
9470bdcaa8d0Smrgfi
9471bdcaa8d0SmrgAC_MSG_RESULT(yes)])
9472bdcaa8d0Smrg
9473bdcaa8d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9474bdcaa8d0Smrg#
9475bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9476bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9477bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9478bdcaa8d0Smrg
9479bdcaa8d0Smrg# AM_PROG_INSTALL_STRIP
9480bdcaa8d0Smrg# ---------------------
9481bdcaa8d0Smrg# One issue with vendor `install' (even GNU) is that you can't
9482bdcaa8d0Smrg# specify the program used to strip binaries.  This is especially
9483bdcaa8d0Smrg# annoying in cross-compiling environments, where the build's strip
9484bdcaa8d0Smrg# is unlikely to handle the host's binaries.
9485bdcaa8d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9486bdcaa8d0Smrg# always use install-sh in `make install-strip', and initialize
9487bdcaa8d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9488bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9489bdcaa8d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9490bdcaa8d0Smrg# Installed binaries are usually stripped using `strip' when the user
9491bdcaa8d0Smrg# run `make install-strip'.  However `strip' might not be the right
9492bdcaa8d0Smrg# tool to use in cross-compilation environments, therefore Automake
9493bdcaa8d0Smrg# will honor the `STRIP' environment variable to overrule this program.
9494bdcaa8d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9495bdcaa8d0Smrgif test "$cross_compiling" != no; then
9496bdcaa8d0Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9497bdcaa8d0Smrgfi
949872313efbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9499bdcaa8d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9500bdcaa8d0Smrg
950172313efbSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
950272313efbSmrg#
950372313efbSmrg# This file is free software; the Free Software Foundation
950472313efbSmrg# gives unlimited permission to copy and/or distribute it,
950572313efbSmrg# with or without modifications, as long as this notice is preserved.
950672313efbSmrg
950772313efbSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
950872313efbSmrg# ---------------------------
950972313efbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
951072313efbSmrg# This macro is traced by Automake.
951172313efbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
951272313efbSmrg
9513bdcaa8d0Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9514bdcaa8d0Smrg
9515bdcaa8d0Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9516bdcaa8d0Smrg#
9517bdcaa8d0Smrg# This file is free software; the Free Software Foundation
9518bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it,
9519bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved.
9520bdcaa8d0Smrg
9521bdcaa8d0Smrg# serial 2
9522bdcaa8d0Smrg
9523bdcaa8d0Smrg# _AM_PROG_TAR(FORMAT)
9524bdcaa8d0Smrg# --------------------
9525bdcaa8d0Smrg# Check how to create a tarball in format FORMAT.
9526bdcaa8d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9527bdcaa8d0Smrg#
9528bdcaa8d0Smrg# Substitute a variable $(am__tar) that is a command
9529bdcaa8d0Smrg# writing to stdout a FORMAT-tarball containing the directory
9530bdcaa8d0Smrg# $tardir.
9531bdcaa8d0Smrg#     tardir=directory && $(am__tar) > result.tar
9532bdcaa8d0Smrg#
9533bdcaa8d0Smrg# Substitute a variable $(am__untar) that extract such
9534bdcaa8d0Smrg# a tarball read from stdin.
9535bdcaa8d0Smrg#     $(am__untar) < result.tar
9536bdcaa8d0SmrgAC_DEFUN([_AM_PROG_TAR],
9537bdcaa8d0Smrg[# Always define AMTAR for backward compatibility.
9538bdcaa8d0SmrgAM_MISSING_PROG([AMTAR], [tar])
9539bdcaa8d0Smrgm4_if([$1], [v7],
9540bdcaa8d0Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9541bdcaa8d0Smrg     [m4_case([$1], [ustar],, [pax],,
9542bdcaa8d0Smrg              [m4_fatal([Unknown tar format])])
9543bdcaa8d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9544bdcaa8d0Smrg# Loop over all known methods to create a tar archive until one works.
9545bdcaa8d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9546bdcaa8d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9547bdcaa8d0Smrg# Do not fold the above two line into one, because Tru64 sh and
9548bdcaa8d0Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9549bdcaa8d0Smrgfor _am_tool in $_am_tools
9550bdcaa8d0Smrgdo
9551bdcaa8d0Smrg  case $_am_tool in
9552bdcaa8d0Smrg  gnutar)
9553bdcaa8d0Smrg    for _am_tar in tar gnutar gtar;
9554bdcaa8d0Smrg    do
9555bdcaa8d0Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9556bdcaa8d0Smrg    done
9557bdcaa8d0Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9558bdcaa8d0Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9559bdcaa8d0Smrg    am__untar="$_am_tar -xf -"
9560bdcaa8d0Smrg    ;;
9561bdcaa8d0Smrg  plaintar)
9562bdcaa8d0Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9563bdcaa8d0Smrg    # ustar tarball either.
9564bdcaa8d0Smrg    (tar --version) >/dev/null 2>&1 && continue
9565bdcaa8d0Smrg    am__tar='tar chf - "$$tardir"'
9566bdcaa8d0Smrg    am__tar_='tar chf - "$tardir"'
9567bdcaa8d0Smrg    am__untar='tar xf -'
9568bdcaa8d0Smrg    ;;
9569bdcaa8d0Smrg  pax)
9570bdcaa8d0Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9571bdcaa8d0Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9572bdcaa8d0Smrg    am__untar='pax -r'
9573bdcaa8d0Smrg    ;;
9574bdcaa8d0Smrg  cpio)
9575bdcaa8d0Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9576bdcaa8d0Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9577bdcaa8d0Smrg    am__untar='cpio -i -H $1 -d'
9578bdcaa8d0Smrg    ;;
9579bdcaa8d0Smrg  none)
9580bdcaa8d0Smrg    am__tar=false
9581bdcaa8d0Smrg    am__tar_=false
9582bdcaa8d0Smrg    am__untar=false
9583bdcaa8d0Smrg    ;;
9584bdcaa8d0Smrg  esac
9585bdcaa8d0Smrg
9586bdcaa8d0Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
9587bdcaa8d0Smrg  # and am__untar set.
9588bdcaa8d0Smrg  test -n "${am_cv_prog_tar_$1}" && break
9589bdcaa8d0Smrg
9590bdcaa8d0Smrg  # tar/untar a dummy directory, and stop if the command works
9591bdcaa8d0Smrg  rm -rf conftest.dir
9592bdcaa8d0Smrg  mkdir conftest.dir
9593bdcaa8d0Smrg  echo GrepMe > conftest.dir/file
9594bdcaa8d0Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9595bdcaa8d0Smrg  rm -rf conftest.dir
9596bdcaa8d0Smrg  if test -s conftest.tar; then
9597bdcaa8d0Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
9598bdcaa8d0Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9599bdcaa8d0Smrg  fi
9600bdcaa8d0Smrgdone
9601bdcaa8d0Smrgrm -rf conftest.dir
9602bdcaa8d0Smrg
9603bdcaa8d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9604bdcaa8d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9605bdcaa8d0SmrgAC_SUBST([am__tar])
9606bdcaa8d0SmrgAC_SUBST([am__untar])
9607bdcaa8d0Smrg]) # _AM_PROG_TAR
9608bdcaa8d0Smrg
9609