libtool.m4 revision a33c354d
1a33c354dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2a33c354dSmrg# 3a33c354dSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4a33c354dSmrg# Foundation, Inc. 5a33c354dSmrg# Written by Gordon Matzigkeit, 1996 6a33c354dSmrg# 7a33c354dSmrg# This file is free software; the Free Software Foundation gives 8a33c354dSmrg# unlimited permission to copy and/or distribute it, with or without 9a33c354dSmrg# modifications, as long as this notice is preserved. 10a33c354dSmrg 11a33c354dSmrgm4_define([_LT_COPYING], [dnl 12a33c354dSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 13a33c354dSmrg# This is free software; see the source for copying conditions. There is NO 14a33c354dSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15a33c354dSmrg 16a33c354dSmrg# GNU Libtool is free software; you can redistribute it and/or modify 17a33c354dSmrg# it under the terms of the GNU General Public License as published by 18a33c354dSmrg# the Free Software Foundation; either version 2 of of the License, or 19a33c354dSmrg# (at your option) any later version. 20a33c354dSmrg# 21a33c354dSmrg# As a special exception to the GNU General Public License, if you 22a33c354dSmrg# distribute this file as part of a program or library that is built 23a33c354dSmrg# using GNU Libtool, you may include this file under the same 24a33c354dSmrg# distribution terms that you use for the rest of that program. 25a33c354dSmrg# 26a33c354dSmrg# GNU Libtool is distributed in the hope that it will be useful, but 27a33c354dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 28a33c354dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29a33c354dSmrg# GNU General Public License for more details. 30a33c354dSmrg# 31a33c354dSmrg# You should have received a copy of the GNU General Public License 32a33c354dSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 33a33c354dSmrg]) 34a33c354dSmrg 35a33c354dSmrg# serial 59 LT_INIT 36a33c354dSmrg 37a33c354dSmrg 38a33c354dSmrg# LT_PREREQ(VERSION) 39a33c354dSmrg# ------------------ 40a33c354dSmrg# Complain and exit if this libtool version is less that VERSION. 41a33c354dSmrgm4_defun([LT_PREREQ], 42a33c354dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 43a33c354dSmrg [m4_default([$3], 44a33c354dSmrg [m4_fatal([Libtool version $1 or higher is required], 45a33c354dSmrg 63)])], 46a33c354dSmrg [$2])]) 47a33c354dSmrg 48a33c354dSmrg 49a33c354dSmrg# _LT_CHECK_BUILDDIR 50a33c354dSmrg# ------------------ 51a33c354dSmrg# Complain if the absolute build directory name contains unusual characters 52a33c354dSmrgm4_defun([_LT_CHECK_BUILDDIR], 53a33c354dSmrg[case `pwd` in 54a33c354dSmrg *\ * | *\ *) 55a33c354dSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 56a33c354dSmrgesac 57a33c354dSmrg]) 58a33c354dSmrg 59a33c354dSmrg 60a33c354dSmrg# LT_INIT([OPTIONS]) 61a33c354dSmrg# ------------------ 62a33c354dSmrgAC_DEFUN([LT_INIT], 63a33c354dSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 64a33c354dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 65a33c354dSmrgAC_BEFORE([$0], [LT_LANG])dnl 66a33c354dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 67a33c354dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 68a33c354dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 69a33c354dSmrg 70a33c354dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 71a33c354dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 72a33c354dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 73a33c354dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 74a33c354dSmrgdnl unless we require an AC_DEFUNed macro: 75a33c354dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 76a33c354dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 77a33c354dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 78a33c354dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 79a33c354dSmrgm4_require([_LT_PROG_LTMAIN])dnl 80a33c354dSmrg 81a33c354dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 82a33c354dSmrg 83a33c354dSmrgdnl Parse OPTIONS 84a33c354dSmrg_LT_SET_OPTIONS([$0], [$1]) 85a33c354dSmrg 86a33c354dSmrg# This can be used to rebuild libtool when needed 87a33c354dSmrgLIBTOOL_DEPS=$ltmain 88a33c354dSmrg 89a33c354dSmrg# Always use our own libtool. 90a33c354dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 91a33c354dSmrgAC_SUBST(LIBTOOL)dnl 92a33c354dSmrg 93a33c354dSmrg_LT_SETUP 94a33c354dSmrg 95a33c354dSmrg# Only expand once: 96a33c354dSmrgm4_define([LT_INIT]) 97a33c354dSmrg])# LT_INIT 98a33c354dSmrg 99a33c354dSmrg# Old names: 100a33c354dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 101a33c354dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 102a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 103a33c354dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 104a33c354dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 105a33c354dSmrg 106a33c354dSmrg 107a33c354dSmrg# _LT_PREPARE_CC_BASENAME 108a33c354dSmrg# ----------------------- 109a33c354dSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 110a33c354dSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 111a33c354dSmrgfunc_cc_basename () 112a33c354dSmrg{ 113a33c354dSmrg for cc_temp in @S|@*""; do 114a33c354dSmrg case $cc_temp in 115a33c354dSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116a33c354dSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 117a33c354dSmrg \-*) ;; 118a33c354dSmrg *) break;; 119a33c354dSmrg esac 120a33c354dSmrg done 121a33c354dSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 122a33c354dSmrg} 123a33c354dSmrg])# _LT_PREPARE_CC_BASENAME 124a33c354dSmrg 125a33c354dSmrg 126a33c354dSmrg# _LT_CC_BASENAME(CC) 127a33c354dSmrg# ------------------- 128a33c354dSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 129a33c354dSmrg# but that macro is also expanded into generated libtool script, which 130a33c354dSmrg# arranges for $SED and $ECHO to be set by different means. 131a33c354dSmrgm4_defun([_LT_CC_BASENAME], 132a33c354dSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 133a33c354dSmrgAC_REQUIRE([_LT_DECL_SED])dnl 134a33c354dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 135a33c354dSmrgfunc_cc_basename $1 136a33c354dSmrgcc_basename=$func_cc_basename_result 137a33c354dSmrg]) 138a33c354dSmrg 139a33c354dSmrg 140a33c354dSmrg# _LT_FILEUTILS_DEFAULTS 141a33c354dSmrg# ---------------------- 142a33c354dSmrg# It is okay to use these file commands and assume they have been set 143a33c354dSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 144a33c354dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 145a33c354dSmrg[: ${CP="cp -f"} 146a33c354dSmrg: ${MV="mv -f"} 147a33c354dSmrg: ${RM="rm -f"} 148a33c354dSmrg])# _LT_FILEUTILS_DEFAULTS 149a33c354dSmrg 150a33c354dSmrg 151a33c354dSmrg# _LT_SETUP 152a33c354dSmrg# --------- 153a33c354dSmrgm4_defun([_LT_SETUP], 154a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 155a33c354dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 156a33c354dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 157a33c354dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 158a33c354dSmrg 159a33c354dSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 160a33c354dSmrgdnl 161a33c354dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 162a33c354dSmrg_LT_DECL([], [host], [0])dnl 163a33c354dSmrg_LT_DECL([], [host_os], [0])dnl 164a33c354dSmrgdnl 165a33c354dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 166a33c354dSmrg_LT_DECL([], [build], [0])dnl 167a33c354dSmrg_LT_DECL([], [build_os], [0])dnl 168a33c354dSmrgdnl 169a33c354dSmrgAC_REQUIRE([AC_PROG_CC])dnl 170a33c354dSmrgAC_REQUIRE([LT_PATH_LD])dnl 171a33c354dSmrgAC_REQUIRE([LT_PATH_NM])dnl 172a33c354dSmrgdnl 173a33c354dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 174a33c354dSmrgtest -z "$LN_S" && LN_S="ln -s" 175a33c354dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 176a33c354dSmrgdnl 177a33c354dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 178a33c354dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 179a33c354dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 180a33c354dSmrgdnl 181a33c354dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 182a33c354dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 183a33c354dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 184a33c354dSmrgm4_require([_LT_CMD_RELOAD])dnl 185a33c354dSmrgm4_require([_LT_DECL_FILECMD])dnl 186a33c354dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 187a33c354dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 188a33c354dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 189a33c354dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 190a33c354dSmrgm4_require([_LT_WITH_SYSROOT])dnl 191a33c354dSmrgm4_require([_LT_CMD_TRUNCATE])dnl 192a33c354dSmrg 193a33c354dSmrg_LT_CONFIG_LIBTOOL_INIT([ 194a33c354dSmrg# See if we are running on zsh, and set the options that allow our 195a33c354dSmrg# commands through without removal of \ escapes INIT. 196a33c354dSmrgif test -n "\${ZSH_VERSION+set}"; then 197a33c354dSmrg setopt NO_GLOB_SUBST 198a33c354dSmrgfi 199a33c354dSmrg]) 200a33c354dSmrgif test -n "${ZSH_VERSION+set}"; then 201a33c354dSmrg setopt NO_GLOB_SUBST 202a33c354dSmrgfi 203a33c354dSmrg 204a33c354dSmrg_LT_CHECK_OBJDIR 205a33c354dSmrg 206a33c354dSmrgm4_require([_LT_TAG_COMPILER])dnl 207a33c354dSmrg 208a33c354dSmrgcase $host_os in 209a33c354dSmrgaix3*) 210a33c354dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 211a33c354dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 212a33c354dSmrg # vanish in a puff of smoke. 213a33c354dSmrg if test set != "${COLLECT_NAMES+set}"; then 214a33c354dSmrg COLLECT_NAMES= 215a33c354dSmrg export COLLECT_NAMES 216a33c354dSmrg fi 217a33c354dSmrg ;; 218a33c354dSmrgesac 219a33c354dSmrg 220a33c354dSmrg# Global variables: 221a33c354dSmrgofile=libtool 222a33c354dSmrgcan_build_shared=yes 223a33c354dSmrg 224a33c354dSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 225a33c354dSmrg# ICC, which need '.lib'). 226a33c354dSmrglibext=a 227a33c354dSmrg 228a33c354dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 229a33c354dSmrg 230a33c354dSmrgold_CC=$CC 231a33c354dSmrgold_CFLAGS=$CFLAGS 232a33c354dSmrg 233a33c354dSmrg# Set sane defaults for various variables 234a33c354dSmrgtest -z "$CC" && CC=cc 235a33c354dSmrgtest -z "$LTCC" && LTCC=$CC 236a33c354dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 237a33c354dSmrgtest -z "$LD" && LD=ld 238a33c354dSmrgtest -z "$ac_objext" && ac_objext=o 239a33c354dSmrg 240a33c354dSmrg_LT_CC_BASENAME([$compiler]) 241a33c354dSmrg 242a33c354dSmrg# Only perform the check for file, if the check method requires it 243a33c354dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 244a33c354dSmrgcase $deplibs_check_method in 245a33c354dSmrgfile_magic*) 246a33c354dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 247a33c354dSmrg _LT_PATH_MAGIC 248a33c354dSmrg fi 249a33c354dSmrg ;; 250a33c354dSmrgesac 251a33c354dSmrg 252a33c354dSmrg# Use C for the default configuration in the libtool script 253a33c354dSmrgLT_SUPPORTED_TAG([CC]) 254a33c354dSmrg_LT_LANG_C_CONFIG 255a33c354dSmrg_LT_LANG_DEFAULT_CONFIG 256a33c354dSmrg_LT_CONFIG_COMMANDS 257a33c354dSmrg])# _LT_SETUP 258a33c354dSmrg 259a33c354dSmrg 260a33c354dSmrg# _LT_PREPARE_SED_QUOTE_VARS 261a33c354dSmrg# -------------------------- 262a33c354dSmrg# Define a few sed substitution that help us do robust quoting. 263a33c354dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 264a33c354dSmrg[# Backslashify metacharacters that are still active within 265a33c354dSmrg# double-quoted strings. 266a33c354dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 267a33c354dSmrg 268a33c354dSmrg# Same as above, but do not quote variable references. 269a33c354dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 270a33c354dSmrg 271a33c354dSmrg# Sed substitution to delay expansion of an escaped shell variable in a 272a33c354dSmrg# double_quote_subst'ed string. 273a33c354dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 274a33c354dSmrg 275a33c354dSmrg# Sed substitution to delay expansion of an escaped single quote. 276a33c354dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 277a33c354dSmrg 278a33c354dSmrg# Sed substitution to avoid accidental globbing in evaled expressions 279a33c354dSmrgno_glob_subst='s/\*/\\\*/g' 280a33c354dSmrg]) 281a33c354dSmrg 282a33c354dSmrg# _LT_PROG_LTMAIN 283a33c354dSmrg# --------------- 284a33c354dSmrg# Note that this code is called both from 'configure', and 'config.status' 285a33c354dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 286a33c354dSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 287a33c354dSmrg# so we pass a copy along to make sure it has a sensible value anyway. 288a33c354dSmrgm4_defun([_LT_PROG_LTMAIN], 289a33c354dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 290a33c354dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 291a33c354dSmrgltmain=$ac_aux_dir/ltmain.sh 292a33c354dSmrg])# _LT_PROG_LTMAIN 293a33c354dSmrg 294a33c354dSmrg 295a33c354dSmrg## ------------------------------------- ## 296a33c354dSmrg## Accumulate code for creating libtool. ## 297a33c354dSmrg## ------------------------------------- ## 298a33c354dSmrg 299a33c354dSmrg# So that we can recreate a full libtool script including additional 300a33c354dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301a33c354dSmrg# in macros and then make a single call at the end using the 'libtool' 302a33c354dSmrg# label. 303a33c354dSmrg 304a33c354dSmrg 305a33c354dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306a33c354dSmrg# ---------------------------------------- 307a33c354dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308a33c354dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 309a33c354dSmrg[m4_ifval([$1], 310a33c354dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311a33c354dSmrg [$1 312a33c354dSmrg])])]) 313a33c354dSmrg 314a33c354dSmrg# Initialize. 315a33c354dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 316a33c354dSmrg 317a33c354dSmrg 318a33c354dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 319a33c354dSmrg# ------------------------------ 320a33c354dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321a33c354dSmrgm4_define([_LT_CONFIG_LIBTOOL], 322a33c354dSmrg[m4_ifval([$1], 323a33c354dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324a33c354dSmrg [$1 325a33c354dSmrg])])]) 326a33c354dSmrg 327a33c354dSmrg# Initialize. 328a33c354dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 329a33c354dSmrg 330a33c354dSmrg 331a33c354dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332a33c354dSmrg# ----------------------------------------------------- 333a33c354dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 334a33c354dSmrg[_LT_CONFIG_LIBTOOL([$1]) 335a33c354dSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 336a33c354dSmrg]) 337a33c354dSmrg 338a33c354dSmrg 339a33c354dSmrg# _LT_FORMAT_COMMENT([COMMENT]) 340a33c354dSmrg# ----------------------------- 341a33c354dSmrg# Add leading comment marks to the start of each line, and a trailing 342a33c354dSmrg# full-stop to the whole comment if one is not present already. 343a33c354dSmrgm4_define([_LT_FORMAT_COMMENT], 344a33c354dSmrg[m4_ifval([$1], [ 345a33c354dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346a33c354dSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347a33c354dSmrg)]) 348a33c354dSmrg 349a33c354dSmrg 350a33c354dSmrg 351a33c354dSmrg## ------------------------ ## 352a33c354dSmrg## FIXME: Eliminate VARNAME ## 353a33c354dSmrg## ------------------------ ## 354a33c354dSmrg 355a33c354dSmrg 356a33c354dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 357a33c354dSmrg# ------------------------------------------------------------------- 358a33c354dSmrg# CONFIGNAME is the name given to the value in the libtool script. 359a33c354dSmrg# VARNAME is the (base) name used in the configure script. 360a33c354dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 361a33c354dSmrg# VARNAME. Any other value will be used directly. 362a33c354dSmrgm4_define([_LT_DECL], 363a33c354dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 364a33c354dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 365a33c354dSmrg [m4_ifval([$1], [$1], [$2])]) 366a33c354dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 367a33c354dSmrg m4_ifval([$4], 368a33c354dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 369a33c354dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 370a33c354dSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 371a33c354dSmrg]) 372a33c354dSmrg 373a33c354dSmrg 374a33c354dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 375a33c354dSmrg# -------------------------------------------------------- 376a33c354dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 377a33c354dSmrg 378a33c354dSmrg 379a33c354dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 380a33c354dSmrg# ------------------------------------------------ 381a33c354dSmrgm4_define([lt_decl_tag_varnames], 382a33c354dSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 383a33c354dSmrg 384a33c354dSmrg 385a33c354dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 386a33c354dSmrg# --------------------------------------------------------- 387a33c354dSmrgm4_define([_lt_decl_filter], 388a33c354dSmrg[m4_case([$#], 389a33c354dSmrg [0], [m4_fatal([$0: too few arguments: $#])], 390a33c354dSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 391a33c354dSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 392a33c354dSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 393a33c354dSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 394a33c354dSmrg]) 395a33c354dSmrg 396a33c354dSmrg 397a33c354dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 398a33c354dSmrg# -------------------------------------------------- 399a33c354dSmrgm4_define([lt_decl_quote_varnames], 400a33c354dSmrg[_lt_decl_filter([value], [1], $@)]) 401a33c354dSmrg 402a33c354dSmrg 403a33c354dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 404a33c354dSmrg# --------------------------------------------------- 405a33c354dSmrgm4_define([lt_decl_dquote_varnames], 406a33c354dSmrg[_lt_decl_filter([value], [2], $@)]) 407a33c354dSmrg 408a33c354dSmrg 409a33c354dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 410a33c354dSmrg# --------------------------------------------------- 411a33c354dSmrgm4_define([lt_decl_varnames_tagged], 412a33c354dSmrg[m4_assert([$# <= 2])dnl 413a33c354dSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 414a33c354dSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 415a33c354dSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 416a33c354dSmrgm4_define([_lt_decl_varnames_tagged], 417a33c354dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 418a33c354dSmrg 419a33c354dSmrg 420a33c354dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 421a33c354dSmrg# ------------------------------------------------ 422a33c354dSmrgm4_define([lt_decl_all_varnames], 423a33c354dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 424a33c354dSmrg m4_if([$2], [], 425a33c354dSmrg m4_quote(lt_decl_varnames), 426a33c354dSmrg m4_quote(m4_shift($@))))[]dnl 427a33c354dSmrg]) 428a33c354dSmrgm4_define([_lt_decl_all_varnames], 429a33c354dSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 430a33c354dSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 431a33c354dSmrg]) 432a33c354dSmrg 433a33c354dSmrg 434a33c354dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 435a33c354dSmrg# ------------------------------------ 436a33c354dSmrg# Quote a variable value, and forward it to 'config.status' so that its 437a33c354dSmrg# declaration there will have the same value as in 'configure'. VARNAME 438a33c354dSmrg# must have a single quote delimited value for this to work. 439a33c354dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 440a33c354dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 441a33c354dSmrg 442a33c354dSmrg 443a33c354dSmrg# _LT_CONFIG_STATUS_DECLARATIONS 444a33c354dSmrg# ------------------------------ 445a33c354dSmrg# We delimit libtool config variables with single quotes, so when 446a33c354dSmrg# we write them to config.status, we have to be sure to quote all 447a33c354dSmrg# embedded single quotes properly. In configure, this macro expands 448a33c354dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 449a33c354dSmrg# 450a33c354dSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 451a33c354dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 452a33c354dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 453a33c354dSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 454a33c354dSmrg 455a33c354dSmrg 456a33c354dSmrg# _LT_LIBTOOL_TAGS 457a33c354dSmrg# ---------------- 458a33c354dSmrg# Output comment and list of tags supported by the script 459a33c354dSmrgm4_defun([_LT_LIBTOOL_TAGS], 460a33c354dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 461a33c354dSmrgavailable_tags='_LT_TAGS'dnl 462a33c354dSmrg]) 463a33c354dSmrg 464a33c354dSmrg 465a33c354dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 466a33c354dSmrg# ----------------------------------- 467a33c354dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 468a33c354dSmrg# expand to a commented shell variable setting: 469a33c354dSmrg# 470a33c354dSmrg# # Some comment about what VAR is for. 471a33c354dSmrg# visible_name=$lt_internal_name 472a33c354dSmrgm4_define([_LT_LIBTOOL_DECLARE], 473a33c354dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 474a33c354dSmrg [description])))[]dnl 475a33c354dSmrgm4_pushdef([_libtool_name], 476a33c354dSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 477a33c354dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 478a33c354dSmrg [0], [_libtool_name=[$]$1], 479a33c354dSmrg [1], [_libtool_name=$lt_[]$1], 480a33c354dSmrg [2], [_libtool_name=$lt_[]$1], 481a33c354dSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 482a33c354dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 483a33c354dSmrg]) 484a33c354dSmrg 485a33c354dSmrg 486a33c354dSmrg# _LT_LIBTOOL_CONFIG_VARS 487a33c354dSmrg# ----------------------- 488a33c354dSmrg# Produce commented declarations of non-tagged libtool config variables 489a33c354dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 490a33c354dSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 491a33c354dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 492a33c354dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 493a33c354dSmrg[m4_foreach([_lt_var], 494a33c354dSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 495a33c354dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 496a33c354dSmrg 497a33c354dSmrg 498a33c354dSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 499a33c354dSmrg# ------------------------- 500a33c354dSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 501a33c354dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 502a33c354dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 503a33c354dSmrg 504a33c354dSmrg 505a33c354dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 506a33c354dSmrg# ------------------------------ 507a33c354dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 508a33c354dSmrg 509a33c354dSmrg 510a33c354dSmrg# _LT_CONFIG_COMMANDS 511a33c354dSmrg# ------------------- 512a33c354dSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 513a33c354dSmrg# variables for single and double quote escaping we saved from calls 514a33c354dSmrg# to _LT_DECL, we can put quote escaped variables declarations 515a33c354dSmrg# into 'config.status', and then the shell code to quote escape them in 516a33c354dSmrg# for loops in 'config.status'. Finally, any additional code accumulated 517a33c354dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 518a33c354dSmrgm4_defun([_LT_CONFIG_COMMANDS], 519a33c354dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 520a33c354dSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 521a33c354dSmrg dnl instead of duplicating it all over again into config.status, 522a33c354dSmrg dnl then we will have config.status run $CONFIG_LT later, so it 523a33c354dSmrg dnl needs to know what name is stored there: 524a33c354dSmrg [AC_CONFIG_COMMANDS([libtool], 525a33c354dSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 526a33c354dSmrg dnl If the libtool generation code is destined for config.status, 527a33c354dSmrg dnl expand the accumulated commands and init code now: 528a33c354dSmrg [AC_CONFIG_COMMANDS([libtool], 529a33c354dSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 530a33c354dSmrg])#_LT_CONFIG_COMMANDS 531a33c354dSmrg 532a33c354dSmrg 533a33c354dSmrg# Initialize. 534a33c354dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 535a33c354dSmrg[ 536a33c354dSmrg 537a33c354dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 538a33c354dSmrg# if CDPATH is set. 539a33c354dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 540a33c354dSmrg 541a33c354dSmrgsed_quote_subst='$sed_quote_subst' 542a33c354dSmrgdouble_quote_subst='$double_quote_subst' 543a33c354dSmrgdelay_variable_subst='$delay_variable_subst' 544a33c354dSmrg_LT_CONFIG_STATUS_DECLARATIONS 545a33c354dSmrgLTCC='$LTCC' 546a33c354dSmrgLTCFLAGS='$LTCFLAGS' 547a33c354dSmrgcompiler='$compiler_DEFAULT' 548a33c354dSmrg 549a33c354dSmrg# A function that is used when there is no print builtin or printf. 550a33c354dSmrgfunc_fallback_echo () 551a33c354dSmrg{ 552a33c354dSmrg eval 'cat <<_LTECHO_EOF 553a33c354dSmrg\$[]1 554a33c354dSmrg_LTECHO_EOF' 555a33c354dSmrg} 556a33c354dSmrg 557a33c354dSmrg# Quote evaled strings. 558a33c354dSmrgfor var in lt_decl_all_varnames([[ \ 559a33c354dSmrg]], lt_decl_quote_varnames); do 560a33c354dSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 561a33c354dSmrg *[[\\\\\\\`\\"\\\$]]*) 562a33c354dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 563a33c354dSmrg ;; 564a33c354dSmrg *) 565a33c354dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 566a33c354dSmrg ;; 567a33c354dSmrg esac 568a33c354dSmrgdone 569a33c354dSmrg 570a33c354dSmrg# Double-quote double-evaled strings. 571a33c354dSmrgfor var in lt_decl_all_varnames([[ \ 572a33c354dSmrg]], lt_decl_dquote_varnames); do 573a33c354dSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 574a33c354dSmrg *[[\\\\\\\`\\"\\\$]]*) 575a33c354dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 576a33c354dSmrg ;; 577a33c354dSmrg *) 578a33c354dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 579a33c354dSmrg ;; 580a33c354dSmrg esac 581a33c354dSmrgdone 582a33c354dSmrg 583a33c354dSmrg_LT_OUTPUT_LIBTOOL_INIT 584a33c354dSmrg]) 585a33c354dSmrg 586a33c354dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 587a33c354dSmrg# ------------------------------------ 588a33c354dSmrg# Generate a child script FILE with all initialization necessary to 589a33c354dSmrg# reuse the environment learned by the parent script, and make the 590a33c354dSmrg# file executable. If COMMENT is supplied, it is inserted after the 591a33c354dSmrg# '#!' sequence but before initialization text begins. After this 592a33c354dSmrg# macro, additional text can be appended to FILE to form the body of 593a33c354dSmrg# the child script. The macro ends with non-zero status if the 594a33c354dSmrg# file could not be fully written (such as if the disk is full). 595a33c354dSmrgm4_ifdef([AS_INIT_GENERATED], 596a33c354dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 597a33c354dSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 598a33c354dSmrg[m4_require([AS_PREPARE])]dnl 599a33c354dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 600a33c354dSmrg[lt_write_fail=0 601a33c354dSmrgcat >$1 <<_ASEOF || lt_write_fail=1 602a33c354dSmrg#! $SHELL 603a33c354dSmrg# Generated by $as_me. 604a33c354dSmrg$2 605a33c354dSmrgSHELL=\${CONFIG_SHELL-$SHELL} 606a33c354dSmrgexport SHELL 607a33c354dSmrg_ASEOF 608a33c354dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 609a33c354dSmrgAS_SHELL_SANITIZE 610a33c354dSmrg_AS_PREPARE 611a33c354dSmrgexec AS_MESSAGE_FD>&1 612a33c354dSmrg_ASEOF 613a33c354dSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 614a33c354dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 615a33c354dSmrg 616a33c354dSmrg# LT_OUTPUT 617a33c354dSmrg# --------- 618a33c354dSmrg# This macro allows early generation of the libtool script (before 619a33c354dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 620a33c354dSmrg# tests. 621a33c354dSmrgAC_DEFUN([LT_OUTPUT], 622a33c354dSmrg[: ${CONFIG_LT=./config.lt} 623a33c354dSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 624a33c354dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 625a33c354dSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 626a33c354dSmrg 627a33c354dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 628a33c354dSmrglt_cl_silent=false 629a33c354dSmrgexec AS_MESSAGE_LOG_FD>>config.log 630a33c354dSmrg{ 631a33c354dSmrg echo 632a33c354dSmrg AS_BOX([Running $as_me.]) 633a33c354dSmrg} >&AS_MESSAGE_LOG_FD 634a33c354dSmrg 635a33c354dSmrglt_cl_help="\ 636a33c354dSmrg'$as_me' creates a local libtool stub from the current configuration, 637a33c354dSmrgfor use in further configure time tests before the real libtool is 638a33c354dSmrggenerated. 639a33c354dSmrg 640a33c354dSmrgUsage: $[0] [[OPTIONS]] 641a33c354dSmrg 642a33c354dSmrg -h, --help print this help, then exit 643a33c354dSmrg -V, --version print version number, then exit 644a33c354dSmrg -q, --quiet do not print progress messages 645a33c354dSmrg -d, --debug don't remove temporary files 646a33c354dSmrg 647a33c354dSmrgReport bugs to <bug-libtool@gnu.org>." 648a33c354dSmrg 649a33c354dSmrglt_cl_version="\ 650a33c354dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 651a33c354dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 652a33c354dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 653a33c354dSmrg 654a33c354dSmrgCopyright (C) 2011 Free Software Foundation, Inc. 655a33c354dSmrgThis config.lt script is free software; the Free Software Foundation 656a33c354dSmrggives unlimited permision to copy, distribute and modify it." 657a33c354dSmrg 658a33c354dSmrgwhile test 0 != $[#] 659a33c354dSmrgdo 660a33c354dSmrg case $[1] in 661a33c354dSmrg --version | --v* | -V ) 662a33c354dSmrg echo "$lt_cl_version"; exit 0 ;; 663a33c354dSmrg --help | --h* | -h ) 664a33c354dSmrg echo "$lt_cl_help"; exit 0 ;; 665a33c354dSmrg --debug | --d* | -d ) 666a33c354dSmrg debug=: ;; 667a33c354dSmrg --quiet | --q* | --silent | --s* | -q ) 668a33c354dSmrg lt_cl_silent=: ;; 669a33c354dSmrg 670a33c354dSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 671a33c354dSmrgTry '$[0] --help' for more information.]) ;; 672a33c354dSmrg 673a33c354dSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 674a33c354dSmrgTry '$[0] --help' for more information.]) ;; 675a33c354dSmrg esac 676a33c354dSmrg shift 677a33c354dSmrgdone 678a33c354dSmrg 679a33c354dSmrgif $lt_cl_silent; then 680a33c354dSmrg exec AS_MESSAGE_FD>/dev/null 681a33c354dSmrgfi 682a33c354dSmrg_LTEOF 683a33c354dSmrg 684a33c354dSmrgcat >>"$CONFIG_LT" <<_LTEOF 685a33c354dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 686a33c354dSmrg_LTEOF 687a33c354dSmrg 688a33c354dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 689a33c354dSmrgAC_MSG_NOTICE([creating $ofile]) 690a33c354dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 691a33c354dSmrgAS_EXIT(0) 692a33c354dSmrg_LTEOF 693a33c354dSmrgchmod +x "$CONFIG_LT" 694a33c354dSmrg 695a33c354dSmrg# configure is writing to config.log, but config.lt does its own redirection, 696a33c354dSmrg# appending to config.log, which fails on DOS, as config.log is still kept 697a33c354dSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 698a33c354dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 699a33c354dSmrglt_cl_success=: 700a33c354dSmrgtest yes = "$silent" && 701a33c354dSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 702a33c354dSmrgexec AS_MESSAGE_LOG_FD>/dev/null 703a33c354dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 704a33c354dSmrgexec AS_MESSAGE_LOG_FD>>config.log 705a33c354dSmrg$lt_cl_success || AS_EXIT(1) 706a33c354dSmrg])# LT_OUTPUT 707a33c354dSmrg 708a33c354dSmrg 709a33c354dSmrg# _LT_CONFIG(TAG) 710a33c354dSmrg# --------------- 711a33c354dSmrg# If TAG is the built-in tag, create an initial libtool script with a 712a33c354dSmrg# default configuration from the untagged config vars. Otherwise add code 713a33c354dSmrg# to config.status for appending the configuration named by TAG from the 714a33c354dSmrg# matching tagged config vars. 715a33c354dSmrgm4_defun([_LT_CONFIG], 716a33c354dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 717a33c354dSmrg_LT_CONFIG_SAVE_COMMANDS([ 718a33c354dSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 719a33c354dSmrg m4_if(_LT_TAG, [C], [ 720a33c354dSmrg # See if we are running on zsh, and set the options that allow our 721a33c354dSmrg # commands through without removal of \ escapes. 722a33c354dSmrg if test -n "${ZSH_VERSION+set}"; then 723a33c354dSmrg setopt NO_GLOB_SUBST 724a33c354dSmrg fi 725a33c354dSmrg 726a33c354dSmrg cfgfile=${ofile}T 727a33c354dSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 728a33c354dSmrg $RM "$cfgfile" 729a33c354dSmrg 730a33c354dSmrg cat <<_LT_EOF >> "$cfgfile" 731a33c354dSmrg#! $SHELL 732a33c354dSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 733a33c354dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 734a33c354dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 735a33c354dSmrg 736a33c354dSmrg# Provide generalized library-building support services. 737a33c354dSmrg# Written by Gordon Matzigkeit, 1996 738a33c354dSmrg 739a33c354dSmrg_LT_COPYING 740a33c354dSmrg_LT_LIBTOOL_TAGS 741a33c354dSmrg 742a33c354dSmrg# Configured defaults for sys_lib_dlsearch_path munging. 743a33c354dSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 744a33c354dSmrg 745a33c354dSmrg# ### BEGIN LIBTOOL CONFIG 746a33c354dSmrg_LT_LIBTOOL_CONFIG_VARS 747a33c354dSmrg_LT_LIBTOOL_TAG_VARS 748a33c354dSmrg# ### END LIBTOOL CONFIG 749a33c354dSmrg 750a33c354dSmrg_LT_EOF 751a33c354dSmrg 752a33c354dSmrg cat <<'_LT_EOF' >> "$cfgfile" 753a33c354dSmrg 754a33c354dSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 755a33c354dSmrg 756a33c354dSmrg_LT_PREPARE_MUNGE_PATH_LIST 757a33c354dSmrg_LT_PREPARE_CC_BASENAME 758a33c354dSmrg 759a33c354dSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 760a33c354dSmrg 761a33c354dSmrg_LT_EOF 762a33c354dSmrg 763a33c354dSmrg case $host_os in 764a33c354dSmrg aix3*) 765a33c354dSmrg cat <<\_LT_EOF >> "$cfgfile" 766a33c354dSmrg# AIX sometimes has problems with the GCC collect2 program. For some 767a33c354dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 768a33c354dSmrg# vanish in a puff of smoke. 769a33c354dSmrgif test set != "${COLLECT_NAMES+set}"; then 770a33c354dSmrg COLLECT_NAMES= 771a33c354dSmrg export COLLECT_NAMES 772a33c354dSmrgfi 773a33c354dSmrg_LT_EOF 774a33c354dSmrg ;; 775a33c354dSmrg esac 776a33c354dSmrg 777a33c354dSmrg _LT_PROG_LTMAIN 778a33c354dSmrg 779a33c354dSmrg # We use sed instead of cat because bash on DJGPP gets confused if 780a33c354dSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 781a33c354dSmrg # text mode, it properly converts lines to CR/LF. This bash problem 782a33c354dSmrg # is reportedly fixed, but why not run on old versions too? 783a33c354dSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 784a33c354dSmrg || (rm -f "$cfgfile"; exit 1) 785a33c354dSmrg 786a33c354dSmrg mv -f "$cfgfile" "$ofile" || 787a33c354dSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 788a33c354dSmrg chmod +x "$ofile" 789a33c354dSmrg], 790a33c354dSmrg[cat <<_LT_EOF >> "$ofile" 791a33c354dSmrg 792a33c354dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 793a33c354dSmrgdnl in a comment (ie after a #). 794a33c354dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 795a33c354dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 796a33c354dSmrg# ### END LIBTOOL TAG CONFIG: $1 797a33c354dSmrg_LT_EOF 798a33c354dSmrg])dnl /m4_if 799a33c354dSmrg], 800a33c354dSmrg[m4_if([$1], [], [ 801a33c354dSmrg PACKAGE='$PACKAGE' 802a33c354dSmrg VERSION='$VERSION' 803a33c354dSmrg RM='$RM' 804a33c354dSmrg ofile='$ofile'], []) 805a33c354dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 806a33c354dSmrg])# _LT_CONFIG 807a33c354dSmrg 808a33c354dSmrg 809a33c354dSmrg# LT_SUPPORTED_TAG(TAG) 810a33c354dSmrg# --------------------- 811a33c354dSmrg# Trace this macro to discover what tags are supported by the libtool 812a33c354dSmrg# --tag option, using: 813a33c354dSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 814a33c354dSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 815a33c354dSmrg 816a33c354dSmrg 817a33c354dSmrg# C support is built-in for now 818a33c354dSmrgm4_define([_LT_LANG_C_enabled], []) 819a33c354dSmrgm4_define([_LT_TAGS], []) 820a33c354dSmrg 821a33c354dSmrg 822a33c354dSmrg# LT_LANG(LANG) 823a33c354dSmrg# ------------- 824a33c354dSmrg# Enable libtool support for the given language if not already enabled. 825a33c354dSmrgAC_DEFUN([LT_LANG], 826a33c354dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 827a33c354dSmrgm4_case([$1], 828a33c354dSmrg [C], [_LT_LANG(C)], 829a33c354dSmrg [C++], [_LT_LANG(CXX)], 830a33c354dSmrg [Go], [_LT_LANG(GO)], 831a33c354dSmrg [Java], [_LT_LANG(GCJ)], 832a33c354dSmrg [Fortran 77], [_LT_LANG(F77)], 833a33c354dSmrg [Fortran], [_LT_LANG(FC)], 834a33c354dSmrg [Windows Resource], [_LT_LANG(RC)], 835a33c354dSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 836a33c354dSmrg [_LT_LANG($1)], 837a33c354dSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 838a33c354dSmrg])# LT_LANG 839a33c354dSmrg 840a33c354dSmrg 841a33c354dSmrg# _LT_LANG(LANGNAME) 842a33c354dSmrg# ------------------ 843a33c354dSmrgm4_defun([_LT_LANG], 844a33c354dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 845a33c354dSmrg [LT_SUPPORTED_TAG([$1])dnl 846a33c354dSmrg m4_append([_LT_TAGS], [$1 ])dnl 847a33c354dSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 848a33c354dSmrg _LT_LANG_$1_CONFIG($1)])dnl 849a33c354dSmrg])# _LT_LANG 850a33c354dSmrg 851a33c354dSmrg 852a33c354dSmrgm4_ifndef([AC_PROG_GO], [ 853a33c354dSmrg############################################################ 854a33c354dSmrg# NOTE: This macro has been submitted for inclusion into # 855a33c354dSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 856a33c354dSmrg# a released version of Autoconf we should remove this # 857a33c354dSmrg# macro and use it instead. # 858a33c354dSmrg############################################################ 859a33c354dSmrgm4_defun([AC_PROG_GO], 860a33c354dSmrg[AC_LANG_PUSH(Go)dnl 861a33c354dSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 862a33c354dSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 863a33c354dSmrg_AC_ARG_VAR_LDFLAGS()dnl 864a33c354dSmrgAC_CHECK_TOOL(GOC, gccgo) 865a33c354dSmrgif test -z "$GOC"; then 866a33c354dSmrg if test -n "$ac_tool_prefix"; then 867a33c354dSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 868a33c354dSmrg fi 869a33c354dSmrgfi 870a33c354dSmrgif test -z "$GOC"; then 871a33c354dSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 872a33c354dSmrgfi 873a33c354dSmrg])#m4_defun 874a33c354dSmrg])#m4_ifndef 875a33c354dSmrg 876a33c354dSmrg 877a33c354dSmrg# _LT_LANG_DEFAULT_CONFIG 878a33c354dSmrg# ----------------------- 879a33c354dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 880a33c354dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 881a33c354dSmrg [LT_LANG(CXX)], 882a33c354dSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 883a33c354dSmrg 884a33c354dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 885a33c354dSmrg [LT_LANG(F77)], 886a33c354dSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 887a33c354dSmrg 888a33c354dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 889a33c354dSmrg [LT_LANG(FC)], 890a33c354dSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 891a33c354dSmrg 892a33c354dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 893a33c354dSmrgdnl pulling things in needlessly. 894a33c354dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 895a33c354dSmrg [LT_LANG(GCJ)], 896a33c354dSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 897a33c354dSmrg [LT_LANG(GCJ)], 898a33c354dSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 899a33c354dSmrg [LT_LANG(GCJ)], 900a33c354dSmrg [m4_ifdef([AC_PROG_GCJ], 901a33c354dSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 902a33c354dSmrg m4_ifdef([A][M_PROG_GCJ], 903a33c354dSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 904a33c354dSmrg m4_ifdef([LT_PROG_GCJ], 905a33c354dSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 906a33c354dSmrg 907a33c354dSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 908a33c354dSmrg [LT_LANG(GO)], 909a33c354dSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 910a33c354dSmrg 911a33c354dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 912a33c354dSmrg [LT_LANG(RC)], 913a33c354dSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 914a33c354dSmrg])# _LT_LANG_DEFAULT_CONFIG 915a33c354dSmrg 916a33c354dSmrg# Obsolete macros: 917a33c354dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 918a33c354dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 919a33c354dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 920a33c354dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 921a33c354dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 922a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 923a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 924a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 925a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 926a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 927a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 928a33c354dSmrg 929a33c354dSmrg 930a33c354dSmrg# _LT_TAG_COMPILER 931a33c354dSmrg# ---------------- 932a33c354dSmrgm4_defun([_LT_TAG_COMPILER], 933a33c354dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 934a33c354dSmrg 935a33c354dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 936a33c354dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 937a33c354dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 938a33c354dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 939a33c354dSmrg 940a33c354dSmrg# If no C compiler was specified, use CC. 941a33c354dSmrgLTCC=${LTCC-"$CC"} 942a33c354dSmrg 943a33c354dSmrg# If no C compiler flags were specified, use CFLAGS. 944a33c354dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 945a33c354dSmrg 946a33c354dSmrg# Allow CC to be a program name with arguments. 947a33c354dSmrgcompiler=$CC 948a33c354dSmrg])# _LT_TAG_COMPILER 949a33c354dSmrg 950a33c354dSmrg 951a33c354dSmrg# _LT_COMPILER_BOILERPLATE 952a33c354dSmrg# ------------------------ 953a33c354dSmrg# Check for compiler boilerplate output or warnings with 954a33c354dSmrg# the simple compiler test code. 955a33c354dSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 956a33c354dSmrg[m4_require([_LT_DECL_SED])dnl 957a33c354dSmrgac_outfile=conftest.$ac_objext 958a33c354dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 959a33c354dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 960a33c354dSmrg_lt_compiler_boilerplate=`cat conftest.err` 961a33c354dSmrg$RM conftest* 962a33c354dSmrg])# _LT_COMPILER_BOILERPLATE 963a33c354dSmrg 964a33c354dSmrg 965a33c354dSmrg# _LT_LINKER_BOILERPLATE 966a33c354dSmrg# ---------------------- 967a33c354dSmrg# Check for linker boilerplate output or warnings with 968a33c354dSmrg# the simple link test code. 969a33c354dSmrgm4_defun([_LT_LINKER_BOILERPLATE], 970a33c354dSmrg[m4_require([_LT_DECL_SED])dnl 971a33c354dSmrgac_outfile=conftest.$ac_objext 972a33c354dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 973a33c354dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 974a33c354dSmrg_lt_linker_boilerplate=`cat conftest.err` 975a33c354dSmrg$RM -r conftest* 976a33c354dSmrg])# _LT_LINKER_BOILERPLATE 977a33c354dSmrg 978a33c354dSmrg# _LT_REQUIRED_DARWIN_CHECKS 979a33c354dSmrg# ------------------------- 980a33c354dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 981a33c354dSmrg case $host_os in 982a33c354dSmrg rhapsody* | darwin*) 983a33c354dSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 984a33c354dSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 985a33c354dSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 986a33c354dSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 987a33c354dSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 988a33c354dSmrg _LT_DECL([], [DSYMUTIL], [1], 989a33c354dSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 990a33c354dSmrg _LT_DECL([], [NMEDIT], [1], 991a33c354dSmrg [Tool to change global to local symbols on Mac OS X]) 992a33c354dSmrg _LT_DECL([], [LIPO], [1], 993a33c354dSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 994a33c354dSmrg _LT_DECL([], [OTOOL], [1], 995a33c354dSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 996a33c354dSmrg _LT_DECL([], [OTOOL64], [1], 997a33c354dSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 998a33c354dSmrg 999a33c354dSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1000a33c354dSmrg [lt_cv_apple_cc_single_mod=no 1001a33c354dSmrg if test -z "$LT_MULTI_MODULE"; then 1002a33c354dSmrg # By default we will add the -single_module flag. You can override 1003a33c354dSmrg # by either setting the environment variable LT_MULTI_MODULE 1004a33c354dSmrg # non-empty at configure time, or by adding -multi_module to the 1005a33c354dSmrg # link flags. 1006a33c354dSmrg rm -rf libconftest.dylib* 1007a33c354dSmrg echo "int foo(void){return 1;}" > conftest.c 1008a33c354dSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009a33c354dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1010a33c354dSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1011a33c354dSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1012a33c354dSmrg _lt_result=$? 1013a33c354dSmrg # If there is a non-empty error log, and "single_module" 1014a33c354dSmrg # appears in it, assume the flag caused a linker warning 1015a33c354dSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1016a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1017a33c354dSmrg # Otherwise, if the output was created with a 0 exit code from 1018a33c354dSmrg # the compiler, it worked. 1019a33c354dSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1020a33c354dSmrg lt_cv_apple_cc_single_mod=yes 1021a33c354dSmrg else 1022a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1023a33c354dSmrg fi 1024a33c354dSmrg rm -rf libconftest.dylib* 1025a33c354dSmrg rm -f conftest.* 1026a33c354dSmrg fi]) 1027a33c354dSmrg 1028a33c354dSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1029a33c354dSmrg [lt_cv_ld_exported_symbols_list], 1030a33c354dSmrg [lt_cv_ld_exported_symbols_list=no 1031a33c354dSmrg save_LDFLAGS=$LDFLAGS 1032a33c354dSmrg echo "_main" > conftest.sym 1033a33c354dSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1034a33c354dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1035a33c354dSmrg [lt_cv_ld_exported_symbols_list=yes], 1036a33c354dSmrg [lt_cv_ld_exported_symbols_list=no]) 1037a33c354dSmrg LDFLAGS=$save_LDFLAGS 1038a33c354dSmrg ]) 1039a33c354dSmrg 1040a33c354dSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1041a33c354dSmrg [lt_cv_ld_force_load=no 1042a33c354dSmrg cat > conftest.c << _LT_EOF 1043a33c354dSmrgint forced_loaded() { return 2;} 1044a33c354dSmrg_LT_EOF 1045a33c354dSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1046a33c354dSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1047a33c354dSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1048a33c354dSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1049a33c354dSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1050a33c354dSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1051a33c354dSmrg cat > conftest.c << _LT_EOF 1052a33c354dSmrgint main() { return 0;} 1053a33c354dSmrg_LT_EOF 1054a33c354dSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1055a33c354dSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1056a33c354dSmrg _lt_result=$? 1057a33c354dSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1058a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1059a33c354dSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1060a33c354dSmrg lt_cv_ld_force_load=yes 1061a33c354dSmrg else 1062a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1063a33c354dSmrg fi 1064a33c354dSmrg rm -f conftest.err libconftest.a conftest conftest.c 1065a33c354dSmrg rm -rf conftest.dSYM 1066a33c354dSmrg ]) 1067a33c354dSmrg case $host_os in 1068a33c354dSmrg rhapsody* | darwin1.[[012]]) 1069a33c354dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1070a33c354dSmrg darwin1.*) 1071a33c354dSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1072a33c354dSmrg darwin*) 1073a33c354dSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 1074a33c354dSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1075a33c354dSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1076a33c354dSmrg *) 1077a33c354dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1078a33c354dSmrg esac 1079a33c354dSmrg ;; 1080a33c354dSmrg esac 1081a33c354dSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1082a33c354dSmrg _lt_dar_single_mod='$single_module' 1083a33c354dSmrg fi 1084a33c354dSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1085a33c354dSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1086a33c354dSmrg else 1087a33c354dSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1088a33c354dSmrg fi 1089a33c354dSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1090a33c354dSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1091a33c354dSmrg else 1092a33c354dSmrg _lt_dsymutil= 1093a33c354dSmrg fi 1094a33c354dSmrg ;; 1095a33c354dSmrg esac 1096a33c354dSmrg]) 1097a33c354dSmrg 1098a33c354dSmrg 1099a33c354dSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1100a33c354dSmrg# --------------------------------- 1101a33c354dSmrg# Checks for linker and compiler features on darwin 1102a33c354dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1103a33c354dSmrg[ 1104a33c354dSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1105a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1106a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1107a33c354dSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1108a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1109a33c354dSmrg if test yes = "$lt_cv_ld_force_load"; then 1110a33c354dSmrg _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\"`' 1111a33c354dSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1112a33c354dSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1113a33c354dSmrg else 1114a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1115a33c354dSmrg fi 1116a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1117a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1118a33c354dSmrg case $cc_basename in 1119a33c354dSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1120a33c354dSmrg *) _lt_dar_can_shared=$GCC ;; 1121a33c354dSmrg esac 1122a33c354dSmrg if test yes = "$_lt_dar_can_shared"; then 1123a33c354dSmrg output_verbose_link_cmd=func_echo_all 1124a33c354dSmrg _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" 1125a33c354dSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1126a33c354dSmrg _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" 1127a33c354dSmrg _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" 1128a33c354dSmrg m4_if([$1], [CXX], 1129a33c354dSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1130a33c354dSmrg _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" 1131a33c354dSmrg _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" 1132a33c354dSmrg fi 1133a33c354dSmrg],[]) 1134a33c354dSmrg else 1135a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1136a33c354dSmrg fi 1137a33c354dSmrg]) 1138a33c354dSmrg 1139a33c354dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1140a33c354dSmrg# ---------------------------------- 1141a33c354dSmrg# Links a minimal program and checks the executable 1142a33c354dSmrg# for the system default hardcoded library path. In most cases, 1143a33c354dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1144a33c354dSmrg# the location of the communication and MPI libs are included too. 1145a33c354dSmrg# If we don't find anything, use the default library path according 1146a33c354dSmrg# to the aix ld manual. 1147a33c354dSmrg# Store the results from the different compilers for each TAGNAME. 1148a33c354dSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1149a33c354dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1150a33c354dSmrg[m4_require([_LT_DECL_SED])dnl 1151a33c354dSmrgif test set = "${lt_cv_aix_libpath+set}"; then 1152a33c354dSmrg aix_libpath=$lt_cv_aix_libpath 1153a33c354dSmrgelse 1154a33c354dSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1155a33c354dSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1156a33c354dSmrg lt_aix_libpath_sed='[ 1157a33c354dSmrg /Import File Strings/,/^$/ { 1158a33c354dSmrg /^0/ { 1159a33c354dSmrg s/^0 *\([^ ]*\) *$/\1/ 1160a33c354dSmrg p 1161a33c354dSmrg } 1162a33c354dSmrg }]' 1163a33c354dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1164a33c354dSmrg # Check for a 64-bit object if we didn't find anything. 1165a33c354dSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1166a33c354dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1167a33c354dSmrg fi],[]) 1168a33c354dSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1169a33c354dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1170a33c354dSmrg fi 1171a33c354dSmrg ]) 1172a33c354dSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1173a33c354dSmrgfi 1174a33c354dSmrg])# _LT_SYS_MODULE_PATH_AIX 1175a33c354dSmrg 1176a33c354dSmrg 1177a33c354dSmrg# _LT_SHELL_INIT(ARG) 1178a33c354dSmrg# ------------------- 1179a33c354dSmrgm4_define([_LT_SHELL_INIT], 1180a33c354dSmrg[m4_divert_text([M4SH-INIT], [$1 1181a33c354dSmrg])])# _LT_SHELL_INIT 1182a33c354dSmrg 1183a33c354dSmrg 1184a33c354dSmrg 1185a33c354dSmrg# _LT_PROG_ECHO_BACKSLASH 1186a33c354dSmrg# ----------------------- 1187a33c354dSmrg# Find how we can fake an echo command that does not interpret backslash. 1188a33c354dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1189a33c354dSmrg# of the generated configure script that will find a shell with a builtin 1190a33c354dSmrg# printf (that we can use as an echo command). 1191a33c354dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1192a33c354dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1193a33c354dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1194a33c354dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1195a33c354dSmrg 1196a33c354dSmrgAC_MSG_CHECKING([how to print strings]) 1197a33c354dSmrg# Test print first, because it will be a builtin if present. 1198a33c354dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1199a33c354dSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1200a33c354dSmrg ECHO='print -r --' 1201a33c354dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1202a33c354dSmrg ECHO='printf %s\n' 1203a33c354dSmrgelse 1204a33c354dSmrg # Use this function as a fallback that always works. 1205a33c354dSmrg func_fallback_echo () 1206a33c354dSmrg { 1207a33c354dSmrg eval 'cat <<_LTECHO_EOF 1208a33c354dSmrg$[]1 1209a33c354dSmrg_LTECHO_EOF' 1210a33c354dSmrg } 1211a33c354dSmrg ECHO='func_fallback_echo' 1212a33c354dSmrgfi 1213a33c354dSmrg 1214a33c354dSmrg# func_echo_all arg... 1215a33c354dSmrg# Invoke $ECHO with all args, space-separated. 1216a33c354dSmrgfunc_echo_all () 1217a33c354dSmrg{ 1218a33c354dSmrg $ECHO "$*" 1219a33c354dSmrg} 1220a33c354dSmrg 1221a33c354dSmrgcase $ECHO in 1222a33c354dSmrg printf*) AC_MSG_RESULT([printf]) ;; 1223a33c354dSmrg print*) AC_MSG_RESULT([print -r]) ;; 1224a33c354dSmrg *) AC_MSG_RESULT([cat]) ;; 1225a33c354dSmrgesac 1226a33c354dSmrg 1227a33c354dSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1228a33c354dSmrg[_AS_DETECT_SUGGESTED([ 1229a33c354dSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1230a33c354dSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1231a33c354dSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1232a33c354dSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1233a33c354dSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1234a33c354dSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1235a33c354dSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1236a33c354dSmrg 1237a33c354dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1238a33c354dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1239a33c354dSmrg])# _LT_PROG_ECHO_BACKSLASH 1240a33c354dSmrg 1241a33c354dSmrg 1242a33c354dSmrg# _LT_WITH_SYSROOT 1243a33c354dSmrg# ---------------- 1244a33c354dSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1245a33c354dSmrg[m4_require([_LT_DECL_SED])dnl 1246a33c354dSmrgAC_MSG_CHECKING([for sysroot]) 1247a33c354dSmrgAC_ARG_WITH([sysroot], 1248a33c354dSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1249a33c354dSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1250a33c354dSmrg if not specified).])], 1251a33c354dSmrg[], [with_sysroot=no]) 1252a33c354dSmrg 1253a33c354dSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1254a33c354dSmrgdnl in case the user passed a directory name. 1255a33c354dSmrglt_sysroot= 1256a33c354dSmrgcase $with_sysroot in #( 1257a33c354dSmrg yes) 1258a33c354dSmrg if test yes = "$GCC"; then 1259a33c354dSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1260a33c354dSmrg fi 1261a33c354dSmrg ;; #( 1262a33c354dSmrg /*) 1263a33c354dSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1264a33c354dSmrg ;; #( 1265a33c354dSmrg no|'') 1266a33c354dSmrg ;; #( 1267a33c354dSmrg *) 1268a33c354dSmrg AC_MSG_RESULT([$with_sysroot]) 1269a33c354dSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1270a33c354dSmrg ;; 1271a33c354dSmrgesac 1272a33c354dSmrg 1273a33c354dSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1274a33c354dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1275a33c354dSmrg[dependent libraries, and where our libraries should be installed.])]) 1276a33c354dSmrg 1277a33c354dSmrg# _LT_ENABLE_LOCK 1278a33c354dSmrg# --------------- 1279a33c354dSmrgm4_defun([_LT_ENABLE_LOCK], 1280a33c354dSmrg[AC_ARG_ENABLE([libtool-lock], 1281a33c354dSmrg [AS_HELP_STRING([--disable-libtool-lock], 1282a33c354dSmrg [avoid locking (might break parallel builds)])]) 1283a33c354dSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1284a33c354dSmrg 1285a33c354dSmrg# Some flags need to be propagated to the compiler or linker for good 1286a33c354dSmrg# libtool support. 1287a33c354dSmrgcase $host in 1288a33c354dSmrgia64-*-hpux*) 1289a33c354dSmrg # Find out what ABI is being produced by ac_compile, and set mode 1290a33c354dSmrg # options accordingly. 1291a33c354dSmrg echo 'int i;' > conftest.$ac_ext 1292a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 1293a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1294a33c354dSmrg *ELF-32*) 1295a33c354dSmrg HPUX_IA64_MODE=32 1296a33c354dSmrg ;; 1297a33c354dSmrg *ELF-64*) 1298a33c354dSmrg HPUX_IA64_MODE=64 1299a33c354dSmrg ;; 1300a33c354dSmrg esac 1301a33c354dSmrg fi 1302a33c354dSmrg rm -rf conftest* 1303a33c354dSmrg ;; 1304a33c354dSmrg*-*-irix6*) 1305a33c354dSmrg # Find out what ABI is being produced by ac_compile, and set linker 1306a33c354dSmrg # options accordingly. 1307a33c354dSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1308a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 1309a33c354dSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1310a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1311a33c354dSmrg *32-bit*) 1312a33c354dSmrg LD="${LD-ld} -melf32bsmip" 1313a33c354dSmrg ;; 1314a33c354dSmrg *N32*) 1315a33c354dSmrg LD="${LD-ld} -melf32bmipn32" 1316a33c354dSmrg ;; 1317a33c354dSmrg *64-bit*) 1318a33c354dSmrg LD="${LD-ld} -melf64bmip" 1319a33c354dSmrg ;; 1320a33c354dSmrg esac 1321a33c354dSmrg else 1322a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1323a33c354dSmrg *32-bit*) 1324a33c354dSmrg LD="${LD-ld} -32" 1325a33c354dSmrg ;; 1326a33c354dSmrg *N32*) 1327a33c354dSmrg LD="${LD-ld} -n32" 1328a33c354dSmrg ;; 1329a33c354dSmrg *64-bit*) 1330a33c354dSmrg LD="${LD-ld} -64" 1331a33c354dSmrg ;; 1332a33c354dSmrg esac 1333a33c354dSmrg fi 1334a33c354dSmrg fi 1335a33c354dSmrg rm -rf conftest* 1336a33c354dSmrg ;; 1337a33c354dSmrg 1338a33c354dSmrgmips64*-*linux*) 1339a33c354dSmrg # Find out what ABI is being produced by ac_compile, and set linker 1340a33c354dSmrg # options accordingly. 1341a33c354dSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1342a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 1343a33c354dSmrg emul=elf 1344a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1345a33c354dSmrg *32-bit*) 1346a33c354dSmrg emul="${emul}32" 1347a33c354dSmrg ;; 1348a33c354dSmrg *64-bit*) 1349a33c354dSmrg emul="${emul}64" 1350a33c354dSmrg ;; 1351a33c354dSmrg esac 1352a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1353a33c354dSmrg *MSB*) 1354a33c354dSmrg emul="${emul}btsmip" 1355a33c354dSmrg ;; 1356a33c354dSmrg *LSB*) 1357a33c354dSmrg emul="${emul}ltsmip" 1358a33c354dSmrg ;; 1359a33c354dSmrg esac 1360a33c354dSmrg case `$FILECMD conftest.$ac_objext` in 1361a33c354dSmrg *N32*) 1362a33c354dSmrg emul="${emul}n32" 1363a33c354dSmrg ;; 1364a33c354dSmrg esac 1365a33c354dSmrg LD="${LD-ld} -m $emul" 1366a33c354dSmrg fi 1367a33c354dSmrg rm -rf conftest* 1368a33c354dSmrg ;; 1369a33c354dSmrg 1370a33c354dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1371a33c354dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1372a33c354dSmrg # Find out what ABI is being produced by ac_compile, and set linker 1373a33c354dSmrg # options accordingly. Note that the listed cases only cover the 1374a33c354dSmrg # situations where additional linker options are needed (such as when 1375a33c354dSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1376a33c354dSmrg # vice versa); the common cases where no linker options are needed do 1377a33c354dSmrg # not appear in the list. 1378a33c354dSmrg echo 'int i;' > conftest.$ac_ext 1379a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 1380a33c354dSmrg case `$FILECMD conftest.o` in 1381a33c354dSmrg *32-bit*) 1382a33c354dSmrg case $host in 1383a33c354dSmrg x86_64-*kfreebsd*-gnu) 1384a33c354dSmrg LD="${LD-ld} -m elf_i386_fbsd" 1385a33c354dSmrg ;; 1386a33c354dSmrg x86_64-*linux*) 1387a33c354dSmrg case `$FILECMD conftest.o` in 1388a33c354dSmrg *x86-64*) 1389a33c354dSmrg LD="${LD-ld} -m elf32_x86_64" 1390a33c354dSmrg ;; 1391a33c354dSmrg *) 1392a33c354dSmrg LD="${LD-ld} -m elf_i386" 1393a33c354dSmrg ;; 1394a33c354dSmrg esac 1395a33c354dSmrg ;; 1396a33c354dSmrg powerpc64le-*linux*) 1397a33c354dSmrg LD="${LD-ld} -m elf32lppclinux" 1398a33c354dSmrg ;; 1399a33c354dSmrg powerpc64-*linux*) 1400a33c354dSmrg LD="${LD-ld} -m elf32ppclinux" 1401a33c354dSmrg ;; 1402a33c354dSmrg s390x-*linux*) 1403a33c354dSmrg LD="${LD-ld} -m elf_s390" 1404a33c354dSmrg ;; 1405a33c354dSmrg sparc64-*linux*) 1406a33c354dSmrg LD="${LD-ld} -m elf32_sparc" 1407a33c354dSmrg ;; 1408a33c354dSmrg esac 1409a33c354dSmrg ;; 1410a33c354dSmrg *64-bit*) 1411a33c354dSmrg case $host in 1412a33c354dSmrg x86_64-*kfreebsd*-gnu) 1413a33c354dSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1414a33c354dSmrg ;; 1415a33c354dSmrg x86_64-*linux*) 1416a33c354dSmrg LD="${LD-ld} -m elf_x86_64" 1417a33c354dSmrg ;; 1418a33c354dSmrg powerpcle-*linux*) 1419a33c354dSmrg LD="${LD-ld} -m elf64lppc" 1420a33c354dSmrg ;; 1421a33c354dSmrg powerpc-*linux*) 1422a33c354dSmrg LD="${LD-ld} -m elf64ppc" 1423a33c354dSmrg ;; 1424a33c354dSmrg s390*-*linux*|s390*-*tpf*) 1425a33c354dSmrg LD="${LD-ld} -m elf64_s390" 1426a33c354dSmrg ;; 1427a33c354dSmrg sparc*-*linux*) 1428a33c354dSmrg LD="${LD-ld} -m elf64_sparc" 1429a33c354dSmrg ;; 1430a33c354dSmrg esac 1431a33c354dSmrg ;; 1432a33c354dSmrg esac 1433a33c354dSmrg fi 1434a33c354dSmrg rm -rf conftest* 1435a33c354dSmrg ;; 1436a33c354dSmrg 1437a33c354dSmrg*-*-sco3.2v5*) 1438a33c354dSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1439a33c354dSmrg SAVE_CFLAGS=$CFLAGS 1440a33c354dSmrg CFLAGS="$CFLAGS -belf" 1441a33c354dSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1442a33c354dSmrg [AC_LANG_PUSH(C) 1443a33c354dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1444a33c354dSmrg AC_LANG_POP]) 1445a33c354dSmrg if test yes != "$lt_cv_cc_needs_belf"; then 1446a33c354dSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1447a33c354dSmrg CFLAGS=$SAVE_CFLAGS 1448a33c354dSmrg fi 1449a33c354dSmrg ;; 1450a33c354dSmrg*-*solaris*) 1451a33c354dSmrg # Find out what ABI is being produced by ac_compile, and set linker 1452a33c354dSmrg # options accordingly. 1453a33c354dSmrg echo 'int i;' > conftest.$ac_ext 1454a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 1455a33c354dSmrg case `$FILECMD conftest.o` in 1456a33c354dSmrg *64-bit*) 1457a33c354dSmrg case $lt_cv_prog_gnu_ld in 1458a33c354dSmrg yes*) 1459a33c354dSmrg case $host in 1460a33c354dSmrg i?86-*-solaris*|x86_64-*-solaris*) 1461a33c354dSmrg LD="${LD-ld} -m elf_x86_64" 1462a33c354dSmrg ;; 1463a33c354dSmrg sparc*-*-solaris*) 1464a33c354dSmrg LD="${LD-ld} -m elf64_sparc" 1465a33c354dSmrg ;; 1466a33c354dSmrg esac 1467a33c354dSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1468a33c354dSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1469a33c354dSmrg LD=${LD-ld}_sol2 1470a33c354dSmrg fi 1471a33c354dSmrg ;; 1472a33c354dSmrg *) 1473a33c354dSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1474a33c354dSmrg LD="${LD-ld} -64" 1475a33c354dSmrg fi 1476a33c354dSmrg ;; 1477a33c354dSmrg esac 1478a33c354dSmrg ;; 1479a33c354dSmrg esac 1480a33c354dSmrg fi 1481a33c354dSmrg rm -rf conftest* 1482a33c354dSmrg ;; 1483a33c354dSmrgesac 1484a33c354dSmrg 1485a33c354dSmrgneed_locks=$enable_libtool_lock 1486a33c354dSmrg])# _LT_ENABLE_LOCK 1487a33c354dSmrg 1488a33c354dSmrg 1489a33c354dSmrg# _LT_PROG_AR 1490a33c354dSmrg# ----------- 1491a33c354dSmrgm4_defun([_LT_PROG_AR], 1492a33c354dSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1493a33c354dSmrg: ${AR=ar} 1494a33c354dSmrg_LT_DECL([], [AR], [1], [The archiver]) 1495a33c354dSmrg 1496a33c354dSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1497a33c354dSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1498a33c354dSmrg# higher priority because thats what people were doing historically (setting 1499a33c354dSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1500a33c354dSmrg# variable obsoleted/removed. 1501a33c354dSmrg 1502a33c354dSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1503a33c354dSmrglt_ar_flags=$AR_FLAGS 1504a33c354dSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1505a33c354dSmrg 1506a33c354dSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1507a33c354dSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1508a33c354dSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1509a33c354dSmrg [Flags to create an archive]) 1510a33c354dSmrg 1511a33c354dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1512a33c354dSmrg [lt_cv_ar_at_file=no 1513a33c354dSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1514a33c354dSmrg [echo conftest.$ac_objext > conftest.lst 1515a33c354dSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1516a33c354dSmrg AC_TRY_EVAL([lt_ar_try]) 1517a33c354dSmrg if test 0 -eq "$ac_status"; then 1518a33c354dSmrg # Ensure the archiver fails upon bogus file names. 1519a33c354dSmrg rm -f conftest.$ac_objext libconftest.a 1520a33c354dSmrg AC_TRY_EVAL([lt_ar_try]) 1521a33c354dSmrg if test 0 -ne "$ac_status"; then 1522a33c354dSmrg lt_cv_ar_at_file=@ 1523a33c354dSmrg fi 1524a33c354dSmrg fi 1525a33c354dSmrg rm -f conftest.* libconftest.a 1526a33c354dSmrg ]) 1527a33c354dSmrg ]) 1528a33c354dSmrg 1529a33c354dSmrgif test no = "$lt_cv_ar_at_file"; then 1530a33c354dSmrg archiver_list_spec= 1531a33c354dSmrgelse 1532a33c354dSmrg archiver_list_spec=$lt_cv_ar_at_file 1533a33c354dSmrgfi 1534a33c354dSmrg_LT_DECL([], [archiver_list_spec], [1], 1535a33c354dSmrg [How to feed a file listing to the archiver]) 1536a33c354dSmrg])# _LT_PROG_AR 1537a33c354dSmrg 1538a33c354dSmrg 1539a33c354dSmrg# _LT_CMD_OLD_ARCHIVE 1540a33c354dSmrg# ------------------- 1541a33c354dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1542a33c354dSmrg[_LT_PROG_AR 1543a33c354dSmrg 1544a33c354dSmrgAC_CHECK_TOOL(STRIP, strip, :) 1545a33c354dSmrgtest -z "$STRIP" && STRIP=: 1546a33c354dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1547a33c354dSmrg 1548a33c354dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1549a33c354dSmrgtest -z "$RANLIB" && RANLIB=: 1550a33c354dSmrg_LT_DECL([], [RANLIB], [1], 1551a33c354dSmrg [Commands used to install an old-style archive]) 1552a33c354dSmrg 1553a33c354dSmrg# Determine commands to create old-style static archives. 1554a33c354dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1555a33c354dSmrgold_postinstall_cmds='chmod 644 $oldlib' 1556a33c354dSmrgold_postuninstall_cmds= 1557a33c354dSmrg 1558a33c354dSmrgif test -n "$RANLIB"; then 1559a33c354dSmrg case $host_os in 1560a33c354dSmrg bitrig* | openbsd*) 1561a33c354dSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1562a33c354dSmrg ;; 1563a33c354dSmrg *) 1564a33c354dSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1565a33c354dSmrg ;; 1566a33c354dSmrg esac 1567a33c354dSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1568a33c354dSmrgfi 1569a33c354dSmrg 1570a33c354dSmrgcase $host_os in 1571a33c354dSmrg darwin*) 1572a33c354dSmrg lock_old_archive_extraction=yes ;; 1573a33c354dSmrg *) 1574a33c354dSmrg lock_old_archive_extraction=no ;; 1575a33c354dSmrgesac 1576a33c354dSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1577a33c354dSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1578a33c354dSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1579a33c354dSmrg [Commands used to build an old-style archive]) 1580a33c354dSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1581a33c354dSmrg [Whether to use a lock for old archive extraction]) 1582a33c354dSmrg])# _LT_CMD_OLD_ARCHIVE 1583a33c354dSmrg 1584a33c354dSmrg 1585a33c354dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1586a33c354dSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1587a33c354dSmrg# ---------------------------------------------------------------- 1588a33c354dSmrg# Check whether the given compiler option works 1589a33c354dSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1590a33c354dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1591a33c354dSmrgm4_require([_LT_DECL_SED])dnl 1592a33c354dSmrgAC_CACHE_CHECK([$1], [$2], 1593a33c354dSmrg [$2=no 1594a33c354dSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1595a33c354dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1596a33c354dSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1597a33c354dSmrg # Insert the option either (1) after the last *FLAGS variable, or 1598a33c354dSmrg # (2) before a word containing "conftest.", or (3) at the end. 1599a33c354dSmrg # Note that $ac_compile itself does not contain backslashes and begins 1600a33c354dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1601a33c354dSmrg # The option is referenced via a variable to avoid confusing sed. 1602a33c354dSmrg lt_compile=`echo "$ac_compile" | $SED \ 1603a33c354dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1604a33c354dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1605a33c354dSmrg -e 's:$: $lt_compiler_flag:'` 1606a33c354dSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1607a33c354dSmrg (eval "$lt_compile" 2>conftest.err) 1608a33c354dSmrg ac_status=$? 1609a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1610a33c354dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1611a33c354dSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1612a33c354dSmrg # The compiler can only warn and ignore the option if not recognized 1613a33c354dSmrg # So say no if there are warnings other than the usual output. 1614a33c354dSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1615a33c354dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1616a33c354dSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1617a33c354dSmrg $2=yes 1618a33c354dSmrg fi 1619a33c354dSmrg fi 1620a33c354dSmrg $RM conftest* 1621a33c354dSmrg]) 1622a33c354dSmrg 1623a33c354dSmrgif test yes = "[$]$2"; then 1624a33c354dSmrg m4_if([$5], , :, [$5]) 1625a33c354dSmrgelse 1626a33c354dSmrg m4_if([$6], , :, [$6]) 1627a33c354dSmrgfi 1628a33c354dSmrg])# _LT_COMPILER_OPTION 1629a33c354dSmrg 1630a33c354dSmrg# Old name: 1631a33c354dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1632a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 1633a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1634a33c354dSmrg 1635a33c354dSmrg 1636a33c354dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1637a33c354dSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1638a33c354dSmrg# ---------------------------------------------------- 1639a33c354dSmrg# Check whether the given linker option works 1640a33c354dSmrgAC_DEFUN([_LT_LINKER_OPTION], 1641a33c354dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1642a33c354dSmrgm4_require([_LT_DECL_SED])dnl 1643a33c354dSmrgAC_CACHE_CHECK([$1], [$2], 1644a33c354dSmrg [$2=no 1645a33c354dSmrg save_LDFLAGS=$LDFLAGS 1646a33c354dSmrg LDFLAGS="$LDFLAGS $3" 1647a33c354dSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1648a33c354dSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1649a33c354dSmrg # The linker can only warn and ignore the option if not recognized 1650a33c354dSmrg # So say no if there are warnings 1651a33c354dSmrg if test -s conftest.err; then 1652a33c354dSmrg # Append any errors to the config.log. 1653a33c354dSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1654a33c354dSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1655a33c354dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1656a33c354dSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1657a33c354dSmrg $2=yes 1658a33c354dSmrg fi 1659a33c354dSmrg else 1660a33c354dSmrg $2=yes 1661a33c354dSmrg fi 1662a33c354dSmrg fi 1663a33c354dSmrg $RM -r conftest* 1664a33c354dSmrg LDFLAGS=$save_LDFLAGS 1665a33c354dSmrg]) 1666a33c354dSmrg 1667a33c354dSmrgif test yes = "[$]$2"; then 1668a33c354dSmrg m4_if([$4], , :, [$4]) 1669a33c354dSmrgelse 1670a33c354dSmrg m4_if([$5], , :, [$5]) 1671a33c354dSmrgfi 1672a33c354dSmrg])# _LT_LINKER_OPTION 1673a33c354dSmrg 1674a33c354dSmrg# Old name: 1675a33c354dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1676a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 1677a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1678a33c354dSmrg 1679a33c354dSmrg 1680a33c354dSmrg# LT_CMD_MAX_LEN 1681a33c354dSmrg#--------------- 1682a33c354dSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1683a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1684a33c354dSmrg# find the maximum length of command line arguments 1685a33c354dSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1686a33c354dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1687a33c354dSmrg i=0 1688a33c354dSmrg teststring=ABCD 1689a33c354dSmrg 1690a33c354dSmrg case $build_os in 1691a33c354dSmrg msdosdjgpp*) 1692a33c354dSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1693a33c354dSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1694a33c354dSmrg # during glob expansion). Even if it were fixed, the result of this 1695a33c354dSmrg # check would be larger than it should be. 1696a33c354dSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1697a33c354dSmrg ;; 1698a33c354dSmrg 1699a33c354dSmrg gnu*) 1700a33c354dSmrg # Under GNU Hurd, this test is not required because there is 1701a33c354dSmrg # no limit to the length of command line arguments. 1702a33c354dSmrg # Libtool will interpret -1 as no limit whatsoever 1703a33c354dSmrg lt_cv_sys_max_cmd_len=-1; 1704a33c354dSmrg ;; 1705a33c354dSmrg 1706a33c354dSmrg cygwin* | mingw* | cegcc*) 1707a33c354dSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1708a33c354dSmrg # about 5 minutes as the teststring grows exponentially. 1709a33c354dSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1710a33c354dSmrg # you end up with a "frozen" computer, even though with patience 1711a33c354dSmrg # the test eventually succeeds (with a max line length of 256k). 1712a33c354dSmrg # Instead, let's just punt: use the minimum linelength reported by 1713a33c354dSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1714a33c354dSmrg lt_cv_sys_max_cmd_len=8192; 1715a33c354dSmrg ;; 1716a33c354dSmrg 1717a33c354dSmrg mint*) 1718a33c354dSmrg # On MiNT this can take a long time and run out of memory. 1719a33c354dSmrg lt_cv_sys_max_cmd_len=8192; 1720a33c354dSmrg ;; 1721a33c354dSmrg 1722a33c354dSmrg amigaos*) 1723a33c354dSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1724a33c354dSmrg # So we just punt and use a minimum line length of 8192. 1725a33c354dSmrg lt_cv_sys_max_cmd_len=8192; 1726a33c354dSmrg ;; 1727a33c354dSmrg 1728a33c354dSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1729a33c354dSmrg # This has been around since 386BSD, at least. Likely further. 1730a33c354dSmrg if test -x /sbin/sysctl; then 1731a33c354dSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1732a33c354dSmrg elif test -x /usr/sbin/sysctl; then 1733a33c354dSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1734a33c354dSmrg else 1735a33c354dSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1736a33c354dSmrg fi 1737a33c354dSmrg # And add a safety zone 1738a33c354dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1739a33c354dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1740a33c354dSmrg ;; 1741a33c354dSmrg 1742a33c354dSmrg interix*) 1743a33c354dSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1744a33c354dSmrg lt_cv_sys_max_cmd_len=196608 1745a33c354dSmrg ;; 1746a33c354dSmrg 1747a33c354dSmrg os2*) 1748a33c354dSmrg # The test takes a long time on OS/2. 1749a33c354dSmrg lt_cv_sys_max_cmd_len=8192 1750a33c354dSmrg ;; 1751a33c354dSmrg 1752a33c354dSmrg osf*) 1753a33c354dSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1754a33c354dSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1755a33c354dSmrg # nice to cause kernel panics so lets avoid the loop below. 1756a33c354dSmrg # First set a reasonable default. 1757a33c354dSmrg lt_cv_sys_max_cmd_len=16384 1758a33c354dSmrg # 1759a33c354dSmrg if test -x /sbin/sysconfig; then 1760a33c354dSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1761a33c354dSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1762a33c354dSmrg esac 1763a33c354dSmrg fi 1764a33c354dSmrg ;; 1765a33c354dSmrg sco3.2v5*) 1766a33c354dSmrg lt_cv_sys_max_cmd_len=102400 1767a33c354dSmrg ;; 1768a33c354dSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1769a33c354dSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1770a33c354dSmrg if test -n "$kargmax"; then 1771a33c354dSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1772a33c354dSmrg else 1773a33c354dSmrg lt_cv_sys_max_cmd_len=32768 1774a33c354dSmrg fi 1775a33c354dSmrg ;; 1776a33c354dSmrg *) 1777a33c354dSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1778a33c354dSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1779a33c354dSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1780a33c354dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1781a33c354dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1782a33c354dSmrg else 1783a33c354dSmrg # Make teststring a little bigger before we do anything with it. 1784a33c354dSmrg # a 1K string should be a reasonable start. 1785a33c354dSmrg for i in 1 2 3 4 5 6 7 8; do 1786a33c354dSmrg teststring=$teststring$teststring 1787a33c354dSmrg done 1788a33c354dSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1789a33c354dSmrg # If test is not a shell built-in, we'll probably end up computing a 1790a33c354dSmrg # maximum length that is only half of the actual maximum length, but 1791a33c354dSmrg # we can't tell. 1792a33c354dSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1793a33c354dSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1794a33c354dSmrg test 17 != "$i" # 1/2 MB should be enough 1795a33c354dSmrg do 1796a33c354dSmrg i=`expr $i + 1` 1797a33c354dSmrg teststring=$teststring$teststring 1798a33c354dSmrg done 1799a33c354dSmrg # Only check the string length outside the loop. 1800a33c354dSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1801a33c354dSmrg teststring= 1802a33c354dSmrg # Add a significant safety factor because C++ compilers can tack on 1803a33c354dSmrg # massive amounts of additional arguments before passing them to the 1804a33c354dSmrg # linker. It appears as though 1/2 is a usable value. 1805a33c354dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1806a33c354dSmrg fi 1807a33c354dSmrg ;; 1808a33c354dSmrg esac 1809a33c354dSmrg]) 1810a33c354dSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 1811a33c354dSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1812a33c354dSmrgelse 1813a33c354dSmrg AC_MSG_RESULT(none) 1814a33c354dSmrgfi 1815a33c354dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1816a33c354dSmrg_LT_DECL([], [max_cmd_len], [0], 1817a33c354dSmrg [What is the maximum length of a command?]) 1818a33c354dSmrg])# LT_CMD_MAX_LEN 1819a33c354dSmrg 1820a33c354dSmrg# Old name: 1821a33c354dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1822a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 1823a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1824a33c354dSmrg 1825a33c354dSmrg 1826a33c354dSmrg# _LT_HEADER_DLFCN 1827a33c354dSmrg# ---------------- 1828a33c354dSmrgm4_defun([_LT_HEADER_DLFCN], 1829a33c354dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1830a33c354dSmrg])# _LT_HEADER_DLFCN 1831a33c354dSmrg 1832a33c354dSmrg 1833a33c354dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1834a33c354dSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1835a33c354dSmrg# ---------------------------------------------------------------- 1836a33c354dSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1837a33c354dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1838a33c354dSmrgif test yes = "$cross_compiling"; then : 1839a33c354dSmrg [$4] 1840a33c354dSmrgelse 1841a33c354dSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1842a33c354dSmrg lt_status=$lt_dlunknown 1843a33c354dSmrg cat > conftest.$ac_ext <<_LT_EOF 1844a33c354dSmrg[#line $LINENO "configure" 1845a33c354dSmrg#include "confdefs.h" 1846a33c354dSmrg 1847a33c354dSmrg#if HAVE_DLFCN_H 1848a33c354dSmrg#include <dlfcn.h> 1849a33c354dSmrg#endif 1850a33c354dSmrg 1851a33c354dSmrg#include <stdio.h> 1852a33c354dSmrg 1853a33c354dSmrg#ifdef RTLD_GLOBAL 1854a33c354dSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1855a33c354dSmrg#else 1856a33c354dSmrg# ifdef DL_GLOBAL 1857a33c354dSmrg# define LT_DLGLOBAL DL_GLOBAL 1858a33c354dSmrg# else 1859a33c354dSmrg# define LT_DLGLOBAL 0 1860a33c354dSmrg# endif 1861a33c354dSmrg#endif 1862a33c354dSmrg 1863a33c354dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1864a33c354dSmrg find out it does not work in some platform. */ 1865a33c354dSmrg#ifndef LT_DLLAZY_OR_NOW 1866a33c354dSmrg# ifdef RTLD_LAZY 1867a33c354dSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1868a33c354dSmrg# else 1869a33c354dSmrg# ifdef DL_LAZY 1870a33c354dSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1871a33c354dSmrg# else 1872a33c354dSmrg# ifdef RTLD_NOW 1873a33c354dSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1874a33c354dSmrg# else 1875a33c354dSmrg# ifdef DL_NOW 1876a33c354dSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1877a33c354dSmrg# else 1878a33c354dSmrg# define LT_DLLAZY_OR_NOW 0 1879a33c354dSmrg# endif 1880a33c354dSmrg# endif 1881a33c354dSmrg# endif 1882a33c354dSmrg# endif 1883a33c354dSmrg#endif 1884a33c354dSmrg 1885a33c354dSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 1886a33c354dSmrg correspondingly for the symbols needed. */ 1887a33c354dSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1888a33c354dSmrgint fnord () __attribute__((visibility("default"))); 1889a33c354dSmrg#endif 1890a33c354dSmrg 1891a33c354dSmrgint fnord () { return 42; } 1892a33c354dSmrgint main () 1893a33c354dSmrg{ 1894a33c354dSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1895a33c354dSmrg int status = $lt_dlunknown; 1896a33c354dSmrg 1897a33c354dSmrg if (self) 1898a33c354dSmrg { 1899a33c354dSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1900a33c354dSmrg else 1901a33c354dSmrg { 1902a33c354dSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1903a33c354dSmrg else puts (dlerror ()); 1904a33c354dSmrg } 1905a33c354dSmrg /* dlclose (self); */ 1906a33c354dSmrg } 1907a33c354dSmrg else 1908a33c354dSmrg puts (dlerror ()); 1909a33c354dSmrg 1910a33c354dSmrg return status; 1911a33c354dSmrg}] 1912a33c354dSmrg_LT_EOF 1913a33c354dSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1914a33c354dSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1915a33c354dSmrg lt_status=$? 1916a33c354dSmrg case x$lt_status in 1917a33c354dSmrg x$lt_dlno_uscore) $1 ;; 1918a33c354dSmrg x$lt_dlneed_uscore) $2 ;; 1919a33c354dSmrg x$lt_dlunknown|x*) $3 ;; 1920a33c354dSmrg esac 1921a33c354dSmrg else : 1922a33c354dSmrg # compilation failed 1923a33c354dSmrg $3 1924a33c354dSmrg fi 1925a33c354dSmrgfi 1926a33c354dSmrgrm -fr conftest* 1927a33c354dSmrg])# _LT_TRY_DLOPEN_SELF 1928a33c354dSmrg 1929a33c354dSmrg 1930a33c354dSmrg# LT_SYS_DLOPEN_SELF 1931a33c354dSmrg# ------------------ 1932a33c354dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1933a33c354dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1934a33c354dSmrgif test yes != "$enable_dlopen"; then 1935a33c354dSmrg enable_dlopen=unknown 1936a33c354dSmrg enable_dlopen_self=unknown 1937a33c354dSmrg enable_dlopen_self_static=unknown 1938a33c354dSmrgelse 1939a33c354dSmrg lt_cv_dlopen=no 1940a33c354dSmrg lt_cv_dlopen_libs= 1941a33c354dSmrg 1942a33c354dSmrg case $host_os in 1943a33c354dSmrg beos*) 1944a33c354dSmrg lt_cv_dlopen=load_add_on 1945a33c354dSmrg lt_cv_dlopen_libs= 1946a33c354dSmrg lt_cv_dlopen_self=yes 1947a33c354dSmrg ;; 1948a33c354dSmrg 1949a33c354dSmrg mingw* | pw32* | cegcc*) 1950a33c354dSmrg lt_cv_dlopen=LoadLibrary 1951a33c354dSmrg lt_cv_dlopen_libs= 1952a33c354dSmrg ;; 1953a33c354dSmrg 1954a33c354dSmrg cygwin*) 1955a33c354dSmrg lt_cv_dlopen=dlopen 1956a33c354dSmrg lt_cv_dlopen_libs= 1957a33c354dSmrg ;; 1958a33c354dSmrg 1959a33c354dSmrg darwin*) 1960a33c354dSmrg # if libdl is installed we need to link against it 1961a33c354dSmrg AC_CHECK_LIB([dl], [dlopen], 1962a33c354dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1963a33c354dSmrg lt_cv_dlopen=dyld 1964a33c354dSmrg lt_cv_dlopen_libs= 1965a33c354dSmrg lt_cv_dlopen_self=yes 1966a33c354dSmrg ]) 1967a33c354dSmrg ;; 1968a33c354dSmrg 1969a33c354dSmrg tpf*) 1970a33c354dSmrg # Don't try to run any link tests for TPF. We know it's impossible 1971a33c354dSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1972a33c354dSmrg lt_cv_dlopen=dlopen 1973a33c354dSmrg lt_cv_dlopen_libs= 1974a33c354dSmrg lt_cv_dlopen_self=no 1975a33c354dSmrg ;; 1976a33c354dSmrg 1977a33c354dSmrg *) 1978a33c354dSmrg AC_CHECK_FUNC([shl_load], 1979a33c354dSmrg [lt_cv_dlopen=shl_load], 1980a33c354dSmrg [AC_CHECK_LIB([dld], [shl_load], 1981a33c354dSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1982a33c354dSmrg [AC_CHECK_FUNC([dlopen], 1983a33c354dSmrg [lt_cv_dlopen=dlopen], 1984a33c354dSmrg [AC_CHECK_LIB([dl], [dlopen], 1985a33c354dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1986a33c354dSmrg [AC_CHECK_LIB([svld], [dlopen], 1987a33c354dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1988a33c354dSmrg [AC_CHECK_LIB([dld], [dld_link], 1989a33c354dSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1990a33c354dSmrg ]) 1991a33c354dSmrg ]) 1992a33c354dSmrg ]) 1993a33c354dSmrg ]) 1994a33c354dSmrg ]) 1995a33c354dSmrg ;; 1996a33c354dSmrg esac 1997a33c354dSmrg 1998a33c354dSmrg if test no = "$lt_cv_dlopen"; then 1999a33c354dSmrg enable_dlopen=no 2000a33c354dSmrg else 2001a33c354dSmrg enable_dlopen=yes 2002a33c354dSmrg fi 2003a33c354dSmrg 2004a33c354dSmrg case $lt_cv_dlopen in 2005a33c354dSmrg dlopen) 2006a33c354dSmrg save_CPPFLAGS=$CPPFLAGS 2007a33c354dSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2008a33c354dSmrg 2009a33c354dSmrg save_LDFLAGS=$LDFLAGS 2010a33c354dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2011a33c354dSmrg 2012a33c354dSmrg save_LIBS=$LIBS 2013a33c354dSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2014a33c354dSmrg 2015a33c354dSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2016a33c354dSmrg lt_cv_dlopen_self, [dnl 2017a33c354dSmrg _LT_TRY_DLOPEN_SELF( 2018a33c354dSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2019a33c354dSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2020a33c354dSmrg ]) 2021a33c354dSmrg 2022a33c354dSmrg if test yes = "$lt_cv_dlopen_self"; then 2023a33c354dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2024a33c354dSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2025a33c354dSmrg lt_cv_dlopen_self_static, [dnl 2026a33c354dSmrg _LT_TRY_DLOPEN_SELF( 2027a33c354dSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2028a33c354dSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2029a33c354dSmrg ]) 2030a33c354dSmrg fi 2031a33c354dSmrg 2032a33c354dSmrg CPPFLAGS=$save_CPPFLAGS 2033a33c354dSmrg LDFLAGS=$save_LDFLAGS 2034a33c354dSmrg LIBS=$save_LIBS 2035a33c354dSmrg ;; 2036a33c354dSmrg esac 2037a33c354dSmrg 2038a33c354dSmrg case $lt_cv_dlopen_self in 2039a33c354dSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2040a33c354dSmrg *) enable_dlopen_self=unknown ;; 2041a33c354dSmrg esac 2042a33c354dSmrg 2043a33c354dSmrg case $lt_cv_dlopen_self_static in 2044a33c354dSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2045a33c354dSmrg *) enable_dlopen_self_static=unknown ;; 2046a33c354dSmrg esac 2047a33c354dSmrgfi 2048a33c354dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2049a33c354dSmrg [Whether dlopen is supported]) 2050a33c354dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2051a33c354dSmrg [Whether dlopen of programs is supported]) 2052a33c354dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2053a33c354dSmrg [Whether dlopen of statically linked programs is supported]) 2054a33c354dSmrg])# LT_SYS_DLOPEN_SELF 2055a33c354dSmrg 2056a33c354dSmrg# Old name: 2057a33c354dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2058a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 2059a33c354dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2060a33c354dSmrg 2061a33c354dSmrg 2062a33c354dSmrg# _LT_COMPILER_C_O([TAGNAME]) 2063a33c354dSmrg# --------------------------- 2064a33c354dSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2065a33c354dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2066a33c354dSmrgm4_defun([_LT_COMPILER_C_O], 2067a33c354dSmrg[m4_require([_LT_DECL_SED])dnl 2068a33c354dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2069a33c354dSmrgm4_require([_LT_TAG_COMPILER])dnl 2070a33c354dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2071a33c354dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2072a33c354dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2073a33c354dSmrg $RM -r conftest 2>/dev/null 2074a33c354dSmrg mkdir conftest 2075a33c354dSmrg cd conftest 2076a33c354dSmrg mkdir out 2077a33c354dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2078a33c354dSmrg 2079a33c354dSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2080a33c354dSmrg # Insert the option either (1) after the last *FLAGS variable, or 2081a33c354dSmrg # (2) before a word containing "conftest.", or (3) at the end. 2082a33c354dSmrg # Note that $ac_compile itself does not contain backslashes and begins 2083a33c354dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2084a33c354dSmrg lt_compile=`echo "$ac_compile" | $SED \ 2085a33c354dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2086a33c354dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2087a33c354dSmrg -e 's:$: $lt_compiler_flag:'` 2088a33c354dSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2089a33c354dSmrg (eval "$lt_compile" 2>out/conftest.err) 2090a33c354dSmrg ac_status=$? 2091a33c354dSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2092a33c354dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2093a33c354dSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2094a33c354dSmrg then 2095a33c354dSmrg # The compiler can only warn and ignore the option if not recognized 2096a33c354dSmrg # So say no if there are warnings 2097a33c354dSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2098a33c354dSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2099a33c354dSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2100a33c354dSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2101a33c354dSmrg fi 2102a33c354dSmrg fi 2103a33c354dSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2104a33c354dSmrg $RM conftest* 2105a33c354dSmrg # SGI C++ compiler will create directory out/ii_files/ for 2106a33c354dSmrg # template instantiation 2107a33c354dSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2108a33c354dSmrg $RM out/* && rmdir out 2109a33c354dSmrg cd .. 2110a33c354dSmrg $RM -r conftest 2111a33c354dSmrg $RM conftest* 2112a33c354dSmrg]) 2113a33c354dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2114a33c354dSmrg [Does compiler simultaneously support -c and -o options?]) 2115a33c354dSmrg])# _LT_COMPILER_C_O 2116a33c354dSmrg 2117a33c354dSmrg 2118a33c354dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2119a33c354dSmrg# ---------------------------------- 2120a33c354dSmrg# Check to see if we can do hard links to lock some files if needed 2121a33c354dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2122a33c354dSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2123a33c354dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2124a33c354dSmrg_LT_COMPILER_C_O([$1]) 2125a33c354dSmrg 2126a33c354dSmrghard_links=nottested 2127a33c354dSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2128a33c354dSmrg # do not overwrite the value of need_locks provided by the user 2129a33c354dSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2130a33c354dSmrg hard_links=yes 2131a33c354dSmrg $RM conftest* 2132a33c354dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2133a33c354dSmrg touch conftest.a 2134a33c354dSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2135a33c354dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136a33c354dSmrg AC_MSG_RESULT([$hard_links]) 2137a33c354dSmrg if test no = "$hard_links"; then 2138a33c354dSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2139a33c354dSmrg need_locks=warn 2140a33c354dSmrg fi 2141a33c354dSmrgelse 2142a33c354dSmrg need_locks=no 2143a33c354dSmrgfi 2144a33c354dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2145a33c354dSmrg])# _LT_COMPILER_FILE_LOCKS 2146a33c354dSmrg 2147a33c354dSmrg 2148a33c354dSmrg# _LT_CHECK_OBJDIR 2149a33c354dSmrg# ---------------- 2150a33c354dSmrgm4_defun([_LT_CHECK_OBJDIR], 2151a33c354dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2152a33c354dSmrg[rm -f .libs 2>/dev/null 2153a33c354dSmrgmkdir .libs 2>/dev/null 2154a33c354dSmrgif test -d .libs; then 2155a33c354dSmrg lt_cv_objdir=.libs 2156a33c354dSmrgelse 2157a33c354dSmrg # MS-DOS does not allow filenames that begin with a dot. 2158a33c354dSmrg lt_cv_objdir=_libs 2159a33c354dSmrgfi 2160a33c354dSmrgrmdir .libs 2>/dev/null]) 2161a33c354dSmrgobjdir=$lt_cv_objdir 2162a33c354dSmrg_LT_DECL([], [objdir], [0], 2163a33c354dSmrg [The name of the directory that contains temporary libtool files])dnl 2164a33c354dSmrgm4_pattern_allow([LT_OBJDIR])dnl 2165a33c354dSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2166a33c354dSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2167a33c354dSmrg])# _LT_CHECK_OBJDIR 2168a33c354dSmrg 2169a33c354dSmrg 2170a33c354dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2171a33c354dSmrg# -------------------------------------- 2172a33c354dSmrg# Check hardcoding attributes. 2173a33c354dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2174a33c354dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2175a33c354dSmrg_LT_TAGVAR(hardcode_action, $1)= 2176a33c354dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2177a33c354dSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2178a33c354dSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2179a33c354dSmrg 2180a33c354dSmrg # We can hardcode non-existent directories. 2181a33c354dSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2182a33c354dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2183a33c354dSmrg # have to relink, otherwise we might link with an installed library 2184a33c354dSmrg # when we should be linking with a yet-to-be-installed one 2185a33c354dSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2186a33c354dSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2187a33c354dSmrg # Linking always hardcodes the temporary library directory. 2188a33c354dSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2189a33c354dSmrg else 2190a33c354dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2191a33c354dSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2192a33c354dSmrg fi 2193a33c354dSmrgelse 2194a33c354dSmrg # We cannot hardcode anything, or else we can only hardcode existing 2195a33c354dSmrg # directories. 2196a33c354dSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2197a33c354dSmrgfi 2198a33c354dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2199a33c354dSmrg 2200a33c354dSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2201a33c354dSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2202a33c354dSmrg # Fast installation is not supported 2203a33c354dSmrg enable_fast_install=no 2204a33c354dSmrgelif test yes = "$shlibpath_overrides_runpath" || 2205a33c354dSmrg test no = "$enable_shared"; then 2206a33c354dSmrg # Fast installation is not necessary 2207a33c354dSmrg enable_fast_install=needless 2208a33c354dSmrgfi 2209a33c354dSmrg_LT_TAGDECL([], [hardcode_action], [0], 2210a33c354dSmrg [How to hardcode a shared library path into an executable]) 2211a33c354dSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2212a33c354dSmrg 2213a33c354dSmrg 2214a33c354dSmrg# _LT_CMD_STRIPLIB 2215a33c354dSmrg# ---------------- 2216a33c354dSmrgm4_defun([_LT_CMD_STRIPLIB], 2217a33c354dSmrg[m4_require([_LT_DECL_EGREP]) 2218a33c354dSmrgstriplib= 2219a33c354dSmrgold_striplib= 2220a33c354dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2221a33c354dSmrgif test -z "$STRIP"; then 2222a33c354dSmrg AC_MSG_RESULT([no]) 2223a33c354dSmrgelse 2224a33c354dSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225a33c354dSmrg old_striplib="$STRIP --strip-debug" 2226a33c354dSmrg striplib="$STRIP --strip-unneeded" 2227a33c354dSmrg AC_MSG_RESULT([yes]) 2228a33c354dSmrg else 2229a33c354dSmrg case $host_os in 2230a33c354dSmrg darwin*) 2231a33c354dSmrg # FIXME - insert some real tests, host_os isn't really good enough 2232a33c354dSmrg striplib="$STRIP -x" 2233a33c354dSmrg old_striplib="$STRIP -S" 2234a33c354dSmrg AC_MSG_RESULT([yes]) 2235a33c354dSmrg ;; 2236a33c354dSmrg freebsd*) 2237a33c354dSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2238a33c354dSmrg old_striplib="$STRIP --strip-debug" 2239a33c354dSmrg striplib="$STRIP --strip-unneeded" 2240a33c354dSmrg AC_MSG_RESULT([yes]) 2241a33c354dSmrg else 2242a33c354dSmrg AC_MSG_RESULT([no]) 2243a33c354dSmrg fi 2244a33c354dSmrg ;; 2245a33c354dSmrg *) 2246a33c354dSmrg AC_MSG_RESULT([no]) 2247a33c354dSmrg ;; 2248a33c354dSmrg esac 2249a33c354dSmrg fi 2250a33c354dSmrgfi 2251a33c354dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2252a33c354dSmrg_LT_DECL([], [striplib], [1]) 2253a33c354dSmrg])# _LT_CMD_STRIPLIB 2254a33c354dSmrg 2255a33c354dSmrg 2256a33c354dSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2257a33c354dSmrg# --------------------------- 2258a33c354dSmrg# Make sure func_munge_path_list() is defined correctly. 2259a33c354dSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2260a33c354dSmrg[[# func_munge_path_list VARIABLE PATH 2261a33c354dSmrg# ----------------------------------- 2262a33c354dSmrg# VARIABLE is name of variable containing _space_ separated list of 2263a33c354dSmrg# directories to be munged by the contents of PATH, which is string 2264a33c354dSmrg# having a format: 2265a33c354dSmrg# "DIR[:DIR]:" 2266a33c354dSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2267a33c354dSmrg# ":DIR[:DIR]" 2268a33c354dSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2269a33c354dSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2270a33c354dSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2271a33c354dSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2272a33c354dSmrg# "DIR[:DIR]" 2273a33c354dSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2274a33c354dSmrgfunc_munge_path_list () 2275a33c354dSmrg{ 2276a33c354dSmrg case x@S|@2 in 2277a33c354dSmrg x) 2278a33c354dSmrg ;; 2279a33c354dSmrg *:) 2280a33c354dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2281a33c354dSmrg ;; 2282a33c354dSmrg x:*) 2283a33c354dSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2284a33c354dSmrg ;; 2285a33c354dSmrg *::*) 2286a33c354dSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2287a33c354dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2288a33c354dSmrg ;; 2289a33c354dSmrg *) 2290a33c354dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2291a33c354dSmrg ;; 2292a33c354dSmrg esac 2293a33c354dSmrg} 2294a33c354dSmrg]])# _LT_PREPARE_PATH_LIST 2295a33c354dSmrg 2296a33c354dSmrg 2297a33c354dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2298a33c354dSmrg# ----------------------------- 2299a33c354dSmrg# PORTME Fill in your ld.so characteristics 2300a33c354dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2301a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2302a33c354dSmrgm4_require([_LT_DECL_EGREP])dnl 2303a33c354dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2304a33c354dSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2305a33c354dSmrgm4_require([_LT_DECL_SED])dnl 2306a33c354dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2307a33c354dSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2308a33c354dSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2309a33c354dSmrgm4_if([$1], 2310a33c354dSmrg [], [ 2311a33c354dSmrgif test yes = "$GCC"; then 2312a33c354dSmrg case $host_os in 2313a33c354dSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2314a33c354dSmrg *) lt_awk_arg='/^libraries:/' ;; 2315a33c354dSmrg esac 2316a33c354dSmrg case $host_os in 2317a33c354dSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2318a33c354dSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2319a33c354dSmrg esac 2320a33c354dSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2321a33c354dSmrg case $lt_search_path_spec in 2322a33c354dSmrg *\;*) 2323a33c354dSmrg # if the path contains ";" then we assume it to be the separator 2324a33c354dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2325a33c354dSmrg # assumed that no part of a normal pathname contains ";" but that should 2326a33c354dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2327a33c354dSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2328a33c354dSmrg ;; 2329a33c354dSmrg *) 2330a33c354dSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2331a33c354dSmrg ;; 2332a33c354dSmrg esac 2333a33c354dSmrg # Ok, now we have the path, separated by spaces, we can step through it 2334a33c354dSmrg # and add multilib dir if necessary... 2335a33c354dSmrg lt_tmp_lt_search_path_spec= 2336a33c354dSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2337a33c354dSmrg # ...but if some path component already ends with the multilib dir we assume 2338a33c354dSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2339a33c354dSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2340a33c354dSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2341a33c354dSmrg lt_multi_os_dir= 2342a33c354dSmrg ;; 2343a33c354dSmrg esac 2344a33c354dSmrg for lt_sys_path in $lt_search_path_spec; do 2345a33c354dSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2346a33c354dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2347a33c354dSmrg elif test -n "$lt_multi_os_dir"; then 2348a33c354dSmrg test -d "$lt_sys_path" && \ 2349a33c354dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2350a33c354dSmrg fi 2351a33c354dSmrg done 2352a33c354dSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2353a33c354dSmrgBEGIN {RS = " "; FS = "/|\n";} { 2354a33c354dSmrg lt_foo = ""; 2355a33c354dSmrg lt_count = 0; 2356a33c354dSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2357a33c354dSmrg if ($lt_i != "" && $lt_i != ".") { 2358a33c354dSmrg if ($lt_i == "..") { 2359a33c354dSmrg lt_count++; 2360a33c354dSmrg } else { 2361a33c354dSmrg if (lt_count == 0) { 2362a33c354dSmrg lt_foo = "/" $lt_i lt_foo; 2363a33c354dSmrg } else { 2364a33c354dSmrg lt_count--; 2365a33c354dSmrg } 2366a33c354dSmrg } 2367a33c354dSmrg } 2368a33c354dSmrg } 2369a33c354dSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2370a33c354dSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2371a33c354dSmrg}'` 2372a33c354dSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2373a33c354dSmrg # for these hosts. 2374a33c354dSmrg case $host_os in 2375a33c354dSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2376a33c354dSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2377a33c354dSmrg esac 2378a33c354dSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2379a33c354dSmrgelse 2380a33c354dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2381a33c354dSmrgfi]) 2382a33c354dSmrglibrary_names_spec= 2383a33c354dSmrglibname_spec='lib$name' 2384a33c354dSmrgsoname_spec= 2385a33c354dSmrgshrext_cmds=.so 2386a33c354dSmrgpostinstall_cmds= 2387a33c354dSmrgpostuninstall_cmds= 2388a33c354dSmrgfinish_cmds= 2389a33c354dSmrgfinish_eval= 2390a33c354dSmrgshlibpath_var= 2391a33c354dSmrgshlibpath_overrides_runpath=unknown 2392a33c354dSmrgversion_type=none 2393a33c354dSmrgdynamic_linker="$host_os ld.so" 2394a33c354dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2395a33c354dSmrgneed_lib_prefix=unknown 2396a33c354dSmrghardcode_into_libs=no 2397a33c354dSmrg 2398a33c354dSmrg# when you set need_version to no, make sure it does not cause -set_version 2399a33c354dSmrg# flags to be left without arguments 2400a33c354dSmrgneed_version=unknown 2401a33c354dSmrg 2402a33c354dSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2403a33c354dSmrg[User-defined run-time library search path.]) 2404a33c354dSmrg 2405a33c354dSmrgcase $host_os in 2406a33c354dSmrgaix3*) 2407a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2408a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2409a33c354dSmrg shlibpath_var=LIBPATH 2410a33c354dSmrg 2411a33c354dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2412a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2413a33c354dSmrg ;; 2414a33c354dSmrg 2415a33c354dSmrgaix[[4-9]]*) 2416a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2417a33c354dSmrg need_lib_prefix=no 2418a33c354dSmrg need_version=no 2419a33c354dSmrg hardcode_into_libs=yes 2420a33c354dSmrg if test ia64 = "$host_cpu"; then 2421a33c354dSmrg # AIX 5 supports IA64 2422a33c354dSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2423a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2424a33c354dSmrg else 2425a33c354dSmrg # With GCC up to 2.95.x, collect2 would create an import file 2426a33c354dSmrg # for dependence libraries. The import file would start with 2427a33c354dSmrg # the line '#! .'. This would cause the generated library to 2428a33c354dSmrg # depend on '.', always an invalid library. This was fixed in 2429a33c354dSmrg # development snapshots of GCC prior to 3.0. 2430a33c354dSmrg case $host_os in 2431a33c354dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2432a33c354dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2433a33c354dSmrg echo ' yes ' 2434a33c354dSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2435a33c354dSmrg : 2436a33c354dSmrg else 2437a33c354dSmrg can_build_shared=no 2438a33c354dSmrg fi 2439a33c354dSmrg ;; 2440a33c354dSmrg esac 2441a33c354dSmrg # Using Import Files as archive members, it is possible to support 2442a33c354dSmrg # filename-based versioning of shared library archives on AIX. While 2443a33c354dSmrg # this would work for both with and without runtime linking, it will 2444a33c354dSmrg # prevent static linking of such archives. So we do filename-based 2445a33c354dSmrg # shared library versioning with .so extension only, which is used 2446a33c354dSmrg # when both runtime linking and shared linking is enabled. 2447a33c354dSmrg # Unfortunately, runtime linking may impact performance, so we do 2448a33c354dSmrg # not want this to be the default eventually. Also, we use the 2449a33c354dSmrg # versioned .so libs for executables only if there is the -brtl 2450a33c354dSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2451a33c354dSmrg # To allow for filename-based versioning support, we need to create 2452a33c354dSmrg # libNAME.so.V as an archive file, containing: 2453a33c354dSmrg # *) an Import File, referring to the versioned filename of the 2454a33c354dSmrg # archive as well as the shared archive member, telling the 2455a33c354dSmrg # bitwidth (32 or 64) of that shared object, and providing the 2456a33c354dSmrg # list of exported symbols of that shared object, eventually 2457a33c354dSmrg # decorated with the 'weak' keyword 2458a33c354dSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2459a33c354dSmrg # it being seen by the linker. 2460a33c354dSmrg # At run time we better use the real file rather than another symlink, 2461a33c354dSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2462a33c354dSmrg 2463a33c354dSmrg case $with_aix_soname,$aix_use_runtimelinking in 2464a33c354dSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2465a33c354dSmrg # soname into executable. Probably we can add versioning support to 2466a33c354dSmrg # collect2, so additional links can be useful in future. 2467a33c354dSmrg aix,yes) # traditional libtool 2468a33c354dSmrg dynamic_linker='AIX unversionable lib.so' 2469a33c354dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2470a33c354dSmrg # instead of lib<name>.a to let people know that these are not 2471a33c354dSmrg # typical AIX shared libraries. 2472a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2473a33c354dSmrg ;; 2474a33c354dSmrg aix,no) # traditional AIX only 2475a33c354dSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2476a33c354dSmrg # We preserve .a as extension for shared libraries through AIX4.2 2477a33c354dSmrg # and later when we are not doing run time linking. 2478a33c354dSmrg library_names_spec='$libname$release.a $libname.a' 2479a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2480a33c354dSmrg ;; 2481a33c354dSmrg svr4,*) # full svr4 only 2482a33c354dSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2483a33c354dSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484a33c354dSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2485a33c354dSmrg shlibpath_overrides_runpath=yes 2486a33c354dSmrg ;; 2487a33c354dSmrg *,yes) # both, prefer svr4 2488a33c354dSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2489a33c354dSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2490a33c354dSmrg # unpreferred sharedlib libNAME.a needs extra handling 2491a33c354dSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2492a33c354dSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2493a33c354dSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2494a33c354dSmrg shlibpath_overrides_runpath=yes 2495a33c354dSmrg ;; 2496a33c354dSmrg *,no) # both, prefer aix 2497a33c354dSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2498a33c354dSmrg library_names_spec='$libname$release.a $libname.a' 2499a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2500a33c354dSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2501a33c354dSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2502a33c354dSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2503a33c354dSmrg ;; 2504a33c354dSmrg esac 2505a33c354dSmrg shlibpath_var=LIBPATH 2506a33c354dSmrg fi 2507a33c354dSmrg ;; 2508a33c354dSmrg 2509a33c354dSmrgamigaos*) 2510a33c354dSmrg case $host_cpu in 2511a33c354dSmrg powerpc) 2512a33c354dSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2513a33c354dSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2514a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2515a33c354dSmrg ;; 2516a33c354dSmrg m68k) 2517a33c354dSmrg library_names_spec='$libname.ixlibrary $libname.a' 2518a33c354dSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2519a33c354dSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 2520a33c354dSmrg ;; 2521a33c354dSmrg esac 2522a33c354dSmrg ;; 2523a33c354dSmrg 2524a33c354dSmrgbeos*) 2525a33c354dSmrg library_names_spec='$libname$shared_ext' 2526a33c354dSmrg dynamic_linker="$host_os ld.so" 2527a33c354dSmrg shlibpath_var=LIBRARY_PATH 2528a33c354dSmrg ;; 2529a33c354dSmrg 2530a33c354dSmrgbsdi[[45]]*) 2531a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2532a33c354dSmrg need_version=no 2533a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2534a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2535a33c354dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2536a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2537a33c354dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2538a33c354dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2539a33c354dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2540a33c354dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2541a33c354dSmrg # libtool to hard-code these into programs 2542a33c354dSmrg ;; 2543a33c354dSmrg 2544a33c354dSmrgcygwin* | mingw* | pw32* | cegcc*) 2545a33c354dSmrg version_type=windows 2546a33c354dSmrg shrext_cmds=.dll 2547a33c354dSmrg need_version=no 2548a33c354dSmrg need_lib_prefix=no 2549a33c354dSmrg 2550a33c354dSmrg case $GCC,$cc_basename in 2551a33c354dSmrg yes,*) 2552a33c354dSmrg # gcc 2553a33c354dSmrg library_names_spec='$libname.dll.a' 2554a33c354dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2555a33c354dSmrg postinstall_cmds='base_file=`basename \$file`~ 2556a33c354dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2557a33c354dSmrg dldir=$destdir/`dirname \$dlpath`~ 2558a33c354dSmrg test -d \$dldir || mkdir -p \$dldir~ 2559a33c354dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2560a33c354dSmrg chmod a+x \$dldir/$dlname~ 2561a33c354dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2562a33c354dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2563a33c354dSmrg fi' 2564a33c354dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2565a33c354dSmrg dlpath=$dir/\$dldll~ 2566a33c354dSmrg $RM \$dlpath' 2567a33c354dSmrg shlibpath_overrides_runpath=yes 2568a33c354dSmrg 2569a33c354dSmrg case $host_os in 2570a33c354dSmrg cygwin*) 2571a33c354dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2572a33c354dSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573a33c354dSmrgm4_if([$1], [],[ 2574a33c354dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2575a33c354dSmrg ;; 2576a33c354dSmrg mingw* | cegcc*) 2577a33c354dSmrg # MinGW DLLs use traditional 'lib' prefix 2578a33c354dSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2579a33c354dSmrg ;; 2580a33c354dSmrg pw32*) 2581a33c354dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2582a33c354dSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2583a33c354dSmrg ;; 2584a33c354dSmrg esac 2585a33c354dSmrg dynamic_linker='Win32 ld.exe' 2586a33c354dSmrg ;; 2587a33c354dSmrg 2588a33c354dSmrg *,cl* | *,icl*) 2589a33c354dSmrg # Native MSVC or ICC 2590a33c354dSmrg libname_spec='$name' 2591a33c354dSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2592a33c354dSmrg library_names_spec='$libname.dll.lib' 2593a33c354dSmrg 2594a33c354dSmrg case $build_os in 2595a33c354dSmrg mingw*) 2596a33c354dSmrg sys_lib_search_path_spec= 2597a33c354dSmrg lt_save_ifs=$IFS 2598a33c354dSmrg IFS=';' 2599a33c354dSmrg for lt_path in $LIB 2600a33c354dSmrg do 2601a33c354dSmrg IFS=$lt_save_ifs 2602a33c354dSmrg # Let DOS variable expansion print the short 8.3 style file name. 2603a33c354dSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2604a33c354dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2605a33c354dSmrg done 2606a33c354dSmrg IFS=$lt_save_ifs 2607a33c354dSmrg # Convert to MSYS style. 2608a33c354dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2609a33c354dSmrg ;; 2610a33c354dSmrg cygwin*) 2611a33c354dSmrg # Convert to unix form, then to dos form, then back to unix form 2612a33c354dSmrg # but this time dos style (no spaces!) so that the unix form looks 2613a33c354dSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2614a33c354dSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2615a33c354dSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2616a33c354dSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2617a33c354dSmrg ;; 2618a33c354dSmrg *) 2619a33c354dSmrg sys_lib_search_path_spec=$LIB 2620a33c354dSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2621a33c354dSmrg # It is most probably a Windows format PATH. 2622a33c354dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2623a33c354dSmrg else 2624a33c354dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2625a33c354dSmrg fi 2626a33c354dSmrg # FIXME: find the short name or the path components, as spaces are 2627a33c354dSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2628a33c354dSmrg ;; 2629a33c354dSmrg esac 2630a33c354dSmrg 2631a33c354dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2632a33c354dSmrg postinstall_cmds='base_file=`basename \$file`~ 2633a33c354dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2634a33c354dSmrg dldir=$destdir/`dirname \$dlpath`~ 2635a33c354dSmrg test -d \$dldir || mkdir -p \$dldir~ 2636a33c354dSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2637a33c354dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2638a33c354dSmrg dlpath=$dir/\$dldll~ 2639a33c354dSmrg $RM \$dlpath' 2640a33c354dSmrg shlibpath_overrides_runpath=yes 2641a33c354dSmrg dynamic_linker='Win32 link.exe' 2642a33c354dSmrg ;; 2643a33c354dSmrg 2644a33c354dSmrg *) 2645a33c354dSmrg # Assume MSVC and ICC wrapper 2646a33c354dSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2647a33c354dSmrg dynamic_linker='Win32 ld.exe' 2648a33c354dSmrg ;; 2649a33c354dSmrg esac 2650a33c354dSmrg # FIXME: first we should search . and the directory the executable is in 2651a33c354dSmrg shlibpath_var=PATH 2652a33c354dSmrg ;; 2653a33c354dSmrg 2654a33c354dSmrgdarwin* | rhapsody*) 2655a33c354dSmrg dynamic_linker="$host_os dyld" 2656a33c354dSmrg version_type=darwin 2657a33c354dSmrg need_lib_prefix=no 2658a33c354dSmrg need_version=no 2659a33c354dSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2660a33c354dSmrg soname_spec='$libname$release$major$shared_ext' 2661a33c354dSmrg shlibpath_overrides_runpath=yes 2662a33c354dSmrg shlibpath_var=DYLD_LIBRARY_PATH 2663a33c354dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2664a33c354dSmrgm4_if([$1], [],[ 2665a33c354dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2666a33c354dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2667a33c354dSmrg ;; 2668a33c354dSmrg 2669a33c354dSmrgdgux*) 2670a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2671a33c354dSmrg need_lib_prefix=no 2672a33c354dSmrg need_version=no 2673a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2674a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2675a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2676a33c354dSmrg ;; 2677a33c354dSmrg 2678a33c354dSmrgfreebsd* | dragonfly* | midnightbsd*) 2679a33c354dSmrg # DragonFly does not have aout. When/if they implement a new 2680a33c354dSmrg # versioning mechanism, adjust this. 2681a33c354dSmrg if test -x /usr/bin/objformat; then 2682a33c354dSmrg objformat=`/usr/bin/objformat` 2683a33c354dSmrg else 2684a33c354dSmrg case $host_os in 2685a33c354dSmrg freebsd[[23]].*) objformat=aout ;; 2686a33c354dSmrg *) objformat=elf ;; 2687a33c354dSmrg esac 2688a33c354dSmrg fi 2689a33c354dSmrg version_type=freebsd-$objformat 2690a33c354dSmrg case $version_type in 2691a33c354dSmrg freebsd-elf*) 2692a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2693a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2694a33c354dSmrg need_version=no 2695a33c354dSmrg need_lib_prefix=no 2696a33c354dSmrg ;; 2697a33c354dSmrg freebsd-*) 2698a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2699a33c354dSmrg need_version=yes 2700a33c354dSmrg ;; 2701a33c354dSmrg esac 2702a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2703a33c354dSmrg case $host_os in 2704a33c354dSmrg freebsd2.*) 2705a33c354dSmrg shlibpath_overrides_runpath=yes 2706a33c354dSmrg ;; 2707a33c354dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2708a33c354dSmrg shlibpath_overrides_runpath=yes 2709a33c354dSmrg hardcode_into_libs=yes 2710a33c354dSmrg ;; 2711a33c354dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2712a33c354dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2713a33c354dSmrg shlibpath_overrides_runpath=no 2714a33c354dSmrg hardcode_into_libs=yes 2715a33c354dSmrg ;; 2716a33c354dSmrg *) # from 4.6 on, and DragonFly 2717a33c354dSmrg shlibpath_overrides_runpath=yes 2718a33c354dSmrg hardcode_into_libs=yes 2719a33c354dSmrg ;; 2720a33c354dSmrg esac 2721a33c354dSmrg ;; 2722a33c354dSmrg 2723a33c354dSmrghaiku*) 2724a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2725a33c354dSmrg need_lib_prefix=no 2726a33c354dSmrg need_version=no 2727a33c354dSmrg dynamic_linker="$host_os runtime_loader" 2728a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2729a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2730a33c354dSmrg shlibpath_var=LIBRARY_PATH 2731a33c354dSmrg shlibpath_overrides_runpath=no 2732a33c354dSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2733a33c354dSmrg hardcode_into_libs=yes 2734a33c354dSmrg ;; 2735a33c354dSmrg 2736a33c354dSmrghpux9* | hpux10* | hpux11*) 2737a33c354dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2738a33c354dSmrg # link against other versions. 2739a33c354dSmrg version_type=sunos 2740a33c354dSmrg need_lib_prefix=no 2741a33c354dSmrg need_version=no 2742a33c354dSmrg case $host_cpu in 2743a33c354dSmrg ia64*) 2744a33c354dSmrg shrext_cmds='.so' 2745a33c354dSmrg hardcode_into_libs=yes 2746a33c354dSmrg dynamic_linker="$host_os dld.so" 2747a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2748a33c354dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2749a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2750a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2751a33c354dSmrg if test 32 = "$HPUX_IA64_MODE"; then 2752a33c354dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2753a33c354dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2754a33c354dSmrg else 2755a33c354dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2756a33c354dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2757a33c354dSmrg fi 2758a33c354dSmrg ;; 2759a33c354dSmrg hppa*64*) 2760a33c354dSmrg shrext_cmds='.sl' 2761a33c354dSmrg hardcode_into_libs=yes 2762a33c354dSmrg dynamic_linker="$host_os dld.sl" 2763a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2764a33c354dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2765a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2766a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2767a33c354dSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2768a33c354dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2769a33c354dSmrg ;; 2770a33c354dSmrg *) 2771a33c354dSmrg shrext_cmds='.sl' 2772a33c354dSmrg dynamic_linker="$host_os dld.sl" 2773a33c354dSmrg shlibpath_var=SHLIB_PATH 2774a33c354dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2775a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2776a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2777a33c354dSmrg ;; 2778a33c354dSmrg esac 2779a33c354dSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2780a33c354dSmrg postinstall_cmds='chmod 555 $lib' 2781a33c354dSmrg # or fails outright, so override atomically: 2782a33c354dSmrg install_override_mode=555 2783a33c354dSmrg ;; 2784a33c354dSmrg 2785a33c354dSmrginterix[[3-9]]*) 2786a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2787a33c354dSmrg need_lib_prefix=no 2788a33c354dSmrg need_version=no 2789a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2790a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2791a33c354dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2792a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2793a33c354dSmrg shlibpath_overrides_runpath=no 2794a33c354dSmrg hardcode_into_libs=yes 2795a33c354dSmrg ;; 2796a33c354dSmrg 2797a33c354dSmrgirix5* | irix6* | nonstopux*) 2798a33c354dSmrg case $host_os in 2799a33c354dSmrg nonstopux*) version_type=nonstopux ;; 2800a33c354dSmrg *) 2801a33c354dSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2802a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2803a33c354dSmrg else 2804a33c354dSmrg version_type=irix 2805a33c354dSmrg fi ;; 2806a33c354dSmrg esac 2807a33c354dSmrg need_lib_prefix=no 2808a33c354dSmrg need_version=no 2809a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2810a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2811a33c354dSmrg case $host_os in 2812a33c354dSmrg irix5* | nonstopux*) 2813a33c354dSmrg libsuff= shlibsuff= 2814a33c354dSmrg ;; 2815a33c354dSmrg *) 2816a33c354dSmrg case $LD in # libtool.m4 will add one of these switches to LD 2817a33c354dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2818a33c354dSmrg libsuff= shlibsuff= libmagic=32-bit;; 2819a33c354dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2820a33c354dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2821a33c354dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2822a33c354dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2823a33c354dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2824a33c354dSmrg esac 2825a33c354dSmrg ;; 2826a33c354dSmrg esac 2827a33c354dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2828a33c354dSmrg shlibpath_overrides_runpath=no 2829a33c354dSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2830a33c354dSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2831a33c354dSmrg hardcode_into_libs=yes 2832a33c354dSmrg ;; 2833a33c354dSmrg 2834a33c354dSmrg# No shared lib support for Linux oldld, aout, or coff. 2835a33c354dSmrglinux*oldld* | linux*aout* | linux*coff*) 2836a33c354dSmrg dynamic_linker=no 2837a33c354dSmrg ;; 2838a33c354dSmrg 2839a33c354dSmrglinux*android*) 2840a33c354dSmrg version_type=none # Android doesn't support versioned libraries. 2841a33c354dSmrg need_lib_prefix=no 2842a33c354dSmrg need_version=no 2843a33c354dSmrg library_names_spec='$libname$release$shared_ext' 2844a33c354dSmrg soname_spec='$libname$release$shared_ext' 2845a33c354dSmrg finish_cmds= 2846a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2847a33c354dSmrg shlibpath_overrides_runpath=yes 2848a33c354dSmrg 2849a33c354dSmrg # This implies no fast_install, which is unacceptable. 2850a33c354dSmrg # Some rework will be needed to allow for fast_install 2851a33c354dSmrg # before this can be enabled. 2852a33c354dSmrg hardcode_into_libs=yes 2853a33c354dSmrg 2854a33c354dSmrg dynamic_linker='Android linker' 2855a33c354dSmrg # Don't embed -rpath directories since the linker doesn't support them. 2856a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2857a33c354dSmrg ;; 2858a33c354dSmrg 2859a33c354dSmrg# This must be glibc/ELF. 2860a33c354dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2861a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2862a33c354dSmrg need_lib_prefix=no 2863a33c354dSmrg need_version=no 2864a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2865a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2866a33c354dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2867a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2868a33c354dSmrg shlibpath_overrides_runpath=no 2869a33c354dSmrg 2870a33c354dSmrg # Some binutils ld are patched to set DT_RUNPATH 2871a33c354dSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2872a33c354dSmrg [lt_cv_shlibpath_overrides_runpath=no 2873a33c354dSmrg save_LDFLAGS=$LDFLAGS 2874a33c354dSmrg save_libdir=$libdir 2875a33c354dSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2876a33c354dSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2877a33c354dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2878a33c354dSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2879a33c354dSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2880a33c354dSmrg LDFLAGS=$save_LDFLAGS 2881a33c354dSmrg libdir=$save_libdir 2882a33c354dSmrg ]) 2883a33c354dSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2884a33c354dSmrg 2885a33c354dSmrg # This implies no fast_install, which is unacceptable. 2886a33c354dSmrg # Some rework will be needed to allow for fast_install 2887a33c354dSmrg # before this can be enabled. 2888a33c354dSmrg hardcode_into_libs=yes 2889a33c354dSmrg 2890a33c354dSmrg # Ideally, we could use ldconfig to report *all* directores which are 2891a33c354dSmrg # searched for libraries, however this is still not possible. Aside from not 2892a33c354dSmrg # being certain /sbin/ldconfig is available, command 2893a33c354dSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2894a33c354dSmrg # even though it is searched at run-time. Try to do the best guess by 2895a33c354dSmrg # appending ld.so.conf contents (and includes) to the search path. 2896a33c354dSmrg if test -f /etc/ld.so.conf; then 2897a33c354dSmrg 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' ' '` 2898a33c354dSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2899a33c354dSmrg fi 2900a33c354dSmrg 2901a33c354dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2902a33c354dSmrg # powerpc, because MkLinux only supported shared libraries with the 2903a33c354dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2904a33c354dSmrg # most powerpc-linux boxes support dynamic linking these days and 2905a33c354dSmrg # people can always --disable-shared, the test was removed, and we 2906a33c354dSmrg # assume the GNU/Linux dynamic linker is in use. 2907a33c354dSmrg dynamic_linker='GNU/Linux ld.so' 2908a33c354dSmrg ;; 2909a33c354dSmrg 2910a33c354dSmrgnetbsd*) 2911a33c354dSmrg version_type=sunos 2912a33c354dSmrg need_lib_prefix=no 2913a33c354dSmrg need_version=no 2914a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2915a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2916a33c354dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2917a33c354dSmrg dynamic_linker='NetBSD (a.out) ld.so' 2918a33c354dSmrg else 2919a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2921a33c354dSmrg dynamic_linker='NetBSD ld.elf_so' 2922a33c354dSmrg fi 2923a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2924a33c354dSmrg shlibpath_overrides_runpath=yes 2925a33c354dSmrg hardcode_into_libs=yes 2926a33c354dSmrg ;; 2927a33c354dSmrg 2928a33c354dSmrgnewsos6) 2929a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2930a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2931a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2932a33c354dSmrg shlibpath_overrides_runpath=yes 2933a33c354dSmrg ;; 2934a33c354dSmrg 2935a33c354dSmrg*nto* | *qnx*) 2936a33c354dSmrg version_type=qnx 2937a33c354dSmrg need_lib_prefix=no 2938a33c354dSmrg need_version=no 2939a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2940a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2941a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2942a33c354dSmrg shlibpath_overrides_runpath=no 2943a33c354dSmrg hardcode_into_libs=yes 2944a33c354dSmrg dynamic_linker='ldqnx.so' 2945a33c354dSmrg ;; 2946a33c354dSmrg 2947a33c354dSmrgopenbsd* | bitrig*) 2948a33c354dSmrg version_type=sunos 2949a33c354dSmrg sys_lib_dlsearch_path_spec=/usr/lib 2950a33c354dSmrg need_lib_prefix=no 2951a33c354dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2952a33c354dSmrg need_version=no 2953a33c354dSmrg else 2954a33c354dSmrg need_version=yes 2955a33c354dSmrg fi 2956a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2957a33c354dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2958a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2959a33c354dSmrg shlibpath_overrides_runpath=yes 2960a33c354dSmrg ;; 2961a33c354dSmrg 2962a33c354dSmrgos2*) 2963a33c354dSmrg libname_spec='$name' 2964a33c354dSmrg version_type=windows 2965a33c354dSmrg shrext_cmds=.dll 2966a33c354dSmrg need_version=no 2967a33c354dSmrg need_lib_prefix=no 2968a33c354dSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2969a33c354dSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2970a33c354dSmrg v=$($ECHO $release$versuffix | tr -d .-); 2971a33c354dSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2972a33c354dSmrg $ECHO $n$v`$shared_ext' 2973a33c354dSmrg library_names_spec='${libname}_dll.$libext' 2974a33c354dSmrg dynamic_linker='OS/2 ld.exe' 2975a33c354dSmrg shlibpath_var=BEGINLIBPATH 2976a33c354dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2977a33c354dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2978a33c354dSmrg postinstall_cmds='base_file=`basename \$file`~ 2979a33c354dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2980a33c354dSmrg dldir=$destdir/`dirname \$dlpath`~ 2981a33c354dSmrg test -d \$dldir || mkdir -p \$dldir~ 2982a33c354dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2983a33c354dSmrg chmod a+x \$dldir/$dlname~ 2984a33c354dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2985a33c354dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2986a33c354dSmrg fi' 2987a33c354dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2988a33c354dSmrg dlpath=$dir/\$dldll~ 2989a33c354dSmrg $RM \$dlpath' 2990a33c354dSmrg ;; 2991a33c354dSmrg 2992a33c354dSmrgosf3* | osf4* | osf5*) 2993a33c354dSmrg version_type=osf 2994a33c354dSmrg need_lib_prefix=no 2995a33c354dSmrg need_version=no 2996a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 2997a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2998a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 2999a33c354dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3000a33c354dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3001a33c354dSmrg ;; 3002a33c354dSmrg 3003a33c354dSmrgrdos*) 3004a33c354dSmrg dynamic_linker=no 3005a33c354dSmrg ;; 3006a33c354dSmrg 3007a33c354dSmrgsolaris*) 3008a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 3009a33c354dSmrg need_lib_prefix=no 3010a33c354dSmrg need_version=no 3011a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3012a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 3013a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3014a33c354dSmrg shlibpath_overrides_runpath=yes 3015a33c354dSmrg hardcode_into_libs=yes 3016a33c354dSmrg # ldd complains unless libraries are executable 3017a33c354dSmrg postinstall_cmds='chmod +x $lib' 3018a33c354dSmrg ;; 3019a33c354dSmrg 3020a33c354dSmrgsunos4*) 3021a33c354dSmrg version_type=sunos 3022a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3023a33c354dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3024a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3025a33c354dSmrg shlibpath_overrides_runpath=yes 3026a33c354dSmrg if test yes = "$with_gnu_ld"; then 3027a33c354dSmrg need_lib_prefix=no 3028a33c354dSmrg fi 3029a33c354dSmrg need_version=yes 3030a33c354dSmrg ;; 3031a33c354dSmrg 3032a33c354dSmrgsysv4 | sysv4.3*) 3033a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 3034a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3035a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 3036a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3037a33c354dSmrg case $host_vendor in 3038a33c354dSmrg sni) 3039a33c354dSmrg shlibpath_overrides_runpath=no 3040a33c354dSmrg need_lib_prefix=no 3041a33c354dSmrg runpath_var=LD_RUN_PATH 3042a33c354dSmrg ;; 3043a33c354dSmrg siemens) 3044a33c354dSmrg need_lib_prefix=no 3045a33c354dSmrg ;; 3046a33c354dSmrg motorola) 3047a33c354dSmrg need_lib_prefix=no 3048a33c354dSmrg need_version=no 3049a33c354dSmrg shlibpath_overrides_runpath=no 3050a33c354dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3051a33c354dSmrg ;; 3052a33c354dSmrg esac 3053a33c354dSmrg ;; 3054a33c354dSmrg 3055a33c354dSmrgsysv4*MP*) 3056a33c354dSmrg if test -d /usr/nec; then 3057a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 3058a33c354dSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3059a33c354dSmrg soname_spec='$libname$shared_ext.$major' 3060a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3061a33c354dSmrg fi 3062a33c354dSmrg ;; 3063a33c354dSmrg 3064a33c354dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3065a33c354dSmrg version_type=sco 3066a33c354dSmrg need_lib_prefix=no 3067a33c354dSmrg need_version=no 3068a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3069a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 3070a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3071a33c354dSmrg shlibpath_overrides_runpath=yes 3072a33c354dSmrg hardcode_into_libs=yes 3073a33c354dSmrg if test yes = "$with_gnu_ld"; then 3074a33c354dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3075a33c354dSmrg else 3076a33c354dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3077a33c354dSmrg case $host_os in 3078a33c354dSmrg sco3.2v5*) 3079a33c354dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3080a33c354dSmrg ;; 3081a33c354dSmrg esac 3082a33c354dSmrg fi 3083a33c354dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3084a33c354dSmrg ;; 3085a33c354dSmrg 3086a33c354dSmrgtpf*) 3087a33c354dSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3088a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 3089a33c354dSmrg need_lib_prefix=no 3090a33c354dSmrg need_version=no 3091a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3092a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3093a33c354dSmrg shlibpath_overrides_runpath=no 3094a33c354dSmrg hardcode_into_libs=yes 3095a33c354dSmrg ;; 3096a33c354dSmrg 3097a33c354dSmrguts4*) 3098a33c354dSmrg version_type=linux # correct to gnu/linux during the next big refactor 3099a33c354dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3100a33c354dSmrg soname_spec='$libname$release$shared_ext$major' 3101a33c354dSmrg shlibpath_var=LD_LIBRARY_PATH 3102a33c354dSmrg ;; 3103a33c354dSmrg 3104a33c354dSmrg*) 3105a33c354dSmrg dynamic_linker=no 3106a33c354dSmrg ;; 3107a33c354dSmrgesac 3108a33c354dSmrgAC_MSG_RESULT([$dynamic_linker]) 3109a33c354dSmrgtest no = "$dynamic_linker" && can_build_shared=no 3110a33c354dSmrg 3111a33c354dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3112a33c354dSmrgif test yes = "$GCC"; then 3113a33c354dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3114a33c354dSmrgfi 3115a33c354dSmrg 3116a33c354dSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3117a33c354dSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3118a33c354dSmrgfi 3119a33c354dSmrg 3120a33c354dSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3121a33c354dSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3122a33c354dSmrgfi 3123a33c354dSmrg 3124a33c354dSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3125a33c354dSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3126a33c354dSmrg 3127a33c354dSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3128a33c354dSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3129a33c354dSmrg 3130a33c354dSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3131a33c354dSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3132a33c354dSmrg 3133a33c354dSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3134a33c354dSmrg [Variables whose values should be saved in libtool wrapper scripts and 3135a33c354dSmrg restored at link time]) 3136a33c354dSmrg_LT_DECL([], [need_lib_prefix], [0], 3137a33c354dSmrg [Do we need the "lib" prefix for modules?]) 3138a33c354dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3139a33c354dSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3140a33c354dSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3141a33c354dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3142a33c354dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3143a33c354dSmrg [Is shlibpath searched before the hard-coded library search path?]) 3144a33c354dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3145a33c354dSmrg_LT_DECL([], [library_names_spec], [1], 3146a33c354dSmrg [[List of archive names. First name is the real one, the rest are links. 3147a33c354dSmrg The last name is the one that the linker finds with -lNAME]]) 3148a33c354dSmrg_LT_DECL([], [soname_spec], [1], 3149a33c354dSmrg [[The coded name of the library, if different from the real name]]) 3150a33c354dSmrg_LT_DECL([], [install_override_mode], [1], 3151a33c354dSmrg [Permission mode override for installation of shared libraries]) 3152a33c354dSmrg_LT_DECL([], [postinstall_cmds], [2], 3153a33c354dSmrg [Command to use after installation of a shared archive]) 3154a33c354dSmrg_LT_DECL([], [postuninstall_cmds], [2], 3155a33c354dSmrg [Command to use after uninstallation of a shared archive]) 3156a33c354dSmrg_LT_DECL([], [finish_cmds], [2], 3157a33c354dSmrg [Commands used to finish a libtool library installation in a directory]) 3158a33c354dSmrg_LT_DECL([], [finish_eval], [1], 3159a33c354dSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3160a33c354dSmrg not shown]]) 3161a33c354dSmrg_LT_DECL([], [hardcode_into_libs], [0], 3162a33c354dSmrg [Whether we should hardcode library paths into libraries]) 3163a33c354dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3164a33c354dSmrg [Compile-time system search path for libraries]) 3165a33c354dSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3166a33c354dSmrg [Detected run-time system search path for libraries]) 3167a33c354dSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3168a33c354dSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3169a33c354dSmrg])# _LT_SYS_DYNAMIC_LINKER 3170a33c354dSmrg 3171a33c354dSmrg 3172a33c354dSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3173a33c354dSmrg# -------------------------- 3174a33c354dSmrg# find a file program that can recognize shared library 3175a33c354dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3176a33c354dSmrg[m4_require([_LT_DECL_EGREP])dnl 3177a33c354dSmrgAC_MSG_CHECKING([for $1]) 3178a33c354dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3179a33c354dSmrg[case $MAGIC_CMD in 3180a33c354dSmrg[[\\/*] | ?:[\\/]*]) 3181a33c354dSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3182a33c354dSmrg ;; 3183a33c354dSmrg*) 3184a33c354dSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3185a33c354dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3186a33c354dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3187a33c354dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3188a33c354dSmrgdnl not every word. This closes a longstanding sh security hole. 3189a33c354dSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3190a33c354dSmrg for ac_dir in $ac_dummy; do 3191a33c354dSmrg IFS=$lt_save_ifs 3192a33c354dSmrg test -z "$ac_dir" && ac_dir=. 3193a33c354dSmrg if test -f "$ac_dir/$1"; then 3194a33c354dSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3195a33c354dSmrg if test -n "$file_magic_test_file"; then 3196a33c354dSmrg case $deplibs_check_method in 3197a33c354dSmrg "file_magic "*) 3198a33c354dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3199a33c354dSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3200a33c354dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3201a33c354dSmrg $EGREP "$file_magic_regex" > /dev/null; then 3202a33c354dSmrg : 3203a33c354dSmrg else 3204a33c354dSmrg cat <<_LT_EOF 1>&2 3205a33c354dSmrg 3206a33c354dSmrg*** Warning: the command libtool uses to detect shared libraries, 3207a33c354dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3208a33c354dSmrg*** The result is that libtool may fail to recognize shared libraries 3209a33c354dSmrg*** as such. This will affect the creation of libtool libraries that 3210a33c354dSmrg*** depend on shared libraries, but programs linked with such libtool 3211a33c354dSmrg*** libraries will work regardless of this problem. Nevertheless, you 3212a33c354dSmrg*** may want to report the problem to your system manager and/or to 3213a33c354dSmrg*** bug-libtool@gnu.org 3214a33c354dSmrg 3215a33c354dSmrg_LT_EOF 3216a33c354dSmrg fi ;; 3217a33c354dSmrg esac 3218a33c354dSmrg fi 3219a33c354dSmrg break 3220a33c354dSmrg fi 3221a33c354dSmrg done 3222a33c354dSmrg IFS=$lt_save_ifs 3223a33c354dSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 3224a33c354dSmrg ;; 3225a33c354dSmrgesac]) 3226a33c354dSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3227a33c354dSmrgif test -n "$MAGIC_CMD"; then 3228a33c354dSmrg AC_MSG_RESULT($MAGIC_CMD) 3229a33c354dSmrgelse 3230a33c354dSmrg AC_MSG_RESULT(no) 3231a33c354dSmrgfi 3232a33c354dSmrg_LT_DECL([], [MAGIC_CMD], [0], 3233a33c354dSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3234a33c354dSmrg])# _LT_PATH_TOOL_PREFIX 3235a33c354dSmrg 3236a33c354dSmrg# Old name: 3237a33c354dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3238a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 3239a33c354dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3240a33c354dSmrg 3241a33c354dSmrg 3242a33c354dSmrg# _LT_PATH_MAGIC 3243a33c354dSmrg# -------------- 3244a33c354dSmrg# find a file program that can recognize a shared library 3245a33c354dSmrgm4_defun([_LT_PATH_MAGIC], 3246a33c354dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3247a33c354dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3248a33c354dSmrg if test -n "$ac_tool_prefix"; then 3249a33c354dSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3250a33c354dSmrg else 3251a33c354dSmrg MAGIC_CMD=: 3252a33c354dSmrg fi 3253a33c354dSmrgfi 3254a33c354dSmrg])# _LT_PATH_MAGIC 3255a33c354dSmrg 3256a33c354dSmrg 3257a33c354dSmrg# LT_PATH_LD 3258a33c354dSmrg# ---------- 3259a33c354dSmrg# find the pathname to the GNU or non-GNU linker 3260a33c354dSmrgAC_DEFUN([LT_PATH_LD], 3261a33c354dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3262a33c354dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3263a33c354dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3264a33c354dSmrgm4_require([_LT_DECL_SED])dnl 3265a33c354dSmrgm4_require([_LT_DECL_EGREP])dnl 3266a33c354dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3267a33c354dSmrg 3268a33c354dSmrgAC_ARG_WITH([gnu-ld], 3269a33c354dSmrg [AS_HELP_STRING([--with-gnu-ld], 3270a33c354dSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3271a33c354dSmrg [test no = "$withval" || with_gnu_ld=yes], 3272a33c354dSmrg [with_gnu_ld=no])dnl 3273a33c354dSmrg 3274a33c354dSmrgac_prog=ld 3275a33c354dSmrgif test yes = "$GCC"; then 3276a33c354dSmrg # Check if gcc -print-prog-name=ld gives a path. 3277a33c354dSmrg AC_MSG_CHECKING([for ld used by $CC]) 3278a33c354dSmrg case $host in 3279a33c354dSmrg *-*-mingw*) 3280a33c354dSmrg # gcc leaves a trailing carriage return, which upsets mingw 3281a33c354dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3282a33c354dSmrg *) 3283a33c354dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3284a33c354dSmrg esac 3285a33c354dSmrg case $ac_prog in 3286a33c354dSmrg # Accept absolute paths. 3287a33c354dSmrg [[\\/]]* | ?:[[\\/]]*) 3288a33c354dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3289a33c354dSmrg # Canonicalize the pathname of ld 3290a33c354dSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3291a33c354dSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3292a33c354dSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3293a33c354dSmrg done 3294a33c354dSmrg test -z "$LD" && LD=$ac_prog 3295a33c354dSmrg ;; 3296a33c354dSmrg "") 3297a33c354dSmrg # If it fails, then pretend we aren't using GCC. 3298a33c354dSmrg ac_prog=ld 3299a33c354dSmrg ;; 3300a33c354dSmrg *) 3301a33c354dSmrg # If it is relative, then search for the first ld in PATH. 3302a33c354dSmrg with_gnu_ld=unknown 3303a33c354dSmrg ;; 3304a33c354dSmrg esac 3305a33c354dSmrgelif test yes = "$with_gnu_ld"; then 3306a33c354dSmrg AC_MSG_CHECKING([for GNU ld]) 3307a33c354dSmrgelse 3308a33c354dSmrg AC_MSG_CHECKING([for non-GNU ld]) 3309a33c354dSmrgfi 3310a33c354dSmrgAC_CACHE_VAL(lt_cv_path_LD, 3311a33c354dSmrg[if test -z "$LD"; then 3312a33c354dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3313a33c354dSmrg for ac_dir in $PATH; do 3314a33c354dSmrg IFS=$lt_save_ifs 3315a33c354dSmrg test -z "$ac_dir" && ac_dir=. 3316a33c354dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3317a33c354dSmrg lt_cv_path_LD=$ac_dir/$ac_prog 3318a33c354dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3319a33c354dSmrg # but apparently some variants of GNU ld only accept -v. 3320a33c354dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3321a33c354dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3322a33c354dSmrg *GNU* | *'with BFD'*) 3323a33c354dSmrg test no != "$with_gnu_ld" && break 3324a33c354dSmrg ;; 3325a33c354dSmrg *) 3326a33c354dSmrg test yes != "$with_gnu_ld" && break 3327a33c354dSmrg ;; 3328a33c354dSmrg esac 3329a33c354dSmrg fi 3330a33c354dSmrg done 3331a33c354dSmrg IFS=$lt_save_ifs 3332a33c354dSmrgelse 3333a33c354dSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3334a33c354dSmrgfi]) 3335a33c354dSmrgLD=$lt_cv_path_LD 3336a33c354dSmrgif test -n "$LD"; then 3337a33c354dSmrg AC_MSG_RESULT($LD) 3338a33c354dSmrgelse 3339a33c354dSmrg AC_MSG_RESULT(no) 3340a33c354dSmrgfi 3341a33c354dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3342a33c354dSmrg_LT_PATH_LD_GNU 3343a33c354dSmrgAC_SUBST([LD]) 3344a33c354dSmrg 3345a33c354dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3346a33c354dSmrg])# LT_PATH_LD 3347a33c354dSmrg 3348a33c354dSmrg# Old names: 3349a33c354dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3350a33c354dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3351a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 3352a33c354dSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3353a33c354dSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3354a33c354dSmrg 3355a33c354dSmrg 3356a33c354dSmrg# _LT_PATH_LD_GNU 3357a33c354dSmrg#- -------------- 3358a33c354dSmrgm4_defun([_LT_PATH_LD_GNU], 3359a33c354dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3360a33c354dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3361a33c354dSmrgcase `$LD -v 2>&1 </dev/null` in 3362a33c354dSmrg*GNU* | *'with BFD'*) 3363a33c354dSmrg lt_cv_prog_gnu_ld=yes 3364a33c354dSmrg ;; 3365a33c354dSmrg*) 3366a33c354dSmrg lt_cv_prog_gnu_ld=no 3367a33c354dSmrg ;; 3368a33c354dSmrgesac]) 3369a33c354dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3370a33c354dSmrg])# _LT_PATH_LD_GNU 3371a33c354dSmrg 3372a33c354dSmrg 3373a33c354dSmrg# _LT_CMD_RELOAD 3374a33c354dSmrg# -------------- 3375a33c354dSmrg# find reload flag for linker 3376a33c354dSmrg# -- PORTME Some linkers may need a different reload flag. 3377a33c354dSmrgm4_defun([_LT_CMD_RELOAD], 3378a33c354dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3379a33c354dSmrg lt_cv_ld_reload_flag, 3380a33c354dSmrg [lt_cv_ld_reload_flag='-r']) 3381a33c354dSmrgreload_flag=$lt_cv_ld_reload_flag 3382a33c354dSmrgcase $reload_flag in 3383a33c354dSmrg"" | " "*) ;; 3384a33c354dSmrg*) reload_flag=" $reload_flag" ;; 3385a33c354dSmrgesac 3386a33c354dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3387a33c354dSmrgcase $host_os in 3388a33c354dSmrg cygwin* | mingw* | pw32* | cegcc*) 3389a33c354dSmrg if test yes != "$GCC"; then 3390a33c354dSmrg reload_cmds=false 3391a33c354dSmrg fi 3392a33c354dSmrg ;; 3393a33c354dSmrg darwin*) 3394a33c354dSmrg if test yes = "$GCC"; then 3395a33c354dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3396a33c354dSmrg else 3397a33c354dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3398a33c354dSmrg fi 3399a33c354dSmrg ;; 3400a33c354dSmrgesac 3401a33c354dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3402a33c354dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3403a33c354dSmrg])# _LT_CMD_RELOAD 3404a33c354dSmrg 3405a33c354dSmrg 3406a33c354dSmrg# _LT_PATH_DD 3407a33c354dSmrg# ----------- 3408a33c354dSmrg# find a working dd 3409a33c354dSmrgm4_defun([_LT_PATH_DD], 3410a33c354dSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3411a33c354dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3412a33c354dSmrgcat conftest.i conftest.i >conftest2.i 3413a33c354dSmrg: ${lt_DD:=$DD} 3414a33c354dSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3415a33c354dSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3416a33c354dSmrg cmp -s conftest.i conftest.out \ 3417a33c354dSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3418a33c354dSmrgfi]) 3419a33c354dSmrgrm -f conftest.i conftest2.i conftest.out]) 3420a33c354dSmrg])# _LT_PATH_DD 3421a33c354dSmrg 3422a33c354dSmrg 3423a33c354dSmrg# _LT_CMD_TRUNCATE 3424a33c354dSmrg# ---------------- 3425a33c354dSmrg# find command to truncate a binary pipe 3426a33c354dSmrgm4_defun([_LT_CMD_TRUNCATE], 3427a33c354dSmrg[m4_require([_LT_PATH_DD]) 3428a33c354dSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3429a33c354dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3430a33c354dSmrgcat conftest.i conftest.i >conftest2.i 3431a33c354dSmrglt_cv_truncate_bin= 3432a33c354dSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3433a33c354dSmrg cmp -s conftest.i conftest.out \ 3434a33c354dSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3435a33c354dSmrgfi 3436a33c354dSmrgrm -f conftest.i conftest2.i conftest.out 3437a33c354dSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3438a33c354dSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3439a33c354dSmrg [Command to truncate a binary pipe]) 3440a33c354dSmrg])# _LT_CMD_TRUNCATE 3441a33c354dSmrg 3442a33c354dSmrg 3443a33c354dSmrg# _LT_CHECK_MAGIC_METHOD 3444a33c354dSmrg# ---------------------- 3445a33c354dSmrg# how to check for library dependencies 3446a33c354dSmrg# -- PORTME fill in with the dynamic library characteristics 3447a33c354dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3448a33c354dSmrg[m4_require([_LT_DECL_EGREP]) 3449a33c354dSmrgm4_require([_LT_DECL_OBJDUMP]) 3450a33c354dSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3451a33c354dSmrglt_cv_deplibs_check_method, 3452a33c354dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3453a33c354dSmrglt_cv_file_magic_test_file= 3454a33c354dSmrglt_cv_deplibs_check_method='unknown' 3455a33c354dSmrg# Need to set the preceding variable on all platforms that support 3456a33c354dSmrg# interlibrary dependencies. 3457a33c354dSmrg# 'none' -- dependencies not supported. 3458a33c354dSmrg# 'unknown' -- same as none, but documents that we really don't know. 3459a33c354dSmrg# 'pass_all' -- all dependencies passed with no checks. 3460a33c354dSmrg# 'test_compile' -- check by making test program. 3461a33c354dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3462a33c354dSmrg# that responds to the $file_magic_cmd with a given extended regex. 3463a33c354dSmrg# If you have 'file' or equivalent on your system and you're not sure 3464a33c354dSmrg# whether 'pass_all' will *always* work, you probably want this one. 3465a33c354dSmrg 3466a33c354dSmrgcase $host_os in 3467a33c354dSmrgaix[[4-9]]*) 3468a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3469a33c354dSmrg ;; 3470a33c354dSmrg 3471a33c354dSmrgbeos*) 3472a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3473a33c354dSmrg ;; 3474a33c354dSmrg 3475a33c354dSmrgbsdi[[45]]*) 3476a33c354dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3477a33c354dSmrg lt_cv_file_magic_cmd='$FILECMD -L' 3478a33c354dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3479a33c354dSmrg ;; 3480a33c354dSmrg 3481a33c354dSmrgcygwin*) 3482a33c354dSmrg # func_win32_libid is a shell function defined in ltmain.sh 3483a33c354dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3484a33c354dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3485a33c354dSmrg ;; 3486a33c354dSmrg 3487a33c354dSmrgmingw* | pw32*) 3488a33c354dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3489a33c354dSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3490a33c354dSmrg # unless we find 'file', for example because we are cross-compiling. 3491a33c354dSmrg if ( file / ) >/dev/null 2>&1; then 3492a33c354dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3493a33c354dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3494a33c354dSmrg else 3495a33c354dSmrg # Keep this pattern in sync with the one in func_win32_libid. 3496a33c354dSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3497a33c354dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3498a33c354dSmrg fi 3499a33c354dSmrg ;; 3500a33c354dSmrg 3501a33c354dSmrgcegcc*) 3502a33c354dSmrg # use the weaker test based on 'objdump'. See mingw*. 3503a33c354dSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3504a33c354dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3505a33c354dSmrg ;; 3506a33c354dSmrg 3507a33c354dSmrgdarwin* | rhapsody*) 3508a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3509a33c354dSmrg ;; 3510a33c354dSmrg 3511a33c354dSmrgfreebsd* | dragonfly* | midnightbsd*) 3512a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3513a33c354dSmrg case $host_cpu in 3514a33c354dSmrg i*86 ) 3515a33c354dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3516a33c354dSmrg # Let's accept both of them until this is cleared up. 3517a33c354dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3518a33c354dSmrg lt_cv_file_magic_cmd=$FILECMD 3519a33c354dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3520a33c354dSmrg ;; 3521a33c354dSmrg esac 3522a33c354dSmrg else 3523a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3524a33c354dSmrg fi 3525a33c354dSmrg ;; 3526a33c354dSmrg 3527a33c354dSmrghaiku*) 3528a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3529a33c354dSmrg ;; 3530a33c354dSmrg 3531a33c354dSmrghpux10.20* | hpux11*) 3532a33c354dSmrg lt_cv_file_magic_cmd=$FILECMD 3533a33c354dSmrg case $host_cpu in 3534a33c354dSmrg ia64*) 3535a33c354dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3536a33c354dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3537a33c354dSmrg ;; 3538a33c354dSmrg hppa*64*) 3539a33c354dSmrg [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]'] 3540a33c354dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3541a33c354dSmrg ;; 3542a33c354dSmrg *) 3543a33c354dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3544a33c354dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3545a33c354dSmrg ;; 3546a33c354dSmrg esac 3547a33c354dSmrg ;; 3548a33c354dSmrg 3549a33c354dSmrginterix[[3-9]]*) 3550a33c354dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3551a33c354dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3552a33c354dSmrg ;; 3553a33c354dSmrg 3554a33c354dSmrgirix5* | irix6* | nonstopux*) 3555a33c354dSmrg case $LD in 3556a33c354dSmrg *-32|*"-32 ") libmagic=32-bit;; 3557a33c354dSmrg *-n32|*"-n32 ") libmagic=N32;; 3558a33c354dSmrg *-64|*"-64 ") libmagic=64-bit;; 3559a33c354dSmrg *) libmagic=never-match;; 3560a33c354dSmrg esac 3561a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3562a33c354dSmrg ;; 3563a33c354dSmrg 3564a33c354dSmrg# This must be glibc/ELF. 3565a33c354dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3566a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3567a33c354dSmrg ;; 3568a33c354dSmrg 3569a33c354dSmrgnetbsd*) 3570a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3571a33c354dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3572a33c354dSmrg else 3573a33c354dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3574a33c354dSmrg fi 3575a33c354dSmrg ;; 3576a33c354dSmrg 3577a33c354dSmrgnewos6*) 3578a33c354dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3579a33c354dSmrg lt_cv_file_magic_cmd=$FILECMD 3580a33c354dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3581a33c354dSmrg ;; 3582a33c354dSmrg 3583a33c354dSmrg*nto* | *qnx*) 3584a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3585a33c354dSmrg ;; 3586a33c354dSmrg 3587a33c354dSmrgopenbsd* | bitrig*) 3588a33c354dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3589a33c354dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3590a33c354dSmrg else 3591a33c354dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3592a33c354dSmrg fi 3593a33c354dSmrg ;; 3594a33c354dSmrg 3595a33c354dSmrgosf3* | osf4* | osf5*) 3596a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3597a33c354dSmrg ;; 3598a33c354dSmrg 3599a33c354dSmrgrdos*) 3600a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3601a33c354dSmrg ;; 3602a33c354dSmrg 3603a33c354dSmrgsolaris*) 3604a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3605a33c354dSmrg ;; 3606a33c354dSmrg 3607a33c354dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3608a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3609a33c354dSmrg ;; 3610a33c354dSmrg 3611a33c354dSmrgsysv4 | sysv4.3*) 3612a33c354dSmrg case $host_vendor in 3613a33c354dSmrg motorola) 3614a33c354dSmrg 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]]' 3615a33c354dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3616a33c354dSmrg ;; 3617a33c354dSmrg ncr) 3618a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3619a33c354dSmrg ;; 3620a33c354dSmrg sequent) 3621a33c354dSmrg lt_cv_file_magic_cmd='/bin/file' 3622a33c354dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3623a33c354dSmrg ;; 3624a33c354dSmrg sni) 3625a33c354dSmrg lt_cv_file_magic_cmd='/bin/file' 3626a33c354dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3627a33c354dSmrg lt_cv_file_magic_test_file=/lib/libc.so 3628a33c354dSmrg ;; 3629a33c354dSmrg siemens) 3630a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3631a33c354dSmrg ;; 3632a33c354dSmrg pc) 3633a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3634a33c354dSmrg ;; 3635a33c354dSmrg esac 3636a33c354dSmrg ;; 3637a33c354dSmrg 3638a33c354dSmrgtpf*) 3639a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3640a33c354dSmrg ;; 3641a33c354dSmrgos2*) 3642a33c354dSmrg lt_cv_deplibs_check_method=pass_all 3643a33c354dSmrg ;; 3644a33c354dSmrgesac 3645a33c354dSmrg]) 3646a33c354dSmrg 3647a33c354dSmrgfile_magic_glob= 3648a33c354dSmrgwant_nocaseglob=no 3649a33c354dSmrgif test "$build" = "$host"; then 3650a33c354dSmrg case $host_os in 3651a33c354dSmrg mingw* | pw32*) 3652a33c354dSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3653a33c354dSmrg want_nocaseglob=yes 3654a33c354dSmrg else 3655a33c354dSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3656a33c354dSmrg fi 3657a33c354dSmrg ;; 3658a33c354dSmrg esac 3659a33c354dSmrgfi 3660a33c354dSmrg 3661a33c354dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3662a33c354dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3663a33c354dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3664a33c354dSmrg 3665a33c354dSmrg_LT_DECL([], [deplibs_check_method], [1], 3666a33c354dSmrg [Method to check whether dependent libraries are shared objects]) 3667a33c354dSmrg_LT_DECL([], [file_magic_cmd], [1], 3668a33c354dSmrg [Command to use when deplibs_check_method = "file_magic"]) 3669a33c354dSmrg_LT_DECL([], [file_magic_glob], [1], 3670a33c354dSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3671a33c354dSmrg_LT_DECL([], [want_nocaseglob], [1], 3672a33c354dSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3673a33c354dSmrg])# _LT_CHECK_MAGIC_METHOD 3674a33c354dSmrg 3675a33c354dSmrg 3676a33c354dSmrg# LT_PATH_NM 3677a33c354dSmrg# ---------- 3678a33c354dSmrg# find the pathname to a BSD- or MS-compatible name lister 3679a33c354dSmrgAC_DEFUN([LT_PATH_NM], 3680a33c354dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3681a33c354dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3682a33c354dSmrg[if test -n "$NM"; then 3683a33c354dSmrg # Let the user override the test. 3684a33c354dSmrg lt_cv_path_NM=$NM 3685a33c354dSmrgelse 3686a33c354dSmrg lt_nm_to_check=${ac_tool_prefix}nm 3687a33c354dSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3688a33c354dSmrg lt_nm_to_check="$lt_nm_to_check nm" 3689a33c354dSmrg fi 3690a33c354dSmrg for lt_tmp_nm in $lt_nm_to_check; do 3691a33c354dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3692a33c354dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3693a33c354dSmrg IFS=$lt_save_ifs 3694a33c354dSmrg test -z "$ac_dir" && ac_dir=. 3695a33c354dSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3696a33c354dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3697a33c354dSmrg # Check to see if the nm accepts a BSD-compat flag. 3698a33c354dSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3699a33c354dSmrg # nm: unknown option "B" ignored 3700a33c354dSmrg # Tru64's nm complains that /dev/null is an invalid object file 3701a33c354dSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3702a33c354dSmrg case $build_os in 3703a33c354dSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3704a33c354dSmrg *) lt_bad_file=/dev/null ;; 3705a33c354dSmrg esac 3706a33c354dSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3707a33c354dSmrg *$lt_bad_file* | *'Invalid file or object type'*) 3708a33c354dSmrg lt_cv_path_NM="$tmp_nm -B" 3709a33c354dSmrg break 2 3710a33c354dSmrg ;; 3711a33c354dSmrg *) 3712a33c354dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3713a33c354dSmrg */dev/null*) 3714a33c354dSmrg lt_cv_path_NM="$tmp_nm -p" 3715a33c354dSmrg break 2 3716a33c354dSmrg ;; 3717a33c354dSmrg *) 3718a33c354dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3719a33c354dSmrg continue # so that we can try to find one that supports BSD flags 3720a33c354dSmrg ;; 3721a33c354dSmrg esac 3722a33c354dSmrg ;; 3723a33c354dSmrg esac 3724a33c354dSmrg fi 3725a33c354dSmrg done 3726a33c354dSmrg IFS=$lt_save_ifs 3727a33c354dSmrg done 3728a33c354dSmrg : ${lt_cv_path_NM=no} 3729a33c354dSmrgfi]) 3730a33c354dSmrgif test no != "$lt_cv_path_NM"; then 3731a33c354dSmrg NM=$lt_cv_path_NM 3732a33c354dSmrgelse 3733a33c354dSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3734a33c354dSmrg if test -n "$DUMPBIN"; then : 3735a33c354dSmrg # Let the user override the test. 3736a33c354dSmrg else 3737a33c354dSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3738a33c354dSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3739a33c354dSmrg *COFF*) 3740a33c354dSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3741a33c354dSmrg ;; 3742a33c354dSmrg *) 3743a33c354dSmrg DUMPBIN=: 3744a33c354dSmrg ;; 3745a33c354dSmrg esac 3746a33c354dSmrg fi 3747a33c354dSmrg AC_SUBST([DUMPBIN]) 3748a33c354dSmrg if test : != "$DUMPBIN"; then 3749a33c354dSmrg NM=$DUMPBIN 3750a33c354dSmrg fi 3751a33c354dSmrgfi 3752a33c354dSmrgtest -z "$NM" && NM=nm 3753a33c354dSmrgAC_SUBST([NM]) 3754a33c354dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3755a33c354dSmrg 3756a33c354dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3757a33c354dSmrg [lt_cv_nm_interface="BSD nm" 3758a33c354dSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3759a33c354dSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3760a33c354dSmrg (eval "$ac_compile" 2>conftest.err) 3761a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3762a33c354dSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3763a33c354dSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3764a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3765a33c354dSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3766a33c354dSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3767a33c354dSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3768a33c354dSmrg lt_cv_nm_interface="MS dumpbin" 3769a33c354dSmrg fi 3770a33c354dSmrg rm -f conftest*]) 3771a33c354dSmrg])# LT_PATH_NM 3772a33c354dSmrg 3773a33c354dSmrg# Old names: 3774a33c354dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3775a33c354dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3776a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 3777a33c354dSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3778a33c354dSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3779a33c354dSmrg 3780a33c354dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3781a33c354dSmrg# -------------------------------- 3782a33c354dSmrg# how to determine the name of the shared library 3783a33c354dSmrg# associated with a specific link library. 3784a33c354dSmrg# -- PORTME fill in with the dynamic library characteristics 3785a33c354dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3786a33c354dSmrg[m4_require([_LT_DECL_EGREP]) 3787a33c354dSmrgm4_require([_LT_DECL_OBJDUMP]) 3788a33c354dSmrgm4_require([_LT_DECL_DLLTOOL]) 3789a33c354dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3790a33c354dSmrglt_cv_sharedlib_from_linklib_cmd, 3791a33c354dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3792a33c354dSmrg 3793a33c354dSmrgcase $host_os in 3794a33c354dSmrgcygwin* | mingw* | pw32* | cegcc*) 3795a33c354dSmrg # two different shell functions defined in ltmain.sh; 3796a33c354dSmrg # decide which one to use based on capabilities of $DLLTOOL 3797a33c354dSmrg case `$DLLTOOL --help 2>&1` in 3798a33c354dSmrg *--identify-strict*) 3799a33c354dSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3800a33c354dSmrg ;; 3801a33c354dSmrg *) 3802a33c354dSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3803a33c354dSmrg ;; 3804a33c354dSmrg esac 3805a33c354dSmrg ;; 3806a33c354dSmrg*) 3807a33c354dSmrg # fallback: assume linklib IS sharedlib 3808a33c354dSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3809a33c354dSmrg ;; 3810a33c354dSmrgesac 3811a33c354dSmrg]) 3812a33c354dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3813a33c354dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3814a33c354dSmrg 3815a33c354dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3816a33c354dSmrg [Command to associate shared and link libraries]) 3817a33c354dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3818a33c354dSmrg 3819a33c354dSmrg 3820a33c354dSmrg# _LT_PATH_MANIFEST_TOOL 3821a33c354dSmrg# ---------------------- 3822a33c354dSmrg# locate the manifest tool 3823a33c354dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3824a33c354dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3825a33c354dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3826a33c354dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3827a33c354dSmrg [lt_cv_path_mainfest_tool=no 3828a33c354dSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3829a33c354dSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3830a33c354dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3831a33c354dSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3832a33c354dSmrg lt_cv_path_mainfest_tool=yes 3833a33c354dSmrg fi 3834a33c354dSmrg rm -f conftest*]) 3835a33c354dSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3836a33c354dSmrg MANIFEST_TOOL=: 3837a33c354dSmrgfi 3838a33c354dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3839a33c354dSmrg])# _LT_PATH_MANIFEST_TOOL 3840a33c354dSmrg 3841a33c354dSmrg 3842a33c354dSmrg# _LT_DLL_DEF_P([FILE]) 3843a33c354dSmrg# --------------------- 3844a33c354dSmrg# True iff FILE is a Windows DLL '.def' file. 3845a33c354dSmrg# Keep in sync with func_dll_def_p in the libtool script 3846a33c354dSmrgAC_DEFUN([_LT_DLL_DEF_P], 3847a33c354dSmrg[dnl 3848a33c354dSmrg test DEF = "`$SED -n dnl 3849a33c354dSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3850a33c354dSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3851a33c354dSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3852a33c354dSmrg -e q dnl Only consider the first "real" line 3853a33c354dSmrg $1`" dnl 3854a33c354dSmrg])# _LT_DLL_DEF_P 3855a33c354dSmrg 3856a33c354dSmrg 3857a33c354dSmrg# LT_LIB_M 3858a33c354dSmrg# -------- 3859a33c354dSmrg# check for math library 3860a33c354dSmrgAC_DEFUN([LT_LIB_M], 3861a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3862a33c354dSmrgLIBM= 3863a33c354dSmrgcase $host in 3864a33c354dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3865a33c354dSmrg # These system don't have libm, or don't need it 3866a33c354dSmrg ;; 3867a33c354dSmrg*-ncr-sysv4.3*) 3868a33c354dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3869a33c354dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3870a33c354dSmrg ;; 3871a33c354dSmrg*) 3872a33c354dSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3873a33c354dSmrg ;; 3874a33c354dSmrgesac 3875a33c354dSmrgAC_SUBST([LIBM]) 3876a33c354dSmrg])# LT_LIB_M 3877a33c354dSmrg 3878a33c354dSmrg# Old name: 3879a33c354dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3880a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 3881a33c354dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3882a33c354dSmrg 3883a33c354dSmrg 3884a33c354dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3885a33c354dSmrg# ------------------------------- 3886a33c354dSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3887a33c354dSmrg[m4_require([_LT_TAG_COMPILER])dnl 3888a33c354dSmrg 3889a33c354dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3890a33c354dSmrg 3891a33c354dSmrgif test yes = "$GCC"; then 3892a33c354dSmrg case $cc_basename in 3893a33c354dSmrg nvcc*) 3894a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3895a33c354dSmrg *) 3896a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3897a33c354dSmrg esac 3898a33c354dSmrg 3899a33c354dSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3900a33c354dSmrg lt_cv_prog_compiler_rtti_exceptions, 3901a33c354dSmrg [-fno-rtti -fno-exceptions], [], 3902a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3903a33c354dSmrgfi 3904a33c354dSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3905a33c354dSmrg [Compiler flag to turn off builtin functions]) 3906a33c354dSmrg])# _LT_COMPILER_NO_RTTI 3907a33c354dSmrg 3908a33c354dSmrg 3909a33c354dSmrg# _LT_CMD_GLOBAL_SYMBOLS 3910a33c354dSmrg# ---------------------- 3911a33c354dSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3912a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3913a33c354dSmrgAC_REQUIRE([AC_PROG_CC])dnl 3914a33c354dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3915a33c354dSmrgAC_REQUIRE([LT_PATH_NM])dnl 3916a33c354dSmrgAC_REQUIRE([LT_PATH_LD])dnl 3917a33c354dSmrgm4_require([_LT_DECL_SED])dnl 3918a33c354dSmrgm4_require([_LT_DECL_EGREP])dnl 3919a33c354dSmrgm4_require([_LT_TAG_COMPILER])dnl 3920a33c354dSmrg 3921a33c354dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3922a33c354dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3923a33c354dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3924a33c354dSmrg[ 3925a33c354dSmrg# These are sane defaults that work on at least a few old systems. 3926a33c354dSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3927a33c354dSmrg 3928a33c354dSmrg# Character class describing NM global symbol codes. 3929a33c354dSmrgsymcode='[[BCDEGRST]]' 3930a33c354dSmrg 3931a33c354dSmrg# Regexp to match symbols that can be accessed directly from C. 3932a33c354dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3933a33c354dSmrg 3934a33c354dSmrg# Define system-specific variables. 3935a33c354dSmrgcase $host_os in 3936a33c354dSmrgaix*) 3937a33c354dSmrg symcode='[[BCDT]]' 3938a33c354dSmrg ;; 3939a33c354dSmrgcygwin* | mingw* | pw32* | cegcc*) 3940a33c354dSmrg symcode='[[ABCDGISTW]]' 3941a33c354dSmrg ;; 3942a33c354dSmrghpux*) 3943a33c354dSmrg if test ia64 = "$host_cpu"; then 3944a33c354dSmrg symcode='[[ABCDEGRST]]' 3945a33c354dSmrg fi 3946a33c354dSmrg ;; 3947a33c354dSmrgirix* | nonstopux*) 3948a33c354dSmrg symcode='[[BCDEGRST]]' 3949a33c354dSmrg ;; 3950a33c354dSmrgosf*) 3951a33c354dSmrg symcode='[[BCDEGQRST]]' 3952a33c354dSmrg ;; 3953a33c354dSmrgsolaris*) 3954a33c354dSmrg symcode='[[BDRT]]' 3955a33c354dSmrg ;; 3956a33c354dSmrgsco3.2v5*) 3957a33c354dSmrg symcode='[[DT]]' 3958a33c354dSmrg ;; 3959a33c354dSmrgsysv4.2uw2*) 3960a33c354dSmrg symcode='[[DT]]' 3961a33c354dSmrg ;; 3962a33c354dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3963a33c354dSmrg symcode='[[ABDT]]' 3964a33c354dSmrg ;; 3965a33c354dSmrgsysv4) 3966a33c354dSmrg symcode='[[DFNSTU]]' 3967a33c354dSmrg ;; 3968a33c354dSmrgesac 3969a33c354dSmrg 3970a33c354dSmrg# If we're using GNU nm, then use its standard symbol codes. 3971a33c354dSmrgcase `$NM -V 2>&1` in 3972a33c354dSmrg*GNU* | *'with BFD'*) 3973a33c354dSmrg symcode='[[ABCDGIRSTW]]' ;; 3974a33c354dSmrgesac 3975a33c354dSmrg 3976a33c354dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3977a33c354dSmrg # Gets list of data symbols to import. 3978a33c354dSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 3979a33c354dSmrg # Adjust the below global symbol transforms to fixup imported variables. 3980a33c354dSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3981a33c354dSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3982a33c354dSmrg lt_c_name_lib_hook="\ 3983a33c354dSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3984a33c354dSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3985a33c354dSmrgelse 3986a33c354dSmrg # Disable hooks by default. 3987a33c354dSmrg lt_cv_sys_global_symbol_to_import= 3988a33c354dSmrg lt_cdecl_hook= 3989a33c354dSmrg lt_c_name_hook= 3990a33c354dSmrg lt_c_name_lib_hook= 3991a33c354dSmrgfi 3992a33c354dSmrg 3993a33c354dSmrg# Transform an extracted symbol line into a proper C declaration. 3994a33c354dSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3995a33c354dSmrg# so use this general approach. 3996a33c354dSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 3997a33c354dSmrg$lt_cdecl_hook\ 3998a33c354dSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3999a33c354dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4000a33c354dSmrg 4001a33c354dSmrg# Transform an extracted symbol line into symbol name and symbol address 4002a33c354dSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4003a33c354dSmrg$lt_c_name_hook\ 4004a33c354dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4005a33c354dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4006a33c354dSmrg 4007a33c354dSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4008a33c354dSmrg# symbol address. 4009a33c354dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4010a33c354dSmrg$lt_c_name_lib_hook\ 4011a33c354dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012a33c354dSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4013a33c354dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4014a33c354dSmrg 4015a33c354dSmrg# Handle CRLF in mingw tool chain 4016a33c354dSmrgopt_cr= 4017a33c354dSmrgcase $build_os in 4018a33c354dSmrgmingw*) 4019a33c354dSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4020a33c354dSmrg ;; 4021a33c354dSmrgesac 4022a33c354dSmrg 4023a33c354dSmrg# Try without a prefix underscore, then with it. 4024a33c354dSmrgfor ac_symprfx in "" "_"; do 4025a33c354dSmrg 4026a33c354dSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4027a33c354dSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4028a33c354dSmrg 4029a33c354dSmrg # Write the raw and C identifiers. 4030a33c354dSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4031a33c354dSmrg # Fake it for dumpbin and say T for any non-static function, 4032a33c354dSmrg # D for any global variable and I for any imported variable. 4033a33c354dSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4034a33c354dSmrg # which start with @ or ?. 4035a33c354dSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4036a33c354dSmrg" {last_section=section; section=\$ 3};"\ 4037a33c354dSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4038a33c354dSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4039a33c354dSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4040a33c354dSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4041a33c354dSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4042a33c354dSmrg" \$ 0!~/External *\|/{next};"\ 4043a33c354dSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4044a33c354dSmrg" {if(hide[section]) next};"\ 4045a33c354dSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4046a33c354dSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4047a33c354dSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4048a33c354dSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4049a33c354dSmrg" ' prfx=^$ac_symprfx]" 4050a33c354dSmrg else 4051a33c354dSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4052a33c354dSmrg fi 4053a33c354dSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4054a33c354dSmrg 4055a33c354dSmrg # Check to see that the pipe works correctly. 4056a33c354dSmrg pipe_works=no 4057a33c354dSmrg 4058a33c354dSmrg rm -f conftest* 4059a33c354dSmrg cat > conftest.$ac_ext <<_LT_EOF 4060a33c354dSmrg#ifdef __cplusplus 4061a33c354dSmrgextern "C" { 4062a33c354dSmrg#endif 4063a33c354dSmrgchar nm_test_var; 4064a33c354dSmrgvoid nm_test_func(void); 4065a33c354dSmrgvoid nm_test_func(void){} 4066a33c354dSmrg#ifdef __cplusplus 4067a33c354dSmrg} 4068a33c354dSmrg#endif 4069a33c354dSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4070a33c354dSmrg_LT_EOF 4071a33c354dSmrg 4072a33c354dSmrg if AC_TRY_EVAL(ac_compile); then 4073a33c354dSmrg # Now try to grab the symbols. 4074a33c354dSmrg nlist=conftest.nm 4075a33c354dSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4076a33c354dSmrg # Try sorting and uniquifying the output. 4077a33c354dSmrg if sort "$nlist" | uniq > "$nlist"T; then 4078a33c354dSmrg mv -f "$nlist"T "$nlist" 4079a33c354dSmrg else 4080a33c354dSmrg rm -f "$nlist"T 4081a33c354dSmrg fi 4082a33c354dSmrg 4083a33c354dSmrg # Make sure that we snagged all the symbols we need. 4084a33c354dSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4085a33c354dSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4086a33c354dSmrg cat <<_LT_EOF > conftest.$ac_ext 4087a33c354dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4088a33c354dSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4089a33c354dSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4090a33c354dSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4091a33c354dSmrg# define LT@&t@_DLSYM_CONST 4092a33c354dSmrg#elif defined __osf__ 4093a33c354dSmrg/* This system does not cope well with relocations in const data. */ 4094a33c354dSmrg# define LT@&t@_DLSYM_CONST 4095a33c354dSmrg#else 4096a33c354dSmrg# define LT@&t@_DLSYM_CONST const 4097a33c354dSmrg#endif 4098a33c354dSmrg 4099a33c354dSmrg#ifdef __cplusplus 4100a33c354dSmrgextern "C" { 4101a33c354dSmrg#endif 4102a33c354dSmrg 4103a33c354dSmrg_LT_EOF 4104a33c354dSmrg # Now generate the symbol file. 4105a33c354dSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4106a33c354dSmrg 4107a33c354dSmrg cat <<_LT_EOF >> conftest.$ac_ext 4108a33c354dSmrg 4109a33c354dSmrg/* The mapping between symbol names and symbols. */ 4110a33c354dSmrgLT@&t@_DLSYM_CONST struct { 4111a33c354dSmrg const char *name; 4112a33c354dSmrg void *address; 4113a33c354dSmrg} 4114a33c354dSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4115a33c354dSmrg{ 4116a33c354dSmrg { "@PROGRAM@", (void *) 0 }, 4117a33c354dSmrg_LT_EOF 4118a33c354dSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4119a33c354dSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4120a33c354dSmrg {0, (void *) 0} 4121a33c354dSmrg}; 4122a33c354dSmrg 4123a33c354dSmrg/* This works around a problem in FreeBSD linker */ 4124a33c354dSmrg#ifdef FREEBSD_WORKAROUND 4125a33c354dSmrgstatic const void *lt_preloaded_setup() { 4126a33c354dSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4127a33c354dSmrg} 4128a33c354dSmrg#endif 4129a33c354dSmrg 4130a33c354dSmrg#ifdef __cplusplus 4131a33c354dSmrg} 4132a33c354dSmrg#endif 4133a33c354dSmrg_LT_EOF 4134a33c354dSmrg # Now try linking the two files. 4135a33c354dSmrg mv conftest.$ac_objext conftstm.$ac_objext 4136a33c354dSmrg lt_globsym_save_LIBS=$LIBS 4137a33c354dSmrg lt_globsym_save_CFLAGS=$CFLAGS 4138a33c354dSmrg LIBS=conftstm.$ac_objext 4139a33c354dSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4140a33c354dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4141a33c354dSmrg pipe_works=yes 4142a33c354dSmrg fi 4143a33c354dSmrg LIBS=$lt_globsym_save_LIBS 4144a33c354dSmrg CFLAGS=$lt_globsym_save_CFLAGS 4145a33c354dSmrg else 4146a33c354dSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4147a33c354dSmrg fi 4148a33c354dSmrg else 4149a33c354dSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4150a33c354dSmrg fi 4151a33c354dSmrg else 4152a33c354dSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4153a33c354dSmrg fi 4154a33c354dSmrg else 4155a33c354dSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4156a33c354dSmrg cat conftest.$ac_ext >&5 4157a33c354dSmrg fi 4158a33c354dSmrg rm -rf conftest* conftst* 4159a33c354dSmrg 4160a33c354dSmrg # Do not use the global_symbol_pipe unless it works. 4161a33c354dSmrg if test yes = "$pipe_works"; then 4162a33c354dSmrg break 4163a33c354dSmrg else 4164a33c354dSmrg lt_cv_sys_global_symbol_pipe= 4165a33c354dSmrg fi 4166a33c354dSmrgdone 4167a33c354dSmrg]) 4168a33c354dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4169a33c354dSmrg lt_cv_sys_global_symbol_to_cdecl= 4170a33c354dSmrgfi 4171a33c354dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4172a33c354dSmrg AC_MSG_RESULT(failed) 4173a33c354dSmrgelse 4174a33c354dSmrg AC_MSG_RESULT(ok) 4175a33c354dSmrgfi 4176a33c354dSmrg 4177a33c354dSmrg# Response file support. 4178a33c354dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4179a33c354dSmrg nm_file_list_spec='@' 4180a33c354dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4181a33c354dSmrg nm_file_list_spec='@' 4182a33c354dSmrgfi 4183a33c354dSmrg 4184a33c354dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4185a33c354dSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4186a33c354dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4187a33c354dSmrg [Transform the output of nm in a proper C declaration]) 4188a33c354dSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4189a33c354dSmrg [Transform the output of nm into a list of symbols to manually relocate]) 4190a33c354dSmrg_LT_DECL([global_symbol_to_c_name_address], 4191a33c354dSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4192a33c354dSmrg [Transform the output of nm in a C name address pair]) 4193a33c354dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4194a33c354dSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4195a33c354dSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4196a33c354dSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4197a33c354dSmrg [The name lister interface]) 4198a33c354dSmrg_LT_DECL([], [nm_file_list_spec], [1], 4199a33c354dSmrg [Specify filename containing input files for $NM]) 4200a33c354dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4201a33c354dSmrg 4202a33c354dSmrg 4203a33c354dSmrg# _LT_COMPILER_PIC([TAGNAME]) 4204a33c354dSmrg# --------------------------- 4205a33c354dSmrgm4_defun([_LT_COMPILER_PIC], 4206a33c354dSmrg[m4_require([_LT_TAG_COMPILER])dnl 4207a33c354dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4208a33c354dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4209a33c354dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4210a33c354dSmrg 4211a33c354dSmrgm4_if([$1], [CXX], [ 4212a33c354dSmrg # C++ specific cases for pic, static, wl, etc. 4213a33c354dSmrg if test yes = "$GXX"; then 4214a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4215a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4216a33c354dSmrg 4217a33c354dSmrg case $host_os in 4218a33c354dSmrg aix*) 4219a33c354dSmrg # All AIX code is PIC. 4220a33c354dSmrg if test ia64 = "$host_cpu"; then 4221a33c354dSmrg # AIX 5 now supports IA64 processor 4222a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4223a33c354dSmrg fi 4224a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4225a33c354dSmrg ;; 4226a33c354dSmrg 4227a33c354dSmrg amigaos*) 4228a33c354dSmrg case $host_cpu in 4229a33c354dSmrg powerpc) 4230a33c354dSmrg # see comment about AmigaOS4 .so support 4231a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232a33c354dSmrg ;; 4233a33c354dSmrg m68k) 4234a33c354dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4235a33c354dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4236a33c354dSmrg # like '-m68040'. 4237a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4238a33c354dSmrg ;; 4239a33c354dSmrg esac 4240a33c354dSmrg ;; 4241a33c354dSmrg 4242a33c354dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4243a33c354dSmrg # PIC is the default for these OSes. 4244a33c354dSmrg ;; 4245a33c354dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4246a33c354dSmrg # This hack is so that the source file can tell whether it is being 4247a33c354dSmrg # built for inclusion in a dll (and should export symbols for example). 4248a33c354dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4249a33c354dSmrg # (--disable-auto-import) libraries 4250a33c354dSmrg m4_if([$1], [GCJ], [], 4251a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4252a33c354dSmrg case $host_os in 4253a33c354dSmrg os2*) 4254a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4255a33c354dSmrg ;; 4256a33c354dSmrg esac 4257a33c354dSmrg ;; 4258a33c354dSmrg darwin* | rhapsody*) 4259a33c354dSmrg # PIC is the default on this platform 4260a33c354dSmrg # Common symbols not allowed in MH_DYLIB files 4261a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4262a33c354dSmrg ;; 4263a33c354dSmrg *djgpp*) 4264a33c354dSmrg # DJGPP does not support shared libraries at all 4265a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4266a33c354dSmrg ;; 4267a33c354dSmrg haiku*) 4268a33c354dSmrg # PIC is the default for Haiku. 4269a33c354dSmrg # The "-static" flag exists, but is broken. 4270a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4271a33c354dSmrg ;; 4272a33c354dSmrg interix[[3-9]]*) 4273a33c354dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4274a33c354dSmrg # Instead, we relocate shared libraries at runtime. 4275a33c354dSmrg ;; 4276a33c354dSmrg sysv4*MP*) 4277a33c354dSmrg if test -d /usr/nec; then 4278a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4279a33c354dSmrg fi 4280a33c354dSmrg ;; 4281a33c354dSmrg hpux*) 4282a33c354dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4283a33c354dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4284a33c354dSmrg # sets the default TLS model and affects inlining. 4285a33c354dSmrg case $host_cpu in 4286a33c354dSmrg hppa*64*) 4287a33c354dSmrg ;; 4288a33c354dSmrg *) 4289a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4290a33c354dSmrg ;; 4291a33c354dSmrg esac 4292a33c354dSmrg ;; 4293a33c354dSmrg *qnx* | *nto*) 4294a33c354dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4295a33c354dSmrg # it will coredump. 4296a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4297a33c354dSmrg ;; 4298a33c354dSmrg *) 4299a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4300a33c354dSmrg ;; 4301a33c354dSmrg esac 4302a33c354dSmrg else 4303a33c354dSmrg case $host_os in 4304a33c354dSmrg aix[[4-9]]*) 4305a33c354dSmrg # All AIX code is PIC. 4306a33c354dSmrg if test ia64 = "$host_cpu"; then 4307a33c354dSmrg # AIX 5 now supports IA64 processor 4308a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4309a33c354dSmrg else 4310a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4311a33c354dSmrg fi 4312a33c354dSmrg ;; 4313a33c354dSmrg chorus*) 4314a33c354dSmrg case $cc_basename in 4315a33c354dSmrg cxch68*) 4316a33c354dSmrg # Green Hills C++ Compiler 4317a33c354dSmrg # _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" 4318a33c354dSmrg ;; 4319a33c354dSmrg esac 4320a33c354dSmrg ;; 4321a33c354dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4322a33c354dSmrg # This hack is so that the source file can tell whether it is being 4323a33c354dSmrg # built for inclusion in a dll (and should export symbols for example). 4324a33c354dSmrg m4_if([$1], [GCJ], [], 4325a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4326a33c354dSmrg ;; 4327a33c354dSmrg dgux*) 4328a33c354dSmrg case $cc_basename in 4329a33c354dSmrg ec++*) 4330a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4331a33c354dSmrg ;; 4332a33c354dSmrg ghcx*) 4333a33c354dSmrg # Green Hills C++ Compiler 4334a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4335a33c354dSmrg ;; 4336a33c354dSmrg *) 4337a33c354dSmrg ;; 4338a33c354dSmrg esac 4339a33c354dSmrg ;; 4340a33c354dSmrg freebsd* | dragonfly* | midnightbsd*) 4341a33c354dSmrg # FreeBSD uses GNU C++ 4342a33c354dSmrg ;; 4343a33c354dSmrg hpux9* | hpux10* | hpux11*) 4344a33c354dSmrg case $cc_basename in 4345a33c354dSmrg CC*) 4346a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4347a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4348a33c354dSmrg if test ia64 != "$host_cpu"; then 4349a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4350a33c354dSmrg fi 4351a33c354dSmrg ;; 4352a33c354dSmrg aCC*) 4353a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4355a33c354dSmrg case $host_cpu in 4356a33c354dSmrg hppa*64*|ia64*) 4357a33c354dSmrg # +Z the default 4358a33c354dSmrg ;; 4359a33c354dSmrg *) 4360a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4361a33c354dSmrg ;; 4362a33c354dSmrg esac 4363a33c354dSmrg ;; 4364a33c354dSmrg *) 4365a33c354dSmrg ;; 4366a33c354dSmrg esac 4367a33c354dSmrg ;; 4368a33c354dSmrg interix*) 4369a33c354dSmrg # This is c89, which is MS Visual C++ (no shared libs) 4370a33c354dSmrg # Anyone wants to do a port? 4371a33c354dSmrg ;; 4372a33c354dSmrg irix5* | irix6* | nonstopux*) 4373a33c354dSmrg case $cc_basename in 4374a33c354dSmrg CC*) 4375a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4376a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4377a33c354dSmrg # CC pic flag -KPIC is the default. 4378a33c354dSmrg ;; 4379a33c354dSmrg *) 4380a33c354dSmrg ;; 4381a33c354dSmrg esac 4382a33c354dSmrg ;; 4383a33c354dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4384a33c354dSmrg case $cc_basename in 4385a33c354dSmrg KCC*) 4386a33c354dSmrg # KAI C++ Compiler 4387a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4388a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4389a33c354dSmrg ;; 4390a33c354dSmrg ecpc* ) 4391a33c354dSmrg # old Intel C++ for x86_64, which still supported -KPIC. 4392a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4394a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4395a33c354dSmrg ;; 4396a33c354dSmrg icpc* ) 4397a33c354dSmrg # Intel C++, used to be incompatible with GCC. 4398a33c354dSmrg # ICC 10 doesn't accept -KPIC any more. 4399a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4401a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402a33c354dSmrg ;; 4403a33c354dSmrg pgCC* | pgcpp*) 4404a33c354dSmrg # Portland Group C++ compiler 4405a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4407a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408a33c354dSmrg ;; 4409a33c354dSmrg cxx*) 4410a33c354dSmrg # Compaq C++ 4411a33c354dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4412a33c354dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4413a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4414a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4415a33c354dSmrg ;; 4416a33c354dSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4417a33c354dSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4418a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4420a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4421a33c354dSmrg ;; 4422a33c354dSmrg *) 4423a33c354dSmrg case `$CC -V 2>&1 | $SED 5q` in 4424a33c354dSmrg *Sun\ C*) 4425a33c354dSmrg # Sun C++ 5.9 4426a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4427a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4428a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4429a33c354dSmrg ;; 4430a33c354dSmrg esac 4431a33c354dSmrg ;; 4432a33c354dSmrg esac 4433a33c354dSmrg ;; 4434a33c354dSmrg lynxos*) 4435a33c354dSmrg ;; 4436a33c354dSmrg m88k*) 4437a33c354dSmrg ;; 4438a33c354dSmrg mvs*) 4439a33c354dSmrg case $cc_basename in 4440a33c354dSmrg cxx*) 4441a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4442a33c354dSmrg ;; 4443a33c354dSmrg *) 4444a33c354dSmrg ;; 4445a33c354dSmrg esac 4446a33c354dSmrg ;; 4447a33c354dSmrg netbsd*) 4448a33c354dSmrg ;; 4449a33c354dSmrg *qnx* | *nto*) 4450a33c354dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4451a33c354dSmrg # it will coredump. 4452a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4453a33c354dSmrg ;; 4454a33c354dSmrg osf3* | osf4* | osf5*) 4455a33c354dSmrg case $cc_basename in 4456a33c354dSmrg KCC*) 4457a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4458a33c354dSmrg ;; 4459a33c354dSmrg RCC*) 4460a33c354dSmrg # Rational C++ 2.4.1 4461a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4462a33c354dSmrg ;; 4463a33c354dSmrg cxx*) 4464a33c354dSmrg # Digital/Compaq C++ 4465a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4466a33c354dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4467a33c354dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4468a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4469a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4470a33c354dSmrg ;; 4471a33c354dSmrg *) 4472a33c354dSmrg ;; 4473a33c354dSmrg esac 4474a33c354dSmrg ;; 4475a33c354dSmrg psos*) 4476a33c354dSmrg ;; 4477a33c354dSmrg solaris*) 4478a33c354dSmrg case $cc_basename in 4479a33c354dSmrg CC* | sunCC*) 4480a33c354dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4481a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4482a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4483a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4484a33c354dSmrg ;; 4485a33c354dSmrg gcx*) 4486a33c354dSmrg # Green Hills C++ Compiler 4487a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4488a33c354dSmrg ;; 4489a33c354dSmrg *) 4490a33c354dSmrg ;; 4491a33c354dSmrg esac 4492a33c354dSmrg ;; 4493a33c354dSmrg sunos4*) 4494a33c354dSmrg case $cc_basename in 4495a33c354dSmrg CC*) 4496a33c354dSmrg # Sun C++ 4.x 4497a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4498a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4499a33c354dSmrg ;; 4500a33c354dSmrg lcc*) 4501a33c354dSmrg # Lucid 4502a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4503a33c354dSmrg ;; 4504a33c354dSmrg *) 4505a33c354dSmrg ;; 4506a33c354dSmrg esac 4507a33c354dSmrg ;; 4508a33c354dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4509a33c354dSmrg case $cc_basename in 4510a33c354dSmrg CC*) 4511a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4512a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4513a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4514a33c354dSmrg ;; 4515a33c354dSmrg esac 4516a33c354dSmrg ;; 4517a33c354dSmrg tandem*) 4518a33c354dSmrg case $cc_basename in 4519a33c354dSmrg NCC*) 4520a33c354dSmrg # NonStop-UX NCC 3.20 4521a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4522a33c354dSmrg ;; 4523a33c354dSmrg *) 4524a33c354dSmrg ;; 4525a33c354dSmrg esac 4526a33c354dSmrg ;; 4527a33c354dSmrg vxworks*) 4528a33c354dSmrg ;; 4529a33c354dSmrg *) 4530a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4531a33c354dSmrg ;; 4532a33c354dSmrg esac 4533a33c354dSmrg fi 4534a33c354dSmrg], 4535a33c354dSmrg[ 4536a33c354dSmrg if test yes = "$GCC"; then 4537a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4538a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4539a33c354dSmrg 4540a33c354dSmrg case $host_os in 4541a33c354dSmrg aix*) 4542a33c354dSmrg # All AIX code is PIC. 4543a33c354dSmrg if test ia64 = "$host_cpu"; then 4544a33c354dSmrg # AIX 5 now supports IA64 processor 4545a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4546a33c354dSmrg fi 4547a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4548a33c354dSmrg ;; 4549a33c354dSmrg 4550a33c354dSmrg amigaos*) 4551a33c354dSmrg case $host_cpu in 4552a33c354dSmrg powerpc) 4553a33c354dSmrg # see comment about AmigaOS4 .so support 4554a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555a33c354dSmrg ;; 4556a33c354dSmrg m68k) 4557a33c354dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4558a33c354dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4559a33c354dSmrg # like '-m68040'. 4560a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4561a33c354dSmrg ;; 4562a33c354dSmrg esac 4563a33c354dSmrg ;; 4564a33c354dSmrg 4565a33c354dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4566a33c354dSmrg # PIC is the default for these OSes. 4567a33c354dSmrg ;; 4568a33c354dSmrg 4569a33c354dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4570a33c354dSmrg # This hack is so that the source file can tell whether it is being 4571a33c354dSmrg # built for inclusion in a dll (and should export symbols for example). 4572a33c354dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4573a33c354dSmrg # (--disable-auto-import) libraries 4574a33c354dSmrg m4_if([$1], [GCJ], [], 4575a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4576a33c354dSmrg case $host_os in 4577a33c354dSmrg os2*) 4578a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4579a33c354dSmrg ;; 4580a33c354dSmrg esac 4581a33c354dSmrg ;; 4582a33c354dSmrg 4583a33c354dSmrg darwin* | rhapsody*) 4584a33c354dSmrg # PIC is the default on this platform 4585a33c354dSmrg # Common symbols not allowed in MH_DYLIB files 4586a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4587a33c354dSmrg ;; 4588a33c354dSmrg 4589a33c354dSmrg haiku*) 4590a33c354dSmrg # PIC is the default for Haiku. 4591a33c354dSmrg # The "-static" flag exists, but is broken. 4592a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4593a33c354dSmrg ;; 4594a33c354dSmrg 4595a33c354dSmrg hpux*) 4596a33c354dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4597a33c354dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4598a33c354dSmrg # sets the default TLS model and affects inlining. 4599a33c354dSmrg case $host_cpu in 4600a33c354dSmrg hppa*64*) 4601a33c354dSmrg # +Z the default 4602a33c354dSmrg ;; 4603a33c354dSmrg *) 4604a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4605a33c354dSmrg ;; 4606a33c354dSmrg esac 4607a33c354dSmrg ;; 4608a33c354dSmrg 4609a33c354dSmrg interix[[3-9]]*) 4610a33c354dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4611a33c354dSmrg # Instead, we relocate shared libraries at runtime. 4612a33c354dSmrg ;; 4613a33c354dSmrg 4614a33c354dSmrg msdosdjgpp*) 4615a33c354dSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4616a33c354dSmrg # on systems that don't support them. 4617a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4618a33c354dSmrg enable_shared=no 4619a33c354dSmrg ;; 4620a33c354dSmrg 4621a33c354dSmrg *nto* | *qnx*) 4622a33c354dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4623a33c354dSmrg # it will coredump. 4624a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4625a33c354dSmrg ;; 4626a33c354dSmrg 4627a33c354dSmrg sysv4*MP*) 4628a33c354dSmrg if test -d /usr/nec; then 4629a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4630a33c354dSmrg fi 4631a33c354dSmrg ;; 4632a33c354dSmrg 4633a33c354dSmrg *) 4634a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4635a33c354dSmrg ;; 4636a33c354dSmrg esac 4637a33c354dSmrg 4638a33c354dSmrg case $cc_basename in 4639a33c354dSmrg nvcc*) # Cuda Compiler Driver 2.2 4640a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4641a33c354dSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4642a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4643a33c354dSmrg fi 4644a33c354dSmrg ;; 4645a33c354dSmrg esac 4646a33c354dSmrg else 4647a33c354dSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4648a33c354dSmrg case $host_os in 4649a33c354dSmrg aix*) 4650a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4651a33c354dSmrg if test ia64 = "$host_cpu"; then 4652a33c354dSmrg # AIX 5 now supports IA64 processor 4653a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4654a33c354dSmrg else 4655a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4656a33c354dSmrg fi 4657a33c354dSmrg ;; 4658a33c354dSmrg 4659a33c354dSmrg darwin* | rhapsody*) 4660a33c354dSmrg # PIC is the default on this platform 4661a33c354dSmrg # Common symbols not allowed in MH_DYLIB files 4662a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4663a33c354dSmrg case $cc_basename in 4664a33c354dSmrg nagfor*) 4665a33c354dSmrg # NAG Fortran compiler 4666a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4667a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4668a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4669a33c354dSmrg ;; 4670a33c354dSmrg esac 4671a33c354dSmrg ;; 4672a33c354dSmrg 4673a33c354dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4674a33c354dSmrg # This hack is so that the source file can tell whether it is being 4675a33c354dSmrg # built for inclusion in a dll (and should export symbols for example). 4676a33c354dSmrg m4_if([$1], [GCJ], [], 4677a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4678a33c354dSmrg case $host_os in 4679a33c354dSmrg os2*) 4680a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4681a33c354dSmrg ;; 4682a33c354dSmrg esac 4683a33c354dSmrg ;; 4684a33c354dSmrg 4685a33c354dSmrg hpux9* | hpux10* | hpux11*) 4686a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4687a33c354dSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4688a33c354dSmrg # not for PA HP-UX. 4689a33c354dSmrg case $host_cpu in 4690a33c354dSmrg hppa*64*|ia64*) 4691a33c354dSmrg # +Z the default 4692a33c354dSmrg ;; 4693a33c354dSmrg *) 4694a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4695a33c354dSmrg ;; 4696a33c354dSmrg esac 4697a33c354dSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4698a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4699a33c354dSmrg ;; 4700a33c354dSmrg 4701a33c354dSmrg irix5* | irix6* | nonstopux*) 4702a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4703a33c354dSmrg # PIC (with -KPIC) is the default. 4704a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4705a33c354dSmrg ;; 4706a33c354dSmrg 4707a33c354dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4708a33c354dSmrg case $cc_basename in 4709a33c354dSmrg # old Intel for x86_64, which still supported -KPIC. 4710a33c354dSmrg ecc*) 4711a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4712a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4713a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4714a33c354dSmrg ;; 4715a33c354dSmrg # icc used to be incompatible with GCC. 4716a33c354dSmrg # ICC 10 doesn't accept -KPIC any more. 4717a33c354dSmrg icc* | ifort*) 4718a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4720a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721a33c354dSmrg ;; 4722a33c354dSmrg # Lahey Fortran 8.1. 4723a33c354dSmrg lf95*) 4724a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4725a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4726a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4727a33c354dSmrg ;; 4728a33c354dSmrg nagfor*) 4729a33c354dSmrg # NAG Fortran compiler 4730a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4731a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4732a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4733a33c354dSmrg ;; 4734a33c354dSmrg tcc*) 4735a33c354dSmrg # Fabrice Bellard et al's Tiny C Compiler 4736a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4737a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4738a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4739a33c354dSmrg ;; 4740a33c354dSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4741a33c354dSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4742a33c354dSmrg # which looks to be a dead project) 4743a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4745a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4746a33c354dSmrg ;; 4747a33c354dSmrg ccc*) 4748a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4749a33c354dSmrg # All Alpha code is PIC. 4750a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4751a33c354dSmrg ;; 4752a33c354dSmrg xl* | bgxl* | bgf* | mpixl*) 4753a33c354dSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4754a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4755a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4756a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4757a33c354dSmrg ;; 4758a33c354dSmrg *) 4759a33c354dSmrg case `$CC -V 2>&1 | $SED 5q` in 4760a33c354dSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4761a33c354dSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4762a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4763a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4764a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4765a33c354dSmrg ;; 4766a33c354dSmrg *Sun\ F* | *Sun*Fortran*) 4767a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4768a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4769a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4770a33c354dSmrg ;; 4771a33c354dSmrg *Sun\ C*) 4772a33c354dSmrg # Sun C 5.9 4773a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4776a33c354dSmrg ;; 4777a33c354dSmrg *Intel*\ [[CF]]*Compiler*) 4778a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4779a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4780a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4781a33c354dSmrg ;; 4782a33c354dSmrg *Portland\ Group*) 4783a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4784a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4785a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4786a33c354dSmrg ;; 4787a33c354dSmrg esac 4788a33c354dSmrg ;; 4789a33c354dSmrg esac 4790a33c354dSmrg ;; 4791a33c354dSmrg 4792a33c354dSmrg newsos6) 4793a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4794a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4795a33c354dSmrg ;; 4796a33c354dSmrg 4797a33c354dSmrg *nto* | *qnx*) 4798a33c354dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4799a33c354dSmrg # it will coredump. 4800a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4801a33c354dSmrg ;; 4802a33c354dSmrg 4803a33c354dSmrg osf3* | osf4* | osf5*) 4804a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4805a33c354dSmrg # All OSF/1 code is PIC. 4806a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4807a33c354dSmrg ;; 4808a33c354dSmrg 4809a33c354dSmrg rdos*) 4810a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4811a33c354dSmrg ;; 4812a33c354dSmrg 4813a33c354dSmrg solaris*) 4814a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4815a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4816a33c354dSmrg case $cc_basename in 4817a33c354dSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4818a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4819a33c354dSmrg *) 4820a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4821a33c354dSmrg esac 4822a33c354dSmrg ;; 4823a33c354dSmrg 4824a33c354dSmrg sunos4*) 4825a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4826a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4827a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4828a33c354dSmrg ;; 4829a33c354dSmrg 4830a33c354dSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4831a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4832a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4833a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4834a33c354dSmrg ;; 4835a33c354dSmrg 4836a33c354dSmrg sysv4*MP*) 4837a33c354dSmrg if test -d /usr/nec; then 4838a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4839a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840a33c354dSmrg fi 4841a33c354dSmrg ;; 4842a33c354dSmrg 4843a33c354dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4844a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4845a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4846a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847a33c354dSmrg ;; 4848a33c354dSmrg 4849a33c354dSmrg unicos*) 4850a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4851a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4852a33c354dSmrg ;; 4853a33c354dSmrg 4854a33c354dSmrg uts4*) 4855a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4856a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4857a33c354dSmrg ;; 4858a33c354dSmrg 4859a33c354dSmrg *) 4860a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4861a33c354dSmrg ;; 4862a33c354dSmrg esac 4863a33c354dSmrg fi 4864a33c354dSmrg]) 4865a33c354dSmrgcase $host_os in 4866a33c354dSmrg # For platforms that do not support PIC, -DPIC is meaningless: 4867a33c354dSmrg *djgpp*) 4868a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4869a33c354dSmrg ;; 4870a33c354dSmrg *) 4871a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4872a33c354dSmrg ;; 4873a33c354dSmrgesac 4874a33c354dSmrg 4875a33c354dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4876a33c354dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4877a33c354dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4878a33c354dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4879a33c354dSmrg 4880a33c354dSmrg# 4881a33c354dSmrg# Check to make sure the PIC flag actually works. 4882a33c354dSmrg# 4883a33c354dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4884a33c354dSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4885a33c354dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4886a33c354dSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4887a33c354dSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4888a33c354dSmrg "" | " "*) ;; 4889a33c354dSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4890a33c354dSmrg esac], 4891a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4892a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4893a33c354dSmrgfi 4894a33c354dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4895a33c354dSmrg [Additional compiler flags for building library objects]) 4896a33c354dSmrg 4897a33c354dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4898a33c354dSmrg [How to pass a linker flag through the compiler]) 4899a33c354dSmrg# 4900a33c354dSmrg# Check to make sure the static flag actually works. 4901a33c354dSmrg# 4902a33c354dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4903a33c354dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4904a33c354dSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4905a33c354dSmrg $lt_tmp_static_flag, 4906a33c354dSmrg [], 4907a33c354dSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4908a33c354dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4909a33c354dSmrg [Compiler flag to prevent dynamic linking]) 4910a33c354dSmrg])# _LT_COMPILER_PIC 4911a33c354dSmrg 4912a33c354dSmrg 4913a33c354dSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4914a33c354dSmrg# ---------------------------- 4915a33c354dSmrg# See if the linker supports building shared libraries. 4916a33c354dSmrgm4_defun([_LT_LINKER_SHLIBS], 4917a33c354dSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4918a33c354dSmrgAC_REQUIRE([LT_PATH_NM])dnl 4919a33c354dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4920a33c354dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4921a33c354dSmrgm4_require([_LT_DECL_EGREP])dnl 4922a33c354dSmrgm4_require([_LT_DECL_SED])dnl 4923a33c354dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4924a33c354dSmrgm4_require([_LT_TAG_COMPILER])dnl 4925a33c354dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4926a33c354dSmrgm4_if([$1], [CXX], [ 4927a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4928a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4929a33c354dSmrg case $host_os in 4930a33c354dSmrg aix[[4-9]]*) 4931a33c354dSmrg # If we're using GNU nm, then we don't want the "-C" option. 4932a33c354dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4933a33c354dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4934a33c354dSmrg # weak defined symbols like other global defined symbols, whereas 4935a33c354dSmrg # GNU nm marks them as "W". 4936a33c354dSmrg # While the 'weak' keyword is ignored in the Export File, we need 4937a33c354dSmrg # it in the Import File for the 'aix-soname' feature, so we have 4938a33c354dSmrg # to replace the "-B" option with "-P" for AIX nm. 4939a33c354dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4940a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 4941a33c354dSmrg else 4942a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4943a33c354dSmrg fi 4944a33c354dSmrg ;; 4945a33c354dSmrg pw32*) 4946a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4947a33c354dSmrg ;; 4948a33c354dSmrg cygwin* | mingw* | cegcc*) 4949a33c354dSmrg case $cc_basename in 4950a33c354dSmrg cl* | icl*) 4951a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4952a33c354dSmrg ;; 4953a33c354dSmrg *) 4954a33c354dSmrg _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' 4955a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4956a33c354dSmrg ;; 4957a33c354dSmrg esac 4958a33c354dSmrg ;; 4959a33c354dSmrg *) 4960a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4961a33c354dSmrg ;; 4962a33c354dSmrg esac 4963a33c354dSmrg], [ 4964a33c354dSmrg runpath_var= 4965a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4966a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4967a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)= 4968a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4969a33c354dSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4970a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4971a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4972a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4973a33c354dSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4974a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4975a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4976a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4977a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4978a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4979a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4980a33c354dSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4981a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4982a33c354dSmrg _LT_TAGVAR(module_cmds, $1)= 4983a33c354dSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4984a33c354dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4985a33c354dSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4986a33c354dSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4987a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4988a33c354dSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4989a33c354dSmrg # included in the symbol list 4990a33c354dSmrg _LT_TAGVAR(include_expsyms, $1)= 4991a33c354dSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4992a33c354dSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4993a33c354dSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4994a33c354dSmrg # as well as any symbol that contains 'd'. 4995a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4996a33c354dSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4997a33c354dSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4998a33c354dSmrg # the symbol is explicitly referenced. Since portable code cannot 4999a33c354dSmrg # rely on this symbol name, it's probably fine to never include it in 5000a33c354dSmrg # preloaded symbol tables. 5001a33c354dSmrg # Exclude shared library initialization/finalization symbols. 5002a33c354dSmrgdnl Note also adjust exclude_expsyms for C++ above. 5003a33c354dSmrg extract_expsyms_cmds= 5004a33c354dSmrg 5005a33c354dSmrg case $host_os in 5006a33c354dSmrg cygwin* | mingw* | pw32* | cegcc*) 5007a33c354dSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5008a33c354dSmrg # When not using gcc, we currently assume that we are using 5009a33c354dSmrg # Microsoft Visual C++ or Intel C++ Compiler. 5010a33c354dSmrg if test yes != "$GCC"; then 5011a33c354dSmrg with_gnu_ld=no 5012a33c354dSmrg fi 5013a33c354dSmrg ;; 5014a33c354dSmrg interix*) 5015a33c354dSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5016a33c354dSmrg with_gnu_ld=yes 5017a33c354dSmrg ;; 5018a33c354dSmrg openbsd* | bitrig*) 5019a33c354dSmrg with_gnu_ld=no 5020a33c354dSmrg ;; 5021a33c354dSmrg esac 5022a33c354dSmrg 5023a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5024a33c354dSmrg 5025a33c354dSmrg # On some targets, GNU ld is compatible enough with the native linker 5026a33c354dSmrg # that we're better off using the native interface for both. 5027a33c354dSmrg lt_use_gnu_ld_interface=no 5028a33c354dSmrg if test yes = "$with_gnu_ld"; then 5029a33c354dSmrg case $host_os in 5030a33c354dSmrg aix*) 5031a33c354dSmrg # The AIX port of GNU ld has always aspired to compatibility 5032a33c354dSmrg # with the native linker. However, as the warning in the GNU ld 5033a33c354dSmrg # block says, versions before 2.19.5* couldn't really create working 5034a33c354dSmrg # shared libraries, regardless of the interface used. 5035a33c354dSmrg case `$LD -v 2>&1` in 5036a33c354dSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5037a33c354dSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5038a33c354dSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5039a33c354dSmrg *) 5040a33c354dSmrg lt_use_gnu_ld_interface=yes 5041a33c354dSmrg ;; 5042a33c354dSmrg esac 5043a33c354dSmrg ;; 5044a33c354dSmrg *) 5045a33c354dSmrg lt_use_gnu_ld_interface=yes 5046a33c354dSmrg ;; 5047a33c354dSmrg esac 5048a33c354dSmrg fi 5049a33c354dSmrg 5050a33c354dSmrg if test yes = "$lt_use_gnu_ld_interface"; then 5051a33c354dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5052a33c354dSmrg wlarc='$wl' 5053a33c354dSmrg 5054a33c354dSmrg # Set some defaults for GNU ld with shared library support. These 5055a33c354dSmrg # are reset later if shared libraries are not supported. Putting them 5056a33c354dSmrg # here allows them to be overridden if necessary. 5057a33c354dSmrg runpath_var=LD_RUN_PATH 5058a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5059a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5060a33c354dSmrg # ancient GNU ld didn't support --whole-archive et. al. 5061a33c354dSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5062a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5063a33c354dSmrg else 5064a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5065a33c354dSmrg fi 5066a33c354dSmrg supports_anon_versioning=no 5067a33c354dSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5068a33c354dSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5069a33c354dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5070a33c354dSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5071a33c354dSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5072a33c354dSmrg *\ 2.11.*) ;; # other 2.11 versions 5073a33c354dSmrg *) supports_anon_versioning=yes ;; 5074a33c354dSmrg esac 5075a33c354dSmrg 5076a33c354dSmrg # See if GNU ld supports shared libraries. 5077a33c354dSmrg case $host_os in 5078a33c354dSmrg aix[[3-9]]*) 5079a33c354dSmrg # On AIX/PPC, the GNU linker is very broken 5080a33c354dSmrg if test ia64 != "$host_cpu"; then 5081a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5082a33c354dSmrg cat <<_LT_EOF 1>&2 5083a33c354dSmrg 5084a33c354dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5085a33c354dSmrg*** to be unable to reliably create shared libraries on AIX. 5086a33c354dSmrg*** Therefore, libtool is disabling shared libraries support. If you 5087a33c354dSmrg*** really care for shared libraries, you may want to install binutils 5088a33c354dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5089a33c354dSmrg*** You will then need to restart the configuration process. 5090a33c354dSmrg 5091a33c354dSmrg_LT_EOF 5092a33c354dSmrg fi 5093a33c354dSmrg ;; 5094a33c354dSmrg 5095a33c354dSmrg amigaos*) 5096a33c354dSmrg case $host_cpu in 5097a33c354dSmrg powerpc) 5098a33c354dSmrg # see comment about AmigaOS4 .so support 5099a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5100a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5101a33c354dSmrg ;; 5102a33c354dSmrg m68k) 5103a33c354dSmrg _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)' 5104a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5105a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5106a33c354dSmrg ;; 5107a33c354dSmrg esac 5108a33c354dSmrg ;; 5109a33c354dSmrg 5110a33c354dSmrg beos*) 5111a33c354dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5112a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5113a33c354dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5114a33c354dSmrg # support --undefined. This deserves some investigation. FIXME 5115a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5116a33c354dSmrg else 5117a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5118a33c354dSmrg fi 5119a33c354dSmrg ;; 5120a33c354dSmrg 5121a33c354dSmrg cygwin* | mingw* | pw32* | cegcc*) 5122a33c354dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5123a33c354dSmrg # as there is no search path for DLLs. 5124a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5126a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5127a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5128a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5129a33c354dSmrg _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' 5130a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5131a33c354dSmrg 5132a33c354dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5133a33c354dSmrg _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' 5134a33c354dSmrg # If the export-symbols file already is a .def file, use it as 5135a33c354dSmrg # is; otherwise, prepend EXPORTS... 5136a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5137a33c354dSmrg cp $export_symbols $output_objdir/$soname.def; 5138a33c354dSmrg else 5139a33c354dSmrg echo EXPORTS > $output_objdir/$soname.def; 5140a33c354dSmrg cat $export_symbols >> $output_objdir/$soname.def; 5141a33c354dSmrg fi~ 5142a33c354dSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5143a33c354dSmrg else 5144a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5145a33c354dSmrg fi 5146a33c354dSmrg ;; 5147a33c354dSmrg 5148a33c354dSmrg haiku*) 5149a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5150a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5151a33c354dSmrg ;; 5152a33c354dSmrg 5153a33c354dSmrg os2*) 5154a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5155a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5156a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5157a33c354dSmrg shrext_cmds=.dll 5158a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5159a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5160a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5161a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5162a33c354dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5163a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5164a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 5165a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169a33c354dSmrg prefix_cmds="$SED"~ 5170a33c354dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5171a33c354dSmrg prefix_cmds="$prefix_cmds -e 1d"; 5172a33c354dSmrg fi~ 5173a33c354dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5174a33c354dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5175a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 5177a33c354dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5178a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5179a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5180a33c354dSmrg ;; 5181a33c354dSmrg 5182a33c354dSmrg interix[[3-9]]*) 5183a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5184a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5185a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5186a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5187a33c354dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5188a33c354dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5189a33c354dSmrg # default) and relocated if they conflict, which is a slow very memory 5190a33c354dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5191a33c354dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5192a33c354dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5193a33c354dSmrg _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' 5194a33c354dSmrg _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' 5195a33c354dSmrg ;; 5196a33c354dSmrg 5197a33c354dSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5198a33c354dSmrg tmp_diet=no 5199a33c354dSmrg if test linux-dietlibc = "$host_os"; then 5200a33c354dSmrg case $cc_basename in 5201a33c354dSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5202a33c354dSmrg esac 5203a33c354dSmrg fi 5204a33c354dSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5205a33c354dSmrg && test no = "$tmp_diet" 5206a33c354dSmrg then 5207a33c354dSmrg tmp_addflag=' $pic_flag' 5208a33c354dSmrg tmp_sharedflag='-shared' 5209a33c354dSmrg case $cc_basename,$host_cpu in 5210a33c354dSmrg pgcc*) # Portland Group C compiler 5211a33c354dSmrg _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' 5212a33c354dSmrg tmp_addflag=' $pic_flag' 5213a33c354dSmrg ;; 5214a33c354dSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5215a33c354dSmrg # Portland Group f77 and f90 compilers 5216a33c354dSmrg _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' 5217a33c354dSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5218a33c354dSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5219a33c354dSmrg tmp_addflag=' -i_dynamic' ;; 5220a33c354dSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5221a33c354dSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5222a33c354dSmrg ifc* | ifort*) # Intel Fortran compiler 5223a33c354dSmrg tmp_addflag=' -nofor_main' ;; 5224a33c354dSmrg lf95*) # Lahey Fortran 8.1 5225a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5226a33c354dSmrg tmp_sharedflag='--shared' ;; 5227a33c354dSmrg nagfor*) # NAGFOR 5.3 5228a33c354dSmrg tmp_sharedflag='-Wl,-shared' ;; 5229a33c354dSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5230a33c354dSmrg tmp_sharedflag='-qmkshrobj' 5231a33c354dSmrg tmp_addflag= ;; 5232a33c354dSmrg nvcc*) # Cuda Compiler Driver 2.2 5233a33c354dSmrg _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' 5234a33c354dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5235a33c354dSmrg ;; 5236a33c354dSmrg esac 5237a33c354dSmrg case `$CC -V 2>&1 | $SED 5q` in 5238a33c354dSmrg *Sun\ C*) # Sun C 5.9 5239a33c354dSmrg _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' 5240a33c354dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5241a33c354dSmrg tmp_sharedflag='-G' ;; 5242a33c354dSmrg *Sun\ F*) # Sun Fortran 8.3 5243a33c354dSmrg tmp_sharedflag='-G' ;; 5244a33c354dSmrg esac 5245a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5246a33c354dSmrg 5247a33c354dSmrg if test yes = "$supports_anon_versioning"; then 5248a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5249a33c354dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5250a33c354dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5251a33c354dSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5252a33c354dSmrg fi 5253a33c354dSmrg 5254a33c354dSmrg case $cc_basename in 5255a33c354dSmrg tcc*) 5256a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5257a33c354dSmrg ;; 5258a33c354dSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5259a33c354dSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5260a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5261a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5262a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5263a33c354dSmrg if test yes = "$supports_anon_versioning"; then 5264a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5265a33c354dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5266a33c354dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5267a33c354dSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5268a33c354dSmrg fi 5269a33c354dSmrg ;; 5270a33c354dSmrg esac 5271a33c354dSmrg else 5272a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5273a33c354dSmrg fi 5274a33c354dSmrg ;; 5275a33c354dSmrg 5276a33c354dSmrg netbsd*) 5277a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5278a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5279a33c354dSmrg wlarc= 5280a33c354dSmrg else 5281a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5282a33c354dSmrg _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' 5283a33c354dSmrg fi 5284a33c354dSmrg ;; 5285a33c354dSmrg 5286a33c354dSmrg solaris*) 5287a33c354dSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5288a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5289a33c354dSmrg cat <<_LT_EOF 1>&2 5290a33c354dSmrg 5291a33c354dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5292a33c354dSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5293a33c354dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5294a33c354dSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5295a33c354dSmrg*** your PATH or compiler configuration so that the native linker is 5296a33c354dSmrg*** used, and then restart. 5297a33c354dSmrg 5298a33c354dSmrg_LT_EOF 5299a33c354dSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5300a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5301a33c354dSmrg _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' 5302a33c354dSmrg else 5303a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5304a33c354dSmrg fi 5305a33c354dSmrg ;; 5306a33c354dSmrg 5307a33c354dSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5308a33c354dSmrg case `$LD -v 2>&1` in 5309a33c354dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5310a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5311a33c354dSmrg cat <<_LT_EOF 1>&2 5312a33c354dSmrg 5313a33c354dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5314a33c354dSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5315a33c354dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5316a33c354dSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5317a33c354dSmrg*** your PATH or compiler configuration so that the native linker is 5318a33c354dSmrg*** used, and then restart. 5319a33c354dSmrg 5320a33c354dSmrg_LT_EOF 5321a33c354dSmrg ;; 5322a33c354dSmrg *) 5323a33c354dSmrg # For security reasons, it is highly recommended that you always 5324a33c354dSmrg # use absolute paths for naming shared libraries, and exclude the 5325a33c354dSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5326a33c354dSmrg # requires that you compile everything twice, which is a pain. 5327a33c354dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5328a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5329a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5330a33c354dSmrg _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' 5331a33c354dSmrg else 5332a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5333a33c354dSmrg fi 5334a33c354dSmrg ;; 5335a33c354dSmrg esac 5336a33c354dSmrg ;; 5337a33c354dSmrg 5338a33c354dSmrg sunos4*) 5339a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5340a33c354dSmrg wlarc= 5341a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5342a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5343a33c354dSmrg ;; 5344a33c354dSmrg 5345a33c354dSmrg *) 5346a33c354dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5347a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5348a33c354dSmrg _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' 5349a33c354dSmrg else 5350a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5351a33c354dSmrg fi 5352a33c354dSmrg ;; 5353a33c354dSmrg esac 5354a33c354dSmrg 5355a33c354dSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5356a33c354dSmrg runpath_var= 5357a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5358a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5359a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5360a33c354dSmrg fi 5361a33c354dSmrg else 5362a33c354dSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5363a33c354dSmrg case $host_os in 5364a33c354dSmrg aix3*) 5365a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5366a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5367a33c354dSmrg _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' 5368a33c354dSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5369a33c354dSmrg # are no directories specified by -L. 5370a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5371a33c354dSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5372a33c354dSmrg # Neither direct hardcoding nor static linking is supported with a 5373a33c354dSmrg # broken collect2. 5374a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5375a33c354dSmrg fi 5376a33c354dSmrg ;; 5377a33c354dSmrg 5378a33c354dSmrg aix[[4-9]]*) 5379a33c354dSmrg if test ia64 = "$host_cpu"; then 5380a33c354dSmrg # On IA64, the linker does run time linking by default, so we don't 5381a33c354dSmrg # have to do anything special. 5382a33c354dSmrg aix_use_runtimelinking=no 5383a33c354dSmrg exp_sym_flag='-Bexport' 5384a33c354dSmrg no_entry_flag= 5385a33c354dSmrg else 5386a33c354dSmrg # If we're using GNU nm, then we don't want the "-C" option. 5387a33c354dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5388a33c354dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5389a33c354dSmrg # weak defined symbols like other global defined symbols, whereas 5390a33c354dSmrg # GNU nm marks them as "W". 5391a33c354dSmrg # While the 'weak' keyword is ignored in the Export File, we need 5392a33c354dSmrg # it in the Import File for the 'aix-soname' feature, so we have 5393a33c354dSmrg # to replace the "-B" option with "-P" for AIX nm. 5394a33c354dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5395a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5396a33c354dSmrg else 5397a33c354dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5398a33c354dSmrg fi 5399a33c354dSmrg aix_use_runtimelinking=no 5400a33c354dSmrg 5401a33c354dSmrg # Test if we are trying to use run time linking or normal 5402a33c354dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5403a33c354dSmrg # have runtime linking enabled, and use it for executables. 5404a33c354dSmrg # For shared libraries, we enable/disable runtime linking 5405a33c354dSmrg # depending on the kind of the shared library created - 5406a33c354dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5407a33c354dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5408a33c354dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5409a33c354dSmrg # lib.a static archive 5410a33c354dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5411a33c354dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5412a33c354dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5413a33c354dSmrg # lib.a(lib.so.V) shared, rtl:no 5414a33c354dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5415a33c354dSmrg # lib.a static archive 5416a33c354dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5417a33c354dSmrg for ld_flag in $LDFLAGS; do 5418a33c354dSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5419a33c354dSmrg aix_use_runtimelinking=yes 5420a33c354dSmrg break 5421a33c354dSmrg fi 5422a33c354dSmrg done 5423a33c354dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5424a33c354dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5425a33c354dSmrg # so we don't have lib.a shared libs to link our executables. 5426a33c354dSmrg # We have to force runtime linking in this case. 5427a33c354dSmrg aix_use_runtimelinking=yes 5428a33c354dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5429a33c354dSmrg fi 5430a33c354dSmrg ;; 5431a33c354dSmrg esac 5432a33c354dSmrg 5433a33c354dSmrg exp_sym_flag='-bexport' 5434a33c354dSmrg no_entry_flag='-bnoentry' 5435a33c354dSmrg fi 5436a33c354dSmrg 5437a33c354dSmrg # When large executables or shared objects are built, AIX ld can 5438a33c354dSmrg # have problems creating the table of contents. If linking a library 5439a33c354dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5440a33c354dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5441a33c354dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5442a33c354dSmrg 5443a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='' 5444a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5445a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5446a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5447a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5448a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5449a33c354dSmrg case $with_aix_soname,$aix_use_runtimelinking in 5450a33c354dSmrg aix,*) ;; # traditional, no import file 5451a33c354dSmrg svr4,* | *,yes) # use import file 5452a33c354dSmrg # The Import File defines what to hardcode. 5453a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5454a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5455a33c354dSmrg ;; 5456a33c354dSmrg esac 5457a33c354dSmrg 5458a33c354dSmrg if test yes = "$GCC"; then 5459a33c354dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5460a33c354dSmrg # We only want to do this on AIX 4.2 and lower, the check 5461a33c354dSmrg # below for broken collect2 doesn't work under 4.3+ 5462a33c354dSmrg collect2name=`$CC -print-prog-name=collect2` 5463a33c354dSmrg if test -f "$collect2name" && 5464a33c354dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5465a33c354dSmrg then 5466a33c354dSmrg # We have reworked collect2 5467a33c354dSmrg : 5468a33c354dSmrg else 5469a33c354dSmrg # We have old collect2 5470a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5471a33c354dSmrg # It fails to find uninstalled libraries when the uninstalled 5472a33c354dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5473a33c354dSmrg # to unsupported forces relinking 5474a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5475a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5476a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5477a33c354dSmrg fi 5478a33c354dSmrg ;; 5479a33c354dSmrg esac 5480a33c354dSmrg shared_flag='-shared' 5481a33c354dSmrg if test yes = "$aix_use_runtimelinking"; then 5482a33c354dSmrg shared_flag="$shared_flag "'$wl-G' 5483a33c354dSmrg fi 5484a33c354dSmrg # Need to ensure runtime linking is disabled for the traditional 5485a33c354dSmrg # shared library, or the linker may eventually find shared libraries 5486a33c354dSmrg # /with/ Import File - we do not want to mix them. 5487a33c354dSmrg shared_flag_aix='-shared' 5488a33c354dSmrg shared_flag_svr4='-shared $wl-G' 5489a33c354dSmrg else 5490a33c354dSmrg # not using gcc 5491a33c354dSmrg if test ia64 = "$host_cpu"; then 5492a33c354dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5493a33c354dSmrg # chokes on -Wl,-G. The following line is correct: 5494a33c354dSmrg shared_flag='-G' 5495a33c354dSmrg else 5496a33c354dSmrg if test yes = "$aix_use_runtimelinking"; then 5497a33c354dSmrg shared_flag='$wl-G' 5498a33c354dSmrg else 5499a33c354dSmrg shared_flag='$wl-bM:SRE' 5500a33c354dSmrg fi 5501a33c354dSmrg shared_flag_aix='$wl-bM:SRE' 5502a33c354dSmrg shared_flag_svr4='$wl-G' 5503a33c354dSmrg fi 5504a33c354dSmrg fi 5505a33c354dSmrg 5506a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5507a33c354dSmrg # It seems that -bexpall does not export symbols beginning with 5508a33c354dSmrg # underscore (_), so it is better to generate a list of symbols to export. 5509a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5510a33c354dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5511a33c354dSmrg # Warning - without using the other runtime loading flags (-brtl), 5512a33c354dSmrg # -berok will link without error, but may produce a broken library. 5513a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5514a33c354dSmrg # Determine the default libpath from the value encoded in an 5515a33c354dSmrg # empty executable. 5516a33c354dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5517a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5518a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 5519a33c354dSmrg else 5520a33c354dSmrg if test ia64 = "$host_cpu"; then 5521a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5522a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5523a33c354dSmrg _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" 5524a33c354dSmrg else 5525a33c354dSmrg # Determine the default libpath from the value encoded in an 5526a33c354dSmrg # empty executable. 5527a33c354dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5528a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5529a33c354dSmrg # Warning - without using the other run time loading flags, 5530a33c354dSmrg # -berok will link without error, but may produce a broken library. 5531a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5532a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5533a33c354dSmrg if test yes = "$with_gnu_ld"; then 5534a33c354dSmrg # We only use this code for GNU lds that support --whole-archive. 5535a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5536a33c354dSmrg else 5537a33c354dSmrg # Exported symbols can be pulled into shared objects from archives 5538a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5539a33c354dSmrg fi 5540a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5541a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5542a33c354dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5543a33c354dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5544a33c354dSmrg if test svr4 != "$with_aix_soname"; then 5545a33c354dSmrg # This is similar to how AIX traditionally builds its shared libraries. 5546a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5547a33c354dSmrg fi 5548a33c354dSmrg if test aix != "$with_aix_soname"; then 5549a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5550a33c354dSmrg else 5551a33c354dSmrg # used by -dlpreopen to get the symbols 5552a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5553a33c354dSmrg fi 5554a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5555a33c354dSmrg fi 5556a33c354dSmrg fi 5557a33c354dSmrg ;; 5558a33c354dSmrg 5559a33c354dSmrg amigaos*) 5560a33c354dSmrg case $host_cpu in 5561a33c354dSmrg powerpc) 5562a33c354dSmrg # see comment about AmigaOS4 .so support 5563a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5564a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5565a33c354dSmrg ;; 5566a33c354dSmrg m68k) 5567a33c354dSmrg _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)' 5568a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5569a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5570a33c354dSmrg ;; 5571a33c354dSmrg esac 5572a33c354dSmrg ;; 5573a33c354dSmrg 5574a33c354dSmrg bsdi[[45]]*) 5575a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5576a33c354dSmrg ;; 5577a33c354dSmrg 5578a33c354dSmrg cygwin* | mingw* | pw32* | cegcc*) 5579a33c354dSmrg # When not using gcc, we currently assume that we are using 5580a33c354dSmrg # Microsoft Visual C++ or Intel C++ Compiler. 5581a33c354dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5582a33c354dSmrg # no search path for DLLs. 5583a33c354dSmrg case $cc_basename in 5584a33c354dSmrg cl* | icl*) 5585a33c354dSmrg # Native MSVC or ICC 5586a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5587a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5588a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5589a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5590a33c354dSmrg # Tell ltmain to make .lib files, not .a files. 5591a33c354dSmrg libext=lib 5592a33c354dSmrg # Tell ltmain to make .dll files, not .so files. 5593a33c354dSmrg shrext_cmds=.dll 5594a33c354dSmrg # FIXME: Setting linknames here is a bad hack. 5595a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5596a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5597a33c354dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5598a33c354dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5599a33c354dSmrg else 5600a33c354dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5601a33c354dSmrg fi~ 5602a33c354dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5603a33c354dSmrg linknames=' 5604a33c354dSmrg # The linker will not automatically build a static lib if we build a DLL. 5605a33c354dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5606a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5607a33c354dSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5608a33c354dSmrg _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' 5609a33c354dSmrg # Don't use ranlib 5610a33c354dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5611a33c354dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5612a33c354dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5613a33c354dSmrg case $lt_outputfile in 5614a33c354dSmrg *.exe|*.EXE) ;; 5615a33c354dSmrg *) 5616a33c354dSmrg lt_outputfile=$lt_outputfile.exe 5617a33c354dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5618a33c354dSmrg ;; 5619a33c354dSmrg esac~ 5620a33c354dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5621a33c354dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5622a33c354dSmrg $RM "$lt_outputfile.manifest"; 5623a33c354dSmrg fi' 5624a33c354dSmrg ;; 5625a33c354dSmrg *) 5626a33c354dSmrg # Assume MSVC and ICC wrapper 5627a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5628a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5629a33c354dSmrg # Tell ltmain to make .lib files, not .a files. 5630a33c354dSmrg libext=lib 5631a33c354dSmrg # Tell ltmain to make .dll files, not .so files. 5632a33c354dSmrg shrext_cmds=.dll 5633a33c354dSmrg # FIXME: Setting linknames here is a bad hack. 5634a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5635a33c354dSmrg # The linker will automatically build a .lib file if we build a DLL. 5636a33c354dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5637a33c354dSmrg # FIXME: Should let the user specify the lib program. 5638a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5639a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5640a33c354dSmrg ;; 5641a33c354dSmrg esac 5642a33c354dSmrg ;; 5643a33c354dSmrg 5644a33c354dSmrg darwin* | rhapsody*) 5645a33c354dSmrg _LT_DARWIN_LINKER_FEATURES($1) 5646a33c354dSmrg ;; 5647a33c354dSmrg 5648a33c354dSmrg dgux*) 5649a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5650a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5651a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5652a33c354dSmrg ;; 5653a33c354dSmrg 5654a33c354dSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5655a33c354dSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5656a33c354dSmrg # does not break anything, and helps significantly (at the cost of a little 5657a33c354dSmrg # extra space). 5658a33c354dSmrg freebsd2.2*) 5659a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5660a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5661a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5662a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663a33c354dSmrg ;; 5664a33c354dSmrg 5665a33c354dSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5666a33c354dSmrg freebsd2.*) 5667a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5668a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5669a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5670a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5671a33c354dSmrg ;; 5672a33c354dSmrg 5673a33c354dSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5674a33c354dSmrg freebsd* | dragonfly* | midnightbsd*) 5675a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5676a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5677a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5678a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5679a33c354dSmrg ;; 5680a33c354dSmrg 5681a33c354dSmrg hpux9*) 5682a33c354dSmrg if test yes = "$GCC"; then 5683a33c354dSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5684a33c354dSmrg else 5685a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5686a33c354dSmrg fi 5687a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5688a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5689a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5690a33c354dSmrg 5691a33c354dSmrg # hardcode_minus_L: Not really in the search PATH, 5692a33c354dSmrg # but as the default location of the library. 5693a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5694a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5695a33c354dSmrg ;; 5696a33c354dSmrg 5697a33c354dSmrg hpux10*) 5698a33c354dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5699a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5700a33c354dSmrg else 5701a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5702a33c354dSmrg fi 5703a33c354dSmrg if test no = "$with_gnu_ld"; then 5704a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5705a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5706a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5708a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5709a33c354dSmrg # hardcode_minus_L: Not really in the search PATH, 5710a33c354dSmrg # but as the default location of the library. 5711a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5712a33c354dSmrg fi 5713a33c354dSmrg ;; 5714a33c354dSmrg 5715a33c354dSmrg hpux11*) 5716a33c354dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5717a33c354dSmrg case $host_cpu in 5718a33c354dSmrg hppa*64*) 5719a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5720a33c354dSmrg ;; 5721a33c354dSmrg ia64*) 5722a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5723a33c354dSmrg ;; 5724a33c354dSmrg *) 5725a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5726a33c354dSmrg ;; 5727a33c354dSmrg esac 5728a33c354dSmrg else 5729a33c354dSmrg case $host_cpu in 5730a33c354dSmrg hppa*64*) 5731a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5732a33c354dSmrg ;; 5733a33c354dSmrg ia64*) 5734a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5735a33c354dSmrg ;; 5736a33c354dSmrg *) 5737a33c354dSmrg m4_if($1, [], [ 5738a33c354dSmrg # Older versions of the 11.00 compiler do not understand -b yet 5739a33c354dSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5740a33c354dSmrg _LT_LINKER_OPTION([if $CC understands -b], 5741a33c354dSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5742a33c354dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5743a33c354dSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5744a33c354dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5745a33c354dSmrg ;; 5746a33c354dSmrg esac 5747a33c354dSmrg fi 5748a33c354dSmrg if test no = "$with_gnu_ld"; then 5749a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5750a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5751a33c354dSmrg 5752a33c354dSmrg case $host_cpu in 5753a33c354dSmrg hppa*64*|ia64*) 5754a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5755a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756a33c354dSmrg ;; 5757a33c354dSmrg *) 5758a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5761a33c354dSmrg 5762a33c354dSmrg # hardcode_minus_L: Not really in the search PATH, 5763a33c354dSmrg # but as the default location of the library. 5764a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5765a33c354dSmrg ;; 5766a33c354dSmrg esac 5767a33c354dSmrg fi 5768a33c354dSmrg ;; 5769a33c354dSmrg 5770a33c354dSmrg irix5* | irix6* | nonstopux*) 5771a33c354dSmrg if test yes = "$GCC"; then 5772a33c354dSmrg _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' 5773a33c354dSmrg # Try to use the -exported_symbol ld option, if it does not 5774a33c354dSmrg # work, assume that -exports_file does not work either and 5775a33c354dSmrg # implicitly export all symbols. 5776a33c354dSmrg # This should be the same for all languages, so no per-tag cache variable. 5777a33c354dSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5778a33c354dSmrg [lt_cv_irix_exported_symbol], 5779a33c354dSmrg [save_LDFLAGS=$LDFLAGS 5780a33c354dSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5781a33c354dSmrg AC_LINK_IFELSE( 5782a33c354dSmrg [AC_LANG_SOURCE( 5783a33c354dSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5784a33c354dSmrg [C++], [[int foo (void) { return 0; }]], 5785a33c354dSmrg [Fortran 77], [[ 5786a33c354dSmrg subroutine foo 5787a33c354dSmrg end]], 5788a33c354dSmrg [Fortran], [[ 5789a33c354dSmrg subroutine foo 5790a33c354dSmrg end]])])], 5791a33c354dSmrg [lt_cv_irix_exported_symbol=yes], 5792a33c354dSmrg [lt_cv_irix_exported_symbol=no]) 5793a33c354dSmrg LDFLAGS=$save_LDFLAGS]) 5794a33c354dSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5795a33c354dSmrg _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' 5796a33c354dSmrg fi 5797a33c354dSmrg else 5798a33c354dSmrg _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' 5799a33c354dSmrg _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' 5800a33c354dSmrg fi 5801a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5802a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5803a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5804a33c354dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5805a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5806a33c354dSmrg ;; 5807a33c354dSmrg 5808a33c354dSmrg linux*) 5809a33c354dSmrg case $cc_basename in 5810a33c354dSmrg tcc*) 5811a33c354dSmrg # Fabrice Bellard et al's Tiny C Compiler 5812a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5813a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5814a33c354dSmrg ;; 5815a33c354dSmrg esac 5816a33c354dSmrg ;; 5817a33c354dSmrg 5818a33c354dSmrg netbsd*) 5819a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5820a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5821a33c354dSmrg else 5822a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5823a33c354dSmrg fi 5824a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5825a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5826a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5827a33c354dSmrg ;; 5828a33c354dSmrg 5829a33c354dSmrg newsos6) 5830a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5831a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5832a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5833a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5834a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5835a33c354dSmrg ;; 5836a33c354dSmrg 5837a33c354dSmrg *nto* | *qnx*) 5838a33c354dSmrg ;; 5839a33c354dSmrg 5840a33c354dSmrg openbsd* | bitrig*) 5841a33c354dSmrg if test -f /usr/libexec/ld.so; then 5842a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5843a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5844a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5845a33c354dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5846a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5847a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5848a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5849a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5850a33c354dSmrg else 5851a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5852a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5853a33c354dSmrg fi 5854a33c354dSmrg else 5855a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5856a33c354dSmrg fi 5857a33c354dSmrg ;; 5858a33c354dSmrg 5859a33c354dSmrg os2*) 5860a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5861a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5862a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5863a33c354dSmrg shrext_cmds=.dll 5864a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5865a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5866a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5867a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5868a33c354dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5869a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5870a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 5871a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5872a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5873a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5874a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5875a33c354dSmrg prefix_cmds="$SED"~ 5876a33c354dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5877a33c354dSmrg prefix_cmds="$prefix_cmds -e 1d"; 5878a33c354dSmrg fi~ 5879a33c354dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5880a33c354dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5881a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5882a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 5883a33c354dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5884a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5885a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5886a33c354dSmrg ;; 5887a33c354dSmrg 5888a33c354dSmrg osf3*) 5889a33c354dSmrg if test yes = "$GCC"; then 5890a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5891a33c354dSmrg _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' 5892a33c354dSmrg else 5893a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5894a33c354dSmrg _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' 5895a33c354dSmrg fi 5896a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5897a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5898a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5899a33c354dSmrg ;; 5900a33c354dSmrg 5901a33c354dSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5902a33c354dSmrg if test yes = "$GCC"; then 5903a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5904a33c354dSmrg _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' 5905a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5906a33c354dSmrg else 5907a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5908a33c354dSmrg _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' 5909a33c354dSmrg _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~ 5910a33c354dSmrg $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' 5911a33c354dSmrg 5912a33c354dSmrg # Both c and cxx compiler support -rpath directly 5913a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5914a33c354dSmrg fi 5915a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5916a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5917a33c354dSmrg ;; 5918a33c354dSmrg 5919a33c354dSmrg solaris*) 5920a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5921a33c354dSmrg if test yes = "$GCC"; then 5922a33c354dSmrg wlarc='$wl' 5923a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5924a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5925a33c354dSmrg $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' 5926a33c354dSmrg else 5927a33c354dSmrg case `$CC -V 2>&1` in 5928a33c354dSmrg *"Compilers 5.0"*) 5929a33c354dSmrg wlarc='' 5930a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5931a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5932a33c354dSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5933a33c354dSmrg ;; 5934a33c354dSmrg *) 5935a33c354dSmrg wlarc='$wl' 5936a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5937a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5938a33c354dSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5939a33c354dSmrg ;; 5940a33c354dSmrg esac 5941a33c354dSmrg fi 5942a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5943a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5944a33c354dSmrg case $host_os in 5945a33c354dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5946a33c354dSmrg *) 5947a33c354dSmrg # The compiler driver will combine and reorder linker options, 5948a33c354dSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5949a33c354dSmrg # but is careful enough not to reorder. 5950a33c354dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5951a33c354dSmrg if test yes = "$GCC"; then 5952a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5953a33c354dSmrg else 5954a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5955a33c354dSmrg fi 5956a33c354dSmrg ;; 5957a33c354dSmrg esac 5958a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5959a33c354dSmrg ;; 5960a33c354dSmrg 5961a33c354dSmrg sunos4*) 5962a33c354dSmrg if test sequent = "$host_vendor"; then 5963a33c354dSmrg # Use $CC to link under sequent, because it throws in some extra .o 5964a33c354dSmrg # files that make .init and .fini sections work. 5965a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5966a33c354dSmrg else 5967a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5968a33c354dSmrg fi 5969a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5970a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5971a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5972a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5973a33c354dSmrg ;; 5974a33c354dSmrg 5975a33c354dSmrg sysv4) 5976a33c354dSmrg case $host_vendor in 5977a33c354dSmrg sni) 5978a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5979a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5980a33c354dSmrg ;; 5981a33c354dSmrg siemens) 5982a33c354dSmrg ## LD is ld it makes a PLAMLIB 5983a33c354dSmrg ## CC just makes a GrossModule. 5984a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5985a33c354dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5986a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5987a33c354dSmrg ;; 5988a33c354dSmrg motorola) 5989a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5990a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5991a33c354dSmrg ;; 5992a33c354dSmrg esac 5993a33c354dSmrg runpath_var='LD_RUN_PATH' 5994a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5995a33c354dSmrg ;; 5996a33c354dSmrg 5997a33c354dSmrg sysv4.3*) 5998a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5999a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6001a33c354dSmrg ;; 6002a33c354dSmrg 6003a33c354dSmrg sysv4*MP*) 6004a33c354dSmrg if test -d /usr/nec; then 6005a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6006a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6007a33c354dSmrg runpath_var=LD_RUN_PATH 6008a33c354dSmrg hardcode_runpath_var=yes 6009a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6010a33c354dSmrg fi 6011a33c354dSmrg ;; 6012a33c354dSmrg 6013a33c354dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6014a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6015a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6016a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017a33c354dSmrg runpath_var='LD_RUN_PATH' 6018a33c354dSmrg 6019a33c354dSmrg if test yes = "$GCC"; then 6020a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6021a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6022a33c354dSmrg else 6023a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6024a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025a33c354dSmrg fi 6026a33c354dSmrg ;; 6027a33c354dSmrg 6028a33c354dSmrg sysv5* | sco3.2v5* | sco5v6*) 6029a33c354dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 6030a33c354dSmrg # link with -lc, and that would cause any symbols used from libc to 6031a33c354dSmrg # always be unresolved, which means just about no library would 6032a33c354dSmrg # ever link correctly. If we're not using GNU ld we use -z text 6033a33c354dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6034a33c354dSmrg # as -z defs. 6035a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6036a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6037a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6038a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6039a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6040a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6041a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6042a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6043a33c354dSmrg runpath_var='LD_RUN_PATH' 6044a33c354dSmrg 6045a33c354dSmrg if test yes = "$GCC"; then 6046a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6047a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6048a33c354dSmrg else 6049a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6050a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6051a33c354dSmrg fi 6052a33c354dSmrg ;; 6053a33c354dSmrg 6054a33c354dSmrg uts4*) 6055a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6056a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6057a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6058a33c354dSmrg ;; 6059a33c354dSmrg 6060a33c354dSmrg *) 6061a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6062a33c354dSmrg ;; 6063a33c354dSmrg esac 6064a33c354dSmrg 6065a33c354dSmrg if test sni = "$host_vendor"; then 6066a33c354dSmrg case $host in 6067a33c354dSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6068a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6069a33c354dSmrg ;; 6070a33c354dSmrg esac 6071a33c354dSmrg fi 6072a33c354dSmrg fi 6073a33c354dSmrg]) 6074a33c354dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6075a33c354dSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6076a33c354dSmrg 6077a33c354dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6078a33c354dSmrg 6079a33c354dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6080a33c354dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6081a33c354dSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6082a33c354dSmrg [The commands to extract the exported symbol list from a shared archive]) 6083a33c354dSmrg 6084a33c354dSmrg# 6085a33c354dSmrg# Do we need to explicitly link libc? 6086a33c354dSmrg# 6087a33c354dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6088a33c354dSmrgx|xyes) 6089a33c354dSmrg # Assume -lc should be added 6090a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6091a33c354dSmrg 6092a33c354dSmrg if test yes,yes = "$GCC,$enable_shared"; then 6093a33c354dSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6094a33c354dSmrg *'~'*) 6095a33c354dSmrg # FIXME: we may have to deal with multi-command sequences. 6096a33c354dSmrg ;; 6097a33c354dSmrg '$CC '*) 6098a33c354dSmrg # Test whether the compiler implicitly links with -lc since on some 6099a33c354dSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6100a33c354dSmrg # to ld, don't add -lc before -lgcc. 6101a33c354dSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6102a33c354dSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6103a33c354dSmrg [$RM conftest* 6104a33c354dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6105a33c354dSmrg 6106a33c354dSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6107a33c354dSmrg soname=conftest 6108a33c354dSmrg lib=conftest 6109a33c354dSmrg libobjs=conftest.$ac_objext 6110a33c354dSmrg deplibs= 6111a33c354dSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6112a33c354dSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6113a33c354dSmrg compiler_flags=-v 6114a33c354dSmrg linker_flags=-v 6115a33c354dSmrg verstring= 6116a33c354dSmrg output_objdir=. 6117a33c354dSmrg libname=conftest 6118a33c354dSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6119a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6120a33c354dSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6121a33c354dSmrg then 6122a33c354dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6123a33c354dSmrg else 6124a33c354dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6125a33c354dSmrg fi 6126a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6127a33c354dSmrg else 6128a33c354dSmrg cat conftest.err 1>&5 6129a33c354dSmrg fi 6130a33c354dSmrg $RM conftest* 6131a33c354dSmrg ]) 6132a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6133a33c354dSmrg ;; 6134a33c354dSmrg esac 6135a33c354dSmrg fi 6136a33c354dSmrg ;; 6137a33c354dSmrgesac 6138a33c354dSmrg 6139a33c354dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6140a33c354dSmrg [Whether or not to add -lc for building shared libraries]) 6141a33c354dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6142a33c354dSmrg [enable_shared_with_static_runtimes], [0], 6143a33c354dSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6144a33c354dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6145a33c354dSmrg [Compiler flag to allow reflexive dlopens]) 6146a33c354dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6147a33c354dSmrg [Compiler flag to generate shared objects directly from archives]) 6148a33c354dSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6149a33c354dSmrg [Whether the compiler copes with passing no objects directly]) 6150a33c354dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6151a33c354dSmrg [Create an old-style archive from a shared archive]) 6152a33c354dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6153a33c354dSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6154a33c354dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6155a33c354dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6156a33c354dSmrg_LT_TAGDECL([], [module_cmds], [2], 6157a33c354dSmrg [Commands used to build a loadable module if different from building 6158a33c354dSmrg a shared archive.]) 6159a33c354dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6160a33c354dSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6161a33c354dSmrg [Whether we are building with GNU ld or not]) 6162a33c354dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6163a33c354dSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6164a33c354dSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6165a33c354dSmrg [Flag that enforces no undefined symbols]) 6166a33c354dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6167a33c354dSmrg [Flag to hardcode $libdir into a binary during linking. 6168a33c354dSmrg This must work even if $libdir does not exist]) 6169a33c354dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6170a33c354dSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6171a33c354dSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6172a33c354dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6173a33c354dSmrg DIR into the resulting binary]) 6174a33c354dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6175a33c354dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6176a33c354dSmrg DIR into the resulting binary and the resulting library dependency is 6177a33c354dSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6178a33c354dSmrg library is relocated]) 6179a33c354dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6180a33c354dSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6181a33c354dSmrg into the resulting binary]) 6182a33c354dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6183a33c354dSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6184a33c354dSmrg into the resulting binary]) 6185a33c354dSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6186a33c354dSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6187a33c354dSmrg into the library and all subsequent libraries and executables linked 6188a33c354dSmrg against it]) 6189a33c354dSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6190a33c354dSmrg [Set to yes if linker adds runtime paths of dependent libraries 6191a33c354dSmrg to runtime path list]) 6192a33c354dSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6193a33c354dSmrg [Whether libtool must link a program against all its dependency libraries]) 6194a33c354dSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6195a33c354dSmrg [Set to "yes" if exported symbols are required]) 6196a33c354dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6197a33c354dSmrg [The commands to list exported symbols]) 6198a33c354dSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6199a33c354dSmrg [Symbols that should not be listed in the preloaded symbols]) 6200a33c354dSmrg_LT_TAGDECL([], [include_expsyms], [1], 6201a33c354dSmrg [Symbols that must always be exported]) 6202a33c354dSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6203a33c354dSmrg [Commands necessary for linking programs (against libraries) with templates]) 6204a33c354dSmrg_LT_TAGDECL([], [postlink_cmds], [2], 6205a33c354dSmrg [Commands necessary for finishing linking programs]) 6206a33c354dSmrg_LT_TAGDECL([], [file_list_spec], [1], 6207a33c354dSmrg [Specify filename containing input files]) 6208a33c354dSmrgdnl FIXME: Not yet implemented 6209a33c354dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6210a33c354dSmrgdnl [Compiler flag to generate thread safe objects]) 6211a33c354dSmrg])# _LT_LINKER_SHLIBS 6212a33c354dSmrg 6213a33c354dSmrg 6214a33c354dSmrg# _LT_LANG_C_CONFIG([TAG]) 6215a33c354dSmrg# ------------------------ 6216a33c354dSmrg# Ensure that the configuration variables for a C compiler are suitably 6217a33c354dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6218a33c354dSmrg# the compiler configuration to 'libtool'. 6219a33c354dSmrgm4_defun([_LT_LANG_C_CONFIG], 6220a33c354dSmrg[m4_require([_LT_DECL_EGREP])dnl 6221a33c354dSmrglt_save_CC=$CC 6222a33c354dSmrgAC_LANG_PUSH(C) 6223a33c354dSmrg 6224a33c354dSmrg# Source file extension for C test sources. 6225a33c354dSmrgac_ext=c 6226a33c354dSmrg 6227a33c354dSmrg# Object file extension for compiled C test sources. 6228a33c354dSmrgobjext=o 6229a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 6230a33c354dSmrg 6231a33c354dSmrg# Code to be used in simple compile tests 6232a33c354dSmrglt_simple_compile_test_code="int some_variable = 0;" 6233a33c354dSmrg 6234a33c354dSmrg# Code to be used in simple link tests 6235a33c354dSmrglt_simple_link_test_code='int main(){return(0);}' 6236a33c354dSmrg 6237a33c354dSmrg_LT_TAG_COMPILER 6238a33c354dSmrg# Save the default compiler, since it gets overwritten when the other 6239a33c354dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6240a33c354dSmrgcompiler_DEFAULT=$CC 6241a33c354dSmrg 6242a33c354dSmrg# save warnings/boilerplate of simple test code 6243a33c354dSmrg_LT_COMPILER_BOILERPLATE 6244a33c354dSmrg_LT_LINKER_BOILERPLATE 6245a33c354dSmrg 6246a33c354dSmrg## CAVEAT EMPTOR: 6247a33c354dSmrg## There is no encapsulation within the following macros, do not change 6248a33c354dSmrg## the running order or otherwise move them around unless you know exactly 6249a33c354dSmrg## what you are doing... 6250a33c354dSmrgif test -n "$compiler"; then 6251a33c354dSmrg _LT_COMPILER_NO_RTTI($1) 6252a33c354dSmrg _LT_COMPILER_PIC($1) 6253a33c354dSmrg _LT_COMPILER_C_O($1) 6254a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 6255a33c354dSmrg _LT_LINKER_SHLIBS($1) 6256a33c354dSmrg _LT_SYS_DYNAMIC_LINKER($1) 6257a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6258a33c354dSmrg LT_SYS_DLOPEN_SELF 6259a33c354dSmrg _LT_CMD_STRIPLIB 6260a33c354dSmrg 6261a33c354dSmrg # Report what library types will actually be built 6262a33c354dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6263a33c354dSmrg AC_MSG_RESULT([$can_build_shared]) 6264a33c354dSmrg 6265a33c354dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6266a33c354dSmrg test no = "$can_build_shared" && enable_shared=no 6267a33c354dSmrg 6268a33c354dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6269a33c354dSmrg # are all built from PIC. 6270a33c354dSmrg case $host_os in 6271a33c354dSmrg aix3*) 6272a33c354dSmrg test yes = "$enable_shared" && enable_static=no 6273a33c354dSmrg if test -n "$RANLIB"; then 6274a33c354dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6275a33c354dSmrg postinstall_cmds='$RANLIB $lib' 6276a33c354dSmrg fi 6277a33c354dSmrg ;; 6278a33c354dSmrg 6279a33c354dSmrg aix[[4-9]]*) 6280a33c354dSmrg if test ia64 != "$host_cpu"; then 6281a33c354dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6282a33c354dSmrg yes,aix,yes) ;; # shared object as lib.so file only 6283a33c354dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6284a33c354dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6285a33c354dSmrg esac 6286a33c354dSmrg fi 6287a33c354dSmrg ;; 6288a33c354dSmrg esac 6289a33c354dSmrg AC_MSG_RESULT([$enable_shared]) 6290a33c354dSmrg 6291a33c354dSmrg AC_MSG_CHECKING([whether to build static libraries]) 6292a33c354dSmrg # Make sure either enable_shared or enable_static is yes. 6293a33c354dSmrg test yes = "$enable_shared" || enable_static=yes 6294a33c354dSmrg AC_MSG_RESULT([$enable_static]) 6295a33c354dSmrg 6296a33c354dSmrg _LT_CONFIG($1) 6297a33c354dSmrgfi 6298a33c354dSmrgAC_LANG_POP 6299a33c354dSmrgCC=$lt_save_CC 6300a33c354dSmrg])# _LT_LANG_C_CONFIG 6301a33c354dSmrg 6302a33c354dSmrg 6303a33c354dSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6304a33c354dSmrg# -------------------------- 6305a33c354dSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6306a33c354dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6307a33c354dSmrg# the compiler configuration to 'libtool'. 6308a33c354dSmrgm4_defun([_LT_LANG_CXX_CONFIG], 6309a33c354dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6310a33c354dSmrgm4_require([_LT_DECL_EGREP])dnl 6311a33c354dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6312a33c354dSmrgif test -n "$CXX" && ( test no != "$CXX" && 6313a33c354dSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6314a33c354dSmrg (test g++ != "$CXX"))); then 6315a33c354dSmrg AC_PROG_CXXCPP 6316a33c354dSmrgelse 6317a33c354dSmrg _lt_caught_CXX_error=yes 6318a33c354dSmrgfi 6319a33c354dSmrg 6320a33c354dSmrgAC_LANG_PUSH(C++) 6321a33c354dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6322a33c354dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6323a33c354dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6324a33c354dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6325a33c354dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6326a33c354dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6327a33c354dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6328a33c354dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6329a33c354dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6330a33c354dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6331a33c354dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6332a33c354dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6333a33c354dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6334a33c354dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6335a33c354dSmrg_LT_TAGVAR(module_cmds, $1)= 6336a33c354dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6337a33c354dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6338a33c354dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6339a33c354dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6340a33c354dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6341a33c354dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6342a33c354dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6343a33c354dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6344a33c354dSmrg 6345a33c354dSmrg# Source file extension for C++ test sources. 6346a33c354dSmrgac_ext=cpp 6347a33c354dSmrg 6348a33c354dSmrg# Object file extension for compiled C++ test sources. 6349a33c354dSmrgobjext=o 6350a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 6351a33c354dSmrg 6352a33c354dSmrg# No sense in running all these tests if we already determined that 6353a33c354dSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6354a33c354dSmrg# are currently assumed to apply to all compilers on this platform, 6355a33c354dSmrg# and will be corrupted by setting them based on a non-working compiler. 6356a33c354dSmrgif test yes != "$_lt_caught_CXX_error"; then 6357a33c354dSmrg # Code to be used in simple compile tests 6358a33c354dSmrg lt_simple_compile_test_code="int some_variable = 0;" 6359a33c354dSmrg 6360a33c354dSmrg # Code to be used in simple link tests 6361a33c354dSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6362a33c354dSmrg 6363a33c354dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6364a33c354dSmrg _LT_TAG_COMPILER 6365a33c354dSmrg 6366a33c354dSmrg # save warnings/boilerplate of simple test code 6367a33c354dSmrg _LT_COMPILER_BOILERPLATE 6368a33c354dSmrg _LT_LINKER_BOILERPLATE 6369a33c354dSmrg 6370a33c354dSmrg # Allow CC to be a program name with arguments. 6371a33c354dSmrg lt_save_CC=$CC 6372a33c354dSmrg lt_save_CFLAGS=$CFLAGS 6373a33c354dSmrg lt_save_LD=$LD 6374a33c354dSmrg lt_save_GCC=$GCC 6375a33c354dSmrg GCC=$GXX 6376a33c354dSmrg lt_save_with_gnu_ld=$with_gnu_ld 6377a33c354dSmrg lt_save_path_LD=$lt_cv_path_LD 6378a33c354dSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6379a33c354dSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6380a33c354dSmrg else 6381a33c354dSmrg $as_unset lt_cv_prog_gnu_ld 6382a33c354dSmrg fi 6383a33c354dSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 6384a33c354dSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 6385a33c354dSmrg else 6386a33c354dSmrg $as_unset lt_cv_path_LD 6387a33c354dSmrg fi 6388a33c354dSmrg test -z "${LDCXX+set}" || LD=$LDCXX 6389a33c354dSmrg CC=${CXX-"c++"} 6390a33c354dSmrg CFLAGS=$CXXFLAGS 6391a33c354dSmrg compiler=$CC 6392a33c354dSmrg _LT_TAGVAR(compiler, $1)=$CC 6393a33c354dSmrg _LT_CC_BASENAME([$compiler]) 6394a33c354dSmrg 6395a33c354dSmrg if test -n "$compiler"; then 6396a33c354dSmrg # We don't want -fno-exception when compiling C++ code, so set the 6397a33c354dSmrg # no_builtin_flag separately 6398a33c354dSmrg if test yes = "$GXX"; then 6399a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6400a33c354dSmrg else 6401a33c354dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6402a33c354dSmrg fi 6403a33c354dSmrg 6404a33c354dSmrg if test yes = "$GXX"; then 6405a33c354dSmrg # Set up default GNU C++ configuration 6406a33c354dSmrg 6407a33c354dSmrg LT_PATH_LD 6408a33c354dSmrg 6409a33c354dSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6410a33c354dSmrg # archiving commands below assume that GNU ld is being used. 6411a33c354dSmrg if test yes = "$with_gnu_ld"; then 6412a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6413a33c354dSmrg _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' 6414a33c354dSmrg 6415a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6416a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6417a33c354dSmrg 6418a33c354dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6419a33c354dSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6420a33c354dSmrg # investigate it a little bit more. (MM) 6421a33c354dSmrg wlarc='$wl' 6422a33c354dSmrg 6423a33c354dSmrg # ancient GNU ld didn't support --whole-archive et. al. 6424a33c354dSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6425a33c354dSmrg $GREP 'no-whole-archive' > /dev/null; then 6426a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6427a33c354dSmrg else 6428a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6429a33c354dSmrg fi 6430a33c354dSmrg else 6431a33c354dSmrg with_gnu_ld=no 6432a33c354dSmrg wlarc= 6433a33c354dSmrg 6434a33c354dSmrg # A generic and very simple default shared library creation 6435a33c354dSmrg # command for GNU C++ for the case where it uses the native 6436a33c354dSmrg # linker, instead of GNU ld. If possible, this setting should 6437a33c354dSmrg # overridden to take advantage of the native linker features on 6438a33c354dSmrg # the platform it is being used on. 6439a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6440a33c354dSmrg fi 6441a33c354dSmrg 6442a33c354dSmrg # Commands to make compiler produce verbose output that lists 6443a33c354dSmrg # what "hidden" libraries, object files and flags are used when 6444a33c354dSmrg # linking a shared library. 6445a33c354dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6446a33c354dSmrg 6447a33c354dSmrg else 6448a33c354dSmrg GXX=no 6449a33c354dSmrg with_gnu_ld=no 6450a33c354dSmrg wlarc= 6451a33c354dSmrg fi 6452a33c354dSmrg 6453a33c354dSmrg # PORTME: fill in a description of your system's C++ link characteristics 6454a33c354dSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6455a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6456a33c354dSmrg case $host_os in 6457a33c354dSmrg aix3*) 6458a33c354dSmrg # FIXME: insert proper C++ library support 6459a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6460a33c354dSmrg ;; 6461a33c354dSmrg aix[[4-9]]*) 6462a33c354dSmrg if test ia64 = "$host_cpu"; then 6463a33c354dSmrg # On IA64, the linker does run time linking by default, so we don't 6464a33c354dSmrg # have to do anything special. 6465a33c354dSmrg aix_use_runtimelinking=no 6466a33c354dSmrg exp_sym_flag='-Bexport' 6467a33c354dSmrg no_entry_flag= 6468a33c354dSmrg else 6469a33c354dSmrg aix_use_runtimelinking=no 6470a33c354dSmrg 6471a33c354dSmrg # Test if we are trying to use run time linking or normal 6472a33c354dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6473a33c354dSmrg # have runtime linking enabled, and use it for executables. 6474a33c354dSmrg # For shared libraries, we enable/disable runtime linking 6475a33c354dSmrg # depending on the kind of the shared library created - 6476a33c354dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6477a33c354dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6478a33c354dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6479a33c354dSmrg # lib.a static archive 6480a33c354dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6481a33c354dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6482a33c354dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6483a33c354dSmrg # lib.a(lib.so.V) shared, rtl:no 6484a33c354dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6485a33c354dSmrg # lib.a static archive 6486a33c354dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6487a33c354dSmrg for ld_flag in $LDFLAGS; do 6488a33c354dSmrg case $ld_flag in 6489a33c354dSmrg *-brtl*) 6490a33c354dSmrg aix_use_runtimelinking=yes 6491a33c354dSmrg break 6492a33c354dSmrg ;; 6493a33c354dSmrg esac 6494a33c354dSmrg done 6495a33c354dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6496a33c354dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6497a33c354dSmrg # so we don't have lib.a shared libs to link our executables. 6498a33c354dSmrg # We have to force runtime linking in this case. 6499a33c354dSmrg aix_use_runtimelinking=yes 6500a33c354dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6501a33c354dSmrg fi 6502a33c354dSmrg ;; 6503a33c354dSmrg esac 6504a33c354dSmrg 6505a33c354dSmrg exp_sym_flag='-bexport' 6506a33c354dSmrg no_entry_flag='-bnoentry' 6507a33c354dSmrg fi 6508a33c354dSmrg 6509a33c354dSmrg # When large executables or shared objects are built, AIX ld can 6510a33c354dSmrg # have problems creating the table of contents. If linking a library 6511a33c354dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6512a33c354dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6513a33c354dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6514a33c354dSmrg 6515a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='' 6516a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6517a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6518a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6519a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6520a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6521a33c354dSmrg case $with_aix_soname,$aix_use_runtimelinking in 6522a33c354dSmrg aix,*) ;; # no import file 6523a33c354dSmrg svr4,* | *,yes) # use import file 6524a33c354dSmrg # The Import File defines what to hardcode. 6525a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6526a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6527a33c354dSmrg ;; 6528a33c354dSmrg esac 6529a33c354dSmrg 6530a33c354dSmrg if test yes = "$GXX"; then 6531a33c354dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6532a33c354dSmrg # We only want to do this on AIX 4.2 and lower, the check 6533a33c354dSmrg # below for broken collect2 doesn't work under 4.3+ 6534a33c354dSmrg collect2name=`$CC -print-prog-name=collect2` 6535a33c354dSmrg if test -f "$collect2name" && 6536a33c354dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6537a33c354dSmrg then 6538a33c354dSmrg # We have reworked collect2 6539a33c354dSmrg : 6540a33c354dSmrg else 6541a33c354dSmrg # We have old collect2 6542a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6543a33c354dSmrg # It fails to find uninstalled libraries when the uninstalled 6544a33c354dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6545a33c354dSmrg # to unsupported forces relinking 6546a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6547a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6548a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6549a33c354dSmrg fi 6550a33c354dSmrg esac 6551a33c354dSmrg shared_flag='-shared' 6552a33c354dSmrg if test yes = "$aix_use_runtimelinking"; then 6553a33c354dSmrg shared_flag=$shared_flag' $wl-G' 6554a33c354dSmrg fi 6555a33c354dSmrg # Need to ensure runtime linking is disabled for the traditional 6556a33c354dSmrg # shared library, or the linker may eventually find shared libraries 6557a33c354dSmrg # /with/ Import File - we do not want to mix them. 6558a33c354dSmrg shared_flag_aix='-shared' 6559a33c354dSmrg shared_flag_svr4='-shared $wl-G' 6560a33c354dSmrg else 6561a33c354dSmrg # not using gcc 6562a33c354dSmrg if test ia64 = "$host_cpu"; then 6563a33c354dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6564a33c354dSmrg # chokes on -Wl,-G. The following line is correct: 6565a33c354dSmrg shared_flag='-G' 6566a33c354dSmrg else 6567a33c354dSmrg if test yes = "$aix_use_runtimelinking"; then 6568a33c354dSmrg shared_flag='$wl-G' 6569a33c354dSmrg else 6570a33c354dSmrg shared_flag='$wl-bM:SRE' 6571a33c354dSmrg fi 6572a33c354dSmrg shared_flag_aix='$wl-bM:SRE' 6573a33c354dSmrg shared_flag_svr4='$wl-G' 6574a33c354dSmrg fi 6575a33c354dSmrg fi 6576a33c354dSmrg 6577a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6578a33c354dSmrg # It seems that -bexpall does not export symbols beginning with 6579a33c354dSmrg # underscore (_), so it is better to generate a list of symbols to 6580a33c354dSmrg # export. 6581a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6582a33c354dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6583a33c354dSmrg # Warning - without using the other runtime loading flags (-brtl), 6584a33c354dSmrg # -berok will link without error, but may produce a broken library. 6585a33c354dSmrg # The "-G" linker flag allows undefined symbols. 6586a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6587a33c354dSmrg # Determine the default libpath from the value encoded in an empty 6588a33c354dSmrg # executable. 6589a33c354dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6590a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6591a33c354dSmrg 6592a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 6593a33c354dSmrg else 6594a33c354dSmrg if test ia64 = "$host_cpu"; then 6595a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6596a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6597a33c354dSmrg _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" 6598a33c354dSmrg else 6599a33c354dSmrg # Determine the default libpath from the value encoded in an 6600a33c354dSmrg # empty executable. 6601a33c354dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6602a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6603a33c354dSmrg # Warning - without using the other run time loading flags, 6604a33c354dSmrg # -berok will link without error, but may produce a broken library. 6605a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6606a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6607a33c354dSmrg if test yes = "$with_gnu_ld"; then 6608a33c354dSmrg # We only use this code for GNU lds that support --whole-archive. 6609a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6610a33c354dSmrg else 6611a33c354dSmrg # Exported symbols can be pulled into shared objects from archives 6612a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6613a33c354dSmrg fi 6614a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6615a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6616a33c354dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6617a33c354dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6618a33c354dSmrg if test svr4 != "$with_aix_soname"; then 6619a33c354dSmrg # This is similar to how AIX traditionally builds its shared 6620a33c354dSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6621a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 6622a33c354dSmrg fi 6623a33c354dSmrg if test aix != "$with_aix_soname"; then 6624a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 6625a33c354dSmrg else 6626a33c354dSmrg # used by -dlpreopen to get the symbols 6627a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6628a33c354dSmrg fi 6629a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6630a33c354dSmrg fi 6631a33c354dSmrg fi 6632a33c354dSmrg ;; 6633a33c354dSmrg 6634a33c354dSmrg beos*) 6635a33c354dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6636a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6637a33c354dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6638a33c354dSmrg # support --undefined. This deserves some investigation. FIXME 6639a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6640a33c354dSmrg else 6641a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6642a33c354dSmrg fi 6643a33c354dSmrg ;; 6644a33c354dSmrg 6645a33c354dSmrg chorus*) 6646a33c354dSmrg case $cc_basename in 6647a33c354dSmrg *) 6648a33c354dSmrg # FIXME: insert proper C++ library support 6649a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6650a33c354dSmrg ;; 6651a33c354dSmrg esac 6652a33c354dSmrg ;; 6653a33c354dSmrg 6654a33c354dSmrg cygwin* | mingw* | pw32* | cegcc*) 6655a33c354dSmrg case $GXX,$cc_basename in 6656a33c354dSmrg ,cl* | no,cl* | ,icl* | no,icl*) 6657a33c354dSmrg # Native MSVC or ICC 6658a33c354dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6659a33c354dSmrg # no search path for DLLs. 6660a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6661a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6662a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6663a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6664a33c354dSmrg # Tell ltmain to make .lib files, not .a files. 6665a33c354dSmrg libext=lib 6666a33c354dSmrg # Tell ltmain to make .dll files, not .so files. 6667a33c354dSmrg shrext_cmds=.dll 6668a33c354dSmrg # FIXME: Setting linknames here is a bad hack. 6669a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6670a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6671a33c354dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6672a33c354dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6673a33c354dSmrg else 6674a33c354dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6675a33c354dSmrg fi~ 6676a33c354dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6677a33c354dSmrg linknames=' 6678a33c354dSmrg # The linker will not automatically build a static lib if we build a DLL. 6679a33c354dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6680a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6681a33c354dSmrg # Don't use ranlib 6682a33c354dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6683a33c354dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6684a33c354dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6685a33c354dSmrg case $lt_outputfile in 6686a33c354dSmrg *.exe|*.EXE) ;; 6687a33c354dSmrg *) 6688a33c354dSmrg lt_outputfile=$lt_outputfile.exe 6689a33c354dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6690a33c354dSmrg ;; 6691a33c354dSmrg esac~ 6692a33c354dSmrg func_to_tool_file "$lt_outputfile"~ 6693a33c354dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6694a33c354dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6695a33c354dSmrg $RM "$lt_outputfile.manifest"; 6696a33c354dSmrg fi' 6697a33c354dSmrg ;; 6698a33c354dSmrg *) 6699a33c354dSmrg # g++ 6700a33c354dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6701a33c354dSmrg # as there is no search path for DLLs. 6702a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6703a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6704a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6705a33c354dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6706a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6707a33c354dSmrg 6708a33c354dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6709a33c354dSmrg _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' 6710a33c354dSmrg # If the export-symbols file already is a .def file, use it as 6711a33c354dSmrg # is; otherwise, prepend EXPORTS... 6712a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6713a33c354dSmrg cp $export_symbols $output_objdir/$soname.def; 6714a33c354dSmrg else 6715a33c354dSmrg echo EXPORTS > $output_objdir/$soname.def; 6716a33c354dSmrg cat $export_symbols >> $output_objdir/$soname.def; 6717a33c354dSmrg fi~ 6718a33c354dSmrg $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' 6719a33c354dSmrg else 6720a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6721a33c354dSmrg fi 6722a33c354dSmrg ;; 6723a33c354dSmrg esac 6724a33c354dSmrg ;; 6725a33c354dSmrg darwin* | rhapsody*) 6726a33c354dSmrg _LT_DARWIN_LINKER_FEATURES($1) 6727a33c354dSmrg ;; 6728a33c354dSmrg 6729a33c354dSmrg os2*) 6730a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6731a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6732a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6733a33c354dSmrg shrext_cmds=.dll 6734a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6735a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6736a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6737a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6738a33c354dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6739a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6740a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 6741a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6742a33c354dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6743a33c354dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6744a33c354dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6745a33c354dSmrg prefix_cmds="$SED"~ 6746a33c354dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6747a33c354dSmrg prefix_cmds="$prefix_cmds -e 1d"; 6748a33c354dSmrg fi~ 6749a33c354dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6750a33c354dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6751a33c354dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6752a33c354dSmrg emximp -o $lib $output_objdir/$libname.def' 6753a33c354dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6754a33c354dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6755a33c354dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6756a33c354dSmrg ;; 6757a33c354dSmrg 6758a33c354dSmrg dgux*) 6759a33c354dSmrg case $cc_basename in 6760a33c354dSmrg ec++*) 6761a33c354dSmrg # FIXME: insert proper C++ library support 6762a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6763a33c354dSmrg ;; 6764a33c354dSmrg ghcx*) 6765a33c354dSmrg # Green Hills C++ Compiler 6766a33c354dSmrg # FIXME: insert proper C++ library support 6767a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6768a33c354dSmrg ;; 6769a33c354dSmrg *) 6770a33c354dSmrg # FIXME: insert proper C++ library support 6771a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6772a33c354dSmrg ;; 6773a33c354dSmrg esac 6774a33c354dSmrg ;; 6775a33c354dSmrg 6776a33c354dSmrg freebsd2.*) 6777a33c354dSmrg # C++ shared libraries reported to be fairly broken before 6778a33c354dSmrg # switch to ELF 6779a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6780a33c354dSmrg ;; 6781a33c354dSmrg 6782a33c354dSmrg freebsd-elf*) 6783a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784a33c354dSmrg ;; 6785a33c354dSmrg 6786a33c354dSmrg freebsd* | dragonfly* | midnightbsd*) 6787a33c354dSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788a33c354dSmrg # conventions 6789a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6790a33c354dSmrg ;; 6791a33c354dSmrg 6792a33c354dSmrg haiku*) 6793a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6794a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6795a33c354dSmrg ;; 6796a33c354dSmrg 6797a33c354dSmrg hpux9*) 6798a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6802a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803a33c354dSmrg # but as the default 6804a33c354dSmrg # location of the library. 6805a33c354dSmrg 6806a33c354dSmrg case $cc_basename in 6807a33c354dSmrg CC*) 6808a33c354dSmrg # FIXME: insert proper C++ library support 6809a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6810a33c354dSmrg ;; 6811a33c354dSmrg aCC*) 6812a33c354dSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6813a33c354dSmrg # Commands to make compiler produce verbose output that lists 6814a33c354dSmrg # what "hidden" libraries, object files and flags are used when 6815a33c354dSmrg # linking a shared library. 6816a33c354dSmrg # 6817a33c354dSmrg # There doesn't appear to be a way to prevent this compiler from 6818a33c354dSmrg # explicitly linking system object files so we need to strip them 6819a33c354dSmrg # from the output so that they don't get included in the library 6820a33c354dSmrg # dependencies. 6821a33c354dSmrg 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"' 6822a33c354dSmrg ;; 6823a33c354dSmrg *) 6824a33c354dSmrg if test yes = "$GXX"; then 6825a33c354dSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6826a33c354dSmrg else 6827a33c354dSmrg # FIXME: insert proper C++ library support 6828a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6829a33c354dSmrg fi 6830a33c354dSmrg ;; 6831a33c354dSmrg esac 6832a33c354dSmrg ;; 6833a33c354dSmrg 6834a33c354dSmrg hpux10*|hpux11*) 6835a33c354dSmrg if test no = "$with_gnu_ld"; then 6836a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838a33c354dSmrg 6839a33c354dSmrg case $host_cpu in 6840a33c354dSmrg hppa*64*|ia64*) 6841a33c354dSmrg ;; 6842a33c354dSmrg *) 6843a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844a33c354dSmrg ;; 6845a33c354dSmrg esac 6846a33c354dSmrg fi 6847a33c354dSmrg case $host_cpu in 6848a33c354dSmrg hppa*64*|ia64*) 6849a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6850a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851a33c354dSmrg ;; 6852a33c354dSmrg *) 6853a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6854a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855a33c354dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856a33c354dSmrg # but as the default 6857a33c354dSmrg # location of the library. 6858a33c354dSmrg ;; 6859a33c354dSmrg esac 6860a33c354dSmrg 6861a33c354dSmrg case $cc_basename in 6862a33c354dSmrg CC*) 6863a33c354dSmrg # FIXME: insert proper C++ library support 6864a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6865a33c354dSmrg ;; 6866a33c354dSmrg aCC*) 6867a33c354dSmrg case $host_cpu in 6868a33c354dSmrg hppa*64*) 6869a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870a33c354dSmrg ;; 6871a33c354dSmrg ia64*) 6872a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873a33c354dSmrg ;; 6874a33c354dSmrg *) 6875a33c354dSmrg _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' 6876a33c354dSmrg ;; 6877a33c354dSmrg esac 6878a33c354dSmrg # Commands to make compiler produce verbose output that lists 6879a33c354dSmrg # what "hidden" libraries, object files and flags are used when 6880a33c354dSmrg # linking a shared library. 6881a33c354dSmrg # 6882a33c354dSmrg # There doesn't appear to be a way to prevent this compiler from 6883a33c354dSmrg # explicitly linking system object files so we need to strip them 6884a33c354dSmrg # from the output so that they don't get included in the library 6885a33c354dSmrg # dependencies. 6886a33c354dSmrg 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"' 6887a33c354dSmrg ;; 6888a33c354dSmrg *) 6889a33c354dSmrg if test yes = "$GXX"; then 6890a33c354dSmrg if test no = "$with_gnu_ld"; then 6891a33c354dSmrg case $host_cpu in 6892a33c354dSmrg hppa*64*) 6893a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894a33c354dSmrg ;; 6895a33c354dSmrg ia64*) 6896a33c354dSmrg _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' 6897a33c354dSmrg ;; 6898a33c354dSmrg *) 6899a33c354dSmrg _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' 6900a33c354dSmrg ;; 6901a33c354dSmrg esac 6902a33c354dSmrg fi 6903a33c354dSmrg else 6904a33c354dSmrg # FIXME: insert proper C++ library support 6905a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6906a33c354dSmrg fi 6907a33c354dSmrg ;; 6908a33c354dSmrg esac 6909a33c354dSmrg ;; 6910a33c354dSmrg 6911a33c354dSmrg interix[[3-9]]*) 6912a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6913a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916a33c354dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917a33c354dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6918a33c354dSmrg # default) and relocated if they conflict, which is a slow very memory 6919a33c354dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6920a33c354dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921a33c354dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922a33c354dSmrg _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' 6923a33c354dSmrg _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' 6924a33c354dSmrg ;; 6925a33c354dSmrg irix5* | irix6*) 6926a33c354dSmrg case $cc_basename in 6927a33c354dSmrg CC*) 6928a33c354dSmrg # SGI C++ 6929a33c354dSmrg _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' 6930a33c354dSmrg 6931a33c354dSmrg # Archives containing C++ object files must be created using 6932a33c354dSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933a33c354dSmrg # necessary to make sure instantiated templates are included 6934a33c354dSmrg # in the archive. 6935a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936a33c354dSmrg ;; 6937a33c354dSmrg *) 6938a33c354dSmrg if test yes = "$GXX"; then 6939a33c354dSmrg if test no = "$with_gnu_ld"; then 6940a33c354dSmrg _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' 6941a33c354dSmrg else 6942a33c354dSmrg _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' 6943a33c354dSmrg fi 6944a33c354dSmrg fi 6945a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6946a33c354dSmrg ;; 6947a33c354dSmrg esac 6948a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950a33c354dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6951a33c354dSmrg ;; 6952a33c354dSmrg 6953a33c354dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954a33c354dSmrg case $cc_basename in 6955a33c354dSmrg KCC*) 6956a33c354dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6957a33c354dSmrg 6958a33c354dSmrg # KCC will only create a shared library if the output file 6959a33c354dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960a33c354dSmrg # to its proper name (with version) after linking. 6961a33c354dSmrg _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' 6962a33c354dSmrg _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' 6963a33c354dSmrg # Commands to make compiler produce verbose output that lists 6964a33c354dSmrg # what "hidden" libraries, object files and flags are used when 6965a33c354dSmrg # linking a shared library. 6966a33c354dSmrg # 6967a33c354dSmrg # There doesn't appear to be a way to prevent this compiler from 6968a33c354dSmrg # explicitly linking system object files so we need to strip them 6969a33c354dSmrg # from the output so that they don't get included in the library 6970a33c354dSmrg # dependencies. 6971a33c354dSmrg 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"' 6972a33c354dSmrg 6973a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975a33c354dSmrg 6976a33c354dSmrg # Archives containing C++ object files must be created using 6977a33c354dSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979a33c354dSmrg ;; 6980a33c354dSmrg icpc* | ecpc* ) 6981a33c354dSmrg # Intel C++ 6982a33c354dSmrg with_gnu_ld=yes 6983a33c354dSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6984a33c354dSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6985a33c354dSmrg # earlier do not add the objects themselves. 6986a33c354dSmrg case `$CC -V 2>&1` in 6987a33c354dSmrg *"Version 7."*) 6988a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989a33c354dSmrg _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' 6990a33c354dSmrg ;; 6991a33c354dSmrg *) # Version 8.0 or newer 6992a33c354dSmrg tmp_idyn= 6993a33c354dSmrg case $host_cpu in 6994a33c354dSmrg ia64*) tmp_idyn=' -i_dynamic';; 6995a33c354dSmrg esac 6996a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997a33c354dSmrg _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' 6998a33c354dSmrg ;; 6999a33c354dSmrg esac 7000a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004a33c354dSmrg ;; 7005a33c354dSmrg pgCC* | pgcpp*) 7006a33c354dSmrg # Portland Group C++ compiler 7007a33c354dSmrg case `$CC -V` in 7008a33c354dSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009a33c354dSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010a33c354dSmrg rm -rf $tpldir~ 7011a33c354dSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012a33c354dSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014a33c354dSmrg rm -rf $tpldir~ 7015a33c354dSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016a33c354dSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017a33c354dSmrg $RANLIB $oldlib' 7018a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019a33c354dSmrg rm -rf $tpldir~ 7020a33c354dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021a33c354dSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7022a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023a33c354dSmrg rm -rf $tpldir~ 7024a33c354dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025a33c354dSmrg $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' 7026a33c354dSmrg ;; 7027a33c354dSmrg *) # Version 6 and above use weak symbols 7028a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029a33c354dSmrg _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' 7030a33c354dSmrg ;; 7031a33c354dSmrg esac 7032a33c354dSmrg 7033a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035a33c354dSmrg _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' 7036a33c354dSmrg ;; 7037a33c354dSmrg cxx*) 7038a33c354dSmrg # Compaq C++ 7039a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040a33c354dSmrg _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' 7041a33c354dSmrg 7042a33c354dSmrg runpath_var=LD_RUN_PATH 7043a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045a33c354dSmrg 7046a33c354dSmrg # Commands to make compiler produce verbose output that lists 7047a33c354dSmrg # what "hidden" libraries, object files and flags are used when 7048a33c354dSmrg # linking a shared library. 7049a33c354dSmrg # 7050a33c354dSmrg # There doesn't appear to be a way to prevent this compiler from 7051a33c354dSmrg # explicitly linking system object files so we need to strip them 7052a33c354dSmrg # from the output so that they don't get included in the library 7053a33c354dSmrg # dependencies. 7054a33c354dSmrg 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' 7055a33c354dSmrg ;; 7056a33c354dSmrg xl* | mpixl* | bgxl*) 7057a33c354dSmrg # IBM XL 8.0 on PPC, with GNU ld 7058a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061a33c354dSmrg if test yes = "$supports_anon_versioning"; then 7062a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7063a33c354dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064a33c354dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7065a33c354dSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066a33c354dSmrg fi 7067a33c354dSmrg ;; 7068a33c354dSmrg *) 7069a33c354dSmrg case `$CC -V 2>&1 | $SED 5q` in 7070a33c354dSmrg *Sun\ C*) 7071a33c354dSmrg # Sun C++ 5.9 7072a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074a33c354dSmrg _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' 7075a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076a33c354dSmrg _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' 7077a33c354dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7078a33c354dSmrg 7079a33c354dSmrg # Not sure whether something based on 7080a33c354dSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081a33c354dSmrg # would be better. 7082a33c354dSmrg output_verbose_link_cmd='func_echo_all' 7083a33c354dSmrg 7084a33c354dSmrg # Archives containing C++ object files must be created using 7085a33c354dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086a33c354dSmrg # necessary to make sure instantiated templates are included 7087a33c354dSmrg # in the archive. 7088a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089a33c354dSmrg ;; 7090a33c354dSmrg esac 7091a33c354dSmrg ;; 7092a33c354dSmrg esac 7093a33c354dSmrg ;; 7094a33c354dSmrg 7095a33c354dSmrg lynxos*) 7096a33c354dSmrg # FIXME: insert proper C++ library support 7097a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7098a33c354dSmrg ;; 7099a33c354dSmrg 7100a33c354dSmrg m88k*) 7101a33c354dSmrg # FIXME: insert proper C++ library support 7102a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7103a33c354dSmrg ;; 7104a33c354dSmrg 7105a33c354dSmrg mvs*) 7106a33c354dSmrg case $cc_basename in 7107a33c354dSmrg cxx*) 7108a33c354dSmrg # FIXME: insert proper C++ library support 7109a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7110a33c354dSmrg ;; 7111a33c354dSmrg *) 7112a33c354dSmrg # FIXME: insert proper C++ library support 7113a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7114a33c354dSmrg ;; 7115a33c354dSmrg esac 7116a33c354dSmrg ;; 7117a33c354dSmrg 7118a33c354dSmrg netbsd*) 7119a33c354dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121a33c354dSmrg wlarc= 7122a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7124a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125a33c354dSmrg fi 7126a33c354dSmrg # Workaround some broken pre-1.5 toolchains 7127a33c354dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128a33c354dSmrg ;; 7129a33c354dSmrg 7130a33c354dSmrg *nto* | *qnx*) 7131a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7132a33c354dSmrg ;; 7133a33c354dSmrg 7134a33c354dSmrg openbsd* | bitrig*) 7135a33c354dSmrg if test -f /usr/libexec/ld.so; then 7136a33c354dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7137a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138a33c354dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141a33c354dSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142a33c354dSmrg _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' 7143a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145a33c354dSmrg fi 7146a33c354dSmrg output_verbose_link_cmd=func_echo_all 7147a33c354dSmrg else 7148a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7149a33c354dSmrg fi 7150a33c354dSmrg ;; 7151a33c354dSmrg 7152a33c354dSmrg osf3* | osf4* | osf5*) 7153a33c354dSmrg case $cc_basename in 7154a33c354dSmrg KCC*) 7155a33c354dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7156a33c354dSmrg 7157a33c354dSmrg # KCC will only create a shared library if the output file 7158a33c354dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159a33c354dSmrg # to its proper name (with version) after linking. 7160a33c354dSmrg _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' 7161a33c354dSmrg 7162a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164a33c354dSmrg 7165a33c354dSmrg # Archives containing C++ object files must be created using 7166a33c354dSmrg # the KAI C++ compiler. 7167a33c354dSmrg case $host in 7168a33c354dSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169a33c354dSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170a33c354dSmrg esac 7171a33c354dSmrg ;; 7172a33c354dSmrg RCC*) 7173a33c354dSmrg # Rational C++ 2.4.1 7174a33c354dSmrg # FIXME: insert proper C++ library support 7175a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7176a33c354dSmrg ;; 7177a33c354dSmrg cxx*) 7178a33c354dSmrg case $host in 7179a33c354dSmrg osf3*) 7180a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181a33c354dSmrg _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' 7182a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183a33c354dSmrg ;; 7184a33c354dSmrg *) 7185a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186a33c354dSmrg _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' 7187a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188a33c354dSmrg echo "-hidden">> $lib.exp~ 7189a33c354dSmrg $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~ 7190a33c354dSmrg $RM $lib.exp' 7191a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192a33c354dSmrg ;; 7193a33c354dSmrg esac 7194a33c354dSmrg 7195a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196a33c354dSmrg 7197a33c354dSmrg # Commands to make compiler produce verbose output that lists 7198a33c354dSmrg # what "hidden" libraries, object files and flags are used when 7199a33c354dSmrg # linking a shared library. 7200a33c354dSmrg # 7201a33c354dSmrg # There doesn't appear to be a way to prevent this compiler from 7202a33c354dSmrg # explicitly linking system object files so we need to strip them 7203a33c354dSmrg # from the output so that they don't get included in the library 7204a33c354dSmrg # dependencies. 7205a33c354dSmrg 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"' 7206a33c354dSmrg ;; 7207a33c354dSmrg *) 7208a33c354dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7209a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210a33c354dSmrg case $host in 7211a33c354dSmrg osf3*) 7212a33c354dSmrg _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' 7213a33c354dSmrg ;; 7214a33c354dSmrg *) 7215a33c354dSmrg _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' 7216a33c354dSmrg ;; 7217a33c354dSmrg esac 7218a33c354dSmrg 7219a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221a33c354dSmrg 7222a33c354dSmrg # Commands to make compiler produce verbose output that lists 7223a33c354dSmrg # what "hidden" libraries, object files and flags are used when 7224a33c354dSmrg # linking a shared library. 7225a33c354dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226a33c354dSmrg 7227a33c354dSmrg else 7228a33c354dSmrg # FIXME: insert proper C++ library support 7229a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7230a33c354dSmrg fi 7231a33c354dSmrg ;; 7232a33c354dSmrg esac 7233a33c354dSmrg ;; 7234a33c354dSmrg 7235a33c354dSmrg psos*) 7236a33c354dSmrg # FIXME: insert proper C++ library support 7237a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7238a33c354dSmrg ;; 7239a33c354dSmrg 7240a33c354dSmrg sunos4*) 7241a33c354dSmrg case $cc_basename in 7242a33c354dSmrg CC*) 7243a33c354dSmrg # Sun C++ 4.x 7244a33c354dSmrg # FIXME: insert proper C++ library support 7245a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7246a33c354dSmrg ;; 7247a33c354dSmrg lcc*) 7248a33c354dSmrg # Lucid 7249a33c354dSmrg # FIXME: insert proper C++ library support 7250a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7251a33c354dSmrg ;; 7252a33c354dSmrg *) 7253a33c354dSmrg # FIXME: insert proper C++ library support 7254a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7255a33c354dSmrg ;; 7256a33c354dSmrg esac 7257a33c354dSmrg ;; 7258a33c354dSmrg 7259a33c354dSmrg solaris*) 7260a33c354dSmrg case $cc_basename in 7261a33c354dSmrg CC* | sunCC*) 7262a33c354dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7263a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267a33c354dSmrg $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' 7268a33c354dSmrg 7269a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271a33c354dSmrg case $host_os in 7272a33c354dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273a33c354dSmrg *) 7274a33c354dSmrg # The compiler driver will combine and reorder linker options, 7275a33c354dSmrg # but understands '-z linker_flag'. 7276a33c354dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7277a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278a33c354dSmrg ;; 7279a33c354dSmrg esac 7280a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7281a33c354dSmrg 7282a33c354dSmrg output_verbose_link_cmd='func_echo_all' 7283a33c354dSmrg 7284a33c354dSmrg # Archives containing C++ object files must be created using 7285a33c354dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286a33c354dSmrg # necessary to make sure instantiated templates are included 7287a33c354dSmrg # in the archive. 7288a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289a33c354dSmrg ;; 7290a33c354dSmrg gcx*) 7291a33c354dSmrg # Green Hills C++ Compiler 7292a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293a33c354dSmrg 7294a33c354dSmrg # The C++ compiler must be used to create the archive. 7295a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296a33c354dSmrg ;; 7297a33c354dSmrg *) 7298a33c354dSmrg # GNU C++ compiler with Solaris linker 7299a33c354dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7300a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301a33c354dSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7303a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304a33c354dSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7305a33c354dSmrg 7306a33c354dSmrg # Commands to make compiler produce verbose output that lists 7307a33c354dSmrg # what "hidden" libraries, object files and flags are used when 7308a33c354dSmrg # linking a shared library. 7309a33c354dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310a33c354dSmrg else 7311a33c354dSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312a33c354dSmrg # platform. 7313a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315a33c354dSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7316a33c354dSmrg 7317a33c354dSmrg # Commands to make compiler produce verbose output that lists 7318a33c354dSmrg # what "hidden" libraries, object files and flags are used when 7319a33c354dSmrg # linking a shared library. 7320a33c354dSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321a33c354dSmrg fi 7322a33c354dSmrg 7323a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324a33c354dSmrg case $host_os in 7325a33c354dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326a33c354dSmrg *) 7327a33c354dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328a33c354dSmrg ;; 7329a33c354dSmrg esac 7330a33c354dSmrg fi 7331a33c354dSmrg ;; 7332a33c354dSmrg esac 7333a33c354dSmrg ;; 7334a33c354dSmrg 7335a33c354dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339a33c354dSmrg runpath_var='LD_RUN_PATH' 7340a33c354dSmrg 7341a33c354dSmrg case $cc_basename in 7342a33c354dSmrg CC*) 7343a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345a33c354dSmrg ;; 7346a33c354dSmrg *) 7347a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349a33c354dSmrg ;; 7350a33c354dSmrg esac 7351a33c354dSmrg ;; 7352a33c354dSmrg 7353a33c354dSmrg sysv5* | sco3.2v5* | sco5v6*) 7354a33c354dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 7355a33c354dSmrg # link with -lc, and that would cause any symbols used from libc to 7356a33c354dSmrg # always be unresolved, which means just about no library would 7357a33c354dSmrg # ever link correctly. If we're not using GNU ld we use -z text 7358a33c354dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7359a33c354dSmrg # as -z defs. 7360a33c354dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361a33c354dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362a33c354dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363a33c354dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364a33c354dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365a33c354dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366a33c354dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7367a33c354dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368a33c354dSmrg runpath_var='LD_RUN_PATH' 7369a33c354dSmrg 7370a33c354dSmrg case $cc_basename in 7371a33c354dSmrg CC*) 7372a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374a33c354dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375a33c354dSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7376a33c354dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377a33c354dSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7378a33c354dSmrg ;; 7379a33c354dSmrg *) 7380a33c354dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381a33c354dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382a33c354dSmrg ;; 7383a33c354dSmrg esac 7384a33c354dSmrg ;; 7385a33c354dSmrg 7386a33c354dSmrg tandem*) 7387a33c354dSmrg case $cc_basename in 7388a33c354dSmrg NCC*) 7389a33c354dSmrg # NonStop-UX NCC 3.20 7390a33c354dSmrg # FIXME: insert proper C++ library support 7391a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7392a33c354dSmrg ;; 7393a33c354dSmrg *) 7394a33c354dSmrg # FIXME: insert proper C++ library support 7395a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7396a33c354dSmrg ;; 7397a33c354dSmrg esac 7398a33c354dSmrg ;; 7399a33c354dSmrg 7400a33c354dSmrg vxworks*) 7401a33c354dSmrg # FIXME: insert proper C++ library support 7402a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7403a33c354dSmrg ;; 7404a33c354dSmrg 7405a33c354dSmrg *) 7406a33c354dSmrg # FIXME: insert proper C++ library support 7407a33c354dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7408a33c354dSmrg ;; 7409a33c354dSmrg esac 7410a33c354dSmrg 7411a33c354dSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412a33c354dSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413a33c354dSmrg 7414a33c354dSmrg _LT_TAGVAR(GCC, $1)=$GXX 7415a33c354dSmrg _LT_TAGVAR(LD, $1)=$LD 7416a33c354dSmrg 7417a33c354dSmrg ## CAVEAT EMPTOR: 7418a33c354dSmrg ## There is no encapsulation within the following macros, do not change 7419a33c354dSmrg ## the running order or otherwise move them around unless you know exactly 7420a33c354dSmrg ## what you are doing... 7421a33c354dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7422a33c354dSmrg _LT_COMPILER_PIC($1) 7423a33c354dSmrg _LT_COMPILER_C_O($1) 7424a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 7425a33c354dSmrg _LT_LINKER_SHLIBS($1) 7426a33c354dSmrg _LT_SYS_DYNAMIC_LINKER($1) 7427a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7428a33c354dSmrg 7429a33c354dSmrg _LT_CONFIG($1) 7430a33c354dSmrg fi # test -n "$compiler" 7431a33c354dSmrg 7432a33c354dSmrg CC=$lt_save_CC 7433a33c354dSmrg CFLAGS=$lt_save_CFLAGS 7434a33c354dSmrg LDCXX=$LD 7435a33c354dSmrg LD=$lt_save_LD 7436a33c354dSmrg GCC=$lt_save_GCC 7437a33c354dSmrg with_gnu_ld=$lt_save_with_gnu_ld 7438a33c354dSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 7439a33c354dSmrg lt_cv_path_LD=$lt_save_path_LD 7440a33c354dSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441a33c354dSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442a33c354dSmrgfi # test yes != "$_lt_caught_CXX_error" 7443a33c354dSmrg 7444a33c354dSmrgAC_LANG_POP 7445a33c354dSmrg])# _LT_LANG_CXX_CONFIG 7446a33c354dSmrg 7447a33c354dSmrg 7448a33c354dSmrg# _LT_FUNC_STRIPNAME_CNF 7449a33c354dSmrg# ---------------------- 7450a33c354dSmrg# func_stripname_cnf prefix suffix name 7451a33c354dSmrg# strip PREFIX and SUFFIX off of NAME. 7452a33c354dSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7453a33c354dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7454a33c354dSmrg# dot (in which case that matches only a dot). 7455a33c354dSmrg# 7456a33c354dSmrg# This function is identical to the (non-XSI) version of func_stripname, 7457a33c354dSmrg# except this one can be used by m4 code that may be executed by configure, 7458a33c354dSmrg# rather than the libtool script. 7459a33c354dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460a33c354dSmrgAC_REQUIRE([_LT_DECL_SED]) 7461a33c354dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462a33c354dSmrgfunc_stripname_cnf () 7463a33c354dSmrg{ 7464a33c354dSmrg case @S|@2 in 7465a33c354dSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466a33c354dSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467a33c354dSmrg esac 7468a33c354dSmrg} # func_stripname_cnf 7469a33c354dSmrg])# _LT_FUNC_STRIPNAME_CNF 7470a33c354dSmrg 7471a33c354dSmrg 7472a33c354dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473a33c354dSmrg# --------------------------------- 7474a33c354dSmrg# Figure out "hidden" library dependencies from verbose 7475a33c354dSmrg# compiler output when linking a shared library. 7476a33c354dSmrg# Parse the compiler output and extract the necessary 7477a33c354dSmrg# objects, libraries and library flags. 7478a33c354dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479a33c354dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480a33c354dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481a33c354dSmrg# Dependencies to place before and after the object being linked: 7482a33c354dSmrg_LT_TAGVAR(predep_objects, $1)= 7483a33c354dSmrg_LT_TAGVAR(postdep_objects, $1)= 7484a33c354dSmrg_LT_TAGVAR(predeps, $1)= 7485a33c354dSmrg_LT_TAGVAR(postdeps, $1)= 7486a33c354dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7487a33c354dSmrg 7488a33c354dSmrgdnl we can't use the lt_simple_compile_test_code here, 7489a33c354dSmrgdnl because it contains code intended for an executable, 7490a33c354dSmrgdnl not a library. It's possible we should let each 7491a33c354dSmrgdnl tag define a new lt_????_link_test_code variable, 7492a33c354dSmrgdnl but it's only used here... 7493a33c354dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494a33c354dSmrgint a; 7495a33c354dSmrgvoid foo (void) { a = 0; } 7496a33c354dSmrg_LT_EOF 7497a33c354dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498a33c354dSmrgclass Foo 7499a33c354dSmrg{ 7500a33c354dSmrgpublic: 7501a33c354dSmrg Foo (void) { a = 0; } 7502a33c354dSmrgprivate: 7503a33c354dSmrg int a; 7504a33c354dSmrg}; 7505a33c354dSmrg_LT_EOF 7506a33c354dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507a33c354dSmrg subroutine foo 7508a33c354dSmrg implicit none 7509a33c354dSmrg integer*4 a 7510a33c354dSmrg a=0 7511a33c354dSmrg return 7512a33c354dSmrg end 7513a33c354dSmrg_LT_EOF 7514a33c354dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515a33c354dSmrg subroutine foo 7516a33c354dSmrg implicit none 7517a33c354dSmrg integer a 7518a33c354dSmrg a=0 7519a33c354dSmrg return 7520a33c354dSmrg end 7521a33c354dSmrg_LT_EOF 7522a33c354dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523a33c354dSmrgpublic class foo { 7524a33c354dSmrg private int a; 7525a33c354dSmrg public void bar (void) { 7526a33c354dSmrg a = 0; 7527a33c354dSmrg } 7528a33c354dSmrg}; 7529a33c354dSmrg_LT_EOF 7530a33c354dSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531a33c354dSmrgpackage foo 7532a33c354dSmrgfunc foo() { 7533a33c354dSmrg} 7534a33c354dSmrg_LT_EOF 7535a33c354dSmrg]) 7536a33c354dSmrg 7537a33c354dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 7538a33c354dSmrgcase "$CC $CFLAGS " in #( 7539a33c354dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540a33c354dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541a33c354dSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542a33c354dSmrgesac 7543a33c354dSmrg 7544a33c354dSmrgdnl Parse the compiler output and extract the necessary 7545a33c354dSmrgdnl objects, libraries and library flags. 7546a33c354dSmrgif AC_TRY_EVAL(ac_compile); then 7547a33c354dSmrg # Parse the compiler output and extract the necessary 7548a33c354dSmrg # objects, libraries and library flags. 7549a33c354dSmrg 7550a33c354dSmrg # Sentinel used to keep track of whether or not we are before 7551a33c354dSmrg # the conftest object file. 7552a33c354dSmrg pre_test_object_deps_done=no 7553a33c354dSmrg 7554a33c354dSmrg for p in `eval "$output_verbose_link_cmd"`; do 7555a33c354dSmrg case $prev$p in 7556a33c354dSmrg 7557a33c354dSmrg -L* | -R* | -l*) 7558a33c354dSmrg # Some compilers place space between "-{L,R}" and the path. 7559a33c354dSmrg # Remove the space. 7560a33c354dSmrg if test x-L = "$p" || 7561a33c354dSmrg test x-R = "$p"; then 7562a33c354dSmrg prev=$p 7563a33c354dSmrg continue 7564a33c354dSmrg fi 7565a33c354dSmrg 7566a33c354dSmrg # Expand the sysroot to ease extracting the directories later. 7567a33c354dSmrg if test -z "$prev"; then 7568a33c354dSmrg case $p in 7569a33c354dSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570a33c354dSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571a33c354dSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572a33c354dSmrg esac 7573a33c354dSmrg fi 7574a33c354dSmrg case $p in 7575a33c354dSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576a33c354dSmrg esac 7577a33c354dSmrg if test no = "$pre_test_object_deps_done"; then 7578a33c354dSmrg case $prev in 7579a33c354dSmrg -L | -R) 7580a33c354dSmrg # Internal compiler library paths should come after those 7581a33c354dSmrg # provided the user. The postdeps already come after the 7582a33c354dSmrg # user supplied libs so there is no need to process them. 7583a33c354dSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584a33c354dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585a33c354dSmrg else 7586a33c354dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587a33c354dSmrg fi 7588a33c354dSmrg ;; 7589a33c354dSmrg # The "-l" case would never come before the object being 7590a33c354dSmrg # linked, so don't bother handling this case. 7591a33c354dSmrg esac 7592a33c354dSmrg else 7593a33c354dSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594a33c354dSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 7595a33c354dSmrg else 7596a33c354dSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597a33c354dSmrg fi 7598a33c354dSmrg fi 7599a33c354dSmrg prev= 7600a33c354dSmrg ;; 7601a33c354dSmrg 7602a33c354dSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 7603a33c354dSmrg *.$objext) 7604a33c354dSmrg # This assumes that the test object file only shows up 7605a33c354dSmrg # once in the compiler output. 7606a33c354dSmrg if test "$p" = "conftest.$objext"; then 7607a33c354dSmrg pre_test_object_deps_done=yes 7608a33c354dSmrg continue 7609a33c354dSmrg fi 7610a33c354dSmrg 7611a33c354dSmrg if test no = "$pre_test_object_deps_done"; then 7612a33c354dSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613a33c354dSmrg _LT_TAGVAR(predep_objects, $1)=$p 7614a33c354dSmrg else 7615a33c354dSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616a33c354dSmrg fi 7617a33c354dSmrg else 7618a33c354dSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619a33c354dSmrg _LT_TAGVAR(postdep_objects, $1)=$p 7620a33c354dSmrg else 7621a33c354dSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622a33c354dSmrg fi 7623a33c354dSmrg fi 7624a33c354dSmrg ;; 7625a33c354dSmrg 7626a33c354dSmrg *) ;; # Ignore the rest. 7627a33c354dSmrg 7628a33c354dSmrg esac 7629a33c354dSmrg done 7630a33c354dSmrg 7631a33c354dSmrg # Clean up. 7632a33c354dSmrg rm -f a.out a.exe 7633a33c354dSmrgelse 7634a33c354dSmrg echo "libtool.m4: error: problem compiling $1 test program" 7635a33c354dSmrgfi 7636a33c354dSmrg 7637a33c354dSmrg$RM -f confest.$objext 7638a33c354dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7639a33c354dSmrg 7640a33c354dSmrg# PORTME: override above test on systems where it is broken 7641a33c354dSmrgm4_if([$1], [CXX], 7642a33c354dSmrg[case $host_os in 7643a33c354dSmrginterix[[3-9]]*) 7644a33c354dSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645a33c354dSmrg # hack all around it, let's just trust "g++" to DTRT. 7646a33c354dSmrg _LT_TAGVAR(predep_objects,$1)= 7647a33c354dSmrg _LT_TAGVAR(postdep_objects,$1)= 7648a33c354dSmrg _LT_TAGVAR(postdeps,$1)= 7649a33c354dSmrg ;; 7650a33c354dSmrgesac 7651a33c354dSmrg]) 7652a33c354dSmrg 7653a33c354dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7654a33c354dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7655a33c354dSmrgesac 7656a33c354dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657a33c354dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658a33c354dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659a33c354dSmrgfi 7660a33c354dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661a33c354dSmrg [The directories searched by this compiler when creating a shared library]) 7662a33c354dSmrg_LT_TAGDECL([], [predep_objects], [1], 7663a33c354dSmrg [Dependencies to place before and after the objects being linked to 7664a33c354dSmrg create a shared library]) 7665a33c354dSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7666a33c354dSmrg_LT_TAGDECL([], [predeps], [1]) 7667a33c354dSmrg_LT_TAGDECL([], [postdeps], [1]) 7668a33c354dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669a33c354dSmrg [The library search path used internally by the compiler when linking 7670a33c354dSmrg a shared library]) 7671a33c354dSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7672a33c354dSmrg 7673a33c354dSmrg 7674a33c354dSmrg# _LT_LANG_F77_CONFIG([TAG]) 7675a33c354dSmrg# -------------------------- 7676a33c354dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7677a33c354dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7678a33c354dSmrg# to write the compiler configuration to 'libtool'. 7679a33c354dSmrgm4_defun([_LT_LANG_F77_CONFIG], 7680a33c354dSmrg[AC_LANG_PUSH(Fortran 77) 7681a33c354dSmrgif test -z "$F77" || test no = "$F77"; then 7682a33c354dSmrg _lt_disable_F77=yes 7683a33c354dSmrgfi 7684a33c354dSmrg 7685a33c354dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686a33c354dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7687a33c354dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7688a33c354dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7689a33c354dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690a33c354dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7691a33c354dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692a33c354dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693a33c354dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694a33c354dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7695a33c354dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7696a33c354dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7697a33c354dSmrg_LT_TAGVAR(module_cmds, $1)= 7698a33c354dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7699a33c354dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700a33c354dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7701a33c354dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7702a33c354dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703a33c354dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7704a33c354dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705a33c354dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706a33c354dSmrg 7707a33c354dSmrg# Source file extension for f77 test sources. 7708a33c354dSmrgac_ext=f 7709a33c354dSmrg 7710a33c354dSmrg# Object file extension for compiled f77 test sources. 7711a33c354dSmrgobjext=o 7712a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 7713a33c354dSmrg 7714a33c354dSmrg# No sense in running all these tests if we already determined that 7715a33c354dSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7716a33c354dSmrg# are currently assumed to apply to all compilers on this platform, 7717a33c354dSmrg# and will be corrupted by setting them based on a non-working compiler. 7718a33c354dSmrgif test yes != "$_lt_disable_F77"; then 7719a33c354dSmrg # Code to be used in simple compile tests 7720a33c354dSmrg lt_simple_compile_test_code="\ 7721a33c354dSmrg subroutine t 7722a33c354dSmrg return 7723a33c354dSmrg end 7724a33c354dSmrg" 7725a33c354dSmrg 7726a33c354dSmrg # Code to be used in simple link tests 7727a33c354dSmrg lt_simple_link_test_code="\ 7728a33c354dSmrg program t 7729a33c354dSmrg end 7730a33c354dSmrg" 7731a33c354dSmrg 7732a33c354dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733a33c354dSmrg _LT_TAG_COMPILER 7734a33c354dSmrg 7735a33c354dSmrg # save warnings/boilerplate of simple test code 7736a33c354dSmrg _LT_COMPILER_BOILERPLATE 7737a33c354dSmrg _LT_LINKER_BOILERPLATE 7738a33c354dSmrg 7739a33c354dSmrg # Allow CC to be a program name with arguments. 7740a33c354dSmrg lt_save_CC=$CC 7741a33c354dSmrg lt_save_GCC=$GCC 7742a33c354dSmrg lt_save_CFLAGS=$CFLAGS 7743a33c354dSmrg CC=${F77-"f77"} 7744a33c354dSmrg CFLAGS=$FFLAGS 7745a33c354dSmrg compiler=$CC 7746a33c354dSmrg _LT_TAGVAR(compiler, $1)=$CC 7747a33c354dSmrg _LT_CC_BASENAME([$compiler]) 7748a33c354dSmrg GCC=$G77 7749a33c354dSmrg if test -n "$compiler"; then 7750a33c354dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7751a33c354dSmrg AC_MSG_RESULT([$can_build_shared]) 7752a33c354dSmrg 7753a33c354dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7754a33c354dSmrg test no = "$can_build_shared" && enable_shared=no 7755a33c354dSmrg 7756a33c354dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7757a33c354dSmrg # are all built from PIC. 7758a33c354dSmrg case $host_os in 7759a33c354dSmrg aix3*) 7760a33c354dSmrg test yes = "$enable_shared" && enable_static=no 7761a33c354dSmrg if test -n "$RANLIB"; then 7762a33c354dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763a33c354dSmrg postinstall_cmds='$RANLIB $lib' 7764a33c354dSmrg fi 7765a33c354dSmrg ;; 7766a33c354dSmrg aix[[4-9]]*) 7767a33c354dSmrg if test ia64 != "$host_cpu"; then 7768a33c354dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769a33c354dSmrg yes,aix,yes) ;; # shared object as lib.so file only 7770a33c354dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7771a33c354dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772a33c354dSmrg esac 7773a33c354dSmrg fi 7774a33c354dSmrg ;; 7775a33c354dSmrg esac 7776a33c354dSmrg AC_MSG_RESULT([$enable_shared]) 7777a33c354dSmrg 7778a33c354dSmrg AC_MSG_CHECKING([whether to build static libraries]) 7779a33c354dSmrg # Make sure either enable_shared or enable_static is yes. 7780a33c354dSmrg test yes = "$enable_shared" || enable_static=yes 7781a33c354dSmrg AC_MSG_RESULT([$enable_static]) 7782a33c354dSmrg 7783a33c354dSmrg _LT_TAGVAR(GCC, $1)=$G77 7784a33c354dSmrg _LT_TAGVAR(LD, $1)=$LD 7785a33c354dSmrg 7786a33c354dSmrg ## CAVEAT EMPTOR: 7787a33c354dSmrg ## There is no encapsulation within the following macros, do not change 7788a33c354dSmrg ## the running order or otherwise move them around unless you know exactly 7789a33c354dSmrg ## what you are doing... 7790a33c354dSmrg _LT_COMPILER_PIC($1) 7791a33c354dSmrg _LT_COMPILER_C_O($1) 7792a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 7793a33c354dSmrg _LT_LINKER_SHLIBS($1) 7794a33c354dSmrg _LT_SYS_DYNAMIC_LINKER($1) 7795a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7796a33c354dSmrg 7797a33c354dSmrg _LT_CONFIG($1) 7798a33c354dSmrg fi # test -n "$compiler" 7799a33c354dSmrg 7800a33c354dSmrg GCC=$lt_save_GCC 7801a33c354dSmrg CC=$lt_save_CC 7802a33c354dSmrg CFLAGS=$lt_save_CFLAGS 7803a33c354dSmrgfi # test yes != "$_lt_disable_F77" 7804a33c354dSmrg 7805a33c354dSmrgAC_LANG_POP 7806a33c354dSmrg])# _LT_LANG_F77_CONFIG 7807a33c354dSmrg 7808a33c354dSmrg 7809a33c354dSmrg# _LT_LANG_FC_CONFIG([TAG]) 7810a33c354dSmrg# ------------------------- 7811a33c354dSmrg# Ensure that the configuration variables for a Fortran compiler are 7812a33c354dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7813a33c354dSmrg# to write the compiler configuration to 'libtool'. 7814a33c354dSmrgm4_defun([_LT_LANG_FC_CONFIG], 7815a33c354dSmrg[AC_LANG_PUSH(Fortran) 7816a33c354dSmrg 7817a33c354dSmrgif test -z "$FC" || test no = "$FC"; then 7818a33c354dSmrg _lt_disable_FC=yes 7819a33c354dSmrgfi 7820a33c354dSmrg 7821a33c354dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822a33c354dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7823a33c354dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7824a33c354dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7825a33c354dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826a33c354dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7827a33c354dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828a33c354dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829a33c354dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830a33c354dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7831a33c354dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7832a33c354dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7833a33c354dSmrg_LT_TAGVAR(module_cmds, $1)= 7834a33c354dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7835a33c354dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836a33c354dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7837a33c354dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7838a33c354dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839a33c354dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7840a33c354dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841a33c354dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842a33c354dSmrg 7843a33c354dSmrg# Source file extension for fc test sources. 7844a33c354dSmrgac_ext=${ac_fc_srcext-f} 7845a33c354dSmrg 7846a33c354dSmrg# Object file extension for compiled fc test sources. 7847a33c354dSmrgobjext=o 7848a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 7849a33c354dSmrg 7850a33c354dSmrg# No sense in running all these tests if we already determined that 7851a33c354dSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7852a33c354dSmrg# are currently assumed to apply to all compilers on this platform, 7853a33c354dSmrg# and will be corrupted by setting them based on a non-working compiler. 7854a33c354dSmrgif test yes != "$_lt_disable_FC"; then 7855a33c354dSmrg # Code to be used in simple compile tests 7856a33c354dSmrg lt_simple_compile_test_code="\ 7857a33c354dSmrg subroutine t 7858a33c354dSmrg return 7859a33c354dSmrg end 7860a33c354dSmrg" 7861a33c354dSmrg 7862a33c354dSmrg # Code to be used in simple link tests 7863a33c354dSmrg lt_simple_link_test_code="\ 7864a33c354dSmrg program t 7865a33c354dSmrg end 7866a33c354dSmrg" 7867a33c354dSmrg 7868a33c354dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869a33c354dSmrg _LT_TAG_COMPILER 7870a33c354dSmrg 7871a33c354dSmrg # save warnings/boilerplate of simple test code 7872a33c354dSmrg _LT_COMPILER_BOILERPLATE 7873a33c354dSmrg _LT_LINKER_BOILERPLATE 7874a33c354dSmrg 7875a33c354dSmrg # Allow CC to be a program name with arguments. 7876a33c354dSmrg lt_save_CC=$CC 7877a33c354dSmrg lt_save_GCC=$GCC 7878a33c354dSmrg lt_save_CFLAGS=$CFLAGS 7879a33c354dSmrg CC=${FC-"f95"} 7880a33c354dSmrg CFLAGS=$FCFLAGS 7881a33c354dSmrg compiler=$CC 7882a33c354dSmrg GCC=$ac_cv_fc_compiler_gnu 7883a33c354dSmrg 7884a33c354dSmrg _LT_TAGVAR(compiler, $1)=$CC 7885a33c354dSmrg _LT_CC_BASENAME([$compiler]) 7886a33c354dSmrg 7887a33c354dSmrg if test -n "$compiler"; then 7888a33c354dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7889a33c354dSmrg AC_MSG_RESULT([$can_build_shared]) 7890a33c354dSmrg 7891a33c354dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7892a33c354dSmrg test no = "$can_build_shared" && enable_shared=no 7893a33c354dSmrg 7894a33c354dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7895a33c354dSmrg # are all built from PIC. 7896a33c354dSmrg case $host_os in 7897a33c354dSmrg aix3*) 7898a33c354dSmrg test yes = "$enable_shared" && enable_static=no 7899a33c354dSmrg if test -n "$RANLIB"; then 7900a33c354dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901a33c354dSmrg postinstall_cmds='$RANLIB $lib' 7902a33c354dSmrg fi 7903a33c354dSmrg ;; 7904a33c354dSmrg aix[[4-9]]*) 7905a33c354dSmrg if test ia64 != "$host_cpu"; then 7906a33c354dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907a33c354dSmrg yes,aix,yes) ;; # shared object as lib.so file only 7908a33c354dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7909a33c354dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910a33c354dSmrg esac 7911a33c354dSmrg fi 7912a33c354dSmrg ;; 7913a33c354dSmrg esac 7914a33c354dSmrg AC_MSG_RESULT([$enable_shared]) 7915a33c354dSmrg 7916a33c354dSmrg AC_MSG_CHECKING([whether to build static libraries]) 7917a33c354dSmrg # Make sure either enable_shared or enable_static is yes. 7918a33c354dSmrg test yes = "$enable_shared" || enable_static=yes 7919a33c354dSmrg AC_MSG_RESULT([$enable_static]) 7920a33c354dSmrg 7921a33c354dSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922a33c354dSmrg _LT_TAGVAR(LD, $1)=$LD 7923a33c354dSmrg 7924a33c354dSmrg ## CAVEAT EMPTOR: 7925a33c354dSmrg ## There is no encapsulation within the following macros, do not change 7926a33c354dSmrg ## the running order or otherwise move them around unless you know exactly 7927a33c354dSmrg ## what you are doing... 7928a33c354dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7929a33c354dSmrg _LT_COMPILER_PIC($1) 7930a33c354dSmrg _LT_COMPILER_C_O($1) 7931a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 7932a33c354dSmrg _LT_LINKER_SHLIBS($1) 7933a33c354dSmrg _LT_SYS_DYNAMIC_LINKER($1) 7934a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7935a33c354dSmrg 7936a33c354dSmrg _LT_CONFIG($1) 7937a33c354dSmrg fi # test -n "$compiler" 7938a33c354dSmrg 7939a33c354dSmrg GCC=$lt_save_GCC 7940a33c354dSmrg CC=$lt_save_CC 7941a33c354dSmrg CFLAGS=$lt_save_CFLAGS 7942a33c354dSmrgfi # test yes != "$_lt_disable_FC" 7943a33c354dSmrg 7944a33c354dSmrgAC_LANG_POP 7945a33c354dSmrg])# _LT_LANG_FC_CONFIG 7946a33c354dSmrg 7947a33c354dSmrg 7948a33c354dSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7949a33c354dSmrg# -------------------------- 7950a33c354dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7951a33c354dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952a33c354dSmrg# to write the compiler configuration to 'libtool'. 7953a33c354dSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7954a33c354dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7955a33c354dSmrgAC_LANG_SAVE 7956a33c354dSmrg 7957a33c354dSmrg# Source file extension for Java test sources. 7958a33c354dSmrgac_ext=java 7959a33c354dSmrg 7960a33c354dSmrg# Object file extension for compiled Java test sources. 7961a33c354dSmrgobjext=o 7962a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 7963a33c354dSmrg 7964a33c354dSmrg# Code to be used in simple compile tests 7965a33c354dSmrglt_simple_compile_test_code="class foo {}" 7966a33c354dSmrg 7967a33c354dSmrg# Code to be used in simple link tests 7968a33c354dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7969a33c354dSmrg 7970a33c354dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971a33c354dSmrg_LT_TAG_COMPILER 7972a33c354dSmrg 7973a33c354dSmrg# save warnings/boilerplate of simple test code 7974a33c354dSmrg_LT_COMPILER_BOILERPLATE 7975a33c354dSmrg_LT_LINKER_BOILERPLATE 7976a33c354dSmrg 7977a33c354dSmrg# Allow CC to be a program name with arguments. 7978a33c354dSmrglt_save_CC=$CC 7979a33c354dSmrglt_save_CFLAGS=$CFLAGS 7980a33c354dSmrglt_save_GCC=$GCC 7981a33c354dSmrgGCC=yes 7982a33c354dSmrgCC=${GCJ-"gcj"} 7983a33c354dSmrgCFLAGS=$GCJFLAGS 7984a33c354dSmrgcompiler=$CC 7985a33c354dSmrg_LT_TAGVAR(compiler, $1)=$CC 7986a33c354dSmrg_LT_TAGVAR(LD, $1)=$LD 7987a33c354dSmrg_LT_CC_BASENAME([$compiler]) 7988a33c354dSmrg 7989a33c354dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990a33c354dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7991a33c354dSmrg 7992a33c354dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7993a33c354dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7994a33c354dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7995a33c354dSmrg 7996a33c354dSmrg## CAVEAT EMPTOR: 7997a33c354dSmrg## There is no encapsulation within the following macros, do not change 7998a33c354dSmrg## the running order or otherwise move them around unless you know exactly 7999a33c354dSmrg## what you are doing... 8000a33c354dSmrgif test -n "$compiler"; then 8001a33c354dSmrg _LT_COMPILER_NO_RTTI($1) 8002a33c354dSmrg _LT_COMPILER_PIC($1) 8003a33c354dSmrg _LT_COMPILER_C_O($1) 8004a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 8005a33c354dSmrg _LT_LINKER_SHLIBS($1) 8006a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8007a33c354dSmrg 8008a33c354dSmrg _LT_CONFIG($1) 8009a33c354dSmrgfi 8010a33c354dSmrg 8011a33c354dSmrgAC_LANG_RESTORE 8012a33c354dSmrg 8013a33c354dSmrgGCC=$lt_save_GCC 8014a33c354dSmrgCC=$lt_save_CC 8015a33c354dSmrgCFLAGS=$lt_save_CFLAGS 8016a33c354dSmrg])# _LT_LANG_GCJ_CONFIG 8017a33c354dSmrg 8018a33c354dSmrg 8019a33c354dSmrg# _LT_LANG_GO_CONFIG([TAG]) 8020a33c354dSmrg# -------------------------- 8021a33c354dSmrg# Ensure that the configuration variables for the GNU Go compiler 8022a33c354dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8023a33c354dSmrg# to write the compiler configuration to 'libtool'. 8024a33c354dSmrgm4_defun([_LT_LANG_GO_CONFIG], 8025a33c354dSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8026a33c354dSmrgAC_LANG_SAVE 8027a33c354dSmrg 8028a33c354dSmrg# Source file extension for Go test sources. 8029a33c354dSmrgac_ext=go 8030a33c354dSmrg 8031a33c354dSmrg# Object file extension for compiled Go test sources. 8032a33c354dSmrgobjext=o 8033a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 8034a33c354dSmrg 8035a33c354dSmrg# Code to be used in simple compile tests 8036a33c354dSmrglt_simple_compile_test_code="package main; func main() { }" 8037a33c354dSmrg 8038a33c354dSmrg# Code to be used in simple link tests 8039a33c354dSmrglt_simple_link_test_code='package main; func main() { }' 8040a33c354dSmrg 8041a33c354dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8042a33c354dSmrg_LT_TAG_COMPILER 8043a33c354dSmrg 8044a33c354dSmrg# save warnings/boilerplate of simple test code 8045a33c354dSmrg_LT_COMPILER_BOILERPLATE 8046a33c354dSmrg_LT_LINKER_BOILERPLATE 8047a33c354dSmrg 8048a33c354dSmrg# Allow CC to be a program name with arguments. 8049a33c354dSmrglt_save_CC=$CC 8050a33c354dSmrglt_save_CFLAGS=$CFLAGS 8051a33c354dSmrglt_save_GCC=$GCC 8052a33c354dSmrgGCC=yes 8053a33c354dSmrgCC=${GOC-"gccgo"} 8054a33c354dSmrgCFLAGS=$GOFLAGS 8055a33c354dSmrgcompiler=$CC 8056a33c354dSmrg_LT_TAGVAR(compiler, $1)=$CC 8057a33c354dSmrg_LT_TAGVAR(LD, $1)=$LD 8058a33c354dSmrg_LT_CC_BASENAME([$compiler]) 8059a33c354dSmrg 8060a33c354dSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8061a33c354dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8062a33c354dSmrg 8063a33c354dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8064a33c354dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8065a33c354dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8066a33c354dSmrg 8067a33c354dSmrg## CAVEAT EMPTOR: 8068a33c354dSmrg## There is no encapsulation within the following macros, do not change 8069a33c354dSmrg## the running order or otherwise move them around unless you know exactly 8070a33c354dSmrg## what you are doing... 8071a33c354dSmrgif test -n "$compiler"; then 8072a33c354dSmrg _LT_COMPILER_NO_RTTI($1) 8073a33c354dSmrg _LT_COMPILER_PIC($1) 8074a33c354dSmrg _LT_COMPILER_C_O($1) 8075a33c354dSmrg _LT_COMPILER_FILE_LOCKS($1) 8076a33c354dSmrg _LT_LINKER_SHLIBS($1) 8077a33c354dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8078a33c354dSmrg 8079a33c354dSmrg _LT_CONFIG($1) 8080a33c354dSmrgfi 8081a33c354dSmrg 8082a33c354dSmrgAC_LANG_RESTORE 8083a33c354dSmrg 8084a33c354dSmrgGCC=$lt_save_GCC 8085a33c354dSmrgCC=$lt_save_CC 8086a33c354dSmrgCFLAGS=$lt_save_CFLAGS 8087a33c354dSmrg])# _LT_LANG_GO_CONFIG 8088a33c354dSmrg 8089a33c354dSmrg 8090a33c354dSmrg# _LT_LANG_RC_CONFIG([TAG]) 8091a33c354dSmrg# ------------------------- 8092a33c354dSmrg# Ensure that the configuration variables for the Windows resource compiler 8093a33c354dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8094a33c354dSmrg# to write the compiler configuration to 'libtool'. 8095a33c354dSmrgm4_defun([_LT_LANG_RC_CONFIG], 8096a33c354dSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8097a33c354dSmrgAC_LANG_SAVE 8098a33c354dSmrg 8099a33c354dSmrg# Source file extension for RC test sources. 8100a33c354dSmrgac_ext=rc 8101a33c354dSmrg 8102a33c354dSmrg# Object file extension for compiled RC test sources. 8103a33c354dSmrgobjext=o 8104a33c354dSmrg_LT_TAGVAR(objext, $1)=$objext 8105a33c354dSmrg 8106a33c354dSmrg# Code to be used in simple compile tests 8107a33c354dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8108a33c354dSmrg 8109a33c354dSmrg# Code to be used in simple link tests 8110a33c354dSmrglt_simple_link_test_code=$lt_simple_compile_test_code 8111a33c354dSmrg 8112a33c354dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8113a33c354dSmrg_LT_TAG_COMPILER 8114a33c354dSmrg 8115a33c354dSmrg# save warnings/boilerplate of simple test code 8116a33c354dSmrg_LT_COMPILER_BOILERPLATE 8117a33c354dSmrg_LT_LINKER_BOILERPLATE 8118a33c354dSmrg 8119a33c354dSmrg# Allow CC to be a program name with arguments. 8120a33c354dSmrglt_save_CC=$CC 8121a33c354dSmrglt_save_CFLAGS=$CFLAGS 8122a33c354dSmrglt_save_GCC=$GCC 8123a33c354dSmrgGCC= 8124a33c354dSmrgCC=${RC-"windres"} 8125a33c354dSmrgCFLAGS= 8126a33c354dSmrgcompiler=$CC 8127a33c354dSmrg_LT_TAGVAR(compiler, $1)=$CC 8128a33c354dSmrg_LT_CC_BASENAME([$compiler]) 8129a33c354dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8130a33c354dSmrg 8131a33c354dSmrgif test -n "$compiler"; then 8132a33c354dSmrg : 8133a33c354dSmrg _LT_CONFIG($1) 8134a33c354dSmrgfi 8135a33c354dSmrg 8136a33c354dSmrgGCC=$lt_save_GCC 8137a33c354dSmrgAC_LANG_RESTORE 8138a33c354dSmrgCC=$lt_save_CC 8139a33c354dSmrgCFLAGS=$lt_save_CFLAGS 8140a33c354dSmrg])# _LT_LANG_RC_CONFIG 8141a33c354dSmrg 8142a33c354dSmrg 8143a33c354dSmrg# LT_PROG_GCJ 8144a33c354dSmrg# ----------- 8145a33c354dSmrgAC_DEFUN([LT_PROG_GCJ], 8146a33c354dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8147a33c354dSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8148a33c354dSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8149a33c354dSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8150a33c354dSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8151a33c354dSmrg]) 8152a33c354dSmrg 8153a33c354dSmrg# Old name: 8154a33c354dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8155a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 8156a33c354dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8157a33c354dSmrg 8158a33c354dSmrg 8159a33c354dSmrg# LT_PROG_GO 8160a33c354dSmrg# ---------- 8161a33c354dSmrgAC_DEFUN([LT_PROG_GO], 8162a33c354dSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8163a33c354dSmrg]) 8164a33c354dSmrg 8165a33c354dSmrg 8166a33c354dSmrg# LT_PROG_RC 8167a33c354dSmrg# ---------- 8168a33c354dSmrgAC_DEFUN([LT_PROG_RC], 8169a33c354dSmrg[AC_CHECK_TOOL(RC, windres,) 8170a33c354dSmrg]) 8171a33c354dSmrg 8172a33c354dSmrg# Old name: 8173a33c354dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8174a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 8175a33c354dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8176a33c354dSmrg 8177a33c354dSmrg 8178a33c354dSmrg# _LT_DECL_EGREP 8179a33c354dSmrg# -------------- 8180a33c354dSmrg# If we don't have a new enough Autoconf to choose the best grep 8181a33c354dSmrg# available, choose the one first in the user's PATH. 8182a33c354dSmrgm4_defun([_LT_DECL_EGREP], 8183a33c354dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8184a33c354dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8185a33c354dSmrgtest -z "$GREP" && GREP=grep 8186a33c354dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8187a33c354dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8188a33c354dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8189a33c354dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8190a33c354dSmrgAC_SUBST([GREP]) 8191a33c354dSmrg]) 8192a33c354dSmrg 8193a33c354dSmrg 8194a33c354dSmrg# _LT_DECL_OBJDUMP 8195a33c354dSmrg# -------------- 8196a33c354dSmrg# If we don't have a new enough Autoconf to choose the best objdump 8197a33c354dSmrg# available, choose the one first in the user's PATH. 8198a33c354dSmrgm4_defun([_LT_DECL_OBJDUMP], 8199a33c354dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8200a33c354dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8201a33c354dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8202a33c354dSmrgAC_SUBST([OBJDUMP]) 8203a33c354dSmrg]) 8204a33c354dSmrg 8205a33c354dSmrg# _LT_DECL_DLLTOOL 8206a33c354dSmrg# ---------------- 8207a33c354dSmrg# Ensure DLLTOOL variable is set. 8208a33c354dSmrgm4_defun([_LT_DECL_DLLTOOL], 8209a33c354dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8210a33c354dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8211a33c354dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8212a33c354dSmrgAC_SUBST([DLLTOOL]) 8213a33c354dSmrg]) 8214a33c354dSmrg 8215a33c354dSmrg# _LT_DECL_FILECMD 8216a33c354dSmrg# ---------------- 8217a33c354dSmrg# Check for a file(cmd) program that can be used to detect file type and magic 8218a33c354dSmrgm4_defun([_LT_DECL_FILECMD], 8219a33c354dSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 8220a33c354dSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8221a33c354dSmrg])# _LD_DECL_FILECMD 8222a33c354dSmrg 8223a33c354dSmrg# _LT_DECL_SED 8224a33c354dSmrg# ------------ 8225a33c354dSmrg# Check for a fully-functional sed program, that truncates 8226a33c354dSmrg# as few characters as possible. Prefer GNU sed if found. 8227a33c354dSmrgm4_defun([_LT_DECL_SED], 8228a33c354dSmrg[AC_PROG_SED 8229a33c354dSmrgtest -z "$SED" && SED=sed 8230a33c354dSmrgXsed="$SED -e 1s/^X//" 8231a33c354dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8232a33c354dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8233a33c354dSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8234a33c354dSmrg])# _LT_DECL_SED 8235a33c354dSmrg 8236a33c354dSmrgm4_ifndef([AC_PROG_SED], [ 8237a33c354dSmrg############################################################ 8238a33c354dSmrg# NOTE: This macro has been submitted for inclusion into # 8239a33c354dSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8240a33c354dSmrg# a released version of Autoconf we should remove this # 8241a33c354dSmrg# macro and use it instead. # 8242a33c354dSmrg############################################################ 8243a33c354dSmrg 8244a33c354dSmrgm4_defun([AC_PROG_SED], 8245a33c354dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8246a33c354dSmrgAC_CACHE_VAL(lt_cv_path_SED, 8247a33c354dSmrg[# Loop through the user's path and test for sed and gsed. 8248a33c354dSmrg# Then use that list of sed's as ones to test for truncation. 8249a33c354dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8250a33c354dSmrgfor as_dir in $PATH 8251a33c354dSmrgdo 8252a33c354dSmrg IFS=$as_save_IFS 8253a33c354dSmrg test -z "$as_dir" && as_dir=. 8254a33c354dSmrg for lt_ac_prog in sed gsed; do 8255a33c354dSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8256a33c354dSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8257a33c354dSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8258a33c354dSmrg fi 8259a33c354dSmrg done 8260a33c354dSmrg done 8261a33c354dSmrgdone 8262a33c354dSmrgIFS=$as_save_IFS 8263a33c354dSmrglt_ac_max=0 8264a33c354dSmrglt_ac_count=0 8265a33c354dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8266a33c354dSmrg# along with /bin/sed that truncates output. 8267a33c354dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8268a33c354dSmrg test ! -f "$lt_ac_sed" && continue 8269a33c354dSmrg cat /dev/null > conftest.in 8270a33c354dSmrg lt_ac_count=0 8271a33c354dSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8272a33c354dSmrg # Check for GNU sed and select it if it is found. 8273a33c354dSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8274a33c354dSmrg lt_cv_path_SED=$lt_ac_sed 8275a33c354dSmrg break 8276a33c354dSmrg fi 8277a33c354dSmrg while true; do 8278a33c354dSmrg cat conftest.in conftest.in >conftest.tmp 8279a33c354dSmrg mv conftest.tmp conftest.in 8280a33c354dSmrg cp conftest.in conftest.nl 8281a33c354dSmrg echo >>conftest.nl 8282a33c354dSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8283a33c354dSmrg cmp -s conftest.out conftest.nl || break 8284a33c354dSmrg # 10000 chars as input seems more than enough 8285a33c354dSmrg test 10 -lt "$lt_ac_count" && break 8286a33c354dSmrg lt_ac_count=`expr $lt_ac_count + 1` 8287a33c354dSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8288a33c354dSmrg lt_ac_max=$lt_ac_count 8289a33c354dSmrg lt_cv_path_SED=$lt_ac_sed 8290a33c354dSmrg fi 8291a33c354dSmrg done 8292a33c354dSmrgdone 8293a33c354dSmrg]) 8294a33c354dSmrgSED=$lt_cv_path_SED 8295a33c354dSmrgAC_SUBST([SED]) 8296a33c354dSmrgAC_MSG_RESULT([$SED]) 8297a33c354dSmrg])#AC_PROG_SED 8298a33c354dSmrg])#m4_ifndef 8299a33c354dSmrg 8300a33c354dSmrg# Old name: 8301a33c354dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8302a33c354dSmrgdnl aclocal-1.4 backwards compatibility: 8303a33c354dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8304a33c354dSmrg 8305a33c354dSmrg 8306a33c354dSmrg# _LT_CHECK_SHELL_FEATURES 8307a33c354dSmrg# ------------------------ 8308a33c354dSmrg# Find out whether the shell is Bourne or XSI compatible, 8309a33c354dSmrg# or has some other useful features. 8310a33c354dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8311a33c354dSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8312a33c354dSmrg lt_unset=unset 8313a33c354dSmrgelse 8314a33c354dSmrg lt_unset=false 8315a33c354dSmrgfi 8316a33c354dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8317a33c354dSmrg 8318a33c354dSmrg# test EBCDIC or ASCII 8319a33c354dSmrgcase `echo X|tr X '\101'` in 8320a33c354dSmrg A) # ASCII based system 8321a33c354dSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8322a33c354dSmrg lt_SP2NL='tr \040 \012' 8323a33c354dSmrg lt_NL2SP='tr \015\012 \040\040' 8324a33c354dSmrg ;; 8325a33c354dSmrg *) # EBCDIC based system 8326a33c354dSmrg lt_SP2NL='tr \100 \n' 8327a33c354dSmrg lt_NL2SP='tr \r\n \100\100' 8328a33c354dSmrg ;; 8329a33c354dSmrgesac 8330a33c354dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8331a33c354dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8332a33c354dSmrg])# _LT_CHECK_SHELL_FEATURES 8333a33c354dSmrg 8334a33c354dSmrg 8335a33c354dSmrg# _LT_PATH_CONVERSION_FUNCTIONS 8336a33c354dSmrg# ----------------------------- 8337a33c354dSmrg# Determine what file name conversion functions should be used by 8338a33c354dSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8339a33c354dSmrg# for certain cross-compile configurations and native mingw. 8340a33c354dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8341a33c354dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8342a33c354dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8343a33c354dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8344a33c354dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8345a33c354dSmrg[case $host in 8346a33c354dSmrg *-*-mingw* ) 8347a33c354dSmrg case $build in 8348a33c354dSmrg *-*-mingw* ) # actually msys 8349a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8350a33c354dSmrg ;; 8351a33c354dSmrg *-*-cygwin* ) 8352a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8353a33c354dSmrg ;; 8354a33c354dSmrg * ) # otherwise, assume *nix 8355a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8356a33c354dSmrg ;; 8357a33c354dSmrg esac 8358a33c354dSmrg ;; 8359a33c354dSmrg *-*-cygwin* ) 8360a33c354dSmrg case $build in 8361a33c354dSmrg *-*-mingw* ) # actually msys 8362a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8363a33c354dSmrg ;; 8364a33c354dSmrg *-*-cygwin* ) 8365a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8366a33c354dSmrg ;; 8367a33c354dSmrg * ) # otherwise, assume *nix 8368a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8369a33c354dSmrg ;; 8370a33c354dSmrg esac 8371a33c354dSmrg ;; 8372a33c354dSmrg * ) # unhandled hosts (and "normal" native builds) 8373a33c354dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8374a33c354dSmrg ;; 8375a33c354dSmrgesac 8376a33c354dSmrg]) 8377a33c354dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8378a33c354dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8379a33c354dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8380a33c354dSmrg [0], [convert $build file names to $host format])dnl 8381a33c354dSmrg 8382a33c354dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8383a33c354dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8384a33c354dSmrg[#assume ordinary cross tools, or native build. 8385a33c354dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 8386a33c354dSmrgcase $host in 8387a33c354dSmrg *-*-mingw* ) 8388a33c354dSmrg case $build in 8389a33c354dSmrg *-*-mingw* ) # actually msys 8390a33c354dSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8391a33c354dSmrg ;; 8392a33c354dSmrg esac 8393a33c354dSmrg ;; 8394a33c354dSmrgesac 8395a33c354dSmrg]) 8396a33c354dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8397a33c354dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8398a33c354dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8399a33c354dSmrg [0], [convert $build files to toolchain format])dnl 8400a33c354dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8401