libtool.m4 revision 32001f49
132001f49Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 232001f49Smrg# 332001f49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 432001f49Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 532001f49Smrg# Foundation, Inc. 632001f49Smrg# Written by Gordon Matzigkeit, 1996 732001f49Smrg# 832001f49Smrg# This file is free software; the Free Software Foundation gives 932001f49Smrg# unlimited permission to copy and/or distribute it, with or without 1032001f49Smrg# modifications, as long as this notice is preserved. 1132001f49Smrg 1232001f49Smrgm4_define([_LT_COPYING], [dnl 1332001f49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1432001f49Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1532001f49Smrg# Foundation, Inc. 1632001f49Smrg# Written by Gordon Matzigkeit, 1996 1732001f49Smrg# 1832001f49Smrg# This file is part of GNU Libtool. 1932001f49Smrg# 2032001f49Smrg# GNU Libtool is free software; you can redistribute it and/or 2132001f49Smrg# modify it under the terms of the GNU General Public License as 2232001f49Smrg# published by the Free Software Foundation; either version 2 of 2332001f49Smrg# the License, or (at your option) any later version. 2432001f49Smrg# 2532001f49Smrg# As a special exception to the GNU General Public License, 2632001f49Smrg# if you distribute this file as part of a program or library that 2732001f49Smrg# is built using GNU Libtool, you may include this file under the 2832001f49Smrg# same distribution terms that you use for the rest of that program. 2932001f49Smrg# 3032001f49Smrg# GNU Libtool is distributed in the hope that it will be useful, 3132001f49Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 3232001f49Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3332001f49Smrg# GNU General Public License for more details. 3432001f49Smrg# 3532001f49Smrg# You should have received a copy of the GNU General Public License 3632001f49Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 3732001f49Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 3832001f49Smrg# obtained by writing to the Free Software Foundation, Inc., 3932001f49Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4032001f49Smrg]) 4132001f49Smrg 4232001f49Smrg# serial 57 LT_INIT 4332001f49Smrg 4432001f49Smrg 4532001f49Smrg# LT_PREREQ(VERSION) 4632001f49Smrg# ------------------ 4732001f49Smrg# Complain and exit if this libtool version is less that VERSION. 4832001f49Smrgm4_defun([LT_PREREQ], 4932001f49Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 5032001f49Smrg [m4_default([$3], 5132001f49Smrg [m4_fatal([Libtool version $1 or higher is required], 5232001f49Smrg 63)])], 5332001f49Smrg [$2])]) 5432001f49Smrg 5532001f49Smrg 5632001f49Smrg# _LT_CHECK_BUILDDIR 5732001f49Smrg# ------------------ 5832001f49Smrg# Complain if the absolute build directory name contains unusual characters 5932001f49Smrgm4_defun([_LT_CHECK_BUILDDIR], 6032001f49Smrg[case `pwd` in 6132001f49Smrg *\ * | *\ *) 6232001f49Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 6332001f49Smrgesac 6432001f49Smrg]) 6532001f49Smrg 6632001f49Smrg 6732001f49Smrg# LT_INIT([OPTIONS]) 6832001f49Smrg# ------------------ 6932001f49SmrgAC_DEFUN([LT_INIT], 7032001f49Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 7132001f49SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 7232001f49SmrgAC_BEFORE([$0], [LT_LANG])dnl 7332001f49SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 7432001f49SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 7532001f49Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 7632001f49Smrg 7732001f49Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 7832001f49Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 7932001f49Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 8032001f49Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 8132001f49Smrgdnl unless we require an AC_DEFUNed macro: 8232001f49SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 8332001f49SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 8432001f49SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 8532001f49SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 8632001f49Smrgm4_require([_LT_PROG_LTMAIN])dnl 8732001f49Smrg 8832001f49Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 8932001f49Smrg 9032001f49Smrgdnl Parse OPTIONS 9132001f49Smrg_LT_SET_OPTIONS([$0], [$1]) 9232001f49Smrg 9332001f49Smrg# This can be used to rebuild libtool when needed 9432001f49SmrgLIBTOOL_DEPS="$ltmain" 9532001f49Smrg 9632001f49Smrg# Always use our own libtool. 9732001f49SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 9832001f49SmrgAC_SUBST(LIBTOOL)dnl 9932001f49Smrg 10032001f49Smrg_LT_SETUP 10132001f49Smrg 10232001f49Smrg# Only expand once: 10332001f49Smrgm4_define([LT_INIT]) 10432001f49Smrg])# LT_INIT 10532001f49Smrg 10632001f49Smrg# Old names: 10732001f49SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 10832001f49SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 10932001f49Smrgdnl aclocal-1.4 backwards compatibility: 11032001f49Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 11132001f49Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 11232001f49Smrg 11332001f49Smrg 11432001f49Smrg# _LT_CC_BASENAME(CC) 11532001f49Smrg# ------------------- 11632001f49Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11732001f49Smrgm4_defun([_LT_CC_BASENAME], 11832001f49Smrg[for cc_temp in $1""; do 11932001f49Smrg case $cc_temp in 12032001f49Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12132001f49Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12232001f49Smrg \-*) ;; 12332001f49Smrg *) break;; 12432001f49Smrg esac 12532001f49Smrgdone 12632001f49Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12732001f49Smrg]) 12832001f49Smrg 12932001f49Smrg 13032001f49Smrg# _LT_FILEUTILS_DEFAULTS 13132001f49Smrg# ---------------------- 13232001f49Smrg# It is okay to use these file commands and assume they have been set 13332001f49Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 13432001f49Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 13532001f49Smrg[: ${CP="cp -f"} 13632001f49Smrg: ${MV="mv -f"} 13732001f49Smrg: ${RM="rm -f"} 13832001f49Smrg])# _LT_FILEUTILS_DEFAULTS 13932001f49Smrg 14032001f49Smrg 14132001f49Smrg# _LT_SETUP 14232001f49Smrg# --------- 14332001f49Smrgm4_defun([_LT_SETUP], 14432001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 14532001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 14632001f49SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 14732001f49SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 14832001f49Smrg 14932001f49Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 15032001f49Smrgdnl 15132001f49Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 15232001f49Smrg_LT_DECL([], [host], [0])dnl 15332001f49Smrg_LT_DECL([], [host_os], [0])dnl 15432001f49Smrgdnl 15532001f49Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 15632001f49Smrg_LT_DECL([], [build], [0])dnl 15732001f49Smrg_LT_DECL([], [build_os], [0])dnl 15832001f49Smrgdnl 15932001f49SmrgAC_REQUIRE([AC_PROG_CC])dnl 16032001f49SmrgAC_REQUIRE([LT_PATH_LD])dnl 16132001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl 16232001f49Smrgdnl 16332001f49SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 16432001f49Smrgtest -z "$LN_S" && LN_S="ln -s" 16532001f49Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 16632001f49Smrgdnl 16732001f49SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 16832001f49Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 16932001f49Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 17032001f49Smrgdnl 17132001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 17232001f49Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 17332001f49Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 17432001f49Smrgm4_require([_LT_CMD_RELOAD])dnl 17532001f49Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 17632001f49Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 17732001f49Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 17832001f49Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 17932001f49Smrgm4_require([_LT_WITH_SYSROOT])dnl 18032001f49Smrg 18132001f49Smrg_LT_CONFIG_LIBTOOL_INIT([ 18232001f49Smrg# See if we are running on zsh, and set the options which allow our 18332001f49Smrg# commands through without removal of \ escapes INIT. 18432001f49Smrgif test -n "\${ZSH_VERSION+set}" ; then 18532001f49Smrg setopt NO_GLOB_SUBST 18632001f49Smrgfi 18732001f49Smrg]) 18832001f49Smrgif test -n "${ZSH_VERSION+set}" ; then 18932001f49Smrg setopt NO_GLOB_SUBST 19032001f49Smrgfi 19132001f49Smrg 19232001f49Smrg_LT_CHECK_OBJDIR 19332001f49Smrg 19432001f49Smrgm4_require([_LT_TAG_COMPILER])dnl 19532001f49Smrg 19632001f49Smrgcase $host_os in 19732001f49Smrgaix3*) 19832001f49Smrg # AIX sometimes has problems with the GCC collect2 program. For some 19932001f49Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 20032001f49Smrg # vanish in a puff of smoke. 20132001f49Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 20232001f49Smrg COLLECT_NAMES= 20332001f49Smrg export COLLECT_NAMES 20432001f49Smrg fi 20532001f49Smrg ;; 20632001f49Smrgesac 20732001f49Smrg 20832001f49Smrg# Global variables: 20932001f49Smrgofile=libtool 21032001f49Smrgcan_build_shared=yes 21132001f49Smrg 21232001f49Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 21332001f49Smrg# which needs '.lib'). 21432001f49Smrglibext=a 21532001f49Smrg 21632001f49Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 21732001f49Smrg 21832001f49Smrgold_CC="$CC" 21932001f49Smrgold_CFLAGS="$CFLAGS" 22032001f49Smrg 22132001f49Smrg# Set sane defaults for various variables 22232001f49Smrgtest -z "$CC" && CC=cc 22332001f49Smrgtest -z "$LTCC" && LTCC=$CC 22432001f49Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 22532001f49Smrgtest -z "$LD" && LD=ld 22632001f49Smrgtest -z "$ac_objext" && ac_objext=o 22732001f49Smrg 22832001f49Smrg_LT_CC_BASENAME([$compiler]) 22932001f49Smrg 23032001f49Smrg# Only perform the check for file, if the check method requires it 23132001f49Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 23232001f49Smrgcase $deplibs_check_method in 23332001f49Smrgfile_magic*) 23432001f49Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 23532001f49Smrg _LT_PATH_MAGIC 23632001f49Smrg fi 23732001f49Smrg ;; 23832001f49Smrgesac 23932001f49Smrg 24032001f49Smrg# Use C for the default configuration in the libtool script 24132001f49SmrgLT_SUPPORTED_TAG([CC]) 24232001f49Smrg_LT_LANG_C_CONFIG 24332001f49Smrg_LT_LANG_DEFAULT_CONFIG 24432001f49Smrg_LT_CONFIG_COMMANDS 24532001f49Smrg])# _LT_SETUP 24632001f49Smrg 24732001f49Smrg 24832001f49Smrg# _LT_PREPARE_SED_QUOTE_VARS 24932001f49Smrg# -------------------------- 25032001f49Smrg# Define a few sed substitution that help us do robust quoting. 25132001f49Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 25232001f49Smrg[# Backslashify metacharacters that are still active within 25332001f49Smrg# double-quoted strings. 25432001f49Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 25532001f49Smrg 25632001f49Smrg# Same as above, but do not quote variable references. 25732001f49Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 25832001f49Smrg 25932001f49Smrg# Sed substitution to delay expansion of an escaped shell variable in a 26032001f49Smrg# double_quote_subst'ed string. 26132001f49Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 26232001f49Smrg 26332001f49Smrg# Sed substitution to delay expansion of an escaped single quote. 26432001f49Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 26532001f49Smrg 26632001f49Smrg# Sed substitution to avoid accidental globbing in evaled expressions 26732001f49Smrgno_glob_subst='s/\*/\\\*/g' 26832001f49Smrg]) 26932001f49Smrg 27032001f49Smrg# _LT_PROG_LTMAIN 27132001f49Smrg# --------------- 27232001f49Smrg# Note that this code is called both from `configure', and `config.status' 27332001f49Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 27432001f49Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 27532001f49Smrg# so we pass a copy along to make sure it has a sensible value anyway. 27632001f49Smrgm4_defun([_LT_PROG_LTMAIN], 27732001f49Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 27832001f49Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 27932001f49Smrgltmain="$ac_aux_dir/ltmain.sh" 28032001f49Smrg])# _LT_PROG_LTMAIN 28132001f49Smrg 28232001f49Smrg 28332001f49Smrg## ------------------------------------- ## 28432001f49Smrg## Accumulate code for creating libtool. ## 28532001f49Smrg## ------------------------------------- ## 28632001f49Smrg 28732001f49Smrg# So that we can recreate a full libtool script including additional 28832001f49Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 28932001f49Smrg# in macros and then make a single call at the end using the `libtool' 29032001f49Smrg# label. 29132001f49Smrg 29232001f49Smrg 29332001f49Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 29432001f49Smrg# ---------------------------------------- 29532001f49Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 29632001f49Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 29732001f49Smrg[m4_ifval([$1], 29832001f49Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 29932001f49Smrg [$1 30032001f49Smrg])])]) 30132001f49Smrg 30232001f49Smrg# Initialize. 30332001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 30432001f49Smrg 30532001f49Smrg 30632001f49Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 30732001f49Smrg# ------------------------------ 30832001f49Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 30932001f49Smrgm4_define([_LT_CONFIG_LIBTOOL], 31032001f49Smrg[m4_ifval([$1], 31132001f49Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 31232001f49Smrg [$1 31332001f49Smrg])])]) 31432001f49Smrg 31532001f49Smrg# Initialize. 31632001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 31732001f49Smrg 31832001f49Smrg 31932001f49Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 32032001f49Smrg# ----------------------------------------------------- 32132001f49Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 32232001f49Smrg[_LT_CONFIG_LIBTOOL([$1]) 32332001f49Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 32432001f49Smrg]) 32532001f49Smrg 32632001f49Smrg 32732001f49Smrg# _LT_FORMAT_COMMENT([COMMENT]) 32832001f49Smrg# ----------------------------- 32932001f49Smrg# Add leading comment marks to the start of each line, and a trailing 33032001f49Smrg# full-stop to the whole comment if one is not present already. 33132001f49Smrgm4_define([_LT_FORMAT_COMMENT], 33232001f49Smrg[m4_ifval([$1], [ 33332001f49Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 33432001f49Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 33532001f49Smrg)]) 33632001f49Smrg 33732001f49Smrg 33832001f49Smrg 33932001f49Smrg## ------------------------ ## 34032001f49Smrg## FIXME: Eliminate VARNAME ## 34132001f49Smrg## ------------------------ ## 34232001f49Smrg 34332001f49Smrg 34432001f49Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 34532001f49Smrg# ------------------------------------------------------------------- 34632001f49Smrg# CONFIGNAME is the name given to the value in the libtool script. 34732001f49Smrg# VARNAME is the (base) name used in the configure script. 34832001f49Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 34932001f49Smrg# VARNAME. Any other value will be used directly. 35032001f49Smrgm4_define([_LT_DECL], 35132001f49Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 35232001f49Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 35332001f49Smrg [m4_ifval([$1], [$1], [$2])]) 35432001f49Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 35532001f49Smrg m4_ifval([$4], 35632001f49Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 35732001f49Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 35832001f49Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 35932001f49Smrg]) 36032001f49Smrg 36132001f49Smrg 36232001f49Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 36332001f49Smrg# -------------------------------------------------------- 36432001f49Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 36532001f49Smrg 36632001f49Smrg 36732001f49Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 36832001f49Smrg# ------------------------------------------------ 36932001f49Smrgm4_define([lt_decl_tag_varnames], 37032001f49Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 37132001f49Smrg 37232001f49Smrg 37332001f49Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 37432001f49Smrg# --------------------------------------------------------- 37532001f49Smrgm4_define([_lt_decl_filter], 37632001f49Smrg[m4_case([$#], 37732001f49Smrg [0], [m4_fatal([$0: too few arguments: $#])], 37832001f49Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 37932001f49Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 38032001f49Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 38132001f49Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 38232001f49Smrg]) 38332001f49Smrg 38432001f49Smrg 38532001f49Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 38632001f49Smrg# -------------------------------------------------- 38732001f49Smrgm4_define([lt_decl_quote_varnames], 38832001f49Smrg[_lt_decl_filter([value], [1], $@)]) 38932001f49Smrg 39032001f49Smrg 39132001f49Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 39232001f49Smrg# --------------------------------------------------- 39332001f49Smrgm4_define([lt_decl_dquote_varnames], 39432001f49Smrg[_lt_decl_filter([value], [2], $@)]) 39532001f49Smrg 39632001f49Smrg 39732001f49Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 39832001f49Smrg# --------------------------------------------------- 39932001f49Smrgm4_define([lt_decl_varnames_tagged], 40032001f49Smrg[m4_assert([$# <= 2])dnl 40132001f49Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 40232001f49Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 40332001f49Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 40432001f49Smrgm4_define([_lt_decl_varnames_tagged], 40532001f49Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 40632001f49Smrg 40732001f49Smrg 40832001f49Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 40932001f49Smrg# ------------------------------------------------ 41032001f49Smrgm4_define([lt_decl_all_varnames], 41132001f49Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 41232001f49Smrg m4_if([$2], [], 41332001f49Smrg m4_quote(lt_decl_varnames), 41432001f49Smrg m4_quote(m4_shift($@))))[]dnl 41532001f49Smrg]) 41632001f49Smrgm4_define([_lt_decl_all_varnames], 41732001f49Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 41832001f49Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 41932001f49Smrg]) 42032001f49Smrg 42132001f49Smrg 42232001f49Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 42332001f49Smrg# ------------------------------------ 42432001f49Smrg# Quote a variable value, and forward it to `config.status' so that its 42532001f49Smrg# declaration there will have the same value as in `configure'. VARNAME 42632001f49Smrg# must have a single quote delimited value for this to work. 42732001f49Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 42832001f49Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 42932001f49Smrg 43032001f49Smrg 43132001f49Smrg# _LT_CONFIG_STATUS_DECLARATIONS 43232001f49Smrg# ------------------------------ 43332001f49Smrg# We delimit libtool config variables with single quotes, so when 43432001f49Smrg# we write them to config.status, we have to be sure to quote all 43532001f49Smrg# embedded single quotes properly. In configure, this macro expands 43632001f49Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 43732001f49Smrg# 43832001f49Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 43932001f49Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 44032001f49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 44132001f49Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 44232001f49Smrg 44332001f49Smrg 44432001f49Smrg# _LT_LIBTOOL_TAGS 44532001f49Smrg# ---------------- 44632001f49Smrg# Output comment and list of tags supported by the script 44732001f49Smrgm4_defun([_LT_LIBTOOL_TAGS], 44832001f49Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 44932001f49Smrgavailable_tags="_LT_TAGS"dnl 45032001f49Smrg]) 45132001f49Smrg 45232001f49Smrg 45332001f49Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 45432001f49Smrg# ----------------------------------- 45532001f49Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 45632001f49Smrg# expand to a commented shell variable setting: 45732001f49Smrg# 45832001f49Smrg# # Some comment about what VAR is for. 45932001f49Smrg# visible_name=$lt_internal_name 46032001f49Smrgm4_define([_LT_LIBTOOL_DECLARE], 46132001f49Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 46232001f49Smrg [description])))[]dnl 46332001f49Smrgm4_pushdef([_libtool_name], 46432001f49Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 46532001f49Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 46632001f49Smrg [0], [_libtool_name=[$]$1], 46732001f49Smrg [1], [_libtool_name=$lt_[]$1], 46832001f49Smrg [2], [_libtool_name=$lt_[]$1], 46932001f49Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 47032001f49Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 47132001f49Smrg]) 47232001f49Smrg 47332001f49Smrg 47432001f49Smrg# _LT_LIBTOOL_CONFIG_VARS 47532001f49Smrg# ----------------------- 47632001f49Smrg# Produce commented declarations of non-tagged libtool config variables 47732001f49Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 47832001f49Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 47932001f49Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 48032001f49Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 48132001f49Smrg[m4_foreach([_lt_var], 48232001f49Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 48332001f49Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 48432001f49Smrg 48532001f49Smrg 48632001f49Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 48732001f49Smrg# ------------------------- 48832001f49Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 48932001f49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 49032001f49Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 49132001f49Smrg 49232001f49Smrg 49332001f49Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 49432001f49Smrg# ------------------------------ 49532001f49Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 49632001f49Smrg 49732001f49Smrg 49832001f49Smrg# _LT_CONFIG_COMMANDS 49932001f49Smrg# ------------------- 50032001f49Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 50132001f49Smrg# variables for single and double quote escaping we saved from calls 50232001f49Smrg# to _LT_DECL, we can put quote escaped variables declarations 50332001f49Smrg# into `config.status', and then the shell code to quote escape them in 50432001f49Smrg# for loops in `config.status'. Finally, any additional code accumulated 50532001f49Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 50632001f49Smrgm4_defun([_LT_CONFIG_COMMANDS], 50732001f49Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 50832001f49Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 50932001f49Smrg dnl instead of duplicating it all over again into config.status, 51032001f49Smrg dnl then we will have config.status run $CONFIG_LT later, so it 51132001f49Smrg dnl needs to know what name is stored there: 51232001f49Smrg [AC_CONFIG_COMMANDS([libtool], 51332001f49Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 51432001f49Smrg dnl If the libtool generation code is destined for config.status, 51532001f49Smrg dnl expand the accumulated commands and init code now: 51632001f49Smrg [AC_CONFIG_COMMANDS([libtool], 51732001f49Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 51832001f49Smrg])#_LT_CONFIG_COMMANDS 51932001f49Smrg 52032001f49Smrg 52132001f49Smrg# Initialize. 52232001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 52332001f49Smrg[ 52432001f49Smrg 52532001f49Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 52632001f49Smrg# if CDPATH is set. 52732001f49Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 52832001f49Smrg 52932001f49Smrgsed_quote_subst='$sed_quote_subst' 53032001f49Smrgdouble_quote_subst='$double_quote_subst' 53132001f49Smrgdelay_variable_subst='$delay_variable_subst' 53232001f49Smrg_LT_CONFIG_STATUS_DECLARATIONS 53332001f49SmrgLTCC='$LTCC' 53432001f49SmrgLTCFLAGS='$LTCFLAGS' 53532001f49Smrgcompiler='$compiler_DEFAULT' 53632001f49Smrg 53732001f49Smrg# A function that is used when there is no print builtin or printf. 53832001f49Smrgfunc_fallback_echo () 53932001f49Smrg{ 54032001f49Smrg eval 'cat <<_LTECHO_EOF 54132001f49Smrg\$[]1 54232001f49Smrg_LTECHO_EOF' 54332001f49Smrg} 54432001f49Smrg 54532001f49Smrg# Quote evaled strings. 54632001f49Smrgfor var in lt_decl_all_varnames([[ \ 54732001f49Smrg]], lt_decl_quote_varnames); do 54832001f49Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 54932001f49Smrg *[[\\\\\\\`\\"\\\$]]*) 55032001f49Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 55132001f49Smrg ;; 55232001f49Smrg *) 55332001f49Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 55432001f49Smrg ;; 55532001f49Smrg esac 55632001f49Smrgdone 55732001f49Smrg 55832001f49Smrg# Double-quote double-evaled strings. 55932001f49Smrgfor var in lt_decl_all_varnames([[ \ 56032001f49Smrg]], lt_decl_dquote_varnames); do 56132001f49Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 56232001f49Smrg *[[\\\\\\\`\\"\\\$]]*) 56332001f49Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 56432001f49Smrg ;; 56532001f49Smrg *) 56632001f49Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 56732001f49Smrg ;; 56832001f49Smrg esac 56932001f49Smrgdone 57032001f49Smrg 57132001f49Smrg_LT_OUTPUT_LIBTOOL_INIT 57232001f49Smrg]) 57332001f49Smrg 57432001f49Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 57532001f49Smrg# ------------------------------------ 57632001f49Smrg# Generate a child script FILE with all initialization necessary to 57732001f49Smrg# reuse the environment learned by the parent script, and make the 57832001f49Smrg# file executable. If COMMENT is supplied, it is inserted after the 57932001f49Smrg# `#!' sequence but before initialization text begins. After this 58032001f49Smrg# macro, additional text can be appended to FILE to form the body of 58132001f49Smrg# the child script. The macro ends with non-zero status if the 58232001f49Smrg# file could not be fully written (such as if the disk is full). 58332001f49Smrgm4_ifdef([AS_INIT_GENERATED], 58432001f49Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 58532001f49Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 58632001f49Smrg[m4_require([AS_PREPARE])]dnl 58732001f49Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 58832001f49Smrg[lt_write_fail=0 58932001f49Smrgcat >$1 <<_ASEOF || lt_write_fail=1 59032001f49Smrg#! $SHELL 59132001f49Smrg# Generated by $as_me. 59232001f49Smrg$2 59332001f49SmrgSHELL=\${CONFIG_SHELL-$SHELL} 59432001f49Smrgexport SHELL 59532001f49Smrg_ASEOF 59632001f49Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 59732001f49SmrgAS_SHELL_SANITIZE 59832001f49Smrg_AS_PREPARE 59932001f49Smrgexec AS_MESSAGE_FD>&1 60032001f49Smrg_ASEOF 60132001f49Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 60232001f49Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 60332001f49Smrg 60432001f49Smrg# LT_OUTPUT 60532001f49Smrg# --------- 60632001f49Smrg# This macro allows early generation of the libtool script (before 60732001f49Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 60832001f49Smrg# tests. 60932001f49SmrgAC_DEFUN([LT_OUTPUT], 61032001f49Smrg[: ${CONFIG_LT=./config.lt} 61132001f49SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 61232001f49Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 61332001f49Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 61432001f49Smrg 61532001f49Smrgcat >>"$CONFIG_LT" <<\_LTEOF 61632001f49Smrglt_cl_silent=false 61732001f49Smrgexec AS_MESSAGE_LOG_FD>>config.log 61832001f49Smrg{ 61932001f49Smrg echo 62032001f49Smrg AS_BOX([Running $as_me.]) 62132001f49Smrg} >&AS_MESSAGE_LOG_FD 62232001f49Smrg 62332001f49Smrglt_cl_help="\ 62432001f49Smrg\`$as_me' creates a local libtool stub from the current configuration, 62532001f49Smrgfor use in further configure time tests before the real libtool is 62632001f49Smrggenerated. 62732001f49Smrg 62832001f49SmrgUsage: $[0] [[OPTIONS]] 62932001f49Smrg 63032001f49Smrg -h, --help print this help, then exit 63132001f49Smrg -V, --version print version number, then exit 63232001f49Smrg -q, --quiet do not print progress messages 63332001f49Smrg -d, --debug don't remove temporary files 63432001f49Smrg 63532001f49SmrgReport bugs to <bug-libtool@gnu.org>." 63632001f49Smrg 63732001f49Smrglt_cl_version="\ 63832001f49Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 63932001f49Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 64032001f49Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 64132001f49Smrg 64232001f49SmrgCopyright (C) 2011 Free Software Foundation, Inc. 64332001f49SmrgThis config.lt script is free software; the Free Software Foundation 64432001f49Smrggives unlimited permision to copy, distribute and modify it." 64532001f49Smrg 64632001f49Smrgwhile test $[#] != 0 64732001f49Smrgdo 64832001f49Smrg case $[1] in 64932001f49Smrg --version | --v* | -V ) 65032001f49Smrg echo "$lt_cl_version"; exit 0 ;; 65132001f49Smrg --help | --h* | -h ) 65232001f49Smrg echo "$lt_cl_help"; exit 0 ;; 65332001f49Smrg --debug | --d* | -d ) 65432001f49Smrg debug=: ;; 65532001f49Smrg --quiet | --q* | --silent | --s* | -q ) 65632001f49Smrg lt_cl_silent=: ;; 65732001f49Smrg 65832001f49Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 65932001f49SmrgTry \`$[0] --help' for more information.]) ;; 66032001f49Smrg 66132001f49Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 66232001f49SmrgTry \`$[0] --help' for more information.]) ;; 66332001f49Smrg esac 66432001f49Smrg shift 66532001f49Smrgdone 66632001f49Smrg 66732001f49Smrgif $lt_cl_silent; then 66832001f49Smrg exec AS_MESSAGE_FD>/dev/null 66932001f49Smrgfi 67032001f49Smrg_LTEOF 67132001f49Smrg 67232001f49Smrgcat >>"$CONFIG_LT" <<_LTEOF 67332001f49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 67432001f49Smrg_LTEOF 67532001f49Smrg 67632001f49Smrgcat >>"$CONFIG_LT" <<\_LTEOF 67732001f49SmrgAC_MSG_NOTICE([creating $ofile]) 67832001f49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 67932001f49SmrgAS_EXIT(0) 68032001f49Smrg_LTEOF 68132001f49Smrgchmod +x "$CONFIG_LT" 68232001f49Smrg 68332001f49Smrg# configure is writing to config.log, but config.lt does its own redirection, 68432001f49Smrg# appending to config.log, which fails on DOS, as config.log is still kept 68532001f49Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 68632001f49Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 68732001f49Smrglt_cl_success=: 68832001f49Smrgtest "$silent" = yes && 68932001f49Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 69032001f49Smrgexec AS_MESSAGE_LOG_FD>/dev/null 69132001f49Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 69232001f49Smrgexec AS_MESSAGE_LOG_FD>>config.log 69332001f49Smrg$lt_cl_success || AS_EXIT(1) 69432001f49Smrg])# LT_OUTPUT 69532001f49Smrg 69632001f49Smrg 69732001f49Smrg# _LT_CONFIG(TAG) 69832001f49Smrg# --------------- 69932001f49Smrg# If TAG is the built-in tag, create an initial libtool script with a 70032001f49Smrg# default configuration from the untagged config vars. Otherwise add code 70132001f49Smrg# to config.status for appending the configuration named by TAG from the 70232001f49Smrg# matching tagged config vars. 70332001f49Smrgm4_defun([_LT_CONFIG], 70432001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 70532001f49Smrg_LT_CONFIG_SAVE_COMMANDS([ 70632001f49Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 70732001f49Smrg m4_if(_LT_TAG, [C], [ 70832001f49Smrg # See if we are running on zsh, and set the options which allow our 70932001f49Smrg # commands through without removal of \ escapes. 71032001f49Smrg if test -n "${ZSH_VERSION+set}" ; then 71132001f49Smrg setopt NO_GLOB_SUBST 71232001f49Smrg fi 71332001f49Smrg 71432001f49Smrg cfgfile="${ofile}T" 71532001f49Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 71632001f49Smrg $RM "$cfgfile" 71732001f49Smrg 71832001f49Smrg cat <<_LT_EOF >> "$cfgfile" 71932001f49Smrg#! $SHELL 72032001f49Smrg 72132001f49Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 72232001f49Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 72332001f49Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 72432001f49Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 72532001f49Smrg# 72632001f49Smrg_LT_COPYING 72732001f49Smrg_LT_LIBTOOL_TAGS 72832001f49Smrg 72932001f49Smrg# ### BEGIN LIBTOOL CONFIG 73032001f49Smrg_LT_LIBTOOL_CONFIG_VARS 73132001f49Smrg_LT_LIBTOOL_TAG_VARS 73232001f49Smrg# ### END LIBTOOL CONFIG 73332001f49Smrg 73432001f49Smrg_LT_EOF 73532001f49Smrg 73632001f49Smrg case $host_os in 73732001f49Smrg aix3*) 73832001f49Smrg cat <<\_LT_EOF >> "$cfgfile" 73932001f49Smrg# AIX sometimes has problems with the GCC collect2 program. For some 74032001f49Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 74132001f49Smrg# vanish in a puff of smoke. 74232001f49Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 74332001f49Smrg COLLECT_NAMES= 74432001f49Smrg export COLLECT_NAMES 74532001f49Smrgfi 74632001f49Smrg_LT_EOF 74732001f49Smrg ;; 74832001f49Smrg esac 74932001f49Smrg 75032001f49Smrg _LT_PROG_LTMAIN 75132001f49Smrg 75232001f49Smrg # We use sed instead of cat because bash on DJGPP gets confused if 75332001f49Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 75432001f49Smrg # text mode, it properly converts lines to CR/LF. This bash problem 75532001f49Smrg # is reportedly fixed, but why not run on old versions too? 75632001f49Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 75732001f49Smrg || (rm -f "$cfgfile"; exit 1) 75832001f49Smrg 75932001f49Smrg _LT_PROG_REPLACE_SHELLFNS 76032001f49Smrg 76132001f49Smrg mv -f "$cfgfile" "$ofile" || 76232001f49Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 76332001f49Smrg chmod +x "$ofile" 76432001f49Smrg], 76532001f49Smrg[cat <<_LT_EOF >> "$ofile" 76632001f49Smrg 76732001f49Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 76832001f49Smrgdnl in a comment (ie after a #). 76932001f49Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 77032001f49Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 77132001f49Smrg# ### END LIBTOOL TAG CONFIG: $1 77232001f49Smrg_LT_EOF 77332001f49Smrg])dnl /m4_if 77432001f49Smrg], 77532001f49Smrg[m4_if([$1], [], [ 77632001f49Smrg PACKAGE='$PACKAGE' 77732001f49Smrg VERSION='$VERSION' 77832001f49Smrg TIMESTAMP='$TIMESTAMP' 77932001f49Smrg RM='$RM' 78032001f49Smrg ofile='$ofile'], []) 78132001f49Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 78232001f49Smrg])# _LT_CONFIG 78332001f49Smrg 78432001f49Smrg 78532001f49Smrg# LT_SUPPORTED_TAG(TAG) 78632001f49Smrg# --------------------- 78732001f49Smrg# Trace this macro to discover what tags are supported by the libtool 78832001f49Smrg# --tag option, using: 78932001f49Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 79032001f49SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 79132001f49Smrg 79232001f49Smrg 79332001f49Smrg# C support is built-in for now 79432001f49Smrgm4_define([_LT_LANG_C_enabled], []) 79532001f49Smrgm4_define([_LT_TAGS], []) 79632001f49Smrg 79732001f49Smrg 79832001f49Smrg# LT_LANG(LANG) 79932001f49Smrg# ------------- 80032001f49Smrg# Enable libtool support for the given language if not already enabled. 80132001f49SmrgAC_DEFUN([LT_LANG], 80232001f49Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 80332001f49Smrgm4_case([$1], 80432001f49Smrg [C], [_LT_LANG(C)], 80532001f49Smrg [C++], [_LT_LANG(CXX)], 80632001f49Smrg [Go], [_LT_LANG(GO)], 80732001f49Smrg [Java], [_LT_LANG(GCJ)], 80832001f49Smrg [Fortran 77], [_LT_LANG(F77)], 80932001f49Smrg [Fortran], [_LT_LANG(FC)], 81032001f49Smrg [Windows Resource], [_LT_LANG(RC)], 81132001f49Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 81232001f49Smrg [_LT_LANG($1)], 81332001f49Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 81432001f49Smrg])# LT_LANG 81532001f49Smrg 81632001f49Smrg 81732001f49Smrg# _LT_LANG(LANGNAME) 81832001f49Smrg# ------------------ 81932001f49Smrgm4_defun([_LT_LANG], 82032001f49Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 82132001f49Smrg [LT_SUPPORTED_TAG([$1])dnl 82232001f49Smrg m4_append([_LT_TAGS], [$1 ])dnl 82332001f49Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 82432001f49Smrg _LT_LANG_$1_CONFIG($1)])dnl 82532001f49Smrg])# _LT_LANG 82632001f49Smrg 82732001f49Smrg 82832001f49Smrgm4_ifndef([AC_PROG_GO], [ 82932001f49Smrg############################################################ 83032001f49Smrg# NOTE: This macro has been submitted for inclusion into # 83132001f49Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 83232001f49Smrg# a released version of Autoconf we should remove this # 83332001f49Smrg# macro and use it instead. # 83432001f49Smrg############################################################ 83532001f49Smrgm4_defun([AC_PROG_GO], 83632001f49Smrg[AC_LANG_PUSH(Go)dnl 83732001f49SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 83832001f49SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 83932001f49Smrg_AC_ARG_VAR_LDFLAGS()dnl 84032001f49SmrgAC_CHECK_TOOL(GOC, gccgo) 84132001f49Smrgif test -z "$GOC"; then 84232001f49Smrg if test -n "$ac_tool_prefix"; then 84332001f49Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 84432001f49Smrg fi 84532001f49Smrgfi 84632001f49Smrgif test -z "$GOC"; then 84732001f49Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 84832001f49Smrgfi 84932001f49Smrg])#m4_defun 85032001f49Smrg])#m4_ifndef 85132001f49Smrg 85232001f49Smrg 85332001f49Smrg# _LT_LANG_DEFAULT_CONFIG 85432001f49Smrg# ----------------------- 85532001f49Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 85632001f49Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 85732001f49Smrg [LT_LANG(CXX)], 85832001f49Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 85932001f49Smrg 86032001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 86132001f49Smrg [LT_LANG(F77)], 86232001f49Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 86332001f49Smrg 86432001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 86532001f49Smrg [LT_LANG(FC)], 86632001f49Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 86732001f49Smrg 86832001f49Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 86932001f49Smrgdnl pulling things in needlessly. 87032001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 87132001f49Smrg [LT_LANG(GCJ)], 87232001f49Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 87332001f49Smrg [LT_LANG(GCJ)], 87432001f49Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 87532001f49Smrg [LT_LANG(GCJ)], 87632001f49Smrg [m4_ifdef([AC_PROG_GCJ], 87732001f49Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 87832001f49Smrg m4_ifdef([A][M_PROG_GCJ], 87932001f49Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 88032001f49Smrg m4_ifdef([LT_PROG_GCJ], 88132001f49Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 88232001f49Smrg 88332001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 88432001f49Smrg [LT_LANG(GO)], 88532001f49Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 88632001f49Smrg 88732001f49SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 88832001f49Smrg [LT_LANG(RC)], 88932001f49Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 89032001f49Smrg])# _LT_LANG_DEFAULT_CONFIG 89132001f49Smrg 89232001f49Smrg# Obsolete macros: 89332001f49SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 89432001f49SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 89532001f49SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 89632001f49SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 89732001f49SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 89832001f49Smrgdnl aclocal-1.4 backwards compatibility: 89932001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 90032001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 90132001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 90232001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 90332001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 90432001f49Smrg 90532001f49Smrg 90632001f49Smrg# _LT_TAG_COMPILER 90732001f49Smrg# ---------------- 90832001f49Smrgm4_defun([_LT_TAG_COMPILER], 90932001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl 91032001f49Smrg 91132001f49Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 91232001f49Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 91332001f49Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 91432001f49Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 91532001f49Smrg 91632001f49Smrg# If no C compiler was specified, use CC. 91732001f49SmrgLTCC=${LTCC-"$CC"} 91832001f49Smrg 91932001f49Smrg# If no C compiler flags were specified, use CFLAGS. 92032001f49SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 92132001f49Smrg 92232001f49Smrg# Allow CC to be a program name with arguments. 92332001f49Smrgcompiler=$CC 92432001f49Smrg])# _LT_TAG_COMPILER 92532001f49Smrg 92632001f49Smrg 92732001f49Smrg# _LT_COMPILER_BOILERPLATE 92832001f49Smrg# ------------------------ 92932001f49Smrg# Check for compiler boilerplate output or warnings with 93032001f49Smrg# the simple compiler test code. 93132001f49Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 93232001f49Smrg[m4_require([_LT_DECL_SED])dnl 93332001f49Smrgac_outfile=conftest.$ac_objext 93432001f49Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 93532001f49Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 93632001f49Smrg_lt_compiler_boilerplate=`cat conftest.err` 93732001f49Smrg$RM conftest* 93832001f49Smrg])# _LT_COMPILER_BOILERPLATE 93932001f49Smrg 94032001f49Smrg 94132001f49Smrg# _LT_LINKER_BOILERPLATE 94232001f49Smrg# ---------------------- 94332001f49Smrg# Check for linker boilerplate output or warnings with 94432001f49Smrg# the simple link test code. 94532001f49Smrgm4_defun([_LT_LINKER_BOILERPLATE], 94632001f49Smrg[m4_require([_LT_DECL_SED])dnl 94732001f49Smrgac_outfile=conftest.$ac_objext 94832001f49Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 94932001f49Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 95032001f49Smrg_lt_linker_boilerplate=`cat conftest.err` 95132001f49Smrg$RM -r conftest* 95232001f49Smrg])# _LT_LINKER_BOILERPLATE 95332001f49Smrg 95432001f49Smrg# _LT_REQUIRED_DARWIN_CHECKS 95532001f49Smrg# ------------------------- 95632001f49Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 95732001f49Smrg case $host_os in 95832001f49Smrg rhapsody* | darwin*) 95932001f49Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 96032001f49Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 96132001f49Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 96232001f49Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 96332001f49Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 96432001f49Smrg _LT_DECL([], [DSYMUTIL], [1], 96532001f49Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 96632001f49Smrg _LT_DECL([], [NMEDIT], [1], 96732001f49Smrg [Tool to change global to local symbols on Mac OS X]) 96832001f49Smrg _LT_DECL([], [LIPO], [1], 96932001f49Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 97032001f49Smrg _LT_DECL([], [OTOOL], [1], 97132001f49Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 97232001f49Smrg _LT_DECL([], [OTOOL64], [1], 97332001f49Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 97432001f49Smrg 97532001f49Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 97632001f49Smrg [lt_cv_apple_cc_single_mod=no 97732001f49Smrg if test -z "${LT_MULTI_MODULE}"; then 97832001f49Smrg # By default we will add the -single_module flag. You can override 97932001f49Smrg # by either setting the environment variable LT_MULTI_MODULE 98032001f49Smrg # non-empty at configure time, or by adding -multi_module to the 98132001f49Smrg # link flags. 98232001f49Smrg rm -rf libconftest.dylib* 98332001f49Smrg echo "int foo(void){return 1;}" > conftest.c 98432001f49Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 98532001f49Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 98632001f49Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 98732001f49Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 98832001f49Smrg _lt_result=$? 98932001f49Smrg # If there is a non-empty error log, and "single_module" 99032001f49Smrg # appears in it, assume the flag caused a linker warning 99132001f49Smrg if test -s conftest.err && $GREP single_module conftest.err; then 99232001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 99332001f49Smrg # Otherwise, if the output was created with a 0 exit code from 99432001f49Smrg # the compiler, it worked. 99532001f49Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 99632001f49Smrg lt_cv_apple_cc_single_mod=yes 99732001f49Smrg else 99832001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 99932001f49Smrg fi 100032001f49Smrg rm -rf libconftest.dylib* 100132001f49Smrg rm -f conftest.* 100232001f49Smrg fi]) 100332001f49Smrg 100432001f49Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 100532001f49Smrg [lt_cv_ld_exported_symbols_list], 100632001f49Smrg [lt_cv_ld_exported_symbols_list=no 100732001f49Smrg save_LDFLAGS=$LDFLAGS 100832001f49Smrg echo "_main" > conftest.sym 100932001f49Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 101032001f49Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 101132001f49Smrg [lt_cv_ld_exported_symbols_list=yes], 101232001f49Smrg [lt_cv_ld_exported_symbols_list=no]) 101332001f49Smrg LDFLAGS="$save_LDFLAGS" 101432001f49Smrg ]) 101532001f49Smrg 101632001f49Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 101732001f49Smrg [lt_cv_ld_force_load=no 101832001f49Smrg cat > conftest.c << _LT_EOF 101932001f49Smrgint forced_loaded() { return 2;} 102032001f49Smrg_LT_EOF 102132001f49Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 102232001f49Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 102332001f49Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 102432001f49Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 102532001f49Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 102632001f49Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 102732001f49Smrg cat > conftest.c << _LT_EOF 102832001f49Smrgint main() { return 0;} 102932001f49Smrg_LT_EOF 103032001f49Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 103132001f49Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 103232001f49Smrg _lt_result=$? 103332001f49Smrg if test -s conftest.err && $GREP force_load conftest.err; then 103432001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 103532001f49Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 103632001f49Smrg lt_cv_ld_force_load=yes 103732001f49Smrg else 103832001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 103932001f49Smrg fi 104032001f49Smrg rm -f conftest.err libconftest.a conftest conftest.c 104132001f49Smrg rm -rf conftest.dSYM 104232001f49Smrg ]) 104332001f49Smrg case $host_os in 104432001f49Smrg rhapsody* | darwin1.[[012]]) 104532001f49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 104632001f49Smrg darwin1.*) 104732001f49Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 104832001f49Smrg darwin*) # darwin 5.x on 104932001f49Smrg # if running on 10.5 or later, the deployment target defaults 105032001f49Smrg # to the OS version, if on x86, and 10.4, the deployment 105132001f49Smrg # target defaults to 10.4. Don't you love it? 105232001f49Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 105332001f49Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 105432001f49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 105532001f49Smrg 10.[[012]]*) 105632001f49Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 105732001f49Smrg 10.*) 105832001f49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 105932001f49Smrg esac 106032001f49Smrg ;; 106132001f49Smrg esac 106232001f49Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 106332001f49Smrg _lt_dar_single_mod='$single_module' 106432001f49Smrg fi 106532001f49Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 106632001f49Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 106732001f49Smrg else 106832001f49Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 106932001f49Smrg fi 107032001f49Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 107132001f49Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 107232001f49Smrg else 107332001f49Smrg _lt_dsymutil= 107432001f49Smrg fi 107532001f49Smrg ;; 107632001f49Smrg esac 107732001f49Smrg]) 107832001f49Smrg 107932001f49Smrg 108032001f49Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 108132001f49Smrg# --------------------------------- 108232001f49Smrg# Checks for linker and compiler features on darwin 108332001f49Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 108432001f49Smrg[ 108532001f49Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 108632001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 108732001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 108832001f49Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 108932001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 109032001f49Smrg if test "$lt_cv_ld_force_load" = "yes"; then 109132001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 109232001f49Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 109332001f49Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 109432001f49Smrg else 109532001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 109632001f49Smrg fi 109732001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 109832001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 109932001f49Smrg case $cc_basename in 110032001f49Smrg ifort*) _lt_dar_can_shared=yes ;; 110132001f49Smrg *) _lt_dar_can_shared=$GCC ;; 110232001f49Smrg esac 110332001f49Smrg if test "$_lt_dar_can_shared" = "yes"; then 110432001f49Smrg output_verbose_link_cmd=func_echo_all 110532001f49Smrg _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}" 110632001f49Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 110732001f49Smrg _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}" 110832001f49Smrg _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}" 110932001f49Smrg m4_if([$1], [CXX], 111032001f49Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 111132001f49Smrg _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}" 111232001f49Smrg _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}" 111332001f49Smrg fi 111432001f49Smrg],[]) 111532001f49Smrg else 111632001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 111732001f49Smrg fi 111832001f49Smrg]) 111932001f49Smrg 112032001f49Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 112132001f49Smrg# ---------------------------------- 112232001f49Smrg# Links a minimal program and checks the executable 112332001f49Smrg# for the system default hardcoded library path. In most cases, 112432001f49Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 112532001f49Smrg# the location of the communication and MPI libs are included too. 112632001f49Smrg# If we don't find anything, use the default library path according 112732001f49Smrg# to the aix ld manual. 112832001f49Smrg# Store the results from the different compilers for each TAGNAME. 112932001f49Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 113032001f49Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 113132001f49Smrg[m4_require([_LT_DECL_SED])dnl 113232001f49Smrgif test "${lt_cv_aix_libpath+set}" = set; then 113332001f49Smrg aix_libpath=$lt_cv_aix_libpath 113432001f49Smrgelse 113532001f49Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 113632001f49Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 113732001f49Smrg lt_aix_libpath_sed='[ 113832001f49Smrg /Import File Strings/,/^$/ { 113932001f49Smrg /^0/ { 114032001f49Smrg s/^0 *\([^ ]*\) *$/\1/ 114132001f49Smrg p 114232001f49Smrg } 114332001f49Smrg }]' 114432001f49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 114532001f49Smrg # Check for a 64-bit object if we didn't find anything. 114632001f49Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 114732001f49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 114832001f49Smrg fi],[]) 114932001f49Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 115032001f49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 115132001f49Smrg fi 115232001f49Smrg ]) 115332001f49Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 115432001f49Smrgfi 115532001f49Smrg])# _LT_SYS_MODULE_PATH_AIX 115632001f49Smrg 115732001f49Smrg 115832001f49Smrg# _LT_SHELL_INIT(ARG) 115932001f49Smrg# ------------------- 116032001f49Smrgm4_define([_LT_SHELL_INIT], 116132001f49Smrg[m4_divert_text([M4SH-INIT], [$1 116232001f49Smrg])])# _LT_SHELL_INIT 116332001f49Smrg 116432001f49Smrg 116532001f49Smrg 116632001f49Smrg# _LT_PROG_ECHO_BACKSLASH 116732001f49Smrg# ----------------------- 116832001f49Smrg# Find how we can fake an echo command that does not interpret backslash. 116932001f49Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 117032001f49Smrg# of the generated configure script which will find a shell with a builtin 117132001f49Smrg# printf (which we can use as an echo command). 117232001f49Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 117332001f49Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 117432001f49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 117532001f49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 117632001f49Smrg 117732001f49SmrgAC_MSG_CHECKING([how to print strings]) 117832001f49Smrg# Test print first, because it will be a builtin if present. 117932001f49Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 118032001f49Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 118132001f49Smrg ECHO='print -r --' 118232001f49Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 118332001f49Smrg ECHO='printf %s\n' 118432001f49Smrgelse 118532001f49Smrg # Use this function as a fallback that always works. 118632001f49Smrg func_fallback_echo () 118732001f49Smrg { 118832001f49Smrg eval 'cat <<_LTECHO_EOF 118932001f49Smrg$[]1 119032001f49Smrg_LTECHO_EOF' 119132001f49Smrg } 119232001f49Smrg ECHO='func_fallback_echo' 119332001f49Smrgfi 119432001f49Smrg 119532001f49Smrg# func_echo_all arg... 119632001f49Smrg# Invoke $ECHO with all args, space-separated. 119732001f49Smrgfunc_echo_all () 119832001f49Smrg{ 119932001f49Smrg $ECHO "$*" 120032001f49Smrg} 120132001f49Smrg 120232001f49Smrgcase "$ECHO" in 120332001f49Smrg printf*) AC_MSG_RESULT([printf]) ;; 120432001f49Smrg print*) AC_MSG_RESULT([print -r]) ;; 120532001f49Smrg *) AC_MSG_RESULT([cat]) ;; 120632001f49Smrgesac 120732001f49Smrg 120832001f49Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 120932001f49Smrg[_AS_DETECT_SUGGESTED([ 121032001f49Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 121132001f49Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 121232001f49Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 121332001f49Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 121432001f49Smrg PATH=/empty FPATH=/empty; export PATH FPATH 121532001f49Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 121632001f49Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 121732001f49Smrg 121832001f49Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 121932001f49Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 122032001f49Smrg])# _LT_PROG_ECHO_BACKSLASH 122132001f49Smrg 122232001f49Smrg 122332001f49Smrg# _LT_WITH_SYSROOT 122432001f49Smrg# ---------------- 122532001f49SmrgAC_DEFUN([_LT_WITH_SYSROOT], 122632001f49Smrg[AC_MSG_CHECKING([for sysroot]) 122732001f49SmrgAC_ARG_WITH([sysroot], 122832001f49Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 122932001f49Smrg (or the compiler's sysroot if not specified).], 123032001f49Smrg[], [with_sysroot=no]) 123132001f49Smrg 123232001f49Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 123332001f49Smrgdnl in case the user passed a directory name. 123432001f49Smrglt_sysroot= 123532001f49Smrgcase ${with_sysroot} in #( 123632001f49Smrg yes) 123732001f49Smrg if test "$GCC" = yes; then 123832001f49Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 123932001f49Smrg fi 124032001f49Smrg ;; #( 124132001f49Smrg /*) 124232001f49Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 124332001f49Smrg ;; #( 124432001f49Smrg no|'') 124532001f49Smrg ;; #( 124632001f49Smrg *) 124732001f49Smrg AC_MSG_RESULT([${with_sysroot}]) 124832001f49Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 124932001f49Smrg ;; 125032001f49Smrgesac 125132001f49Smrg 125232001f49Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 125332001f49Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 125432001f49Smrg[dependent libraries, and in which our libraries should be installed.])]) 125532001f49Smrg 125632001f49Smrg# _LT_ENABLE_LOCK 125732001f49Smrg# --------------- 125832001f49Smrgm4_defun([_LT_ENABLE_LOCK], 125932001f49Smrg[AC_ARG_ENABLE([libtool-lock], 126032001f49Smrg [AS_HELP_STRING([--disable-libtool-lock], 126132001f49Smrg [avoid locking (might break parallel builds)])]) 126232001f49Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 126332001f49Smrg 126432001f49Smrg# Some flags need to be propagated to the compiler or linker for good 126532001f49Smrg# libtool support. 126632001f49Smrgcase $host in 126732001f49Smrgia64-*-hpux*) 126832001f49Smrg # Find out which ABI we are using. 126932001f49Smrg echo 'int i;' > conftest.$ac_ext 127032001f49Smrg if AC_TRY_EVAL(ac_compile); then 127132001f49Smrg case `/usr/bin/file conftest.$ac_objext` in 127232001f49Smrg *ELF-32*) 127332001f49Smrg HPUX_IA64_MODE="32" 127432001f49Smrg ;; 127532001f49Smrg *ELF-64*) 127632001f49Smrg HPUX_IA64_MODE="64" 127732001f49Smrg ;; 127832001f49Smrg esac 127932001f49Smrg fi 128032001f49Smrg rm -rf conftest* 128132001f49Smrg ;; 128232001f49Smrg*-*-irix6*) 128332001f49Smrg # Find out which ABI we are using. 128432001f49Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 128532001f49Smrg if AC_TRY_EVAL(ac_compile); then 128632001f49Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 128732001f49Smrg case `/usr/bin/file conftest.$ac_objext` in 128832001f49Smrg *32-bit*) 128932001f49Smrg LD="${LD-ld} -melf32bsmip" 129032001f49Smrg ;; 129132001f49Smrg *N32*) 129232001f49Smrg LD="${LD-ld} -melf32bmipn32" 129332001f49Smrg ;; 129432001f49Smrg *64-bit*) 129532001f49Smrg LD="${LD-ld} -melf64bmip" 129632001f49Smrg ;; 129732001f49Smrg esac 129832001f49Smrg else 129932001f49Smrg case `/usr/bin/file conftest.$ac_objext` in 130032001f49Smrg *32-bit*) 130132001f49Smrg LD="${LD-ld} -32" 130232001f49Smrg ;; 130332001f49Smrg *N32*) 130432001f49Smrg LD="${LD-ld} -n32" 130532001f49Smrg ;; 130632001f49Smrg *64-bit*) 130732001f49Smrg LD="${LD-ld} -64" 130832001f49Smrg ;; 130932001f49Smrg esac 131032001f49Smrg fi 131132001f49Smrg fi 131232001f49Smrg rm -rf conftest* 131332001f49Smrg ;; 131432001f49Smrg 131532001f49Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 131632001f49Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 131732001f49Smrg # Find out which ABI we are using. 131832001f49Smrg echo 'int i;' > conftest.$ac_ext 131932001f49Smrg if AC_TRY_EVAL(ac_compile); then 132032001f49Smrg case `/usr/bin/file conftest.o` in 132132001f49Smrg *32-bit*) 132232001f49Smrg case $host in 132332001f49Smrg x86_64-*kfreebsd*-gnu) 132432001f49Smrg LD="${LD-ld} -m elf_i386_fbsd" 132532001f49Smrg ;; 132632001f49Smrg x86_64-*linux*) 132732001f49Smrg case `/usr/bin/file conftest.o` in 132832001f49Smrg *x86-64*) 132932001f49Smrg LD="${LD-ld} -m elf32_x86_64" 133032001f49Smrg ;; 133132001f49Smrg *) 133232001f49Smrg LD="${LD-ld} -m elf_i386" 133332001f49Smrg ;; 133432001f49Smrg esac 133532001f49Smrg ;; 133632001f49Smrg powerpc64le-*) 133732001f49Smrg LD="${LD-ld} -m elf32lppclinux" 133832001f49Smrg ;; 133932001f49Smrg powerpc64-*) 134032001f49Smrg LD="${LD-ld} -m elf32ppclinux" 134132001f49Smrg ;; 134232001f49Smrg s390x-*linux*) 134332001f49Smrg LD="${LD-ld} -m elf_s390" 134432001f49Smrg ;; 134532001f49Smrg sparc64-*linux*) 134632001f49Smrg LD="${LD-ld} -m elf32_sparc" 134732001f49Smrg ;; 134832001f49Smrg esac 134932001f49Smrg ;; 135032001f49Smrg *64-bit*) 135132001f49Smrg case $host in 135232001f49Smrg x86_64-*kfreebsd*-gnu) 135332001f49Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 135432001f49Smrg ;; 135532001f49Smrg x86_64-*linux*) 135632001f49Smrg LD="${LD-ld} -m elf_x86_64" 135732001f49Smrg ;; 135832001f49Smrg powerpcle-*) 135932001f49Smrg LD="${LD-ld} -m elf64lppc" 136032001f49Smrg ;; 136132001f49Smrg powerpc-*) 136232001f49Smrg LD="${LD-ld} -m elf64ppc" 136332001f49Smrg ;; 136432001f49Smrg s390*-*linux*|s390*-*tpf*) 136532001f49Smrg LD="${LD-ld} -m elf64_s390" 136632001f49Smrg ;; 136732001f49Smrg sparc*-*linux*) 136832001f49Smrg LD="${LD-ld} -m elf64_sparc" 136932001f49Smrg ;; 137032001f49Smrg esac 137132001f49Smrg ;; 137232001f49Smrg esac 137332001f49Smrg fi 137432001f49Smrg rm -rf conftest* 137532001f49Smrg ;; 137632001f49Smrg 137732001f49Smrg*-*-sco3.2v5*) 137832001f49Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 137932001f49Smrg SAVE_CFLAGS="$CFLAGS" 138032001f49Smrg CFLAGS="$CFLAGS -belf" 138132001f49Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 138232001f49Smrg [AC_LANG_PUSH(C) 138332001f49Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 138432001f49Smrg AC_LANG_POP]) 138532001f49Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 138632001f49Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138732001f49Smrg CFLAGS="$SAVE_CFLAGS" 138832001f49Smrg fi 138932001f49Smrg ;; 139032001f49Smrg*-*solaris*) 139132001f49Smrg # Find out which ABI we are using. 139232001f49Smrg echo 'int i;' > conftest.$ac_ext 139332001f49Smrg if AC_TRY_EVAL(ac_compile); then 139432001f49Smrg case `/usr/bin/file conftest.o` in 139532001f49Smrg *64-bit*) 139632001f49Smrg case $lt_cv_prog_gnu_ld in 139732001f49Smrg yes*) 139832001f49Smrg case $host in 139932001f49Smrg i?86-*-solaris*) 140032001f49Smrg LD="${LD-ld} -m elf_x86_64" 140132001f49Smrg ;; 140232001f49Smrg sparc*-*-solaris*) 140332001f49Smrg LD="${LD-ld} -m elf64_sparc" 140432001f49Smrg ;; 140532001f49Smrg esac 140632001f49Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 140732001f49Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 140832001f49Smrg LD="${LD-ld}_sol2" 140932001f49Smrg fi 141032001f49Smrg ;; 141132001f49Smrg *) 141232001f49Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 141332001f49Smrg LD="${LD-ld} -64" 141432001f49Smrg fi 141532001f49Smrg ;; 141632001f49Smrg esac 141732001f49Smrg ;; 141832001f49Smrg esac 141932001f49Smrg fi 142032001f49Smrg rm -rf conftest* 142132001f49Smrg ;; 142232001f49Smrgesac 142332001f49Smrg 142432001f49Smrgneed_locks="$enable_libtool_lock" 142532001f49Smrg])# _LT_ENABLE_LOCK 142632001f49Smrg 142732001f49Smrg 142832001f49Smrg# _LT_PROG_AR 142932001f49Smrg# ----------- 143032001f49Smrgm4_defun([_LT_PROG_AR], 143132001f49Smrg[AC_CHECK_TOOLS(AR, [ar], false) 143232001f49Smrg: ${AR=ar} 143332001f49Smrg: ${AR_FLAGS=cru} 143432001f49Smrg_LT_DECL([], [AR], [1], [The archiver]) 143532001f49Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 143632001f49Smrg 143732001f49SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 143832001f49Smrg [lt_cv_ar_at_file=no 143932001f49Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 144032001f49Smrg [echo conftest.$ac_objext > conftest.lst 144132001f49Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 144232001f49Smrg AC_TRY_EVAL([lt_ar_try]) 144332001f49Smrg if test "$ac_status" -eq 0; then 144432001f49Smrg # Ensure the archiver fails upon bogus file names. 144532001f49Smrg rm -f conftest.$ac_objext libconftest.a 144632001f49Smrg AC_TRY_EVAL([lt_ar_try]) 144732001f49Smrg if test "$ac_status" -ne 0; then 144832001f49Smrg lt_cv_ar_at_file=@ 144932001f49Smrg fi 145032001f49Smrg fi 145132001f49Smrg rm -f conftest.* libconftest.a 145232001f49Smrg ]) 145332001f49Smrg ]) 145432001f49Smrg 145532001f49Smrgif test "x$lt_cv_ar_at_file" = xno; then 145632001f49Smrg archiver_list_spec= 145732001f49Smrgelse 145832001f49Smrg archiver_list_spec=$lt_cv_ar_at_file 145932001f49Smrgfi 146032001f49Smrg_LT_DECL([], [archiver_list_spec], [1], 146132001f49Smrg [How to feed a file listing to the archiver]) 146232001f49Smrg])# _LT_PROG_AR 146332001f49Smrg 146432001f49Smrg 146532001f49Smrg# _LT_CMD_OLD_ARCHIVE 146632001f49Smrg# ------------------- 146732001f49Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 146832001f49Smrg[_LT_PROG_AR 146932001f49Smrg 147032001f49SmrgAC_CHECK_TOOL(STRIP, strip, :) 147132001f49Smrgtest -z "$STRIP" && STRIP=: 147232001f49Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 147332001f49Smrg 147432001f49SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 147532001f49Smrgtest -z "$RANLIB" && RANLIB=: 147632001f49Smrg_LT_DECL([], [RANLIB], [1], 147732001f49Smrg [Commands used to install an old-style archive]) 147832001f49Smrg 147932001f49Smrg# Determine commands to create old-style static archives. 148032001f49Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 148132001f49Smrgold_postinstall_cmds='chmod 644 $oldlib' 148232001f49Smrgold_postuninstall_cmds= 148332001f49Smrg 148432001f49Smrgif test -n "$RANLIB"; then 148532001f49Smrg case $host_os in 148632001f49Smrg openbsd*) 148732001f49Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 148832001f49Smrg ;; 148932001f49Smrg *) 149032001f49Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 149132001f49Smrg ;; 149232001f49Smrg esac 149332001f49Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 149432001f49Smrgfi 149532001f49Smrg 149632001f49Smrgcase $host_os in 149732001f49Smrg darwin*) 149832001f49Smrg lock_old_archive_extraction=yes ;; 149932001f49Smrg *) 150032001f49Smrg lock_old_archive_extraction=no ;; 150132001f49Smrgesac 150232001f49Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 150332001f49Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 150432001f49Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 150532001f49Smrg [Commands used to build an old-style archive]) 150632001f49Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 150732001f49Smrg [Whether to use a lock for old archive extraction]) 150832001f49Smrg])# _LT_CMD_OLD_ARCHIVE 150932001f49Smrg 151032001f49Smrg 151132001f49Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 151232001f49Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 151332001f49Smrg# ---------------------------------------------------------------- 151432001f49Smrg# Check whether the given compiler option works 151532001f49SmrgAC_DEFUN([_LT_COMPILER_OPTION], 151632001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 151732001f49Smrgm4_require([_LT_DECL_SED])dnl 151832001f49SmrgAC_CACHE_CHECK([$1], [$2], 151932001f49Smrg [$2=no 152032001f49Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 152132001f49Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152232001f49Smrg lt_compiler_flag="$3" 152332001f49Smrg # Insert the option either (1) after the last *FLAGS variable, or 152432001f49Smrg # (2) before a word containing "conftest.", or (3) at the end. 152532001f49Smrg # Note that $ac_compile itself does not contain backslashes and begins 152632001f49Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 152732001f49Smrg # The option is referenced via a variable to avoid confusing sed. 152832001f49Smrg lt_compile=`echo "$ac_compile" | $SED \ 152932001f49Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153032001f49Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153132001f49Smrg -e 's:$: $lt_compiler_flag:'` 153232001f49Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 153332001f49Smrg (eval "$lt_compile" 2>conftest.err) 153432001f49Smrg ac_status=$? 153532001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 153632001f49Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 153732001f49Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 153832001f49Smrg # The compiler can only warn and ignore the option if not recognized 153932001f49Smrg # So say no if there are warnings other than the usual output. 154032001f49Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154132001f49Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 154232001f49Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 154332001f49Smrg $2=yes 154432001f49Smrg fi 154532001f49Smrg fi 154632001f49Smrg $RM conftest* 154732001f49Smrg]) 154832001f49Smrg 154932001f49Smrgif test x"[$]$2" = xyes; then 155032001f49Smrg m4_if([$5], , :, [$5]) 155132001f49Smrgelse 155232001f49Smrg m4_if([$6], , :, [$6]) 155332001f49Smrgfi 155432001f49Smrg])# _LT_COMPILER_OPTION 155532001f49Smrg 155632001f49Smrg# Old name: 155732001f49SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 155832001f49Smrgdnl aclocal-1.4 backwards compatibility: 155932001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156032001f49Smrg 156132001f49Smrg 156232001f49Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 156332001f49Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 156432001f49Smrg# ---------------------------------------------------- 156532001f49Smrg# Check whether the given linker option works 156632001f49SmrgAC_DEFUN([_LT_LINKER_OPTION], 156732001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 156832001f49Smrgm4_require([_LT_DECL_SED])dnl 156932001f49SmrgAC_CACHE_CHECK([$1], [$2], 157032001f49Smrg [$2=no 157132001f49Smrg save_LDFLAGS="$LDFLAGS" 157232001f49Smrg LDFLAGS="$LDFLAGS $3" 157332001f49Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 157432001f49Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 157532001f49Smrg # The linker can only warn and ignore the option if not recognized 157632001f49Smrg # So say no if there are warnings 157732001f49Smrg if test -s conftest.err; then 157832001f49Smrg # Append any errors to the config.log. 157932001f49Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 158032001f49Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158132001f49Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 158232001f49Smrg if diff conftest.exp conftest.er2 >/dev/null; then 158332001f49Smrg $2=yes 158432001f49Smrg fi 158532001f49Smrg else 158632001f49Smrg $2=yes 158732001f49Smrg fi 158832001f49Smrg fi 158932001f49Smrg $RM -r conftest* 159032001f49Smrg LDFLAGS="$save_LDFLAGS" 159132001f49Smrg]) 159232001f49Smrg 159332001f49Smrgif test x"[$]$2" = xyes; then 159432001f49Smrg m4_if([$4], , :, [$4]) 159532001f49Smrgelse 159632001f49Smrg m4_if([$5], , :, [$5]) 159732001f49Smrgfi 159832001f49Smrg])# _LT_LINKER_OPTION 159932001f49Smrg 160032001f49Smrg# Old name: 160132001f49SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 160232001f49Smrgdnl aclocal-1.4 backwards compatibility: 160332001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 160432001f49Smrg 160532001f49Smrg 160632001f49Smrg# LT_CMD_MAX_LEN 160732001f49Smrg#--------------- 160832001f49SmrgAC_DEFUN([LT_CMD_MAX_LEN], 160932001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161032001f49Smrg# find the maximum length of command line arguments 161132001f49SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 161232001f49SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 161332001f49Smrg i=0 161432001f49Smrg teststring="ABCD" 161532001f49Smrg 161632001f49Smrg case $build_os in 161732001f49Smrg msdosdjgpp*) 161832001f49Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 161932001f49Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162032001f49Smrg # during glob expansion). Even if it were fixed, the result of this 162132001f49Smrg # check would be larger than it should be. 162232001f49Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 162332001f49Smrg ;; 162432001f49Smrg 162532001f49Smrg gnu*) 162632001f49Smrg # Under GNU Hurd, this test is not required because there is 162732001f49Smrg # no limit to the length of command line arguments. 162832001f49Smrg # Libtool will interpret -1 as no limit whatsoever 162932001f49Smrg lt_cv_sys_max_cmd_len=-1; 163032001f49Smrg ;; 163132001f49Smrg 163232001f49Smrg cygwin* | mingw* | cegcc*) 163332001f49Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 163432001f49Smrg # about 5 minutes as the teststring grows exponentially. 163532001f49Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 163632001f49Smrg # you end up with a "frozen" computer, even though with patience 163732001f49Smrg # the test eventually succeeds (with a max line length of 256k). 163832001f49Smrg # Instead, let's just punt: use the minimum linelength reported by 163932001f49Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 164032001f49Smrg lt_cv_sys_max_cmd_len=8192; 164132001f49Smrg ;; 164232001f49Smrg 164332001f49Smrg mint*) 164432001f49Smrg # On MiNT this can take a long time and run out of memory. 164532001f49Smrg lt_cv_sys_max_cmd_len=8192; 164632001f49Smrg ;; 164732001f49Smrg 164832001f49Smrg amigaos*) 164932001f49Smrg # On AmigaOS with pdksh, this test takes hours, literally. 165032001f49Smrg # So we just punt and use a minimum line length of 8192. 165132001f49Smrg lt_cv_sys_max_cmd_len=8192; 165232001f49Smrg ;; 165332001f49Smrg 165432001f49Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 165532001f49Smrg # This has been around since 386BSD, at least. Likely further. 165632001f49Smrg if test -x /sbin/sysctl; then 165732001f49Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 165832001f49Smrg elif test -x /usr/sbin/sysctl; then 165932001f49Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 166032001f49Smrg else 166132001f49Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 166232001f49Smrg fi 166332001f49Smrg # And add a safety zone 166432001f49Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 166532001f49Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 166632001f49Smrg ;; 166732001f49Smrg 166832001f49Smrg interix*) 166932001f49Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167032001f49Smrg lt_cv_sys_max_cmd_len=196608 167132001f49Smrg ;; 167232001f49Smrg 167332001f49Smrg os2*) 167432001f49Smrg # The test takes a long time on OS/2. 167532001f49Smrg lt_cv_sys_max_cmd_len=8192 167632001f49Smrg ;; 167732001f49Smrg 167832001f49Smrg osf*) 167932001f49Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168032001f49Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168132001f49Smrg # nice to cause kernel panics so lets avoid the loop below. 168232001f49Smrg # First set a reasonable default. 168332001f49Smrg lt_cv_sys_max_cmd_len=16384 168432001f49Smrg # 168532001f49Smrg if test -x /sbin/sysconfig; then 168632001f49Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 168732001f49Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 168832001f49Smrg esac 168932001f49Smrg fi 169032001f49Smrg ;; 169132001f49Smrg sco3.2v5*) 169232001f49Smrg lt_cv_sys_max_cmd_len=102400 169332001f49Smrg ;; 169432001f49Smrg sysv5* | sco5v6* | sysv4.2uw2*) 169532001f49Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 169632001f49Smrg if test -n "$kargmax"; then 169732001f49Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 169832001f49Smrg else 169932001f49Smrg lt_cv_sys_max_cmd_len=32768 170032001f49Smrg fi 170132001f49Smrg ;; 170232001f49Smrg *) 170332001f49Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 170432001f49Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 170532001f49Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 170632001f49Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 170732001f49Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 170832001f49Smrg else 170932001f49Smrg # Make teststring a little bigger before we do anything with it. 171032001f49Smrg # a 1K string should be a reasonable start. 171132001f49Smrg for i in 1 2 3 4 5 6 7 8 ; do 171232001f49Smrg teststring=$teststring$teststring 171332001f49Smrg done 171432001f49Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 171532001f49Smrg # If test is not a shell built-in, we'll probably end up computing a 171632001f49Smrg # maximum length that is only half of the actual maximum length, but 171732001f49Smrg # we can't tell. 171832001f49Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 171932001f49Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 172032001f49Smrg test $i != 17 # 1/2 MB should be enough 172132001f49Smrg do 172232001f49Smrg i=`expr $i + 1` 172332001f49Smrg teststring=$teststring$teststring 172432001f49Smrg done 172532001f49Smrg # Only check the string length outside the loop. 172632001f49Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 172732001f49Smrg teststring= 172832001f49Smrg # Add a significant safety factor because C++ compilers can tack on 172932001f49Smrg # massive amounts of additional arguments before passing them to the 173032001f49Smrg # linker. It appears as though 1/2 is a usable value. 173132001f49Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 173232001f49Smrg fi 173332001f49Smrg ;; 173432001f49Smrg esac 173532001f49Smrg]) 173632001f49Smrgif test -n $lt_cv_sys_max_cmd_len ; then 173732001f49Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 173832001f49Smrgelse 173932001f49Smrg AC_MSG_RESULT(none) 174032001f49Smrgfi 174132001f49Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 174232001f49Smrg_LT_DECL([], [max_cmd_len], [0], 174332001f49Smrg [What is the maximum length of a command?]) 174432001f49Smrg])# LT_CMD_MAX_LEN 174532001f49Smrg 174632001f49Smrg# Old name: 174732001f49SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 174832001f49Smrgdnl aclocal-1.4 backwards compatibility: 174932001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175032001f49Smrg 175132001f49Smrg 175232001f49Smrg# _LT_HEADER_DLFCN 175332001f49Smrg# ---------------- 175432001f49Smrgm4_defun([_LT_HEADER_DLFCN], 175532001f49Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 175632001f49Smrg])# _LT_HEADER_DLFCN 175732001f49Smrg 175832001f49Smrg 175932001f49Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 176032001f49Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 176132001f49Smrg# ---------------------------------------------------------------- 176232001f49Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 176332001f49Smrg[m4_require([_LT_HEADER_DLFCN])dnl 176432001f49Smrgif test "$cross_compiling" = yes; then : 176532001f49Smrg [$4] 176632001f49Smrgelse 176732001f49Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 176832001f49Smrg lt_status=$lt_dlunknown 176932001f49Smrg cat > conftest.$ac_ext <<_LT_EOF 177032001f49Smrg[#line $LINENO "configure" 177132001f49Smrg#include "confdefs.h" 177232001f49Smrg 177332001f49Smrg#if HAVE_DLFCN_H 177432001f49Smrg#include <dlfcn.h> 177532001f49Smrg#endif 177632001f49Smrg 177732001f49Smrg#include <stdio.h> 177832001f49Smrg 177932001f49Smrg#ifdef RTLD_GLOBAL 178032001f49Smrg# define LT_DLGLOBAL RTLD_GLOBAL 178132001f49Smrg#else 178232001f49Smrg# ifdef DL_GLOBAL 178332001f49Smrg# define LT_DLGLOBAL DL_GLOBAL 178432001f49Smrg# else 178532001f49Smrg# define LT_DLGLOBAL 0 178632001f49Smrg# endif 178732001f49Smrg#endif 178832001f49Smrg 178932001f49Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179032001f49Smrg find out it does not work in some platform. */ 179132001f49Smrg#ifndef LT_DLLAZY_OR_NOW 179232001f49Smrg# ifdef RTLD_LAZY 179332001f49Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 179432001f49Smrg# else 179532001f49Smrg# ifdef DL_LAZY 179632001f49Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 179732001f49Smrg# else 179832001f49Smrg# ifdef RTLD_NOW 179932001f49Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180032001f49Smrg# else 180132001f49Smrg# ifdef DL_NOW 180232001f49Smrg# define LT_DLLAZY_OR_NOW DL_NOW 180332001f49Smrg# else 180432001f49Smrg# define LT_DLLAZY_OR_NOW 0 180532001f49Smrg# endif 180632001f49Smrg# endif 180732001f49Smrg# endif 180832001f49Smrg# endif 180932001f49Smrg#endif 181032001f49Smrg 181132001f49Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 181232001f49Smrg correspondingly for the symbols needed. */ 181332001f49Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 181432001f49Smrgint fnord () __attribute__((visibility("default"))); 181532001f49Smrg#endif 181632001f49Smrg 181732001f49Smrgint fnord () { return 42; } 181832001f49Smrgint main () 181932001f49Smrg{ 182032001f49Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182132001f49Smrg int status = $lt_dlunknown; 182232001f49Smrg 182332001f49Smrg if (self) 182432001f49Smrg { 182532001f49Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 182632001f49Smrg else 182732001f49Smrg { 182832001f49Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 182932001f49Smrg else puts (dlerror ()); 183032001f49Smrg } 183132001f49Smrg /* dlclose (self); */ 183232001f49Smrg } 183332001f49Smrg else 183432001f49Smrg puts (dlerror ()); 183532001f49Smrg 183632001f49Smrg return status; 183732001f49Smrg}] 183832001f49Smrg_LT_EOF 183932001f49Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184032001f49Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184132001f49Smrg lt_status=$? 184232001f49Smrg case x$lt_status in 184332001f49Smrg x$lt_dlno_uscore) $1 ;; 184432001f49Smrg x$lt_dlneed_uscore) $2 ;; 184532001f49Smrg x$lt_dlunknown|x*) $3 ;; 184632001f49Smrg esac 184732001f49Smrg else : 184832001f49Smrg # compilation failed 184932001f49Smrg $3 185032001f49Smrg fi 185132001f49Smrgfi 185232001f49Smrgrm -fr conftest* 185332001f49Smrg])# _LT_TRY_DLOPEN_SELF 185432001f49Smrg 185532001f49Smrg 185632001f49Smrg# LT_SYS_DLOPEN_SELF 185732001f49Smrg# ------------------ 185832001f49SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 185932001f49Smrg[m4_require([_LT_HEADER_DLFCN])dnl 186032001f49Smrgif test "x$enable_dlopen" != xyes; then 186132001f49Smrg enable_dlopen=unknown 186232001f49Smrg enable_dlopen_self=unknown 186332001f49Smrg enable_dlopen_self_static=unknown 186432001f49Smrgelse 186532001f49Smrg lt_cv_dlopen=no 186632001f49Smrg lt_cv_dlopen_libs= 186732001f49Smrg 186832001f49Smrg case $host_os in 186932001f49Smrg beos*) 187032001f49Smrg lt_cv_dlopen="load_add_on" 187132001f49Smrg lt_cv_dlopen_libs= 187232001f49Smrg lt_cv_dlopen_self=yes 187332001f49Smrg ;; 187432001f49Smrg 187532001f49Smrg mingw* | pw32* | cegcc*) 187632001f49Smrg lt_cv_dlopen="LoadLibrary" 187732001f49Smrg lt_cv_dlopen_libs= 187832001f49Smrg ;; 187932001f49Smrg 188032001f49Smrg cygwin*) 188132001f49Smrg lt_cv_dlopen="dlopen" 188232001f49Smrg lt_cv_dlopen_libs= 188332001f49Smrg ;; 188432001f49Smrg 188532001f49Smrg darwin*) 188632001f49Smrg # if libdl is installed we need to link against it 188732001f49Smrg AC_CHECK_LIB([dl], [dlopen], 188832001f49Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188932001f49Smrg lt_cv_dlopen="dyld" 189032001f49Smrg lt_cv_dlopen_libs= 189132001f49Smrg lt_cv_dlopen_self=yes 189232001f49Smrg ]) 189332001f49Smrg ;; 189432001f49Smrg 189532001f49Smrg *) 189632001f49Smrg AC_CHECK_FUNC([shl_load], 189732001f49Smrg [lt_cv_dlopen="shl_load"], 189832001f49Smrg [AC_CHECK_LIB([dld], [shl_load], 189932001f49Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190032001f49Smrg [AC_CHECK_FUNC([dlopen], 190132001f49Smrg [lt_cv_dlopen="dlopen"], 190232001f49Smrg [AC_CHECK_LIB([dl], [dlopen], 190332001f49Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 190432001f49Smrg [AC_CHECK_LIB([svld], [dlopen], 190532001f49Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 190632001f49Smrg [AC_CHECK_LIB([dld], [dld_link], 190732001f49Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 190832001f49Smrg ]) 190932001f49Smrg ]) 191032001f49Smrg ]) 191132001f49Smrg ]) 191232001f49Smrg ]) 191332001f49Smrg ;; 191432001f49Smrg esac 191532001f49Smrg 191632001f49Smrg if test "x$lt_cv_dlopen" != xno; then 191732001f49Smrg enable_dlopen=yes 191832001f49Smrg else 191932001f49Smrg enable_dlopen=no 192032001f49Smrg fi 192132001f49Smrg 192232001f49Smrg case $lt_cv_dlopen in 192332001f49Smrg dlopen) 192432001f49Smrg save_CPPFLAGS="$CPPFLAGS" 192532001f49Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 192632001f49Smrg 192732001f49Smrg save_LDFLAGS="$LDFLAGS" 192832001f49Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 192932001f49Smrg 193032001f49Smrg save_LIBS="$LIBS" 193132001f49Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 193232001f49Smrg 193332001f49Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 193432001f49Smrg lt_cv_dlopen_self, [dnl 193532001f49Smrg _LT_TRY_DLOPEN_SELF( 193632001f49Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 193732001f49Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 193832001f49Smrg ]) 193932001f49Smrg 194032001f49Smrg if test "x$lt_cv_dlopen_self" = xyes; then 194132001f49Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 194232001f49Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 194332001f49Smrg lt_cv_dlopen_self_static, [dnl 194432001f49Smrg _LT_TRY_DLOPEN_SELF( 194532001f49Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 194632001f49Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 194732001f49Smrg ]) 194832001f49Smrg fi 194932001f49Smrg 195032001f49Smrg CPPFLAGS="$save_CPPFLAGS" 195132001f49Smrg LDFLAGS="$save_LDFLAGS" 195232001f49Smrg LIBS="$save_LIBS" 195332001f49Smrg ;; 195432001f49Smrg esac 195532001f49Smrg 195632001f49Smrg case $lt_cv_dlopen_self in 195732001f49Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 195832001f49Smrg *) enable_dlopen_self=unknown ;; 195932001f49Smrg esac 196032001f49Smrg 196132001f49Smrg case $lt_cv_dlopen_self_static in 196232001f49Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 196332001f49Smrg *) enable_dlopen_self_static=unknown ;; 196432001f49Smrg esac 196532001f49Smrgfi 196632001f49Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 196732001f49Smrg [Whether dlopen is supported]) 196832001f49Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 196932001f49Smrg [Whether dlopen of programs is supported]) 197032001f49Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 197132001f49Smrg [Whether dlopen of statically linked programs is supported]) 197232001f49Smrg])# LT_SYS_DLOPEN_SELF 197332001f49Smrg 197432001f49Smrg# Old name: 197532001f49SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 197632001f49Smrgdnl aclocal-1.4 backwards compatibility: 197732001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 197832001f49Smrg 197932001f49Smrg 198032001f49Smrg# _LT_COMPILER_C_O([TAGNAME]) 198132001f49Smrg# --------------------------- 198232001f49Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 198332001f49Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 198432001f49Smrgm4_defun([_LT_COMPILER_C_O], 198532001f49Smrg[m4_require([_LT_DECL_SED])dnl 198632001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 198732001f49Smrgm4_require([_LT_TAG_COMPILER])dnl 198832001f49SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 198932001f49Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 199032001f49Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 199132001f49Smrg $RM -r conftest 2>/dev/null 199232001f49Smrg mkdir conftest 199332001f49Smrg cd conftest 199432001f49Smrg mkdir out 199532001f49Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 199632001f49Smrg 199732001f49Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 199832001f49Smrg # Insert the option either (1) after the last *FLAGS variable, or 199932001f49Smrg # (2) before a word containing "conftest.", or (3) at the end. 200032001f49Smrg # Note that $ac_compile itself does not contain backslashes and begins 200132001f49Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 200232001f49Smrg lt_compile=`echo "$ac_compile" | $SED \ 200332001f49Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 200432001f49Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 200532001f49Smrg -e 's:$: $lt_compiler_flag:'` 200632001f49Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 200732001f49Smrg (eval "$lt_compile" 2>out/conftest.err) 200832001f49Smrg ac_status=$? 200932001f49Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 201032001f49Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201132001f49Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 201232001f49Smrg then 201332001f49Smrg # The compiler can only warn and ignore the option if not recognized 201432001f49Smrg # So say no if there are warnings 201532001f49Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 201632001f49Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 201732001f49Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 201832001f49Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 201932001f49Smrg fi 202032001f49Smrg fi 202132001f49Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 202232001f49Smrg $RM conftest* 202332001f49Smrg # SGI C++ compiler will create directory out/ii_files/ for 202432001f49Smrg # template instantiation 202532001f49Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 202632001f49Smrg $RM out/* && rmdir out 202732001f49Smrg cd .. 202832001f49Smrg $RM -r conftest 202932001f49Smrg $RM conftest* 203032001f49Smrg]) 203132001f49Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 203232001f49Smrg [Does compiler simultaneously support -c and -o options?]) 203332001f49Smrg])# _LT_COMPILER_C_O 203432001f49Smrg 203532001f49Smrg 203632001f49Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 203732001f49Smrg# ---------------------------------- 203832001f49Smrg# Check to see if we can do hard links to lock some files if needed 203932001f49Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 204032001f49Smrg[m4_require([_LT_ENABLE_LOCK])dnl 204132001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 204232001f49Smrg_LT_COMPILER_C_O([$1]) 204332001f49Smrg 204432001f49Smrghard_links="nottested" 204532001f49Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 204632001f49Smrg # do not overwrite the value of need_locks provided by the user 204732001f49Smrg AC_MSG_CHECKING([if we can lock with hard links]) 204832001f49Smrg hard_links=yes 204932001f49Smrg $RM conftest* 205032001f49Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205132001f49Smrg touch conftest.a 205232001f49Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 205332001f49Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205432001f49Smrg AC_MSG_RESULT([$hard_links]) 205532001f49Smrg if test "$hard_links" = no; then 205632001f49Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 205732001f49Smrg need_locks=warn 205832001f49Smrg fi 205932001f49Smrgelse 206032001f49Smrg need_locks=no 206132001f49Smrgfi 206232001f49Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 206332001f49Smrg])# _LT_COMPILER_FILE_LOCKS 206432001f49Smrg 206532001f49Smrg 206632001f49Smrg# _LT_CHECK_OBJDIR 206732001f49Smrg# ---------------- 206832001f49Smrgm4_defun([_LT_CHECK_OBJDIR], 206932001f49Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207032001f49Smrg[rm -f .libs 2>/dev/null 207132001f49Smrgmkdir .libs 2>/dev/null 207232001f49Smrgif test -d .libs; then 207332001f49Smrg lt_cv_objdir=.libs 207432001f49Smrgelse 207532001f49Smrg # MS-DOS does not allow filenames that begin with a dot. 207632001f49Smrg lt_cv_objdir=_libs 207732001f49Smrgfi 207832001f49Smrgrmdir .libs 2>/dev/null]) 207932001f49Smrgobjdir=$lt_cv_objdir 208032001f49Smrg_LT_DECL([], [objdir], [0], 208132001f49Smrg [The name of the directory that contains temporary libtool files])dnl 208232001f49Smrgm4_pattern_allow([LT_OBJDIR])dnl 208332001f49SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 208432001f49Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 208532001f49Smrg])# _LT_CHECK_OBJDIR 208632001f49Smrg 208732001f49Smrg 208832001f49Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 208932001f49Smrg# -------------------------------------- 209032001f49Smrg# Check hardcoding attributes. 209132001f49Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 209232001f49Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 209332001f49Smrg_LT_TAGVAR(hardcode_action, $1)= 209432001f49Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 209532001f49Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 209632001f49Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 209732001f49Smrg 209832001f49Smrg # We can hardcode non-existent directories. 209932001f49Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210032001f49Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210132001f49Smrg # have to relink, otherwise we might link with an installed library 210232001f49Smrg # when we should be linking with a yet-to-be-installed one 210332001f49Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 210432001f49Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 210532001f49Smrg # Linking always hardcodes the temporary library directory. 210632001f49Smrg _LT_TAGVAR(hardcode_action, $1)=relink 210732001f49Smrg else 210832001f49Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 210932001f49Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 211032001f49Smrg fi 211132001f49Smrgelse 211232001f49Smrg # We cannot hardcode anything, or else we can only hardcode existing 211332001f49Smrg # directories. 211432001f49Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 211532001f49Smrgfi 211632001f49SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 211732001f49Smrg 211832001f49Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 211932001f49Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212032001f49Smrg # Fast installation is not supported 212132001f49Smrg enable_fast_install=no 212232001f49Smrgelif test "$shlibpath_overrides_runpath" = yes || 212332001f49Smrg test "$enable_shared" = no; then 212432001f49Smrg # Fast installation is not necessary 212532001f49Smrg enable_fast_install=needless 212632001f49Smrgfi 212732001f49Smrg_LT_TAGDECL([], [hardcode_action], [0], 212832001f49Smrg [How to hardcode a shared library path into an executable]) 212932001f49Smrg])# _LT_LINKER_HARDCODE_LIBPATH 213032001f49Smrg 213132001f49Smrg 213232001f49Smrg# _LT_CMD_STRIPLIB 213332001f49Smrg# ---------------- 213432001f49Smrgm4_defun([_LT_CMD_STRIPLIB], 213532001f49Smrg[m4_require([_LT_DECL_EGREP]) 213632001f49Smrgstriplib= 213732001f49Smrgold_striplib= 213832001f49SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 213932001f49Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214032001f49Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214132001f49Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 214232001f49Smrg AC_MSG_RESULT([yes]) 214332001f49Smrgelse 214432001f49Smrg# FIXME - insert some real tests, host_os isn't really good enough 214532001f49Smrg case $host_os in 214632001f49Smrg darwin*) 214732001f49Smrg if test -n "$STRIP" ; then 214832001f49Smrg striplib="$STRIP -x" 214932001f49Smrg old_striplib="$STRIP -S" 215032001f49Smrg AC_MSG_RESULT([yes]) 215132001f49Smrg else 215232001f49Smrg AC_MSG_RESULT([no]) 215332001f49Smrg fi 215432001f49Smrg ;; 215532001f49Smrg *) 215632001f49Smrg AC_MSG_RESULT([no]) 215732001f49Smrg ;; 215832001f49Smrg esac 215932001f49Smrgfi 216032001f49Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 216132001f49Smrg_LT_DECL([], [striplib], [1]) 216232001f49Smrg])# _LT_CMD_STRIPLIB 216332001f49Smrg 216432001f49Smrg 216532001f49Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 216632001f49Smrg# ----------------------------- 216732001f49Smrg# PORTME Fill in your ld.so characteristics 216832001f49Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 216932001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 217032001f49Smrgm4_require([_LT_DECL_EGREP])dnl 217132001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 217232001f49Smrgm4_require([_LT_DECL_OBJDUMP])dnl 217332001f49Smrgm4_require([_LT_DECL_SED])dnl 217432001f49Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 217532001f49SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 217632001f49Smrgm4_if([$1], 217732001f49Smrg [], [ 217832001f49Smrgif test "$GCC" = yes; then 217932001f49Smrg case $host_os in 218032001f49Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218132001f49Smrg *) lt_awk_arg="/^libraries:/" ;; 218232001f49Smrg esac 218332001f49Smrg case $host_os in 218432001f49Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 218532001f49Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 218632001f49Smrg esac 218732001f49Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 218832001f49Smrg case $lt_search_path_spec in 218932001f49Smrg *\;*) 219032001f49Smrg # if the path contains ";" then we assume it to be the separator 219132001f49Smrg # otherwise default to the standard path separator (i.e. ":") - it is 219232001f49Smrg # assumed that no part of a normal pathname contains ";" but that should 219332001f49Smrg # okay in the real world where ";" in dirpaths is itself problematic. 219432001f49Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 219532001f49Smrg ;; 219632001f49Smrg *) 219732001f49Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 219832001f49Smrg ;; 219932001f49Smrg esac 220032001f49Smrg # Ok, now we have the path, separated by spaces, we can step through it 220132001f49Smrg # and add multilib dir if necessary. 220232001f49Smrg lt_tmp_lt_search_path_spec= 220332001f49Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 220432001f49Smrg for lt_sys_path in $lt_search_path_spec; do 220532001f49Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 220632001f49Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 220732001f49Smrg else 220832001f49Smrg test -d "$lt_sys_path" && \ 220932001f49Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 221032001f49Smrg fi 221132001f49Smrg done 221232001f49Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 221332001f49SmrgBEGIN {RS=" "; FS="/|\n";} { 221432001f49Smrg lt_foo=""; 221532001f49Smrg lt_count=0; 221632001f49Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 221732001f49Smrg if ($lt_i != "" && $lt_i != ".") { 221832001f49Smrg if ($lt_i == "..") { 221932001f49Smrg lt_count++; 222032001f49Smrg } else { 222132001f49Smrg if (lt_count == 0) { 222232001f49Smrg lt_foo="/" $lt_i lt_foo; 222332001f49Smrg } else { 222432001f49Smrg lt_count--; 222532001f49Smrg } 222632001f49Smrg } 222732001f49Smrg } 222832001f49Smrg } 222932001f49Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 223032001f49Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 223132001f49Smrg}'` 223232001f49Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 223332001f49Smrg # for these hosts. 223432001f49Smrg case $host_os in 223532001f49Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 223632001f49Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 223732001f49Smrg esac 223832001f49Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 223932001f49Smrgelse 224032001f49Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 224132001f49Smrgfi]) 224232001f49Smrglibrary_names_spec= 224332001f49Smrglibname_spec='lib$name' 224432001f49Smrgsoname_spec= 224532001f49Smrgshrext_cmds=".so" 224632001f49Smrgpostinstall_cmds= 224732001f49Smrgpostuninstall_cmds= 224832001f49Smrgfinish_cmds= 224932001f49Smrgfinish_eval= 225032001f49Smrgshlibpath_var= 225132001f49Smrgshlibpath_overrides_runpath=unknown 225232001f49Smrgversion_type=none 225332001f49Smrgdynamic_linker="$host_os ld.so" 225432001f49Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 225532001f49Smrgneed_lib_prefix=unknown 225632001f49Smrghardcode_into_libs=no 225732001f49Smrg 225832001f49Smrg# when you set need_version to no, make sure it does not cause -set_version 225932001f49Smrg# flags to be left without arguments 226032001f49Smrgneed_version=unknown 226132001f49Smrg 226232001f49Smrgcase $host_os in 226332001f49Smrgaix3*) 226432001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 226532001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 226632001f49Smrg shlibpath_var=LIBPATH 226732001f49Smrg 226832001f49Smrg # AIX 3 has no versioning support, so we append a major version to the name. 226932001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 227032001f49Smrg ;; 227132001f49Smrg 227232001f49Smrgaix[[4-9]]*) 227332001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 227432001f49Smrg need_lib_prefix=no 227532001f49Smrg need_version=no 227632001f49Smrg hardcode_into_libs=yes 227732001f49Smrg if test "$host_cpu" = ia64; then 227832001f49Smrg # AIX 5 supports IA64 227932001f49Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228032001f49Smrg shlibpath_var=LD_LIBRARY_PATH 228132001f49Smrg else 228232001f49Smrg # With GCC up to 2.95.x, collect2 would create an import file 228332001f49Smrg # for dependence libraries. The import file would start with 228432001f49Smrg # the line `#! .'. This would cause the generated library to 228532001f49Smrg # depend on `.', always an invalid library. This was fixed in 228632001f49Smrg # development snapshots of GCC prior to 3.0. 228732001f49Smrg case $host_os in 228832001f49Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 228932001f49Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229032001f49Smrg echo ' yes ' 229132001f49Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 229232001f49Smrg : 229332001f49Smrg else 229432001f49Smrg can_build_shared=no 229532001f49Smrg fi 229632001f49Smrg ;; 229732001f49Smrg esac 229832001f49Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 229932001f49Smrg # soname into executable. Probably we can add versioning support to 230032001f49Smrg # collect2, so additional links can be useful in future. 230132001f49Smrg if test "$aix_use_runtimelinking" = yes; then 230232001f49Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 230332001f49Smrg # instead of lib<name>.a to let people know that these are not 230432001f49Smrg # typical AIX shared libraries. 230532001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230632001f49Smrg else 230732001f49Smrg # We preserve .a as extension for shared libraries through AIX4.2 230832001f49Smrg # and later when we are not doing run time linking. 230932001f49Smrg library_names_spec='${libname}${release}.a $libname.a' 231032001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 231132001f49Smrg fi 231232001f49Smrg shlibpath_var=LIBPATH 231332001f49Smrg fi 231432001f49Smrg ;; 231532001f49Smrg 231632001f49Smrgamigaos*) 231732001f49Smrg case $host_cpu in 231832001f49Smrg powerpc) 231932001f49Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 232032001f49Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 232132001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 232232001f49Smrg ;; 232332001f49Smrg m68k) 232432001f49Smrg library_names_spec='$libname.ixlibrary $libname.a' 232532001f49Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 232632001f49Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 232732001f49Smrg ;; 232832001f49Smrg esac 232932001f49Smrg ;; 233032001f49Smrg 233132001f49Smrgbeos*) 233232001f49Smrg library_names_spec='${libname}${shared_ext}' 233332001f49Smrg dynamic_linker="$host_os ld.so" 233432001f49Smrg shlibpath_var=LIBRARY_PATH 233532001f49Smrg ;; 233632001f49Smrg 233732001f49Smrgbsdi[[45]]*) 233832001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 233932001f49Smrg need_version=no 234032001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234132001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 234232001f49Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 234332001f49Smrg shlibpath_var=LD_LIBRARY_PATH 234432001f49Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 234532001f49Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 234632001f49Smrg # the default ld.so.conf also contains /usr/contrib/lib and 234732001f49Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 234832001f49Smrg # libtool to hard-code these into programs 234932001f49Smrg ;; 235032001f49Smrg 235132001f49Smrgcygwin* | mingw* | pw32* | cegcc*) 235232001f49Smrg version_type=windows 235332001f49Smrg shrext_cmds=".dll" 235432001f49Smrg need_version=no 235532001f49Smrg need_lib_prefix=no 235632001f49Smrg 235732001f49Smrg case $GCC,$cc_basename in 235832001f49Smrg yes,*) 235932001f49Smrg # gcc 236032001f49Smrg library_names_spec='$libname.dll.a' 236132001f49Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236232001f49Smrg postinstall_cmds='base_file=`basename \${file}`~ 236332001f49Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 236432001f49Smrg dldir=$destdir/`dirname \$dlpath`~ 236532001f49Smrg test -d \$dldir || mkdir -p \$dldir~ 236632001f49Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 236732001f49Smrg chmod a+x \$dldir/$dlname~ 236832001f49Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 236932001f49Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 237032001f49Smrg fi' 237132001f49Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 237232001f49Smrg dlpath=$dir/\$dldll~ 237332001f49Smrg $RM \$dlpath' 237432001f49Smrg shlibpath_overrides_runpath=yes 237532001f49Smrg 237632001f49Smrg case $host_os in 237732001f49Smrg cygwin*) 237832001f49Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237932001f49Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238032001f49Smrgm4_if([$1], [],[ 238132001f49Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 238232001f49Smrg ;; 238332001f49Smrg mingw* | cegcc*) 238432001f49Smrg # MinGW DLLs use traditional 'lib' prefix 238532001f49Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238632001f49Smrg ;; 238732001f49Smrg pw32*) 238832001f49Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238932001f49Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239032001f49Smrg ;; 239132001f49Smrg esac 239232001f49Smrg dynamic_linker='Win32 ld.exe' 239332001f49Smrg ;; 239432001f49Smrg 239532001f49Smrg *,cl*) 239632001f49Smrg # Native MSVC 239732001f49Smrg libname_spec='$name' 239832001f49Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239932001f49Smrg library_names_spec='${libname}.dll.lib' 240032001f49Smrg 240132001f49Smrg case $build_os in 240232001f49Smrg mingw*) 240332001f49Smrg sys_lib_search_path_spec= 240432001f49Smrg lt_save_ifs=$IFS 240532001f49Smrg IFS=';' 240632001f49Smrg for lt_path in $LIB 240732001f49Smrg do 240832001f49Smrg IFS=$lt_save_ifs 240932001f49Smrg # Let DOS variable expansion print the short 8.3 style file name. 241032001f49Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 241132001f49Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 241232001f49Smrg done 241332001f49Smrg IFS=$lt_save_ifs 241432001f49Smrg # Convert to MSYS style. 241532001f49Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 241632001f49Smrg ;; 241732001f49Smrg cygwin*) 241832001f49Smrg # Convert to unix form, then to dos form, then back to unix form 241932001f49Smrg # but this time dos style (no spaces!) so that the unix form looks 242032001f49Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 242132001f49Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 242232001f49Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 242332001f49Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 242432001f49Smrg ;; 242532001f49Smrg *) 242632001f49Smrg sys_lib_search_path_spec="$LIB" 242732001f49Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 242832001f49Smrg # It is most probably a Windows format PATH. 242932001f49Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 243032001f49Smrg else 243132001f49Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 243232001f49Smrg fi 243332001f49Smrg # FIXME: find the short name or the path components, as spaces are 243432001f49Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 243532001f49Smrg ;; 243632001f49Smrg esac 243732001f49Smrg 243832001f49Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 243932001f49Smrg postinstall_cmds='base_file=`basename \${file}`~ 244032001f49Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 244132001f49Smrg dldir=$destdir/`dirname \$dlpath`~ 244232001f49Smrg test -d \$dldir || mkdir -p \$dldir~ 244332001f49Smrg $install_prog $dir/$dlname \$dldir/$dlname' 244432001f49Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 244532001f49Smrg dlpath=$dir/\$dldll~ 244632001f49Smrg $RM \$dlpath' 244732001f49Smrg shlibpath_overrides_runpath=yes 244832001f49Smrg dynamic_linker='Win32 link.exe' 244932001f49Smrg ;; 245032001f49Smrg 245132001f49Smrg *) 245232001f49Smrg # Assume MSVC wrapper 245332001f49Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 245432001f49Smrg dynamic_linker='Win32 ld.exe' 245532001f49Smrg ;; 245632001f49Smrg esac 245732001f49Smrg # FIXME: first we should search . and the directory the executable is in 245832001f49Smrg shlibpath_var=PATH 245932001f49Smrg ;; 246032001f49Smrg 246132001f49Smrgdarwin* | rhapsody*) 246232001f49Smrg dynamic_linker="$host_os dyld" 246332001f49Smrg version_type=darwin 246432001f49Smrg need_lib_prefix=no 246532001f49Smrg need_version=no 246632001f49Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246732001f49Smrg soname_spec='${libname}${release}${major}$shared_ext' 246832001f49Smrg shlibpath_overrides_runpath=yes 246932001f49Smrg shlibpath_var=DYLD_LIBRARY_PATH 247032001f49Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 247132001f49Smrgm4_if([$1], [],[ 247232001f49Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 247332001f49Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 247432001f49Smrg ;; 247532001f49Smrg 247632001f49Smrgdgux*) 247732001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 247832001f49Smrg need_lib_prefix=no 247932001f49Smrg need_version=no 248032001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248132001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 248232001f49Smrg shlibpath_var=LD_LIBRARY_PATH 248332001f49Smrg ;; 248432001f49Smrg 248532001f49Smrgfreebsd* | dragonfly*) 248632001f49Smrg # DragonFly does not have aout. When/if they implement a new 248732001f49Smrg # versioning mechanism, adjust this. 248832001f49Smrg if test -x /usr/bin/objformat; then 248932001f49Smrg objformat=`/usr/bin/objformat` 249032001f49Smrg else 249132001f49Smrg case $host_os in 249232001f49Smrg freebsd[[23]].*) objformat=aout ;; 249332001f49Smrg *) objformat=elf ;; 249432001f49Smrg esac 249532001f49Smrg fi 249632001f49Smrg version_type=freebsd-$objformat 249732001f49Smrg case $version_type in 249832001f49Smrg freebsd-elf*) 249932001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250032001f49Smrg need_version=no 250132001f49Smrg need_lib_prefix=no 250232001f49Smrg ;; 250332001f49Smrg freebsd-*) 250432001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 250532001f49Smrg need_version=yes 250632001f49Smrg ;; 250732001f49Smrg esac 250832001f49Smrg shlibpath_var=LD_LIBRARY_PATH 250932001f49Smrg case $host_os in 251032001f49Smrg freebsd2.*) 251132001f49Smrg shlibpath_overrides_runpath=yes 251232001f49Smrg ;; 251332001f49Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 251432001f49Smrg shlibpath_overrides_runpath=yes 251532001f49Smrg hardcode_into_libs=yes 251632001f49Smrg ;; 251732001f49Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 251832001f49Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 251932001f49Smrg shlibpath_overrides_runpath=no 252032001f49Smrg hardcode_into_libs=yes 252132001f49Smrg ;; 252232001f49Smrg *) # from 4.6 on, and DragonFly 252332001f49Smrg shlibpath_overrides_runpath=yes 252432001f49Smrg hardcode_into_libs=yes 252532001f49Smrg ;; 252632001f49Smrg esac 252732001f49Smrg ;; 252832001f49Smrg 252932001f49Smrghaiku*) 253032001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 253132001f49Smrg need_lib_prefix=no 253232001f49Smrg need_version=no 253332001f49Smrg dynamic_linker="$host_os runtime_loader" 253432001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253532001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 253632001f49Smrg shlibpath_var=LIBRARY_PATH 253732001f49Smrg shlibpath_overrides_runpath=yes 253832001f49Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 253932001f49Smrg hardcode_into_libs=yes 254032001f49Smrg ;; 254132001f49Smrg 254232001f49Smrghpux9* | hpux10* | hpux11*) 254332001f49Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 254432001f49Smrg # link against other versions. 254532001f49Smrg version_type=sunos 254632001f49Smrg need_lib_prefix=no 254732001f49Smrg need_version=no 254832001f49Smrg case $host_cpu in 254932001f49Smrg ia64*) 255032001f49Smrg shrext_cmds='.so' 255132001f49Smrg hardcode_into_libs=yes 255232001f49Smrg dynamic_linker="$host_os dld.so" 255332001f49Smrg shlibpath_var=LD_LIBRARY_PATH 255432001f49Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 255532001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 255632001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 255732001f49Smrg if test "X$HPUX_IA64_MODE" = X32; then 255832001f49Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 255932001f49Smrg else 256032001f49Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 256132001f49Smrg fi 256232001f49Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 256332001f49Smrg ;; 256432001f49Smrg hppa*64*) 256532001f49Smrg shrext_cmds='.sl' 256632001f49Smrg hardcode_into_libs=yes 256732001f49Smrg dynamic_linker="$host_os dld.sl" 256832001f49Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 256932001f49Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 257032001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 257132001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 257232001f49Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 257332001f49Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 257432001f49Smrg ;; 257532001f49Smrg *) 257632001f49Smrg shrext_cmds='.sl' 257732001f49Smrg dynamic_linker="$host_os dld.sl" 257832001f49Smrg shlibpath_var=SHLIB_PATH 257932001f49Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 258032001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258132001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 258232001f49Smrg ;; 258332001f49Smrg esac 258432001f49Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 258532001f49Smrg postinstall_cmds='chmod 555 $lib' 258632001f49Smrg # or fails outright, so override atomically: 258732001f49Smrg install_override_mode=555 258832001f49Smrg ;; 258932001f49Smrg 259032001f49Smrginterix[[3-9]]*) 259132001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 259232001f49Smrg need_lib_prefix=no 259332001f49Smrg need_version=no 259432001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 259532001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 259632001f49Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 259732001f49Smrg shlibpath_var=LD_LIBRARY_PATH 259832001f49Smrg shlibpath_overrides_runpath=no 259932001f49Smrg hardcode_into_libs=yes 260032001f49Smrg ;; 260132001f49Smrg 260232001f49Smrgirix5* | irix6* | nonstopux*) 260332001f49Smrg case $host_os in 260432001f49Smrg nonstopux*) version_type=nonstopux ;; 260532001f49Smrg *) 260632001f49Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 260732001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 260832001f49Smrg else 260932001f49Smrg version_type=irix 261032001f49Smrg fi ;; 261132001f49Smrg esac 261232001f49Smrg need_lib_prefix=no 261332001f49Smrg need_version=no 261432001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 261532001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 261632001f49Smrg case $host_os in 261732001f49Smrg irix5* | nonstopux*) 261832001f49Smrg libsuff= shlibsuff= 261932001f49Smrg ;; 262032001f49Smrg *) 262132001f49Smrg case $LD in # libtool.m4 will add one of these switches to LD 262232001f49Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 262332001f49Smrg libsuff= shlibsuff= libmagic=32-bit;; 262432001f49Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 262532001f49Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 262632001f49Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 262732001f49Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 262832001f49Smrg *) libsuff= shlibsuff= libmagic=never-match;; 262932001f49Smrg esac 263032001f49Smrg ;; 263132001f49Smrg esac 263232001f49Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 263332001f49Smrg shlibpath_overrides_runpath=no 263432001f49Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 263532001f49Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 263632001f49Smrg hardcode_into_libs=yes 263732001f49Smrg ;; 263832001f49Smrg 263932001f49Smrg# No shared lib support for Linux oldld, aout, or coff. 264032001f49Smrglinux*oldld* | linux*aout* | linux*coff*) 264132001f49Smrg dynamic_linker=no 264232001f49Smrg ;; 264332001f49Smrg 264432001f49Smrg# This must be glibc/ELF. 264532001f49Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 264632001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 264732001f49Smrg need_lib_prefix=no 264832001f49Smrg need_version=no 264932001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 265032001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 265132001f49Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 265232001f49Smrg shlibpath_var=LD_LIBRARY_PATH 265332001f49Smrg shlibpath_overrides_runpath=no 265432001f49Smrg 265532001f49Smrg # Some binutils ld are patched to set DT_RUNPATH 265632001f49Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 265732001f49Smrg [lt_cv_shlibpath_overrides_runpath=no 265832001f49Smrg save_LDFLAGS=$LDFLAGS 265932001f49Smrg save_libdir=$libdir 266032001f49Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 266132001f49Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 266232001f49Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 266332001f49Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 266432001f49Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 266532001f49Smrg LDFLAGS=$save_LDFLAGS 266632001f49Smrg libdir=$save_libdir 266732001f49Smrg ]) 266832001f49Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 266932001f49Smrg 267032001f49Smrg # This implies no fast_install, which is unacceptable. 267132001f49Smrg # Some rework will be needed to allow for fast_install 267232001f49Smrg # before this can be enabled. 267332001f49Smrg hardcode_into_libs=yes 267432001f49Smrg 267532001f49Smrg # Append ld.so.conf contents to the search path 267632001f49Smrg if test -f /etc/ld.so.conf; then 267732001f49Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 267832001f49Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 267932001f49Smrg fi 268032001f49Smrg 268132001f49Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 268232001f49Smrg # powerpc, because MkLinux only supported shared libraries with the 268332001f49Smrg # GNU dynamic linker. Since this was broken with cross compilers, 268432001f49Smrg # most powerpc-linux boxes support dynamic linking these days and 268532001f49Smrg # people can always --disable-shared, the test was removed, and we 268632001f49Smrg # assume the GNU/Linux dynamic linker is in use. 268732001f49Smrg dynamic_linker='GNU/Linux ld.so' 268832001f49Smrg ;; 268932001f49Smrg 269032001f49Smrgnetbsdelf*-gnu) 269132001f49Smrg version_type=linux 269232001f49Smrg need_lib_prefix=no 269332001f49Smrg need_version=no 269432001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 269532001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 269632001f49Smrg shlibpath_var=LD_LIBRARY_PATH 269732001f49Smrg shlibpath_overrides_runpath=no 269832001f49Smrg hardcode_into_libs=yes 269932001f49Smrg dynamic_linker='NetBSD ld.elf_so' 270032001f49Smrg ;; 270132001f49Smrg 270232001f49Smrgnetbsd*) 270332001f49Smrg version_type=sunos 270432001f49Smrg need_lib_prefix=no 270532001f49Smrg need_version=no 270632001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 270732001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 270832001f49Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 270932001f49Smrg dynamic_linker='NetBSD (a.out) ld.so' 271032001f49Smrg else 271132001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 271232001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 271332001f49Smrg dynamic_linker='NetBSD ld.elf_so' 271432001f49Smrg fi 271532001f49Smrg shlibpath_var=LD_LIBRARY_PATH 271632001f49Smrg shlibpath_overrides_runpath=yes 271732001f49Smrg hardcode_into_libs=yes 271832001f49Smrg ;; 271932001f49Smrg 272032001f49Smrgnewsos6) 272132001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 272232001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 272332001f49Smrg shlibpath_var=LD_LIBRARY_PATH 272432001f49Smrg shlibpath_overrides_runpath=yes 272532001f49Smrg ;; 272632001f49Smrg 272732001f49Smrg*nto* | *qnx*) 272832001f49Smrg version_type=qnx 272932001f49Smrg need_lib_prefix=no 273032001f49Smrg need_version=no 273132001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273232001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 273332001f49Smrg shlibpath_var=LD_LIBRARY_PATH 273432001f49Smrg shlibpath_overrides_runpath=no 273532001f49Smrg hardcode_into_libs=yes 273632001f49Smrg dynamic_linker='ldqnx.so' 273732001f49Smrg ;; 273832001f49Smrg 273932001f49Smrgopenbsd*) 274032001f49Smrg version_type=sunos 274132001f49Smrg sys_lib_dlsearch_path_spec="/usr/lib" 274232001f49Smrg need_lib_prefix=no 274332001f49Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 274432001f49Smrg case $host_os in 274532001f49Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 274632001f49Smrg *) need_version=no ;; 274732001f49Smrg esac 274832001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 274932001f49Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 275032001f49Smrg shlibpath_var=LD_LIBRARY_PATH 275132001f49Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 275232001f49Smrg case $host_os in 275332001f49Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 275432001f49Smrg shlibpath_overrides_runpath=no 275532001f49Smrg ;; 275632001f49Smrg *) 275732001f49Smrg shlibpath_overrides_runpath=yes 275832001f49Smrg ;; 275932001f49Smrg esac 276032001f49Smrg else 276132001f49Smrg shlibpath_overrides_runpath=yes 276232001f49Smrg fi 276332001f49Smrg ;; 276432001f49Smrg 276532001f49Smrgos2*) 276632001f49Smrg libname_spec='$name' 276732001f49Smrg shrext_cmds=".dll" 276832001f49Smrg need_lib_prefix=no 276932001f49Smrg library_names_spec='$libname${shared_ext} $libname.a' 277032001f49Smrg dynamic_linker='OS/2 ld.exe' 277132001f49Smrg shlibpath_var=LIBPATH 277232001f49Smrg ;; 277332001f49Smrg 277432001f49Smrgosf3* | osf4* | osf5*) 277532001f49Smrg version_type=osf 277632001f49Smrg need_lib_prefix=no 277732001f49Smrg need_version=no 277832001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 277932001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 278032001f49Smrg shlibpath_var=LD_LIBRARY_PATH 278132001f49Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 278232001f49Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 278332001f49Smrg ;; 278432001f49Smrg 278532001f49Smrgrdos*) 278632001f49Smrg dynamic_linker=no 278732001f49Smrg ;; 278832001f49Smrg 278932001f49Smrgsolaris*) 279032001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 279132001f49Smrg need_lib_prefix=no 279232001f49Smrg need_version=no 279332001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279432001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 279532001f49Smrg shlibpath_var=LD_LIBRARY_PATH 279632001f49Smrg shlibpath_overrides_runpath=yes 279732001f49Smrg hardcode_into_libs=yes 279832001f49Smrg # ldd complains unless libraries are executable 279932001f49Smrg postinstall_cmds='chmod +x $lib' 280032001f49Smrg ;; 280132001f49Smrg 280232001f49Smrgsunos4*) 280332001f49Smrg version_type=sunos 280432001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 280532001f49Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 280632001f49Smrg shlibpath_var=LD_LIBRARY_PATH 280732001f49Smrg shlibpath_overrides_runpath=yes 280832001f49Smrg if test "$with_gnu_ld" = yes; then 280932001f49Smrg need_lib_prefix=no 281032001f49Smrg fi 281132001f49Smrg need_version=yes 281232001f49Smrg ;; 281332001f49Smrg 281432001f49Smrgsysv4 | sysv4.3*) 281532001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 281632001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 281732001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 281832001f49Smrg shlibpath_var=LD_LIBRARY_PATH 281932001f49Smrg case $host_vendor in 282032001f49Smrg sni) 282132001f49Smrg shlibpath_overrides_runpath=no 282232001f49Smrg need_lib_prefix=no 282332001f49Smrg runpath_var=LD_RUN_PATH 282432001f49Smrg ;; 282532001f49Smrg siemens) 282632001f49Smrg need_lib_prefix=no 282732001f49Smrg ;; 282832001f49Smrg motorola) 282932001f49Smrg need_lib_prefix=no 283032001f49Smrg need_version=no 283132001f49Smrg shlibpath_overrides_runpath=no 283232001f49Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 283332001f49Smrg ;; 283432001f49Smrg esac 283532001f49Smrg ;; 283632001f49Smrg 283732001f49Smrgsysv4*MP*) 283832001f49Smrg if test -d /usr/nec ;then 283932001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 284032001f49Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284132001f49Smrg soname_spec='$libname${shared_ext}.$major' 284232001f49Smrg shlibpath_var=LD_LIBRARY_PATH 284332001f49Smrg fi 284432001f49Smrg ;; 284532001f49Smrg 284632001f49Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 284732001f49Smrg version_type=freebsd-elf 284832001f49Smrg need_lib_prefix=no 284932001f49Smrg need_version=no 285032001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285132001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 285232001f49Smrg shlibpath_var=LD_LIBRARY_PATH 285332001f49Smrg shlibpath_overrides_runpath=yes 285432001f49Smrg hardcode_into_libs=yes 285532001f49Smrg if test "$with_gnu_ld" = yes; then 285632001f49Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 285732001f49Smrg else 285832001f49Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 285932001f49Smrg case $host_os in 286032001f49Smrg sco3.2v5*) 286132001f49Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 286232001f49Smrg ;; 286332001f49Smrg esac 286432001f49Smrg fi 286532001f49Smrg sys_lib_dlsearch_path_spec='/usr/lib' 286632001f49Smrg ;; 286732001f49Smrg 286832001f49Smrgtpf*) 286932001f49Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 287032001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 287132001f49Smrg need_lib_prefix=no 287232001f49Smrg need_version=no 287332001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 287432001f49Smrg shlibpath_var=LD_LIBRARY_PATH 287532001f49Smrg shlibpath_overrides_runpath=no 287632001f49Smrg hardcode_into_libs=yes 287732001f49Smrg ;; 287832001f49Smrg 287932001f49Smrguts4*) 288032001f49Smrg version_type=linux # correct to gnu/linux during the next big refactor 288132001f49Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288232001f49Smrg soname_spec='${libname}${release}${shared_ext}$major' 288332001f49Smrg shlibpath_var=LD_LIBRARY_PATH 288432001f49Smrg ;; 288532001f49Smrg 288632001f49Smrg*) 288732001f49Smrg dynamic_linker=no 288832001f49Smrg ;; 288932001f49Smrgesac 289032001f49SmrgAC_MSG_RESULT([$dynamic_linker]) 289132001f49Smrgtest "$dynamic_linker" = no && can_build_shared=no 289232001f49Smrg 289332001f49Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 289432001f49Smrgif test "$GCC" = yes; then 289532001f49Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 289632001f49Smrgfi 289732001f49Smrg 289832001f49Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 289932001f49Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 290032001f49Smrgfi 290132001f49Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 290232001f49Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 290332001f49Smrgfi 290432001f49Smrg 290532001f49Smrg_LT_DECL([], [variables_saved_for_relink], [1], 290632001f49Smrg [Variables whose values should be saved in libtool wrapper scripts and 290732001f49Smrg restored at link time]) 290832001f49Smrg_LT_DECL([], [need_lib_prefix], [0], 290932001f49Smrg [Do we need the "lib" prefix for modules?]) 291032001f49Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 291132001f49Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 291232001f49Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 291332001f49Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 291432001f49Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 291532001f49Smrg [Is shlibpath searched before the hard-coded library search path?]) 291632001f49Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 291732001f49Smrg_LT_DECL([], [library_names_spec], [1], 291832001f49Smrg [[List of archive names. First name is the real one, the rest are links. 291932001f49Smrg The last name is the one that the linker finds with -lNAME]]) 292032001f49Smrg_LT_DECL([], [soname_spec], [1], 292132001f49Smrg [[The coded name of the library, if different from the real name]]) 292232001f49Smrg_LT_DECL([], [install_override_mode], [1], 292332001f49Smrg [Permission mode override for installation of shared libraries]) 292432001f49Smrg_LT_DECL([], [postinstall_cmds], [2], 292532001f49Smrg [Command to use after installation of a shared archive]) 292632001f49Smrg_LT_DECL([], [postuninstall_cmds], [2], 292732001f49Smrg [Command to use after uninstallation of a shared archive]) 292832001f49Smrg_LT_DECL([], [finish_cmds], [2], 292932001f49Smrg [Commands used to finish a libtool library installation in a directory]) 293032001f49Smrg_LT_DECL([], [finish_eval], [1], 293132001f49Smrg [[As "finish_cmds", except a single script fragment to be evaled but 293232001f49Smrg not shown]]) 293332001f49Smrg_LT_DECL([], [hardcode_into_libs], [0], 293432001f49Smrg [Whether we should hardcode library paths into libraries]) 293532001f49Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 293632001f49Smrg [Compile-time system search path for libraries]) 293732001f49Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 293832001f49Smrg [Run-time system search path for libraries]) 293932001f49Smrg])# _LT_SYS_DYNAMIC_LINKER 294032001f49Smrg 294132001f49Smrg 294232001f49Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 294332001f49Smrg# -------------------------- 294432001f49Smrg# find a file program which can recognize shared library 294532001f49SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 294632001f49Smrg[m4_require([_LT_DECL_EGREP])dnl 294732001f49SmrgAC_MSG_CHECKING([for $1]) 294832001f49SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 294932001f49Smrg[case $MAGIC_CMD in 295032001f49Smrg[[\\/*] | ?:[\\/]*]) 295132001f49Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 295232001f49Smrg ;; 295332001f49Smrg*) 295432001f49Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 295532001f49Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 295632001f49Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 295732001f49Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 295832001f49Smrgdnl not every word. This closes a longstanding sh security hole. 295932001f49Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 296032001f49Smrg for ac_dir in $ac_dummy; do 296132001f49Smrg IFS="$lt_save_ifs" 296232001f49Smrg test -z "$ac_dir" && ac_dir=. 296332001f49Smrg if test -f $ac_dir/$1; then 296432001f49Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 296532001f49Smrg if test -n "$file_magic_test_file"; then 296632001f49Smrg case $deplibs_check_method in 296732001f49Smrg "file_magic "*) 296832001f49Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 296932001f49Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 297032001f49Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 297132001f49Smrg $EGREP "$file_magic_regex" > /dev/null; then 297232001f49Smrg : 297332001f49Smrg else 297432001f49Smrg cat <<_LT_EOF 1>&2 297532001f49Smrg 297632001f49Smrg*** Warning: the command libtool uses to detect shared libraries, 297732001f49Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 297832001f49Smrg*** The result is that libtool may fail to recognize shared libraries 297932001f49Smrg*** as such. This will affect the creation of libtool libraries that 298032001f49Smrg*** depend on shared libraries, but programs linked with such libtool 298132001f49Smrg*** libraries will work regardless of this problem. Nevertheless, you 298232001f49Smrg*** may want to report the problem to your system manager and/or to 298332001f49Smrg*** bug-libtool@gnu.org 298432001f49Smrg 298532001f49Smrg_LT_EOF 298632001f49Smrg fi ;; 298732001f49Smrg esac 298832001f49Smrg fi 298932001f49Smrg break 299032001f49Smrg fi 299132001f49Smrg done 299232001f49Smrg IFS="$lt_save_ifs" 299332001f49Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 299432001f49Smrg ;; 299532001f49Smrgesac]) 299632001f49SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 299732001f49Smrgif test -n "$MAGIC_CMD"; then 299832001f49Smrg AC_MSG_RESULT($MAGIC_CMD) 299932001f49Smrgelse 300032001f49Smrg AC_MSG_RESULT(no) 300132001f49Smrgfi 300232001f49Smrg_LT_DECL([], [MAGIC_CMD], [0], 300332001f49Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 300432001f49Smrg])# _LT_PATH_TOOL_PREFIX 300532001f49Smrg 300632001f49Smrg# Old name: 300732001f49SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 300832001f49Smrgdnl aclocal-1.4 backwards compatibility: 300932001f49Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 301032001f49Smrg 301132001f49Smrg 301232001f49Smrg# _LT_PATH_MAGIC 301332001f49Smrg# -------------- 301432001f49Smrg# find a file program which can recognize a shared library 301532001f49Smrgm4_defun([_LT_PATH_MAGIC], 301632001f49Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 301732001f49Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 301832001f49Smrg if test -n "$ac_tool_prefix"; then 301932001f49Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302032001f49Smrg else 302132001f49Smrg MAGIC_CMD=: 302232001f49Smrg fi 302332001f49Smrgfi 302432001f49Smrg])# _LT_PATH_MAGIC 302532001f49Smrg 302632001f49Smrg 302732001f49Smrg# LT_PATH_LD 302832001f49Smrg# ---------- 302932001f49Smrg# find the pathname to the GNU or non-GNU linker 303032001f49SmrgAC_DEFUN([LT_PATH_LD], 303132001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl 303232001f49SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 303332001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 303432001f49Smrgm4_require([_LT_DECL_SED])dnl 303532001f49Smrgm4_require([_LT_DECL_EGREP])dnl 303632001f49Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 303732001f49Smrg 303832001f49SmrgAC_ARG_WITH([gnu-ld], 303932001f49Smrg [AS_HELP_STRING([--with-gnu-ld], 304032001f49Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 304132001f49Smrg [test "$withval" = no || with_gnu_ld=yes], 304232001f49Smrg [with_gnu_ld=no])dnl 304332001f49Smrg 304432001f49Smrgac_prog=ld 304532001f49Smrgif test "$GCC" = yes; then 304632001f49Smrg # Check if gcc -print-prog-name=ld gives a path. 304732001f49Smrg AC_MSG_CHECKING([for ld used by $CC]) 304832001f49Smrg case $host in 304932001f49Smrg *-*-mingw*) 305032001f49Smrg # gcc leaves a trailing carriage return which upsets mingw 305132001f49Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 305232001f49Smrg *) 305332001f49Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 305432001f49Smrg esac 305532001f49Smrg case $ac_prog in 305632001f49Smrg # Accept absolute paths. 305732001f49Smrg [[\\/]]* | ?:[[\\/]]*) 305832001f49Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 305932001f49Smrg # Canonicalize the pathname of ld 306032001f49Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 306132001f49Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 306232001f49Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 306332001f49Smrg done 306432001f49Smrg test -z "$LD" && LD="$ac_prog" 306532001f49Smrg ;; 306632001f49Smrg "") 306732001f49Smrg # If it fails, then pretend we aren't using GCC. 306832001f49Smrg ac_prog=ld 306932001f49Smrg ;; 307032001f49Smrg *) 307132001f49Smrg # If it is relative, then search for the first ld in PATH. 307232001f49Smrg with_gnu_ld=unknown 307332001f49Smrg ;; 307432001f49Smrg esac 307532001f49Smrgelif test "$with_gnu_ld" = yes; then 307632001f49Smrg AC_MSG_CHECKING([for GNU ld]) 307732001f49Smrgelse 307832001f49Smrg AC_MSG_CHECKING([for non-GNU ld]) 307932001f49Smrgfi 308032001f49SmrgAC_CACHE_VAL(lt_cv_path_LD, 308132001f49Smrg[if test -z "$LD"; then 308232001f49Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 308332001f49Smrg for ac_dir in $PATH; do 308432001f49Smrg IFS="$lt_save_ifs" 308532001f49Smrg test -z "$ac_dir" && ac_dir=. 308632001f49Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 308732001f49Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 308832001f49Smrg # Check to see if the program is GNU ld. I'd rather use --version, 308932001f49Smrg # but apparently some variants of GNU ld only accept -v. 309032001f49Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 309132001f49Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 309232001f49Smrg *GNU* | *'with BFD'*) 309332001f49Smrg test "$with_gnu_ld" != no && break 309432001f49Smrg ;; 309532001f49Smrg *) 309632001f49Smrg test "$with_gnu_ld" != yes && break 309732001f49Smrg ;; 309832001f49Smrg esac 309932001f49Smrg fi 310032001f49Smrg done 310132001f49Smrg IFS="$lt_save_ifs" 310232001f49Smrgelse 310332001f49Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 310432001f49Smrgfi]) 310532001f49SmrgLD="$lt_cv_path_LD" 310632001f49Smrgif test -n "$LD"; then 310732001f49Smrg AC_MSG_RESULT($LD) 310832001f49Smrgelse 310932001f49Smrg AC_MSG_RESULT(no) 311032001f49Smrgfi 311132001f49Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 311232001f49Smrg_LT_PATH_LD_GNU 311332001f49SmrgAC_SUBST([LD]) 311432001f49Smrg 311532001f49Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 311632001f49Smrg])# LT_PATH_LD 311732001f49Smrg 311832001f49Smrg# Old names: 311932001f49SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 312032001f49SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 312132001f49Smrgdnl aclocal-1.4 backwards compatibility: 312232001f49Smrgdnl AC_DEFUN([AM_PROG_LD], []) 312332001f49Smrgdnl AC_DEFUN([AC_PROG_LD], []) 312432001f49Smrg 312532001f49Smrg 312632001f49Smrg# _LT_PATH_LD_GNU 312732001f49Smrg#- -------------- 312832001f49Smrgm4_defun([_LT_PATH_LD_GNU], 312932001f49Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 313032001f49Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 313132001f49Smrgcase `$LD -v 2>&1 </dev/null` in 313232001f49Smrg*GNU* | *'with BFD'*) 313332001f49Smrg lt_cv_prog_gnu_ld=yes 313432001f49Smrg ;; 313532001f49Smrg*) 313632001f49Smrg lt_cv_prog_gnu_ld=no 313732001f49Smrg ;; 313832001f49Smrgesac]) 313932001f49Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 314032001f49Smrg])# _LT_PATH_LD_GNU 314132001f49Smrg 314232001f49Smrg 314332001f49Smrg# _LT_CMD_RELOAD 314432001f49Smrg# -------------- 314532001f49Smrg# find reload flag for linker 314632001f49Smrg# -- PORTME Some linkers may need a different reload flag. 314732001f49Smrgm4_defun([_LT_CMD_RELOAD], 314832001f49Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 314932001f49Smrg lt_cv_ld_reload_flag, 315032001f49Smrg [lt_cv_ld_reload_flag='-r']) 315132001f49Smrgreload_flag=$lt_cv_ld_reload_flag 315232001f49Smrgcase $reload_flag in 315332001f49Smrg"" | " "*) ;; 315432001f49Smrg*) reload_flag=" $reload_flag" ;; 315532001f49Smrgesac 315632001f49Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 315732001f49Smrgcase $host_os in 315832001f49Smrg cygwin* | mingw* | pw32* | cegcc*) 315932001f49Smrg if test "$GCC" != yes; then 316032001f49Smrg reload_cmds=false 316132001f49Smrg fi 316232001f49Smrg ;; 316332001f49Smrg darwin*) 316432001f49Smrg if test "$GCC" = yes; then 316532001f49Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 316632001f49Smrg else 316732001f49Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 316832001f49Smrg fi 316932001f49Smrg ;; 317032001f49Smrgesac 317132001f49Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 317232001f49Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 317332001f49Smrg])# _LT_CMD_RELOAD 317432001f49Smrg 317532001f49Smrg 317632001f49Smrg# _LT_CHECK_MAGIC_METHOD 317732001f49Smrg# ---------------------- 317832001f49Smrg# how to check for library dependencies 317932001f49Smrg# -- PORTME fill in with the dynamic library characteristics 318032001f49Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 318132001f49Smrg[m4_require([_LT_DECL_EGREP]) 318232001f49Smrgm4_require([_LT_DECL_OBJDUMP]) 318332001f49SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 318432001f49Smrglt_cv_deplibs_check_method, 318532001f49Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 318632001f49Smrglt_cv_file_magic_test_file= 318732001f49Smrglt_cv_deplibs_check_method='unknown' 318832001f49Smrg# Need to set the preceding variable on all platforms that support 318932001f49Smrg# interlibrary dependencies. 319032001f49Smrg# 'none' -- dependencies not supported. 319132001f49Smrg# `unknown' -- same as none, but documents that we really don't know. 319232001f49Smrg# 'pass_all' -- all dependencies passed with no checks. 319332001f49Smrg# 'test_compile' -- check by making test program. 319432001f49Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 319532001f49Smrg# which responds to the $file_magic_cmd with a given extended regex. 319632001f49Smrg# If you have `file' or equivalent on your system and you're not sure 319732001f49Smrg# whether `pass_all' will *always* work, you probably want this one. 319832001f49Smrg 319932001f49Smrgcase $host_os in 320032001f49Smrgaix[[4-9]]*) 320132001f49Smrg lt_cv_deplibs_check_method=pass_all 320232001f49Smrg ;; 320332001f49Smrg 320432001f49Smrgbeos*) 320532001f49Smrg lt_cv_deplibs_check_method=pass_all 320632001f49Smrg ;; 320732001f49Smrg 320832001f49Smrgbsdi[[45]]*) 320932001f49Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 321032001f49Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 321132001f49Smrg lt_cv_file_magic_test_file=/shlib/libc.so 321232001f49Smrg ;; 321332001f49Smrg 321432001f49Smrgcygwin*) 321532001f49Smrg # func_win32_libid is a shell function defined in ltmain.sh 321632001f49Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 321732001f49Smrg lt_cv_file_magic_cmd='func_win32_libid' 321832001f49Smrg ;; 321932001f49Smrg 322032001f49Smrgmingw* | pw32*) 322132001f49Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 322232001f49Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 322332001f49Smrg # unless we find 'file', for example because we are cross-compiling. 322432001f49Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 322532001f49Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 322632001f49Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322732001f49Smrg lt_cv_file_magic_cmd='func_win32_libid' 322832001f49Smrg else 322932001f49Smrg # Keep this pattern in sync with the one in func_win32_libid. 323032001f49Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 323132001f49Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 323232001f49Smrg fi 323332001f49Smrg ;; 323432001f49Smrg 323532001f49Smrgcegcc*) 323632001f49Smrg # use the weaker test based on 'objdump'. See mingw*. 323732001f49Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 323832001f49Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 323932001f49Smrg ;; 324032001f49Smrg 324132001f49Smrgdarwin* | rhapsody*) 324232001f49Smrg lt_cv_deplibs_check_method=pass_all 324332001f49Smrg ;; 324432001f49Smrg 324532001f49Smrgfreebsd* | dragonfly*) 324632001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 324732001f49Smrg case $host_cpu in 324832001f49Smrg i*86 ) 324932001f49Smrg # Not sure whether the presence of OpenBSD here was a mistake. 325032001f49Smrg # Let's accept both of them until this is cleared up. 325132001f49Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 325232001f49Smrg lt_cv_file_magic_cmd=/usr/bin/file 325332001f49Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 325432001f49Smrg ;; 325532001f49Smrg esac 325632001f49Smrg else 325732001f49Smrg lt_cv_deplibs_check_method=pass_all 325832001f49Smrg fi 325932001f49Smrg ;; 326032001f49Smrg 326132001f49Smrghaiku*) 326232001f49Smrg lt_cv_deplibs_check_method=pass_all 326332001f49Smrg ;; 326432001f49Smrg 326532001f49Smrghpux10.20* | hpux11*) 326632001f49Smrg lt_cv_file_magic_cmd=/usr/bin/file 326732001f49Smrg case $host_cpu in 326832001f49Smrg ia64*) 326932001f49Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 327032001f49Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 327132001f49Smrg ;; 327232001f49Smrg hppa*64*) 327332001f49Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 327432001f49Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 327532001f49Smrg ;; 327632001f49Smrg *) 327732001f49Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 327832001f49Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 327932001f49Smrg ;; 328032001f49Smrg esac 328132001f49Smrg ;; 328232001f49Smrg 328332001f49Smrginterix[[3-9]]*) 328432001f49Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 328532001f49Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 328632001f49Smrg ;; 328732001f49Smrg 328832001f49Smrgirix5* | irix6* | nonstopux*) 328932001f49Smrg case $LD in 329032001f49Smrg *-32|*"-32 ") libmagic=32-bit;; 329132001f49Smrg *-n32|*"-n32 ") libmagic=N32;; 329232001f49Smrg *-64|*"-64 ") libmagic=64-bit;; 329332001f49Smrg *) libmagic=never-match;; 329432001f49Smrg esac 329532001f49Smrg lt_cv_deplibs_check_method=pass_all 329632001f49Smrg ;; 329732001f49Smrg 329832001f49Smrg# This must be glibc/ELF. 329932001f49Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 330032001f49Smrg lt_cv_deplibs_check_method=pass_all 330132001f49Smrg ;; 330232001f49Smrg 330332001f49Smrgnetbsd* | netbsdelf*-gnu) 330432001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 330532001f49Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 330632001f49Smrg else 330732001f49Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 330832001f49Smrg fi 330932001f49Smrg ;; 331032001f49Smrg 331132001f49Smrgnewos6*) 331232001f49Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 331332001f49Smrg lt_cv_file_magic_cmd=/usr/bin/file 331432001f49Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 331532001f49Smrg ;; 331632001f49Smrg 331732001f49Smrg*nto* | *qnx*) 331832001f49Smrg lt_cv_deplibs_check_method=pass_all 331932001f49Smrg ;; 332032001f49Smrg 332132001f49Smrgopenbsd*) 332232001f49Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 332332001f49Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 332432001f49Smrg else 332532001f49Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 332632001f49Smrg fi 332732001f49Smrg ;; 332832001f49Smrg 332932001f49Smrgosf3* | osf4* | osf5*) 333032001f49Smrg lt_cv_deplibs_check_method=pass_all 333132001f49Smrg ;; 333232001f49Smrg 333332001f49Smrgrdos*) 333432001f49Smrg lt_cv_deplibs_check_method=pass_all 333532001f49Smrg ;; 333632001f49Smrg 333732001f49Smrgsolaris*) 333832001f49Smrg lt_cv_deplibs_check_method=pass_all 333932001f49Smrg ;; 334032001f49Smrg 334132001f49Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 334232001f49Smrg lt_cv_deplibs_check_method=pass_all 334332001f49Smrg ;; 334432001f49Smrg 334532001f49Smrgsysv4 | sysv4.3*) 334632001f49Smrg case $host_vendor in 334732001f49Smrg motorola) 334832001f49Smrg 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]]' 334932001f49Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 335032001f49Smrg ;; 335132001f49Smrg ncr) 335232001f49Smrg lt_cv_deplibs_check_method=pass_all 335332001f49Smrg ;; 335432001f49Smrg sequent) 335532001f49Smrg lt_cv_file_magic_cmd='/bin/file' 335632001f49Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 335732001f49Smrg ;; 335832001f49Smrg sni) 335932001f49Smrg lt_cv_file_magic_cmd='/bin/file' 336032001f49Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 336132001f49Smrg lt_cv_file_magic_test_file=/lib/libc.so 336232001f49Smrg ;; 336332001f49Smrg siemens) 336432001f49Smrg lt_cv_deplibs_check_method=pass_all 336532001f49Smrg ;; 336632001f49Smrg pc) 336732001f49Smrg lt_cv_deplibs_check_method=pass_all 336832001f49Smrg ;; 336932001f49Smrg esac 337032001f49Smrg ;; 337132001f49Smrg 337232001f49Smrgtpf*) 337332001f49Smrg lt_cv_deplibs_check_method=pass_all 337432001f49Smrg ;; 337532001f49Smrgesac 337632001f49Smrg]) 337732001f49Smrg 337832001f49Smrgfile_magic_glob= 337932001f49Smrgwant_nocaseglob=no 338032001f49Smrgif test "$build" = "$host"; then 338132001f49Smrg case $host_os in 338232001f49Smrg mingw* | pw32*) 338332001f49Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 338432001f49Smrg want_nocaseglob=yes 338532001f49Smrg else 338632001f49Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 338732001f49Smrg fi 338832001f49Smrg ;; 338932001f49Smrg esac 339032001f49Smrgfi 339132001f49Smrg 339232001f49Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 339332001f49Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 339432001f49Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 339532001f49Smrg 339632001f49Smrg_LT_DECL([], [deplibs_check_method], [1], 339732001f49Smrg [Method to check whether dependent libraries are shared objects]) 339832001f49Smrg_LT_DECL([], [file_magic_cmd], [1], 339932001f49Smrg [Command to use when deplibs_check_method = "file_magic"]) 340032001f49Smrg_LT_DECL([], [file_magic_glob], [1], 340132001f49Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 340232001f49Smrg_LT_DECL([], [want_nocaseglob], [1], 340332001f49Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 340432001f49Smrg])# _LT_CHECK_MAGIC_METHOD 340532001f49Smrg 340632001f49Smrg 340732001f49Smrg# LT_PATH_NM 340832001f49Smrg# ---------- 340932001f49Smrg# find the pathname to a BSD- or MS-compatible name lister 341032001f49SmrgAC_DEFUN([LT_PATH_NM], 341132001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl 341232001f49SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 341332001f49Smrg[if test -n "$NM"; then 341432001f49Smrg # Let the user override the test. 341532001f49Smrg lt_cv_path_NM="$NM" 341632001f49Smrgelse 341732001f49Smrg lt_nm_to_check="${ac_tool_prefix}nm" 341832001f49Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 341932001f49Smrg lt_nm_to_check="$lt_nm_to_check nm" 342032001f49Smrg fi 342132001f49Smrg for lt_tmp_nm in $lt_nm_to_check; do 342232001f49Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 342332001f49Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 342432001f49Smrg IFS="$lt_save_ifs" 342532001f49Smrg test -z "$ac_dir" && ac_dir=. 342632001f49Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 342732001f49Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 342832001f49Smrg # Check to see if the nm accepts a BSD-compat flag. 342932001f49Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 343032001f49Smrg # nm: unknown option "B" ignored 343132001f49Smrg # Tru64's nm complains that /dev/null is an invalid object file 343232001f49Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 343332001f49Smrg */dev/null* | *'Invalid file or object type'*) 343432001f49Smrg lt_cv_path_NM="$tmp_nm -B" 343532001f49Smrg break 343632001f49Smrg ;; 343732001f49Smrg *) 343832001f49Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 343932001f49Smrg */dev/null*) 344032001f49Smrg lt_cv_path_NM="$tmp_nm -p" 344132001f49Smrg break 344232001f49Smrg ;; 344332001f49Smrg *) 344432001f49Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 344532001f49Smrg continue # so that we can try to find one that supports BSD flags 344632001f49Smrg ;; 344732001f49Smrg esac 344832001f49Smrg ;; 344932001f49Smrg esac 345032001f49Smrg fi 345132001f49Smrg done 345232001f49Smrg IFS="$lt_save_ifs" 345332001f49Smrg done 345432001f49Smrg : ${lt_cv_path_NM=no} 345532001f49Smrgfi]) 345632001f49Smrgif test "$lt_cv_path_NM" != "no"; then 345732001f49Smrg NM="$lt_cv_path_NM" 345832001f49Smrgelse 345932001f49Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 346032001f49Smrg if test -n "$DUMPBIN"; then : 346132001f49Smrg # Let the user override the test. 346232001f49Smrg else 346332001f49Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 346432001f49Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 346532001f49Smrg *COFF*) 346632001f49Smrg DUMPBIN="$DUMPBIN -symbols" 346732001f49Smrg ;; 346832001f49Smrg *) 346932001f49Smrg DUMPBIN=: 347032001f49Smrg ;; 347132001f49Smrg esac 347232001f49Smrg fi 347332001f49Smrg AC_SUBST([DUMPBIN]) 347432001f49Smrg if test "$DUMPBIN" != ":"; then 347532001f49Smrg NM="$DUMPBIN" 347632001f49Smrg fi 347732001f49Smrgfi 347832001f49Smrgtest -z "$NM" && NM=nm 347932001f49SmrgAC_SUBST([NM]) 348032001f49Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 348132001f49Smrg 348232001f49SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 348332001f49Smrg [lt_cv_nm_interface="BSD nm" 348432001f49Smrg echo "int some_variable = 0;" > conftest.$ac_ext 348532001f49Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 348632001f49Smrg (eval "$ac_compile" 2>conftest.err) 348732001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 348832001f49Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 348932001f49Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 349032001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 349132001f49Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 349232001f49Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 349332001f49Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 349432001f49Smrg lt_cv_nm_interface="MS dumpbin" 349532001f49Smrg fi 349632001f49Smrg rm -f conftest*]) 349732001f49Smrg])# LT_PATH_NM 349832001f49Smrg 349932001f49Smrg# Old names: 350032001f49SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 350132001f49SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 350232001f49Smrgdnl aclocal-1.4 backwards compatibility: 350332001f49Smrgdnl AC_DEFUN([AM_PROG_NM], []) 350432001f49Smrgdnl AC_DEFUN([AC_PROG_NM], []) 350532001f49Smrg 350632001f49Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 350732001f49Smrg# -------------------------------- 350832001f49Smrg# how to determine the name of the shared library 350932001f49Smrg# associated with a specific link library. 351032001f49Smrg# -- PORTME fill in with the dynamic library characteristics 351132001f49Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 351232001f49Smrg[m4_require([_LT_DECL_EGREP]) 351332001f49Smrgm4_require([_LT_DECL_OBJDUMP]) 351432001f49Smrgm4_require([_LT_DECL_DLLTOOL]) 351532001f49SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 351632001f49Smrglt_cv_sharedlib_from_linklib_cmd, 351732001f49Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 351832001f49Smrg 351932001f49Smrgcase $host_os in 352032001f49Smrgcygwin* | mingw* | pw32* | cegcc*) 352132001f49Smrg # two different shell functions defined in ltmain.sh 352232001f49Smrg # decide which to use based on capabilities of $DLLTOOL 352332001f49Smrg case `$DLLTOOL --help 2>&1` in 352432001f49Smrg *--identify-strict*) 352532001f49Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 352632001f49Smrg ;; 352732001f49Smrg *) 352832001f49Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 352932001f49Smrg ;; 353032001f49Smrg esac 353132001f49Smrg ;; 353232001f49Smrg*) 353332001f49Smrg # fallback: assume linklib IS sharedlib 353432001f49Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 353532001f49Smrg ;; 353632001f49Smrgesac 353732001f49Smrg]) 353832001f49Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 353932001f49Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 354032001f49Smrg 354132001f49Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 354232001f49Smrg [Command to associate shared and link libraries]) 354332001f49Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 354432001f49Smrg 354532001f49Smrg 354632001f49Smrg# _LT_PATH_MANIFEST_TOOL 354732001f49Smrg# ---------------------- 354832001f49Smrg# locate the manifest tool 354932001f49Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 355032001f49Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 355132001f49Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 355232001f49SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 355332001f49Smrg [lt_cv_path_mainfest_tool=no 355432001f49Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 355532001f49Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 355632001f49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 355732001f49Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 355832001f49Smrg lt_cv_path_mainfest_tool=yes 355932001f49Smrg fi 356032001f49Smrg rm -f conftest*]) 356132001f49Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 356232001f49Smrg MANIFEST_TOOL=: 356332001f49Smrgfi 356432001f49Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 356532001f49Smrg])# _LT_PATH_MANIFEST_TOOL 356632001f49Smrg 356732001f49Smrg 356832001f49Smrg# LT_LIB_M 356932001f49Smrg# -------- 357032001f49Smrg# check for math library 357132001f49SmrgAC_DEFUN([LT_LIB_M], 357232001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 357332001f49SmrgLIBM= 357432001f49Smrgcase $host in 357532001f49Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 357632001f49Smrg # These system don't have libm, or don't need it 357732001f49Smrg ;; 357832001f49Smrg*-ncr-sysv4.3*) 357932001f49Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 358032001f49Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 358132001f49Smrg ;; 358232001f49Smrg*) 358332001f49Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 358432001f49Smrg ;; 358532001f49Smrgesac 358632001f49SmrgAC_SUBST([LIBM]) 358732001f49Smrg])# LT_LIB_M 358832001f49Smrg 358932001f49Smrg# Old name: 359032001f49SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 359132001f49Smrgdnl aclocal-1.4 backwards compatibility: 359232001f49Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 359332001f49Smrg 359432001f49Smrg 359532001f49Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 359632001f49Smrg# ------------------------------- 359732001f49Smrgm4_defun([_LT_COMPILER_NO_RTTI], 359832001f49Smrg[m4_require([_LT_TAG_COMPILER])dnl 359932001f49Smrg 360032001f49Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 360132001f49Smrg 360232001f49Smrgif test "$GCC" = yes; then 360332001f49Smrg case $cc_basename in 360432001f49Smrg nvcc*) 360532001f49Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 360632001f49Smrg *) 360732001f49Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 360832001f49Smrg esac 360932001f49Smrg 361032001f49Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 361132001f49Smrg lt_cv_prog_compiler_rtti_exceptions, 361232001f49Smrg [-fno-rtti -fno-exceptions], [], 361332001f49Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 361432001f49Smrgfi 361532001f49Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 361632001f49Smrg [Compiler flag to turn off builtin functions]) 361732001f49Smrg])# _LT_COMPILER_NO_RTTI 361832001f49Smrg 361932001f49Smrg 362032001f49Smrg# _LT_CMD_GLOBAL_SYMBOLS 362132001f49Smrg# ---------------------- 362232001f49Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 362332001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 362432001f49SmrgAC_REQUIRE([AC_PROG_CC])dnl 362532001f49SmrgAC_REQUIRE([AC_PROG_AWK])dnl 362632001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl 362732001f49SmrgAC_REQUIRE([LT_PATH_LD])dnl 362832001f49Smrgm4_require([_LT_DECL_SED])dnl 362932001f49Smrgm4_require([_LT_DECL_EGREP])dnl 363032001f49Smrgm4_require([_LT_TAG_COMPILER])dnl 363132001f49Smrg 363232001f49Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 363332001f49SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 363432001f49SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 363532001f49Smrg[ 363632001f49Smrg# These are sane defaults that work on at least a few old systems. 363732001f49Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 363832001f49Smrg 363932001f49Smrg# Character class describing NM global symbol codes. 364032001f49Smrgsymcode='[[BCDEGRST]]' 364132001f49Smrg 364232001f49Smrg# Regexp to match symbols that can be accessed directly from C. 364332001f49Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 364432001f49Smrg 364532001f49Smrg# Define system-specific variables. 364632001f49Smrgcase $host_os in 364732001f49Smrgaix*) 364832001f49Smrg symcode='[[BCDT]]' 364932001f49Smrg ;; 365032001f49Smrgcygwin* | mingw* | pw32* | cegcc*) 365132001f49Smrg symcode='[[ABCDGISTW]]' 365232001f49Smrg ;; 365332001f49Smrghpux*) 365432001f49Smrg if test "$host_cpu" = ia64; then 365532001f49Smrg symcode='[[ABCDEGRST]]' 365632001f49Smrg fi 365732001f49Smrg ;; 365832001f49Smrgirix* | nonstopux*) 365932001f49Smrg symcode='[[BCDEGRST]]' 366032001f49Smrg ;; 366132001f49Smrgosf*) 366232001f49Smrg symcode='[[BCDEGQRST]]' 366332001f49Smrg ;; 366432001f49Smrgsolaris*) 366532001f49Smrg symcode='[[BDRT]]' 366632001f49Smrg ;; 366732001f49Smrgsco3.2v5*) 366832001f49Smrg symcode='[[DT]]' 366932001f49Smrg ;; 367032001f49Smrgsysv4.2uw2*) 367132001f49Smrg symcode='[[DT]]' 367232001f49Smrg ;; 367332001f49Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 367432001f49Smrg symcode='[[ABDT]]' 367532001f49Smrg ;; 367632001f49Smrgsysv4) 367732001f49Smrg symcode='[[DFNSTU]]' 367832001f49Smrg ;; 367932001f49Smrgesac 368032001f49Smrg 368132001f49Smrg# If we're using GNU nm, then use its standard symbol codes. 368232001f49Smrgcase `$NM -V 2>&1` in 368332001f49Smrg*GNU* | *'with BFD'*) 368432001f49Smrg symcode='[[ABCDGIRSTW]]' ;; 368532001f49Smrgesac 368632001f49Smrg 368732001f49Smrg# Transform an extracted symbol line into a proper C declaration. 368832001f49Smrg# Some systems (esp. on ia64) link data and code symbols differently, 368932001f49Smrg# so use this general approach. 369032001f49Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 369132001f49Smrg 369232001f49Smrg# Transform an extracted symbol line into symbol name and symbol address 369332001f49Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 369432001f49Smrglt_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'" 369532001f49Smrg 369632001f49Smrg# Handle CRLF in mingw tool chain 369732001f49Smrgopt_cr= 369832001f49Smrgcase $build_os in 369932001f49Smrgmingw*) 370032001f49Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 370132001f49Smrg ;; 370232001f49Smrgesac 370332001f49Smrg 370432001f49Smrg# Try without a prefix underscore, then with it. 370532001f49Smrgfor ac_symprfx in "" "_"; do 370632001f49Smrg 370732001f49Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 370832001f49Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 370932001f49Smrg 371032001f49Smrg # Write the raw and C identifiers. 371132001f49Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 371232001f49Smrg # Fake it for dumpbin and say T for any non-static function 371332001f49Smrg # and D for any global variable. 371432001f49Smrg # Also find C++ and __fastcall symbols from MSVC++, 371532001f49Smrg # which start with @ or ?. 371632001f49Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 371732001f49Smrg" {last_section=section; section=\$ 3};"\ 371832001f49Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 371932001f49Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 372032001f49Smrg" \$ 0!~/External *\|/{next};"\ 372132001f49Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 372232001f49Smrg" {if(hide[section]) next};"\ 372332001f49Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 372432001f49Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 372532001f49Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 372632001f49Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 372732001f49Smrg" ' prfx=^$ac_symprfx]" 372832001f49Smrg else 372932001f49Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 373032001f49Smrg fi 373132001f49Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 373232001f49Smrg 373332001f49Smrg # Check to see that the pipe works correctly. 373432001f49Smrg pipe_works=no 373532001f49Smrg 373632001f49Smrg rm -f conftest* 373732001f49Smrg cat > conftest.$ac_ext <<_LT_EOF 373832001f49Smrg#ifdef __cplusplus 373932001f49Smrgextern "C" { 374032001f49Smrg#endif 374132001f49Smrgchar nm_test_var; 374232001f49Smrgvoid nm_test_func(void); 374332001f49Smrgvoid nm_test_func(void){} 374432001f49Smrg#ifdef __cplusplus 374532001f49Smrg} 374632001f49Smrg#endif 374732001f49Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 374832001f49Smrg_LT_EOF 374932001f49Smrg 375032001f49Smrg if AC_TRY_EVAL(ac_compile); then 375132001f49Smrg # Now try to grab the symbols. 375232001f49Smrg nlist=conftest.nm 375332001f49Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 375432001f49Smrg # Try sorting and uniquifying the output. 375532001f49Smrg if sort "$nlist" | uniq > "$nlist"T; then 375632001f49Smrg mv -f "$nlist"T "$nlist" 375732001f49Smrg else 375832001f49Smrg rm -f "$nlist"T 375932001f49Smrg fi 376032001f49Smrg 376132001f49Smrg # Make sure that we snagged all the symbols we need. 376232001f49Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 376332001f49Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 376432001f49Smrg cat <<_LT_EOF > conftest.$ac_ext 376532001f49Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 376632001f49Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 376732001f49Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 376832001f49Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 376932001f49Smrg# define LT@&t@_DLSYM_CONST 377032001f49Smrg#elif defined(__osf__) 377132001f49Smrg/* This system does not cope well with relocations in const data. */ 377232001f49Smrg# define LT@&t@_DLSYM_CONST 377332001f49Smrg#else 377432001f49Smrg# define LT@&t@_DLSYM_CONST const 377532001f49Smrg#endif 377632001f49Smrg 377732001f49Smrg#ifdef __cplusplus 377832001f49Smrgextern "C" { 377932001f49Smrg#endif 378032001f49Smrg 378132001f49Smrg_LT_EOF 378232001f49Smrg # Now generate the symbol file. 378332001f49Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 378432001f49Smrg 378532001f49Smrg cat <<_LT_EOF >> conftest.$ac_ext 378632001f49Smrg 378732001f49Smrg/* The mapping between symbol names and symbols. */ 378832001f49SmrgLT@&t@_DLSYM_CONST struct { 378932001f49Smrg const char *name; 379032001f49Smrg void *address; 379132001f49Smrg} 379232001f49Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 379332001f49Smrg{ 379432001f49Smrg { "@PROGRAM@", (void *) 0 }, 379532001f49Smrg_LT_EOF 379632001f49Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 379732001f49Smrg cat <<\_LT_EOF >> conftest.$ac_ext 379832001f49Smrg {0, (void *) 0} 379932001f49Smrg}; 380032001f49Smrg 380132001f49Smrg/* This works around a problem in FreeBSD linker */ 380232001f49Smrg#ifdef FREEBSD_WORKAROUND 380332001f49Smrgstatic const void *lt_preloaded_setup() { 380432001f49Smrg return lt__PROGRAM__LTX_preloaded_symbols; 380532001f49Smrg} 380632001f49Smrg#endif 380732001f49Smrg 380832001f49Smrg#ifdef __cplusplus 380932001f49Smrg} 381032001f49Smrg#endif 381132001f49Smrg_LT_EOF 381232001f49Smrg # Now try linking the two files. 381332001f49Smrg mv conftest.$ac_objext conftstm.$ac_objext 381432001f49Smrg lt_globsym_save_LIBS=$LIBS 381532001f49Smrg lt_globsym_save_CFLAGS=$CFLAGS 381632001f49Smrg LIBS="conftstm.$ac_objext" 381732001f49Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 381832001f49Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 381932001f49Smrg pipe_works=yes 382032001f49Smrg fi 382132001f49Smrg LIBS=$lt_globsym_save_LIBS 382232001f49Smrg CFLAGS=$lt_globsym_save_CFLAGS 382332001f49Smrg else 382432001f49Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 382532001f49Smrg fi 382632001f49Smrg else 382732001f49Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 382832001f49Smrg fi 382932001f49Smrg else 383032001f49Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 383132001f49Smrg fi 383232001f49Smrg else 383332001f49Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 383432001f49Smrg cat conftest.$ac_ext >&5 383532001f49Smrg fi 383632001f49Smrg rm -rf conftest* conftst* 383732001f49Smrg 383832001f49Smrg # Do not use the global_symbol_pipe unless it works. 383932001f49Smrg if test "$pipe_works" = yes; then 384032001f49Smrg break 384132001f49Smrg else 384232001f49Smrg lt_cv_sys_global_symbol_pipe= 384332001f49Smrg fi 384432001f49Smrgdone 384532001f49Smrg]) 384632001f49Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 384732001f49Smrg lt_cv_sys_global_symbol_to_cdecl= 384832001f49Smrgfi 384932001f49Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 385032001f49Smrg AC_MSG_RESULT(failed) 385132001f49Smrgelse 385232001f49Smrg AC_MSG_RESULT(ok) 385332001f49Smrgfi 385432001f49Smrg 385532001f49Smrg# Response file support. 385632001f49Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 385732001f49Smrg nm_file_list_spec='@' 385832001f49Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 385932001f49Smrg nm_file_list_spec='@' 386032001f49Smrgfi 386132001f49Smrg 386232001f49Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 386332001f49Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 386432001f49Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 386532001f49Smrg [Transform the output of nm in a proper C declaration]) 386632001f49Smrg_LT_DECL([global_symbol_to_c_name_address], 386732001f49Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 386832001f49Smrg [Transform the output of nm in a C name address pair]) 386932001f49Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 387032001f49Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 387132001f49Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 387232001f49Smrg_LT_DECL([], [nm_file_list_spec], [1], 387332001f49Smrg [Specify filename containing input files for $NM]) 387432001f49Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 387532001f49Smrg 387632001f49Smrg 387732001f49Smrg# _LT_COMPILER_PIC([TAGNAME]) 387832001f49Smrg# --------------------------- 387932001f49Smrgm4_defun([_LT_COMPILER_PIC], 388032001f49Smrg[m4_require([_LT_TAG_COMPILER])dnl 388132001f49Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 388232001f49Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 388332001f49Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 388432001f49Smrg 388532001f49Smrgm4_if([$1], [CXX], [ 388632001f49Smrg # C++ specific cases for pic, static, wl, etc. 388732001f49Smrg if test "$GXX" = yes; then 388832001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 388932001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 389032001f49Smrg 389132001f49Smrg case $host_os in 389232001f49Smrg aix*) 389332001f49Smrg # All AIX code is PIC. 389432001f49Smrg if test "$host_cpu" = ia64; then 389532001f49Smrg # AIX 5 now supports IA64 processor 389632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 389732001f49Smrg fi 389832001f49Smrg ;; 389932001f49Smrg 390032001f49Smrg amigaos*) 390132001f49Smrg case $host_cpu in 390232001f49Smrg powerpc) 390332001f49Smrg # see comment about AmigaOS4 .so support 390432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 390532001f49Smrg ;; 390632001f49Smrg m68k) 390732001f49Smrg # FIXME: we need at least 68020 code to build shared libraries, but 390832001f49Smrg # adding the `-m68020' flag to GCC prevents building anything better, 390932001f49Smrg # like `-m68040'. 391032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 391132001f49Smrg ;; 391232001f49Smrg esac 391332001f49Smrg ;; 391432001f49Smrg 391532001f49Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 391632001f49Smrg # PIC is the default for these OSes. 391732001f49Smrg ;; 391832001f49Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 391932001f49Smrg # This hack is so that the source file can tell whether it is being 392032001f49Smrg # built for inclusion in a dll (and should export symbols for example). 392132001f49Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 392232001f49Smrg # (--disable-auto-import) libraries 392332001f49Smrg m4_if([$1], [GCJ], [], 392432001f49Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 392532001f49Smrg ;; 392632001f49Smrg darwin* | rhapsody*) 392732001f49Smrg # PIC is the default on this platform 392832001f49Smrg # Common symbols not allowed in MH_DYLIB files 392932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 393032001f49Smrg ;; 393132001f49Smrg *djgpp*) 393232001f49Smrg # DJGPP does not support shared libraries at all 393332001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 393432001f49Smrg ;; 393532001f49Smrg haiku*) 393632001f49Smrg # PIC is the default for Haiku. 393732001f49Smrg # The "-static" flag exists, but is broken. 393832001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 393932001f49Smrg ;; 394032001f49Smrg interix[[3-9]]*) 394132001f49Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 394232001f49Smrg # Instead, we relocate shared libraries at runtime. 394332001f49Smrg ;; 394432001f49Smrg sysv4*MP*) 394532001f49Smrg if test -d /usr/nec; then 394632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 394732001f49Smrg fi 394832001f49Smrg ;; 394932001f49Smrg hpux*) 395032001f49Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 395132001f49Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 395232001f49Smrg # sets the default TLS model and affects inlining. 395332001f49Smrg case $host_cpu in 395432001f49Smrg hppa*64*) 395532001f49Smrg ;; 395632001f49Smrg *) 395732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 395832001f49Smrg ;; 395932001f49Smrg esac 396032001f49Smrg ;; 396132001f49Smrg *qnx* | *nto*) 396232001f49Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 396332001f49Smrg # it will coredump. 396432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 396532001f49Smrg ;; 396632001f49Smrg *) 396732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396832001f49Smrg ;; 396932001f49Smrg esac 397032001f49Smrg else 397132001f49Smrg case $host_os in 397232001f49Smrg aix[[4-9]]*) 397332001f49Smrg # All AIX code is PIC. 397432001f49Smrg if test "$host_cpu" = ia64; then 397532001f49Smrg # AIX 5 now supports IA64 processor 397632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 397732001f49Smrg else 397832001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 397932001f49Smrg fi 398032001f49Smrg ;; 398132001f49Smrg chorus*) 398232001f49Smrg case $cc_basename in 398332001f49Smrg cxch68*) 398432001f49Smrg # Green Hills C++ Compiler 398532001f49Smrg # _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" 398632001f49Smrg ;; 398732001f49Smrg esac 398832001f49Smrg ;; 398932001f49Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 399032001f49Smrg # This hack is so that the source file can tell whether it is being 399132001f49Smrg # built for inclusion in a dll (and should export symbols for example). 399232001f49Smrg m4_if([$1], [GCJ], [], 399332001f49Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 399432001f49Smrg ;; 399532001f49Smrg dgux*) 399632001f49Smrg case $cc_basename in 399732001f49Smrg ec++*) 399832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 399932001f49Smrg ;; 400032001f49Smrg ghcx*) 400132001f49Smrg # Green Hills C++ Compiler 400232001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 400332001f49Smrg ;; 400432001f49Smrg *) 400532001f49Smrg ;; 400632001f49Smrg esac 400732001f49Smrg ;; 400832001f49Smrg freebsd* | dragonfly*) 400932001f49Smrg # FreeBSD uses GNU C++ 401032001f49Smrg ;; 401132001f49Smrg hpux9* | hpux10* | hpux11*) 401232001f49Smrg case $cc_basename in 401332001f49Smrg CC*) 401432001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 401532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 401632001f49Smrg if test "$host_cpu" != ia64; then 401732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 401832001f49Smrg fi 401932001f49Smrg ;; 402032001f49Smrg aCC*) 402132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 402232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 402332001f49Smrg case $host_cpu in 402432001f49Smrg hppa*64*|ia64*) 402532001f49Smrg # +Z the default 402632001f49Smrg ;; 402732001f49Smrg *) 402832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 402932001f49Smrg ;; 403032001f49Smrg esac 403132001f49Smrg ;; 403232001f49Smrg *) 403332001f49Smrg ;; 403432001f49Smrg esac 403532001f49Smrg ;; 403632001f49Smrg interix*) 403732001f49Smrg # This is c89, which is MS Visual C++ (no shared libs) 403832001f49Smrg # Anyone wants to do a port? 403932001f49Smrg ;; 404032001f49Smrg irix5* | irix6* | nonstopux*) 404132001f49Smrg case $cc_basename in 404232001f49Smrg CC*) 404332001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 404432001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 404532001f49Smrg # CC pic flag -KPIC is the default. 404632001f49Smrg ;; 404732001f49Smrg *) 404832001f49Smrg ;; 404932001f49Smrg esac 405032001f49Smrg ;; 405132001f49Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 405232001f49Smrg case $cc_basename in 405332001f49Smrg KCC*) 405432001f49Smrg # KAI C++ Compiler 405532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 405632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 405732001f49Smrg ;; 405832001f49Smrg ecpc* ) 405932001f49Smrg # old Intel C++ for x86_64 which still supported -KPIC. 406032001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 406132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 406232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 406332001f49Smrg ;; 406432001f49Smrg icpc* ) 406532001f49Smrg # Intel C++, used to be incompatible with GCC. 406632001f49Smrg # ICC 10 doesn't accept -KPIC any more. 406732001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 406832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 406932001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 407032001f49Smrg ;; 407132001f49Smrg pgCC* | pgcpp*) 407232001f49Smrg # Portland Group C++ compiler 407332001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 407432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 407532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 407632001f49Smrg ;; 407732001f49Smrg cxx*) 407832001f49Smrg # Compaq C++ 407932001f49Smrg # Make sure the PIC flag is empty. It appears that all Alpha 408032001f49Smrg # Linux and Compaq Tru64 Unix objects are PIC. 408132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 408232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 408332001f49Smrg ;; 408432001f49Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 408532001f49Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 408632001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 408732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 408832001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 408932001f49Smrg ;; 409032001f49Smrg *) 409132001f49Smrg case `$CC -V 2>&1 | sed 5q` in 409232001f49Smrg *Sun\ C*) 409332001f49Smrg # Sun C++ 5.9 409432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 409532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 409632001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 409732001f49Smrg ;; 409832001f49Smrg esac 409932001f49Smrg ;; 410032001f49Smrg esac 410132001f49Smrg ;; 410232001f49Smrg lynxos*) 410332001f49Smrg ;; 410432001f49Smrg m88k*) 410532001f49Smrg ;; 410632001f49Smrg mvs*) 410732001f49Smrg case $cc_basename in 410832001f49Smrg cxx*) 410932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 411032001f49Smrg ;; 411132001f49Smrg *) 411232001f49Smrg ;; 411332001f49Smrg esac 411432001f49Smrg ;; 411532001f49Smrg netbsd* | netbsdelf*-gnu) 411632001f49Smrg ;; 411732001f49Smrg *qnx* | *nto*) 411832001f49Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 411932001f49Smrg # it will coredump. 412032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 412132001f49Smrg ;; 412232001f49Smrg osf3* | osf4* | osf5*) 412332001f49Smrg case $cc_basename in 412432001f49Smrg KCC*) 412532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 412632001f49Smrg ;; 412732001f49Smrg RCC*) 412832001f49Smrg # Rational C++ 2.4.1 412932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 413032001f49Smrg ;; 413132001f49Smrg cxx*) 413232001f49Smrg # Digital/Compaq C++ 413332001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 413432001f49Smrg # Make sure the PIC flag is empty. It appears that all Alpha 413532001f49Smrg # Linux and Compaq Tru64 Unix objects are PIC. 413632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 413732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 413832001f49Smrg ;; 413932001f49Smrg *) 414032001f49Smrg ;; 414132001f49Smrg esac 414232001f49Smrg ;; 414332001f49Smrg psos*) 414432001f49Smrg ;; 414532001f49Smrg solaris*) 414632001f49Smrg case $cc_basename in 414732001f49Smrg CC* | sunCC*) 414832001f49Smrg # Sun C++ 4.2, 5.x and Centerline C++ 414932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 415032001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 415132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 415232001f49Smrg ;; 415332001f49Smrg gcx*) 415432001f49Smrg # Green Hills C++ Compiler 415532001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 415632001f49Smrg ;; 415732001f49Smrg *) 415832001f49Smrg ;; 415932001f49Smrg esac 416032001f49Smrg ;; 416132001f49Smrg sunos4*) 416232001f49Smrg case $cc_basename in 416332001f49Smrg CC*) 416432001f49Smrg # Sun C++ 4.x 416532001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 416632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 416732001f49Smrg ;; 416832001f49Smrg lcc*) 416932001f49Smrg # Lucid 417032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 417132001f49Smrg ;; 417232001f49Smrg *) 417332001f49Smrg ;; 417432001f49Smrg esac 417532001f49Smrg ;; 417632001f49Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 417732001f49Smrg case $cc_basename in 417832001f49Smrg CC*) 417932001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 418032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 418132001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 418232001f49Smrg ;; 418332001f49Smrg esac 418432001f49Smrg ;; 418532001f49Smrg tandem*) 418632001f49Smrg case $cc_basename in 418732001f49Smrg NCC*) 418832001f49Smrg # NonStop-UX NCC 3.20 418932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 419032001f49Smrg ;; 419132001f49Smrg *) 419232001f49Smrg ;; 419332001f49Smrg esac 419432001f49Smrg ;; 419532001f49Smrg vxworks*) 419632001f49Smrg ;; 419732001f49Smrg *) 419832001f49Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 419932001f49Smrg ;; 420032001f49Smrg esac 420132001f49Smrg fi 420232001f49Smrg], 420332001f49Smrg[ 420432001f49Smrg if test "$GCC" = yes; then 420532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 420632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 420732001f49Smrg 420832001f49Smrg case $host_os in 420932001f49Smrg aix*) 421032001f49Smrg # All AIX code is PIC. 421132001f49Smrg if test "$host_cpu" = ia64; then 421232001f49Smrg # AIX 5 now supports IA64 processor 421332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 421432001f49Smrg fi 421532001f49Smrg ;; 421632001f49Smrg 421732001f49Smrg amigaos*) 421832001f49Smrg case $host_cpu in 421932001f49Smrg powerpc) 422032001f49Smrg # see comment about AmigaOS4 .so support 422132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 422232001f49Smrg ;; 422332001f49Smrg m68k) 422432001f49Smrg # FIXME: we need at least 68020 code to build shared libraries, but 422532001f49Smrg # adding the `-m68020' flag to GCC prevents building anything better, 422632001f49Smrg # like `-m68040'. 422732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 422832001f49Smrg ;; 422932001f49Smrg esac 423032001f49Smrg ;; 423132001f49Smrg 423232001f49Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 423332001f49Smrg # PIC is the default for these OSes. 423432001f49Smrg ;; 423532001f49Smrg 423632001f49Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 423732001f49Smrg # This hack is so that the source file can tell whether it is being 423832001f49Smrg # built for inclusion in a dll (and should export symbols for example). 423932001f49Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 424032001f49Smrg # (--disable-auto-import) libraries 424132001f49Smrg m4_if([$1], [GCJ], [], 424232001f49Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 424332001f49Smrg ;; 424432001f49Smrg 424532001f49Smrg darwin* | rhapsody*) 424632001f49Smrg # PIC is the default on this platform 424732001f49Smrg # Common symbols not allowed in MH_DYLIB files 424832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 424932001f49Smrg ;; 425032001f49Smrg 425132001f49Smrg haiku*) 425232001f49Smrg # PIC is the default for Haiku. 425332001f49Smrg # The "-static" flag exists, but is broken. 425432001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 425532001f49Smrg ;; 425632001f49Smrg 425732001f49Smrg hpux*) 425832001f49Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 425932001f49Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 426032001f49Smrg # sets the default TLS model and affects inlining. 426132001f49Smrg case $host_cpu in 426232001f49Smrg hppa*64*) 426332001f49Smrg # +Z the default 426432001f49Smrg ;; 426532001f49Smrg *) 426632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 426732001f49Smrg ;; 426832001f49Smrg esac 426932001f49Smrg ;; 427032001f49Smrg 427132001f49Smrg interix[[3-9]]*) 427232001f49Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 427332001f49Smrg # Instead, we relocate shared libraries at runtime. 427432001f49Smrg ;; 427532001f49Smrg 427632001f49Smrg msdosdjgpp*) 427732001f49Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 427832001f49Smrg # on systems that don't support them. 427932001f49Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 428032001f49Smrg enable_shared=no 428132001f49Smrg ;; 428232001f49Smrg 428332001f49Smrg *nto* | *qnx*) 428432001f49Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 428532001f49Smrg # it will coredump. 428632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 428732001f49Smrg ;; 428832001f49Smrg 428932001f49Smrg sysv4*MP*) 429032001f49Smrg if test -d /usr/nec; then 429132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 429232001f49Smrg fi 429332001f49Smrg ;; 429432001f49Smrg 429532001f49Smrg *) 429632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429732001f49Smrg ;; 429832001f49Smrg esac 429932001f49Smrg 430032001f49Smrg case $cc_basename in 430132001f49Smrg nvcc*) # Cuda Compiler Driver 2.2 430232001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 430332001f49Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 430432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 430532001f49Smrg fi 430632001f49Smrg ;; 430732001f49Smrg esac 430832001f49Smrg else 430932001f49Smrg # PORTME Check for flag to pass linker flags through the system compiler. 431032001f49Smrg case $host_os in 431132001f49Smrg aix*) 431232001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 431332001f49Smrg if test "$host_cpu" = ia64; then 431432001f49Smrg # AIX 5 now supports IA64 processor 431532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 431632001f49Smrg else 431732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431832001f49Smrg fi 431932001f49Smrg ;; 432032001f49Smrg 432132001f49Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 432232001f49Smrg # This hack is so that the source file can tell whether it is being 432332001f49Smrg # built for inclusion in a dll (and should export symbols for example). 432432001f49Smrg m4_if([$1], [GCJ], [], 432532001f49Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 432632001f49Smrg ;; 432732001f49Smrg 432832001f49Smrg hpux9* | hpux10* | hpux11*) 432932001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 433032001f49Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 433132001f49Smrg # not for PA HP-UX. 433232001f49Smrg case $host_cpu in 433332001f49Smrg hppa*64*|ia64*) 433432001f49Smrg # +Z the default 433532001f49Smrg ;; 433632001f49Smrg *) 433732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 433832001f49Smrg ;; 433932001f49Smrg esac 434032001f49Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 434132001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 434232001f49Smrg ;; 434332001f49Smrg 434432001f49Smrg irix5* | irix6* | nonstopux*) 434532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 434632001f49Smrg # PIC (with -KPIC) is the default. 434732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 434832001f49Smrg ;; 434932001f49Smrg 435032001f49Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 435132001f49Smrg case $cc_basename in 435232001f49Smrg # old Intel for x86_64 which still supported -KPIC. 435332001f49Smrg ecc*) 435432001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435532001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 435632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 435732001f49Smrg ;; 435832001f49Smrg # icc used to be incompatible with GCC. 435932001f49Smrg # ICC 10 doesn't accept -KPIC any more. 436032001f49Smrg icc* | ifort*) 436132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436232001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 436332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 436432001f49Smrg ;; 436532001f49Smrg # Lahey Fortran 8.1. 436632001f49Smrg lf95*) 436732001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 436932001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 437032001f49Smrg ;; 437132001f49Smrg nagfor*) 437232001f49Smrg # NAG Fortran compiler 437332001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 437432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 437532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 437632001f49Smrg ;; 437732001f49Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 437832001f49Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 437932001f49Smrg # which looks to be a dead project) 438032001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 438232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 438332001f49Smrg ;; 438432001f49Smrg ccc*) 438532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438632001f49Smrg # All Alpha code is PIC. 438732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 438832001f49Smrg ;; 438932001f49Smrg xl* | bgxl* | bgf* | mpixl*) 439032001f49Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 439132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439232001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 439332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 439432001f49Smrg ;; 439532001f49Smrg *) 439632001f49Smrg case `$CC -V 2>&1 | sed 5q` in 439732001f49Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 439832001f49Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 439932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440032001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 440232001f49Smrg ;; 440332001f49Smrg *Sun\ F* | *Sun*Fortran*) 440432001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440532001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440632001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 440732001f49Smrg ;; 440832001f49Smrg *Sun\ C*) 440932001f49Smrg # Sun C 5.9 441032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441132001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441232001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441332001f49Smrg ;; 441432001f49Smrg *Intel*\ [[CF]]*Compiler*) 441532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441632001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 441732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 441832001f49Smrg ;; 441932001f49Smrg *Portland\ Group*) 442032001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 442232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442332001f49Smrg ;; 442432001f49Smrg esac 442532001f49Smrg ;; 442632001f49Smrg esac 442732001f49Smrg ;; 442832001f49Smrg 442932001f49Smrg newsos6) 443032001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 443132001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443232001f49Smrg ;; 443332001f49Smrg 443432001f49Smrg *nto* | *qnx*) 443532001f49Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 443632001f49Smrg # it will coredump. 443732001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 443832001f49Smrg ;; 443932001f49Smrg 444032001f49Smrg osf3* | osf4* | osf5*) 444132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 444232001f49Smrg # All OSF/1 code is PIC. 444332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 444432001f49Smrg ;; 444532001f49Smrg 444632001f49Smrg rdos*) 444732001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 444832001f49Smrg ;; 444932001f49Smrg 445032001f49Smrg solaris*) 445132001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 445232001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 445332001f49Smrg case $cc_basename in 445432001f49Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 445532001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 445632001f49Smrg *) 445732001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 445832001f49Smrg esac 445932001f49Smrg ;; 446032001f49Smrg 446132001f49Smrg sunos4*) 446232001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 446332001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 446432001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 446532001f49Smrg ;; 446632001f49Smrg 446732001f49Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 446832001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 446932001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 447032001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 447132001f49Smrg ;; 447232001f49Smrg 447332001f49Smrg sysv4*MP*) 447432001f49Smrg if test -d /usr/nec ;then 447532001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 447632001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 447732001f49Smrg fi 447832001f49Smrg ;; 447932001f49Smrg 448032001f49Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 448132001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 448232001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448432001f49Smrg ;; 448532001f49Smrg 448632001f49Smrg unicos*) 448732001f49Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 448832001f49Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 448932001f49Smrg ;; 449032001f49Smrg 449132001f49Smrg uts4*) 449232001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 449332001f49Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449432001f49Smrg ;; 449532001f49Smrg 449632001f49Smrg *) 449732001f49Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 449832001f49Smrg ;; 449932001f49Smrg esac 450032001f49Smrg fi 450132001f49Smrg]) 450232001f49Smrgcase $host_os in 450332001f49Smrg # For platforms which do not support PIC, -DPIC is meaningless: 450432001f49Smrg *djgpp*) 450532001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 450632001f49Smrg ;; 450732001f49Smrg *) 450832001f49Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 450932001f49Smrg ;; 451032001f49Smrgesac 451132001f49Smrg 451232001f49SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 451332001f49Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 451432001f49Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 451532001f49Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 451632001f49Smrg 451732001f49Smrg# 451832001f49Smrg# Check to make sure the PIC flag actually works. 451932001f49Smrg# 452032001f49Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 452132001f49Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 452232001f49Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 452332001f49Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 452432001f49Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 452532001f49Smrg "" | " "*) ;; 452632001f49Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 452732001f49Smrg esac], 452832001f49Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 452932001f49Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 453032001f49Smrgfi 453132001f49Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 453232001f49Smrg [Additional compiler flags for building library objects]) 453332001f49Smrg 453432001f49Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 453532001f49Smrg [How to pass a linker flag through the compiler]) 453632001f49Smrg# 453732001f49Smrg# Check to make sure the static flag actually works. 453832001f49Smrg# 453932001f49Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 454032001f49Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 454132001f49Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 454232001f49Smrg $lt_tmp_static_flag, 454332001f49Smrg [], 454432001f49Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 454532001f49Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 454632001f49Smrg [Compiler flag to prevent dynamic linking]) 454732001f49Smrg])# _LT_COMPILER_PIC 454832001f49Smrg 454932001f49Smrg 455032001f49Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 455132001f49Smrg# ---------------------------- 455232001f49Smrg# See if the linker supports building shared libraries. 455332001f49Smrgm4_defun([_LT_LINKER_SHLIBS], 455432001f49Smrg[AC_REQUIRE([LT_PATH_LD])dnl 455532001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl 455632001f49Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 455732001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 455832001f49Smrgm4_require([_LT_DECL_EGREP])dnl 455932001f49Smrgm4_require([_LT_DECL_SED])dnl 456032001f49Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 456132001f49Smrgm4_require([_LT_TAG_COMPILER])dnl 456232001f49SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 456332001f49Smrgm4_if([$1], [CXX], [ 456432001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 456532001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 456632001f49Smrg case $host_os in 456732001f49Smrg aix[[4-9]]*) 456832001f49Smrg # If we're using GNU nm, then we don't want the "-C" option. 456932001f49Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 457032001f49Smrg # Also, AIX nm treats weak defined symbols like other global defined 457132001f49Smrg # symbols, whereas GNU nm marks them as "W". 457232001f49Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 457332001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 457432001f49Smrg else 457532001f49Smrg _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' 457632001f49Smrg fi 457732001f49Smrg ;; 457832001f49Smrg pw32*) 457932001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 458032001f49Smrg ;; 458132001f49Smrg cygwin* | mingw* | cegcc*) 458232001f49Smrg case $cc_basename in 458332001f49Smrg cl*) 458432001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 458532001f49Smrg ;; 458632001f49Smrg *) 458732001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 458832001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 458932001f49Smrg ;; 459032001f49Smrg esac 459132001f49Smrg ;; 459232001f49Smrg linux* | k*bsd*-gnu | gnu*) 459332001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 459432001f49Smrg ;; 459532001f49Smrg *) 459632001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 459732001f49Smrg ;; 459832001f49Smrg esac 459932001f49Smrg], [ 460032001f49Smrg runpath_var= 460132001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 460232001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=no 460332001f49Smrg _LT_TAGVAR(archive_cmds, $1)= 460432001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 460532001f49Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 460632001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 460732001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 460832001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 460932001f49Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 461032001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 461132001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 461232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 461332001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 461432001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 461532001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 461632001f49Smrg _LT_TAGVAR(inherit_rpath, $1)=no 461732001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 461832001f49Smrg _LT_TAGVAR(module_cmds, $1)= 461932001f49Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 462032001f49Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 462132001f49Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 462232001f49Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 462332001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 462432001f49Smrg # include_expsyms should be a list of space-separated symbols to be *always* 462532001f49Smrg # included in the symbol list 462632001f49Smrg _LT_TAGVAR(include_expsyms, $1)= 462732001f49Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 462832001f49Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 462932001f49Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 463032001f49Smrg # as well as any symbol that contains `d'. 463132001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 463232001f49Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 463332001f49Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 463432001f49Smrg # the symbol is explicitly referenced. Since portable code cannot 463532001f49Smrg # rely on this symbol name, it's probably fine to never include it in 463632001f49Smrg # preloaded symbol tables. 463732001f49Smrg # Exclude shared library initialization/finalization symbols. 463832001f49Smrgdnl Note also adjust exclude_expsyms for C++ above. 463932001f49Smrg extract_expsyms_cmds= 464032001f49Smrg 464132001f49Smrg case $host_os in 464232001f49Smrg cygwin* | mingw* | pw32* | cegcc*) 464332001f49Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 464432001f49Smrg # When not using gcc, we currently assume that we are using 464532001f49Smrg # Microsoft Visual C++. 464632001f49Smrg if test "$GCC" != yes; then 464732001f49Smrg with_gnu_ld=no 464832001f49Smrg fi 464932001f49Smrg ;; 465032001f49Smrg interix*) 465132001f49Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 465232001f49Smrg with_gnu_ld=yes 465332001f49Smrg ;; 465432001f49Smrg openbsd*) 465532001f49Smrg with_gnu_ld=no 465632001f49Smrg ;; 465732001f49Smrg linux* | k*bsd*-gnu | gnu*) 465832001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 465932001f49Smrg ;; 466032001f49Smrg esac 466132001f49Smrg 466232001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 466332001f49Smrg 466432001f49Smrg # On some targets, GNU ld is compatible enough with the native linker 466532001f49Smrg # that we're better off using the native interface for both. 466632001f49Smrg lt_use_gnu_ld_interface=no 466732001f49Smrg if test "$with_gnu_ld" = yes; then 466832001f49Smrg case $host_os in 466932001f49Smrg aix*) 467032001f49Smrg # The AIX port of GNU ld has always aspired to compatibility 467132001f49Smrg # with the native linker. However, as the warning in the GNU ld 467232001f49Smrg # block says, versions before 2.19.5* couldn't really create working 467332001f49Smrg # shared libraries, regardless of the interface used. 467432001f49Smrg case `$LD -v 2>&1` in 467532001f49Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 467632001f49Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 467732001f49Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 467832001f49Smrg *) 467932001f49Smrg lt_use_gnu_ld_interface=yes 468032001f49Smrg ;; 468132001f49Smrg esac 468232001f49Smrg ;; 468332001f49Smrg *) 468432001f49Smrg lt_use_gnu_ld_interface=yes 468532001f49Smrg ;; 468632001f49Smrg esac 468732001f49Smrg fi 468832001f49Smrg 468932001f49Smrg if test "$lt_use_gnu_ld_interface" = yes; then 469032001f49Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 469132001f49Smrg wlarc='${wl}' 469232001f49Smrg 469332001f49Smrg # Set some defaults for GNU ld with shared library support. These 469432001f49Smrg # are reset later if shared libraries are not supported. Putting them 469532001f49Smrg # here allows them to be overridden if necessary. 469632001f49Smrg runpath_var=LD_RUN_PATH 469732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 469832001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 469932001f49Smrg # ancient GNU ld didn't support --whole-archive et. al. 470032001f49Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 470132001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 470232001f49Smrg else 470332001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 470432001f49Smrg fi 470532001f49Smrg supports_anon_versioning=no 470632001f49Smrg case `$LD -v 2>&1` in 470732001f49Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 470832001f49Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 470932001f49Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 471032001f49Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 471132001f49Smrg *\ 2.11.*) ;; # other 2.11 versions 471232001f49Smrg *) supports_anon_versioning=yes ;; 471332001f49Smrg esac 471432001f49Smrg 471532001f49Smrg # See if GNU ld supports shared libraries. 471632001f49Smrg case $host_os in 471732001f49Smrg aix[[3-9]]*) 471832001f49Smrg # On AIX/PPC, the GNU linker is very broken 471932001f49Smrg if test "$host_cpu" != ia64; then 472032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 472132001f49Smrg cat <<_LT_EOF 1>&2 472232001f49Smrg 472332001f49Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 472432001f49Smrg*** to be unable to reliably create shared libraries on AIX. 472532001f49Smrg*** Therefore, libtool is disabling shared libraries support. If you 472632001f49Smrg*** really care for shared libraries, you may want to install binutils 472732001f49Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 472832001f49Smrg*** You will then need to restart the configuration process. 472932001f49Smrg 473032001f49Smrg_LT_EOF 473132001f49Smrg fi 473232001f49Smrg ;; 473332001f49Smrg 473432001f49Smrg amigaos*) 473532001f49Smrg case $host_cpu in 473632001f49Smrg powerpc) 473732001f49Smrg # see comment about AmigaOS4 .so support 473832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 473932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 474032001f49Smrg ;; 474132001f49Smrg m68k) 474232001f49Smrg _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)' 474332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 474432001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 474532001f49Smrg ;; 474632001f49Smrg esac 474732001f49Smrg ;; 474832001f49Smrg 474932001f49Smrg beos*) 475032001f49Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 475132001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 475232001f49Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 475332001f49Smrg # support --undefined. This deserves some investigation. FIXME 475432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 475532001f49Smrg else 475632001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 475732001f49Smrg fi 475832001f49Smrg ;; 475932001f49Smrg 476032001f49Smrg cygwin* | mingw* | pw32* | cegcc*) 476132001f49Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 476232001f49Smrg # as there is no search path for DLLs. 476332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 476432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 476532001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 476632001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=no 476732001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 476832001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 476932001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 477032001f49Smrg 477132001f49Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 477232001f49Smrg _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' 477332001f49Smrg # If the export-symbols file already is a .def file (1st line 477432001f49Smrg # is EXPORTS), use it as is; otherwise, prepend... 477532001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 477632001f49Smrg cp $export_symbols $output_objdir/$soname.def; 477732001f49Smrg else 477832001f49Smrg echo EXPORTS > $output_objdir/$soname.def; 477932001f49Smrg cat $export_symbols >> $output_objdir/$soname.def; 478032001f49Smrg fi~ 478132001f49Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 478232001f49Smrg else 478332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 478432001f49Smrg fi 478532001f49Smrg ;; 478632001f49Smrg 478732001f49Smrg haiku*) 478832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 478932001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 479032001f49Smrg ;; 479132001f49Smrg 479232001f49Smrg interix[[3-9]]*) 479332001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 479432001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 479532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 479632001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 479732001f49Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 479832001f49Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 479932001f49Smrg # default) and relocated if they conflict, which is a slow very memory 480032001f49Smrg # consuming and fragmenting process. To avoid this, we pick a random, 480132001f49Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 480232001f49Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 480332001f49Smrg _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' 480432001f49Smrg _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' 480532001f49Smrg ;; 480632001f49Smrg 480732001f49Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 480832001f49Smrg tmp_diet=no 480932001f49Smrg if test "$host_os" = linux-dietlibc; then 481032001f49Smrg case $cc_basename in 481132001f49Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 481232001f49Smrg esac 481332001f49Smrg fi 481432001f49Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 481532001f49Smrg && test "$tmp_diet" = no 481632001f49Smrg then 481732001f49Smrg tmp_addflag=' $pic_flag' 481832001f49Smrg tmp_sharedflag='-shared' 481932001f49Smrg case $cc_basename,$host_cpu in 482032001f49Smrg pgcc*) # Portland Group C compiler 482132001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 482232001f49Smrg tmp_addflag=' $pic_flag' 482332001f49Smrg ;; 482432001f49Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 482532001f49Smrg # Portland Group f77 and f90 compilers 482632001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 482732001f49Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 482832001f49Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 482932001f49Smrg tmp_addflag=' -i_dynamic' ;; 483032001f49Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 483132001f49Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 483232001f49Smrg ifc* | ifort*) # Intel Fortran compiler 483332001f49Smrg tmp_addflag=' -nofor_main' ;; 483432001f49Smrg lf95*) # Lahey Fortran 8.1 483532001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 483632001f49Smrg tmp_sharedflag='--shared' ;; 483732001f49Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 483832001f49Smrg tmp_sharedflag='-qmkshrobj' 483932001f49Smrg tmp_addflag= ;; 484032001f49Smrg nvcc*) # Cuda Compiler Driver 2.2 484132001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 484232001f49Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 484332001f49Smrg ;; 484432001f49Smrg esac 484532001f49Smrg case `$CC -V 2>&1 | sed 5q` in 484632001f49Smrg *Sun\ C*) # Sun C 5.9 484732001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 484832001f49Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 484932001f49Smrg tmp_sharedflag='-G' ;; 485032001f49Smrg *Sun\ F*) # Sun Fortran 8.3 485132001f49Smrg tmp_sharedflag='-G' ;; 485232001f49Smrg esac 485332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 485432001f49Smrg 485532001f49Smrg if test "x$supports_anon_versioning" = xyes; then 485632001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 485732001f49Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 485832001f49Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 485932001f49Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 486032001f49Smrg fi 486132001f49Smrg 486232001f49Smrg case $cc_basename in 486332001f49Smrg xlf* | bgf* | bgxlf* | mpixlf*) 486432001f49Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 486532001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 486632001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 486732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 486832001f49Smrg if test "x$supports_anon_versioning" = xyes; then 486932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 487032001f49Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 487132001f49Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 487232001f49Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 487332001f49Smrg fi 487432001f49Smrg ;; 487532001f49Smrg esac 487632001f49Smrg else 487732001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 487832001f49Smrg fi 487932001f49Smrg ;; 488032001f49Smrg 488132001f49Smrg netbsd* | netbsdelf*-gnu) 488232001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 488332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 488432001f49Smrg wlarc= 488532001f49Smrg else 488632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 488732001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 488832001f49Smrg fi 488932001f49Smrg ;; 489032001f49Smrg 489132001f49Smrg solaris*) 489232001f49Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 489332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 489432001f49Smrg cat <<_LT_EOF 1>&2 489532001f49Smrg 489632001f49Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 489732001f49Smrg*** create shared libraries on Solaris systems. Therefore, libtool 489832001f49Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 489932001f49Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 490032001f49Smrg*** your PATH or compiler configuration so that the native linker is 490132001f49Smrg*** used, and then restart. 490232001f49Smrg 490332001f49Smrg_LT_EOF 490432001f49Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 490532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 490632001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 490732001f49Smrg else 490832001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 490932001f49Smrg fi 491032001f49Smrg ;; 491132001f49Smrg 491232001f49Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 491332001f49Smrg case `$LD -v 2>&1` in 491432001f49Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 491532001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 491632001f49Smrg cat <<_LT_EOF 1>&2 491732001f49Smrg 491832001f49Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 491932001f49Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 492032001f49Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 492132001f49Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 492232001f49Smrg*** your PATH or compiler configuration so that the native linker is 492332001f49Smrg*** used, and then restart. 492432001f49Smrg 492532001f49Smrg_LT_EOF 492632001f49Smrg ;; 492732001f49Smrg *) 492832001f49Smrg # For security reasons, it is highly recommended that you always 492932001f49Smrg # use absolute paths for naming shared libraries, and exclude the 493032001f49Smrg # DT_RUNPATH tag from executables and libraries. But doing so 493132001f49Smrg # requires that you compile everything twice, which is a pain. 493232001f49Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 493332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 493432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 493532001f49Smrg _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' 493632001f49Smrg else 493732001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 493832001f49Smrg fi 493932001f49Smrg ;; 494032001f49Smrg esac 494132001f49Smrg ;; 494232001f49Smrg 494332001f49Smrg sunos4*) 494432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 494532001f49Smrg wlarc= 494632001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 494732001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 494832001f49Smrg ;; 494932001f49Smrg 495032001f49Smrg *) 495132001f49Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 495232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 495332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 495432001f49Smrg else 495532001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 495632001f49Smrg fi 495732001f49Smrg ;; 495832001f49Smrg esac 495932001f49Smrg 496032001f49Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 496132001f49Smrg runpath_var= 496232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 496332001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 496432001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 496532001f49Smrg fi 496632001f49Smrg else 496732001f49Smrg # PORTME fill in a description of your system's linker (not GNU ld) 496832001f49Smrg case $host_os in 496932001f49Smrg aix3*) 497032001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 497132001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 497232001f49Smrg _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' 497332001f49Smrg # Note: this linker hardcodes the directories in LIBPATH if there 497432001f49Smrg # are no directories specified by -L. 497532001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 497632001f49Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 497732001f49Smrg # Neither direct hardcoding nor static linking is supported with a 497832001f49Smrg # broken collect2. 497932001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 498032001f49Smrg fi 498132001f49Smrg ;; 498232001f49Smrg 498332001f49Smrg aix[[4-9]]*) 498432001f49Smrg if test "$host_cpu" = ia64; then 498532001f49Smrg # On IA64, the linker does run time linking by default, so we don't 498632001f49Smrg # have to do anything special. 498732001f49Smrg aix_use_runtimelinking=no 498832001f49Smrg exp_sym_flag='-Bexport' 498932001f49Smrg no_entry_flag="" 499032001f49Smrg else 499132001f49Smrg # If we're using GNU nm, then we don't want the "-C" option. 499232001f49Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 499332001f49Smrg # Also, AIX nm treats weak defined symbols like other global 499432001f49Smrg # defined symbols, whereas GNU nm marks them as "W". 499532001f49Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 499632001f49Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 499732001f49Smrg else 499832001f49Smrg _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' 499932001f49Smrg fi 500032001f49Smrg aix_use_runtimelinking=no 500132001f49Smrg 500232001f49Smrg # Test if we are trying to use run time linking or normal 500332001f49Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 500432001f49Smrg # need to do runtime linking. 500532001f49Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 500632001f49Smrg for ld_flag in $LDFLAGS; do 500732001f49Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 500832001f49Smrg aix_use_runtimelinking=yes 500932001f49Smrg break 501032001f49Smrg fi 501132001f49Smrg done 501232001f49Smrg ;; 501332001f49Smrg esac 501432001f49Smrg 501532001f49Smrg exp_sym_flag='-bexport' 501632001f49Smrg no_entry_flag='-bnoentry' 501732001f49Smrg fi 501832001f49Smrg 501932001f49Smrg # When large executables or shared objects are built, AIX ld can 502032001f49Smrg # have problems creating the table of contents. If linking a library 502132001f49Smrg # or program results in "error TOC overflow" add -mminimal-toc to 502232001f49Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 502332001f49Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 502432001f49Smrg 502532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='' 502632001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 502732001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 502832001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 502932001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 503032001f49Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 503132001f49Smrg 503232001f49Smrg if test "$GCC" = yes; then 503332001f49Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 503432001f49Smrg # We only want to do this on AIX 4.2 and lower, the check 503532001f49Smrg # below for broken collect2 doesn't work under 4.3+ 503632001f49Smrg collect2name=`${CC} -print-prog-name=collect2` 503732001f49Smrg if test -f "$collect2name" && 503832001f49Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 503932001f49Smrg then 504032001f49Smrg # We have reworked collect2 504132001f49Smrg : 504232001f49Smrg else 504332001f49Smrg # We have old collect2 504432001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 504532001f49Smrg # It fails to find uninstalled libraries when the uninstalled 504632001f49Smrg # path is not listed in the libpath. Setting hardcode_minus_L 504732001f49Smrg # to unsupported forces relinking 504832001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 504932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 505032001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 505132001f49Smrg fi 505232001f49Smrg ;; 505332001f49Smrg esac 505432001f49Smrg shared_flag='-shared' 505532001f49Smrg if test "$aix_use_runtimelinking" = yes; then 505632001f49Smrg shared_flag="$shared_flag "'${wl}-G' 505732001f49Smrg fi 505832001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 505932001f49Smrg else 506032001f49Smrg # not using gcc 506132001f49Smrg if test "$host_cpu" = ia64; then 506232001f49Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 506332001f49Smrg # chokes on -Wl,-G. The following line is correct: 506432001f49Smrg shared_flag='-G' 506532001f49Smrg else 506632001f49Smrg if test "$aix_use_runtimelinking" = yes; then 506732001f49Smrg shared_flag='${wl}-G' 506832001f49Smrg else 506932001f49Smrg shared_flag='${wl}-bM:SRE' 507032001f49Smrg fi 507132001f49Smrg fi 507232001f49Smrg fi 507332001f49Smrg 507432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 507532001f49Smrg # It seems that -bexpall does not export symbols beginning with 507632001f49Smrg # underscore (_), so it is better to generate a list of symbols to export. 507732001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 507832001f49Smrg if test "$aix_use_runtimelinking" = yes; then 507932001f49Smrg # Warning - without using the other runtime loading flags (-brtl), 508032001f49Smrg # -berok will link without error, but may produce a broken library. 508132001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 508232001f49Smrg # Determine the default libpath from the value encoded in an 508332001f49Smrg # empty executable. 508432001f49Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 508532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 508632001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 508732001f49Smrg else 508832001f49Smrg if test "$host_cpu" = ia64; then 508932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 509032001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 509132001f49Smrg _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" 509232001f49Smrg else 509332001f49Smrg # Determine the default libpath from the value encoded in an 509432001f49Smrg # empty executable. 509532001f49Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 509632001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 509732001f49Smrg # Warning - without using the other run time loading flags, 509832001f49Smrg # -berok will link without error, but may produce a broken library. 509932001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 510032001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 510132001f49Smrg if test "$with_gnu_ld" = yes; then 510232001f49Smrg # We only use this code for GNU lds that support --whole-archive. 510332001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 510432001f49Smrg else 510532001f49Smrg # Exported symbols can be pulled into shared objects from archives 510632001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 510732001f49Smrg fi 510832001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 510932001f49Smrg # This is similar to how AIX traditionally builds its shared libraries. 511032001f49Smrg _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' 511132001f49Smrg fi 511232001f49Smrg fi 511332001f49Smrg ;; 511432001f49Smrg 511532001f49Smrg amigaos*) 511632001f49Smrg case $host_cpu in 511732001f49Smrg powerpc) 511832001f49Smrg # see comment about AmigaOS4 .so support 511932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 512032001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 512132001f49Smrg ;; 512232001f49Smrg m68k) 512332001f49Smrg _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)' 512432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 512532001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 512632001f49Smrg ;; 512732001f49Smrg esac 512832001f49Smrg ;; 512932001f49Smrg 513032001f49Smrg bsdi[[45]]*) 513132001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 513232001f49Smrg ;; 513332001f49Smrg 513432001f49Smrg cygwin* | mingw* | pw32* | cegcc*) 513532001f49Smrg # When not using gcc, we currently assume that we are using 513632001f49Smrg # Microsoft Visual C++. 513732001f49Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 513832001f49Smrg # no search path for DLLs. 513932001f49Smrg case $cc_basename in 514032001f49Smrg cl*) 514132001f49Smrg # Native MSVC 514232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 514332001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 514432001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 514532001f49Smrg _LT_TAGVAR(file_list_spec, $1)='@' 514632001f49Smrg # Tell ltmain to make .lib files, not .a files. 514732001f49Smrg libext=lib 514832001f49Smrg # Tell ltmain to make .dll files, not .so files. 514932001f49Smrg shrext_cmds=".dll" 515032001f49Smrg # FIXME: Setting linknames here is a bad hack. 515132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 515232001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 515332001f49Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 515432001f49Smrg else 515532001f49Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 515632001f49Smrg fi~ 515732001f49Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 515832001f49Smrg linknames=' 515932001f49Smrg # The linker will not automatically build a static lib if we build a DLL. 516032001f49Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 516132001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 516232001f49Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 516332001f49Smrg _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' 516432001f49Smrg # Don't use ranlib 516532001f49Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 516632001f49Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 516732001f49Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 516832001f49Smrg case $lt_outputfile in 516932001f49Smrg *.exe|*.EXE) ;; 517032001f49Smrg *) 517132001f49Smrg lt_outputfile="$lt_outputfile.exe" 517232001f49Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 517332001f49Smrg ;; 517432001f49Smrg esac~ 517532001f49Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 517632001f49Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 517732001f49Smrg $RM "$lt_outputfile.manifest"; 517832001f49Smrg fi' 517932001f49Smrg ;; 518032001f49Smrg *) 518132001f49Smrg # Assume MSVC wrapper 518232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 518332001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 518432001f49Smrg # Tell ltmain to make .lib files, not .a files. 518532001f49Smrg libext=lib 518632001f49Smrg # Tell ltmain to make .dll files, not .so files. 518732001f49Smrg shrext_cmds=".dll" 518832001f49Smrg # FIXME: Setting linknames here is a bad hack. 518932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 519032001f49Smrg # The linker will automatically build a .lib file if we build a DLL. 519132001f49Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 519232001f49Smrg # FIXME: Should let the user specify the lib program. 519332001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 519432001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 519532001f49Smrg ;; 519632001f49Smrg esac 519732001f49Smrg ;; 519832001f49Smrg 519932001f49Smrg darwin* | rhapsody*) 520032001f49Smrg _LT_DARWIN_LINKER_FEATURES($1) 520132001f49Smrg ;; 520232001f49Smrg 520332001f49Smrg dgux*) 520432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 520532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 520632001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 520732001f49Smrg ;; 520832001f49Smrg 520932001f49Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 521032001f49Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 521132001f49Smrg # does not break anything, and helps significantly (at the cost of a little 521232001f49Smrg # extra space). 521332001f49Smrg freebsd2.2*) 521432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 521532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 521632001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 521732001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 521832001f49Smrg ;; 521932001f49Smrg 522032001f49Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 522132001f49Smrg freebsd2.*) 522232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 522332001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 522432001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 522532001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 522632001f49Smrg ;; 522732001f49Smrg 522832001f49Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 522932001f49Smrg freebsd* | dragonfly*) 523032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 523132001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 523232001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 523332001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 523432001f49Smrg ;; 523532001f49Smrg 523632001f49Smrg hpux9*) 523732001f49Smrg if test "$GCC" = yes; then 523832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 523932001f49Smrg else 524032001f49Smrg _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' 524132001f49Smrg fi 524232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 524332001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 524432001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 524532001f49Smrg 524632001f49Smrg # hardcode_minus_L: Not really in the search PATH, 524732001f49Smrg # but as the default location of the library. 524832001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 524932001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 525032001f49Smrg ;; 525132001f49Smrg 525232001f49Smrg hpux10*) 525332001f49Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 525432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 525532001f49Smrg else 525632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 525732001f49Smrg fi 525832001f49Smrg if test "$with_gnu_ld" = no; then 525932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 526032001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 526132001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 526232001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 526332001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 526432001f49Smrg # hardcode_minus_L: Not really in the search PATH, 526532001f49Smrg # but as the default location of the library. 526632001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 526732001f49Smrg fi 526832001f49Smrg ;; 526932001f49Smrg 527032001f49Smrg hpux11*) 527132001f49Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 527232001f49Smrg case $host_cpu in 527332001f49Smrg hppa*64*) 527432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 527532001f49Smrg ;; 527632001f49Smrg ia64*) 527732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 527832001f49Smrg ;; 527932001f49Smrg *) 528032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 528132001f49Smrg ;; 528232001f49Smrg esac 528332001f49Smrg else 528432001f49Smrg case $host_cpu in 528532001f49Smrg hppa*64*) 528632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 528732001f49Smrg ;; 528832001f49Smrg ia64*) 528932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 529032001f49Smrg ;; 529132001f49Smrg *) 529232001f49Smrg m4_if($1, [], [ 529332001f49Smrg # Older versions of the 11.00 compiler do not understand -b yet 529432001f49Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 529532001f49Smrg _LT_LINKER_OPTION([if $CC understands -b], 529632001f49Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 529732001f49Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 529832001f49Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 529932001f49Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 530032001f49Smrg ;; 530132001f49Smrg esac 530232001f49Smrg fi 530332001f49Smrg if test "$with_gnu_ld" = no; then 530432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 530532001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 530632001f49Smrg 530732001f49Smrg case $host_cpu in 530832001f49Smrg hppa*64*|ia64*) 530932001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 531032001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 531132001f49Smrg ;; 531232001f49Smrg *) 531332001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 531432001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 531532001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 531632001f49Smrg 531732001f49Smrg # hardcode_minus_L: Not really in the search PATH, 531832001f49Smrg # but as the default location of the library. 531932001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 532032001f49Smrg ;; 532132001f49Smrg esac 532232001f49Smrg fi 532332001f49Smrg ;; 532432001f49Smrg 532532001f49Smrg irix5* | irix6* | nonstopux*) 532632001f49Smrg if test "$GCC" = yes; then 532732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 532832001f49Smrg # Try to use the -exported_symbol ld option, if it does not 532932001f49Smrg # work, assume that -exports_file does not work either and 533032001f49Smrg # implicitly export all symbols. 533132001f49Smrg # This should be the same for all languages, so no per-tag cache variable. 533232001f49Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 533332001f49Smrg [lt_cv_irix_exported_symbol], 533432001f49Smrg [save_LDFLAGS="$LDFLAGS" 533532001f49Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 533632001f49Smrg AC_LINK_IFELSE( 533732001f49Smrg [AC_LANG_SOURCE( 533832001f49Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 533932001f49Smrg [C++], [[int foo (void) { return 0; }]], 534032001f49Smrg [Fortran 77], [[ 534132001f49Smrg subroutine foo 534232001f49Smrg end]], 534332001f49Smrg [Fortran], [[ 534432001f49Smrg subroutine foo 534532001f49Smrg end]])])], 534632001f49Smrg [lt_cv_irix_exported_symbol=yes], 534732001f49Smrg [lt_cv_irix_exported_symbol=no]) 534832001f49Smrg LDFLAGS="$save_LDFLAGS"]) 534932001f49Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 535032001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 535132001f49Smrg fi 535232001f49Smrg else 535332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 535432001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 535532001f49Smrg fi 535632001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 535732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 535832001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 535932001f49Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 536032001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 536132001f49Smrg ;; 536232001f49Smrg 536332001f49Smrg netbsd* | netbsdelf*-gnu) 536432001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 536532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 536632001f49Smrg else 536732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 536832001f49Smrg fi 536932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 537032001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 537132001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 537232001f49Smrg ;; 537332001f49Smrg 537432001f49Smrg newsos6) 537532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 537632001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 537732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 537832001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 537932001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 538032001f49Smrg ;; 538132001f49Smrg 538232001f49Smrg *nto* | *qnx*) 538332001f49Smrg ;; 538432001f49Smrg 538532001f49Smrg openbsd*) 538632001f49Smrg if test -f /usr/libexec/ld.so; then 538732001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 538832001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 538932001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 539032001f49Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 539132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 539232001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 539332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 539432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 539532001f49Smrg else 539632001f49Smrg case $host_os in 539732001f49Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 539832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 539932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 540032001f49Smrg ;; 540132001f49Smrg *) 540232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 540332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 540432001f49Smrg ;; 540532001f49Smrg esac 540632001f49Smrg fi 540732001f49Smrg else 540832001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 540932001f49Smrg fi 541032001f49Smrg ;; 541132001f49Smrg 541232001f49Smrg os2*) 541332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 541432001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 541532001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 541632001f49Smrg _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' 541732001f49Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 541832001f49Smrg ;; 541932001f49Smrg 542032001f49Smrg osf3*) 542132001f49Smrg if test "$GCC" = yes; then 542232001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 542332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 542432001f49Smrg else 542532001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 542632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 542732001f49Smrg fi 542832001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 542932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 543032001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 543132001f49Smrg ;; 543232001f49Smrg 543332001f49Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 543432001f49Smrg if test "$GCC" = yes; then 543532001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 543632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 543732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 543832001f49Smrg else 543932001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 544032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 544132001f49Smrg _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~ 544232001f49Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 544332001f49Smrg 544432001f49Smrg # Both c and cxx compiler support -rpath directly 544532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 544632001f49Smrg fi 544732001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 544832001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 544932001f49Smrg ;; 545032001f49Smrg 545132001f49Smrg solaris*) 545232001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 545332001f49Smrg if test "$GCC" = yes; then 545432001f49Smrg wlarc='${wl}' 545532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 545632001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 545732001f49Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 545832001f49Smrg else 545932001f49Smrg case `$CC -V 2>&1` in 546032001f49Smrg *"Compilers 5.0"*) 546132001f49Smrg wlarc='' 546232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 546332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 546432001f49Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 546532001f49Smrg ;; 546632001f49Smrg *) 546732001f49Smrg wlarc='${wl}' 546832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 546932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547032001f49Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 547132001f49Smrg ;; 547232001f49Smrg esac 547332001f49Smrg fi 547432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 547532001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 547632001f49Smrg case $host_os in 547732001f49Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 547832001f49Smrg *) 547932001f49Smrg # The compiler driver will combine and reorder linker options, 548032001f49Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 548132001f49Smrg # but is careful enough not to reorder. 548232001f49Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 548332001f49Smrg if test "$GCC" = yes; then 548432001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 548532001f49Smrg else 548632001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 548732001f49Smrg fi 548832001f49Smrg ;; 548932001f49Smrg esac 549032001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 549132001f49Smrg ;; 549232001f49Smrg 549332001f49Smrg sunos4*) 549432001f49Smrg if test "x$host_vendor" = xsequent; then 549532001f49Smrg # Use $CC to link under sequent, because it throws in some extra .o 549632001f49Smrg # files that make .init and .fini sections work. 549732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 549832001f49Smrg else 549932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 550032001f49Smrg fi 550132001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 550232001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 550332001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 550432001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 550532001f49Smrg ;; 550632001f49Smrg 550732001f49Smrg sysv4) 550832001f49Smrg case $host_vendor in 550932001f49Smrg sni) 551032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 551132001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 551232001f49Smrg ;; 551332001f49Smrg siemens) 551432001f49Smrg ## LD is ld it makes a PLAMLIB 551532001f49Smrg ## CC just makes a GrossModule. 551632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 551732001f49Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 551832001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 551932001f49Smrg ;; 552032001f49Smrg motorola) 552132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 552232001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 552332001f49Smrg ;; 552432001f49Smrg esac 552532001f49Smrg runpath_var='LD_RUN_PATH' 552632001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 552732001f49Smrg ;; 552832001f49Smrg 552932001f49Smrg sysv4.3*) 553032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 553132001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 553232001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 553332001f49Smrg ;; 553432001f49Smrg 553532001f49Smrg sysv4*MP*) 553632001f49Smrg if test -d /usr/nec; then 553732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 553832001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 553932001f49Smrg runpath_var=LD_RUN_PATH 554032001f49Smrg hardcode_runpath_var=yes 554132001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 554232001f49Smrg fi 554332001f49Smrg ;; 554432001f49Smrg 554532001f49Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 554632001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 554732001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 554832001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 554932001f49Smrg runpath_var='LD_RUN_PATH' 555032001f49Smrg 555132001f49Smrg if test "$GCC" = yes; then 555232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555432001f49Smrg else 555532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555632001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555732001f49Smrg fi 555832001f49Smrg ;; 555932001f49Smrg 556032001f49Smrg sysv5* | sco3.2v5* | sco5v6*) 556132001f49Smrg # Note: We can NOT use -z defs as we might desire, because we do not 556232001f49Smrg # link with -lc, and that would cause any symbols used from libc to 556332001f49Smrg # always be unresolved, which means just about no library would 556432001f49Smrg # ever link correctly. If we're not using GNU ld we use -z text 556532001f49Smrg # though, which does catch some bad symbols but isn't as heavy-handed 556632001f49Smrg # as -z defs. 556732001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 556832001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 556932001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 557032001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 557132001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 557232001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 557332001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 557432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 557532001f49Smrg runpath_var='LD_RUN_PATH' 557632001f49Smrg 557732001f49Smrg if test "$GCC" = yes; then 557832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 557932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558032001f49Smrg else 558132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558232001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558332001f49Smrg fi 558432001f49Smrg ;; 558532001f49Smrg 558632001f49Smrg uts4*) 558732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 558832001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 558932001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 559032001f49Smrg ;; 559132001f49Smrg 559232001f49Smrg *) 559332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 559432001f49Smrg ;; 559532001f49Smrg esac 559632001f49Smrg 559732001f49Smrg if test x$host_vendor = xsni; then 559832001f49Smrg case $host in 559932001f49Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 560032001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 560132001f49Smrg ;; 560232001f49Smrg esac 560332001f49Smrg fi 560432001f49Smrg fi 560532001f49Smrg]) 560632001f49SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 560732001f49Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 560832001f49Smrg 560932001f49Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561032001f49Smrg 561132001f49Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 561232001f49Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 561332001f49Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 561432001f49Smrg [The commands to extract the exported symbol list from a shared archive]) 561532001f49Smrg 561632001f49Smrg# 561732001f49Smrg# Do we need to explicitly link libc? 561832001f49Smrg# 561932001f49Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 562032001f49Smrgx|xyes) 562132001f49Smrg # Assume -lc should be added 562232001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 562332001f49Smrg 562432001f49Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 562532001f49Smrg case $_LT_TAGVAR(archive_cmds, $1) in 562632001f49Smrg *'~'*) 562732001f49Smrg # FIXME: we may have to deal with multi-command sequences. 562832001f49Smrg ;; 562932001f49Smrg '$CC '*) 563032001f49Smrg # Test whether the compiler implicitly links with -lc since on some 563132001f49Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 563232001f49Smrg # to ld, don't add -lc before -lgcc. 563332001f49Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 563432001f49Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 563532001f49Smrg [$RM conftest* 563632001f49Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 563732001f49Smrg 563832001f49Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 563932001f49Smrg soname=conftest 564032001f49Smrg lib=conftest 564132001f49Smrg libobjs=conftest.$ac_objext 564232001f49Smrg deplibs= 564332001f49Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 564432001f49Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 564532001f49Smrg compiler_flags=-v 564632001f49Smrg linker_flags=-v 564732001f49Smrg verstring= 564832001f49Smrg output_objdir=. 564932001f49Smrg libname=conftest 565032001f49Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 565132001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 565232001f49Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 565332001f49Smrg then 565432001f49Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 565532001f49Smrg else 565632001f49Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 565732001f49Smrg fi 565832001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 565932001f49Smrg else 566032001f49Smrg cat conftest.err 1>&5 566132001f49Smrg fi 566232001f49Smrg $RM conftest* 566332001f49Smrg ]) 566432001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 566532001f49Smrg ;; 566632001f49Smrg esac 566732001f49Smrg fi 566832001f49Smrg ;; 566932001f49Smrgesac 567032001f49Smrg 567132001f49Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 567232001f49Smrg [Whether or not to add -lc for building shared libraries]) 567332001f49Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 567432001f49Smrg [enable_shared_with_static_runtimes], [0], 567532001f49Smrg [Whether or not to disallow shared libs when runtime libs are static]) 567632001f49Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 567732001f49Smrg [Compiler flag to allow reflexive dlopens]) 567832001f49Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 567932001f49Smrg [Compiler flag to generate shared objects directly from archives]) 568032001f49Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 568132001f49Smrg [Whether the compiler copes with passing no objects directly]) 568232001f49Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 568332001f49Smrg [Create an old-style archive from a shared archive]) 568432001f49Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 568532001f49Smrg [Create a temporary old-style archive to link instead of a shared archive]) 568632001f49Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 568732001f49Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 568832001f49Smrg_LT_TAGDECL([], [module_cmds], [2], 568932001f49Smrg [Commands used to build a loadable module if different from building 569032001f49Smrg a shared archive.]) 569132001f49Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 569232001f49Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 569332001f49Smrg [Whether we are building with GNU ld or not]) 569432001f49Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 569532001f49Smrg [Flag that allows shared libraries with undefined symbols to be built]) 569632001f49Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 569732001f49Smrg [Flag that enforces no undefined symbols]) 569832001f49Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 569932001f49Smrg [Flag to hardcode $libdir into a binary during linking. 570032001f49Smrg This must work even if $libdir does not exist]) 570132001f49Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 570232001f49Smrg [Whether we need a single "-rpath" flag with a separated argument]) 570332001f49Smrg_LT_TAGDECL([], [hardcode_direct], [0], 570432001f49Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 570532001f49Smrg DIR into the resulting binary]) 570632001f49Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 570732001f49Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 570832001f49Smrg DIR into the resulting binary and the resulting library dependency is 570932001f49Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 571032001f49Smrg library is relocated]) 571132001f49Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 571232001f49Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 571332001f49Smrg into the resulting binary]) 571432001f49Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 571532001f49Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 571632001f49Smrg into the resulting binary]) 571732001f49Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 571832001f49Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 571932001f49Smrg into the library and all subsequent libraries and executables linked 572032001f49Smrg against it]) 572132001f49Smrg_LT_TAGDECL([], [inherit_rpath], [0], 572232001f49Smrg [Set to yes if linker adds runtime paths of dependent libraries 572332001f49Smrg to runtime path list]) 572432001f49Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 572532001f49Smrg [Whether libtool must link a program against all its dependency libraries]) 572632001f49Smrg_LT_TAGDECL([], [always_export_symbols], [0], 572732001f49Smrg [Set to "yes" if exported symbols are required]) 572832001f49Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 572932001f49Smrg [The commands to list exported symbols]) 573032001f49Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 573132001f49Smrg [Symbols that should not be listed in the preloaded symbols]) 573232001f49Smrg_LT_TAGDECL([], [include_expsyms], [1], 573332001f49Smrg [Symbols that must always be exported]) 573432001f49Smrg_LT_TAGDECL([], [prelink_cmds], [2], 573532001f49Smrg [Commands necessary for linking programs (against libraries) with templates]) 573632001f49Smrg_LT_TAGDECL([], [postlink_cmds], [2], 573732001f49Smrg [Commands necessary for finishing linking programs]) 573832001f49Smrg_LT_TAGDECL([], [file_list_spec], [1], 573932001f49Smrg [Specify filename containing input files]) 574032001f49Smrgdnl FIXME: Not yet implemented 574132001f49Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 574232001f49Smrgdnl [Compiler flag to generate thread safe objects]) 574332001f49Smrg])# _LT_LINKER_SHLIBS 574432001f49Smrg 574532001f49Smrg 574632001f49Smrg# _LT_LANG_C_CONFIG([TAG]) 574732001f49Smrg# ------------------------ 574832001f49Smrg# Ensure that the configuration variables for a C compiler are suitably 574932001f49Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 575032001f49Smrg# the compiler configuration to `libtool'. 575132001f49Smrgm4_defun([_LT_LANG_C_CONFIG], 575232001f49Smrg[m4_require([_LT_DECL_EGREP])dnl 575332001f49Smrglt_save_CC="$CC" 575432001f49SmrgAC_LANG_PUSH(C) 575532001f49Smrg 575632001f49Smrg# Source file extension for C test sources. 575732001f49Smrgac_ext=c 575832001f49Smrg 575932001f49Smrg# Object file extension for compiled C test sources. 576032001f49Smrgobjext=o 576132001f49Smrg_LT_TAGVAR(objext, $1)=$objext 576232001f49Smrg 576332001f49Smrg# Code to be used in simple compile tests 576432001f49Smrglt_simple_compile_test_code="int some_variable = 0;" 576532001f49Smrg 576632001f49Smrg# Code to be used in simple link tests 576732001f49Smrglt_simple_link_test_code='int main(){return(0);}' 576832001f49Smrg 576932001f49Smrg_LT_TAG_COMPILER 577032001f49Smrg# Save the default compiler, since it gets overwritten when the other 577132001f49Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 577232001f49Smrgcompiler_DEFAULT=$CC 577332001f49Smrg 577432001f49Smrg# save warnings/boilerplate of simple test code 577532001f49Smrg_LT_COMPILER_BOILERPLATE 577632001f49Smrg_LT_LINKER_BOILERPLATE 577732001f49Smrg 577832001f49Smrg## CAVEAT EMPTOR: 577932001f49Smrg## There is no encapsulation within the following macros, do not change 578032001f49Smrg## the running order or otherwise move them around unless you know exactly 578132001f49Smrg## what you are doing... 578232001f49Smrgif test -n "$compiler"; then 578332001f49Smrg _LT_COMPILER_NO_RTTI($1) 578432001f49Smrg _LT_COMPILER_PIC($1) 578532001f49Smrg _LT_COMPILER_C_O($1) 578632001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 578732001f49Smrg _LT_LINKER_SHLIBS($1) 578832001f49Smrg _LT_SYS_DYNAMIC_LINKER($1) 578932001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 579032001f49Smrg LT_SYS_DLOPEN_SELF 579132001f49Smrg _LT_CMD_STRIPLIB 579232001f49Smrg 579332001f49Smrg # Report which library types will actually be built 579432001f49Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 579532001f49Smrg AC_MSG_RESULT([$can_build_shared]) 579632001f49Smrg 579732001f49Smrg AC_MSG_CHECKING([whether to build shared libraries]) 579832001f49Smrg test "$can_build_shared" = "no" && enable_shared=no 579932001f49Smrg 580032001f49Smrg # On AIX, shared libraries and static libraries use the same namespace, and 580132001f49Smrg # are all built from PIC. 580232001f49Smrg case $host_os in 580332001f49Smrg aix3*) 580432001f49Smrg test "$enable_shared" = yes && enable_static=no 580532001f49Smrg if test -n "$RANLIB"; then 580632001f49Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 580732001f49Smrg postinstall_cmds='$RANLIB $lib' 580832001f49Smrg fi 580932001f49Smrg ;; 581032001f49Smrg 581132001f49Smrg aix[[4-9]]*) 581232001f49Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 581332001f49Smrg test "$enable_shared" = yes && enable_static=no 581432001f49Smrg fi 581532001f49Smrg ;; 581632001f49Smrg esac 581732001f49Smrg AC_MSG_RESULT([$enable_shared]) 581832001f49Smrg 581932001f49Smrg AC_MSG_CHECKING([whether to build static libraries]) 582032001f49Smrg # Make sure either enable_shared or enable_static is yes. 582132001f49Smrg test "$enable_shared" = yes || enable_static=yes 582232001f49Smrg AC_MSG_RESULT([$enable_static]) 582332001f49Smrg 582432001f49Smrg _LT_CONFIG($1) 582532001f49Smrgfi 582632001f49SmrgAC_LANG_POP 582732001f49SmrgCC="$lt_save_CC" 582832001f49Smrg])# _LT_LANG_C_CONFIG 582932001f49Smrg 583032001f49Smrg 583132001f49Smrg# _LT_LANG_CXX_CONFIG([TAG]) 583232001f49Smrg# -------------------------- 583332001f49Smrg# Ensure that the configuration variables for a C++ compiler are suitably 583432001f49Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 583532001f49Smrg# the compiler configuration to `libtool'. 583632001f49Smrgm4_defun([_LT_LANG_CXX_CONFIG], 583732001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 583832001f49Smrgm4_require([_LT_DECL_EGREP])dnl 583932001f49Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 584032001f49Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 584132001f49Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 584232001f49Smrg (test "X$CXX" != "Xg++"))) ; then 584332001f49Smrg AC_PROG_CXXCPP 584432001f49Smrgelse 584532001f49Smrg _lt_caught_CXX_error=yes 584632001f49Smrgfi 584732001f49Smrg 584832001f49SmrgAC_LANG_PUSH(C++) 584932001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 585032001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 585132001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no 585232001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 585332001f49Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 585432001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 585532001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no 585632001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 585732001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 585832001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 585932001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 586032001f49Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 586132001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 586232001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no 586332001f49Smrg_LT_TAGVAR(module_cmds, $1)= 586432001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 586532001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 586632001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 586732001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 586832001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 586932001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)= 587032001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 587132001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 587232001f49Smrg 587332001f49Smrg# Source file extension for C++ test sources. 587432001f49Smrgac_ext=cpp 587532001f49Smrg 587632001f49Smrg# Object file extension for compiled C++ test sources. 587732001f49Smrgobjext=o 587832001f49Smrg_LT_TAGVAR(objext, $1)=$objext 587932001f49Smrg 588032001f49Smrg# No sense in running all these tests if we already determined that 588132001f49Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 588232001f49Smrg# are currently assumed to apply to all compilers on this platform, 588332001f49Smrg# and will be corrupted by setting them based on a non-working compiler. 588432001f49Smrgif test "$_lt_caught_CXX_error" != yes; then 588532001f49Smrg # Code to be used in simple compile tests 588632001f49Smrg lt_simple_compile_test_code="int some_variable = 0;" 588732001f49Smrg 588832001f49Smrg # Code to be used in simple link tests 588932001f49Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 589032001f49Smrg 589132001f49Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 589232001f49Smrg _LT_TAG_COMPILER 589332001f49Smrg 589432001f49Smrg # save warnings/boilerplate of simple test code 589532001f49Smrg _LT_COMPILER_BOILERPLATE 589632001f49Smrg _LT_LINKER_BOILERPLATE 589732001f49Smrg 589832001f49Smrg # Allow CC to be a program name with arguments. 589932001f49Smrg lt_save_CC=$CC 590032001f49Smrg lt_save_CFLAGS=$CFLAGS 590132001f49Smrg lt_save_LD=$LD 590232001f49Smrg lt_save_GCC=$GCC 590332001f49Smrg GCC=$GXX 590432001f49Smrg lt_save_with_gnu_ld=$with_gnu_ld 590532001f49Smrg lt_save_path_LD=$lt_cv_path_LD 590632001f49Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 590732001f49Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 590832001f49Smrg else 590932001f49Smrg $as_unset lt_cv_prog_gnu_ld 591032001f49Smrg fi 591132001f49Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 591232001f49Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 591332001f49Smrg else 591432001f49Smrg $as_unset lt_cv_path_LD 591532001f49Smrg fi 591632001f49Smrg test -z "${LDCXX+set}" || LD=$LDCXX 591732001f49Smrg CC=${CXX-"c++"} 591832001f49Smrg CFLAGS=$CXXFLAGS 591932001f49Smrg compiler=$CC 592032001f49Smrg _LT_TAGVAR(compiler, $1)=$CC 592132001f49Smrg _LT_CC_BASENAME([$compiler]) 592232001f49Smrg 592332001f49Smrg if test -n "$compiler"; then 592432001f49Smrg # We don't want -fno-exception when compiling C++ code, so set the 592532001f49Smrg # no_builtin_flag separately 592632001f49Smrg if test "$GXX" = yes; then 592732001f49Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 592832001f49Smrg else 592932001f49Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 593032001f49Smrg fi 593132001f49Smrg 593232001f49Smrg if test "$GXX" = yes; then 593332001f49Smrg # Set up default GNU C++ configuration 593432001f49Smrg 593532001f49Smrg LT_PATH_LD 593632001f49Smrg 593732001f49Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 593832001f49Smrg # archiving commands below assume that GNU ld is being used. 593932001f49Smrg if test "$with_gnu_ld" = yes; then 594032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 594132001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 594232001f49Smrg 594332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594532001f49Smrg 594632001f49Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 594732001f49Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 594832001f49Smrg # investigate it a little bit more. (MM) 594932001f49Smrg wlarc='${wl}' 595032001f49Smrg 595132001f49Smrg # ancient GNU ld didn't support --whole-archive et. al. 595232001f49Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 595332001f49Smrg $GREP 'no-whole-archive' > /dev/null; then 595432001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 595532001f49Smrg else 595632001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 595732001f49Smrg fi 595832001f49Smrg else 595932001f49Smrg with_gnu_ld=no 596032001f49Smrg wlarc= 596132001f49Smrg 596232001f49Smrg # A generic and very simple default shared library creation 596332001f49Smrg # command for GNU C++ for the case where it uses the native 596432001f49Smrg # linker, instead of GNU ld. If possible, this setting should 596532001f49Smrg # overridden to take advantage of the native linker features on 596632001f49Smrg # the platform it is being used on. 596732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 596832001f49Smrg fi 596932001f49Smrg 597032001f49Smrg # Commands to make compiler produce verbose output that lists 597132001f49Smrg # what "hidden" libraries, object files and flags are used when 597232001f49Smrg # linking a shared library. 597332001f49Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597432001f49Smrg 597532001f49Smrg else 597632001f49Smrg GXX=no 597732001f49Smrg with_gnu_ld=no 597832001f49Smrg wlarc= 597932001f49Smrg fi 598032001f49Smrg 598132001f49Smrg # PORTME: fill in a description of your system's C++ link characteristics 598232001f49Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 598332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 598432001f49Smrg case $host_os in 598532001f49Smrg aix3*) 598632001f49Smrg # FIXME: insert proper C++ library support 598732001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 598832001f49Smrg ;; 598932001f49Smrg aix[[4-9]]*) 599032001f49Smrg if test "$host_cpu" = ia64; then 599132001f49Smrg # On IA64, the linker does run time linking by default, so we don't 599232001f49Smrg # have to do anything special. 599332001f49Smrg aix_use_runtimelinking=no 599432001f49Smrg exp_sym_flag='-Bexport' 599532001f49Smrg no_entry_flag="" 599632001f49Smrg else 599732001f49Smrg aix_use_runtimelinking=no 599832001f49Smrg 599932001f49Smrg # Test if we are trying to use run time linking or normal 600032001f49Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 600132001f49Smrg # need to do runtime linking. 600232001f49Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 600332001f49Smrg for ld_flag in $LDFLAGS; do 600432001f49Smrg case $ld_flag in 600532001f49Smrg *-brtl*) 600632001f49Smrg aix_use_runtimelinking=yes 600732001f49Smrg break 600832001f49Smrg ;; 600932001f49Smrg esac 601032001f49Smrg done 601132001f49Smrg ;; 601232001f49Smrg esac 601332001f49Smrg 601432001f49Smrg exp_sym_flag='-bexport' 601532001f49Smrg no_entry_flag='-bnoentry' 601632001f49Smrg fi 601732001f49Smrg 601832001f49Smrg # When large executables or shared objects are built, AIX ld can 601932001f49Smrg # have problems creating the table of contents. If linking a library 602032001f49Smrg # or program results in "error TOC overflow" add -mminimal-toc to 602132001f49Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 602232001f49Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 602332001f49Smrg 602432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='' 602532001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 602632001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 602732001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 602832001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 602932001f49Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 603032001f49Smrg 603132001f49Smrg if test "$GXX" = yes; then 603232001f49Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 603332001f49Smrg # We only want to do this on AIX 4.2 and lower, the check 603432001f49Smrg # below for broken collect2 doesn't work under 4.3+ 603532001f49Smrg collect2name=`${CC} -print-prog-name=collect2` 603632001f49Smrg if test -f "$collect2name" && 603732001f49Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 603832001f49Smrg then 603932001f49Smrg # We have reworked collect2 604032001f49Smrg : 604132001f49Smrg else 604232001f49Smrg # We have old collect2 604332001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 604432001f49Smrg # It fails to find uninstalled libraries when the uninstalled 604532001f49Smrg # path is not listed in the libpath. Setting hardcode_minus_L 604632001f49Smrg # to unsupported forces relinking 604732001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 604832001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 604932001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 605032001f49Smrg fi 605132001f49Smrg esac 605232001f49Smrg shared_flag='-shared' 605332001f49Smrg if test "$aix_use_runtimelinking" = yes; then 605432001f49Smrg shared_flag="$shared_flag "'${wl}-G' 605532001f49Smrg fi 605632001f49Smrg else 605732001f49Smrg # not using gcc 605832001f49Smrg if test "$host_cpu" = ia64; then 605932001f49Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 606032001f49Smrg # chokes on -Wl,-G. The following line is correct: 606132001f49Smrg shared_flag='-G' 606232001f49Smrg else 606332001f49Smrg if test "$aix_use_runtimelinking" = yes; then 606432001f49Smrg shared_flag='${wl}-G' 606532001f49Smrg else 606632001f49Smrg shared_flag='${wl}-bM:SRE' 606732001f49Smrg fi 606832001f49Smrg fi 606932001f49Smrg fi 607032001f49Smrg 607132001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 607232001f49Smrg # It seems that -bexpall does not export symbols beginning with 607332001f49Smrg # underscore (_), so it is better to generate a list of symbols to 607432001f49Smrg # export. 607532001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 607632001f49Smrg if test "$aix_use_runtimelinking" = yes; then 607732001f49Smrg # Warning - without using the other runtime loading flags (-brtl), 607832001f49Smrg # -berok will link without error, but may produce a broken library. 607932001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 608032001f49Smrg # Determine the default libpath from the value encoded in an empty 608132001f49Smrg # executable. 608232001f49Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 608332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 608432001f49Smrg 608532001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 608632001f49Smrg else 608732001f49Smrg if test "$host_cpu" = ia64; then 608832001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 608932001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 609032001f49Smrg _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" 609132001f49Smrg else 609232001f49Smrg # Determine the default libpath from the value encoded in an 609332001f49Smrg # empty executable. 609432001f49Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 609532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 609632001f49Smrg # Warning - without using the other run time loading flags, 609732001f49Smrg # -berok will link without error, but may produce a broken library. 609832001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 609932001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 610032001f49Smrg if test "$with_gnu_ld" = yes; then 610132001f49Smrg # We only use this code for GNU lds that support --whole-archive. 610232001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 610332001f49Smrg else 610432001f49Smrg # Exported symbols can be pulled into shared objects from archives 610532001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 610632001f49Smrg fi 610732001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 610832001f49Smrg # This is similar to how AIX traditionally builds its shared 610932001f49Smrg # libraries. 611032001f49Smrg _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' 611132001f49Smrg fi 611232001f49Smrg fi 611332001f49Smrg ;; 611432001f49Smrg 611532001f49Smrg beos*) 611632001f49Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 611732001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 611832001f49Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 611932001f49Smrg # support --undefined. This deserves some investigation. FIXME 612032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 612132001f49Smrg else 612232001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 612332001f49Smrg fi 612432001f49Smrg ;; 612532001f49Smrg 612632001f49Smrg chorus*) 612732001f49Smrg case $cc_basename in 612832001f49Smrg *) 612932001f49Smrg # FIXME: insert proper C++ library support 613032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 613132001f49Smrg ;; 613232001f49Smrg esac 613332001f49Smrg ;; 613432001f49Smrg 613532001f49Smrg cygwin* | mingw* | pw32* | cegcc*) 613632001f49Smrg case $GXX,$cc_basename in 613732001f49Smrg ,cl* | no,cl*) 613832001f49Smrg # Native MSVC 613932001f49Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 614032001f49Smrg # no search path for DLLs. 614132001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 614232001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 614332001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 614432001f49Smrg _LT_TAGVAR(file_list_spec, $1)='@' 614532001f49Smrg # Tell ltmain to make .lib files, not .a files. 614632001f49Smrg libext=lib 614732001f49Smrg # Tell ltmain to make .dll files, not .so files. 614832001f49Smrg shrext_cmds=".dll" 614932001f49Smrg # FIXME: Setting linknames here is a bad hack. 615032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 615132001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 615232001f49Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 615332001f49Smrg else 615432001f49Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 615532001f49Smrg fi~ 615632001f49Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 615732001f49Smrg linknames=' 615832001f49Smrg # The linker will not automatically build a static lib if we build a DLL. 615932001f49Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 616032001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 616132001f49Smrg # Don't use ranlib 616232001f49Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 616332001f49Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 616432001f49Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 616532001f49Smrg case $lt_outputfile in 616632001f49Smrg *.exe|*.EXE) ;; 616732001f49Smrg *) 616832001f49Smrg lt_outputfile="$lt_outputfile.exe" 616932001f49Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 617032001f49Smrg ;; 617132001f49Smrg esac~ 617232001f49Smrg func_to_tool_file "$lt_outputfile"~ 617332001f49Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 617432001f49Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 617532001f49Smrg $RM "$lt_outputfile.manifest"; 617632001f49Smrg fi' 617732001f49Smrg ;; 617832001f49Smrg *) 617932001f49Smrg # g++ 618032001f49Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 618132001f49Smrg # as there is no search path for DLLs. 618232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 618332001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 618432001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 618532001f49Smrg _LT_TAGVAR(always_export_symbols, $1)=no 618632001f49Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 618732001f49Smrg 618832001f49Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 618932001f49Smrg _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' 619032001f49Smrg # If the export-symbols file already is a .def file (1st line 619132001f49Smrg # is EXPORTS), use it as is; otherwise, prepend... 619232001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 619332001f49Smrg cp $export_symbols $output_objdir/$soname.def; 619432001f49Smrg else 619532001f49Smrg echo EXPORTS > $output_objdir/$soname.def; 619632001f49Smrg cat $export_symbols >> $output_objdir/$soname.def; 619732001f49Smrg fi~ 619832001f49Smrg $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' 619932001f49Smrg else 620032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 620132001f49Smrg fi 620232001f49Smrg ;; 620332001f49Smrg esac 620432001f49Smrg ;; 620532001f49Smrg darwin* | rhapsody*) 620632001f49Smrg _LT_DARWIN_LINKER_FEATURES($1) 620732001f49Smrg ;; 620832001f49Smrg 620932001f49Smrg dgux*) 621032001f49Smrg case $cc_basename in 621132001f49Smrg ec++*) 621232001f49Smrg # FIXME: insert proper C++ library support 621332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 621432001f49Smrg ;; 621532001f49Smrg ghcx*) 621632001f49Smrg # Green Hills C++ Compiler 621732001f49Smrg # FIXME: insert proper C++ library support 621832001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 621932001f49Smrg ;; 622032001f49Smrg *) 622132001f49Smrg # FIXME: insert proper C++ library support 622232001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 622332001f49Smrg ;; 622432001f49Smrg esac 622532001f49Smrg ;; 622632001f49Smrg 622732001f49Smrg freebsd2.*) 622832001f49Smrg # C++ shared libraries reported to be fairly broken before 622932001f49Smrg # switch to ELF 623032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 623132001f49Smrg ;; 623232001f49Smrg 623332001f49Smrg freebsd-elf*) 623432001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 623532001f49Smrg ;; 623632001f49Smrg 623732001f49Smrg freebsd* | dragonfly*) 623832001f49Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 623932001f49Smrg # conventions 624032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 624132001f49Smrg ;; 624232001f49Smrg 624332001f49Smrg haiku*) 624432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 624532001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 624632001f49Smrg ;; 624732001f49Smrg 624832001f49Smrg hpux9*) 624932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 625032001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625132001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 625232001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 625332001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 625432001f49Smrg # but as the default 625532001f49Smrg # location of the library. 625632001f49Smrg 625732001f49Smrg case $cc_basename in 625832001f49Smrg CC*) 625932001f49Smrg # FIXME: insert proper C++ library support 626032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 626132001f49Smrg ;; 626232001f49Smrg aCC*) 626332001f49Smrg _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' 626432001f49Smrg # Commands to make compiler produce verbose output that lists 626532001f49Smrg # what "hidden" libraries, object files and flags are used when 626632001f49Smrg # linking a shared library. 626732001f49Smrg # 626832001f49Smrg # There doesn't appear to be a way to prevent this compiler from 626932001f49Smrg # explicitly linking system object files so we need to strip them 627032001f49Smrg # from the output so that they don't get included in the library 627132001f49Smrg # dependencies. 627232001f49Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 627332001f49Smrg ;; 627432001f49Smrg *) 627532001f49Smrg if test "$GXX" = yes; then 627632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 627732001f49Smrg else 627832001f49Smrg # FIXME: insert proper C++ library support 627932001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 628032001f49Smrg fi 628132001f49Smrg ;; 628232001f49Smrg esac 628332001f49Smrg ;; 628432001f49Smrg 628532001f49Smrg hpux10*|hpux11*) 628632001f49Smrg if test $with_gnu_ld = no; then 628732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 628832001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 628932001f49Smrg 629032001f49Smrg case $host_cpu in 629132001f49Smrg hppa*64*|ia64*) 629232001f49Smrg ;; 629332001f49Smrg *) 629432001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 629532001f49Smrg ;; 629632001f49Smrg esac 629732001f49Smrg fi 629832001f49Smrg case $host_cpu in 629932001f49Smrg hppa*64*|ia64*) 630032001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 630132001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 630232001f49Smrg ;; 630332001f49Smrg *) 630432001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 630532001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 630632001f49Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 630732001f49Smrg # but as the default 630832001f49Smrg # location of the library. 630932001f49Smrg ;; 631032001f49Smrg esac 631132001f49Smrg 631232001f49Smrg case $cc_basename in 631332001f49Smrg CC*) 631432001f49Smrg # FIXME: insert proper C++ library support 631532001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 631632001f49Smrg ;; 631732001f49Smrg aCC*) 631832001f49Smrg case $host_cpu in 631932001f49Smrg hppa*64*) 632032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 632132001f49Smrg ;; 632232001f49Smrg ia64*) 632332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 632432001f49Smrg ;; 632532001f49Smrg *) 632632001f49Smrg _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' 632732001f49Smrg ;; 632832001f49Smrg esac 632932001f49Smrg # Commands to make compiler produce verbose output that lists 633032001f49Smrg # what "hidden" libraries, object files and flags are used when 633132001f49Smrg # linking a shared library. 633232001f49Smrg # 633332001f49Smrg # There doesn't appear to be a way to prevent this compiler from 633432001f49Smrg # explicitly linking system object files so we need to strip them 633532001f49Smrg # from the output so that they don't get included in the library 633632001f49Smrg # dependencies. 633732001f49Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 633832001f49Smrg ;; 633932001f49Smrg *) 634032001f49Smrg if test "$GXX" = yes; then 634132001f49Smrg if test $with_gnu_ld = no; then 634232001f49Smrg case $host_cpu in 634332001f49Smrg hppa*64*) 634432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 634532001f49Smrg ;; 634632001f49Smrg ia64*) 634732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 634832001f49Smrg ;; 634932001f49Smrg *) 635032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 635132001f49Smrg ;; 635232001f49Smrg esac 635332001f49Smrg fi 635432001f49Smrg else 635532001f49Smrg # FIXME: insert proper C++ library support 635632001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 635732001f49Smrg fi 635832001f49Smrg ;; 635932001f49Smrg esac 636032001f49Smrg ;; 636132001f49Smrg 636232001f49Smrg interix[[3-9]]*) 636332001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 636432001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 636532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 636632001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 636732001f49Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 636832001f49Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 636932001f49Smrg # default) and relocated if they conflict, which is a slow very memory 637032001f49Smrg # consuming and fragmenting process. To avoid this, we pick a random, 637132001f49Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 637232001f49Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 637332001f49Smrg _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' 637432001f49Smrg _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' 637532001f49Smrg ;; 637632001f49Smrg irix5* | irix6*) 637732001f49Smrg case $cc_basename in 637832001f49Smrg CC*) 637932001f49Smrg # SGI C++ 638032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 638132001f49Smrg 638232001f49Smrg # Archives containing C++ object files must be created using 638332001f49Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 638432001f49Smrg # necessary to make sure instantiated templates are included 638532001f49Smrg # in the archive. 638632001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 638732001f49Smrg ;; 638832001f49Smrg *) 638932001f49Smrg if test "$GXX" = yes; then 639032001f49Smrg if test "$with_gnu_ld" = no; then 639132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 639232001f49Smrg else 639332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 639432001f49Smrg fi 639532001f49Smrg fi 639632001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 639732001f49Smrg ;; 639832001f49Smrg esac 639932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 640032001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 640132001f49Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 640232001f49Smrg ;; 640332001f49Smrg 640432001f49Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 640532001f49Smrg case $cc_basename in 640632001f49Smrg KCC*) 640732001f49Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 640832001f49Smrg 640932001f49Smrg # KCC will only create a shared library if the output file 641032001f49Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 641132001f49Smrg # to its proper name (with version) after linking. 641232001f49Smrg _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' 641332001f49Smrg _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' 641432001f49Smrg # Commands to make compiler produce verbose output that lists 641532001f49Smrg # what "hidden" libraries, object files and flags are used when 641632001f49Smrg # linking a shared library. 641732001f49Smrg # 641832001f49Smrg # There doesn't appear to be a way to prevent this compiler from 641932001f49Smrg # explicitly linking system object files so we need to strip them 642032001f49Smrg # from the output so that they don't get included in the library 642132001f49Smrg # dependencies. 642232001f49Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 642332001f49Smrg 642432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 642532001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 642632001f49Smrg 642732001f49Smrg # Archives containing C++ object files must be created using 642832001f49Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 642932001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 643032001f49Smrg ;; 643132001f49Smrg icpc* | ecpc* ) 643232001f49Smrg # Intel C++ 643332001f49Smrg with_gnu_ld=yes 643432001f49Smrg # version 8.0 and above of icpc choke on multiply defined symbols 643532001f49Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 643632001f49Smrg # earlier do not add the objects themselves. 643732001f49Smrg case `$CC -V 2>&1` in 643832001f49Smrg *"Version 7."*) 643932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 644032001f49Smrg _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' 644132001f49Smrg ;; 644232001f49Smrg *) # Version 8.0 or newer 644332001f49Smrg tmp_idyn= 644432001f49Smrg case $host_cpu in 644532001f49Smrg ia64*) tmp_idyn=' -i_dynamic';; 644632001f49Smrg esac 644732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 644832001f49Smrg _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' 644932001f49Smrg ;; 645032001f49Smrg esac 645132001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 645232001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 645332001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 645432001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 645532001f49Smrg ;; 645632001f49Smrg pgCC* | pgcpp*) 645732001f49Smrg # Portland Group C++ compiler 645832001f49Smrg case `$CC -V` in 645932001f49Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 646032001f49Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 646132001f49Smrg rm -rf $tpldir~ 646232001f49Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 646332001f49Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 646432001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 646532001f49Smrg rm -rf $tpldir~ 646632001f49Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 646732001f49Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 646832001f49Smrg $RANLIB $oldlib' 646932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 647032001f49Smrg rm -rf $tpldir~ 647132001f49Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647232001f49Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 647332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 647432001f49Smrg rm -rf $tpldir~ 647532001f49Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647632001f49Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 647732001f49Smrg ;; 647832001f49Smrg *) # Version 6 and above use weak symbols 647932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 648032001f49Smrg _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' 648132001f49Smrg ;; 648232001f49Smrg esac 648332001f49Smrg 648432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 648532001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 648632001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 648732001f49Smrg ;; 648832001f49Smrg cxx*) 648932001f49Smrg # Compaq C++ 649032001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 649132001f49Smrg _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' 649232001f49Smrg 649332001f49Smrg runpath_var=LD_RUN_PATH 649432001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 649532001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 649632001f49Smrg 649732001f49Smrg # Commands to make compiler produce verbose output that lists 649832001f49Smrg # what "hidden" libraries, object files and flags are used when 649932001f49Smrg # linking a shared library. 650032001f49Smrg # 650132001f49Smrg # There doesn't appear to be a way to prevent this compiler from 650232001f49Smrg # explicitly linking system object files so we need to strip them 650332001f49Smrg # from the output so that they don't get included in the library 650432001f49Smrg # dependencies. 650532001f49Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 650632001f49Smrg ;; 650732001f49Smrg xl* | mpixl* | bgxl*) 650832001f49Smrg # IBM XL 8.0 on PPC, with GNU ld 650932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 651032001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 651132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 651232001f49Smrg if test "x$supports_anon_versioning" = xyes; then 651332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 651432001f49Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 651532001f49Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 651632001f49Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 651732001f49Smrg fi 651832001f49Smrg ;; 651932001f49Smrg *) 652032001f49Smrg case `$CC -V 2>&1 | sed 5q` in 652132001f49Smrg *Sun\ C*) 652232001f49Smrg # Sun C++ 5.9 652332001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 652432001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 652532001f49Smrg _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' 652632001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 652732001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 652832001f49Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 652932001f49Smrg 653032001f49Smrg # Not sure whether something based on 653132001f49Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 653232001f49Smrg # would be better. 653332001f49Smrg output_verbose_link_cmd='func_echo_all' 653432001f49Smrg 653532001f49Smrg # Archives containing C++ object files must be created using 653632001f49Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 653732001f49Smrg # necessary to make sure instantiated templates are included 653832001f49Smrg # in the archive. 653932001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 654032001f49Smrg ;; 654132001f49Smrg esac 654232001f49Smrg ;; 654332001f49Smrg esac 654432001f49Smrg ;; 654532001f49Smrg 654632001f49Smrg lynxos*) 654732001f49Smrg # FIXME: insert proper C++ library support 654832001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 654932001f49Smrg ;; 655032001f49Smrg 655132001f49Smrg m88k*) 655232001f49Smrg # FIXME: insert proper C++ library support 655332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 655432001f49Smrg ;; 655532001f49Smrg 655632001f49Smrg mvs*) 655732001f49Smrg case $cc_basename in 655832001f49Smrg cxx*) 655932001f49Smrg # FIXME: insert proper C++ library support 656032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 656132001f49Smrg ;; 656232001f49Smrg *) 656332001f49Smrg # FIXME: insert proper C++ library support 656432001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 656532001f49Smrg ;; 656632001f49Smrg esac 656732001f49Smrg ;; 656832001f49Smrg 656932001f49Smrg netbsd*) 657032001f49Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 657132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 657232001f49Smrg wlarc= 657332001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 657432001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 657532001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 657632001f49Smrg fi 657732001f49Smrg # Workaround some broken pre-1.5 toolchains 657832001f49Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 657932001f49Smrg ;; 658032001f49Smrg 658132001f49Smrg *nto* | *qnx*) 658232001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 658332001f49Smrg ;; 658432001f49Smrg 658532001f49Smrg openbsd2*) 658632001f49Smrg # C++ shared libraries are fairly broken 658732001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 658832001f49Smrg ;; 658932001f49Smrg 659032001f49Smrg openbsd*) 659132001f49Smrg if test -f /usr/libexec/ld.so; then 659232001f49Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 659332001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 659432001f49Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 659532001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 659632001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 659732001f49Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 659832001f49Smrg _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' 659932001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 660032001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 660132001f49Smrg fi 660232001f49Smrg output_verbose_link_cmd=func_echo_all 660332001f49Smrg else 660432001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 660532001f49Smrg fi 660632001f49Smrg ;; 660732001f49Smrg 660832001f49Smrg osf3* | osf4* | osf5*) 660932001f49Smrg case $cc_basename in 661032001f49Smrg KCC*) 661132001f49Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 661232001f49Smrg 661332001f49Smrg # KCC will only create a shared library if the output file 661432001f49Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 661532001f49Smrg # to its proper name (with version) after linking. 661632001f49Smrg _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' 661732001f49Smrg 661832001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 661932001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 662032001f49Smrg 662132001f49Smrg # Archives containing C++ object files must be created using 662232001f49Smrg # the KAI C++ compiler. 662332001f49Smrg case $host in 662432001f49Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 662532001f49Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 662632001f49Smrg esac 662732001f49Smrg ;; 662832001f49Smrg RCC*) 662932001f49Smrg # Rational C++ 2.4.1 663032001f49Smrg # FIXME: insert proper C++ library support 663132001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 663232001f49Smrg ;; 663332001f49Smrg cxx*) 663432001f49Smrg case $host in 663532001f49Smrg osf3*) 663632001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 663732001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 663832001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 663932001f49Smrg ;; 664032001f49Smrg *) 664132001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 664232001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 664332001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 664432001f49Smrg echo "-hidden">> $lib.exp~ 664532001f49Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 664632001f49Smrg $RM $lib.exp' 664732001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 664832001f49Smrg ;; 664932001f49Smrg esac 665032001f49Smrg 665132001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665232001f49Smrg 665332001f49Smrg # Commands to make compiler produce verbose output that lists 665432001f49Smrg # what "hidden" libraries, object files and flags are used when 665532001f49Smrg # linking a shared library. 665632001f49Smrg # 665732001f49Smrg # There doesn't appear to be a way to prevent this compiler from 665832001f49Smrg # explicitly linking system object files so we need to strip them 665932001f49Smrg # from the output so that they don't get included in the library 666032001f49Smrg # dependencies. 666132001f49Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 666232001f49Smrg ;; 666332001f49Smrg *) 666432001f49Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 666532001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 666632001f49Smrg case $host in 666732001f49Smrg osf3*) 666832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 666932001f49Smrg ;; 667032001f49Smrg *) 667132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 667232001f49Smrg ;; 667332001f49Smrg esac 667432001f49Smrg 667532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 667632001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 667732001f49Smrg 667832001f49Smrg # Commands to make compiler produce verbose output that lists 667932001f49Smrg # what "hidden" libraries, object files and flags are used when 668032001f49Smrg # linking a shared library. 668132001f49Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 668232001f49Smrg 668332001f49Smrg else 668432001f49Smrg # FIXME: insert proper C++ library support 668532001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 668632001f49Smrg fi 668732001f49Smrg ;; 668832001f49Smrg esac 668932001f49Smrg ;; 669032001f49Smrg 669132001f49Smrg psos*) 669232001f49Smrg # FIXME: insert proper C++ library support 669332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 669432001f49Smrg ;; 669532001f49Smrg 669632001f49Smrg sunos4*) 669732001f49Smrg case $cc_basename in 669832001f49Smrg CC*) 669932001f49Smrg # Sun C++ 4.x 670032001f49Smrg # FIXME: insert proper C++ library support 670132001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 670232001f49Smrg ;; 670332001f49Smrg lcc*) 670432001f49Smrg # Lucid 670532001f49Smrg # FIXME: insert proper C++ library support 670632001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 670732001f49Smrg ;; 670832001f49Smrg *) 670932001f49Smrg # FIXME: insert proper C++ library support 671032001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 671132001f49Smrg ;; 671232001f49Smrg esac 671332001f49Smrg ;; 671432001f49Smrg 671532001f49Smrg solaris*) 671632001f49Smrg case $cc_basename in 671732001f49Smrg CC* | sunCC*) 671832001f49Smrg # Sun C++ 4.2, 5.x and Centerline C++ 671932001f49Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 672032001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 672132001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 672232001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 672332001f49Smrg $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' 672432001f49Smrg 672532001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 672632001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 672732001f49Smrg case $host_os in 672832001f49Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 672932001f49Smrg *) 673032001f49Smrg # The compiler driver will combine and reorder linker options, 673132001f49Smrg # but understands `-z linker_flag'. 673232001f49Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 673332001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 673432001f49Smrg ;; 673532001f49Smrg esac 673632001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 673732001f49Smrg 673832001f49Smrg output_verbose_link_cmd='func_echo_all' 673932001f49Smrg 674032001f49Smrg # Archives containing C++ object files must be created using 674132001f49Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 674232001f49Smrg # necessary to make sure instantiated templates are included 674332001f49Smrg # in the archive. 674432001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 674532001f49Smrg ;; 674632001f49Smrg gcx*) 674732001f49Smrg # Green Hills C++ Compiler 674832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 674932001f49Smrg 675032001f49Smrg # The C++ compiler must be used to create the archive. 675132001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 675232001f49Smrg ;; 675332001f49Smrg *) 675432001f49Smrg # GNU C++ compiler with Solaris linker 675532001f49Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 675632001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 675732001f49Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 675832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 675932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 676032001f49Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 676132001f49Smrg 676232001f49Smrg # Commands to make compiler produce verbose output that lists 676332001f49Smrg # what "hidden" libraries, object files and flags are used when 676432001f49Smrg # linking a shared library. 676532001f49Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 676632001f49Smrg else 676732001f49Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 676832001f49Smrg # platform. 676932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 677032001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 677132001f49Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 677232001f49Smrg 677332001f49Smrg # Commands to make compiler produce verbose output that lists 677432001f49Smrg # what "hidden" libraries, object files and flags are used when 677532001f49Smrg # linking a shared library. 677632001f49Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 677732001f49Smrg fi 677832001f49Smrg 677932001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 678032001f49Smrg case $host_os in 678132001f49Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 678232001f49Smrg *) 678332001f49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 678432001f49Smrg ;; 678532001f49Smrg esac 678632001f49Smrg fi 678732001f49Smrg ;; 678832001f49Smrg esac 678932001f49Smrg ;; 679032001f49Smrg 679132001f49Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 679232001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 679332001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 679432001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 679532001f49Smrg runpath_var='LD_RUN_PATH' 679632001f49Smrg 679732001f49Smrg case $cc_basename in 679832001f49Smrg CC*) 679932001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680032001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680132001f49Smrg ;; 680232001f49Smrg *) 680332001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680432001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680532001f49Smrg ;; 680632001f49Smrg esac 680732001f49Smrg ;; 680832001f49Smrg 680932001f49Smrg sysv5* | sco3.2v5* | sco5v6*) 681032001f49Smrg # Note: We can NOT use -z defs as we might desire, because we do not 681132001f49Smrg # link with -lc, and that would cause any symbols used from libc to 681232001f49Smrg # always be unresolved, which means just about no library would 681332001f49Smrg # ever link correctly. If we're not using GNU ld we use -z text 681432001f49Smrg # though, which does catch some bad symbols but isn't as heavy-handed 681532001f49Smrg # as -z defs. 681632001f49Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 681732001f49Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 681832001f49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 681932001f49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 682032001f49Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 682132001f49Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 682232001f49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 682332001f49Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 682432001f49Smrg runpath_var='LD_RUN_PATH' 682532001f49Smrg 682632001f49Smrg case $cc_basename in 682732001f49Smrg CC*) 682832001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 682932001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683032001f49Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 683132001f49Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 683232001f49Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 683332001f49Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 683432001f49Smrg ;; 683532001f49Smrg *) 683632001f49Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683732001f49Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683832001f49Smrg ;; 683932001f49Smrg esac 684032001f49Smrg ;; 684132001f49Smrg 684232001f49Smrg tandem*) 684332001f49Smrg case $cc_basename in 684432001f49Smrg NCC*) 684532001f49Smrg # NonStop-UX NCC 3.20 684632001f49Smrg # FIXME: insert proper C++ library support 684732001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 684832001f49Smrg ;; 684932001f49Smrg *) 685032001f49Smrg # FIXME: insert proper C++ library support 685132001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 685232001f49Smrg ;; 685332001f49Smrg esac 685432001f49Smrg ;; 685532001f49Smrg 685632001f49Smrg vxworks*) 685732001f49Smrg # FIXME: insert proper C++ library support 685832001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 685932001f49Smrg ;; 686032001f49Smrg 686132001f49Smrg *) 686232001f49Smrg # FIXME: insert proper C++ library support 686332001f49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686432001f49Smrg ;; 686532001f49Smrg esac 686632001f49Smrg 686732001f49Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 686832001f49Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 686932001f49Smrg 687032001f49Smrg _LT_TAGVAR(GCC, $1)="$GXX" 687132001f49Smrg _LT_TAGVAR(LD, $1)="$LD" 687232001f49Smrg 687332001f49Smrg ## CAVEAT EMPTOR: 687432001f49Smrg ## There is no encapsulation within the following macros, do not change 687532001f49Smrg ## the running order or otherwise move them around unless you know exactly 687632001f49Smrg ## what you are doing... 687732001f49Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 687832001f49Smrg _LT_COMPILER_PIC($1) 687932001f49Smrg _LT_COMPILER_C_O($1) 688032001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 688132001f49Smrg _LT_LINKER_SHLIBS($1) 688232001f49Smrg _LT_SYS_DYNAMIC_LINKER($1) 688332001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 688432001f49Smrg 688532001f49Smrg _LT_CONFIG($1) 688632001f49Smrg fi # test -n "$compiler" 688732001f49Smrg 688832001f49Smrg CC=$lt_save_CC 688932001f49Smrg CFLAGS=$lt_save_CFLAGS 689032001f49Smrg LDCXX=$LD 689132001f49Smrg LD=$lt_save_LD 689232001f49Smrg GCC=$lt_save_GCC 689332001f49Smrg with_gnu_ld=$lt_save_with_gnu_ld 689432001f49Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 689532001f49Smrg lt_cv_path_LD=$lt_save_path_LD 689632001f49Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 689732001f49Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 689832001f49Smrgfi # test "$_lt_caught_CXX_error" != yes 689932001f49Smrg 690032001f49SmrgAC_LANG_POP 690132001f49Smrg])# _LT_LANG_CXX_CONFIG 690232001f49Smrg 690332001f49Smrg 690432001f49Smrg# _LT_FUNC_STRIPNAME_CNF 690532001f49Smrg# ---------------------- 690632001f49Smrg# func_stripname_cnf prefix suffix name 690732001f49Smrg# strip PREFIX and SUFFIX off of NAME. 690832001f49Smrg# PREFIX and SUFFIX must not contain globbing or regex special 690932001f49Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 691032001f49Smrg# dot (in which case that matches only a dot). 691132001f49Smrg# 691232001f49Smrg# This function is identical to the (non-XSI) version of func_stripname, 691332001f49Smrg# except this one can be used by m4 code that may be executed by configure, 691432001f49Smrg# rather than the libtool script. 691532001f49Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 691632001f49SmrgAC_REQUIRE([_LT_DECL_SED]) 691732001f49SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 691832001f49Smrgfunc_stripname_cnf () 691932001f49Smrg{ 692032001f49Smrg case ${2} in 692132001f49Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 692232001f49Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 692332001f49Smrg esac 692432001f49Smrg} # func_stripname_cnf 692532001f49Smrg])# _LT_FUNC_STRIPNAME_CNF 692632001f49Smrg 692732001f49Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 692832001f49Smrg# --------------------------------- 692932001f49Smrg# Figure out "hidden" library dependencies from verbose 693032001f49Smrg# compiler output when linking a shared library. 693132001f49Smrg# Parse the compiler output and extract the necessary 693232001f49Smrg# objects, libraries and library flags. 693332001f49Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 693432001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 693532001f49SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 693632001f49Smrg# Dependencies to place before and after the object being linked: 693732001f49Smrg_LT_TAGVAR(predep_objects, $1)= 693832001f49Smrg_LT_TAGVAR(postdep_objects, $1)= 693932001f49Smrg_LT_TAGVAR(predeps, $1)= 694032001f49Smrg_LT_TAGVAR(postdeps, $1)= 694132001f49Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 694232001f49Smrg 694332001f49Smrgdnl we can't use the lt_simple_compile_test_code here, 694432001f49Smrgdnl because it contains code intended for an executable, 694532001f49Smrgdnl not a library. It's possible we should let each 694632001f49Smrgdnl tag define a new lt_????_link_test_code variable, 694732001f49Smrgdnl but it's only used here... 694832001f49Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 694932001f49Smrgint a; 695032001f49Smrgvoid foo (void) { a = 0; } 695132001f49Smrg_LT_EOF 695232001f49Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 695332001f49Smrgclass Foo 695432001f49Smrg{ 695532001f49Smrgpublic: 695632001f49Smrg Foo (void) { a = 0; } 695732001f49Smrgprivate: 695832001f49Smrg int a; 695932001f49Smrg}; 696032001f49Smrg_LT_EOF 696132001f49Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 696232001f49Smrg subroutine foo 696332001f49Smrg implicit none 696432001f49Smrg integer*4 a 696532001f49Smrg a=0 696632001f49Smrg return 696732001f49Smrg end 696832001f49Smrg_LT_EOF 696932001f49Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 697032001f49Smrg subroutine foo 697132001f49Smrg implicit none 697232001f49Smrg integer a 697332001f49Smrg a=0 697432001f49Smrg return 697532001f49Smrg end 697632001f49Smrg_LT_EOF 697732001f49Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 697832001f49Smrgpublic class foo { 697932001f49Smrg private int a; 698032001f49Smrg public void bar (void) { 698132001f49Smrg a = 0; 698232001f49Smrg } 698332001f49Smrg}; 698432001f49Smrg_LT_EOF 698532001f49Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 698632001f49Smrgpackage foo 698732001f49Smrgfunc foo() { 698832001f49Smrg} 698932001f49Smrg_LT_EOF 699032001f49Smrg]) 699132001f49Smrg 699232001f49Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 699332001f49Smrgcase "$CC $CFLAGS " in #( 699432001f49Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 699532001f49Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 699632001f49Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 699732001f49Smrgesac 699832001f49Smrg 699932001f49Smrgdnl Parse the compiler output and extract the necessary 700032001f49Smrgdnl objects, libraries and library flags. 700132001f49Smrgif AC_TRY_EVAL(ac_compile); then 700232001f49Smrg # Parse the compiler output and extract the necessary 700332001f49Smrg # objects, libraries and library flags. 700432001f49Smrg 700532001f49Smrg # Sentinel used to keep track of whether or not we are before 700632001f49Smrg # the conftest object file. 700732001f49Smrg pre_test_object_deps_done=no 700832001f49Smrg 700932001f49Smrg for p in `eval "$output_verbose_link_cmd"`; do 701032001f49Smrg case ${prev}${p} in 701132001f49Smrg 701232001f49Smrg -L* | -R* | -l*) 701332001f49Smrg # Some compilers place space between "-{L,R}" and the path. 701432001f49Smrg # Remove the space. 701532001f49Smrg if test $p = "-L" || 701632001f49Smrg test $p = "-R"; then 701732001f49Smrg prev=$p 701832001f49Smrg continue 701932001f49Smrg fi 702032001f49Smrg 702132001f49Smrg # Expand the sysroot to ease extracting the directories later. 702232001f49Smrg if test -z "$prev"; then 702332001f49Smrg case $p in 702432001f49Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 702532001f49Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 702632001f49Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 702732001f49Smrg esac 702832001f49Smrg fi 702932001f49Smrg case $p in 703032001f49Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 703132001f49Smrg esac 703232001f49Smrg if test "$pre_test_object_deps_done" = no; then 703332001f49Smrg case ${prev} in 703432001f49Smrg -L | -R) 703532001f49Smrg # Internal compiler library paths should come after those 703632001f49Smrg # provided the user. The postdeps already come after the 703732001f49Smrg # user supplied libs so there is no need to process them. 703832001f49Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 703932001f49Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 704032001f49Smrg else 704132001f49Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 704232001f49Smrg fi 704332001f49Smrg ;; 704432001f49Smrg # The "-l" case would never come before the object being 704532001f49Smrg # linked, so don't bother handling this case. 704632001f49Smrg esac 704732001f49Smrg else 704832001f49Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 704932001f49Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 705032001f49Smrg else 705132001f49Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 705232001f49Smrg fi 705332001f49Smrg fi 705432001f49Smrg prev= 705532001f49Smrg ;; 705632001f49Smrg 705732001f49Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 705832001f49Smrg *.$objext) 705932001f49Smrg # This assumes that the test object file only shows up 706032001f49Smrg # once in the compiler output. 706132001f49Smrg if test "$p" = "conftest.$objext"; then 706232001f49Smrg pre_test_object_deps_done=yes 706332001f49Smrg continue 706432001f49Smrg fi 706532001f49Smrg 706632001f49Smrg if test "$pre_test_object_deps_done" = no; then 706732001f49Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 706832001f49Smrg _LT_TAGVAR(predep_objects, $1)="$p" 706932001f49Smrg else 707032001f49Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 707132001f49Smrg fi 707232001f49Smrg else 707332001f49Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 707432001f49Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 707532001f49Smrg else 707632001f49Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 707732001f49Smrg fi 707832001f49Smrg fi 707932001f49Smrg ;; 708032001f49Smrg 708132001f49Smrg *) ;; # Ignore the rest. 708232001f49Smrg 708332001f49Smrg esac 708432001f49Smrg done 708532001f49Smrg 708632001f49Smrg # Clean up. 708732001f49Smrg rm -f a.out a.exe 708832001f49Smrgelse 708932001f49Smrg echo "libtool.m4: error: problem compiling $1 test program" 709032001f49Smrgfi 709132001f49Smrg 709232001f49Smrg$RM -f confest.$objext 709332001f49SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709432001f49Smrg 709532001f49Smrg# PORTME: override above test on systems where it is broken 709632001f49Smrgm4_if([$1], [CXX], 709732001f49Smrg[case $host_os in 709832001f49Smrginterix[[3-9]]*) 709932001f49Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 710032001f49Smrg # hack all around it, let's just trust "g++" to DTRT. 710132001f49Smrg _LT_TAGVAR(predep_objects,$1)= 710232001f49Smrg _LT_TAGVAR(postdep_objects,$1)= 710332001f49Smrg _LT_TAGVAR(postdeps,$1)= 710432001f49Smrg ;; 710532001f49Smrg 710632001f49Smrglinux*) 710732001f49Smrg case `$CC -V 2>&1 | sed 5q` in 710832001f49Smrg *Sun\ C*) 710932001f49Smrg # Sun C++ 5.9 711032001f49Smrg 711132001f49Smrg # The more standards-conforming stlport4 library is 711232001f49Smrg # incompatible with the Cstd library. Avoid specifying 711332001f49Smrg # it if it's in CXXFLAGS. Ignore libCrun as 711432001f49Smrg # -library=stlport4 depends on it. 711532001f49Smrg case " $CXX $CXXFLAGS " in 711632001f49Smrg *" -library=stlport4 "*) 711732001f49Smrg solaris_use_stlport4=yes 711832001f49Smrg ;; 711932001f49Smrg esac 712032001f49Smrg 712132001f49Smrg if test "$solaris_use_stlport4" != yes; then 712232001f49Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 712332001f49Smrg fi 712432001f49Smrg ;; 712532001f49Smrg esac 712632001f49Smrg ;; 712732001f49Smrg 712832001f49Smrgsolaris*) 712932001f49Smrg case $cc_basename in 713032001f49Smrg CC* | sunCC*) 713132001f49Smrg # The more standards-conforming stlport4 library is 713232001f49Smrg # incompatible with the Cstd library. Avoid specifying 713332001f49Smrg # it if it's in CXXFLAGS. Ignore libCrun as 713432001f49Smrg # -library=stlport4 depends on it. 713532001f49Smrg case " $CXX $CXXFLAGS " in 713632001f49Smrg *" -library=stlport4 "*) 713732001f49Smrg solaris_use_stlport4=yes 713832001f49Smrg ;; 713932001f49Smrg esac 714032001f49Smrg 714132001f49Smrg # Adding this requires a known-good setup of shared libraries for 714232001f49Smrg # Sun compiler versions before 5.6, else PIC objects from an old 714332001f49Smrg # archive will be linked into the output, leading to subtle bugs. 714432001f49Smrg if test "$solaris_use_stlport4" != yes; then 714532001f49Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 714632001f49Smrg fi 714732001f49Smrg ;; 714832001f49Smrg esac 714932001f49Smrg ;; 715032001f49Smrgesac 715132001f49Smrg]) 715232001f49Smrg 715332001f49Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 715432001f49Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 715532001f49Smrgesac 715632001f49Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 715732001f49Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 715832001f49Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 715932001f49Smrgfi 716032001f49Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 716132001f49Smrg [The directories searched by this compiler when creating a shared library]) 716232001f49Smrg_LT_TAGDECL([], [predep_objects], [1], 716332001f49Smrg [Dependencies to place before and after the objects being linked to 716432001f49Smrg create a shared library]) 716532001f49Smrg_LT_TAGDECL([], [postdep_objects], [1]) 716632001f49Smrg_LT_TAGDECL([], [predeps], [1]) 716732001f49Smrg_LT_TAGDECL([], [postdeps], [1]) 716832001f49Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 716932001f49Smrg [The library search path used internally by the compiler when linking 717032001f49Smrg a shared library]) 717132001f49Smrg])# _LT_SYS_HIDDEN_LIBDEPS 717232001f49Smrg 717332001f49Smrg 717432001f49Smrg# _LT_LANG_F77_CONFIG([TAG]) 717532001f49Smrg# -------------------------- 717632001f49Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 717732001f49Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 717832001f49Smrg# to write the compiler configuration to `libtool'. 717932001f49Smrgm4_defun([_LT_LANG_F77_CONFIG], 718032001f49Smrg[AC_LANG_PUSH(Fortran 77) 718132001f49Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 718232001f49Smrg _lt_disable_F77=yes 718332001f49Smrgfi 718432001f49Smrg 718532001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 718632001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 718732001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no 718832001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 718932001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 719032001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no 719132001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 719232001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 719332001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 719432001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 719532001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 719632001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no 719732001f49Smrg_LT_TAGVAR(module_cmds, $1)= 719832001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 719932001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 720032001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 720132001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 720232001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 720332001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)= 720432001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 720532001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 720632001f49Smrg 720732001f49Smrg# Source file extension for f77 test sources. 720832001f49Smrgac_ext=f 720932001f49Smrg 721032001f49Smrg# Object file extension for compiled f77 test sources. 721132001f49Smrgobjext=o 721232001f49Smrg_LT_TAGVAR(objext, $1)=$objext 721332001f49Smrg 721432001f49Smrg# No sense in running all these tests if we already determined that 721532001f49Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 721632001f49Smrg# are currently assumed to apply to all compilers on this platform, 721732001f49Smrg# and will be corrupted by setting them based on a non-working compiler. 721832001f49Smrgif test "$_lt_disable_F77" != yes; then 721932001f49Smrg # Code to be used in simple compile tests 722032001f49Smrg lt_simple_compile_test_code="\ 722132001f49Smrg subroutine t 722232001f49Smrg return 722332001f49Smrg end 722432001f49Smrg" 722532001f49Smrg 722632001f49Smrg # Code to be used in simple link tests 722732001f49Smrg lt_simple_link_test_code="\ 722832001f49Smrg program t 722932001f49Smrg end 723032001f49Smrg" 723132001f49Smrg 723232001f49Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 723332001f49Smrg _LT_TAG_COMPILER 723432001f49Smrg 723532001f49Smrg # save warnings/boilerplate of simple test code 723632001f49Smrg _LT_COMPILER_BOILERPLATE 723732001f49Smrg _LT_LINKER_BOILERPLATE 723832001f49Smrg 723932001f49Smrg # Allow CC to be a program name with arguments. 724032001f49Smrg lt_save_CC="$CC" 724132001f49Smrg lt_save_GCC=$GCC 724232001f49Smrg lt_save_CFLAGS=$CFLAGS 724332001f49Smrg CC=${F77-"f77"} 724432001f49Smrg CFLAGS=$FFLAGS 724532001f49Smrg compiler=$CC 724632001f49Smrg _LT_TAGVAR(compiler, $1)=$CC 724732001f49Smrg _LT_CC_BASENAME([$compiler]) 724832001f49Smrg GCC=$G77 724932001f49Smrg if test -n "$compiler"; then 725032001f49Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 725132001f49Smrg AC_MSG_RESULT([$can_build_shared]) 725232001f49Smrg 725332001f49Smrg AC_MSG_CHECKING([whether to build shared libraries]) 725432001f49Smrg test "$can_build_shared" = "no" && enable_shared=no 725532001f49Smrg 725632001f49Smrg # On AIX, shared libraries and static libraries use the same namespace, and 725732001f49Smrg # are all built from PIC. 725832001f49Smrg case $host_os in 725932001f49Smrg aix3*) 726032001f49Smrg test "$enable_shared" = yes && enable_static=no 726132001f49Smrg if test -n "$RANLIB"; then 726232001f49Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 726332001f49Smrg postinstall_cmds='$RANLIB $lib' 726432001f49Smrg fi 726532001f49Smrg ;; 726632001f49Smrg aix[[4-9]]*) 726732001f49Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 726832001f49Smrg test "$enable_shared" = yes && enable_static=no 726932001f49Smrg fi 727032001f49Smrg ;; 727132001f49Smrg esac 727232001f49Smrg AC_MSG_RESULT([$enable_shared]) 727332001f49Smrg 727432001f49Smrg AC_MSG_CHECKING([whether to build static libraries]) 727532001f49Smrg # Make sure either enable_shared or enable_static is yes. 727632001f49Smrg test "$enable_shared" = yes || enable_static=yes 727732001f49Smrg AC_MSG_RESULT([$enable_static]) 727832001f49Smrg 727932001f49Smrg _LT_TAGVAR(GCC, $1)="$G77" 728032001f49Smrg _LT_TAGVAR(LD, $1)="$LD" 728132001f49Smrg 728232001f49Smrg ## CAVEAT EMPTOR: 728332001f49Smrg ## There is no encapsulation within the following macros, do not change 728432001f49Smrg ## the running order or otherwise move them around unless you know exactly 728532001f49Smrg ## what you are doing... 728632001f49Smrg _LT_COMPILER_PIC($1) 728732001f49Smrg _LT_COMPILER_C_O($1) 728832001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 728932001f49Smrg _LT_LINKER_SHLIBS($1) 729032001f49Smrg _LT_SYS_DYNAMIC_LINKER($1) 729132001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 729232001f49Smrg 729332001f49Smrg _LT_CONFIG($1) 729432001f49Smrg fi # test -n "$compiler" 729532001f49Smrg 729632001f49Smrg GCC=$lt_save_GCC 729732001f49Smrg CC="$lt_save_CC" 729832001f49Smrg CFLAGS="$lt_save_CFLAGS" 729932001f49Smrgfi # test "$_lt_disable_F77" != yes 730032001f49Smrg 730132001f49SmrgAC_LANG_POP 730232001f49Smrg])# _LT_LANG_F77_CONFIG 730332001f49Smrg 730432001f49Smrg 730532001f49Smrg# _LT_LANG_FC_CONFIG([TAG]) 730632001f49Smrg# ------------------------- 730732001f49Smrg# Ensure that the configuration variables for a Fortran compiler are 730832001f49Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 730932001f49Smrg# to write the compiler configuration to `libtool'. 731032001f49Smrgm4_defun([_LT_LANG_FC_CONFIG], 731132001f49Smrg[AC_LANG_PUSH(Fortran) 731232001f49Smrg 731332001f49Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 731432001f49Smrg _lt_disable_FC=yes 731532001f49Smrgfi 731632001f49Smrg 731732001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 731832001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 731932001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no 732032001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 732132001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 732232001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no 732332001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 732432001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 732532001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 732632001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 732732001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 732832001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no 732932001f49Smrg_LT_TAGVAR(module_cmds, $1)= 733032001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 733132001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 733232001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 733332001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 733432001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 733532001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)= 733632001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 733732001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 733832001f49Smrg 733932001f49Smrg# Source file extension for fc test sources. 734032001f49Smrgac_ext=${ac_fc_srcext-f} 734132001f49Smrg 734232001f49Smrg# Object file extension for compiled fc test sources. 734332001f49Smrgobjext=o 734432001f49Smrg_LT_TAGVAR(objext, $1)=$objext 734532001f49Smrg 734632001f49Smrg# No sense in running all these tests if we already determined that 734732001f49Smrg# the FC compiler isn't working. Some variables (like enable_shared) 734832001f49Smrg# are currently assumed to apply to all compilers on this platform, 734932001f49Smrg# and will be corrupted by setting them based on a non-working compiler. 735032001f49Smrgif test "$_lt_disable_FC" != yes; then 735132001f49Smrg # Code to be used in simple compile tests 735232001f49Smrg lt_simple_compile_test_code="\ 735332001f49Smrg subroutine t 735432001f49Smrg return 735532001f49Smrg end 735632001f49Smrg" 735732001f49Smrg 735832001f49Smrg # Code to be used in simple link tests 735932001f49Smrg lt_simple_link_test_code="\ 736032001f49Smrg program t 736132001f49Smrg end 736232001f49Smrg" 736332001f49Smrg 736432001f49Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 736532001f49Smrg _LT_TAG_COMPILER 736632001f49Smrg 736732001f49Smrg # save warnings/boilerplate of simple test code 736832001f49Smrg _LT_COMPILER_BOILERPLATE 736932001f49Smrg _LT_LINKER_BOILERPLATE 737032001f49Smrg 737132001f49Smrg # Allow CC to be a program name with arguments. 737232001f49Smrg lt_save_CC="$CC" 737332001f49Smrg lt_save_GCC=$GCC 737432001f49Smrg lt_save_CFLAGS=$CFLAGS 737532001f49Smrg CC=${FC-"f95"} 737632001f49Smrg CFLAGS=$FCFLAGS 737732001f49Smrg compiler=$CC 737832001f49Smrg GCC=$ac_cv_fc_compiler_gnu 737932001f49Smrg 738032001f49Smrg _LT_TAGVAR(compiler, $1)=$CC 738132001f49Smrg _LT_CC_BASENAME([$compiler]) 738232001f49Smrg 738332001f49Smrg if test -n "$compiler"; then 738432001f49Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 738532001f49Smrg AC_MSG_RESULT([$can_build_shared]) 738632001f49Smrg 738732001f49Smrg AC_MSG_CHECKING([whether to build shared libraries]) 738832001f49Smrg test "$can_build_shared" = "no" && enable_shared=no 738932001f49Smrg 739032001f49Smrg # On AIX, shared libraries and static libraries use the same namespace, and 739132001f49Smrg # are all built from PIC. 739232001f49Smrg case $host_os in 739332001f49Smrg aix3*) 739432001f49Smrg test "$enable_shared" = yes && enable_static=no 739532001f49Smrg if test -n "$RANLIB"; then 739632001f49Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 739732001f49Smrg postinstall_cmds='$RANLIB $lib' 739832001f49Smrg fi 739932001f49Smrg ;; 740032001f49Smrg aix[[4-9]]*) 740132001f49Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 740232001f49Smrg test "$enable_shared" = yes && enable_static=no 740332001f49Smrg fi 740432001f49Smrg ;; 740532001f49Smrg esac 740632001f49Smrg AC_MSG_RESULT([$enable_shared]) 740732001f49Smrg 740832001f49Smrg AC_MSG_CHECKING([whether to build static libraries]) 740932001f49Smrg # Make sure either enable_shared or enable_static is yes. 741032001f49Smrg test "$enable_shared" = yes || enable_static=yes 741132001f49Smrg AC_MSG_RESULT([$enable_static]) 741232001f49Smrg 741332001f49Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 741432001f49Smrg _LT_TAGVAR(LD, $1)="$LD" 741532001f49Smrg 741632001f49Smrg ## CAVEAT EMPTOR: 741732001f49Smrg ## There is no encapsulation within the following macros, do not change 741832001f49Smrg ## the running order or otherwise move them around unless you know exactly 741932001f49Smrg ## what you are doing... 742032001f49Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 742132001f49Smrg _LT_COMPILER_PIC($1) 742232001f49Smrg _LT_COMPILER_C_O($1) 742332001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 742432001f49Smrg _LT_LINKER_SHLIBS($1) 742532001f49Smrg _LT_SYS_DYNAMIC_LINKER($1) 742632001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 742732001f49Smrg 742832001f49Smrg _LT_CONFIG($1) 742932001f49Smrg fi # test -n "$compiler" 743032001f49Smrg 743132001f49Smrg GCC=$lt_save_GCC 743232001f49Smrg CC=$lt_save_CC 743332001f49Smrg CFLAGS=$lt_save_CFLAGS 743432001f49Smrgfi # test "$_lt_disable_FC" != yes 743532001f49Smrg 743632001f49SmrgAC_LANG_POP 743732001f49Smrg])# _LT_LANG_FC_CONFIG 743832001f49Smrg 743932001f49Smrg 744032001f49Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 744132001f49Smrg# -------------------------- 744232001f49Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 744332001f49Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 744432001f49Smrg# to write the compiler configuration to `libtool'. 744532001f49Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 744632001f49Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 744732001f49SmrgAC_LANG_SAVE 744832001f49Smrg 744932001f49Smrg# Source file extension for Java test sources. 745032001f49Smrgac_ext=java 745132001f49Smrg 745232001f49Smrg# Object file extension for compiled Java test sources. 745332001f49Smrgobjext=o 745432001f49Smrg_LT_TAGVAR(objext, $1)=$objext 745532001f49Smrg 745632001f49Smrg# Code to be used in simple compile tests 745732001f49Smrglt_simple_compile_test_code="class foo {}" 745832001f49Smrg 745932001f49Smrg# Code to be used in simple link tests 746032001f49Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746132001f49Smrg 746232001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 746332001f49Smrg_LT_TAG_COMPILER 746432001f49Smrg 746532001f49Smrg# save warnings/boilerplate of simple test code 746632001f49Smrg_LT_COMPILER_BOILERPLATE 746732001f49Smrg_LT_LINKER_BOILERPLATE 746832001f49Smrg 746932001f49Smrg# Allow CC to be a program name with arguments. 747032001f49Smrglt_save_CC=$CC 747132001f49Smrglt_save_CFLAGS=$CFLAGS 747232001f49Smrglt_save_GCC=$GCC 747332001f49SmrgGCC=yes 747432001f49SmrgCC=${GCJ-"gcj"} 747532001f49SmrgCFLAGS=$GCJFLAGS 747632001f49Smrgcompiler=$CC 747732001f49Smrg_LT_TAGVAR(compiler, $1)=$CC 747832001f49Smrg_LT_TAGVAR(LD, $1)="$LD" 747932001f49Smrg_LT_CC_BASENAME([$compiler]) 748032001f49Smrg 748132001f49Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 748232001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 748332001f49Smrg 748432001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 748532001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 748632001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 748732001f49Smrg 748832001f49Smrg## CAVEAT EMPTOR: 748932001f49Smrg## There is no encapsulation within the following macros, do not change 749032001f49Smrg## the running order or otherwise move them around unless you know exactly 749132001f49Smrg## what you are doing... 749232001f49Smrgif test -n "$compiler"; then 749332001f49Smrg _LT_COMPILER_NO_RTTI($1) 749432001f49Smrg _LT_COMPILER_PIC($1) 749532001f49Smrg _LT_COMPILER_C_O($1) 749632001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 749732001f49Smrg _LT_LINKER_SHLIBS($1) 749832001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 749932001f49Smrg 750032001f49Smrg _LT_CONFIG($1) 750132001f49Smrgfi 750232001f49Smrg 750332001f49SmrgAC_LANG_RESTORE 750432001f49Smrg 750532001f49SmrgGCC=$lt_save_GCC 750632001f49SmrgCC=$lt_save_CC 750732001f49SmrgCFLAGS=$lt_save_CFLAGS 750832001f49Smrg])# _LT_LANG_GCJ_CONFIG 750932001f49Smrg 751032001f49Smrg 751132001f49Smrg# _LT_LANG_GO_CONFIG([TAG]) 751232001f49Smrg# -------------------------- 751332001f49Smrg# Ensure that the configuration variables for the GNU Go compiler 751432001f49Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 751532001f49Smrg# to write the compiler configuration to `libtool'. 751632001f49Smrgm4_defun([_LT_LANG_GO_CONFIG], 751732001f49Smrg[AC_REQUIRE([LT_PROG_GO])dnl 751832001f49SmrgAC_LANG_SAVE 751932001f49Smrg 752032001f49Smrg# Source file extension for Go test sources. 752132001f49Smrgac_ext=go 752232001f49Smrg 752332001f49Smrg# Object file extension for compiled Go test sources. 752432001f49Smrgobjext=o 752532001f49Smrg_LT_TAGVAR(objext, $1)=$objext 752632001f49Smrg 752732001f49Smrg# Code to be used in simple compile tests 752832001f49Smrglt_simple_compile_test_code="package main; func main() { }" 752932001f49Smrg 753032001f49Smrg# Code to be used in simple link tests 753132001f49Smrglt_simple_link_test_code='package main; func main() { }' 753232001f49Smrg 753332001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 753432001f49Smrg_LT_TAG_COMPILER 753532001f49Smrg 753632001f49Smrg# save warnings/boilerplate of simple test code 753732001f49Smrg_LT_COMPILER_BOILERPLATE 753832001f49Smrg_LT_LINKER_BOILERPLATE 753932001f49Smrg 754032001f49Smrg# Allow CC to be a program name with arguments. 754132001f49Smrglt_save_CC=$CC 754232001f49Smrglt_save_CFLAGS=$CFLAGS 754332001f49Smrglt_save_GCC=$GCC 754432001f49SmrgGCC=yes 754532001f49SmrgCC=${GOC-"gccgo"} 754632001f49SmrgCFLAGS=$GOFLAGS 754732001f49Smrgcompiler=$CC 754832001f49Smrg_LT_TAGVAR(compiler, $1)=$CC 754932001f49Smrg_LT_TAGVAR(LD, $1)="$LD" 755032001f49Smrg_LT_CC_BASENAME([$compiler]) 755132001f49Smrg 755232001f49Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 755332001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 755432001f49Smrg 755532001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 755632001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 755732001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755832001f49Smrg 755932001f49Smrg## CAVEAT EMPTOR: 756032001f49Smrg## There is no encapsulation within the following macros, do not change 756132001f49Smrg## the running order or otherwise move them around unless you know exactly 756232001f49Smrg## what you are doing... 756332001f49Smrgif test -n "$compiler"; then 756432001f49Smrg _LT_COMPILER_NO_RTTI($1) 756532001f49Smrg _LT_COMPILER_PIC($1) 756632001f49Smrg _LT_COMPILER_C_O($1) 756732001f49Smrg _LT_COMPILER_FILE_LOCKS($1) 756832001f49Smrg _LT_LINKER_SHLIBS($1) 756932001f49Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 757032001f49Smrg 757132001f49Smrg _LT_CONFIG($1) 757232001f49Smrgfi 757332001f49Smrg 757432001f49SmrgAC_LANG_RESTORE 757532001f49Smrg 757632001f49SmrgGCC=$lt_save_GCC 757732001f49SmrgCC=$lt_save_CC 757832001f49SmrgCFLAGS=$lt_save_CFLAGS 757932001f49Smrg])# _LT_LANG_GO_CONFIG 758032001f49Smrg 758132001f49Smrg 758232001f49Smrg# _LT_LANG_RC_CONFIG([TAG]) 758332001f49Smrg# ------------------------- 758432001f49Smrg# Ensure that the configuration variables for the Windows resource compiler 758532001f49Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 758632001f49Smrg# to write the compiler configuration to `libtool'. 758732001f49Smrgm4_defun([_LT_LANG_RC_CONFIG], 758832001f49Smrg[AC_REQUIRE([LT_PROG_RC])dnl 758932001f49SmrgAC_LANG_SAVE 759032001f49Smrg 759132001f49Smrg# Source file extension for RC test sources. 759232001f49Smrgac_ext=rc 759332001f49Smrg 759432001f49Smrg# Object file extension for compiled RC test sources. 759532001f49Smrgobjext=o 759632001f49Smrg_LT_TAGVAR(objext, $1)=$objext 759732001f49Smrg 759832001f49Smrg# Code to be used in simple compile tests 759932001f49Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 760032001f49Smrg 760132001f49Smrg# Code to be used in simple link tests 760232001f49Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 760332001f49Smrg 760432001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 760532001f49Smrg_LT_TAG_COMPILER 760632001f49Smrg 760732001f49Smrg# save warnings/boilerplate of simple test code 760832001f49Smrg_LT_COMPILER_BOILERPLATE 760932001f49Smrg_LT_LINKER_BOILERPLATE 761032001f49Smrg 761132001f49Smrg# Allow CC to be a program name with arguments. 761232001f49Smrglt_save_CC="$CC" 761332001f49Smrglt_save_CFLAGS=$CFLAGS 761432001f49Smrglt_save_GCC=$GCC 761532001f49SmrgGCC= 761632001f49SmrgCC=${RC-"windres"} 761732001f49SmrgCFLAGS= 761832001f49Smrgcompiler=$CC 761932001f49Smrg_LT_TAGVAR(compiler, $1)=$CC 762032001f49Smrg_LT_CC_BASENAME([$compiler]) 762132001f49Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 762232001f49Smrg 762332001f49Smrgif test -n "$compiler"; then 762432001f49Smrg : 762532001f49Smrg _LT_CONFIG($1) 762632001f49Smrgfi 762732001f49Smrg 762832001f49SmrgGCC=$lt_save_GCC 762932001f49SmrgAC_LANG_RESTORE 763032001f49SmrgCC=$lt_save_CC 763132001f49SmrgCFLAGS=$lt_save_CFLAGS 763232001f49Smrg])# _LT_LANG_RC_CONFIG 763332001f49Smrg 763432001f49Smrg 763532001f49Smrg# LT_PROG_GCJ 763632001f49Smrg# ----------- 763732001f49SmrgAC_DEFUN([LT_PROG_GCJ], 763832001f49Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 763932001f49Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 764032001f49Smrg [AC_CHECK_TOOL(GCJ, gcj,) 764132001f49Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 764232001f49Smrg AC_SUBST(GCJFLAGS)])])[]dnl 764332001f49Smrg]) 764432001f49Smrg 764532001f49Smrg# Old name: 764632001f49SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 764732001f49Smrgdnl aclocal-1.4 backwards compatibility: 764832001f49Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 764932001f49Smrg 765032001f49Smrg 765132001f49Smrg# LT_PROG_GO 765232001f49Smrg# ---------- 765332001f49SmrgAC_DEFUN([LT_PROG_GO], 765432001f49Smrg[AC_CHECK_TOOL(GOC, gccgo,) 765532001f49Smrg]) 765632001f49Smrg 765732001f49Smrg 765832001f49Smrg# LT_PROG_RC 765932001f49Smrg# ---------- 766032001f49SmrgAC_DEFUN([LT_PROG_RC], 766132001f49Smrg[AC_CHECK_TOOL(RC, windres,) 766232001f49Smrg]) 766332001f49Smrg 766432001f49Smrg# Old name: 766532001f49SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 766632001f49Smrgdnl aclocal-1.4 backwards compatibility: 766732001f49Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 766832001f49Smrg 766932001f49Smrg 767032001f49Smrg# _LT_DECL_EGREP 767132001f49Smrg# -------------- 767232001f49Smrg# If we don't have a new enough Autoconf to choose the best grep 767332001f49Smrg# available, choose the one first in the user's PATH. 767432001f49Smrgm4_defun([_LT_DECL_EGREP], 767532001f49Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 767632001f49SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 767732001f49Smrgtest -z "$GREP" && GREP=grep 767832001f49Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 767932001f49Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 768032001f49Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 768132001f49Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 768232001f49SmrgAC_SUBST([GREP]) 768332001f49Smrg]) 768432001f49Smrg 768532001f49Smrg 768632001f49Smrg# _LT_DECL_OBJDUMP 768732001f49Smrg# -------------- 768832001f49Smrg# If we don't have a new enough Autoconf to choose the best objdump 768932001f49Smrg# available, choose the one first in the user's PATH. 769032001f49Smrgm4_defun([_LT_DECL_OBJDUMP], 769132001f49Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 769232001f49Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 769332001f49Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 769432001f49SmrgAC_SUBST([OBJDUMP]) 769532001f49Smrg]) 769632001f49Smrg 769732001f49Smrg# _LT_DECL_DLLTOOL 769832001f49Smrg# ---------------- 769932001f49Smrg# Ensure DLLTOOL variable is set. 770032001f49Smrgm4_defun([_LT_DECL_DLLTOOL], 770132001f49Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 770232001f49Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 770332001f49Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 770432001f49SmrgAC_SUBST([DLLTOOL]) 770532001f49Smrg]) 770632001f49Smrg 770732001f49Smrg# _LT_DECL_SED 770832001f49Smrg# ------------ 770932001f49Smrg# Check for a fully-functional sed program, that truncates 771032001f49Smrg# as few characters as possible. Prefer GNU sed if found. 771132001f49Smrgm4_defun([_LT_DECL_SED], 771232001f49Smrg[AC_PROG_SED 771332001f49Smrgtest -z "$SED" && SED=sed 771432001f49SmrgXsed="$SED -e 1s/^X//" 771532001f49Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 771632001f49Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 771732001f49Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 771832001f49Smrg])# _LT_DECL_SED 771932001f49Smrg 772032001f49Smrgm4_ifndef([AC_PROG_SED], [ 772132001f49Smrg############################################################ 772232001f49Smrg# NOTE: This macro has been submitted for inclusion into # 772332001f49Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 772432001f49Smrg# a released version of Autoconf we should remove this # 772532001f49Smrg# macro and use it instead. # 772632001f49Smrg############################################################ 772732001f49Smrg 772832001f49Smrgm4_defun([AC_PROG_SED], 772932001f49Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 773032001f49SmrgAC_CACHE_VAL(lt_cv_path_SED, 773132001f49Smrg[# Loop through the user's path and test for sed and gsed. 773232001f49Smrg# Then use that list of sed's as ones to test for truncation. 773332001f49Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 773432001f49Smrgfor as_dir in $PATH 773532001f49Smrgdo 773632001f49Smrg IFS=$as_save_IFS 773732001f49Smrg test -z "$as_dir" && as_dir=. 773832001f49Smrg for lt_ac_prog in sed gsed; do 773932001f49Smrg for ac_exec_ext in '' $ac_executable_extensions; do 774032001f49Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 774132001f49Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 774232001f49Smrg fi 774332001f49Smrg done 774432001f49Smrg done 774532001f49Smrgdone 774632001f49SmrgIFS=$as_save_IFS 774732001f49Smrglt_ac_max=0 774832001f49Smrglt_ac_count=0 774932001f49Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 775032001f49Smrg# along with /bin/sed that truncates output. 775132001f49Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 775232001f49Smrg test ! -f $lt_ac_sed && continue 775332001f49Smrg cat /dev/null > conftest.in 775432001f49Smrg lt_ac_count=0 775532001f49Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 775632001f49Smrg # Check for GNU sed and select it if it is found. 775732001f49Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 775832001f49Smrg lt_cv_path_SED=$lt_ac_sed 775932001f49Smrg break 776032001f49Smrg fi 776132001f49Smrg while true; do 776232001f49Smrg cat conftest.in conftest.in >conftest.tmp 776332001f49Smrg mv conftest.tmp conftest.in 776432001f49Smrg cp conftest.in conftest.nl 776532001f49Smrg echo >>conftest.nl 776632001f49Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 776732001f49Smrg cmp -s conftest.out conftest.nl || break 776832001f49Smrg # 10000 chars as input seems more than enough 776932001f49Smrg test $lt_ac_count -gt 10 && break 777032001f49Smrg lt_ac_count=`expr $lt_ac_count + 1` 777132001f49Smrg if test $lt_ac_count -gt $lt_ac_max; then 777232001f49Smrg lt_ac_max=$lt_ac_count 777332001f49Smrg lt_cv_path_SED=$lt_ac_sed 777432001f49Smrg fi 777532001f49Smrg done 777632001f49Smrgdone 777732001f49Smrg]) 777832001f49SmrgSED=$lt_cv_path_SED 777932001f49SmrgAC_SUBST([SED]) 778032001f49SmrgAC_MSG_RESULT([$SED]) 778132001f49Smrg])#AC_PROG_SED 778232001f49Smrg])#m4_ifndef 778332001f49Smrg 778432001f49Smrg# Old name: 778532001f49SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 778632001f49Smrgdnl aclocal-1.4 backwards compatibility: 778732001f49Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 778832001f49Smrg 778932001f49Smrg 779032001f49Smrg# _LT_CHECK_SHELL_FEATURES 779132001f49Smrg# ------------------------ 779232001f49Smrg# Find out whether the shell is Bourne or XSI compatible, 779332001f49Smrg# or has some other useful features. 779432001f49Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 779532001f49Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 779632001f49Smrg# Try some XSI features 779732001f49Smrgxsi_shell=no 779832001f49Smrg( _lt_dummy="a/b/c" 779932001f49Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 780032001f49Smrg = c,a/b,b/c, \ 780132001f49Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 780232001f49Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 780332001f49Smrg && xsi_shell=yes 780432001f49SmrgAC_MSG_RESULT([$xsi_shell]) 780532001f49Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 780632001f49Smrg 780732001f49SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 780832001f49Smrglt_shell_append=no 780932001f49Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 781032001f49Smrg >/dev/null 2>&1 \ 781132001f49Smrg && lt_shell_append=yes 781232001f49SmrgAC_MSG_RESULT([$lt_shell_append]) 781332001f49Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 781432001f49Smrg 781532001f49Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 781632001f49Smrg lt_unset=unset 781732001f49Smrgelse 781832001f49Smrg lt_unset=false 781932001f49Smrgfi 782032001f49Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 782132001f49Smrg 782232001f49Smrg# test EBCDIC or ASCII 782332001f49Smrgcase `echo X|tr X '\101'` in 782432001f49Smrg A) # ASCII based system 782532001f49Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 782632001f49Smrg lt_SP2NL='tr \040 \012' 782732001f49Smrg lt_NL2SP='tr \015\012 \040\040' 782832001f49Smrg ;; 782932001f49Smrg *) # EBCDIC based system 783032001f49Smrg lt_SP2NL='tr \100 \n' 783132001f49Smrg lt_NL2SP='tr \r\n \100\100' 783232001f49Smrg ;; 783332001f49Smrgesac 783432001f49Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 783532001f49Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 783632001f49Smrg])# _LT_CHECK_SHELL_FEATURES 783732001f49Smrg 783832001f49Smrg 783932001f49Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 784032001f49Smrg# ------------------------------------------------------ 784132001f49Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 784232001f49Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 784332001f49Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 784432001f49Smrg[dnl { 784532001f49Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 784632001f49Smrg$1 ()\ 784732001f49Smrg{\ 784832001f49Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 784932001f49Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 785032001f49Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 785132001f49Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 785232001f49Smrgtest 0 -eq $? || _lt_function_replace_fail=: 785332001f49Smrg]) 785432001f49Smrg 785532001f49Smrg 785632001f49Smrg# _LT_PROG_REPLACE_SHELLFNS 785732001f49Smrg# ------------------------- 785832001f49Smrg# Replace existing portable implementations of several shell functions with 785932001f49Smrg# equivalent extended shell implementations where those features are available.. 786032001f49Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 786132001f49Smrg[if test x"$xsi_shell" = xyes; then 786232001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 786332001f49Smrg case ${1} in 786432001f49Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786532001f49Smrg * ) func_dirname_result="${3}" ;; 786632001f49Smrg esac]) 786732001f49Smrg 786832001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 786932001f49Smrg func_basename_result="${1##*/}"]) 787032001f49Smrg 787132001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 787232001f49Smrg case ${1} in 787332001f49Smrg */*) func_dirname_result="${1%/*}${2}" ;; 787432001f49Smrg * ) func_dirname_result="${3}" ;; 787532001f49Smrg esac 787632001f49Smrg func_basename_result="${1##*/}"]) 787732001f49Smrg 787832001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 787932001f49Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 788032001f49Smrg # positional parameters, so assign one to ordinary parameter first. 788132001f49Smrg func_stripname_result=${3} 788232001f49Smrg func_stripname_result=${func_stripname_result#"${1}"} 788332001f49Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 788432001f49Smrg 788532001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 788632001f49Smrg func_split_long_opt_name=${1%%=*} 788732001f49Smrg func_split_long_opt_arg=${1#*=}]) 788832001f49Smrg 788932001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 789032001f49Smrg func_split_short_opt_arg=${1#??} 789132001f49Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 789232001f49Smrg 789332001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 789432001f49Smrg case ${1} in 789532001f49Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 789632001f49Smrg *) func_lo2o_result=${1} ;; 789732001f49Smrg esac]) 789832001f49Smrg 789932001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 790032001f49Smrg 790132001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 790232001f49Smrg 790332001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 790432001f49Smrgfi 790532001f49Smrg 790632001f49Smrgif test x"$lt_shell_append" = xyes; then 790732001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 790832001f49Smrg 790932001f49Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 791032001f49Smrg func_quote_for_eval "${2}" 791132001f49Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 791232001f49Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 791332001f49Smrg 791432001f49Smrg # Save a `func_append' function call where possible by direct use of '+=' 791532001f49Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 791632001f49Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 791732001f49Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 791832001f49Smrg test 0 -eq $? || _lt_function_replace_fail=: 791932001f49Smrgelse 792032001f49Smrg # Save a `func_append' function call even when '+=' is not available 792132001f49Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 792232001f49Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 792332001f49Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 792432001f49Smrg test 0 -eq $? || _lt_function_replace_fail=: 792532001f49Smrgfi 792632001f49Smrg 792732001f49Smrgif test x"$_lt_function_replace_fail" = x":"; then 792832001f49Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 792932001f49Smrgfi 793032001f49Smrg]) 793132001f49Smrg 793232001f49Smrg# _LT_PATH_CONVERSION_FUNCTIONS 793332001f49Smrg# ----------------------------- 793432001f49Smrg# Determine which file name conversion functions should be used by 793532001f49Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 793632001f49Smrg# for certain cross-compile configurations and native mingw. 793732001f49Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 793832001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 793932001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 794032001f49SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 794132001f49SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 794232001f49Smrg[case $host in 794332001f49Smrg *-*-mingw* ) 794432001f49Smrg case $build in 794532001f49Smrg *-*-mingw* ) # actually msys 794632001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 794732001f49Smrg ;; 794832001f49Smrg *-*-cygwin* ) 794932001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 795032001f49Smrg ;; 795132001f49Smrg * ) # otherwise, assume *nix 795232001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 795332001f49Smrg ;; 795432001f49Smrg esac 795532001f49Smrg ;; 795632001f49Smrg *-*-cygwin* ) 795732001f49Smrg case $build in 795832001f49Smrg *-*-mingw* ) # actually msys 795932001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 796032001f49Smrg ;; 796132001f49Smrg *-*-cygwin* ) 796232001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 796332001f49Smrg ;; 796432001f49Smrg * ) # otherwise, assume *nix 796532001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 796632001f49Smrg ;; 796732001f49Smrg esac 796832001f49Smrg ;; 796932001f49Smrg * ) # unhandled hosts (and "normal" native builds) 797032001f49Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 797132001f49Smrg ;; 797232001f49Smrgesac 797332001f49Smrg]) 797432001f49Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 797532001f49SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 797632001f49Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 797732001f49Smrg [0], [convert $build file names to $host format])dnl 797832001f49Smrg 797932001f49SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 798032001f49SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 798132001f49Smrg[#assume ordinary cross tools, or native build. 798232001f49Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 798332001f49Smrgcase $host in 798432001f49Smrg *-*-mingw* ) 798532001f49Smrg case $build in 798632001f49Smrg *-*-mingw* ) # actually msys 798732001f49Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 798832001f49Smrg ;; 798932001f49Smrg esac 799032001f49Smrg ;; 799132001f49Smrgesac 799232001f49Smrg]) 799332001f49Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 799432001f49SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 799532001f49Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 799632001f49Smrg [0], [convert $build files to toolchain format])dnl 799732001f49Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7998