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