1603fc0a3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2603fc0a3Smrg# 3603fc0a3Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 4603fc0a3Smrg# Written by Gordon Matzigkeit, 1996 5603fc0a3Smrg# 6603fc0a3Smrg# This file is free software; the Free Software Foundation gives 7603fc0a3Smrg# unlimited permission to copy and/or distribute it, with or without 8603fc0a3Smrg# modifications, as long as this notice is preserved. 9603fc0a3Smrg 10603fc0a3Smrgm4_define([_LT_COPYING], [dnl 11603fc0a3Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 12603fc0a3Smrg# This is free software; see the source for copying conditions. There is NO 13603fc0a3Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14603fc0a3Smrg 15603fc0a3Smrg# GNU Libtool is free software; you can redistribute it and/or modify 16603fc0a3Smrg# it under the terms of the GNU General Public License as published by 17603fc0a3Smrg# the Free Software Foundation; either version 2 of of the License, or 18603fc0a3Smrg# (at your option) any later version. 19603fc0a3Smrg# 20603fc0a3Smrg# As a special exception to the GNU General Public License, if you 21603fc0a3Smrg# distribute this file as part of a program or library that is built 22603fc0a3Smrg# using GNU Libtool, you may include this file under the same 23603fc0a3Smrg# distribution terms that you use for the rest of that program. 24603fc0a3Smrg# 25603fc0a3Smrg# GNU Libtool is distributed in the hope that it will be useful, but 26603fc0a3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 27603fc0a3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28603fc0a3Smrg# GNU General Public License for more details. 29603fc0a3Smrg# 30603fc0a3Smrg# You should have received a copy of the GNU General Public License 31603fc0a3Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 32603fc0a3Smrg]) 33603fc0a3Smrg 34603fc0a3Smrg# serial 58 LT_INIT 35603fc0a3Smrg 36603fc0a3Smrg 37603fc0a3Smrg# LT_PREREQ(VERSION) 38603fc0a3Smrg# ------------------ 39603fc0a3Smrg# Complain and exit if this libtool version is less that VERSION. 40603fc0a3Smrgm4_defun([LT_PREREQ], 41603fc0a3Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 42603fc0a3Smrg [m4_default([$3], 43603fc0a3Smrg [m4_fatal([Libtool version $1 or higher is required], 44603fc0a3Smrg 63)])], 45603fc0a3Smrg [$2])]) 46603fc0a3Smrg 47603fc0a3Smrg 48603fc0a3Smrg# _LT_CHECK_BUILDDIR 49603fc0a3Smrg# ------------------ 50603fc0a3Smrg# Complain if the absolute build directory name contains unusual characters 51603fc0a3Smrgm4_defun([_LT_CHECK_BUILDDIR], 52603fc0a3Smrg[case `pwd` in 53603fc0a3Smrg *\ * | *\ *) 54603fc0a3Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 55603fc0a3Smrgesac 56603fc0a3Smrg]) 57603fc0a3Smrg 58603fc0a3Smrg 59603fc0a3Smrg# LT_INIT([OPTIONS]) 60603fc0a3Smrg# ------------------ 61603fc0a3SmrgAC_DEFUN([LT_INIT], 62603fc0a3Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 63603fc0a3SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 64603fc0a3SmrgAC_BEFORE([$0], [LT_LANG])dnl 65603fc0a3SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 66603fc0a3SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 67603fc0a3Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 68603fc0a3Smrg 69603fc0a3Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 70603fc0a3Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 71603fc0a3Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 72603fc0a3Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 73603fc0a3Smrgdnl unless we require an AC_DEFUNed macro: 74603fc0a3SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 75603fc0a3SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 76603fc0a3SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 77603fc0a3SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 78603fc0a3Smrgm4_require([_LT_PROG_LTMAIN])dnl 79603fc0a3Smrg 80603fc0a3Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 81603fc0a3Smrg 82603fc0a3Smrgdnl Parse OPTIONS 83603fc0a3Smrg_LT_SET_OPTIONS([$0], [$1]) 84603fc0a3Smrg 85603fc0a3Smrg# This can be used to rebuild libtool when needed 86603fc0a3SmrgLIBTOOL_DEPS=$ltmain 87603fc0a3Smrg 88603fc0a3Smrg# Always use our own libtool. 89603fc0a3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 90603fc0a3SmrgAC_SUBST(LIBTOOL)dnl 91603fc0a3Smrg 92603fc0a3Smrg_LT_SETUP 93603fc0a3Smrg 94603fc0a3Smrg# Only expand once: 95603fc0a3Smrgm4_define([LT_INIT]) 96603fc0a3Smrg])# LT_INIT 97603fc0a3Smrg 98603fc0a3Smrg# Old names: 99603fc0a3SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 100603fc0a3SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 101603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 102603fc0a3Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 103603fc0a3Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 104603fc0a3Smrg 105603fc0a3Smrg 106603fc0a3Smrg# _LT_PREPARE_CC_BASENAME 107603fc0a3Smrg# ----------------------- 108603fc0a3Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 109603fc0a3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 110603fc0a3Smrgfunc_cc_basename () 111603fc0a3Smrg{ 112603fc0a3Smrg for cc_temp in @S|@*""; do 113603fc0a3Smrg case $cc_temp in 114603fc0a3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 115603fc0a3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116603fc0a3Smrg \-*) ;; 117603fc0a3Smrg *) break;; 118603fc0a3Smrg esac 119603fc0a3Smrg done 120603fc0a3Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 121603fc0a3Smrg} 122603fc0a3Smrg])# _LT_PREPARE_CC_BASENAME 123603fc0a3Smrg 124603fc0a3Smrg 125603fc0a3Smrg# _LT_CC_BASENAME(CC) 126603fc0a3Smrg# ------------------- 127603fc0a3Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 128603fc0a3Smrg# but that macro is also expanded into generated libtool script, which 129603fc0a3Smrg# arranges for $SED and $ECHO to be set by different means. 130603fc0a3Smrgm4_defun([_LT_CC_BASENAME], 131603fc0a3Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 132603fc0a3SmrgAC_REQUIRE([_LT_DECL_SED])dnl 133603fc0a3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 134603fc0a3Smrgfunc_cc_basename $1 135603fc0a3Smrgcc_basename=$func_cc_basename_result 136603fc0a3Smrg]) 137603fc0a3Smrg 138603fc0a3Smrg 139603fc0a3Smrg# _LT_FILEUTILS_DEFAULTS 140603fc0a3Smrg# ---------------------- 141603fc0a3Smrg# It is okay to use these file commands and assume they have been set 142603fc0a3Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 143603fc0a3Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 144603fc0a3Smrg[: ${CP="cp -f"} 145603fc0a3Smrg: ${MV="mv -f"} 146603fc0a3Smrg: ${RM="rm -f"} 147603fc0a3Smrg])# _LT_FILEUTILS_DEFAULTS 148603fc0a3Smrg 149603fc0a3Smrg 150603fc0a3Smrg# _LT_SETUP 151603fc0a3Smrg# --------- 152603fc0a3Smrgm4_defun([_LT_SETUP], 153603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 154603fc0a3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 155603fc0a3SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 156603fc0a3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157603fc0a3Smrg 158603fc0a3Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 159603fc0a3Smrgdnl 160603fc0a3Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 161603fc0a3Smrg_LT_DECL([], [host], [0])dnl 162603fc0a3Smrg_LT_DECL([], [host_os], [0])dnl 163603fc0a3Smrgdnl 164603fc0a3Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 165603fc0a3Smrg_LT_DECL([], [build], [0])dnl 166603fc0a3Smrg_LT_DECL([], [build_os], [0])dnl 167603fc0a3Smrgdnl 168603fc0a3SmrgAC_REQUIRE([AC_PROG_CC])dnl 169603fc0a3SmrgAC_REQUIRE([LT_PATH_LD])dnl 170603fc0a3SmrgAC_REQUIRE([LT_PATH_NM])dnl 171603fc0a3Smrgdnl 172603fc0a3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 173603fc0a3Smrgtest -z "$LN_S" && LN_S="ln -s" 174603fc0a3Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 175603fc0a3Smrgdnl 176603fc0a3SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 177603fc0a3Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 178603fc0a3Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 179603fc0a3Smrgdnl 180603fc0a3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 181603fc0a3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 182603fc0a3Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 183603fc0a3Smrgm4_require([_LT_CMD_RELOAD])dnl 184603fc0a3Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 185603fc0a3Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 186603fc0a3Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187603fc0a3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188603fc0a3Smrgm4_require([_LT_WITH_SYSROOT])dnl 189603fc0a3Smrgm4_require([_LT_CMD_TRUNCATE])dnl 190603fc0a3Smrg 191603fc0a3Smrg_LT_CONFIG_LIBTOOL_INIT([ 192603fc0a3Smrg# See if we are running on zsh, and set the options that allow our 193603fc0a3Smrg# commands through without removal of \ escapes INIT. 194603fc0a3Smrgif test -n "\${ZSH_VERSION+set}"; then 195603fc0a3Smrg setopt NO_GLOB_SUBST 196603fc0a3Smrgfi 197603fc0a3Smrg]) 198603fc0a3Smrgif test -n "${ZSH_VERSION+set}"; then 199603fc0a3Smrg setopt NO_GLOB_SUBST 200603fc0a3Smrgfi 201603fc0a3Smrg 202603fc0a3Smrg_LT_CHECK_OBJDIR 203603fc0a3Smrg 204603fc0a3Smrgm4_require([_LT_TAG_COMPILER])dnl 205603fc0a3Smrg 206603fc0a3Smrgcase $host_os in 207603fc0a3Smrgaix3*) 208603fc0a3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 209603fc0a3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 210603fc0a3Smrg # vanish in a puff of smoke. 211603fc0a3Smrg if test set != "${COLLECT_NAMES+set}"; then 212603fc0a3Smrg COLLECT_NAMES= 213603fc0a3Smrg export COLLECT_NAMES 214603fc0a3Smrg fi 215603fc0a3Smrg ;; 216603fc0a3Smrgesac 217603fc0a3Smrg 218603fc0a3Smrg# Global variables: 219603fc0a3Smrgofile=libtool 220603fc0a3Smrgcan_build_shared=yes 221603fc0a3Smrg 222603fc0a3Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 223603fc0a3Smrg# which needs '.lib'). 224603fc0a3Smrglibext=a 225603fc0a3Smrg 226603fc0a3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 227603fc0a3Smrg 228603fc0a3Smrgold_CC=$CC 229603fc0a3Smrgold_CFLAGS=$CFLAGS 230603fc0a3Smrg 231603fc0a3Smrg# Set sane defaults for various variables 232603fc0a3Smrgtest -z "$CC" && CC=cc 233603fc0a3Smrgtest -z "$LTCC" && LTCC=$CC 234603fc0a3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 235603fc0a3Smrgtest -z "$LD" && LD=ld 236603fc0a3Smrgtest -z "$ac_objext" && ac_objext=o 237603fc0a3Smrg 238603fc0a3Smrg_LT_CC_BASENAME([$compiler]) 239603fc0a3Smrg 240603fc0a3Smrg# Only perform the check for file, if the check method requires it 241603fc0a3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 242603fc0a3Smrgcase $deplibs_check_method in 243603fc0a3Smrgfile_magic*) 244603fc0a3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 245603fc0a3Smrg _LT_PATH_MAGIC 246603fc0a3Smrg fi 247603fc0a3Smrg ;; 248603fc0a3Smrgesac 249603fc0a3Smrg 250603fc0a3Smrg# Use C for the default configuration in the libtool script 251603fc0a3SmrgLT_SUPPORTED_TAG([CC]) 252603fc0a3Smrg_LT_LANG_C_CONFIG 253603fc0a3Smrg_LT_LANG_DEFAULT_CONFIG 254603fc0a3Smrg_LT_CONFIG_COMMANDS 255603fc0a3Smrg])# _LT_SETUP 256603fc0a3Smrg 257603fc0a3Smrg 258603fc0a3Smrg# _LT_PREPARE_SED_QUOTE_VARS 259603fc0a3Smrg# -------------------------- 260603fc0a3Smrg# Define a few sed substitution that help us do robust quoting. 261603fc0a3Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 262603fc0a3Smrg[# Backslashify metacharacters that are still active within 263603fc0a3Smrg# double-quoted strings. 264603fc0a3Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 265603fc0a3Smrg 266603fc0a3Smrg# Same as above, but do not quote variable references. 267603fc0a3Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 268603fc0a3Smrg 269603fc0a3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 270603fc0a3Smrg# double_quote_subst'ed string. 271603fc0a3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 272603fc0a3Smrg 273603fc0a3Smrg# Sed substitution to delay expansion of an escaped single quote. 274603fc0a3Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 275603fc0a3Smrg 276603fc0a3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 277603fc0a3Smrgno_glob_subst='s/\*/\\\*/g' 278603fc0a3Smrg]) 279603fc0a3Smrg 280603fc0a3Smrg# _LT_PROG_LTMAIN 281603fc0a3Smrg# --------------- 282603fc0a3Smrg# Note that this code is called both from 'configure', and 'config.status' 283603fc0a3Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 284603fc0a3Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 285603fc0a3Smrg# so we pass a copy along to make sure it has a sensible value anyway. 286603fc0a3Smrgm4_defun([_LT_PROG_LTMAIN], 287603fc0a3Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 288603fc0a3Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 289603fc0a3Smrgltmain=$ac_aux_dir/ltmain.sh 290603fc0a3Smrg])# _LT_PROG_LTMAIN 291603fc0a3Smrg 292603fc0a3Smrg 293603fc0a3Smrg## ------------------------------------- ## 294603fc0a3Smrg## Accumulate code for creating libtool. ## 295603fc0a3Smrg## ------------------------------------- ## 296603fc0a3Smrg 297603fc0a3Smrg# So that we can recreate a full libtool script including additional 298603fc0a3Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 299603fc0a3Smrg# in macros and then make a single call at the end using the 'libtool' 300603fc0a3Smrg# label. 301603fc0a3Smrg 302603fc0a3Smrg 303603fc0a3Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 304603fc0a3Smrg# ---------------------------------------- 305603fc0a3Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 306603fc0a3Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 307603fc0a3Smrg[m4_ifval([$1], 308603fc0a3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 309603fc0a3Smrg [$1 310603fc0a3Smrg])])]) 311603fc0a3Smrg 312603fc0a3Smrg# Initialize. 313603fc0a3Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 314603fc0a3Smrg 315603fc0a3Smrg 316603fc0a3Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 317603fc0a3Smrg# ------------------------------ 318603fc0a3Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 319603fc0a3Smrgm4_define([_LT_CONFIG_LIBTOOL], 320603fc0a3Smrg[m4_ifval([$1], 321603fc0a3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 322603fc0a3Smrg [$1 323603fc0a3Smrg])])]) 324603fc0a3Smrg 325603fc0a3Smrg# Initialize. 326603fc0a3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 327603fc0a3Smrg 328603fc0a3Smrg 329603fc0a3Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 330603fc0a3Smrg# ----------------------------------------------------- 331603fc0a3Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 332603fc0a3Smrg[_LT_CONFIG_LIBTOOL([$1]) 333603fc0a3Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 334603fc0a3Smrg]) 335603fc0a3Smrg 336603fc0a3Smrg 337603fc0a3Smrg# _LT_FORMAT_COMMENT([COMMENT]) 338603fc0a3Smrg# ----------------------------- 339603fc0a3Smrg# Add leading comment marks to the start of each line, and a trailing 340603fc0a3Smrg# full-stop to the whole comment if one is not present already. 341603fc0a3Smrgm4_define([_LT_FORMAT_COMMENT], 342603fc0a3Smrg[m4_ifval([$1], [ 343603fc0a3Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 344603fc0a3Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 345603fc0a3Smrg)]) 346603fc0a3Smrg 347603fc0a3Smrg 348603fc0a3Smrg 349603fc0a3Smrg## ------------------------ ## 350603fc0a3Smrg## FIXME: Eliminate VARNAME ## 351603fc0a3Smrg## ------------------------ ## 352603fc0a3Smrg 353603fc0a3Smrg 354603fc0a3Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 355603fc0a3Smrg# ------------------------------------------------------------------- 356603fc0a3Smrg# CONFIGNAME is the name given to the value in the libtool script. 357603fc0a3Smrg# VARNAME is the (base) name used in the configure script. 358603fc0a3Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 359603fc0a3Smrg# VARNAME. Any other value will be used directly. 360603fc0a3Smrgm4_define([_LT_DECL], 361603fc0a3Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 362603fc0a3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 363603fc0a3Smrg [m4_ifval([$1], [$1], [$2])]) 364603fc0a3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 365603fc0a3Smrg m4_ifval([$4], 366603fc0a3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 367603fc0a3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 368603fc0a3Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 369603fc0a3Smrg]) 370603fc0a3Smrg 371603fc0a3Smrg 372603fc0a3Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 373603fc0a3Smrg# -------------------------------------------------------- 374603fc0a3Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 375603fc0a3Smrg 376603fc0a3Smrg 377603fc0a3Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378603fc0a3Smrg# ------------------------------------------------ 379603fc0a3Smrgm4_define([lt_decl_tag_varnames], 380603fc0a3Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 381603fc0a3Smrg 382603fc0a3Smrg 383603fc0a3Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 384603fc0a3Smrg# --------------------------------------------------------- 385603fc0a3Smrgm4_define([_lt_decl_filter], 386603fc0a3Smrg[m4_case([$#], 387603fc0a3Smrg [0], [m4_fatal([$0: too few arguments: $#])], 388603fc0a3Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 389603fc0a3Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 390603fc0a3Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 391603fc0a3Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 392603fc0a3Smrg]) 393603fc0a3Smrg 394603fc0a3Smrg 395603fc0a3Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 396603fc0a3Smrg# -------------------------------------------------- 397603fc0a3Smrgm4_define([lt_decl_quote_varnames], 398603fc0a3Smrg[_lt_decl_filter([value], [1], $@)]) 399603fc0a3Smrg 400603fc0a3Smrg 401603fc0a3Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 402603fc0a3Smrg# --------------------------------------------------- 403603fc0a3Smrgm4_define([lt_decl_dquote_varnames], 404603fc0a3Smrg[_lt_decl_filter([value], [2], $@)]) 405603fc0a3Smrg 406603fc0a3Smrg 407603fc0a3Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 408603fc0a3Smrg# --------------------------------------------------- 409603fc0a3Smrgm4_define([lt_decl_varnames_tagged], 410603fc0a3Smrg[m4_assert([$# <= 2])dnl 411603fc0a3Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 412603fc0a3Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 413603fc0a3Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 414603fc0a3Smrgm4_define([_lt_decl_varnames_tagged], 415603fc0a3Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 416603fc0a3Smrg 417603fc0a3Smrg 418603fc0a3Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 419603fc0a3Smrg# ------------------------------------------------ 420603fc0a3Smrgm4_define([lt_decl_all_varnames], 421603fc0a3Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 422603fc0a3Smrg m4_if([$2], [], 423603fc0a3Smrg m4_quote(lt_decl_varnames), 424603fc0a3Smrg m4_quote(m4_shift($@))))[]dnl 425603fc0a3Smrg]) 426603fc0a3Smrgm4_define([_lt_decl_all_varnames], 427603fc0a3Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 428603fc0a3Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 429603fc0a3Smrg]) 430603fc0a3Smrg 431603fc0a3Smrg 432603fc0a3Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 433603fc0a3Smrg# ------------------------------------ 434603fc0a3Smrg# Quote a variable value, and forward it to 'config.status' so that its 435603fc0a3Smrg# declaration there will have the same value as in 'configure'. VARNAME 436603fc0a3Smrg# must have a single quote delimited value for this to work. 437603fc0a3Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 438603fc0a3Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 439603fc0a3Smrg 440603fc0a3Smrg 441603fc0a3Smrg# _LT_CONFIG_STATUS_DECLARATIONS 442603fc0a3Smrg# ------------------------------ 443603fc0a3Smrg# We delimit libtool config variables with single quotes, so when 444603fc0a3Smrg# we write them to config.status, we have to be sure to quote all 445603fc0a3Smrg# embedded single quotes properly. In configure, this macro expands 446603fc0a3Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 447603fc0a3Smrg# 448603fc0a3Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 449603fc0a3Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 450603fc0a3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 451603fc0a3Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 452603fc0a3Smrg 453603fc0a3Smrg 454603fc0a3Smrg# _LT_LIBTOOL_TAGS 455603fc0a3Smrg# ---------------- 456603fc0a3Smrg# Output comment and list of tags supported by the script 457603fc0a3Smrgm4_defun([_LT_LIBTOOL_TAGS], 458603fc0a3Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459603fc0a3Smrgavailable_tags='_LT_TAGS'dnl 460603fc0a3Smrg]) 461603fc0a3Smrg 462603fc0a3Smrg 463603fc0a3Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 464603fc0a3Smrg# ----------------------------------- 465603fc0a3Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 466603fc0a3Smrg# expand to a commented shell variable setting: 467603fc0a3Smrg# 468603fc0a3Smrg# # Some comment about what VAR is for. 469603fc0a3Smrg# visible_name=$lt_internal_name 470603fc0a3Smrgm4_define([_LT_LIBTOOL_DECLARE], 471603fc0a3Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 472603fc0a3Smrg [description])))[]dnl 473603fc0a3Smrgm4_pushdef([_libtool_name], 474603fc0a3Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 475603fc0a3Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 476603fc0a3Smrg [0], [_libtool_name=[$]$1], 477603fc0a3Smrg [1], [_libtool_name=$lt_[]$1], 478603fc0a3Smrg [2], [_libtool_name=$lt_[]$1], 479603fc0a3Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 480603fc0a3Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 481603fc0a3Smrg]) 482603fc0a3Smrg 483603fc0a3Smrg 484603fc0a3Smrg# _LT_LIBTOOL_CONFIG_VARS 485603fc0a3Smrg# ----------------------- 486603fc0a3Smrg# Produce commented declarations of non-tagged libtool config variables 487603fc0a3Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 488603fc0a3Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 489603fc0a3Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 490603fc0a3Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 491603fc0a3Smrg[m4_foreach([_lt_var], 492603fc0a3Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 493603fc0a3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 494603fc0a3Smrg 495603fc0a3Smrg 496603fc0a3Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 497603fc0a3Smrg# ------------------------- 498603fc0a3Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 499603fc0a3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 500603fc0a3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 501603fc0a3Smrg 502603fc0a3Smrg 503603fc0a3Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 504603fc0a3Smrg# ------------------------------ 505603fc0a3Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 506603fc0a3Smrg 507603fc0a3Smrg 508603fc0a3Smrg# _LT_CONFIG_COMMANDS 509603fc0a3Smrg# ------------------- 510603fc0a3Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 511603fc0a3Smrg# variables for single and double quote escaping we saved from calls 512603fc0a3Smrg# to _LT_DECL, we can put quote escaped variables declarations 513603fc0a3Smrg# into 'config.status', and then the shell code to quote escape them in 514603fc0a3Smrg# for loops in 'config.status'. Finally, any additional code accumulated 515603fc0a3Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 516603fc0a3Smrgm4_defun([_LT_CONFIG_COMMANDS], 517603fc0a3Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 518603fc0a3Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 519603fc0a3Smrg dnl instead of duplicating it all over again into config.status, 520603fc0a3Smrg dnl then we will have config.status run $CONFIG_LT later, so it 521603fc0a3Smrg dnl needs to know what name is stored there: 522603fc0a3Smrg [AC_CONFIG_COMMANDS([libtool], 523603fc0a3Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 524603fc0a3Smrg dnl If the libtool generation code is destined for config.status, 525603fc0a3Smrg dnl expand the accumulated commands and init code now: 526603fc0a3Smrg [AC_CONFIG_COMMANDS([libtool], 527603fc0a3Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 528603fc0a3Smrg])#_LT_CONFIG_COMMANDS 529603fc0a3Smrg 530603fc0a3Smrg 531603fc0a3Smrg# Initialize. 532603fc0a3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 533603fc0a3Smrg[ 534603fc0a3Smrg 535603fc0a3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 536603fc0a3Smrg# if CDPATH is set. 537603fc0a3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 538603fc0a3Smrg 539603fc0a3Smrgsed_quote_subst='$sed_quote_subst' 540603fc0a3Smrgdouble_quote_subst='$double_quote_subst' 541603fc0a3Smrgdelay_variable_subst='$delay_variable_subst' 542603fc0a3Smrg_LT_CONFIG_STATUS_DECLARATIONS 543603fc0a3SmrgLTCC='$LTCC' 544603fc0a3SmrgLTCFLAGS='$LTCFLAGS' 545603fc0a3Smrgcompiler='$compiler_DEFAULT' 546603fc0a3Smrg 547603fc0a3Smrg# A function that is used when there is no print builtin or printf. 548603fc0a3Smrgfunc_fallback_echo () 549603fc0a3Smrg{ 550603fc0a3Smrg eval 'cat <<_LTECHO_EOF 551603fc0a3Smrg\$[]1 552603fc0a3Smrg_LTECHO_EOF' 553603fc0a3Smrg} 554603fc0a3Smrg 555603fc0a3Smrg# Quote evaled strings. 556603fc0a3Smrgfor var in lt_decl_all_varnames([[ \ 557603fc0a3Smrg]], lt_decl_quote_varnames); do 558603fc0a3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 559603fc0a3Smrg *[[\\\\\\\`\\"\\\$]]*) 560603fc0a3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 561603fc0a3Smrg ;; 562603fc0a3Smrg *) 563603fc0a3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 564603fc0a3Smrg ;; 565603fc0a3Smrg esac 566603fc0a3Smrgdone 567603fc0a3Smrg 568603fc0a3Smrg# Double-quote double-evaled strings. 569603fc0a3Smrgfor var in lt_decl_all_varnames([[ \ 570603fc0a3Smrg]], lt_decl_dquote_varnames); do 571603fc0a3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 572603fc0a3Smrg *[[\\\\\\\`\\"\\\$]]*) 573603fc0a3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 574603fc0a3Smrg ;; 575603fc0a3Smrg *) 576603fc0a3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 577603fc0a3Smrg ;; 578603fc0a3Smrg esac 579603fc0a3Smrgdone 580603fc0a3Smrg 581603fc0a3Smrg_LT_OUTPUT_LIBTOOL_INIT 582603fc0a3Smrg]) 583603fc0a3Smrg 584603fc0a3Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 585603fc0a3Smrg# ------------------------------------ 586603fc0a3Smrg# Generate a child script FILE with all initialization necessary to 587603fc0a3Smrg# reuse the environment learned by the parent script, and make the 588603fc0a3Smrg# file executable. If COMMENT is supplied, it is inserted after the 589603fc0a3Smrg# '#!' sequence but before initialization text begins. After this 590603fc0a3Smrg# macro, additional text can be appended to FILE to form the body of 591603fc0a3Smrg# the child script. The macro ends with non-zero status if the 592603fc0a3Smrg# file could not be fully written (such as if the disk is full). 593603fc0a3Smrgm4_ifdef([AS_INIT_GENERATED], 594603fc0a3Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 595603fc0a3Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 596603fc0a3Smrg[m4_require([AS_PREPARE])]dnl 597603fc0a3Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 598603fc0a3Smrg[lt_write_fail=0 599603fc0a3Smrgcat >$1 <<_ASEOF || lt_write_fail=1 600603fc0a3Smrg#! $SHELL 601603fc0a3Smrg# Generated by $as_me. 602603fc0a3Smrg$2 603603fc0a3SmrgSHELL=\${CONFIG_SHELL-$SHELL} 604603fc0a3Smrgexport SHELL 605603fc0a3Smrg_ASEOF 606603fc0a3Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 607603fc0a3SmrgAS_SHELL_SANITIZE 608603fc0a3Smrg_AS_PREPARE 609603fc0a3Smrgexec AS_MESSAGE_FD>&1 610603fc0a3Smrg_ASEOF 611603fc0a3Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 612603fc0a3Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 613603fc0a3Smrg 614603fc0a3Smrg# LT_OUTPUT 615603fc0a3Smrg# --------- 616603fc0a3Smrg# This macro allows early generation of the libtool script (before 617603fc0a3Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 618603fc0a3Smrg# tests. 619603fc0a3SmrgAC_DEFUN([LT_OUTPUT], 620603fc0a3Smrg[: ${CONFIG_LT=./config.lt} 621603fc0a3SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 622603fc0a3Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 623603fc0a3Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 624603fc0a3Smrg 625603fc0a3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 626603fc0a3Smrglt_cl_silent=false 627603fc0a3Smrgexec AS_MESSAGE_LOG_FD>>config.log 628603fc0a3Smrg{ 629603fc0a3Smrg echo 630603fc0a3Smrg AS_BOX([Running $as_me.]) 631603fc0a3Smrg} >&AS_MESSAGE_LOG_FD 632603fc0a3Smrg 633603fc0a3Smrglt_cl_help="\ 634603fc0a3Smrg'$as_me' creates a local libtool stub from the current configuration, 635603fc0a3Smrgfor use in further configure time tests before the real libtool is 636603fc0a3Smrggenerated. 637603fc0a3Smrg 638603fc0a3SmrgUsage: $[0] [[OPTIONS]] 639603fc0a3Smrg 640603fc0a3Smrg -h, --help print this help, then exit 641603fc0a3Smrg -V, --version print version number, then exit 642603fc0a3Smrg -q, --quiet do not print progress messages 643603fc0a3Smrg -d, --debug don't remove temporary files 644603fc0a3Smrg 645603fc0a3SmrgReport bugs to <bug-libtool@gnu.org>." 646603fc0a3Smrg 647603fc0a3Smrglt_cl_version="\ 648603fc0a3Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 649603fc0a3Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 650603fc0a3Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 651603fc0a3Smrg 652603fc0a3SmrgCopyright (C) 2011 Free Software Foundation, Inc. 653603fc0a3SmrgThis config.lt script is free software; the Free Software Foundation 654603fc0a3Smrggives unlimited permision to copy, distribute and modify it." 655603fc0a3Smrg 656603fc0a3Smrgwhile test 0 != $[#] 657603fc0a3Smrgdo 658603fc0a3Smrg case $[1] in 659603fc0a3Smrg --version | --v* | -V ) 660603fc0a3Smrg echo "$lt_cl_version"; exit 0 ;; 661603fc0a3Smrg --help | --h* | -h ) 662603fc0a3Smrg echo "$lt_cl_help"; exit 0 ;; 663603fc0a3Smrg --debug | --d* | -d ) 664603fc0a3Smrg debug=: ;; 665603fc0a3Smrg --quiet | --q* | --silent | --s* | -q ) 666603fc0a3Smrg lt_cl_silent=: ;; 667603fc0a3Smrg 668603fc0a3Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 669603fc0a3SmrgTry '$[0] --help' for more information.]) ;; 670603fc0a3Smrg 671603fc0a3Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 672603fc0a3SmrgTry '$[0] --help' for more information.]) ;; 673603fc0a3Smrg esac 674603fc0a3Smrg shift 675603fc0a3Smrgdone 676603fc0a3Smrg 677603fc0a3Smrgif $lt_cl_silent; then 678603fc0a3Smrg exec AS_MESSAGE_FD>/dev/null 679603fc0a3Smrgfi 680603fc0a3Smrg_LTEOF 681603fc0a3Smrg 682603fc0a3Smrgcat >>"$CONFIG_LT" <<_LTEOF 683603fc0a3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 684603fc0a3Smrg_LTEOF 685603fc0a3Smrg 686603fc0a3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 687603fc0a3SmrgAC_MSG_NOTICE([creating $ofile]) 688603fc0a3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 689603fc0a3SmrgAS_EXIT(0) 690603fc0a3Smrg_LTEOF 691603fc0a3Smrgchmod +x "$CONFIG_LT" 692603fc0a3Smrg 693603fc0a3Smrg# configure is writing to config.log, but config.lt does its own redirection, 694603fc0a3Smrg# appending to config.log, which fails on DOS, as config.log is still kept 695603fc0a3Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 696603fc0a3Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 697603fc0a3Smrglt_cl_success=: 698603fc0a3Smrgtest yes = "$silent" && 699603fc0a3Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 700603fc0a3Smrgexec AS_MESSAGE_LOG_FD>/dev/null 701603fc0a3Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 702603fc0a3Smrgexec AS_MESSAGE_LOG_FD>>config.log 703603fc0a3Smrg$lt_cl_success || AS_EXIT(1) 704603fc0a3Smrg])# LT_OUTPUT 705603fc0a3Smrg 706603fc0a3Smrg 707603fc0a3Smrg# _LT_CONFIG(TAG) 708603fc0a3Smrg# --------------- 709603fc0a3Smrg# If TAG is the built-in tag, create an initial libtool script with a 710603fc0a3Smrg# default configuration from the untagged config vars. Otherwise add code 711603fc0a3Smrg# to config.status for appending the configuration named by TAG from the 712603fc0a3Smrg# matching tagged config vars. 713603fc0a3Smrgm4_defun([_LT_CONFIG], 714603fc0a3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 715603fc0a3Smrg_LT_CONFIG_SAVE_COMMANDS([ 716603fc0a3Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 717603fc0a3Smrg m4_if(_LT_TAG, [C], [ 718603fc0a3Smrg # See if we are running on zsh, and set the options that allow our 719603fc0a3Smrg # commands through without removal of \ escapes. 720603fc0a3Smrg if test -n "${ZSH_VERSION+set}"; then 721603fc0a3Smrg setopt NO_GLOB_SUBST 722603fc0a3Smrg fi 723603fc0a3Smrg 724603fc0a3Smrg cfgfile=${ofile}T 725603fc0a3Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 726603fc0a3Smrg $RM "$cfgfile" 727603fc0a3Smrg 728603fc0a3Smrg cat <<_LT_EOF >> "$cfgfile" 729603fc0a3Smrg#! $SHELL 730603fc0a3Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 731603fc0a3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 732603fc0a3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 733603fc0a3Smrg 734603fc0a3Smrg# Provide generalized library-building support services. 735603fc0a3Smrg# Written by Gordon Matzigkeit, 1996 736603fc0a3Smrg 737603fc0a3Smrg_LT_COPYING 738603fc0a3Smrg_LT_LIBTOOL_TAGS 739603fc0a3Smrg 740603fc0a3Smrg# Configured defaults for sys_lib_dlsearch_path munging. 741603fc0a3Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 742603fc0a3Smrg 743603fc0a3Smrg# ### BEGIN LIBTOOL CONFIG 744603fc0a3Smrg_LT_LIBTOOL_CONFIG_VARS 745603fc0a3Smrg_LT_LIBTOOL_TAG_VARS 746603fc0a3Smrg# ### END LIBTOOL CONFIG 747603fc0a3Smrg 748603fc0a3Smrg_LT_EOF 749603fc0a3Smrg 750603fc0a3Smrg cat <<'_LT_EOF' >> "$cfgfile" 751603fc0a3Smrg 752603fc0a3Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 753603fc0a3Smrg 754603fc0a3Smrg_LT_PREPARE_MUNGE_PATH_LIST 755603fc0a3Smrg_LT_PREPARE_CC_BASENAME 756603fc0a3Smrg 757603fc0a3Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 758603fc0a3Smrg 759603fc0a3Smrg_LT_EOF 760603fc0a3Smrg 761603fc0a3Smrg case $host_os in 762603fc0a3Smrg aix3*) 763603fc0a3Smrg cat <<\_LT_EOF >> "$cfgfile" 764603fc0a3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 765603fc0a3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 766603fc0a3Smrg# vanish in a puff of smoke. 767603fc0a3Smrgif test set != "${COLLECT_NAMES+set}"; then 768603fc0a3Smrg COLLECT_NAMES= 769603fc0a3Smrg export COLLECT_NAMES 770603fc0a3Smrgfi 771603fc0a3Smrg_LT_EOF 772603fc0a3Smrg ;; 773603fc0a3Smrg esac 774603fc0a3Smrg 775603fc0a3Smrg _LT_PROG_LTMAIN 776603fc0a3Smrg 777603fc0a3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 778603fc0a3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 779603fc0a3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 780603fc0a3Smrg # is reportedly fixed, but why not run on old versions too? 781603fc0a3Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 782603fc0a3Smrg || (rm -f "$cfgfile"; exit 1) 783603fc0a3Smrg 784603fc0a3Smrg mv -f "$cfgfile" "$ofile" || 785603fc0a3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 786603fc0a3Smrg chmod +x "$ofile" 787603fc0a3Smrg], 788603fc0a3Smrg[cat <<_LT_EOF >> "$ofile" 789603fc0a3Smrg 790603fc0a3Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 791603fc0a3Smrgdnl in a comment (ie after a #). 792603fc0a3Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 793603fc0a3Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 794603fc0a3Smrg# ### END LIBTOOL TAG CONFIG: $1 795603fc0a3Smrg_LT_EOF 796603fc0a3Smrg])dnl /m4_if 797603fc0a3Smrg], 798603fc0a3Smrg[m4_if([$1], [], [ 799603fc0a3Smrg PACKAGE='$PACKAGE' 800603fc0a3Smrg VERSION='$VERSION' 801603fc0a3Smrg RM='$RM' 802603fc0a3Smrg ofile='$ofile'], []) 803603fc0a3Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 804603fc0a3Smrg])# _LT_CONFIG 805603fc0a3Smrg 806603fc0a3Smrg 807603fc0a3Smrg# LT_SUPPORTED_TAG(TAG) 808603fc0a3Smrg# --------------------- 809603fc0a3Smrg# Trace this macro to discover what tags are supported by the libtool 810603fc0a3Smrg# --tag option, using: 811603fc0a3Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 812603fc0a3SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 813603fc0a3Smrg 814603fc0a3Smrg 815603fc0a3Smrg# C support is built-in for now 816603fc0a3Smrgm4_define([_LT_LANG_C_enabled], []) 817603fc0a3Smrgm4_define([_LT_TAGS], []) 818603fc0a3Smrg 819603fc0a3Smrg 820603fc0a3Smrg# LT_LANG(LANG) 821603fc0a3Smrg# ------------- 822603fc0a3Smrg# Enable libtool support for the given language if not already enabled. 823603fc0a3SmrgAC_DEFUN([LT_LANG], 824603fc0a3Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 825603fc0a3Smrgm4_case([$1], 826603fc0a3Smrg [C], [_LT_LANG(C)], 827603fc0a3Smrg [C++], [_LT_LANG(CXX)], 828603fc0a3Smrg [Go], [_LT_LANG(GO)], 829603fc0a3Smrg [Java], [_LT_LANG(GCJ)], 830603fc0a3Smrg [Fortran 77], [_LT_LANG(F77)], 831603fc0a3Smrg [Fortran], [_LT_LANG(FC)], 832603fc0a3Smrg [Windows Resource], [_LT_LANG(RC)], 833603fc0a3Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 834603fc0a3Smrg [_LT_LANG($1)], 835603fc0a3Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 836603fc0a3Smrg])# LT_LANG 837603fc0a3Smrg 838603fc0a3Smrg 839603fc0a3Smrg# _LT_LANG(LANGNAME) 840603fc0a3Smrg# ------------------ 841603fc0a3Smrgm4_defun([_LT_LANG], 842603fc0a3Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 843603fc0a3Smrg [LT_SUPPORTED_TAG([$1])dnl 844603fc0a3Smrg m4_append([_LT_TAGS], [$1 ])dnl 845603fc0a3Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 846603fc0a3Smrg _LT_LANG_$1_CONFIG($1)])dnl 847603fc0a3Smrg])# _LT_LANG 848603fc0a3Smrg 849603fc0a3Smrg 850603fc0a3Smrgm4_ifndef([AC_PROG_GO], [ 851603fc0a3Smrg############################################################ 852603fc0a3Smrg# NOTE: This macro has been submitted for inclusion into # 853603fc0a3Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 854603fc0a3Smrg# a released version of Autoconf we should remove this # 855603fc0a3Smrg# macro and use it instead. # 856603fc0a3Smrg############################################################ 857603fc0a3Smrgm4_defun([AC_PROG_GO], 858603fc0a3Smrg[AC_LANG_PUSH(Go)dnl 859603fc0a3SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 860603fc0a3SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 861603fc0a3Smrg_AC_ARG_VAR_LDFLAGS()dnl 862603fc0a3SmrgAC_CHECK_TOOL(GOC, gccgo) 863603fc0a3Smrgif test -z "$GOC"; then 864603fc0a3Smrg if test -n "$ac_tool_prefix"; then 865603fc0a3Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 866603fc0a3Smrg fi 867603fc0a3Smrgfi 868603fc0a3Smrgif test -z "$GOC"; then 869603fc0a3Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 870603fc0a3Smrgfi 871603fc0a3Smrg])#m4_defun 872603fc0a3Smrg])#m4_ifndef 873603fc0a3Smrg 874603fc0a3Smrg 875603fc0a3Smrg# _LT_LANG_DEFAULT_CONFIG 876603fc0a3Smrg# ----------------------- 877603fc0a3Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 878603fc0a3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 879603fc0a3Smrg [LT_LANG(CXX)], 880603fc0a3Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 881603fc0a3Smrg 882603fc0a3SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 883603fc0a3Smrg [LT_LANG(F77)], 884603fc0a3Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 885603fc0a3Smrg 886603fc0a3SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 887603fc0a3Smrg [LT_LANG(FC)], 888603fc0a3Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 889603fc0a3Smrg 890603fc0a3Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 891603fc0a3Smrgdnl pulling things in needlessly. 892603fc0a3SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 893603fc0a3Smrg [LT_LANG(GCJ)], 894603fc0a3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 895603fc0a3Smrg [LT_LANG(GCJ)], 896603fc0a3Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 897603fc0a3Smrg [LT_LANG(GCJ)], 898603fc0a3Smrg [m4_ifdef([AC_PROG_GCJ], 899603fc0a3Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 900603fc0a3Smrg m4_ifdef([A][M_PROG_GCJ], 901603fc0a3Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 902603fc0a3Smrg m4_ifdef([LT_PROG_GCJ], 903603fc0a3Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 904603fc0a3Smrg 905603fc0a3SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 906603fc0a3Smrg [LT_LANG(GO)], 907603fc0a3Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 908603fc0a3Smrg 909603fc0a3SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 910603fc0a3Smrg [LT_LANG(RC)], 911603fc0a3Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 912603fc0a3Smrg])# _LT_LANG_DEFAULT_CONFIG 913603fc0a3Smrg 914603fc0a3Smrg# Obsolete macros: 915603fc0a3SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 916603fc0a3SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 917603fc0a3SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 918603fc0a3SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 919603fc0a3SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 920603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 921603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 922603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 923603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 924603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 925603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 926603fc0a3Smrg 927603fc0a3Smrg 928603fc0a3Smrg# _LT_TAG_COMPILER 929603fc0a3Smrg# ---------------- 930603fc0a3Smrgm4_defun([_LT_TAG_COMPILER], 931603fc0a3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 932603fc0a3Smrg 933603fc0a3Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 934603fc0a3Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 935603fc0a3Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 936603fc0a3Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 937603fc0a3Smrg 938603fc0a3Smrg# If no C compiler was specified, use CC. 939603fc0a3SmrgLTCC=${LTCC-"$CC"} 940603fc0a3Smrg 941603fc0a3Smrg# If no C compiler flags were specified, use CFLAGS. 942603fc0a3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 943603fc0a3Smrg 944603fc0a3Smrg# Allow CC to be a program name with arguments. 945603fc0a3Smrgcompiler=$CC 946603fc0a3Smrg])# _LT_TAG_COMPILER 947603fc0a3Smrg 948603fc0a3Smrg 949603fc0a3Smrg# _LT_COMPILER_BOILERPLATE 950603fc0a3Smrg# ------------------------ 951603fc0a3Smrg# Check for compiler boilerplate output or warnings with 952603fc0a3Smrg# the simple compiler test code. 953603fc0a3Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 954603fc0a3Smrg[m4_require([_LT_DECL_SED])dnl 955603fc0a3Smrgac_outfile=conftest.$ac_objext 956603fc0a3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 957603fc0a3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 958603fc0a3Smrg_lt_compiler_boilerplate=`cat conftest.err` 959603fc0a3Smrg$RM conftest* 960603fc0a3Smrg])# _LT_COMPILER_BOILERPLATE 961603fc0a3Smrg 962603fc0a3Smrg 963603fc0a3Smrg# _LT_LINKER_BOILERPLATE 964603fc0a3Smrg# ---------------------- 965603fc0a3Smrg# Check for linker boilerplate output or warnings with 966603fc0a3Smrg# the simple link test code. 967603fc0a3Smrgm4_defun([_LT_LINKER_BOILERPLATE], 968603fc0a3Smrg[m4_require([_LT_DECL_SED])dnl 969603fc0a3Smrgac_outfile=conftest.$ac_objext 970603fc0a3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 971603fc0a3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972603fc0a3Smrg_lt_linker_boilerplate=`cat conftest.err` 973603fc0a3Smrg$RM -r conftest* 974603fc0a3Smrg])# _LT_LINKER_BOILERPLATE 975603fc0a3Smrg 976603fc0a3Smrg# _LT_REQUIRED_DARWIN_CHECKS 977603fc0a3Smrg# ------------------------- 978603fc0a3Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 979603fc0a3Smrg case $host_os in 980603fc0a3Smrg rhapsody* | darwin*) 981603fc0a3Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 982603fc0a3Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 983603fc0a3Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 984603fc0a3Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 985603fc0a3Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 986603fc0a3Smrg _LT_DECL([], [DSYMUTIL], [1], 987603fc0a3Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 988603fc0a3Smrg _LT_DECL([], [NMEDIT], [1], 989603fc0a3Smrg [Tool to change global to local symbols on Mac OS X]) 990603fc0a3Smrg _LT_DECL([], [LIPO], [1], 991603fc0a3Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 992603fc0a3Smrg _LT_DECL([], [OTOOL], [1], 993603fc0a3Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 994603fc0a3Smrg _LT_DECL([], [OTOOL64], [1], 995603fc0a3Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 996603fc0a3Smrg 997603fc0a3Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 998603fc0a3Smrg [lt_cv_apple_cc_single_mod=no 999603fc0a3Smrg if test -z "$LT_MULTI_MODULE"; then 1000603fc0a3Smrg # By default we will add the -single_module flag. You can override 1001603fc0a3Smrg # by either setting the environment variable LT_MULTI_MODULE 1002603fc0a3Smrg # non-empty at configure time, or by adding -multi_module to the 1003603fc0a3Smrg # link flags. 1004603fc0a3Smrg rm -rf libconftest.dylib* 1005603fc0a3Smrg echo "int foo(void){return 1;}" > conftest.c 1006603fc0a3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1007603fc0a3Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1008603fc0a3Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009603fc0a3Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1010603fc0a3Smrg _lt_result=$? 1011603fc0a3Smrg # If there is a non-empty error log, and "single_module" 1012603fc0a3Smrg # appears in it, assume the flag caused a linker warning 1013603fc0a3Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1014603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1015603fc0a3Smrg # Otherwise, if the output was created with a 0 exit code from 1016603fc0a3Smrg # the compiler, it worked. 1017603fc0a3Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1018603fc0a3Smrg lt_cv_apple_cc_single_mod=yes 1019603fc0a3Smrg else 1020603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1021603fc0a3Smrg fi 1022603fc0a3Smrg rm -rf libconftest.dylib* 1023603fc0a3Smrg rm -f conftest.* 1024603fc0a3Smrg fi]) 1025603fc0a3Smrg 1026603fc0a3Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1027603fc0a3Smrg [lt_cv_ld_exported_symbols_list], 1028603fc0a3Smrg [lt_cv_ld_exported_symbols_list=no 1029603fc0a3Smrg save_LDFLAGS=$LDFLAGS 1030603fc0a3Smrg echo "_main" > conftest.sym 1031603fc0a3Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1032603fc0a3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1033603fc0a3Smrg [lt_cv_ld_exported_symbols_list=yes], 1034603fc0a3Smrg [lt_cv_ld_exported_symbols_list=no]) 1035603fc0a3Smrg LDFLAGS=$save_LDFLAGS 1036603fc0a3Smrg ]) 1037603fc0a3Smrg 1038603fc0a3Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1039603fc0a3Smrg [lt_cv_ld_force_load=no 1040603fc0a3Smrg cat > conftest.c << _LT_EOF 1041603fc0a3Smrgint forced_loaded() { return 2;} 1042603fc0a3Smrg_LT_EOF 1043603fc0a3Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1044603fc0a3Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1045603fc0a3Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1046603fc0a3Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1047603fc0a3Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1048603fc0a3Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1049603fc0a3Smrg cat > conftest.c << _LT_EOF 1050603fc0a3Smrgint main() { return 0;} 1051603fc0a3Smrg_LT_EOF 1052603fc0a3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1053603fc0a3Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1054603fc0a3Smrg _lt_result=$? 1055603fc0a3Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1056603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1057603fc0a3Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1058603fc0a3Smrg lt_cv_ld_force_load=yes 1059603fc0a3Smrg else 1060603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1061603fc0a3Smrg fi 1062603fc0a3Smrg rm -f conftest.err libconftest.a conftest conftest.c 1063603fc0a3Smrg rm -rf conftest.dSYM 1064603fc0a3Smrg ]) 1065603fc0a3Smrg case $host_os in 1066603fc0a3Smrg rhapsody* | darwin1.[[012]]) 1067603fc0a3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1068603fc0a3Smrg darwin1.*) 1069603fc0a3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1070603fc0a3Smrg darwin*) # darwin 5.x on 1071603fc0a3Smrg # if running on 10.5 or later, the deployment target defaults 1072603fc0a3Smrg # to the OS version, if on x86, and 10.4, the deployment 1073603fc0a3Smrg # target defaults to 10.4. Don't you love it? 1074603fc0a3Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1075603fc0a3Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1076603fc0a3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1077603fc0a3Smrg 10.[[012]][[,.]]*) 1078603fc0a3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1079603fc0a3Smrg 10.*) 1080603fc0a3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1081603fc0a3Smrg esac 1082603fc0a3Smrg ;; 1083603fc0a3Smrg esac 1084603fc0a3Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1085603fc0a3Smrg _lt_dar_single_mod='$single_module' 1086603fc0a3Smrg fi 1087603fc0a3Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1088603fc0a3Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1089603fc0a3Smrg else 1090603fc0a3Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1091603fc0a3Smrg fi 1092603fc0a3Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1093603fc0a3Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1094603fc0a3Smrg else 1095603fc0a3Smrg _lt_dsymutil= 1096603fc0a3Smrg fi 1097603fc0a3Smrg ;; 1098603fc0a3Smrg esac 1099603fc0a3Smrg]) 1100603fc0a3Smrg 1101603fc0a3Smrg 1102603fc0a3Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1103603fc0a3Smrg# --------------------------------- 1104603fc0a3Smrg# Checks for linker and compiler features on darwin 1105603fc0a3Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1106603fc0a3Smrg[ 1107603fc0a3Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1108603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1109603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1110603fc0a3Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1111603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1112603fc0a3Smrg if test yes = "$lt_cv_ld_force_load"; then 1113603fc0a3Smrg _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\"`' 1114603fc0a3Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1115603fc0a3Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1116603fc0a3Smrg else 1117603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1118603fc0a3Smrg fi 1119603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1120603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1121603fc0a3Smrg case $cc_basename in 1122603fc0a3Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1123603fc0a3Smrg *) _lt_dar_can_shared=$GCC ;; 1124603fc0a3Smrg esac 1125603fc0a3Smrg if test yes = "$_lt_dar_can_shared"; then 1126603fc0a3Smrg output_verbose_link_cmd=func_echo_all 1127603fc0a3Smrg _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" 1128603fc0a3Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1129603fc0a3Smrg _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" 1130603fc0a3Smrg _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" 1131603fc0a3Smrg m4_if([$1], [CXX], 1132603fc0a3Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1133603fc0a3Smrg _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" 1134603fc0a3Smrg _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" 1135603fc0a3Smrg fi 1136603fc0a3Smrg],[]) 1137603fc0a3Smrg else 1138603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1139603fc0a3Smrg fi 1140603fc0a3Smrg]) 1141603fc0a3Smrg 1142603fc0a3Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1143603fc0a3Smrg# ---------------------------------- 1144603fc0a3Smrg# Links a minimal program and checks the executable 1145603fc0a3Smrg# for the system default hardcoded library path. In most cases, 1146603fc0a3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1147603fc0a3Smrg# the location of the communication and MPI libs are included too. 1148603fc0a3Smrg# If we don't find anything, use the default library path according 1149603fc0a3Smrg# to the aix ld manual. 1150603fc0a3Smrg# Store the results from the different compilers for each TAGNAME. 1151603fc0a3Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1152603fc0a3Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1153603fc0a3Smrg[m4_require([_LT_DECL_SED])dnl 1154603fc0a3Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1155603fc0a3Smrg aix_libpath=$lt_cv_aix_libpath 1156603fc0a3Smrgelse 1157603fc0a3Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1158603fc0a3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1159603fc0a3Smrg lt_aix_libpath_sed='[ 1160603fc0a3Smrg /Import File Strings/,/^$/ { 1161603fc0a3Smrg /^0/ { 1162603fc0a3Smrg s/^0 *\([^ ]*\) *$/\1/ 1163603fc0a3Smrg p 1164603fc0a3Smrg } 1165603fc0a3Smrg }]' 1166603fc0a3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1167603fc0a3Smrg # Check for a 64-bit object if we didn't find anything. 1168603fc0a3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1169603fc0a3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1170603fc0a3Smrg fi],[]) 1171603fc0a3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1172603fc0a3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1173603fc0a3Smrg fi 1174603fc0a3Smrg ]) 1175603fc0a3Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1176603fc0a3Smrgfi 1177603fc0a3Smrg])# _LT_SYS_MODULE_PATH_AIX 1178603fc0a3Smrg 1179603fc0a3Smrg 1180603fc0a3Smrg# _LT_SHELL_INIT(ARG) 1181603fc0a3Smrg# ------------------- 1182603fc0a3Smrgm4_define([_LT_SHELL_INIT], 1183603fc0a3Smrg[m4_divert_text([M4SH-INIT], [$1 1184603fc0a3Smrg])])# _LT_SHELL_INIT 1185603fc0a3Smrg 1186603fc0a3Smrg 1187603fc0a3Smrg 1188603fc0a3Smrg# _LT_PROG_ECHO_BACKSLASH 1189603fc0a3Smrg# ----------------------- 1190603fc0a3Smrg# Find how we can fake an echo command that does not interpret backslash. 1191603fc0a3Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1192603fc0a3Smrg# of the generated configure script that will find a shell with a builtin 1193603fc0a3Smrg# printf (that we can use as an echo command). 1194603fc0a3Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1195603fc0a3Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1196603fc0a3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1197603fc0a3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1198603fc0a3Smrg 1199603fc0a3SmrgAC_MSG_CHECKING([how to print strings]) 1200603fc0a3Smrg# Test print first, because it will be a builtin if present. 1201603fc0a3Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1202603fc0a3Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1203603fc0a3Smrg ECHO='print -r --' 1204603fc0a3Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1205603fc0a3Smrg ECHO='printf %s\n' 1206603fc0a3Smrgelse 1207603fc0a3Smrg # Use this function as a fallback that always works. 1208603fc0a3Smrg func_fallback_echo () 1209603fc0a3Smrg { 1210603fc0a3Smrg eval 'cat <<_LTECHO_EOF 1211603fc0a3Smrg$[]1 1212603fc0a3Smrg_LTECHO_EOF' 1213603fc0a3Smrg } 1214603fc0a3Smrg ECHO='func_fallback_echo' 1215603fc0a3Smrgfi 1216603fc0a3Smrg 1217603fc0a3Smrg# func_echo_all arg... 1218603fc0a3Smrg# Invoke $ECHO with all args, space-separated. 1219603fc0a3Smrgfunc_echo_all () 1220603fc0a3Smrg{ 1221603fc0a3Smrg $ECHO "$*" 1222603fc0a3Smrg} 1223603fc0a3Smrg 1224603fc0a3Smrgcase $ECHO in 1225603fc0a3Smrg printf*) AC_MSG_RESULT([printf]) ;; 1226603fc0a3Smrg print*) AC_MSG_RESULT([print -r]) ;; 1227603fc0a3Smrg *) AC_MSG_RESULT([cat]) ;; 1228603fc0a3Smrgesac 1229603fc0a3Smrg 1230603fc0a3Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1231603fc0a3Smrg[_AS_DETECT_SUGGESTED([ 1232603fc0a3Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1233603fc0a3Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1234603fc0a3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1235603fc0a3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1236603fc0a3Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1237603fc0a3Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1238603fc0a3Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1239603fc0a3Smrg 1240603fc0a3Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1241603fc0a3Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1242603fc0a3Smrg])# _LT_PROG_ECHO_BACKSLASH 1243603fc0a3Smrg 1244603fc0a3Smrg 1245603fc0a3Smrg# _LT_WITH_SYSROOT 1246603fc0a3Smrg# ---------------- 1247603fc0a3SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1248603fc0a3Smrg[AC_MSG_CHECKING([for sysroot]) 1249603fc0a3SmrgAC_ARG_WITH([sysroot], 1250603fc0a3Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1251603fc0a3Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1252603fc0a3Smrg if not specified).])], 1253603fc0a3Smrg[], [with_sysroot=no]) 1254603fc0a3Smrg 1255603fc0a3Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1256603fc0a3Smrgdnl in case the user passed a directory name. 1257603fc0a3Smrglt_sysroot= 1258603fc0a3Smrgcase $with_sysroot in #( 1259603fc0a3Smrg yes) 1260603fc0a3Smrg if test yes = "$GCC"; then 1261603fc0a3Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1262603fc0a3Smrg fi 1263603fc0a3Smrg ;; #( 1264603fc0a3Smrg /*) 1265603fc0a3Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1266603fc0a3Smrg ;; #( 1267603fc0a3Smrg no|'') 1268603fc0a3Smrg ;; #( 1269603fc0a3Smrg *) 1270603fc0a3Smrg AC_MSG_RESULT([$with_sysroot]) 1271603fc0a3Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1272603fc0a3Smrg ;; 1273603fc0a3Smrgesac 1274603fc0a3Smrg 1275603fc0a3Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1276603fc0a3Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1277603fc0a3Smrg[dependent libraries, and where our libraries should be installed.])]) 1278603fc0a3Smrg 1279603fc0a3Smrg# _LT_ENABLE_LOCK 1280603fc0a3Smrg# --------------- 1281603fc0a3Smrgm4_defun([_LT_ENABLE_LOCK], 1282603fc0a3Smrg[AC_ARG_ENABLE([libtool-lock], 1283603fc0a3Smrg [AS_HELP_STRING([--disable-libtool-lock], 1284603fc0a3Smrg [avoid locking (might break parallel builds)])]) 1285603fc0a3Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1286603fc0a3Smrg 1287603fc0a3Smrg# Some flags need to be propagated to the compiler or linker for good 1288603fc0a3Smrg# libtool support. 1289603fc0a3Smrgcase $host in 1290603fc0a3Smrgia64-*-hpux*) 1291603fc0a3Smrg # Find out what ABI is being produced by ac_compile, and set mode 1292603fc0a3Smrg # options accordingly. 1293603fc0a3Smrg echo 'int i;' > conftest.$ac_ext 1294603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 1295603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1296603fc0a3Smrg *ELF-32*) 1297603fc0a3Smrg HPUX_IA64_MODE=32 1298603fc0a3Smrg ;; 1299603fc0a3Smrg *ELF-64*) 1300603fc0a3Smrg HPUX_IA64_MODE=64 1301603fc0a3Smrg ;; 1302603fc0a3Smrg esac 1303603fc0a3Smrg fi 1304603fc0a3Smrg rm -rf conftest* 1305603fc0a3Smrg ;; 1306603fc0a3Smrg*-*-irix6*) 1307603fc0a3Smrg # Find out what ABI is being produced by ac_compile, and set linker 1308603fc0a3Smrg # options accordingly. 1309603fc0a3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1310603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 1311603fc0a3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1312603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1313603fc0a3Smrg *32-bit*) 1314603fc0a3Smrg LD="${LD-ld} -melf32bsmip" 1315603fc0a3Smrg ;; 1316603fc0a3Smrg *N32*) 1317603fc0a3Smrg LD="${LD-ld} -melf32bmipn32" 1318603fc0a3Smrg ;; 1319603fc0a3Smrg *64-bit*) 1320603fc0a3Smrg LD="${LD-ld} -melf64bmip" 1321603fc0a3Smrg ;; 1322603fc0a3Smrg esac 1323603fc0a3Smrg else 1324603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1325603fc0a3Smrg *32-bit*) 1326603fc0a3Smrg LD="${LD-ld} -32" 1327603fc0a3Smrg ;; 1328603fc0a3Smrg *N32*) 1329603fc0a3Smrg LD="${LD-ld} -n32" 1330603fc0a3Smrg ;; 1331603fc0a3Smrg *64-bit*) 1332603fc0a3Smrg LD="${LD-ld} -64" 1333603fc0a3Smrg ;; 1334603fc0a3Smrg esac 1335603fc0a3Smrg fi 1336603fc0a3Smrg fi 1337603fc0a3Smrg rm -rf conftest* 1338603fc0a3Smrg ;; 1339603fc0a3Smrg 1340603fc0a3Smrgmips64*-*linux*) 1341603fc0a3Smrg # Find out what ABI is being produced by ac_compile, and set linker 1342603fc0a3Smrg # options accordingly. 1343603fc0a3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1344603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 1345603fc0a3Smrg emul=elf 1346603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1347603fc0a3Smrg *32-bit*) 1348603fc0a3Smrg emul="${emul}32" 1349603fc0a3Smrg ;; 1350603fc0a3Smrg *64-bit*) 1351603fc0a3Smrg emul="${emul}64" 1352603fc0a3Smrg ;; 1353603fc0a3Smrg esac 1354603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1355603fc0a3Smrg *MSB*) 1356603fc0a3Smrg emul="${emul}btsmip" 1357603fc0a3Smrg ;; 1358603fc0a3Smrg *LSB*) 1359603fc0a3Smrg emul="${emul}ltsmip" 1360603fc0a3Smrg ;; 1361603fc0a3Smrg esac 1362603fc0a3Smrg case `/usr/bin/file conftest.$ac_objext` in 1363603fc0a3Smrg *N32*) 1364603fc0a3Smrg emul="${emul}n32" 1365603fc0a3Smrg ;; 1366603fc0a3Smrg esac 1367603fc0a3Smrg LD="${LD-ld} -m $emul" 1368603fc0a3Smrg fi 1369603fc0a3Smrg rm -rf conftest* 1370603fc0a3Smrg ;; 1371603fc0a3Smrg 1372603fc0a3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1373603fc0a3Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1374603fc0a3Smrg # Find out what ABI is being produced by ac_compile, and set linker 1375603fc0a3Smrg # options accordingly. Note that the listed cases only cover the 1376603fc0a3Smrg # situations where additional linker options are needed (such as when 1377603fc0a3Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1378603fc0a3Smrg # vice versa); the common cases where no linker options are needed do 1379603fc0a3Smrg # not appear in the list. 1380603fc0a3Smrg echo 'int i;' > conftest.$ac_ext 1381603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 1382603fc0a3Smrg case `/usr/bin/file conftest.o` in 1383603fc0a3Smrg *32-bit*) 1384603fc0a3Smrg case $host in 1385603fc0a3Smrg x86_64-*kfreebsd*-gnu) 1386603fc0a3Smrg LD="${LD-ld} -m elf_i386_fbsd" 1387603fc0a3Smrg ;; 1388603fc0a3Smrg x86_64-*linux*) 1389603fc0a3Smrg case `/usr/bin/file conftest.o` in 1390603fc0a3Smrg *x86-64*) 1391603fc0a3Smrg LD="${LD-ld} -m elf32_x86_64" 1392603fc0a3Smrg ;; 1393603fc0a3Smrg *) 1394603fc0a3Smrg LD="${LD-ld} -m elf_i386" 1395603fc0a3Smrg ;; 1396603fc0a3Smrg esac 1397603fc0a3Smrg ;; 1398603fc0a3Smrg powerpc64le-*linux*) 1399603fc0a3Smrg LD="${LD-ld} -m elf32lppclinux" 1400603fc0a3Smrg ;; 1401603fc0a3Smrg powerpc64-*linux*) 1402603fc0a3Smrg LD="${LD-ld} -m elf32ppclinux" 1403603fc0a3Smrg ;; 1404603fc0a3Smrg s390x-*linux*) 1405603fc0a3Smrg LD="${LD-ld} -m elf_s390" 1406603fc0a3Smrg ;; 1407603fc0a3Smrg sparc64-*linux*) 1408603fc0a3Smrg LD="${LD-ld} -m elf32_sparc" 1409603fc0a3Smrg ;; 1410603fc0a3Smrg esac 1411603fc0a3Smrg ;; 1412603fc0a3Smrg *64-bit*) 1413603fc0a3Smrg case $host in 1414603fc0a3Smrg x86_64-*kfreebsd*-gnu) 1415603fc0a3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1416603fc0a3Smrg ;; 1417603fc0a3Smrg x86_64-*linux*) 1418603fc0a3Smrg LD="${LD-ld} -m elf_x86_64" 1419603fc0a3Smrg ;; 1420603fc0a3Smrg powerpcle-*linux*) 1421603fc0a3Smrg LD="${LD-ld} -m elf64lppc" 1422603fc0a3Smrg ;; 1423603fc0a3Smrg powerpc-*linux*) 1424603fc0a3Smrg LD="${LD-ld} -m elf64ppc" 1425603fc0a3Smrg ;; 1426603fc0a3Smrg s390*-*linux*|s390*-*tpf*) 1427603fc0a3Smrg LD="${LD-ld} -m elf64_s390" 1428603fc0a3Smrg ;; 1429603fc0a3Smrg sparc*-*linux*) 1430603fc0a3Smrg LD="${LD-ld} -m elf64_sparc" 1431603fc0a3Smrg ;; 1432603fc0a3Smrg esac 1433603fc0a3Smrg ;; 1434603fc0a3Smrg esac 1435603fc0a3Smrg fi 1436603fc0a3Smrg rm -rf conftest* 1437603fc0a3Smrg ;; 1438603fc0a3Smrg 1439603fc0a3Smrg*-*-sco3.2v5*) 1440603fc0a3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1441603fc0a3Smrg SAVE_CFLAGS=$CFLAGS 1442603fc0a3Smrg CFLAGS="$CFLAGS -belf" 1443603fc0a3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1444603fc0a3Smrg [AC_LANG_PUSH(C) 1445603fc0a3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1446603fc0a3Smrg AC_LANG_POP]) 1447603fc0a3Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1448603fc0a3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1449603fc0a3Smrg CFLAGS=$SAVE_CFLAGS 1450603fc0a3Smrg fi 1451603fc0a3Smrg ;; 1452603fc0a3Smrg*-*solaris*) 1453603fc0a3Smrg # Find out what ABI is being produced by ac_compile, and set linker 1454603fc0a3Smrg # options accordingly. 1455603fc0a3Smrg echo 'int i;' > conftest.$ac_ext 1456603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 1457603fc0a3Smrg case `/usr/bin/file conftest.o` in 1458603fc0a3Smrg *64-bit*) 1459603fc0a3Smrg case $lt_cv_prog_gnu_ld in 1460603fc0a3Smrg yes*) 1461603fc0a3Smrg case $host in 1462603fc0a3Smrg i?86-*-solaris*|x86_64-*-solaris*) 1463603fc0a3Smrg LD="${LD-ld} -m elf_x86_64" 1464603fc0a3Smrg ;; 1465603fc0a3Smrg sparc*-*-solaris*) 1466603fc0a3Smrg LD="${LD-ld} -m elf64_sparc" 1467603fc0a3Smrg ;; 1468603fc0a3Smrg esac 1469603fc0a3Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1470603fc0a3Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1471603fc0a3Smrg LD=${LD-ld}_sol2 1472603fc0a3Smrg fi 1473603fc0a3Smrg ;; 1474603fc0a3Smrg *) 1475603fc0a3Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1476603fc0a3Smrg LD="${LD-ld} -64" 1477603fc0a3Smrg fi 1478603fc0a3Smrg ;; 1479603fc0a3Smrg esac 1480603fc0a3Smrg ;; 1481603fc0a3Smrg esac 1482603fc0a3Smrg fi 1483603fc0a3Smrg rm -rf conftest* 1484603fc0a3Smrg ;; 1485603fc0a3Smrgesac 1486603fc0a3Smrg 1487603fc0a3Smrgneed_locks=$enable_libtool_lock 1488603fc0a3Smrg])# _LT_ENABLE_LOCK 1489603fc0a3Smrg 1490603fc0a3Smrg 1491603fc0a3Smrg# _LT_PROG_AR 1492603fc0a3Smrg# ----------- 1493603fc0a3Smrgm4_defun([_LT_PROG_AR], 1494603fc0a3Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1495603fc0a3Smrg: ${AR=ar} 1496603fc0a3Smrg: ${AR_FLAGS=cru} 1497603fc0a3Smrg_LT_DECL([], [AR], [1], [The archiver]) 1498603fc0a3Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1499603fc0a3Smrg 1500603fc0a3SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1501603fc0a3Smrg [lt_cv_ar_at_file=no 1502603fc0a3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1503603fc0a3Smrg [echo conftest.$ac_objext > conftest.lst 1504603fc0a3Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1505603fc0a3Smrg AC_TRY_EVAL([lt_ar_try]) 1506603fc0a3Smrg if test 0 -eq "$ac_status"; then 1507603fc0a3Smrg # Ensure the archiver fails upon bogus file names. 1508603fc0a3Smrg rm -f conftest.$ac_objext libconftest.a 1509603fc0a3Smrg AC_TRY_EVAL([lt_ar_try]) 1510603fc0a3Smrg if test 0 -ne "$ac_status"; then 1511603fc0a3Smrg lt_cv_ar_at_file=@ 1512603fc0a3Smrg fi 1513603fc0a3Smrg fi 1514603fc0a3Smrg rm -f conftest.* libconftest.a 1515603fc0a3Smrg ]) 1516603fc0a3Smrg ]) 1517603fc0a3Smrg 1518603fc0a3Smrgif test no = "$lt_cv_ar_at_file"; then 1519603fc0a3Smrg archiver_list_spec= 1520603fc0a3Smrgelse 1521603fc0a3Smrg archiver_list_spec=$lt_cv_ar_at_file 1522603fc0a3Smrgfi 1523603fc0a3Smrg_LT_DECL([], [archiver_list_spec], [1], 1524603fc0a3Smrg [How to feed a file listing to the archiver]) 1525603fc0a3Smrg])# _LT_PROG_AR 1526603fc0a3Smrg 1527603fc0a3Smrg 1528603fc0a3Smrg# _LT_CMD_OLD_ARCHIVE 1529603fc0a3Smrg# ------------------- 1530603fc0a3Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1531603fc0a3Smrg[_LT_PROG_AR 1532603fc0a3Smrg 1533603fc0a3SmrgAC_CHECK_TOOL(STRIP, strip, :) 1534603fc0a3Smrgtest -z "$STRIP" && STRIP=: 1535603fc0a3Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1536603fc0a3Smrg 1537603fc0a3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1538603fc0a3Smrgtest -z "$RANLIB" && RANLIB=: 1539603fc0a3Smrg_LT_DECL([], [RANLIB], [1], 1540603fc0a3Smrg [Commands used to install an old-style archive]) 1541603fc0a3Smrg 1542603fc0a3Smrg# Determine commands to create old-style static archives. 1543603fc0a3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1544603fc0a3Smrgold_postinstall_cmds='chmod 644 $oldlib' 1545603fc0a3Smrgold_postuninstall_cmds= 1546603fc0a3Smrg 1547603fc0a3Smrgif test -n "$RANLIB"; then 1548603fc0a3Smrg case $host_os in 1549603fc0a3Smrg bitrig* | openbsd*) 1550603fc0a3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1551603fc0a3Smrg ;; 1552603fc0a3Smrg *) 1553603fc0a3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1554603fc0a3Smrg ;; 1555603fc0a3Smrg esac 1556603fc0a3Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1557603fc0a3Smrgfi 1558603fc0a3Smrg 1559603fc0a3Smrgcase $host_os in 1560603fc0a3Smrg darwin*) 1561603fc0a3Smrg lock_old_archive_extraction=yes ;; 1562603fc0a3Smrg *) 1563603fc0a3Smrg lock_old_archive_extraction=no ;; 1564603fc0a3Smrgesac 1565603fc0a3Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1566603fc0a3Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1567603fc0a3Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1568603fc0a3Smrg [Commands used to build an old-style archive]) 1569603fc0a3Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1570603fc0a3Smrg [Whether to use a lock for old archive extraction]) 1571603fc0a3Smrg])# _LT_CMD_OLD_ARCHIVE 1572603fc0a3Smrg 1573603fc0a3Smrg 1574603fc0a3Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1575603fc0a3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1576603fc0a3Smrg# ---------------------------------------------------------------- 1577603fc0a3Smrg# Check whether the given compiler option works 1578603fc0a3SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1579603fc0a3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1580603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 1581603fc0a3SmrgAC_CACHE_CHECK([$1], [$2], 1582603fc0a3Smrg [$2=no 1583603fc0a3Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1584603fc0a3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1585603fc0a3Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1586603fc0a3Smrg # Insert the option either (1) after the last *FLAGS variable, or 1587603fc0a3Smrg # (2) before a word containing "conftest.", or (3) at the end. 1588603fc0a3Smrg # Note that $ac_compile itself does not contain backslashes and begins 1589603fc0a3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1590603fc0a3Smrg # The option is referenced via a variable to avoid confusing sed. 1591603fc0a3Smrg lt_compile=`echo "$ac_compile" | $SED \ 1592603fc0a3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1593603fc0a3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1594603fc0a3Smrg -e 's:$: $lt_compiler_flag:'` 1595603fc0a3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1596603fc0a3Smrg (eval "$lt_compile" 2>conftest.err) 1597603fc0a3Smrg ac_status=$? 1598603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1599603fc0a3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1600603fc0a3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1601603fc0a3Smrg # The compiler can only warn and ignore the option if not recognized 1602603fc0a3Smrg # So say no if there are warnings other than the usual output. 1603603fc0a3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1604603fc0a3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1605603fc0a3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1606603fc0a3Smrg $2=yes 1607603fc0a3Smrg fi 1608603fc0a3Smrg fi 1609603fc0a3Smrg $RM conftest* 1610603fc0a3Smrg]) 1611603fc0a3Smrg 1612603fc0a3Smrgif test yes = "[$]$2"; then 1613603fc0a3Smrg m4_if([$5], , :, [$5]) 1614603fc0a3Smrgelse 1615603fc0a3Smrg m4_if([$6], , :, [$6]) 1616603fc0a3Smrgfi 1617603fc0a3Smrg])# _LT_COMPILER_OPTION 1618603fc0a3Smrg 1619603fc0a3Smrg# Old name: 1620603fc0a3SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1621603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 1622603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1623603fc0a3Smrg 1624603fc0a3Smrg 1625603fc0a3Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1626603fc0a3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1627603fc0a3Smrg# ---------------------------------------------------- 1628603fc0a3Smrg# Check whether the given linker option works 1629603fc0a3SmrgAC_DEFUN([_LT_LINKER_OPTION], 1630603fc0a3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1631603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 1632603fc0a3SmrgAC_CACHE_CHECK([$1], [$2], 1633603fc0a3Smrg [$2=no 1634603fc0a3Smrg save_LDFLAGS=$LDFLAGS 1635603fc0a3Smrg LDFLAGS="$LDFLAGS $3" 1636603fc0a3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1637603fc0a3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1638603fc0a3Smrg # The linker can only warn and ignore the option if not recognized 1639603fc0a3Smrg # So say no if there are warnings 1640603fc0a3Smrg if test -s conftest.err; then 1641603fc0a3Smrg # Append any errors to the config.log. 1642603fc0a3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1643603fc0a3Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1644603fc0a3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1645603fc0a3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1646603fc0a3Smrg $2=yes 1647603fc0a3Smrg fi 1648603fc0a3Smrg else 1649603fc0a3Smrg $2=yes 1650603fc0a3Smrg fi 1651603fc0a3Smrg fi 1652603fc0a3Smrg $RM -r conftest* 1653603fc0a3Smrg LDFLAGS=$save_LDFLAGS 1654603fc0a3Smrg]) 1655603fc0a3Smrg 1656603fc0a3Smrgif test yes = "[$]$2"; then 1657603fc0a3Smrg m4_if([$4], , :, [$4]) 1658603fc0a3Smrgelse 1659603fc0a3Smrg m4_if([$5], , :, [$5]) 1660603fc0a3Smrgfi 1661603fc0a3Smrg])# _LT_LINKER_OPTION 1662603fc0a3Smrg 1663603fc0a3Smrg# Old name: 1664603fc0a3SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1665603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 1666603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1667603fc0a3Smrg 1668603fc0a3Smrg 1669603fc0a3Smrg# LT_CMD_MAX_LEN 1670603fc0a3Smrg#--------------- 1671603fc0a3SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1672603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1673603fc0a3Smrg# find the maximum length of command line arguments 1674603fc0a3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1675603fc0a3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1676603fc0a3Smrg i=0 1677603fc0a3Smrg teststring=ABCD 1678603fc0a3Smrg 1679603fc0a3Smrg case $build_os in 1680603fc0a3Smrg msdosdjgpp*) 1681603fc0a3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1682603fc0a3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1683603fc0a3Smrg # during glob expansion). Even if it were fixed, the result of this 1684603fc0a3Smrg # check would be larger than it should be. 1685603fc0a3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1686603fc0a3Smrg ;; 1687603fc0a3Smrg 1688603fc0a3Smrg gnu*) 1689603fc0a3Smrg # Under GNU Hurd, this test is not required because there is 1690603fc0a3Smrg # no limit to the length of command line arguments. 1691603fc0a3Smrg # Libtool will interpret -1 as no limit whatsoever 1692603fc0a3Smrg lt_cv_sys_max_cmd_len=-1; 1693603fc0a3Smrg ;; 1694603fc0a3Smrg 1695603fc0a3Smrg cygwin* | mingw* | cegcc*) 1696603fc0a3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1697603fc0a3Smrg # about 5 minutes as the teststring grows exponentially. 1698603fc0a3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1699603fc0a3Smrg # you end up with a "frozen" computer, even though with patience 1700603fc0a3Smrg # the test eventually succeeds (with a max line length of 256k). 1701603fc0a3Smrg # Instead, let's just punt: use the minimum linelength reported by 1702603fc0a3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1703603fc0a3Smrg lt_cv_sys_max_cmd_len=8192; 1704603fc0a3Smrg ;; 1705603fc0a3Smrg 1706603fc0a3Smrg mint*) 1707603fc0a3Smrg # On MiNT this can take a long time and run out of memory. 1708603fc0a3Smrg lt_cv_sys_max_cmd_len=8192; 1709603fc0a3Smrg ;; 1710603fc0a3Smrg 1711603fc0a3Smrg amigaos*) 1712603fc0a3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1713603fc0a3Smrg # So we just punt and use a minimum line length of 8192. 1714603fc0a3Smrg lt_cv_sys_max_cmd_len=8192; 1715603fc0a3Smrg ;; 1716603fc0a3Smrg 1717603fc0a3Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1718603fc0a3Smrg # This has been around since 386BSD, at least. Likely further. 1719603fc0a3Smrg if test -x /sbin/sysctl; then 1720603fc0a3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1721603fc0a3Smrg elif test -x /usr/sbin/sysctl; then 1722603fc0a3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1723603fc0a3Smrg else 1724603fc0a3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1725603fc0a3Smrg fi 1726603fc0a3Smrg # And add a safety zone 1727603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1728603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1729603fc0a3Smrg ;; 1730603fc0a3Smrg 1731603fc0a3Smrg interix*) 1732603fc0a3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1733603fc0a3Smrg lt_cv_sys_max_cmd_len=196608 1734603fc0a3Smrg ;; 1735603fc0a3Smrg 1736603fc0a3Smrg os2*) 1737603fc0a3Smrg # The test takes a long time on OS/2. 1738603fc0a3Smrg lt_cv_sys_max_cmd_len=8192 1739603fc0a3Smrg ;; 1740603fc0a3Smrg 1741603fc0a3Smrg osf*) 1742603fc0a3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1743603fc0a3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1744603fc0a3Smrg # nice to cause kernel panics so lets avoid the loop below. 1745603fc0a3Smrg # First set a reasonable default. 1746603fc0a3Smrg lt_cv_sys_max_cmd_len=16384 1747603fc0a3Smrg # 1748603fc0a3Smrg if test -x /sbin/sysconfig; then 1749603fc0a3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1750603fc0a3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1751603fc0a3Smrg esac 1752603fc0a3Smrg fi 1753603fc0a3Smrg ;; 1754603fc0a3Smrg sco3.2v5*) 1755603fc0a3Smrg lt_cv_sys_max_cmd_len=102400 1756603fc0a3Smrg ;; 1757603fc0a3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1758603fc0a3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1759603fc0a3Smrg if test -n "$kargmax"; then 1760603fc0a3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1761603fc0a3Smrg else 1762603fc0a3Smrg lt_cv_sys_max_cmd_len=32768 1763603fc0a3Smrg fi 1764603fc0a3Smrg ;; 1765603fc0a3Smrg *) 1766603fc0a3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1767603fc0a3Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1768603fc0a3Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1769603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1770603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1771603fc0a3Smrg else 1772603fc0a3Smrg # Make teststring a little bigger before we do anything with it. 1773603fc0a3Smrg # a 1K string should be a reasonable start. 1774603fc0a3Smrg for i in 1 2 3 4 5 6 7 8; do 1775603fc0a3Smrg teststring=$teststring$teststring 1776603fc0a3Smrg done 1777603fc0a3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1778603fc0a3Smrg # If test is not a shell built-in, we'll probably end up computing a 1779603fc0a3Smrg # maximum length that is only half of the actual maximum length, but 1780603fc0a3Smrg # we can't tell. 1781603fc0a3Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1782603fc0a3Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1783603fc0a3Smrg test 17 != "$i" # 1/2 MB should be enough 1784603fc0a3Smrg do 1785603fc0a3Smrg i=`expr $i + 1` 1786603fc0a3Smrg teststring=$teststring$teststring 1787603fc0a3Smrg done 1788603fc0a3Smrg # Only check the string length outside the loop. 1789603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1790603fc0a3Smrg teststring= 1791603fc0a3Smrg # Add a significant safety factor because C++ compilers can tack on 1792603fc0a3Smrg # massive amounts of additional arguments before passing them to the 1793603fc0a3Smrg # linker. It appears as though 1/2 is a usable value. 1794603fc0a3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1795603fc0a3Smrg fi 1796603fc0a3Smrg ;; 1797603fc0a3Smrg esac 1798603fc0a3Smrg]) 1799603fc0a3Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1800603fc0a3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1801603fc0a3Smrgelse 1802603fc0a3Smrg AC_MSG_RESULT(none) 1803603fc0a3Smrgfi 1804603fc0a3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1805603fc0a3Smrg_LT_DECL([], [max_cmd_len], [0], 1806603fc0a3Smrg [What is the maximum length of a command?]) 1807603fc0a3Smrg])# LT_CMD_MAX_LEN 1808603fc0a3Smrg 1809603fc0a3Smrg# Old name: 1810603fc0a3SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1811603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 1812603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1813603fc0a3Smrg 1814603fc0a3Smrg 1815603fc0a3Smrg# _LT_HEADER_DLFCN 1816603fc0a3Smrg# ---------------- 1817603fc0a3Smrgm4_defun([_LT_HEADER_DLFCN], 1818603fc0a3Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1819603fc0a3Smrg])# _LT_HEADER_DLFCN 1820603fc0a3Smrg 1821603fc0a3Smrg 1822603fc0a3Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1823603fc0a3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1824603fc0a3Smrg# ---------------------------------------------------------------- 1825603fc0a3Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1826603fc0a3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1827603fc0a3Smrgif test yes = "$cross_compiling"; then : 1828603fc0a3Smrg [$4] 1829603fc0a3Smrgelse 1830603fc0a3Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1831603fc0a3Smrg lt_status=$lt_dlunknown 1832603fc0a3Smrg cat > conftest.$ac_ext <<_LT_EOF 1833603fc0a3Smrg[#line $LINENO "configure" 1834603fc0a3Smrg#include "confdefs.h" 1835603fc0a3Smrg 1836603fc0a3Smrg#if HAVE_DLFCN_H 1837603fc0a3Smrg#include <dlfcn.h> 1838603fc0a3Smrg#endif 1839603fc0a3Smrg 1840603fc0a3Smrg#include <stdio.h> 1841603fc0a3Smrg 1842603fc0a3Smrg#ifdef RTLD_GLOBAL 1843603fc0a3Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1844603fc0a3Smrg#else 1845603fc0a3Smrg# ifdef DL_GLOBAL 1846603fc0a3Smrg# define LT_DLGLOBAL DL_GLOBAL 1847603fc0a3Smrg# else 1848603fc0a3Smrg# define LT_DLGLOBAL 0 1849603fc0a3Smrg# endif 1850603fc0a3Smrg#endif 1851603fc0a3Smrg 1852603fc0a3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1853603fc0a3Smrg find out it does not work in some platform. */ 1854603fc0a3Smrg#ifndef LT_DLLAZY_OR_NOW 1855603fc0a3Smrg# ifdef RTLD_LAZY 1856603fc0a3Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1857603fc0a3Smrg# else 1858603fc0a3Smrg# ifdef DL_LAZY 1859603fc0a3Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1860603fc0a3Smrg# else 1861603fc0a3Smrg# ifdef RTLD_NOW 1862603fc0a3Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1863603fc0a3Smrg# else 1864603fc0a3Smrg# ifdef DL_NOW 1865603fc0a3Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1866603fc0a3Smrg# else 1867603fc0a3Smrg# define LT_DLLAZY_OR_NOW 0 1868603fc0a3Smrg# endif 1869603fc0a3Smrg# endif 1870603fc0a3Smrg# endif 1871603fc0a3Smrg# endif 1872603fc0a3Smrg#endif 1873603fc0a3Smrg 1874603fc0a3Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1875603fc0a3Smrg correspondingly for the symbols needed. */ 1876603fc0a3Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1877603fc0a3Smrgint fnord () __attribute__((visibility("default"))); 1878603fc0a3Smrg#endif 1879603fc0a3Smrg 1880603fc0a3Smrgint fnord () { return 42; } 1881603fc0a3Smrgint main () 1882603fc0a3Smrg{ 1883603fc0a3Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1884603fc0a3Smrg int status = $lt_dlunknown; 1885603fc0a3Smrg 1886603fc0a3Smrg if (self) 1887603fc0a3Smrg { 1888603fc0a3Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1889603fc0a3Smrg else 1890603fc0a3Smrg { 1891603fc0a3Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1892603fc0a3Smrg else puts (dlerror ()); 1893603fc0a3Smrg } 1894603fc0a3Smrg /* dlclose (self); */ 1895603fc0a3Smrg } 1896603fc0a3Smrg else 1897603fc0a3Smrg puts (dlerror ()); 1898603fc0a3Smrg 1899603fc0a3Smrg return status; 1900603fc0a3Smrg}] 1901603fc0a3Smrg_LT_EOF 1902603fc0a3Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1903603fc0a3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1904603fc0a3Smrg lt_status=$? 1905603fc0a3Smrg case x$lt_status in 1906603fc0a3Smrg x$lt_dlno_uscore) $1 ;; 1907603fc0a3Smrg x$lt_dlneed_uscore) $2 ;; 1908603fc0a3Smrg x$lt_dlunknown|x*) $3 ;; 1909603fc0a3Smrg esac 1910603fc0a3Smrg else : 1911603fc0a3Smrg # compilation failed 1912603fc0a3Smrg $3 1913603fc0a3Smrg fi 1914603fc0a3Smrgfi 1915603fc0a3Smrgrm -fr conftest* 1916603fc0a3Smrg])# _LT_TRY_DLOPEN_SELF 1917603fc0a3Smrg 1918603fc0a3Smrg 1919603fc0a3Smrg# LT_SYS_DLOPEN_SELF 1920603fc0a3Smrg# ------------------ 1921603fc0a3SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1922603fc0a3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1923603fc0a3Smrgif test yes != "$enable_dlopen"; then 1924603fc0a3Smrg enable_dlopen=unknown 1925603fc0a3Smrg enable_dlopen_self=unknown 1926603fc0a3Smrg enable_dlopen_self_static=unknown 1927603fc0a3Smrgelse 1928603fc0a3Smrg lt_cv_dlopen=no 1929603fc0a3Smrg lt_cv_dlopen_libs= 1930603fc0a3Smrg 1931603fc0a3Smrg case $host_os in 1932603fc0a3Smrg beos*) 1933603fc0a3Smrg lt_cv_dlopen=load_add_on 1934603fc0a3Smrg lt_cv_dlopen_libs= 1935603fc0a3Smrg lt_cv_dlopen_self=yes 1936603fc0a3Smrg ;; 1937603fc0a3Smrg 1938603fc0a3Smrg mingw* | pw32* | cegcc*) 1939603fc0a3Smrg lt_cv_dlopen=LoadLibrary 1940603fc0a3Smrg lt_cv_dlopen_libs= 1941603fc0a3Smrg ;; 1942603fc0a3Smrg 1943603fc0a3Smrg cygwin*) 1944603fc0a3Smrg lt_cv_dlopen=dlopen 1945603fc0a3Smrg lt_cv_dlopen_libs= 1946603fc0a3Smrg ;; 1947603fc0a3Smrg 1948603fc0a3Smrg darwin*) 1949603fc0a3Smrg # if libdl is installed we need to link against it 1950603fc0a3Smrg AC_CHECK_LIB([dl], [dlopen], 1951603fc0a3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1952603fc0a3Smrg lt_cv_dlopen=dyld 1953603fc0a3Smrg lt_cv_dlopen_libs= 1954603fc0a3Smrg lt_cv_dlopen_self=yes 1955603fc0a3Smrg ]) 1956603fc0a3Smrg ;; 1957603fc0a3Smrg 1958603fc0a3Smrg tpf*) 1959603fc0a3Smrg # Don't try to run any link tests for TPF. We know it's impossible 1960603fc0a3Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1961603fc0a3Smrg lt_cv_dlopen=dlopen 1962603fc0a3Smrg lt_cv_dlopen_libs= 1963603fc0a3Smrg lt_cv_dlopen_self=no 1964603fc0a3Smrg ;; 1965603fc0a3Smrg 1966603fc0a3Smrg *) 1967603fc0a3Smrg AC_CHECK_FUNC([shl_load], 1968603fc0a3Smrg [lt_cv_dlopen=shl_load], 1969603fc0a3Smrg [AC_CHECK_LIB([dld], [shl_load], 1970603fc0a3Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1971603fc0a3Smrg [AC_CHECK_FUNC([dlopen], 1972603fc0a3Smrg [lt_cv_dlopen=dlopen], 1973603fc0a3Smrg [AC_CHECK_LIB([dl], [dlopen], 1974603fc0a3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1975603fc0a3Smrg [AC_CHECK_LIB([svld], [dlopen], 1976603fc0a3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1977603fc0a3Smrg [AC_CHECK_LIB([dld], [dld_link], 1978603fc0a3Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1979603fc0a3Smrg ]) 1980603fc0a3Smrg ]) 1981603fc0a3Smrg ]) 1982603fc0a3Smrg ]) 1983603fc0a3Smrg ]) 1984603fc0a3Smrg ;; 1985603fc0a3Smrg esac 1986603fc0a3Smrg 1987603fc0a3Smrg if test no = "$lt_cv_dlopen"; then 1988603fc0a3Smrg enable_dlopen=no 1989603fc0a3Smrg else 1990603fc0a3Smrg enable_dlopen=yes 1991603fc0a3Smrg fi 1992603fc0a3Smrg 1993603fc0a3Smrg case $lt_cv_dlopen in 1994603fc0a3Smrg dlopen) 1995603fc0a3Smrg save_CPPFLAGS=$CPPFLAGS 1996603fc0a3Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1997603fc0a3Smrg 1998603fc0a3Smrg save_LDFLAGS=$LDFLAGS 1999603fc0a3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2000603fc0a3Smrg 2001603fc0a3Smrg save_LIBS=$LIBS 2002603fc0a3Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2003603fc0a3Smrg 2004603fc0a3Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2005603fc0a3Smrg lt_cv_dlopen_self, [dnl 2006603fc0a3Smrg _LT_TRY_DLOPEN_SELF( 2007603fc0a3Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2008603fc0a3Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2009603fc0a3Smrg ]) 2010603fc0a3Smrg 2011603fc0a3Smrg if test yes = "$lt_cv_dlopen_self"; then 2012603fc0a3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2013603fc0a3Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2014603fc0a3Smrg lt_cv_dlopen_self_static, [dnl 2015603fc0a3Smrg _LT_TRY_DLOPEN_SELF( 2016603fc0a3Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2017603fc0a3Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2018603fc0a3Smrg ]) 2019603fc0a3Smrg fi 2020603fc0a3Smrg 2021603fc0a3Smrg CPPFLAGS=$save_CPPFLAGS 2022603fc0a3Smrg LDFLAGS=$save_LDFLAGS 2023603fc0a3Smrg LIBS=$save_LIBS 2024603fc0a3Smrg ;; 2025603fc0a3Smrg esac 2026603fc0a3Smrg 2027603fc0a3Smrg case $lt_cv_dlopen_self in 2028603fc0a3Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2029603fc0a3Smrg *) enable_dlopen_self=unknown ;; 2030603fc0a3Smrg esac 2031603fc0a3Smrg 2032603fc0a3Smrg case $lt_cv_dlopen_self_static in 2033603fc0a3Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2034603fc0a3Smrg *) enable_dlopen_self_static=unknown ;; 2035603fc0a3Smrg esac 2036603fc0a3Smrgfi 2037603fc0a3Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2038603fc0a3Smrg [Whether dlopen is supported]) 2039603fc0a3Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2040603fc0a3Smrg [Whether dlopen of programs is supported]) 2041603fc0a3Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2042603fc0a3Smrg [Whether dlopen of statically linked programs is supported]) 2043603fc0a3Smrg])# LT_SYS_DLOPEN_SELF 2044603fc0a3Smrg 2045603fc0a3Smrg# Old name: 2046603fc0a3SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2047603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 2048603fc0a3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2049603fc0a3Smrg 2050603fc0a3Smrg 2051603fc0a3Smrg# _LT_COMPILER_C_O([TAGNAME]) 2052603fc0a3Smrg# --------------------------- 2053603fc0a3Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2054603fc0a3Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2055603fc0a3Smrgm4_defun([_LT_COMPILER_C_O], 2056603fc0a3Smrg[m4_require([_LT_DECL_SED])dnl 2057603fc0a3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2058603fc0a3Smrgm4_require([_LT_TAG_COMPILER])dnl 2059603fc0a3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2060603fc0a3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2061603fc0a3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2062603fc0a3Smrg $RM -r conftest 2>/dev/null 2063603fc0a3Smrg mkdir conftest 2064603fc0a3Smrg cd conftest 2065603fc0a3Smrg mkdir out 2066603fc0a3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2067603fc0a3Smrg 2068603fc0a3Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2069603fc0a3Smrg # Insert the option either (1) after the last *FLAGS variable, or 2070603fc0a3Smrg # (2) before a word containing "conftest.", or (3) at the end. 2071603fc0a3Smrg # Note that $ac_compile itself does not contain backslashes and begins 2072603fc0a3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2073603fc0a3Smrg lt_compile=`echo "$ac_compile" | $SED \ 2074603fc0a3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2075603fc0a3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2076603fc0a3Smrg -e 's:$: $lt_compiler_flag:'` 2077603fc0a3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2078603fc0a3Smrg (eval "$lt_compile" 2>out/conftest.err) 2079603fc0a3Smrg ac_status=$? 2080603fc0a3Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2081603fc0a3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2082603fc0a3Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2083603fc0a3Smrg then 2084603fc0a3Smrg # The compiler can only warn and ignore the option if not recognized 2085603fc0a3Smrg # So say no if there are warnings 2086603fc0a3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2087603fc0a3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2088603fc0a3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2089603fc0a3Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2090603fc0a3Smrg fi 2091603fc0a3Smrg fi 2092603fc0a3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2093603fc0a3Smrg $RM conftest* 2094603fc0a3Smrg # SGI C++ compiler will create directory out/ii_files/ for 2095603fc0a3Smrg # template instantiation 2096603fc0a3Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2097603fc0a3Smrg $RM out/* && rmdir out 2098603fc0a3Smrg cd .. 2099603fc0a3Smrg $RM -r conftest 2100603fc0a3Smrg $RM conftest* 2101603fc0a3Smrg]) 2102603fc0a3Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2103603fc0a3Smrg [Does compiler simultaneously support -c and -o options?]) 2104603fc0a3Smrg])# _LT_COMPILER_C_O 2105603fc0a3Smrg 2106603fc0a3Smrg 2107603fc0a3Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2108603fc0a3Smrg# ---------------------------------- 2109603fc0a3Smrg# Check to see if we can do hard links to lock some files if needed 2110603fc0a3Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2111603fc0a3Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2112603fc0a3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2113603fc0a3Smrg_LT_COMPILER_C_O([$1]) 2114603fc0a3Smrg 2115603fc0a3Smrghard_links=nottested 2116603fc0a3Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2117603fc0a3Smrg # do not overwrite the value of need_locks provided by the user 2118603fc0a3Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2119603fc0a3Smrg hard_links=yes 2120603fc0a3Smrg $RM conftest* 2121603fc0a3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2122603fc0a3Smrg touch conftest.a 2123603fc0a3Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2124603fc0a3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2125603fc0a3Smrg AC_MSG_RESULT([$hard_links]) 2126603fc0a3Smrg if test no = "$hard_links"; then 2127603fc0a3Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2128603fc0a3Smrg need_locks=warn 2129603fc0a3Smrg fi 2130603fc0a3Smrgelse 2131603fc0a3Smrg need_locks=no 2132603fc0a3Smrgfi 2133603fc0a3Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2134603fc0a3Smrg])# _LT_COMPILER_FILE_LOCKS 2135603fc0a3Smrg 2136603fc0a3Smrg 2137603fc0a3Smrg# _LT_CHECK_OBJDIR 2138603fc0a3Smrg# ---------------- 2139603fc0a3Smrgm4_defun([_LT_CHECK_OBJDIR], 2140603fc0a3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2141603fc0a3Smrg[rm -f .libs 2>/dev/null 2142603fc0a3Smrgmkdir .libs 2>/dev/null 2143603fc0a3Smrgif test -d .libs; then 2144603fc0a3Smrg lt_cv_objdir=.libs 2145603fc0a3Smrgelse 2146603fc0a3Smrg # MS-DOS does not allow filenames that begin with a dot. 2147603fc0a3Smrg lt_cv_objdir=_libs 2148603fc0a3Smrgfi 2149603fc0a3Smrgrmdir .libs 2>/dev/null]) 2150603fc0a3Smrgobjdir=$lt_cv_objdir 2151603fc0a3Smrg_LT_DECL([], [objdir], [0], 2152603fc0a3Smrg [The name of the directory that contains temporary libtool files])dnl 2153603fc0a3Smrgm4_pattern_allow([LT_OBJDIR])dnl 2154603fc0a3SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2155603fc0a3Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2156603fc0a3Smrg])# _LT_CHECK_OBJDIR 2157603fc0a3Smrg 2158603fc0a3Smrg 2159603fc0a3Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2160603fc0a3Smrg# -------------------------------------- 2161603fc0a3Smrg# Check hardcoding attributes. 2162603fc0a3Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2163603fc0a3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2164603fc0a3Smrg_LT_TAGVAR(hardcode_action, $1)= 2165603fc0a3Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2166603fc0a3Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2167603fc0a3Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2168603fc0a3Smrg 2169603fc0a3Smrg # We can hardcode non-existent directories. 2170603fc0a3Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2171603fc0a3Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2172603fc0a3Smrg # have to relink, otherwise we might link with an installed library 2173603fc0a3Smrg # when we should be linking with a yet-to-be-installed one 2174603fc0a3Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2175603fc0a3Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2176603fc0a3Smrg # Linking always hardcodes the temporary library directory. 2177603fc0a3Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2178603fc0a3Smrg else 2179603fc0a3Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2180603fc0a3Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2181603fc0a3Smrg fi 2182603fc0a3Smrgelse 2183603fc0a3Smrg # We cannot hardcode anything, or else we can only hardcode existing 2184603fc0a3Smrg # directories. 2185603fc0a3Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2186603fc0a3Smrgfi 2187603fc0a3SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2188603fc0a3Smrg 2189603fc0a3Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2190603fc0a3Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2191603fc0a3Smrg # Fast installation is not supported 2192603fc0a3Smrg enable_fast_install=no 2193603fc0a3Smrgelif test yes = "$shlibpath_overrides_runpath" || 2194603fc0a3Smrg test no = "$enable_shared"; then 2195603fc0a3Smrg # Fast installation is not necessary 2196603fc0a3Smrg enable_fast_install=needless 2197603fc0a3Smrgfi 2198603fc0a3Smrg_LT_TAGDECL([], [hardcode_action], [0], 2199603fc0a3Smrg [How to hardcode a shared library path into an executable]) 2200603fc0a3Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2201603fc0a3Smrg 2202603fc0a3Smrg 2203603fc0a3Smrg# _LT_CMD_STRIPLIB 2204603fc0a3Smrg# ---------------- 2205603fc0a3Smrgm4_defun([_LT_CMD_STRIPLIB], 2206603fc0a3Smrg[m4_require([_LT_DECL_EGREP]) 2207603fc0a3Smrgstriplib= 2208603fc0a3Smrgold_striplib= 2209603fc0a3SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2210603fc0a3Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2211603fc0a3Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2212603fc0a3Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2213603fc0a3Smrg AC_MSG_RESULT([yes]) 2214603fc0a3Smrgelse 2215603fc0a3Smrg# FIXME - insert some real tests, host_os isn't really good enough 2216603fc0a3Smrg case $host_os in 2217603fc0a3Smrg darwin*) 2218603fc0a3Smrg if test -n "$STRIP"; then 2219603fc0a3Smrg striplib="$STRIP -x" 2220603fc0a3Smrg old_striplib="$STRIP -S" 2221603fc0a3Smrg AC_MSG_RESULT([yes]) 2222603fc0a3Smrg else 2223603fc0a3Smrg AC_MSG_RESULT([no]) 2224603fc0a3Smrg fi 2225603fc0a3Smrg ;; 2226603fc0a3Smrg *) 2227603fc0a3Smrg AC_MSG_RESULT([no]) 2228603fc0a3Smrg ;; 2229603fc0a3Smrg esac 2230603fc0a3Smrgfi 2231603fc0a3Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2232603fc0a3Smrg_LT_DECL([], [striplib], [1]) 2233603fc0a3Smrg])# _LT_CMD_STRIPLIB 2234603fc0a3Smrg 2235603fc0a3Smrg 2236603fc0a3Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2237603fc0a3Smrg# --------------------------- 2238603fc0a3Smrg# Make sure func_munge_path_list() is defined correctly. 2239603fc0a3Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2240603fc0a3Smrg[[# func_munge_path_list VARIABLE PATH 2241603fc0a3Smrg# ----------------------------------- 2242603fc0a3Smrg# VARIABLE is name of variable containing _space_ separated list of 2243603fc0a3Smrg# directories to be munged by the contents of PATH, which is string 2244603fc0a3Smrg# having a format: 2245603fc0a3Smrg# "DIR[:DIR]:" 2246603fc0a3Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2247603fc0a3Smrg# ":DIR[:DIR]" 2248603fc0a3Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2249603fc0a3Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2250603fc0a3Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2251603fc0a3Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2252603fc0a3Smrg# "DIR[:DIR]" 2253603fc0a3Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2254603fc0a3Smrgfunc_munge_path_list () 2255603fc0a3Smrg{ 2256603fc0a3Smrg case x@S|@2 in 2257603fc0a3Smrg x) 2258603fc0a3Smrg ;; 2259603fc0a3Smrg *:) 2260603fc0a3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2261603fc0a3Smrg ;; 2262603fc0a3Smrg x:*) 2263603fc0a3Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2264603fc0a3Smrg ;; 2265603fc0a3Smrg *::*) 2266603fc0a3Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2267603fc0a3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2268603fc0a3Smrg ;; 2269603fc0a3Smrg *) 2270603fc0a3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2271603fc0a3Smrg ;; 2272603fc0a3Smrg esac 2273603fc0a3Smrg} 2274603fc0a3Smrg]])# _LT_PREPARE_PATH_LIST 2275603fc0a3Smrg 2276603fc0a3Smrg 2277603fc0a3Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2278603fc0a3Smrg# ----------------------------- 2279603fc0a3Smrg# PORTME Fill in your ld.so characteristics 2280603fc0a3Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2281603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2282603fc0a3Smrgm4_require([_LT_DECL_EGREP])dnl 2283603fc0a3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2284603fc0a3Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2285603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 2286603fc0a3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2287603fc0a3Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2288603fc0a3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2289603fc0a3Smrgm4_if([$1], 2290603fc0a3Smrg [], [ 2291603fc0a3Smrgif test yes = "$GCC"; then 2292603fc0a3Smrg case $host_os in 2293603fc0a3Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2294603fc0a3Smrg *) lt_awk_arg='/^libraries:/' ;; 2295603fc0a3Smrg esac 2296603fc0a3Smrg case $host_os in 2297603fc0a3Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2298603fc0a3Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2299603fc0a3Smrg esac 2300603fc0a3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2301603fc0a3Smrg case $lt_search_path_spec in 2302603fc0a3Smrg *\;*) 2303603fc0a3Smrg # if the path contains ";" then we assume it to be the separator 2304603fc0a3Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2305603fc0a3Smrg # assumed that no part of a normal pathname contains ";" but that should 2306603fc0a3Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2307603fc0a3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2308603fc0a3Smrg ;; 2309603fc0a3Smrg *) 2310603fc0a3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2311603fc0a3Smrg ;; 2312603fc0a3Smrg esac 2313603fc0a3Smrg # Ok, now we have the path, separated by spaces, we can step through it 2314603fc0a3Smrg # and add multilib dir if necessary... 2315603fc0a3Smrg lt_tmp_lt_search_path_spec= 2316603fc0a3Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2317603fc0a3Smrg # ...but if some path component already ends with the multilib dir we assume 2318603fc0a3Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2319603fc0a3Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2320603fc0a3Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2321603fc0a3Smrg lt_multi_os_dir= 2322603fc0a3Smrg ;; 2323603fc0a3Smrg esac 2324603fc0a3Smrg for lt_sys_path in $lt_search_path_spec; do 2325603fc0a3Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2326603fc0a3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2327603fc0a3Smrg elif test -n "$lt_multi_os_dir"; then 2328603fc0a3Smrg test -d "$lt_sys_path" && \ 2329603fc0a3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2330603fc0a3Smrg fi 2331603fc0a3Smrg done 2332603fc0a3Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2333603fc0a3SmrgBEGIN {RS = " "; FS = "/|\n";} { 2334603fc0a3Smrg lt_foo = ""; 2335603fc0a3Smrg lt_count = 0; 2336603fc0a3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2337603fc0a3Smrg if ($lt_i != "" && $lt_i != ".") { 2338603fc0a3Smrg if ($lt_i == "..") { 2339603fc0a3Smrg lt_count++; 2340603fc0a3Smrg } else { 2341603fc0a3Smrg if (lt_count == 0) { 2342603fc0a3Smrg lt_foo = "/" $lt_i lt_foo; 2343603fc0a3Smrg } else { 2344603fc0a3Smrg lt_count--; 2345603fc0a3Smrg } 2346603fc0a3Smrg } 2347603fc0a3Smrg } 2348603fc0a3Smrg } 2349603fc0a3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2350603fc0a3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2351603fc0a3Smrg}'` 2352603fc0a3Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2353603fc0a3Smrg # for these hosts. 2354603fc0a3Smrg case $host_os in 2355603fc0a3Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2356603fc0a3Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2357603fc0a3Smrg esac 2358603fc0a3Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2359603fc0a3Smrgelse 2360603fc0a3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2361603fc0a3Smrgfi]) 2362603fc0a3Smrglibrary_names_spec= 2363603fc0a3Smrglibname_spec='lib$name' 2364603fc0a3Smrgsoname_spec= 2365603fc0a3Smrgshrext_cmds=.so 2366603fc0a3Smrgpostinstall_cmds= 2367603fc0a3Smrgpostuninstall_cmds= 2368603fc0a3Smrgfinish_cmds= 2369603fc0a3Smrgfinish_eval= 2370603fc0a3Smrgshlibpath_var= 2371603fc0a3Smrgshlibpath_overrides_runpath=unknown 2372603fc0a3Smrgversion_type=none 2373603fc0a3Smrgdynamic_linker="$host_os ld.so" 2374603fc0a3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2375603fc0a3Smrgneed_lib_prefix=unknown 2376603fc0a3Smrghardcode_into_libs=no 2377603fc0a3Smrg 2378603fc0a3Smrg# when you set need_version to no, make sure it does not cause -set_version 2379603fc0a3Smrg# flags to be left without arguments 2380603fc0a3Smrgneed_version=unknown 2381603fc0a3Smrg 2382603fc0a3SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2383603fc0a3Smrg[User-defined run-time library search path.]) 2384603fc0a3Smrg 2385603fc0a3Smrgcase $host_os in 2386603fc0a3Smrgaix3*) 2387603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2388603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2389603fc0a3Smrg shlibpath_var=LIBPATH 2390603fc0a3Smrg 2391603fc0a3Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2392603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2393603fc0a3Smrg ;; 2394603fc0a3Smrg 2395603fc0a3Smrgaix[[4-9]]*) 2396603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2397603fc0a3Smrg need_lib_prefix=no 2398603fc0a3Smrg need_version=no 2399603fc0a3Smrg hardcode_into_libs=yes 2400603fc0a3Smrg if test ia64 = "$host_cpu"; then 2401603fc0a3Smrg # AIX 5 supports IA64 2402603fc0a3Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2403603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2404603fc0a3Smrg else 2405603fc0a3Smrg # With GCC up to 2.95.x, collect2 would create an import file 2406603fc0a3Smrg # for dependence libraries. The import file would start with 2407603fc0a3Smrg # the line '#! .'. This would cause the generated library to 2408603fc0a3Smrg # depend on '.', always an invalid library. This was fixed in 2409603fc0a3Smrg # development snapshots of GCC prior to 3.0. 2410603fc0a3Smrg case $host_os in 2411603fc0a3Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2412603fc0a3Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2413603fc0a3Smrg echo ' yes ' 2414603fc0a3Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2415603fc0a3Smrg : 2416603fc0a3Smrg else 2417603fc0a3Smrg can_build_shared=no 2418603fc0a3Smrg fi 2419603fc0a3Smrg ;; 2420603fc0a3Smrg esac 2421603fc0a3Smrg # Using Import Files as archive members, it is possible to support 2422603fc0a3Smrg # filename-based versioning of shared library archives on AIX. While 2423603fc0a3Smrg # this would work for both with and without runtime linking, it will 2424603fc0a3Smrg # prevent static linking of such archives. So we do filename-based 2425603fc0a3Smrg # shared library versioning with .so extension only, which is used 2426603fc0a3Smrg # when both runtime linking and shared linking is enabled. 2427603fc0a3Smrg # Unfortunately, runtime linking may impact performance, so we do 2428603fc0a3Smrg # not want this to be the default eventually. Also, we use the 2429603fc0a3Smrg # versioned .so libs for executables only if there is the -brtl 2430603fc0a3Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2431603fc0a3Smrg # To allow for filename-based versioning support, we need to create 2432603fc0a3Smrg # libNAME.so.V as an archive file, containing: 2433603fc0a3Smrg # *) an Import File, referring to the versioned filename of the 2434603fc0a3Smrg # archive as well as the shared archive member, telling the 2435603fc0a3Smrg # bitwidth (32 or 64) of that shared object, and providing the 2436603fc0a3Smrg # list of exported symbols of that shared object, eventually 2437603fc0a3Smrg # decorated with the 'weak' keyword 2438603fc0a3Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2439603fc0a3Smrg # it being seen by the linker. 2440603fc0a3Smrg # At run time we better use the real file rather than another symlink, 2441603fc0a3Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2442603fc0a3Smrg 2443603fc0a3Smrg case $with_aix_soname,$aix_use_runtimelinking in 2444603fc0a3Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2445603fc0a3Smrg # soname into executable. Probably we can add versioning support to 2446603fc0a3Smrg # collect2, so additional links can be useful in future. 2447603fc0a3Smrg aix,yes) # traditional libtool 2448603fc0a3Smrg dynamic_linker='AIX unversionable lib.so' 2449603fc0a3Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2450603fc0a3Smrg # instead of lib<name>.a to let people know that these are not 2451603fc0a3Smrg # typical AIX shared libraries. 2452603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2453603fc0a3Smrg ;; 2454603fc0a3Smrg aix,no) # traditional AIX only 2455603fc0a3Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2456603fc0a3Smrg # We preserve .a as extension for shared libraries through AIX4.2 2457603fc0a3Smrg # and later when we are not doing run time linking. 2458603fc0a3Smrg library_names_spec='$libname$release.a $libname.a' 2459603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2460603fc0a3Smrg ;; 2461603fc0a3Smrg svr4,*) # full svr4 only 2462603fc0a3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2463603fc0a3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2464603fc0a3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2465603fc0a3Smrg shlibpath_overrides_runpath=yes 2466603fc0a3Smrg ;; 2467603fc0a3Smrg *,yes) # both, prefer svr4 2468603fc0a3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2469603fc0a3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2470603fc0a3Smrg # unpreferred sharedlib libNAME.a needs extra handling 2471603fc0a3Smrg 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"' 2472603fc0a3Smrg 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"' 2473603fc0a3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2474603fc0a3Smrg shlibpath_overrides_runpath=yes 2475603fc0a3Smrg ;; 2476603fc0a3Smrg *,no) # both, prefer aix 2477603fc0a3Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2478603fc0a3Smrg library_names_spec='$libname$release.a $libname.a' 2479603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2480603fc0a3Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2481603fc0a3Smrg 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)' 2482603fc0a3Smrg 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"' 2483603fc0a3Smrg ;; 2484603fc0a3Smrg esac 2485603fc0a3Smrg shlibpath_var=LIBPATH 2486603fc0a3Smrg fi 2487603fc0a3Smrg ;; 2488603fc0a3Smrg 2489603fc0a3Smrgamigaos*) 2490603fc0a3Smrg case $host_cpu in 2491603fc0a3Smrg powerpc) 2492603fc0a3Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2493603fc0a3Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2494603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2495603fc0a3Smrg ;; 2496603fc0a3Smrg m68k) 2497603fc0a3Smrg library_names_spec='$libname.ixlibrary $libname.a' 2498603fc0a3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2499603fc0a3Smrg 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' 2500603fc0a3Smrg ;; 2501603fc0a3Smrg esac 2502603fc0a3Smrg ;; 2503603fc0a3Smrg 2504603fc0a3Smrgbeos*) 2505603fc0a3Smrg library_names_spec='$libname$shared_ext' 2506603fc0a3Smrg dynamic_linker="$host_os ld.so" 2507603fc0a3Smrg shlibpath_var=LIBRARY_PATH 2508603fc0a3Smrg ;; 2509603fc0a3Smrg 2510603fc0a3Smrgbsdi[[45]]*) 2511603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2512603fc0a3Smrg need_version=no 2513603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2514603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2515603fc0a3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2516603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2517603fc0a3Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2518603fc0a3Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2519603fc0a3Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2520603fc0a3Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2521603fc0a3Smrg # libtool to hard-code these into programs 2522603fc0a3Smrg ;; 2523603fc0a3Smrg 2524603fc0a3Smrgcygwin* | mingw* | pw32* | cegcc*) 2525603fc0a3Smrg version_type=windows 2526603fc0a3Smrg shrext_cmds=.dll 2527603fc0a3Smrg need_version=no 2528603fc0a3Smrg need_lib_prefix=no 2529603fc0a3Smrg 2530603fc0a3Smrg case $GCC,$cc_basename in 2531603fc0a3Smrg yes,*) 2532603fc0a3Smrg # gcc 2533603fc0a3Smrg library_names_spec='$libname.dll.a' 2534603fc0a3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2535603fc0a3Smrg postinstall_cmds='base_file=`basename \$file`~ 2536603fc0a3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2537603fc0a3Smrg dldir=$destdir/`dirname \$dlpath`~ 2538603fc0a3Smrg test -d \$dldir || mkdir -p \$dldir~ 2539603fc0a3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2540603fc0a3Smrg chmod a+x \$dldir/$dlname~ 2541603fc0a3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2542603fc0a3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2543603fc0a3Smrg fi' 2544603fc0a3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2545603fc0a3Smrg dlpath=$dir/\$dldll~ 2546603fc0a3Smrg $RM \$dlpath' 2547603fc0a3Smrg shlibpath_overrides_runpath=yes 2548603fc0a3Smrg 2549603fc0a3Smrg case $host_os in 2550603fc0a3Smrg cygwin*) 2551603fc0a3Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2552603fc0a3Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2553603fc0a3Smrgm4_if([$1], [],[ 2554603fc0a3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2555603fc0a3Smrg ;; 2556603fc0a3Smrg mingw* | cegcc*) 2557603fc0a3Smrg # MinGW DLLs use traditional 'lib' prefix 2558603fc0a3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2559603fc0a3Smrg ;; 2560603fc0a3Smrg pw32*) 2561603fc0a3Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2562603fc0a3Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2563603fc0a3Smrg ;; 2564603fc0a3Smrg esac 2565603fc0a3Smrg dynamic_linker='Win32 ld.exe' 2566603fc0a3Smrg ;; 2567603fc0a3Smrg 2568603fc0a3Smrg *,cl*) 2569603fc0a3Smrg # Native MSVC 2570603fc0a3Smrg libname_spec='$name' 2571603fc0a3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2572603fc0a3Smrg library_names_spec='$libname.dll.lib' 2573603fc0a3Smrg 2574603fc0a3Smrg case $build_os in 2575603fc0a3Smrg mingw*) 2576603fc0a3Smrg sys_lib_search_path_spec= 2577603fc0a3Smrg lt_save_ifs=$IFS 2578603fc0a3Smrg IFS=';' 2579603fc0a3Smrg for lt_path in $LIB 2580603fc0a3Smrg do 2581603fc0a3Smrg IFS=$lt_save_ifs 2582603fc0a3Smrg # Let DOS variable expansion print the short 8.3 style file name. 2583603fc0a3Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2584603fc0a3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2585603fc0a3Smrg done 2586603fc0a3Smrg IFS=$lt_save_ifs 2587603fc0a3Smrg # Convert to MSYS style. 2588603fc0a3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2589603fc0a3Smrg ;; 2590603fc0a3Smrg cygwin*) 2591603fc0a3Smrg # Convert to unix form, then to dos form, then back to unix form 2592603fc0a3Smrg # but this time dos style (no spaces!) so that the unix form looks 2593603fc0a3Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2594603fc0a3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2595603fc0a3Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2596603fc0a3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2597603fc0a3Smrg ;; 2598603fc0a3Smrg *) 2599603fc0a3Smrg sys_lib_search_path_spec=$LIB 2600603fc0a3Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2601603fc0a3Smrg # It is most probably a Windows format PATH. 2602603fc0a3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2603603fc0a3Smrg else 2604603fc0a3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2605603fc0a3Smrg fi 2606603fc0a3Smrg # FIXME: find the short name or the path components, as spaces are 2607603fc0a3Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2608603fc0a3Smrg ;; 2609603fc0a3Smrg esac 2610603fc0a3Smrg 2611603fc0a3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2612603fc0a3Smrg postinstall_cmds='base_file=`basename \$file`~ 2613603fc0a3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2614603fc0a3Smrg dldir=$destdir/`dirname \$dlpath`~ 2615603fc0a3Smrg test -d \$dldir || mkdir -p \$dldir~ 2616603fc0a3Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2617603fc0a3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2618603fc0a3Smrg dlpath=$dir/\$dldll~ 2619603fc0a3Smrg $RM \$dlpath' 2620603fc0a3Smrg shlibpath_overrides_runpath=yes 2621603fc0a3Smrg dynamic_linker='Win32 link.exe' 2622603fc0a3Smrg ;; 2623603fc0a3Smrg 2624603fc0a3Smrg *) 2625603fc0a3Smrg # Assume MSVC wrapper 2626603fc0a3Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2627603fc0a3Smrg dynamic_linker='Win32 ld.exe' 2628603fc0a3Smrg ;; 2629603fc0a3Smrg esac 2630603fc0a3Smrg # FIXME: first we should search . and the directory the executable is in 2631603fc0a3Smrg shlibpath_var=PATH 2632603fc0a3Smrg ;; 2633603fc0a3Smrg 2634603fc0a3Smrgdarwin* | rhapsody*) 2635603fc0a3Smrg dynamic_linker="$host_os dyld" 2636603fc0a3Smrg version_type=darwin 2637603fc0a3Smrg need_lib_prefix=no 2638603fc0a3Smrg need_version=no 2639603fc0a3Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2640603fc0a3Smrg soname_spec='$libname$release$major$shared_ext' 2641603fc0a3Smrg shlibpath_overrides_runpath=yes 2642603fc0a3Smrg shlibpath_var=DYLD_LIBRARY_PATH 2643603fc0a3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2644603fc0a3Smrgm4_if([$1], [],[ 2645603fc0a3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2646603fc0a3Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2647603fc0a3Smrg ;; 2648603fc0a3Smrg 2649603fc0a3Smrgdgux*) 2650603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2651603fc0a3Smrg need_lib_prefix=no 2652603fc0a3Smrg need_version=no 2653603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2654603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2655603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2656603fc0a3Smrg ;; 2657603fc0a3Smrg 2658603fc0a3Smrgfreebsd* | dragonfly*) 2659603fc0a3Smrg # DragonFly does not have aout. When/if they implement a new 2660603fc0a3Smrg # versioning mechanism, adjust this. 2661603fc0a3Smrg if test -x /usr/bin/objformat; then 2662603fc0a3Smrg objformat=`/usr/bin/objformat` 2663603fc0a3Smrg else 2664603fc0a3Smrg case $host_os in 2665603fc0a3Smrg freebsd[[23]].*) objformat=aout ;; 2666603fc0a3Smrg *) objformat=elf ;; 2667603fc0a3Smrg esac 2668603fc0a3Smrg fi 2669603fc0a3Smrg version_type=freebsd-$objformat 2670603fc0a3Smrg case $version_type in 2671603fc0a3Smrg freebsd-elf*) 2672603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2673603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2674603fc0a3Smrg need_version=no 2675603fc0a3Smrg need_lib_prefix=no 2676603fc0a3Smrg ;; 2677603fc0a3Smrg freebsd-*) 2678603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2679603fc0a3Smrg need_version=yes 2680603fc0a3Smrg ;; 2681603fc0a3Smrg esac 2682603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2683603fc0a3Smrg case $host_os in 2684603fc0a3Smrg freebsd2.*) 2685603fc0a3Smrg shlibpath_overrides_runpath=yes 2686603fc0a3Smrg ;; 2687603fc0a3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2688603fc0a3Smrg shlibpath_overrides_runpath=yes 2689603fc0a3Smrg hardcode_into_libs=yes 2690603fc0a3Smrg ;; 2691603fc0a3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2692603fc0a3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2693603fc0a3Smrg shlibpath_overrides_runpath=no 2694603fc0a3Smrg hardcode_into_libs=yes 2695603fc0a3Smrg ;; 2696603fc0a3Smrg *) # from 4.6 on, and DragonFly 2697603fc0a3Smrg shlibpath_overrides_runpath=yes 2698603fc0a3Smrg hardcode_into_libs=yes 2699603fc0a3Smrg ;; 2700603fc0a3Smrg esac 2701603fc0a3Smrg ;; 2702603fc0a3Smrg 2703603fc0a3Smrghaiku*) 2704603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2705603fc0a3Smrg need_lib_prefix=no 2706603fc0a3Smrg need_version=no 2707603fc0a3Smrg dynamic_linker="$host_os runtime_loader" 2708603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2709603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2710603fc0a3Smrg shlibpath_var=LIBRARY_PATH 2711603fc0a3Smrg shlibpath_overrides_runpath=no 2712603fc0a3Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2713603fc0a3Smrg hardcode_into_libs=yes 2714603fc0a3Smrg ;; 2715603fc0a3Smrg 2716603fc0a3Smrghpux9* | hpux10* | hpux11*) 2717603fc0a3Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2718603fc0a3Smrg # link against other versions. 2719603fc0a3Smrg version_type=sunos 2720603fc0a3Smrg need_lib_prefix=no 2721603fc0a3Smrg need_version=no 2722603fc0a3Smrg case $host_cpu in 2723603fc0a3Smrg ia64*) 2724603fc0a3Smrg shrext_cmds='.so' 2725603fc0a3Smrg hardcode_into_libs=yes 2726603fc0a3Smrg dynamic_linker="$host_os dld.so" 2727603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2728603fc0a3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2729603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2730603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2731603fc0a3Smrg if test 32 = "$HPUX_IA64_MODE"; then 2732603fc0a3Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2733603fc0a3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2734603fc0a3Smrg else 2735603fc0a3Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2736603fc0a3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2737603fc0a3Smrg fi 2738603fc0a3Smrg ;; 2739603fc0a3Smrg hppa*64*) 2740603fc0a3Smrg shrext_cmds='.sl' 2741603fc0a3Smrg hardcode_into_libs=yes 2742603fc0a3Smrg dynamic_linker="$host_os dld.sl" 2743603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2744603fc0a3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2745603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2746603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2747603fc0a3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2748603fc0a3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2749603fc0a3Smrg ;; 2750603fc0a3Smrg *) 2751603fc0a3Smrg shrext_cmds='.sl' 2752603fc0a3Smrg dynamic_linker="$host_os dld.sl" 2753603fc0a3Smrg shlibpath_var=SHLIB_PATH 2754603fc0a3Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2755603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2756603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2757603fc0a3Smrg ;; 2758603fc0a3Smrg esac 2759603fc0a3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2760603fc0a3Smrg postinstall_cmds='chmod 555 $lib' 2761603fc0a3Smrg # or fails outright, so override atomically: 2762603fc0a3Smrg install_override_mode=555 2763603fc0a3Smrg ;; 2764603fc0a3Smrg 2765603fc0a3Smrginterix[[3-9]]*) 2766603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2767603fc0a3Smrg need_lib_prefix=no 2768603fc0a3Smrg need_version=no 2769603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2771603fc0a3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2772603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2773603fc0a3Smrg shlibpath_overrides_runpath=no 2774603fc0a3Smrg hardcode_into_libs=yes 2775603fc0a3Smrg ;; 2776603fc0a3Smrg 2777603fc0a3Smrgirix5* | irix6* | nonstopux*) 2778603fc0a3Smrg case $host_os in 2779603fc0a3Smrg nonstopux*) version_type=nonstopux ;; 2780603fc0a3Smrg *) 2781603fc0a3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2782603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2783603fc0a3Smrg else 2784603fc0a3Smrg version_type=irix 2785603fc0a3Smrg fi ;; 2786603fc0a3Smrg esac 2787603fc0a3Smrg need_lib_prefix=no 2788603fc0a3Smrg need_version=no 2789603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2790603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2791603fc0a3Smrg case $host_os in 2792603fc0a3Smrg irix5* | nonstopux*) 2793603fc0a3Smrg libsuff= shlibsuff= 2794603fc0a3Smrg ;; 2795603fc0a3Smrg *) 2796603fc0a3Smrg case $LD in # libtool.m4 will add one of these switches to LD 2797603fc0a3Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2798603fc0a3Smrg libsuff= shlibsuff= libmagic=32-bit;; 2799603fc0a3Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2800603fc0a3Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2801603fc0a3Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2802603fc0a3Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2803603fc0a3Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2804603fc0a3Smrg esac 2805603fc0a3Smrg ;; 2806603fc0a3Smrg esac 2807603fc0a3Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2808603fc0a3Smrg shlibpath_overrides_runpath=no 2809603fc0a3Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2810603fc0a3Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2811603fc0a3Smrg hardcode_into_libs=yes 2812603fc0a3Smrg ;; 2813603fc0a3Smrg 2814603fc0a3Smrg# No shared lib support for Linux oldld, aout, or coff. 2815603fc0a3Smrglinux*oldld* | linux*aout* | linux*coff*) 2816603fc0a3Smrg dynamic_linker=no 2817603fc0a3Smrg ;; 2818603fc0a3Smrg 2819603fc0a3Smrglinux*android*) 2820603fc0a3Smrg version_type=none # Android doesn't support versioned libraries. 2821603fc0a3Smrg need_lib_prefix=no 2822603fc0a3Smrg need_version=no 2823603fc0a3Smrg library_names_spec='$libname$release$shared_ext' 2824603fc0a3Smrg soname_spec='$libname$release$shared_ext' 2825603fc0a3Smrg finish_cmds= 2826603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2827603fc0a3Smrg shlibpath_overrides_runpath=yes 2828603fc0a3Smrg 2829603fc0a3Smrg # This implies no fast_install, which is unacceptable. 2830603fc0a3Smrg # Some rework will be needed to allow for fast_install 2831603fc0a3Smrg # before this can be enabled. 2832603fc0a3Smrg hardcode_into_libs=yes 2833603fc0a3Smrg 2834603fc0a3Smrg dynamic_linker='Android linker' 2835603fc0a3Smrg # Don't embed -rpath directories since the linker doesn't support them. 2836603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2837603fc0a3Smrg ;; 2838603fc0a3Smrg 2839603fc0a3Smrg# This must be glibc/ELF. 2840603fc0a3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2841603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2842603fc0a3Smrg need_lib_prefix=no 2843603fc0a3Smrg need_version=no 2844603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2845603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2846603fc0a3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2847603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2848603fc0a3Smrg shlibpath_overrides_runpath=no 2849603fc0a3Smrg 2850603fc0a3Smrg # Some binutils ld are patched to set DT_RUNPATH 2851603fc0a3Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2852603fc0a3Smrg [lt_cv_shlibpath_overrides_runpath=no 2853603fc0a3Smrg save_LDFLAGS=$LDFLAGS 2854603fc0a3Smrg save_libdir=$libdir 2855603fc0a3Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2856603fc0a3Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2857603fc0a3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2858603fc0a3Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2859603fc0a3Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2860603fc0a3Smrg LDFLAGS=$save_LDFLAGS 2861603fc0a3Smrg libdir=$save_libdir 2862603fc0a3Smrg ]) 2863603fc0a3Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2864603fc0a3Smrg 2865603fc0a3Smrg # This implies no fast_install, which is unacceptable. 2866603fc0a3Smrg # Some rework will be needed to allow for fast_install 2867603fc0a3Smrg # before this can be enabled. 2868603fc0a3Smrg hardcode_into_libs=yes 2869603fc0a3Smrg 2870603fc0a3Smrg # Ideally, we could use ldconfig to report *all* directores which are 2871603fc0a3Smrg # searched for libraries, however this is still not possible. Aside from not 2872603fc0a3Smrg # being certain /sbin/ldconfig is available, command 2873603fc0a3Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2874603fc0a3Smrg # even though it is searched at run-time. Try to do the best guess by 2875603fc0a3Smrg # appending ld.so.conf contents (and includes) to the search path. 2876603fc0a3Smrg if test -f /etc/ld.so.conf; then 2877603fc0a3Smrg 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' ' '` 2878603fc0a3Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2879603fc0a3Smrg fi 2880603fc0a3Smrg 2881603fc0a3Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2882603fc0a3Smrg # powerpc, because MkLinux only supported shared libraries with the 2883603fc0a3Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2884603fc0a3Smrg # most powerpc-linux boxes support dynamic linking these days and 2885603fc0a3Smrg # people can always --disable-shared, the test was removed, and we 2886603fc0a3Smrg # assume the GNU/Linux dynamic linker is in use. 2887603fc0a3Smrg dynamic_linker='GNU/Linux ld.so' 2888603fc0a3Smrg ;; 2889603fc0a3Smrg 2890603fc0a3Smrgnetbsd*) 2891603fc0a3Smrg version_type=sunos 2892603fc0a3Smrg need_lib_prefix=no 2893603fc0a3Smrg need_version=no 2894603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2895603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2896603fc0a3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2897603fc0a3Smrg dynamic_linker='NetBSD (a.out) ld.so' 2898603fc0a3Smrg else 2899603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2900603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2901603fc0a3Smrg dynamic_linker='NetBSD ld.elf_so' 2902603fc0a3Smrg fi 2903603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2904603fc0a3Smrg shlibpath_overrides_runpath=yes 2905603fc0a3Smrg hardcode_into_libs=yes 2906603fc0a3Smrg ;; 2907603fc0a3Smrg 2908603fc0a3Smrgnewsos6) 2909603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2910603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2911603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2912603fc0a3Smrg shlibpath_overrides_runpath=yes 2913603fc0a3Smrg ;; 2914603fc0a3Smrg 2915603fc0a3Smrg*nto* | *qnx*) 2916603fc0a3Smrg version_type=qnx 2917603fc0a3Smrg need_lib_prefix=no 2918603fc0a3Smrg need_version=no 2919603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2921603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2922603fc0a3Smrg shlibpath_overrides_runpath=no 2923603fc0a3Smrg hardcode_into_libs=yes 2924603fc0a3Smrg dynamic_linker='ldqnx.so' 2925603fc0a3Smrg ;; 2926603fc0a3Smrg 2927603fc0a3Smrgopenbsd* | bitrig*) 2928603fc0a3Smrg version_type=sunos 2929603fc0a3Smrg sys_lib_dlsearch_path_spec=/usr/lib 2930603fc0a3Smrg need_lib_prefix=no 2931603fc0a3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2932603fc0a3Smrg need_version=no 2933603fc0a3Smrg else 2934603fc0a3Smrg need_version=yes 2935603fc0a3Smrg fi 2936603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2937603fc0a3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2938603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2939603fc0a3Smrg shlibpath_overrides_runpath=yes 2940603fc0a3Smrg ;; 2941603fc0a3Smrg 2942603fc0a3Smrgos2*) 2943603fc0a3Smrg libname_spec='$name' 2944603fc0a3Smrg version_type=windows 2945603fc0a3Smrg shrext_cmds=.dll 2946603fc0a3Smrg need_version=no 2947603fc0a3Smrg need_lib_prefix=no 2948603fc0a3Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2949603fc0a3Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2950603fc0a3Smrg v=$($ECHO $release$versuffix | tr -d .-); 2951603fc0a3Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2952603fc0a3Smrg $ECHO $n$v`$shared_ext' 2953603fc0a3Smrg library_names_spec='${libname}_dll.$libext' 2954603fc0a3Smrg dynamic_linker='OS/2 ld.exe' 2955603fc0a3Smrg shlibpath_var=BEGINLIBPATH 2956603fc0a3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2957603fc0a3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2958603fc0a3Smrg postinstall_cmds='base_file=`basename \$file`~ 2959603fc0a3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2960603fc0a3Smrg dldir=$destdir/`dirname \$dlpath`~ 2961603fc0a3Smrg test -d \$dldir || mkdir -p \$dldir~ 2962603fc0a3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2963603fc0a3Smrg chmod a+x \$dldir/$dlname~ 2964603fc0a3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2965603fc0a3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2966603fc0a3Smrg fi' 2967603fc0a3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2968603fc0a3Smrg dlpath=$dir/\$dldll~ 2969603fc0a3Smrg $RM \$dlpath' 2970603fc0a3Smrg ;; 2971603fc0a3Smrg 2972603fc0a3Smrgosf3* | osf4* | osf5*) 2973603fc0a3Smrg version_type=osf 2974603fc0a3Smrg need_lib_prefix=no 2975603fc0a3Smrg need_version=no 2976603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2977603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2978603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2979603fc0a3Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2980603fc0a3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2981603fc0a3Smrg ;; 2982603fc0a3Smrg 2983603fc0a3Smrgrdos*) 2984603fc0a3Smrg dynamic_linker=no 2985603fc0a3Smrg ;; 2986603fc0a3Smrg 2987603fc0a3Smrgsolaris*) 2988603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2989603fc0a3Smrg need_lib_prefix=no 2990603fc0a3Smrg need_version=no 2991603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2992603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 2993603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 2994603fc0a3Smrg shlibpath_overrides_runpath=yes 2995603fc0a3Smrg hardcode_into_libs=yes 2996603fc0a3Smrg # ldd complains unless libraries are executable 2997603fc0a3Smrg postinstall_cmds='chmod +x $lib' 2998603fc0a3Smrg ;; 2999603fc0a3Smrg 3000603fc0a3Smrgsunos4*) 3001603fc0a3Smrg version_type=sunos 3002603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3003603fc0a3Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3004603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3005603fc0a3Smrg shlibpath_overrides_runpath=yes 3006603fc0a3Smrg if test yes = "$with_gnu_ld"; then 3007603fc0a3Smrg need_lib_prefix=no 3008603fc0a3Smrg fi 3009603fc0a3Smrg need_version=yes 3010603fc0a3Smrg ;; 3011603fc0a3Smrg 3012603fc0a3Smrgsysv4 | sysv4.3*) 3013603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 3014603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3015603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 3016603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3017603fc0a3Smrg case $host_vendor in 3018603fc0a3Smrg sni) 3019603fc0a3Smrg shlibpath_overrides_runpath=no 3020603fc0a3Smrg need_lib_prefix=no 3021603fc0a3Smrg runpath_var=LD_RUN_PATH 3022603fc0a3Smrg ;; 3023603fc0a3Smrg siemens) 3024603fc0a3Smrg need_lib_prefix=no 3025603fc0a3Smrg ;; 3026603fc0a3Smrg motorola) 3027603fc0a3Smrg need_lib_prefix=no 3028603fc0a3Smrg need_version=no 3029603fc0a3Smrg shlibpath_overrides_runpath=no 3030603fc0a3Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3031603fc0a3Smrg ;; 3032603fc0a3Smrg esac 3033603fc0a3Smrg ;; 3034603fc0a3Smrg 3035603fc0a3Smrgsysv4*MP*) 3036603fc0a3Smrg if test -d /usr/nec; then 3037603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 3038603fc0a3Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3039603fc0a3Smrg soname_spec='$libname$shared_ext.$major' 3040603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3041603fc0a3Smrg fi 3042603fc0a3Smrg ;; 3043603fc0a3Smrg 3044603fc0a3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3045603fc0a3Smrg version_type=sco 3046603fc0a3Smrg need_lib_prefix=no 3047603fc0a3Smrg need_version=no 3048603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3049603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 3050603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3051603fc0a3Smrg shlibpath_overrides_runpath=yes 3052603fc0a3Smrg hardcode_into_libs=yes 3053603fc0a3Smrg if test yes = "$with_gnu_ld"; then 3054603fc0a3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3055603fc0a3Smrg else 3056603fc0a3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3057603fc0a3Smrg case $host_os in 3058603fc0a3Smrg sco3.2v5*) 3059603fc0a3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3060603fc0a3Smrg ;; 3061603fc0a3Smrg esac 3062603fc0a3Smrg fi 3063603fc0a3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3064603fc0a3Smrg ;; 3065603fc0a3Smrg 3066603fc0a3Smrgtpf*) 3067603fc0a3Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3068603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 3069603fc0a3Smrg need_lib_prefix=no 3070603fc0a3Smrg need_version=no 3071603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3072603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3073603fc0a3Smrg shlibpath_overrides_runpath=no 3074603fc0a3Smrg hardcode_into_libs=yes 3075603fc0a3Smrg ;; 3076603fc0a3Smrg 3077603fc0a3Smrguts4*) 3078603fc0a3Smrg version_type=linux # correct to gnu/linux during the next big refactor 3079603fc0a3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3080603fc0a3Smrg soname_spec='$libname$release$shared_ext$major' 3081603fc0a3Smrg shlibpath_var=LD_LIBRARY_PATH 3082603fc0a3Smrg ;; 3083603fc0a3Smrg 3084603fc0a3Smrg*) 3085603fc0a3Smrg dynamic_linker=no 3086603fc0a3Smrg ;; 3087603fc0a3Smrgesac 3088603fc0a3SmrgAC_MSG_RESULT([$dynamic_linker]) 3089603fc0a3Smrgtest no = "$dynamic_linker" && can_build_shared=no 3090603fc0a3Smrg 3091603fc0a3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3092603fc0a3Smrgif test yes = "$GCC"; then 3093603fc0a3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3094603fc0a3Smrgfi 3095603fc0a3Smrg 3096603fc0a3Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3097603fc0a3Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3098603fc0a3Smrgfi 3099603fc0a3Smrg 3100603fc0a3Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3101603fc0a3Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3102603fc0a3Smrgfi 3103603fc0a3Smrg 3104603fc0a3Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3105603fc0a3Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3106603fc0a3Smrg 3107603fc0a3Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3108603fc0a3Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3109603fc0a3Smrg 3110603fc0a3Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3111603fc0a3Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3112603fc0a3Smrg 3113603fc0a3Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3114603fc0a3Smrg [Variables whose values should be saved in libtool wrapper scripts and 3115603fc0a3Smrg restored at link time]) 3116603fc0a3Smrg_LT_DECL([], [need_lib_prefix], [0], 3117603fc0a3Smrg [Do we need the "lib" prefix for modules?]) 3118603fc0a3Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3119603fc0a3Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3120603fc0a3Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3121603fc0a3Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3122603fc0a3Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3123603fc0a3Smrg [Is shlibpath searched before the hard-coded library search path?]) 3124603fc0a3Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3125603fc0a3Smrg_LT_DECL([], [library_names_spec], [1], 3126603fc0a3Smrg [[List of archive names. First name is the real one, the rest are links. 3127603fc0a3Smrg The last name is the one that the linker finds with -lNAME]]) 3128603fc0a3Smrg_LT_DECL([], [soname_spec], [1], 3129603fc0a3Smrg [[The coded name of the library, if different from the real name]]) 3130603fc0a3Smrg_LT_DECL([], [install_override_mode], [1], 3131603fc0a3Smrg [Permission mode override for installation of shared libraries]) 3132603fc0a3Smrg_LT_DECL([], [postinstall_cmds], [2], 3133603fc0a3Smrg [Command to use after installation of a shared archive]) 3134603fc0a3Smrg_LT_DECL([], [postuninstall_cmds], [2], 3135603fc0a3Smrg [Command to use after uninstallation of a shared archive]) 3136603fc0a3Smrg_LT_DECL([], [finish_cmds], [2], 3137603fc0a3Smrg [Commands used to finish a libtool library installation in a directory]) 3138603fc0a3Smrg_LT_DECL([], [finish_eval], [1], 3139603fc0a3Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3140603fc0a3Smrg not shown]]) 3141603fc0a3Smrg_LT_DECL([], [hardcode_into_libs], [0], 3142603fc0a3Smrg [Whether we should hardcode library paths into libraries]) 3143603fc0a3Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3144603fc0a3Smrg [Compile-time system search path for libraries]) 3145603fc0a3Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3146603fc0a3Smrg [Detected run-time system search path for libraries]) 3147603fc0a3Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3148603fc0a3Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3149603fc0a3Smrg])# _LT_SYS_DYNAMIC_LINKER 3150603fc0a3Smrg 3151603fc0a3Smrg 3152603fc0a3Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3153603fc0a3Smrg# -------------------------- 3154603fc0a3Smrg# find a file program that can recognize shared library 3155603fc0a3SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3156603fc0a3Smrg[m4_require([_LT_DECL_EGREP])dnl 3157603fc0a3SmrgAC_MSG_CHECKING([for $1]) 3158603fc0a3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3159603fc0a3Smrg[case $MAGIC_CMD in 3160603fc0a3Smrg[[\\/*] | ?:[\\/]*]) 3161603fc0a3Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3162603fc0a3Smrg ;; 3163603fc0a3Smrg*) 3164603fc0a3Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3165603fc0a3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3166603fc0a3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3167603fc0a3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3168603fc0a3Smrgdnl not every word. This closes a longstanding sh security hole. 3169603fc0a3Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3170603fc0a3Smrg for ac_dir in $ac_dummy; do 3171603fc0a3Smrg IFS=$lt_save_ifs 3172603fc0a3Smrg test -z "$ac_dir" && ac_dir=. 3173603fc0a3Smrg if test -f "$ac_dir/$1"; then 3174603fc0a3Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3175603fc0a3Smrg if test -n "$file_magic_test_file"; then 3176603fc0a3Smrg case $deplibs_check_method in 3177603fc0a3Smrg "file_magic "*) 3178603fc0a3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3179603fc0a3Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3180603fc0a3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3181603fc0a3Smrg $EGREP "$file_magic_regex" > /dev/null; then 3182603fc0a3Smrg : 3183603fc0a3Smrg else 3184603fc0a3Smrg cat <<_LT_EOF 1>&2 3185603fc0a3Smrg 3186603fc0a3Smrg*** Warning: the command libtool uses to detect shared libraries, 3187603fc0a3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3188603fc0a3Smrg*** The result is that libtool may fail to recognize shared libraries 3189603fc0a3Smrg*** as such. This will affect the creation of libtool libraries that 3190603fc0a3Smrg*** depend on shared libraries, but programs linked with such libtool 3191603fc0a3Smrg*** libraries will work regardless of this problem. Nevertheless, you 3192603fc0a3Smrg*** may want to report the problem to your system manager and/or to 3193603fc0a3Smrg*** bug-libtool@gnu.org 3194603fc0a3Smrg 3195603fc0a3Smrg_LT_EOF 3196603fc0a3Smrg fi ;; 3197603fc0a3Smrg esac 3198603fc0a3Smrg fi 3199603fc0a3Smrg break 3200603fc0a3Smrg fi 3201603fc0a3Smrg done 3202603fc0a3Smrg IFS=$lt_save_ifs 3203603fc0a3Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 3204603fc0a3Smrg ;; 3205603fc0a3Smrgesac]) 3206603fc0a3SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207603fc0a3Smrgif test -n "$MAGIC_CMD"; then 3208603fc0a3Smrg AC_MSG_RESULT($MAGIC_CMD) 3209603fc0a3Smrgelse 3210603fc0a3Smrg AC_MSG_RESULT(no) 3211603fc0a3Smrgfi 3212603fc0a3Smrg_LT_DECL([], [MAGIC_CMD], [0], 3213603fc0a3Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3214603fc0a3Smrg])# _LT_PATH_TOOL_PREFIX 3215603fc0a3Smrg 3216603fc0a3Smrg# Old name: 3217603fc0a3SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3218603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 3219603fc0a3Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3220603fc0a3Smrg 3221603fc0a3Smrg 3222603fc0a3Smrg# _LT_PATH_MAGIC 3223603fc0a3Smrg# -------------- 3224603fc0a3Smrg# find a file program that can recognize a shared library 3225603fc0a3Smrgm4_defun([_LT_PATH_MAGIC], 3226603fc0a3Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3227603fc0a3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3228603fc0a3Smrg if test -n "$ac_tool_prefix"; then 3229603fc0a3Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3230603fc0a3Smrg else 3231603fc0a3Smrg MAGIC_CMD=: 3232603fc0a3Smrg fi 3233603fc0a3Smrgfi 3234603fc0a3Smrg])# _LT_PATH_MAGIC 3235603fc0a3Smrg 3236603fc0a3Smrg 3237603fc0a3Smrg# LT_PATH_LD 3238603fc0a3Smrg# ---------- 3239603fc0a3Smrg# find the pathname to the GNU or non-GNU linker 3240603fc0a3SmrgAC_DEFUN([LT_PATH_LD], 3241603fc0a3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3242603fc0a3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3243603fc0a3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3244603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 3245603fc0a3Smrgm4_require([_LT_DECL_EGREP])dnl 3246603fc0a3Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3247603fc0a3Smrg 3248603fc0a3SmrgAC_ARG_WITH([gnu-ld], 3249603fc0a3Smrg [AS_HELP_STRING([--with-gnu-ld], 3250603fc0a3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3251603fc0a3Smrg [test no = "$withval" || with_gnu_ld=yes], 3252603fc0a3Smrg [with_gnu_ld=no])dnl 3253603fc0a3Smrg 3254603fc0a3Smrgac_prog=ld 3255603fc0a3Smrgif test yes = "$GCC"; then 3256603fc0a3Smrg # Check if gcc -print-prog-name=ld gives a path. 3257603fc0a3Smrg AC_MSG_CHECKING([for ld used by $CC]) 3258603fc0a3Smrg case $host in 3259603fc0a3Smrg *-*-mingw*) 3260603fc0a3Smrg # gcc leaves a trailing carriage return, which upsets mingw 3261603fc0a3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3262603fc0a3Smrg *) 3263603fc0a3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3264603fc0a3Smrg esac 3265603fc0a3Smrg case $ac_prog in 3266603fc0a3Smrg # Accept absolute paths. 3267603fc0a3Smrg [[\\/]]* | ?:[[\\/]]*) 3268603fc0a3Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3269603fc0a3Smrg # Canonicalize the pathname of ld 3270603fc0a3Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3271603fc0a3Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3272603fc0a3Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3273603fc0a3Smrg done 3274603fc0a3Smrg test -z "$LD" && LD=$ac_prog 3275603fc0a3Smrg ;; 3276603fc0a3Smrg "") 3277603fc0a3Smrg # If it fails, then pretend we aren't using GCC. 3278603fc0a3Smrg ac_prog=ld 3279603fc0a3Smrg ;; 3280603fc0a3Smrg *) 3281603fc0a3Smrg # If it is relative, then search for the first ld in PATH. 3282603fc0a3Smrg with_gnu_ld=unknown 3283603fc0a3Smrg ;; 3284603fc0a3Smrg esac 3285603fc0a3Smrgelif test yes = "$with_gnu_ld"; then 3286603fc0a3Smrg AC_MSG_CHECKING([for GNU ld]) 3287603fc0a3Smrgelse 3288603fc0a3Smrg AC_MSG_CHECKING([for non-GNU ld]) 3289603fc0a3Smrgfi 3290603fc0a3SmrgAC_CACHE_VAL(lt_cv_path_LD, 3291603fc0a3Smrg[if test -z "$LD"; then 3292603fc0a3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3293603fc0a3Smrg for ac_dir in $PATH; do 3294603fc0a3Smrg IFS=$lt_save_ifs 3295603fc0a3Smrg test -z "$ac_dir" && ac_dir=. 3296603fc0a3Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3297603fc0a3Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3298603fc0a3Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3299603fc0a3Smrg # but apparently some variants of GNU ld only accept -v. 3300603fc0a3Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3301603fc0a3Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3302603fc0a3Smrg *GNU* | *'with BFD'*) 3303603fc0a3Smrg test no != "$with_gnu_ld" && break 3304603fc0a3Smrg ;; 3305603fc0a3Smrg *) 3306603fc0a3Smrg test yes != "$with_gnu_ld" && break 3307603fc0a3Smrg ;; 3308603fc0a3Smrg esac 3309603fc0a3Smrg fi 3310603fc0a3Smrg done 3311603fc0a3Smrg IFS=$lt_save_ifs 3312603fc0a3Smrgelse 3313603fc0a3Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3314603fc0a3Smrgfi]) 3315603fc0a3SmrgLD=$lt_cv_path_LD 3316603fc0a3Smrgif test -n "$LD"; then 3317603fc0a3Smrg AC_MSG_RESULT($LD) 3318603fc0a3Smrgelse 3319603fc0a3Smrg AC_MSG_RESULT(no) 3320603fc0a3Smrgfi 3321603fc0a3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3322603fc0a3Smrg_LT_PATH_LD_GNU 3323603fc0a3SmrgAC_SUBST([LD]) 3324603fc0a3Smrg 3325603fc0a3Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3326603fc0a3Smrg])# LT_PATH_LD 3327603fc0a3Smrg 3328603fc0a3Smrg# Old names: 3329603fc0a3SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3330603fc0a3SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3331603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 3332603fc0a3Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3333603fc0a3Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3334603fc0a3Smrg 3335603fc0a3Smrg 3336603fc0a3Smrg# _LT_PATH_LD_GNU 3337603fc0a3Smrg#- -------------- 3338603fc0a3Smrgm4_defun([_LT_PATH_LD_GNU], 3339603fc0a3Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3340603fc0a3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3341603fc0a3Smrgcase `$LD -v 2>&1 </dev/null` in 3342603fc0a3Smrg*GNU* | *'with BFD'*) 3343603fc0a3Smrg lt_cv_prog_gnu_ld=yes 3344603fc0a3Smrg ;; 3345603fc0a3Smrg*) 3346603fc0a3Smrg lt_cv_prog_gnu_ld=no 3347603fc0a3Smrg ;; 3348603fc0a3Smrgesac]) 3349603fc0a3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3350603fc0a3Smrg])# _LT_PATH_LD_GNU 3351603fc0a3Smrg 3352603fc0a3Smrg 3353603fc0a3Smrg# _LT_CMD_RELOAD 3354603fc0a3Smrg# -------------- 3355603fc0a3Smrg# find reload flag for linker 3356603fc0a3Smrg# -- PORTME Some linkers may need a different reload flag. 3357603fc0a3Smrgm4_defun([_LT_CMD_RELOAD], 3358603fc0a3Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3359603fc0a3Smrg lt_cv_ld_reload_flag, 3360603fc0a3Smrg [lt_cv_ld_reload_flag='-r']) 3361603fc0a3Smrgreload_flag=$lt_cv_ld_reload_flag 3362603fc0a3Smrgcase $reload_flag in 3363603fc0a3Smrg"" | " "*) ;; 3364603fc0a3Smrg*) reload_flag=" $reload_flag" ;; 3365603fc0a3Smrgesac 3366603fc0a3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3367603fc0a3Smrgcase $host_os in 3368603fc0a3Smrg cygwin* | mingw* | pw32* | cegcc*) 3369603fc0a3Smrg if test yes != "$GCC"; then 3370603fc0a3Smrg reload_cmds=false 3371603fc0a3Smrg fi 3372603fc0a3Smrg ;; 3373603fc0a3Smrg darwin*) 3374603fc0a3Smrg if test yes = "$GCC"; then 3375603fc0a3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3376603fc0a3Smrg else 3377603fc0a3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3378603fc0a3Smrg fi 3379603fc0a3Smrg ;; 3380603fc0a3Smrgesac 3381603fc0a3Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3382603fc0a3Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3383603fc0a3Smrg])# _LT_CMD_RELOAD 3384603fc0a3Smrg 3385603fc0a3Smrg 3386603fc0a3Smrg# _LT_PATH_DD 3387603fc0a3Smrg# ----------- 3388603fc0a3Smrg# find a working dd 3389603fc0a3Smrgm4_defun([_LT_PATH_DD], 3390603fc0a3Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3391603fc0a3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3392603fc0a3Smrgcat conftest.i conftest.i >conftest2.i 3393603fc0a3Smrg: ${lt_DD:=$DD} 3394603fc0a3SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3395603fc0a3Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3396603fc0a3Smrg cmp -s conftest.i conftest.out \ 3397603fc0a3Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3398603fc0a3Smrgfi]) 3399603fc0a3Smrgrm -f conftest.i conftest2.i conftest.out]) 3400603fc0a3Smrg])# _LT_PATH_DD 3401603fc0a3Smrg 3402603fc0a3Smrg 3403603fc0a3Smrg# _LT_CMD_TRUNCATE 3404603fc0a3Smrg# ---------------- 3405603fc0a3Smrg# find command to truncate a binary pipe 3406603fc0a3Smrgm4_defun([_LT_CMD_TRUNCATE], 3407603fc0a3Smrg[m4_require([_LT_PATH_DD]) 3408603fc0a3SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3409603fc0a3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3410603fc0a3Smrgcat conftest.i conftest.i >conftest2.i 3411603fc0a3Smrglt_cv_truncate_bin= 3412603fc0a3Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413603fc0a3Smrg cmp -s conftest.i conftest.out \ 3414603fc0a3Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3415603fc0a3Smrgfi 3416603fc0a3Smrgrm -f conftest.i conftest2.i conftest.out 3417603fc0a3Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3418603fc0a3Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3419603fc0a3Smrg [Command to truncate a binary pipe]) 3420603fc0a3Smrg])# _LT_CMD_TRUNCATE 3421603fc0a3Smrg 3422603fc0a3Smrg 3423603fc0a3Smrg# _LT_CHECK_MAGIC_METHOD 3424603fc0a3Smrg# ---------------------- 3425603fc0a3Smrg# how to check for library dependencies 3426603fc0a3Smrg# -- PORTME fill in with the dynamic library characteristics 3427603fc0a3Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3428603fc0a3Smrg[m4_require([_LT_DECL_EGREP]) 3429603fc0a3Smrgm4_require([_LT_DECL_OBJDUMP]) 3430603fc0a3SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3431603fc0a3Smrglt_cv_deplibs_check_method, 3432603fc0a3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3433603fc0a3Smrglt_cv_file_magic_test_file= 3434603fc0a3Smrglt_cv_deplibs_check_method='unknown' 3435603fc0a3Smrg# Need to set the preceding variable on all platforms that support 3436603fc0a3Smrg# interlibrary dependencies. 3437603fc0a3Smrg# 'none' -- dependencies not supported. 3438603fc0a3Smrg# 'unknown' -- same as none, but documents that we really don't know. 3439603fc0a3Smrg# 'pass_all' -- all dependencies passed with no checks. 3440603fc0a3Smrg# 'test_compile' -- check by making test program. 3441603fc0a3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3442603fc0a3Smrg# that responds to the $file_magic_cmd with a given extended regex. 3443603fc0a3Smrg# If you have 'file' or equivalent on your system and you're not sure 3444603fc0a3Smrg# whether 'pass_all' will *always* work, you probably want this one. 3445603fc0a3Smrg 3446603fc0a3Smrgcase $host_os in 3447603fc0a3Smrgaix[[4-9]]*) 3448603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3449603fc0a3Smrg ;; 3450603fc0a3Smrg 3451603fc0a3Smrgbeos*) 3452603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3453603fc0a3Smrg ;; 3454603fc0a3Smrg 3455603fc0a3Smrgbsdi[[45]]*) 3456603fc0a3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3457603fc0a3Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3458603fc0a3Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3459603fc0a3Smrg ;; 3460603fc0a3Smrg 3461603fc0a3Smrgcygwin*) 3462603fc0a3Smrg # func_win32_libid is a shell function defined in ltmain.sh 3463603fc0a3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3464603fc0a3Smrg lt_cv_file_magic_cmd='func_win32_libid' 3465603fc0a3Smrg ;; 3466603fc0a3Smrg 3467603fc0a3Smrgmingw* | pw32*) 3468603fc0a3Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3469603fc0a3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3470603fc0a3Smrg # unless we find 'file', for example because we are cross-compiling. 3471603fc0a3Smrg if ( file / ) >/dev/null 2>&1; then 3472603fc0a3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3473603fc0a3Smrg lt_cv_file_magic_cmd='func_win32_libid' 3474603fc0a3Smrg else 3475603fc0a3Smrg # Keep this pattern in sync with the one in func_win32_libid. 3476603fc0a3Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3477603fc0a3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3478603fc0a3Smrg fi 3479603fc0a3Smrg ;; 3480603fc0a3Smrg 3481603fc0a3Smrgcegcc*) 3482603fc0a3Smrg # use the weaker test based on 'objdump'. See mingw*. 3483603fc0a3Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3484603fc0a3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3485603fc0a3Smrg ;; 3486603fc0a3Smrg 3487603fc0a3Smrgdarwin* | rhapsody*) 3488603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3489603fc0a3Smrg ;; 3490603fc0a3Smrg 3491603fc0a3Smrgfreebsd* | dragonfly*) 3492603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3493603fc0a3Smrg case $host_cpu in 3494603fc0a3Smrg i*86 ) 3495603fc0a3Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3496603fc0a3Smrg # Let's accept both of them until this is cleared up. 3497603fc0a3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3498603fc0a3Smrg lt_cv_file_magic_cmd=/usr/bin/file 3499603fc0a3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3500603fc0a3Smrg ;; 3501603fc0a3Smrg esac 3502603fc0a3Smrg else 3503603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3504603fc0a3Smrg fi 3505603fc0a3Smrg ;; 3506603fc0a3Smrg 3507603fc0a3Smrghaiku*) 3508603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3509603fc0a3Smrg ;; 3510603fc0a3Smrg 3511603fc0a3Smrghpux10.20* | hpux11*) 3512603fc0a3Smrg lt_cv_file_magic_cmd=/usr/bin/file 3513603fc0a3Smrg case $host_cpu in 3514603fc0a3Smrg ia64*) 3515603fc0a3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3516603fc0a3Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3517603fc0a3Smrg ;; 3518603fc0a3Smrg hppa*64*) 3519603fc0a3Smrg [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]'] 3520603fc0a3Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3521603fc0a3Smrg ;; 3522603fc0a3Smrg *) 3523603fc0a3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3524603fc0a3Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3525603fc0a3Smrg ;; 3526603fc0a3Smrg esac 3527603fc0a3Smrg ;; 3528603fc0a3Smrg 3529603fc0a3Smrginterix[[3-9]]*) 3530603fc0a3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3531603fc0a3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3532603fc0a3Smrg ;; 3533603fc0a3Smrg 3534603fc0a3Smrgirix5* | irix6* | nonstopux*) 3535603fc0a3Smrg case $LD in 3536603fc0a3Smrg *-32|*"-32 ") libmagic=32-bit;; 3537603fc0a3Smrg *-n32|*"-n32 ") libmagic=N32;; 3538603fc0a3Smrg *-64|*"-64 ") libmagic=64-bit;; 3539603fc0a3Smrg *) libmagic=never-match;; 3540603fc0a3Smrg esac 3541603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3542603fc0a3Smrg ;; 3543603fc0a3Smrg 3544603fc0a3Smrg# This must be glibc/ELF. 3545603fc0a3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3546603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3547603fc0a3Smrg ;; 3548603fc0a3Smrg 3549603fc0a3Smrgnetbsd*) 3550603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3551603fc0a3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3552603fc0a3Smrg else 3553603fc0a3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3554603fc0a3Smrg fi 3555603fc0a3Smrg ;; 3556603fc0a3Smrg 3557603fc0a3Smrgnewos6*) 3558603fc0a3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3559603fc0a3Smrg lt_cv_file_magic_cmd=/usr/bin/file 3560603fc0a3Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3561603fc0a3Smrg ;; 3562603fc0a3Smrg 3563603fc0a3Smrg*nto* | *qnx*) 3564603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3565603fc0a3Smrg ;; 3566603fc0a3Smrg 3567603fc0a3Smrgopenbsd* | bitrig*) 3568603fc0a3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3569603fc0a3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3570603fc0a3Smrg else 3571603fc0a3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3572603fc0a3Smrg fi 3573603fc0a3Smrg ;; 3574603fc0a3Smrg 3575603fc0a3Smrgosf3* | osf4* | osf5*) 3576603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3577603fc0a3Smrg ;; 3578603fc0a3Smrg 3579603fc0a3Smrgrdos*) 3580603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3581603fc0a3Smrg ;; 3582603fc0a3Smrg 3583603fc0a3Smrgsolaris*) 3584603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3585603fc0a3Smrg ;; 3586603fc0a3Smrg 3587603fc0a3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3588603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3589603fc0a3Smrg ;; 3590603fc0a3Smrg 3591603fc0a3Smrgsysv4 | sysv4.3*) 3592603fc0a3Smrg case $host_vendor in 3593603fc0a3Smrg motorola) 3594603fc0a3Smrg 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]]' 3595603fc0a3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3596603fc0a3Smrg ;; 3597603fc0a3Smrg ncr) 3598603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3599603fc0a3Smrg ;; 3600603fc0a3Smrg sequent) 3601603fc0a3Smrg lt_cv_file_magic_cmd='/bin/file' 3602603fc0a3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3603603fc0a3Smrg ;; 3604603fc0a3Smrg sni) 3605603fc0a3Smrg lt_cv_file_magic_cmd='/bin/file' 3606603fc0a3Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3607603fc0a3Smrg lt_cv_file_magic_test_file=/lib/libc.so 3608603fc0a3Smrg ;; 3609603fc0a3Smrg siemens) 3610603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3611603fc0a3Smrg ;; 3612603fc0a3Smrg pc) 3613603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3614603fc0a3Smrg ;; 3615603fc0a3Smrg esac 3616603fc0a3Smrg ;; 3617603fc0a3Smrg 3618603fc0a3Smrgtpf*) 3619603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3620603fc0a3Smrg ;; 3621603fc0a3Smrgos2*) 3622603fc0a3Smrg lt_cv_deplibs_check_method=pass_all 3623603fc0a3Smrg ;; 3624603fc0a3Smrgesac 3625603fc0a3Smrg]) 3626603fc0a3Smrg 3627603fc0a3Smrgfile_magic_glob= 3628603fc0a3Smrgwant_nocaseglob=no 3629603fc0a3Smrgif test "$build" = "$host"; then 3630603fc0a3Smrg case $host_os in 3631603fc0a3Smrg mingw* | pw32*) 3632603fc0a3Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3633603fc0a3Smrg want_nocaseglob=yes 3634603fc0a3Smrg else 3635603fc0a3Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3636603fc0a3Smrg fi 3637603fc0a3Smrg ;; 3638603fc0a3Smrg esac 3639603fc0a3Smrgfi 3640603fc0a3Smrg 3641603fc0a3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3642603fc0a3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3643603fc0a3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3644603fc0a3Smrg 3645603fc0a3Smrg_LT_DECL([], [deplibs_check_method], [1], 3646603fc0a3Smrg [Method to check whether dependent libraries are shared objects]) 3647603fc0a3Smrg_LT_DECL([], [file_magic_cmd], [1], 3648603fc0a3Smrg [Command to use when deplibs_check_method = "file_magic"]) 3649603fc0a3Smrg_LT_DECL([], [file_magic_glob], [1], 3650603fc0a3Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3651603fc0a3Smrg_LT_DECL([], [want_nocaseglob], [1], 3652603fc0a3Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3653603fc0a3Smrg])# _LT_CHECK_MAGIC_METHOD 3654603fc0a3Smrg 3655603fc0a3Smrg 3656603fc0a3Smrg# LT_PATH_NM 3657603fc0a3Smrg# ---------- 3658603fc0a3Smrg# find the pathname to a BSD- or MS-compatible name lister 3659603fc0a3SmrgAC_DEFUN([LT_PATH_NM], 3660603fc0a3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3661603fc0a3SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3662603fc0a3Smrg[if test -n "$NM"; then 3663603fc0a3Smrg # Let the user override the test. 3664603fc0a3Smrg lt_cv_path_NM=$NM 3665603fc0a3Smrgelse 3666603fc0a3Smrg lt_nm_to_check=${ac_tool_prefix}nm 3667603fc0a3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3668603fc0a3Smrg lt_nm_to_check="$lt_nm_to_check nm" 3669603fc0a3Smrg fi 3670603fc0a3Smrg for lt_tmp_nm in $lt_nm_to_check; do 3671603fc0a3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3672603fc0a3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3673603fc0a3Smrg IFS=$lt_save_ifs 3674603fc0a3Smrg test -z "$ac_dir" && ac_dir=. 3675603fc0a3Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3676603fc0a3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3677603fc0a3Smrg # Check to see if the nm accepts a BSD-compat flag. 3678603fc0a3Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3679603fc0a3Smrg # nm: unknown option "B" ignored 3680603fc0a3Smrg # Tru64's nm complains that /dev/null is an invalid object file 3681603fc0a3Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3682603fc0a3Smrg case $build_os in 3683603fc0a3Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3684603fc0a3Smrg *) lt_bad_file=/dev/null ;; 3685603fc0a3Smrg esac 3686603fc0a3Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3687603fc0a3Smrg *$lt_bad_file* | *'Invalid file or object type'*) 3688603fc0a3Smrg lt_cv_path_NM="$tmp_nm -B" 3689603fc0a3Smrg break 2 3690603fc0a3Smrg ;; 3691603fc0a3Smrg *) 3692603fc0a3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3693603fc0a3Smrg */dev/null*) 3694603fc0a3Smrg lt_cv_path_NM="$tmp_nm -p" 3695603fc0a3Smrg break 2 3696603fc0a3Smrg ;; 3697603fc0a3Smrg *) 3698603fc0a3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3699603fc0a3Smrg continue # so that we can try to find one that supports BSD flags 3700603fc0a3Smrg ;; 3701603fc0a3Smrg esac 3702603fc0a3Smrg ;; 3703603fc0a3Smrg esac 3704603fc0a3Smrg fi 3705603fc0a3Smrg done 3706603fc0a3Smrg IFS=$lt_save_ifs 3707603fc0a3Smrg done 3708603fc0a3Smrg : ${lt_cv_path_NM=no} 3709603fc0a3Smrgfi]) 3710603fc0a3Smrgif test no != "$lt_cv_path_NM"; then 3711603fc0a3Smrg NM=$lt_cv_path_NM 3712603fc0a3Smrgelse 3713603fc0a3Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3714603fc0a3Smrg if test -n "$DUMPBIN"; then : 3715603fc0a3Smrg # Let the user override the test. 3716603fc0a3Smrg else 3717603fc0a3Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3718603fc0a3Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3719603fc0a3Smrg *COFF*) 3720603fc0a3Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3721603fc0a3Smrg ;; 3722603fc0a3Smrg *) 3723603fc0a3Smrg DUMPBIN=: 3724603fc0a3Smrg ;; 3725603fc0a3Smrg esac 3726603fc0a3Smrg fi 3727603fc0a3Smrg AC_SUBST([DUMPBIN]) 3728603fc0a3Smrg if test : != "$DUMPBIN"; then 3729603fc0a3Smrg NM=$DUMPBIN 3730603fc0a3Smrg fi 3731603fc0a3Smrgfi 3732603fc0a3Smrgtest -z "$NM" && NM=nm 3733603fc0a3SmrgAC_SUBST([NM]) 3734603fc0a3Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3735603fc0a3Smrg 3736603fc0a3SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3737603fc0a3Smrg [lt_cv_nm_interface="BSD nm" 3738603fc0a3Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3739603fc0a3Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3740603fc0a3Smrg (eval "$ac_compile" 2>conftest.err) 3741603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3742603fc0a3Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3743603fc0a3Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3744603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3745603fc0a3Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3746603fc0a3Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3747603fc0a3Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3748603fc0a3Smrg lt_cv_nm_interface="MS dumpbin" 3749603fc0a3Smrg fi 3750603fc0a3Smrg rm -f conftest*]) 3751603fc0a3Smrg])# LT_PATH_NM 3752603fc0a3Smrg 3753603fc0a3Smrg# Old names: 3754603fc0a3SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3755603fc0a3SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3756603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 3757603fc0a3Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3758603fc0a3Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3759603fc0a3Smrg 3760603fc0a3Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3761603fc0a3Smrg# -------------------------------- 3762603fc0a3Smrg# how to determine the name of the shared library 3763603fc0a3Smrg# associated with a specific link library. 3764603fc0a3Smrg# -- PORTME fill in with the dynamic library characteristics 3765603fc0a3Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3766603fc0a3Smrg[m4_require([_LT_DECL_EGREP]) 3767603fc0a3Smrgm4_require([_LT_DECL_OBJDUMP]) 3768603fc0a3Smrgm4_require([_LT_DECL_DLLTOOL]) 3769603fc0a3SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3770603fc0a3Smrglt_cv_sharedlib_from_linklib_cmd, 3771603fc0a3Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3772603fc0a3Smrg 3773603fc0a3Smrgcase $host_os in 3774603fc0a3Smrgcygwin* | mingw* | pw32* | cegcc*) 3775603fc0a3Smrg # two different shell functions defined in ltmain.sh; 3776603fc0a3Smrg # decide which one to use based on capabilities of $DLLTOOL 3777603fc0a3Smrg case `$DLLTOOL --help 2>&1` in 3778603fc0a3Smrg *--identify-strict*) 3779603fc0a3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3780603fc0a3Smrg ;; 3781603fc0a3Smrg *) 3782603fc0a3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3783603fc0a3Smrg ;; 3784603fc0a3Smrg esac 3785603fc0a3Smrg ;; 3786603fc0a3Smrg*) 3787603fc0a3Smrg # fallback: assume linklib IS sharedlib 3788603fc0a3Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3789603fc0a3Smrg ;; 3790603fc0a3Smrgesac 3791603fc0a3Smrg]) 3792603fc0a3Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3793603fc0a3Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3794603fc0a3Smrg 3795603fc0a3Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3796603fc0a3Smrg [Command to associate shared and link libraries]) 3797603fc0a3Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3798603fc0a3Smrg 3799603fc0a3Smrg 3800603fc0a3Smrg# _LT_PATH_MANIFEST_TOOL 3801603fc0a3Smrg# ---------------------- 3802603fc0a3Smrg# locate the manifest tool 3803603fc0a3Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3804603fc0a3Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3805603fc0a3Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3806603fc0a3SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3807603fc0a3Smrg [lt_cv_path_mainfest_tool=no 3808603fc0a3Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3809603fc0a3Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3810603fc0a3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3811603fc0a3Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3812603fc0a3Smrg lt_cv_path_mainfest_tool=yes 3813603fc0a3Smrg fi 3814603fc0a3Smrg rm -f conftest*]) 3815603fc0a3Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 3816603fc0a3Smrg MANIFEST_TOOL=: 3817603fc0a3Smrgfi 3818603fc0a3Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3819603fc0a3Smrg])# _LT_PATH_MANIFEST_TOOL 3820603fc0a3Smrg 3821603fc0a3Smrg 3822603fc0a3Smrg# _LT_DLL_DEF_P([FILE]) 3823603fc0a3Smrg# --------------------- 3824603fc0a3Smrg# True iff FILE is a Windows DLL '.def' file. 3825603fc0a3Smrg# Keep in sync with func_dll_def_p in the libtool script 3826603fc0a3SmrgAC_DEFUN([_LT_DLL_DEF_P], 3827603fc0a3Smrg[dnl 3828603fc0a3Smrg test DEF = "`$SED -n dnl 3829603fc0a3Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3830603fc0a3Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3831603fc0a3Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3832603fc0a3Smrg -e q dnl Only consider the first "real" line 3833603fc0a3Smrg $1`" dnl 3834603fc0a3Smrg])# _LT_DLL_DEF_P 3835603fc0a3Smrg 3836603fc0a3Smrg 3837603fc0a3Smrg# LT_LIB_M 3838603fc0a3Smrg# -------- 3839603fc0a3Smrg# check for math library 3840603fc0a3SmrgAC_DEFUN([LT_LIB_M], 3841603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3842603fc0a3SmrgLIBM= 3843603fc0a3Smrgcase $host in 3844603fc0a3Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3845603fc0a3Smrg # These system don't have libm, or don't need it 3846603fc0a3Smrg ;; 3847603fc0a3Smrg*-ncr-sysv4.3*) 3848603fc0a3Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3849603fc0a3Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3850603fc0a3Smrg ;; 3851603fc0a3Smrg*) 3852603fc0a3Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3853603fc0a3Smrg ;; 3854603fc0a3Smrgesac 3855603fc0a3SmrgAC_SUBST([LIBM]) 3856603fc0a3Smrg])# LT_LIB_M 3857603fc0a3Smrg 3858603fc0a3Smrg# Old name: 3859603fc0a3SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3860603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 3861603fc0a3Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3862603fc0a3Smrg 3863603fc0a3Smrg 3864603fc0a3Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3865603fc0a3Smrg# ------------------------------- 3866603fc0a3Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3867603fc0a3Smrg[m4_require([_LT_TAG_COMPILER])dnl 3868603fc0a3Smrg 3869603fc0a3Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3870603fc0a3Smrg 3871603fc0a3Smrgif test yes = "$GCC"; then 3872603fc0a3Smrg case $cc_basename in 3873603fc0a3Smrg nvcc*) 3874603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3875603fc0a3Smrg *) 3876603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3877603fc0a3Smrg esac 3878603fc0a3Smrg 3879603fc0a3Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3880603fc0a3Smrg lt_cv_prog_compiler_rtti_exceptions, 3881603fc0a3Smrg [-fno-rtti -fno-exceptions], [], 3882603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3883603fc0a3Smrgfi 3884603fc0a3Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3885603fc0a3Smrg [Compiler flag to turn off builtin functions]) 3886603fc0a3Smrg])# _LT_COMPILER_NO_RTTI 3887603fc0a3Smrg 3888603fc0a3Smrg 3889603fc0a3Smrg# _LT_CMD_GLOBAL_SYMBOLS 3890603fc0a3Smrg# ---------------------- 3891603fc0a3Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3892603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3893603fc0a3SmrgAC_REQUIRE([AC_PROG_CC])dnl 3894603fc0a3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3895603fc0a3SmrgAC_REQUIRE([LT_PATH_NM])dnl 3896603fc0a3SmrgAC_REQUIRE([LT_PATH_LD])dnl 3897603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 3898603fc0a3Smrgm4_require([_LT_DECL_EGREP])dnl 3899603fc0a3Smrgm4_require([_LT_TAG_COMPILER])dnl 3900603fc0a3Smrg 3901603fc0a3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3902603fc0a3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3903603fc0a3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3904603fc0a3Smrg[ 3905603fc0a3Smrg# These are sane defaults that work on at least a few old systems. 3906603fc0a3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3907603fc0a3Smrg 3908603fc0a3Smrg# Character class describing NM global symbol codes. 3909603fc0a3Smrgsymcode='[[BCDEGRST]]' 3910603fc0a3Smrg 3911603fc0a3Smrg# Regexp to match symbols that can be accessed directly from C. 3912603fc0a3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3913603fc0a3Smrg 3914603fc0a3Smrg# Define system-specific variables. 3915603fc0a3Smrgcase $host_os in 3916603fc0a3Smrgaix*) 3917603fc0a3Smrg symcode='[[BCDT]]' 3918603fc0a3Smrg ;; 3919603fc0a3Smrgcygwin* | mingw* | pw32* | cegcc*) 3920603fc0a3Smrg symcode='[[ABCDGISTW]]' 3921603fc0a3Smrg ;; 3922603fc0a3Smrghpux*) 3923603fc0a3Smrg if test ia64 = "$host_cpu"; then 3924603fc0a3Smrg symcode='[[ABCDEGRST]]' 3925603fc0a3Smrg fi 3926603fc0a3Smrg ;; 3927603fc0a3Smrgirix* | nonstopux*) 3928603fc0a3Smrg symcode='[[BCDEGRST]]' 3929603fc0a3Smrg ;; 3930603fc0a3Smrgosf*) 3931603fc0a3Smrg symcode='[[BCDEGQRST]]' 3932603fc0a3Smrg ;; 3933603fc0a3Smrgsolaris*) 3934603fc0a3Smrg symcode='[[BDRT]]' 3935603fc0a3Smrg ;; 3936603fc0a3Smrgsco3.2v5*) 3937603fc0a3Smrg symcode='[[DT]]' 3938603fc0a3Smrg ;; 3939603fc0a3Smrgsysv4.2uw2*) 3940603fc0a3Smrg symcode='[[DT]]' 3941603fc0a3Smrg ;; 3942603fc0a3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3943603fc0a3Smrg symcode='[[ABDT]]' 3944603fc0a3Smrg ;; 3945603fc0a3Smrgsysv4) 3946603fc0a3Smrg symcode='[[DFNSTU]]' 3947603fc0a3Smrg ;; 3948603fc0a3Smrgesac 3949603fc0a3Smrg 3950603fc0a3Smrg# If we're using GNU nm, then use its standard symbol codes. 3951603fc0a3Smrgcase `$NM -V 2>&1` in 3952603fc0a3Smrg*GNU* | *'with BFD'*) 3953603fc0a3Smrg symcode='[[ABCDGIRSTW]]' ;; 3954603fc0a3Smrgesac 3955603fc0a3Smrg 3956603fc0a3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3957603fc0a3Smrg # Gets list of data symbols to import. 3958603fc0a3Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3959603fc0a3Smrg # Adjust the below global symbol transforms to fixup imported variables. 3960603fc0a3Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3961603fc0a3Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3962603fc0a3Smrg lt_c_name_lib_hook="\ 3963603fc0a3Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3964603fc0a3Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3965603fc0a3Smrgelse 3966603fc0a3Smrg # Disable hooks by default. 3967603fc0a3Smrg lt_cv_sys_global_symbol_to_import= 3968603fc0a3Smrg lt_cdecl_hook= 3969603fc0a3Smrg lt_c_name_hook= 3970603fc0a3Smrg lt_c_name_lib_hook= 3971603fc0a3Smrgfi 3972603fc0a3Smrg 3973603fc0a3Smrg# Transform an extracted symbol line into a proper C declaration. 3974603fc0a3Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3975603fc0a3Smrg# so use this general approach. 3976603fc0a3Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3977603fc0a3Smrg$lt_cdecl_hook\ 3978603fc0a3Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3979603fc0a3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3980603fc0a3Smrg 3981603fc0a3Smrg# Transform an extracted symbol line into symbol name and symbol address 3982603fc0a3Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3983603fc0a3Smrg$lt_c_name_hook\ 3984603fc0a3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3985603fc0a3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 3986603fc0a3Smrg 3987603fc0a3Smrg# Transform an extracted symbol line into symbol name with lib prefix and 3988603fc0a3Smrg# symbol address. 3989603fc0a3Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 3990603fc0a3Smrg$lt_c_name_lib_hook\ 3991603fc0a3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3992603fc0a3Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 3993603fc0a3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 3994603fc0a3Smrg 3995603fc0a3Smrg# Handle CRLF in mingw tool chain 3996603fc0a3Smrgopt_cr= 3997603fc0a3Smrgcase $build_os in 3998603fc0a3Smrgmingw*) 3999603fc0a3Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4000603fc0a3Smrg ;; 4001603fc0a3Smrgesac 4002603fc0a3Smrg 4003603fc0a3Smrg# Try without a prefix underscore, then with it. 4004603fc0a3Smrgfor ac_symprfx in "" "_"; do 4005603fc0a3Smrg 4006603fc0a3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4007603fc0a3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4008603fc0a3Smrg 4009603fc0a3Smrg # Write the raw and C identifiers. 4010603fc0a3Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4011603fc0a3Smrg # Fake it for dumpbin and say T for any non-static function, 4012603fc0a3Smrg # D for any global variable and I for any imported variable. 4013603fc0a3Smrg # Also find C++ and __fastcall symbols from MSVC++, 4014603fc0a3Smrg # which start with @ or ?. 4015603fc0a3Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4016603fc0a3Smrg" {last_section=section; section=\$ 3};"\ 4017603fc0a3Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4018603fc0a3Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4019603fc0a3Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4020603fc0a3Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4021603fc0a3Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4022603fc0a3Smrg" \$ 0!~/External *\|/{next};"\ 4023603fc0a3Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4024603fc0a3Smrg" {if(hide[section]) next};"\ 4025603fc0a3Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4026603fc0a3Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4027603fc0a3Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4028603fc0a3Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4029603fc0a3Smrg" ' prfx=^$ac_symprfx]" 4030603fc0a3Smrg else 4031603fc0a3Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4032603fc0a3Smrg fi 4033603fc0a3Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4034603fc0a3Smrg 4035603fc0a3Smrg # Check to see that the pipe works correctly. 4036603fc0a3Smrg pipe_works=no 4037603fc0a3Smrg 4038603fc0a3Smrg rm -f conftest* 4039603fc0a3Smrg cat > conftest.$ac_ext <<_LT_EOF 4040603fc0a3Smrg#ifdef __cplusplus 4041603fc0a3Smrgextern "C" { 4042603fc0a3Smrg#endif 4043603fc0a3Smrgchar nm_test_var; 4044603fc0a3Smrgvoid nm_test_func(void); 4045603fc0a3Smrgvoid nm_test_func(void){} 4046603fc0a3Smrg#ifdef __cplusplus 4047603fc0a3Smrg} 4048603fc0a3Smrg#endif 4049603fc0a3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4050603fc0a3Smrg_LT_EOF 4051603fc0a3Smrg 4052603fc0a3Smrg if AC_TRY_EVAL(ac_compile); then 4053603fc0a3Smrg # Now try to grab the symbols. 4054603fc0a3Smrg nlist=conftest.nm 4055603fc0a3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4056603fc0a3Smrg # Try sorting and uniquifying the output. 4057603fc0a3Smrg if sort "$nlist" | uniq > "$nlist"T; then 4058603fc0a3Smrg mv -f "$nlist"T "$nlist" 4059603fc0a3Smrg else 4060603fc0a3Smrg rm -f "$nlist"T 4061603fc0a3Smrg fi 4062603fc0a3Smrg 4063603fc0a3Smrg # Make sure that we snagged all the symbols we need. 4064603fc0a3Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4065603fc0a3Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4066603fc0a3Smrg cat <<_LT_EOF > conftest.$ac_ext 4067603fc0a3Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4068603fc0a3Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4069603fc0a3Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4070603fc0a3Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4071603fc0a3Smrg# define LT@&t@_DLSYM_CONST 4072603fc0a3Smrg#elif defined __osf__ 4073603fc0a3Smrg/* This system does not cope well with relocations in const data. */ 4074603fc0a3Smrg# define LT@&t@_DLSYM_CONST 4075603fc0a3Smrg#else 4076603fc0a3Smrg# define LT@&t@_DLSYM_CONST const 4077603fc0a3Smrg#endif 4078603fc0a3Smrg 4079603fc0a3Smrg#ifdef __cplusplus 4080603fc0a3Smrgextern "C" { 4081603fc0a3Smrg#endif 4082603fc0a3Smrg 4083603fc0a3Smrg_LT_EOF 4084603fc0a3Smrg # Now generate the symbol file. 4085603fc0a3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4086603fc0a3Smrg 4087603fc0a3Smrg cat <<_LT_EOF >> conftest.$ac_ext 4088603fc0a3Smrg 4089603fc0a3Smrg/* The mapping between symbol names and symbols. */ 4090603fc0a3SmrgLT@&t@_DLSYM_CONST struct { 4091603fc0a3Smrg const char *name; 4092603fc0a3Smrg void *address; 4093603fc0a3Smrg} 4094603fc0a3Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4095603fc0a3Smrg{ 4096603fc0a3Smrg { "@PROGRAM@", (void *) 0 }, 4097603fc0a3Smrg_LT_EOF 4098603fc0a3Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4099603fc0a3Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4100603fc0a3Smrg {0, (void *) 0} 4101603fc0a3Smrg}; 4102603fc0a3Smrg 4103603fc0a3Smrg/* This works around a problem in FreeBSD linker */ 4104603fc0a3Smrg#ifdef FREEBSD_WORKAROUND 4105603fc0a3Smrgstatic const void *lt_preloaded_setup() { 4106603fc0a3Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4107603fc0a3Smrg} 4108603fc0a3Smrg#endif 4109603fc0a3Smrg 4110603fc0a3Smrg#ifdef __cplusplus 4111603fc0a3Smrg} 4112603fc0a3Smrg#endif 4113603fc0a3Smrg_LT_EOF 4114603fc0a3Smrg # Now try linking the two files. 4115603fc0a3Smrg mv conftest.$ac_objext conftstm.$ac_objext 4116603fc0a3Smrg lt_globsym_save_LIBS=$LIBS 4117603fc0a3Smrg lt_globsym_save_CFLAGS=$CFLAGS 4118603fc0a3Smrg LIBS=conftstm.$ac_objext 4119603fc0a3Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4120603fc0a3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4121603fc0a3Smrg pipe_works=yes 4122603fc0a3Smrg fi 4123603fc0a3Smrg LIBS=$lt_globsym_save_LIBS 4124603fc0a3Smrg CFLAGS=$lt_globsym_save_CFLAGS 4125603fc0a3Smrg else 4126603fc0a3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4127603fc0a3Smrg fi 4128603fc0a3Smrg else 4129603fc0a3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4130603fc0a3Smrg fi 4131603fc0a3Smrg else 4132603fc0a3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4133603fc0a3Smrg fi 4134603fc0a3Smrg else 4135603fc0a3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4136603fc0a3Smrg cat conftest.$ac_ext >&5 4137603fc0a3Smrg fi 4138603fc0a3Smrg rm -rf conftest* conftst* 4139603fc0a3Smrg 4140603fc0a3Smrg # Do not use the global_symbol_pipe unless it works. 4141603fc0a3Smrg if test yes = "$pipe_works"; then 4142603fc0a3Smrg break 4143603fc0a3Smrg else 4144603fc0a3Smrg lt_cv_sys_global_symbol_pipe= 4145603fc0a3Smrg fi 4146603fc0a3Smrgdone 4147603fc0a3Smrg]) 4148603fc0a3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4149603fc0a3Smrg lt_cv_sys_global_symbol_to_cdecl= 4150603fc0a3Smrgfi 4151603fc0a3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4152603fc0a3Smrg AC_MSG_RESULT(failed) 4153603fc0a3Smrgelse 4154603fc0a3Smrg AC_MSG_RESULT(ok) 4155603fc0a3Smrgfi 4156603fc0a3Smrg 4157603fc0a3Smrg# Response file support. 4158603fc0a3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4159603fc0a3Smrg nm_file_list_spec='@' 4160603fc0a3Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4161603fc0a3Smrg nm_file_list_spec='@' 4162603fc0a3Smrgfi 4163603fc0a3Smrg 4164603fc0a3Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4165603fc0a3Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4166603fc0a3Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4167603fc0a3Smrg [Transform the output of nm in a proper C declaration]) 4168603fc0a3Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4169603fc0a3Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4170603fc0a3Smrg_LT_DECL([global_symbol_to_c_name_address], 4171603fc0a3Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4172603fc0a3Smrg [Transform the output of nm in a C name address pair]) 4173603fc0a3Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4174603fc0a3Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4175603fc0a3Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4176603fc0a3Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4177603fc0a3Smrg [The name lister interface]) 4178603fc0a3Smrg_LT_DECL([], [nm_file_list_spec], [1], 4179603fc0a3Smrg [Specify filename containing input files for $NM]) 4180603fc0a3Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4181603fc0a3Smrg 4182603fc0a3Smrg 4183603fc0a3Smrg# _LT_COMPILER_PIC([TAGNAME]) 4184603fc0a3Smrg# --------------------------- 4185603fc0a3Smrgm4_defun([_LT_COMPILER_PIC], 4186603fc0a3Smrg[m4_require([_LT_TAG_COMPILER])dnl 4187603fc0a3Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4188603fc0a3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4189603fc0a3Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4190603fc0a3Smrg 4191603fc0a3Smrgm4_if([$1], [CXX], [ 4192603fc0a3Smrg # C++ specific cases for pic, static, wl, etc. 4193603fc0a3Smrg if test yes = "$GXX"; then 4194603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4195603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4196603fc0a3Smrg 4197603fc0a3Smrg case $host_os in 4198603fc0a3Smrg aix*) 4199603fc0a3Smrg # All AIX code is PIC. 4200603fc0a3Smrg if test ia64 = "$host_cpu"; then 4201603fc0a3Smrg # AIX 5 now supports IA64 processor 4202603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4203603fc0a3Smrg fi 4204603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4205603fc0a3Smrg ;; 4206603fc0a3Smrg 4207603fc0a3Smrg amigaos*) 4208603fc0a3Smrg case $host_cpu in 4209603fc0a3Smrg powerpc) 4210603fc0a3Smrg # see comment about AmigaOS4 .so support 4211603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4212603fc0a3Smrg ;; 4213603fc0a3Smrg m68k) 4214603fc0a3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4215603fc0a3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4216603fc0a3Smrg # like '-m68040'. 4217603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4218603fc0a3Smrg ;; 4219603fc0a3Smrg esac 4220603fc0a3Smrg ;; 4221603fc0a3Smrg 4222603fc0a3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4223603fc0a3Smrg # PIC is the default for these OSes. 4224603fc0a3Smrg ;; 4225603fc0a3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4226603fc0a3Smrg # This hack is so that the source file can tell whether it is being 4227603fc0a3Smrg # built for inclusion in a dll (and should export symbols for example). 4228603fc0a3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4229603fc0a3Smrg # (--disable-auto-import) libraries 4230603fc0a3Smrg m4_if([$1], [GCJ], [], 4231603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4232603fc0a3Smrg case $host_os in 4233603fc0a3Smrg os2*) 4234603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4235603fc0a3Smrg ;; 4236603fc0a3Smrg esac 4237603fc0a3Smrg ;; 4238603fc0a3Smrg darwin* | rhapsody*) 4239603fc0a3Smrg # PIC is the default on this platform 4240603fc0a3Smrg # Common symbols not allowed in MH_DYLIB files 4241603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4242603fc0a3Smrg ;; 4243603fc0a3Smrg *djgpp*) 4244603fc0a3Smrg # DJGPP does not support shared libraries at all 4245603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4246603fc0a3Smrg ;; 4247603fc0a3Smrg haiku*) 4248603fc0a3Smrg # PIC is the default for Haiku. 4249603fc0a3Smrg # The "-static" flag exists, but is broken. 4250603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4251603fc0a3Smrg ;; 4252603fc0a3Smrg interix[[3-9]]*) 4253603fc0a3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4254603fc0a3Smrg # Instead, we relocate shared libraries at runtime. 4255603fc0a3Smrg ;; 4256603fc0a3Smrg sysv4*MP*) 4257603fc0a3Smrg if test -d /usr/nec; then 4258603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4259603fc0a3Smrg fi 4260603fc0a3Smrg ;; 4261603fc0a3Smrg hpux*) 4262603fc0a3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4263603fc0a3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4264603fc0a3Smrg # sets the default TLS model and affects inlining. 4265603fc0a3Smrg case $host_cpu in 4266603fc0a3Smrg hppa*64*) 4267603fc0a3Smrg ;; 4268603fc0a3Smrg *) 4269603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4270603fc0a3Smrg ;; 4271603fc0a3Smrg esac 4272603fc0a3Smrg ;; 4273603fc0a3Smrg *qnx* | *nto*) 4274603fc0a3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4275603fc0a3Smrg # it will coredump. 4276603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4277603fc0a3Smrg ;; 4278603fc0a3Smrg *) 4279603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4280603fc0a3Smrg ;; 4281603fc0a3Smrg esac 4282603fc0a3Smrg else 4283603fc0a3Smrg case $host_os in 4284603fc0a3Smrg aix[[4-9]]*) 4285603fc0a3Smrg # All AIX code is PIC. 4286603fc0a3Smrg if test ia64 = "$host_cpu"; then 4287603fc0a3Smrg # AIX 5 now supports IA64 processor 4288603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4289603fc0a3Smrg else 4290603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4291603fc0a3Smrg fi 4292603fc0a3Smrg ;; 4293603fc0a3Smrg chorus*) 4294603fc0a3Smrg case $cc_basename in 4295603fc0a3Smrg cxch68*) 4296603fc0a3Smrg # Green Hills C++ Compiler 4297603fc0a3Smrg # _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" 4298603fc0a3Smrg ;; 4299603fc0a3Smrg esac 4300603fc0a3Smrg ;; 4301603fc0a3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4302603fc0a3Smrg # This hack is so that the source file can tell whether it is being 4303603fc0a3Smrg # built for inclusion in a dll (and should export symbols for example). 4304603fc0a3Smrg m4_if([$1], [GCJ], [], 4305603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4306603fc0a3Smrg ;; 4307603fc0a3Smrg dgux*) 4308603fc0a3Smrg case $cc_basename in 4309603fc0a3Smrg ec++*) 4310603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4311603fc0a3Smrg ;; 4312603fc0a3Smrg ghcx*) 4313603fc0a3Smrg # Green Hills C++ Compiler 4314603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4315603fc0a3Smrg ;; 4316603fc0a3Smrg *) 4317603fc0a3Smrg ;; 4318603fc0a3Smrg esac 4319603fc0a3Smrg ;; 4320603fc0a3Smrg freebsd* | dragonfly*) 4321603fc0a3Smrg # FreeBSD uses GNU C++ 4322603fc0a3Smrg ;; 4323603fc0a3Smrg hpux9* | hpux10* | hpux11*) 4324603fc0a3Smrg case $cc_basename in 4325603fc0a3Smrg CC*) 4326603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4328603fc0a3Smrg if test ia64 != "$host_cpu"; then 4329603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4330603fc0a3Smrg fi 4331603fc0a3Smrg ;; 4332603fc0a3Smrg aCC*) 4333603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4334603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4335603fc0a3Smrg case $host_cpu in 4336603fc0a3Smrg hppa*64*|ia64*) 4337603fc0a3Smrg # +Z the default 4338603fc0a3Smrg ;; 4339603fc0a3Smrg *) 4340603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4341603fc0a3Smrg ;; 4342603fc0a3Smrg esac 4343603fc0a3Smrg ;; 4344603fc0a3Smrg *) 4345603fc0a3Smrg ;; 4346603fc0a3Smrg esac 4347603fc0a3Smrg ;; 4348603fc0a3Smrg interix*) 4349603fc0a3Smrg # This is c89, which is MS Visual C++ (no shared libs) 4350603fc0a3Smrg # Anyone wants to do a port? 4351603fc0a3Smrg ;; 4352603fc0a3Smrg irix5* | irix6* | nonstopux*) 4353603fc0a3Smrg case $cc_basename in 4354603fc0a3Smrg CC*) 4355603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4356603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4357603fc0a3Smrg # CC pic flag -KPIC is the default. 4358603fc0a3Smrg ;; 4359603fc0a3Smrg *) 4360603fc0a3Smrg ;; 4361603fc0a3Smrg esac 4362603fc0a3Smrg ;; 4363603fc0a3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4364603fc0a3Smrg case $cc_basename in 4365603fc0a3Smrg KCC*) 4366603fc0a3Smrg # KAI C++ Compiler 4367603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4368603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4369603fc0a3Smrg ;; 4370603fc0a3Smrg ecpc* ) 4371603fc0a3Smrg # old Intel C++ for x86_64, which still supported -KPIC. 4372603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4374603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4375603fc0a3Smrg ;; 4376603fc0a3Smrg icpc* ) 4377603fc0a3Smrg # Intel C++, used to be incompatible with GCC. 4378603fc0a3Smrg # ICC 10 doesn't accept -KPIC any more. 4379603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4380603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4381603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4382603fc0a3Smrg ;; 4383603fc0a3Smrg pgCC* | pgcpp*) 4384603fc0a3Smrg # Portland Group C++ compiler 4385603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4386603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4387603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4388603fc0a3Smrg ;; 4389603fc0a3Smrg cxx*) 4390603fc0a3Smrg # Compaq C++ 4391603fc0a3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4392603fc0a3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4393603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4394603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395603fc0a3Smrg ;; 4396603fc0a3Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4397603fc0a3Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4398603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401603fc0a3Smrg ;; 4402603fc0a3Smrg *) 4403603fc0a3Smrg case `$CC -V 2>&1 | sed 5q` in 4404603fc0a3Smrg *Sun\ C*) 4405603fc0a3Smrg # Sun C++ 5.9 4406603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4409603fc0a3Smrg ;; 4410603fc0a3Smrg esac 4411603fc0a3Smrg ;; 4412603fc0a3Smrg esac 4413603fc0a3Smrg ;; 4414603fc0a3Smrg lynxos*) 4415603fc0a3Smrg ;; 4416603fc0a3Smrg m88k*) 4417603fc0a3Smrg ;; 4418603fc0a3Smrg mvs*) 4419603fc0a3Smrg case $cc_basename in 4420603fc0a3Smrg cxx*) 4421603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4422603fc0a3Smrg ;; 4423603fc0a3Smrg *) 4424603fc0a3Smrg ;; 4425603fc0a3Smrg esac 4426603fc0a3Smrg ;; 4427603fc0a3Smrg netbsd*) 4428603fc0a3Smrg ;; 4429603fc0a3Smrg *qnx* | *nto*) 4430603fc0a3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4431603fc0a3Smrg # it will coredump. 4432603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4433603fc0a3Smrg ;; 4434603fc0a3Smrg osf3* | osf4* | osf5*) 4435603fc0a3Smrg case $cc_basename in 4436603fc0a3Smrg KCC*) 4437603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4438603fc0a3Smrg ;; 4439603fc0a3Smrg RCC*) 4440603fc0a3Smrg # Rational C++ 2.4.1 4441603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4442603fc0a3Smrg ;; 4443603fc0a3Smrg cxx*) 4444603fc0a3Smrg # Digital/Compaq C++ 4445603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4446603fc0a3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4447603fc0a3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4448603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4449603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4450603fc0a3Smrg ;; 4451603fc0a3Smrg *) 4452603fc0a3Smrg ;; 4453603fc0a3Smrg esac 4454603fc0a3Smrg ;; 4455603fc0a3Smrg psos*) 4456603fc0a3Smrg ;; 4457603fc0a3Smrg solaris*) 4458603fc0a3Smrg case $cc_basename in 4459603fc0a3Smrg CC* | sunCC*) 4460603fc0a3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4461603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4462603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4463603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4464603fc0a3Smrg ;; 4465603fc0a3Smrg gcx*) 4466603fc0a3Smrg # Green Hills C++ Compiler 4467603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4468603fc0a3Smrg ;; 4469603fc0a3Smrg *) 4470603fc0a3Smrg ;; 4471603fc0a3Smrg esac 4472603fc0a3Smrg ;; 4473603fc0a3Smrg sunos4*) 4474603fc0a3Smrg case $cc_basename in 4475603fc0a3Smrg CC*) 4476603fc0a3Smrg # Sun C++ 4.x 4477603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4478603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4479603fc0a3Smrg ;; 4480603fc0a3Smrg lcc*) 4481603fc0a3Smrg # Lucid 4482603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4483603fc0a3Smrg ;; 4484603fc0a3Smrg *) 4485603fc0a3Smrg ;; 4486603fc0a3Smrg esac 4487603fc0a3Smrg ;; 4488603fc0a3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4489603fc0a3Smrg case $cc_basename in 4490603fc0a3Smrg CC*) 4491603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4492603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4493603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4494603fc0a3Smrg ;; 4495603fc0a3Smrg esac 4496603fc0a3Smrg ;; 4497603fc0a3Smrg tandem*) 4498603fc0a3Smrg case $cc_basename in 4499603fc0a3Smrg NCC*) 4500603fc0a3Smrg # NonStop-UX NCC 3.20 4501603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4502603fc0a3Smrg ;; 4503603fc0a3Smrg *) 4504603fc0a3Smrg ;; 4505603fc0a3Smrg esac 4506603fc0a3Smrg ;; 4507603fc0a3Smrg vxworks*) 4508603fc0a3Smrg ;; 4509603fc0a3Smrg *) 4510603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4511603fc0a3Smrg ;; 4512603fc0a3Smrg esac 4513603fc0a3Smrg fi 4514603fc0a3Smrg], 4515603fc0a3Smrg[ 4516603fc0a3Smrg if test yes = "$GCC"; then 4517603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4518603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4519603fc0a3Smrg 4520603fc0a3Smrg case $host_os in 4521603fc0a3Smrg aix*) 4522603fc0a3Smrg # All AIX code is PIC. 4523603fc0a3Smrg if test ia64 = "$host_cpu"; then 4524603fc0a3Smrg # AIX 5 now supports IA64 processor 4525603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4526603fc0a3Smrg fi 4527603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4528603fc0a3Smrg ;; 4529603fc0a3Smrg 4530603fc0a3Smrg amigaos*) 4531603fc0a3Smrg case $host_cpu in 4532603fc0a3Smrg powerpc) 4533603fc0a3Smrg # see comment about AmigaOS4 .so support 4534603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4535603fc0a3Smrg ;; 4536603fc0a3Smrg m68k) 4537603fc0a3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4538603fc0a3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4539603fc0a3Smrg # like '-m68040'. 4540603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4541603fc0a3Smrg ;; 4542603fc0a3Smrg esac 4543603fc0a3Smrg ;; 4544603fc0a3Smrg 4545603fc0a3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4546603fc0a3Smrg # PIC is the default for these OSes. 4547603fc0a3Smrg ;; 4548603fc0a3Smrg 4549603fc0a3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4550603fc0a3Smrg # This hack is so that the source file can tell whether it is being 4551603fc0a3Smrg # built for inclusion in a dll (and should export symbols for example). 4552603fc0a3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4553603fc0a3Smrg # (--disable-auto-import) libraries 4554603fc0a3Smrg m4_if([$1], [GCJ], [], 4555603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4556603fc0a3Smrg case $host_os in 4557603fc0a3Smrg os2*) 4558603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4559603fc0a3Smrg ;; 4560603fc0a3Smrg esac 4561603fc0a3Smrg ;; 4562603fc0a3Smrg 4563603fc0a3Smrg darwin* | rhapsody*) 4564603fc0a3Smrg # PIC is the default on this platform 4565603fc0a3Smrg # Common symbols not allowed in MH_DYLIB files 4566603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4567603fc0a3Smrg ;; 4568603fc0a3Smrg 4569603fc0a3Smrg haiku*) 4570603fc0a3Smrg # PIC is the default for Haiku. 4571603fc0a3Smrg # The "-static" flag exists, but is broken. 4572603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4573603fc0a3Smrg ;; 4574603fc0a3Smrg 4575603fc0a3Smrg hpux*) 4576603fc0a3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4577603fc0a3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4578603fc0a3Smrg # sets the default TLS model and affects inlining. 4579603fc0a3Smrg case $host_cpu in 4580603fc0a3Smrg hppa*64*) 4581603fc0a3Smrg # +Z the default 4582603fc0a3Smrg ;; 4583603fc0a3Smrg *) 4584603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4585603fc0a3Smrg ;; 4586603fc0a3Smrg esac 4587603fc0a3Smrg ;; 4588603fc0a3Smrg 4589603fc0a3Smrg interix[[3-9]]*) 4590603fc0a3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4591603fc0a3Smrg # Instead, we relocate shared libraries at runtime. 4592603fc0a3Smrg ;; 4593603fc0a3Smrg 4594603fc0a3Smrg msdosdjgpp*) 4595603fc0a3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4596603fc0a3Smrg # on systems that don't support them. 4597603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4598603fc0a3Smrg enable_shared=no 4599603fc0a3Smrg ;; 4600603fc0a3Smrg 4601603fc0a3Smrg *nto* | *qnx*) 4602603fc0a3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4603603fc0a3Smrg # it will coredump. 4604603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4605603fc0a3Smrg ;; 4606603fc0a3Smrg 4607603fc0a3Smrg sysv4*MP*) 4608603fc0a3Smrg if test -d /usr/nec; then 4609603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4610603fc0a3Smrg fi 4611603fc0a3Smrg ;; 4612603fc0a3Smrg 4613603fc0a3Smrg *) 4614603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4615603fc0a3Smrg ;; 4616603fc0a3Smrg esac 4617603fc0a3Smrg 4618603fc0a3Smrg case $cc_basename in 4619603fc0a3Smrg nvcc*) # Cuda Compiler Driver 2.2 4620603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4621603fc0a3Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4622603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4623603fc0a3Smrg fi 4624603fc0a3Smrg ;; 4625603fc0a3Smrg esac 4626603fc0a3Smrg else 4627603fc0a3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4628603fc0a3Smrg case $host_os in 4629603fc0a3Smrg aix*) 4630603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4631603fc0a3Smrg if test ia64 = "$host_cpu"; then 4632603fc0a3Smrg # AIX 5 now supports IA64 processor 4633603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4634603fc0a3Smrg else 4635603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4636603fc0a3Smrg fi 4637603fc0a3Smrg ;; 4638603fc0a3Smrg 4639603fc0a3Smrg darwin* | rhapsody*) 4640603fc0a3Smrg # PIC is the default on this platform 4641603fc0a3Smrg # Common symbols not allowed in MH_DYLIB files 4642603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4643603fc0a3Smrg case $cc_basename in 4644603fc0a3Smrg nagfor*) 4645603fc0a3Smrg # NAG Fortran compiler 4646603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4647603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4648603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4649603fc0a3Smrg ;; 4650603fc0a3Smrg esac 4651603fc0a3Smrg ;; 4652603fc0a3Smrg 4653603fc0a3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4654603fc0a3Smrg # This hack is so that the source file can tell whether it is being 4655603fc0a3Smrg # built for inclusion in a dll (and should export symbols for example). 4656603fc0a3Smrg m4_if([$1], [GCJ], [], 4657603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4658603fc0a3Smrg case $host_os in 4659603fc0a3Smrg os2*) 4660603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4661603fc0a3Smrg ;; 4662603fc0a3Smrg esac 4663603fc0a3Smrg ;; 4664603fc0a3Smrg 4665603fc0a3Smrg hpux9* | hpux10* | hpux11*) 4666603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4667603fc0a3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4668603fc0a3Smrg # not for PA HP-UX. 4669603fc0a3Smrg case $host_cpu in 4670603fc0a3Smrg hppa*64*|ia64*) 4671603fc0a3Smrg # +Z the default 4672603fc0a3Smrg ;; 4673603fc0a3Smrg *) 4674603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4675603fc0a3Smrg ;; 4676603fc0a3Smrg esac 4677603fc0a3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4678603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4679603fc0a3Smrg ;; 4680603fc0a3Smrg 4681603fc0a3Smrg irix5* | irix6* | nonstopux*) 4682603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4683603fc0a3Smrg # PIC (with -KPIC) is the default. 4684603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4685603fc0a3Smrg ;; 4686603fc0a3Smrg 4687603fc0a3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4688603fc0a3Smrg case $cc_basename in 4689603fc0a3Smrg # old Intel for x86_64, which still supported -KPIC. 4690603fc0a3Smrg ecc*) 4691603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4692603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4693603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4694603fc0a3Smrg ;; 4695603fc0a3Smrg # icc used to be incompatible with GCC. 4696603fc0a3Smrg # ICC 10 doesn't accept -KPIC any more. 4697603fc0a3Smrg icc* | ifort*) 4698603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4699603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4700603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4701603fc0a3Smrg ;; 4702603fc0a3Smrg # Lahey Fortran 8.1. 4703603fc0a3Smrg lf95*) 4704603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4705603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4706603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4707603fc0a3Smrg ;; 4708603fc0a3Smrg nagfor*) 4709603fc0a3Smrg # NAG Fortran compiler 4710603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4711603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4712603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4713603fc0a3Smrg ;; 4714603fc0a3Smrg tcc*) 4715603fc0a3Smrg # Fabrice Bellard et al's Tiny C Compiler 4716603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4717603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4718603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4719603fc0a3Smrg ;; 4720603fc0a3Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4721603fc0a3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4722603fc0a3Smrg # which looks to be a dead project) 4723603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4724603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4725603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4726603fc0a3Smrg ;; 4727603fc0a3Smrg ccc*) 4728603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4729603fc0a3Smrg # All Alpha code is PIC. 4730603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4731603fc0a3Smrg ;; 4732603fc0a3Smrg xl* | bgxl* | bgf* | mpixl*) 4733603fc0a3Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4734603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4735603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4736603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4737603fc0a3Smrg ;; 4738603fc0a3Smrg *) 4739603fc0a3Smrg case `$CC -V 2>&1 | sed 5q` in 4740603fc0a3Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4741603fc0a3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4742603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4743603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4744603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4745603fc0a3Smrg ;; 4746603fc0a3Smrg *Sun\ F* | *Sun*Fortran*) 4747603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4748603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4749603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4750603fc0a3Smrg ;; 4751603fc0a3Smrg *Sun\ C*) 4752603fc0a3Smrg # Sun C 5.9 4753603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4754603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4755603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756603fc0a3Smrg ;; 4757603fc0a3Smrg *Intel*\ [[CF]]*Compiler*) 4758603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4759603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4760603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4761603fc0a3Smrg ;; 4762603fc0a3Smrg *Portland\ Group*) 4763603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4764603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4765603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4766603fc0a3Smrg ;; 4767603fc0a3Smrg esac 4768603fc0a3Smrg ;; 4769603fc0a3Smrg esac 4770603fc0a3Smrg ;; 4771603fc0a3Smrg 4772603fc0a3Smrg newsos6) 4773603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775603fc0a3Smrg ;; 4776603fc0a3Smrg 4777603fc0a3Smrg *nto* | *qnx*) 4778603fc0a3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4779603fc0a3Smrg # it will coredump. 4780603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4781603fc0a3Smrg ;; 4782603fc0a3Smrg 4783603fc0a3Smrg osf3* | osf4* | osf5*) 4784603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4785603fc0a3Smrg # All OSF/1 code is PIC. 4786603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4787603fc0a3Smrg ;; 4788603fc0a3Smrg 4789603fc0a3Smrg rdos*) 4790603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4791603fc0a3Smrg ;; 4792603fc0a3Smrg 4793603fc0a3Smrg solaris*) 4794603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4795603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4796603fc0a3Smrg case $cc_basename in 4797603fc0a3Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4798603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4799603fc0a3Smrg *) 4800603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4801603fc0a3Smrg esac 4802603fc0a3Smrg ;; 4803603fc0a3Smrg 4804603fc0a3Smrg sunos4*) 4805603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4806603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4807603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4808603fc0a3Smrg ;; 4809603fc0a3Smrg 4810603fc0a3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4811603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4813603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4814603fc0a3Smrg ;; 4815603fc0a3Smrg 4816603fc0a3Smrg sysv4*MP*) 4817603fc0a3Smrg if test -d /usr/nec; then 4818603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4819603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4820603fc0a3Smrg fi 4821603fc0a3Smrg ;; 4822603fc0a3Smrg 4823603fc0a3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4824603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4825603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4826603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4827603fc0a3Smrg ;; 4828603fc0a3Smrg 4829603fc0a3Smrg unicos*) 4830603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4831603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4832603fc0a3Smrg ;; 4833603fc0a3Smrg 4834603fc0a3Smrg uts4*) 4835603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4836603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4837603fc0a3Smrg ;; 4838603fc0a3Smrg 4839603fc0a3Smrg *) 4840603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4841603fc0a3Smrg ;; 4842603fc0a3Smrg esac 4843603fc0a3Smrg fi 4844603fc0a3Smrg]) 4845603fc0a3Smrgcase $host_os in 4846603fc0a3Smrg # For platforms that do not support PIC, -DPIC is meaningless: 4847603fc0a3Smrg *djgpp*) 4848603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4849603fc0a3Smrg ;; 4850603fc0a3Smrg *) 4851603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4852603fc0a3Smrg ;; 4853603fc0a3Smrgesac 4854603fc0a3Smrg 4855603fc0a3SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4856603fc0a3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4857603fc0a3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4858603fc0a3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4859603fc0a3Smrg 4860603fc0a3Smrg# 4861603fc0a3Smrg# Check to make sure the PIC flag actually works. 4862603fc0a3Smrg# 4863603fc0a3Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4864603fc0a3Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4865603fc0a3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4866603fc0a3Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4867603fc0a3Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4868603fc0a3Smrg "" | " "*) ;; 4869603fc0a3Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4870603fc0a3Smrg esac], 4871603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4872603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4873603fc0a3Smrgfi 4874603fc0a3Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4875603fc0a3Smrg [Additional compiler flags for building library objects]) 4876603fc0a3Smrg 4877603fc0a3Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4878603fc0a3Smrg [How to pass a linker flag through the compiler]) 4879603fc0a3Smrg# 4880603fc0a3Smrg# Check to make sure the static flag actually works. 4881603fc0a3Smrg# 4882603fc0a3Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4883603fc0a3Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4884603fc0a3Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4885603fc0a3Smrg $lt_tmp_static_flag, 4886603fc0a3Smrg [], 4887603fc0a3Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4888603fc0a3Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4889603fc0a3Smrg [Compiler flag to prevent dynamic linking]) 4890603fc0a3Smrg])# _LT_COMPILER_PIC 4891603fc0a3Smrg 4892603fc0a3Smrg 4893603fc0a3Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4894603fc0a3Smrg# ---------------------------- 4895603fc0a3Smrg# See if the linker supports building shared libraries. 4896603fc0a3Smrgm4_defun([_LT_LINKER_SHLIBS], 4897603fc0a3Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4898603fc0a3SmrgAC_REQUIRE([LT_PATH_NM])dnl 4899603fc0a3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4900603fc0a3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4901603fc0a3Smrgm4_require([_LT_DECL_EGREP])dnl 4902603fc0a3Smrgm4_require([_LT_DECL_SED])dnl 4903603fc0a3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4904603fc0a3Smrgm4_require([_LT_TAG_COMPILER])dnl 4905603fc0a3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4906603fc0a3Smrgm4_if([$1], [CXX], [ 4907603fc0a3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4908603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4909603fc0a3Smrg case $host_os in 4910603fc0a3Smrg aix[[4-9]]*) 4911603fc0a3Smrg # If we're using GNU nm, then we don't want the "-C" option. 4912603fc0a3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4913603fc0a3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4914603fc0a3Smrg # weak defined symbols like other global defined symbols, whereas 4915603fc0a3Smrg # GNU nm marks them as "W". 4916603fc0a3Smrg # While the 'weak' keyword is ignored in the Export File, we need 4917603fc0a3Smrg # it in the Import File for the 'aix-soname' feature, so we have 4918603fc0a3Smrg # to replace the "-B" option with "-P" for AIX nm. 4919603fc0a3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4920603fc0a3Smrg _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' 4921603fc0a3Smrg else 4922603fc0a3Smrg _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 == "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' 4923603fc0a3Smrg fi 4924603fc0a3Smrg ;; 4925603fc0a3Smrg pw32*) 4926603fc0a3Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4927603fc0a3Smrg ;; 4928603fc0a3Smrg cygwin* | mingw* | cegcc*) 4929603fc0a3Smrg case $cc_basename in 4930603fc0a3Smrg cl*) 4931603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4932603fc0a3Smrg ;; 4933603fc0a3Smrg *) 4934603fc0a3Smrg _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' 4935603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4936603fc0a3Smrg ;; 4937603fc0a3Smrg esac 4938603fc0a3Smrg ;; 4939603fc0a3Smrg *) 4940603fc0a3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4941603fc0a3Smrg ;; 4942603fc0a3Smrg esac 4943603fc0a3Smrg], [ 4944603fc0a3Smrg runpath_var= 4945603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4946603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4947603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)= 4948603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4949603fc0a3Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4950603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4951603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4952603fc0a3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4953603fc0a3Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4954603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4955603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4956603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4957603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4958603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4959603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4960603fc0a3Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4961603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4962603fc0a3Smrg _LT_TAGVAR(module_cmds, $1)= 4963603fc0a3Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4964603fc0a3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4965603fc0a3Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4966603fc0a3Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4967603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4968603fc0a3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4969603fc0a3Smrg # included in the symbol list 4970603fc0a3Smrg _LT_TAGVAR(include_expsyms, $1)= 4971603fc0a3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4972603fc0a3Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4973603fc0a3Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4974603fc0a3Smrg # as well as any symbol that contains 'd'. 4975603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4976603fc0a3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4977603fc0a3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4978603fc0a3Smrg # the symbol is explicitly referenced. Since portable code cannot 4979603fc0a3Smrg # rely on this symbol name, it's probably fine to never include it in 4980603fc0a3Smrg # preloaded symbol tables. 4981603fc0a3Smrg # Exclude shared library initialization/finalization symbols. 4982603fc0a3Smrgdnl Note also adjust exclude_expsyms for C++ above. 4983603fc0a3Smrg extract_expsyms_cmds= 4984603fc0a3Smrg 4985603fc0a3Smrg case $host_os in 4986603fc0a3Smrg cygwin* | mingw* | pw32* | cegcc*) 4987603fc0a3Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4988603fc0a3Smrg # When not using gcc, we currently assume that we are using 4989603fc0a3Smrg # Microsoft Visual C++. 4990603fc0a3Smrg if test yes != "$GCC"; then 4991603fc0a3Smrg with_gnu_ld=no 4992603fc0a3Smrg fi 4993603fc0a3Smrg ;; 4994603fc0a3Smrg interix*) 4995603fc0a3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4996603fc0a3Smrg with_gnu_ld=yes 4997603fc0a3Smrg ;; 4998603fc0a3Smrg openbsd* | bitrig*) 4999603fc0a3Smrg with_gnu_ld=no 5000603fc0a3Smrg ;; 5001603fc0a3Smrg esac 5002603fc0a3Smrg 5003603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5004603fc0a3Smrg 5005603fc0a3Smrg # On some targets, GNU ld is compatible enough with the native linker 5006603fc0a3Smrg # that we're better off using the native interface for both. 5007603fc0a3Smrg lt_use_gnu_ld_interface=no 5008603fc0a3Smrg if test yes = "$with_gnu_ld"; then 5009603fc0a3Smrg case $host_os in 5010603fc0a3Smrg aix*) 5011603fc0a3Smrg # The AIX port of GNU ld has always aspired to compatibility 5012603fc0a3Smrg # with the native linker. However, as the warning in the GNU ld 5013603fc0a3Smrg # block says, versions before 2.19.5* couldn't really create working 5014603fc0a3Smrg # shared libraries, regardless of the interface used. 5015603fc0a3Smrg case `$LD -v 2>&1` in 5016603fc0a3Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5017603fc0a3Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5018603fc0a3Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5019603fc0a3Smrg *) 5020603fc0a3Smrg lt_use_gnu_ld_interface=yes 5021603fc0a3Smrg ;; 5022603fc0a3Smrg esac 5023603fc0a3Smrg ;; 5024603fc0a3Smrg *) 5025603fc0a3Smrg lt_use_gnu_ld_interface=yes 5026603fc0a3Smrg ;; 5027603fc0a3Smrg esac 5028603fc0a3Smrg fi 5029603fc0a3Smrg 5030603fc0a3Smrg if test yes = "$lt_use_gnu_ld_interface"; then 5031603fc0a3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5032603fc0a3Smrg wlarc='$wl' 5033603fc0a3Smrg 5034603fc0a3Smrg # Set some defaults for GNU ld with shared library support. These 5035603fc0a3Smrg # are reset later if shared libraries are not supported. Putting them 5036603fc0a3Smrg # here allows them to be overridden if necessary. 5037603fc0a3Smrg runpath_var=LD_RUN_PATH 5038603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5039603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5040603fc0a3Smrg # ancient GNU ld didn't support --whole-archive et. al. 5041603fc0a3Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5042603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5043603fc0a3Smrg else 5044603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5045603fc0a3Smrg fi 5046603fc0a3Smrg supports_anon_versioning=no 5047603fc0a3Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5048603fc0a3Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5049603fc0a3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5050603fc0a3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5051603fc0a3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5052603fc0a3Smrg *\ 2.11.*) ;; # other 2.11 versions 5053603fc0a3Smrg *) supports_anon_versioning=yes ;; 5054603fc0a3Smrg esac 5055603fc0a3Smrg 5056603fc0a3Smrg # See if GNU ld supports shared libraries. 5057603fc0a3Smrg case $host_os in 5058603fc0a3Smrg aix[[3-9]]*) 5059603fc0a3Smrg # On AIX/PPC, the GNU linker is very broken 5060603fc0a3Smrg if test ia64 != "$host_cpu"; then 5061603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5062603fc0a3Smrg cat <<_LT_EOF 1>&2 5063603fc0a3Smrg 5064603fc0a3Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5065603fc0a3Smrg*** to be unable to reliably create shared libraries on AIX. 5066603fc0a3Smrg*** Therefore, libtool is disabling shared libraries support. If you 5067603fc0a3Smrg*** really care for shared libraries, you may want to install binutils 5068603fc0a3Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5069603fc0a3Smrg*** You will then need to restart the configuration process. 5070603fc0a3Smrg 5071603fc0a3Smrg_LT_EOF 5072603fc0a3Smrg fi 5073603fc0a3Smrg ;; 5074603fc0a3Smrg 5075603fc0a3Smrg amigaos*) 5076603fc0a3Smrg case $host_cpu in 5077603fc0a3Smrg powerpc) 5078603fc0a3Smrg # see comment about AmigaOS4 .so support 5079603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5080603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5081603fc0a3Smrg ;; 5082603fc0a3Smrg m68k) 5083603fc0a3Smrg _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)' 5084603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5085603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5086603fc0a3Smrg ;; 5087603fc0a3Smrg esac 5088603fc0a3Smrg ;; 5089603fc0a3Smrg 5090603fc0a3Smrg beos*) 5091603fc0a3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5092603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5093603fc0a3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5094603fc0a3Smrg # support --undefined. This deserves some investigation. FIXME 5095603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5096603fc0a3Smrg else 5097603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5098603fc0a3Smrg fi 5099603fc0a3Smrg ;; 5100603fc0a3Smrg 5101603fc0a3Smrg cygwin* | mingw* | pw32* | cegcc*) 5102603fc0a3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5103603fc0a3Smrg # as there is no search path for DLLs. 5104603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5105603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5106603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5107603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5108603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5109603fc0a3Smrg _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' 5110603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5111603fc0a3Smrg 5112603fc0a3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5113603fc0a3Smrg _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' 5114603fc0a3Smrg # If the export-symbols file already is a .def file, use it as 5115603fc0a3Smrg # is; otherwise, prepend EXPORTS... 5116603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5117603fc0a3Smrg cp $export_symbols $output_objdir/$soname.def; 5118603fc0a3Smrg else 5119603fc0a3Smrg echo EXPORTS > $output_objdir/$soname.def; 5120603fc0a3Smrg cat $export_symbols >> $output_objdir/$soname.def; 5121603fc0a3Smrg fi~ 5122603fc0a3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5123603fc0a3Smrg else 5124603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5125603fc0a3Smrg fi 5126603fc0a3Smrg ;; 5127603fc0a3Smrg 5128603fc0a3Smrg haiku*) 5129603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5130603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5131603fc0a3Smrg ;; 5132603fc0a3Smrg 5133603fc0a3Smrg os2*) 5134603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5135603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5136603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5137603fc0a3Smrg shrext_cmds=.dll 5138603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5139603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5140603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5141603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5142603fc0a3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5143603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5144603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 5145603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5146603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5147603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5148603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5149603fc0a3Smrg prefix_cmds="$SED"~ 5150603fc0a3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5151603fc0a3Smrg prefix_cmds="$prefix_cmds -e 1d"; 5152603fc0a3Smrg fi~ 5153603fc0a3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5154603fc0a3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5155603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5156603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 5157603fc0a3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5158603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5159603fc0a3Smrg ;; 5160603fc0a3Smrg 5161603fc0a3Smrg interix[[3-9]]*) 5162603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5163603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5164603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5165603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5166603fc0a3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5167603fc0a3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5168603fc0a3Smrg # default) and relocated if they conflict, which is a slow very memory 5169603fc0a3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5170603fc0a3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5171603fc0a3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5172603fc0a3Smrg _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' 5173603fc0a3Smrg _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' 5174603fc0a3Smrg ;; 5175603fc0a3Smrg 5176603fc0a3Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5177603fc0a3Smrg tmp_diet=no 5178603fc0a3Smrg if test linux-dietlibc = "$host_os"; then 5179603fc0a3Smrg case $cc_basename in 5180603fc0a3Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5181603fc0a3Smrg esac 5182603fc0a3Smrg fi 5183603fc0a3Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5184603fc0a3Smrg && test no = "$tmp_diet" 5185603fc0a3Smrg then 5186603fc0a3Smrg tmp_addflag=' $pic_flag' 5187603fc0a3Smrg tmp_sharedflag='-shared' 5188603fc0a3Smrg case $cc_basename,$host_cpu in 5189603fc0a3Smrg pgcc*) # Portland Group C compiler 5190603fc0a3Smrg _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' 5191603fc0a3Smrg tmp_addflag=' $pic_flag' 5192603fc0a3Smrg ;; 5193603fc0a3Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5194603fc0a3Smrg # Portland Group f77 and f90 compilers 5195603fc0a3Smrg _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' 5196603fc0a3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5197603fc0a3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5198603fc0a3Smrg tmp_addflag=' -i_dynamic' ;; 5199603fc0a3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5200603fc0a3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5201603fc0a3Smrg ifc* | ifort*) # Intel Fortran compiler 5202603fc0a3Smrg tmp_addflag=' -nofor_main' ;; 5203603fc0a3Smrg lf95*) # Lahey Fortran 8.1 5204603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5205603fc0a3Smrg tmp_sharedflag='--shared' ;; 5206603fc0a3Smrg nagfor*) # NAGFOR 5.3 5207603fc0a3Smrg tmp_sharedflag='-Wl,-shared' ;; 5208603fc0a3Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5209603fc0a3Smrg tmp_sharedflag='-qmkshrobj' 5210603fc0a3Smrg tmp_addflag= ;; 5211603fc0a3Smrg nvcc*) # Cuda Compiler Driver 2.2 5212603fc0a3Smrg _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' 5213603fc0a3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5214603fc0a3Smrg ;; 5215603fc0a3Smrg esac 5216603fc0a3Smrg case `$CC -V 2>&1 | sed 5q` in 5217603fc0a3Smrg *Sun\ C*) # Sun C 5.9 5218603fc0a3Smrg _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' 5219603fc0a3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5220603fc0a3Smrg tmp_sharedflag='-G' ;; 5221603fc0a3Smrg *Sun\ F*) # Sun Fortran 8.3 5222603fc0a3Smrg tmp_sharedflag='-G' ;; 5223603fc0a3Smrg esac 5224603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5225603fc0a3Smrg 5226603fc0a3Smrg if test yes = "$supports_anon_versioning"; then 5227603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5228603fc0a3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5229603fc0a3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5230603fc0a3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5231603fc0a3Smrg fi 5232603fc0a3Smrg 5233603fc0a3Smrg case $cc_basename in 5234603fc0a3Smrg tcc*) 5235603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5236603fc0a3Smrg ;; 5237603fc0a3Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5238603fc0a3Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5239603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5240603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5241603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5242603fc0a3Smrg if test yes = "$supports_anon_versioning"; then 5243603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5244603fc0a3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5245603fc0a3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5246603fc0a3Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5247603fc0a3Smrg fi 5248603fc0a3Smrg ;; 5249603fc0a3Smrg esac 5250603fc0a3Smrg else 5251603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5252603fc0a3Smrg fi 5253603fc0a3Smrg ;; 5254603fc0a3Smrg 5255603fc0a3Smrg netbsd*) 5256603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5257603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5258603fc0a3Smrg wlarc= 5259603fc0a3Smrg else 5260603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5261603fc0a3Smrg _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' 5262603fc0a3Smrg fi 5263603fc0a3Smrg ;; 5264603fc0a3Smrg 5265603fc0a3Smrg solaris*) 5266603fc0a3Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5267603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5268603fc0a3Smrg cat <<_LT_EOF 1>&2 5269603fc0a3Smrg 5270603fc0a3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5271603fc0a3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5272603fc0a3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5273603fc0a3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5274603fc0a3Smrg*** your PATH or compiler configuration so that the native linker is 5275603fc0a3Smrg*** used, and then restart. 5276603fc0a3Smrg 5277603fc0a3Smrg_LT_EOF 5278603fc0a3Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5279603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5280603fc0a3Smrg _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' 5281603fc0a3Smrg else 5282603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5283603fc0a3Smrg fi 5284603fc0a3Smrg ;; 5285603fc0a3Smrg 5286603fc0a3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5287603fc0a3Smrg case `$LD -v 2>&1` in 5288603fc0a3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5289603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5290603fc0a3Smrg cat <<_LT_EOF 1>&2 5291603fc0a3Smrg 5292603fc0a3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5293603fc0a3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5294603fc0a3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5295603fc0a3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5296603fc0a3Smrg*** your PATH or compiler configuration so that the native linker is 5297603fc0a3Smrg*** used, and then restart. 5298603fc0a3Smrg 5299603fc0a3Smrg_LT_EOF 5300603fc0a3Smrg ;; 5301603fc0a3Smrg *) 5302603fc0a3Smrg # For security reasons, it is highly recommended that you always 5303603fc0a3Smrg # use absolute paths for naming shared libraries, and exclude the 5304603fc0a3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5305603fc0a3Smrg # requires that you compile everything twice, which is a pain. 5306603fc0a3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5307603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5308603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5309603fc0a3Smrg _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' 5310603fc0a3Smrg else 5311603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5312603fc0a3Smrg fi 5313603fc0a3Smrg ;; 5314603fc0a3Smrg esac 5315603fc0a3Smrg ;; 5316603fc0a3Smrg 5317603fc0a3Smrg sunos4*) 5318603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5319603fc0a3Smrg wlarc= 5320603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5321603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5322603fc0a3Smrg ;; 5323603fc0a3Smrg 5324603fc0a3Smrg *) 5325603fc0a3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5326603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5327603fc0a3Smrg _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' 5328603fc0a3Smrg else 5329603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5330603fc0a3Smrg fi 5331603fc0a3Smrg ;; 5332603fc0a3Smrg esac 5333603fc0a3Smrg 5334603fc0a3Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5335603fc0a3Smrg runpath_var= 5336603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5337603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5338603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5339603fc0a3Smrg fi 5340603fc0a3Smrg else 5341603fc0a3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5342603fc0a3Smrg case $host_os in 5343603fc0a3Smrg aix3*) 5344603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5345603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5346603fc0a3Smrg _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' 5347603fc0a3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5348603fc0a3Smrg # are no directories specified by -L. 5349603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5350603fc0a3Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5351603fc0a3Smrg # Neither direct hardcoding nor static linking is supported with a 5352603fc0a3Smrg # broken collect2. 5353603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5354603fc0a3Smrg fi 5355603fc0a3Smrg ;; 5356603fc0a3Smrg 5357603fc0a3Smrg aix[[4-9]]*) 5358603fc0a3Smrg if test ia64 = "$host_cpu"; then 5359603fc0a3Smrg # On IA64, the linker does run time linking by default, so we don't 5360603fc0a3Smrg # have to do anything special. 5361603fc0a3Smrg aix_use_runtimelinking=no 5362603fc0a3Smrg exp_sym_flag='-Bexport' 5363603fc0a3Smrg no_entry_flag= 5364603fc0a3Smrg else 5365603fc0a3Smrg # If we're using GNU nm, then we don't want the "-C" option. 5366603fc0a3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5367603fc0a3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5368603fc0a3Smrg # weak defined symbols like other global defined symbols, whereas 5369603fc0a3Smrg # GNU nm marks them as "W". 5370603fc0a3Smrg # While the 'weak' keyword is ignored in the Export File, we need 5371603fc0a3Smrg # it in the Import File for the 'aix-soname' feature, so we have 5372603fc0a3Smrg # to replace the "-B" option with "-P" for AIX nm. 5373603fc0a3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5374603fc0a3Smrg _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' 5375603fc0a3Smrg else 5376603fc0a3Smrg _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 == "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' 5377603fc0a3Smrg fi 5378603fc0a3Smrg aix_use_runtimelinking=no 5379603fc0a3Smrg 5380603fc0a3Smrg # Test if we are trying to use run time linking or normal 5381603fc0a3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5382603fc0a3Smrg # have runtime linking enabled, and use it for executables. 5383603fc0a3Smrg # For shared libraries, we enable/disable runtime linking 5384603fc0a3Smrg # depending on the kind of the shared library created - 5385603fc0a3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5386603fc0a3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5387603fc0a3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5388603fc0a3Smrg # lib.a static archive 5389603fc0a3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5390603fc0a3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5391603fc0a3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5392603fc0a3Smrg # lib.a(lib.so.V) shared, rtl:no 5393603fc0a3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5394603fc0a3Smrg # lib.a static archive 5395603fc0a3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5396603fc0a3Smrg for ld_flag in $LDFLAGS; do 5397603fc0a3Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5398603fc0a3Smrg aix_use_runtimelinking=yes 5399603fc0a3Smrg break 5400603fc0a3Smrg fi 5401603fc0a3Smrg done 5402603fc0a3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5403603fc0a3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5404603fc0a3Smrg # so we don't have lib.a shared libs to link our executables. 5405603fc0a3Smrg # We have to force runtime linking in this case. 5406603fc0a3Smrg aix_use_runtimelinking=yes 5407603fc0a3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5408603fc0a3Smrg fi 5409603fc0a3Smrg ;; 5410603fc0a3Smrg esac 5411603fc0a3Smrg 5412603fc0a3Smrg exp_sym_flag='-bexport' 5413603fc0a3Smrg no_entry_flag='-bnoentry' 5414603fc0a3Smrg fi 5415603fc0a3Smrg 5416603fc0a3Smrg # When large executables or shared objects are built, AIX ld can 5417603fc0a3Smrg # have problems creating the table of contents. If linking a library 5418603fc0a3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5419603fc0a3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5420603fc0a3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5421603fc0a3Smrg 5422603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='' 5423603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5424603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5425603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5426603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5427603fc0a3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5428603fc0a3Smrg case $with_aix_soname,$aix_use_runtimelinking in 5429603fc0a3Smrg aix,*) ;; # traditional, no import file 5430603fc0a3Smrg svr4,* | *,yes) # use import file 5431603fc0a3Smrg # The Import File defines what to hardcode. 5432603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5433603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5434603fc0a3Smrg ;; 5435603fc0a3Smrg esac 5436603fc0a3Smrg 5437603fc0a3Smrg if test yes = "$GCC"; then 5438603fc0a3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5439603fc0a3Smrg # We only want to do this on AIX 4.2 and lower, the check 5440603fc0a3Smrg # below for broken collect2 doesn't work under 4.3+ 5441603fc0a3Smrg collect2name=`$CC -print-prog-name=collect2` 5442603fc0a3Smrg if test -f "$collect2name" && 5443603fc0a3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5444603fc0a3Smrg then 5445603fc0a3Smrg # We have reworked collect2 5446603fc0a3Smrg : 5447603fc0a3Smrg else 5448603fc0a3Smrg # We have old collect2 5449603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5450603fc0a3Smrg # It fails to find uninstalled libraries when the uninstalled 5451603fc0a3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5452603fc0a3Smrg # to unsupported forces relinking 5453603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5454603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5455603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5456603fc0a3Smrg fi 5457603fc0a3Smrg ;; 5458603fc0a3Smrg esac 5459603fc0a3Smrg shared_flag='-shared' 5460603fc0a3Smrg if test yes = "$aix_use_runtimelinking"; then 5461603fc0a3Smrg shared_flag="$shared_flag "'$wl-G' 5462603fc0a3Smrg fi 5463603fc0a3Smrg # Need to ensure runtime linking is disabled for the traditional 5464603fc0a3Smrg # shared library, or the linker may eventually find shared libraries 5465603fc0a3Smrg # /with/ Import File - we do not want to mix them. 5466603fc0a3Smrg shared_flag_aix='-shared' 5467603fc0a3Smrg shared_flag_svr4='-shared $wl-G' 5468603fc0a3Smrg else 5469603fc0a3Smrg # not using gcc 5470603fc0a3Smrg if test ia64 = "$host_cpu"; then 5471603fc0a3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5472603fc0a3Smrg # chokes on -Wl,-G. The following line is correct: 5473603fc0a3Smrg shared_flag='-G' 5474603fc0a3Smrg else 5475603fc0a3Smrg if test yes = "$aix_use_runtimelinking"; then 5476603fc0a3Smrg shared_flag='$wl-G' 5477603fc0a3Smrg else 5478603fc0a3Smrg shared_flag='$wl-bM:SRE' 5479603fc0a3Smrg fi 5480603fc0a3Smrg shared_flag_aix='$wl-bM:SRE' 5481603fc0a3Smrg shared_flag_svr4='$wl-G' 5482603fc0a3Smrg fi 5483603fc0a3Smrg fi 5484603fc0a3Smrg 5485603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5486603fc0a3Smrg # It seems that -bexpall does not export symbols beginning with 5487603fc0a3Smrg # underscore (_), so it is better to generate a list of symbols to export. 5488603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5489603fc0a3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5490603fc0a3Smrg # Warning - without using the other runtime loading flags (-brtl), 5491603fc0a3Smrg # -berok will link without error, but may produce a broken library. 5492603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5493603fc0a3Smrg # Determine the default libpath from the value encoded in an 5494603fc0a3Smrg # empty executable. 5495603fc0a3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5496603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5497603fc0a3Smrg _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 5498603fc0a3Smrg else 5499603fc0a3Smrg if test ia64 = "$host_cpu"; then 5500603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5501603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5502603fc0a3Smrg _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" 5503603fc0a3Smrg else 5504603fc0a3Smrg # Determine the default libpath from the value encoded in an 5505603fc0a3Smrg # empty executable. 5506603fc0a3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5507603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5508603fc0a3Smrg # Warning - without using the other run time loading flags, 5509603fc0a3Smrg # -berok will link without error, but may produce a broken library. 5510603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5511603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5512603fc0a3Smrg if test yes = "$with_gnu_ld"; then 5513603fc0a3Smrg # We only use this code for GNU lds that support --whole-archive. 5514603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5515603fc0a3Smrg else 5516603fc0a3Smrg # Exported symbols can be pulled into shared objects from archives 5517603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5518603fc0a3Smrg fi 5519603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5520603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5521603fc0a3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5522603fc0a3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5523603fc0a3Smrg if test svr4 != "$with_aix_soname"; then 5524603fc0a3Smrg # This is similar to how AIX traditionally builds its shared libraries. 5525603fc0a3Smrg _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' 5526603fc0a3Smrg fi 5527603fc0a3Smrg if test aix != "$with_aix_soname"; then 5528603fc0a3Smrg _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' 5529603fc0a3Smrg else 5530603fc0a3Smrg # used by -dlpreopen to get the symbols 5531603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5532603fc0a3Smrg fi 5533603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5534603fc0a3Smrg fi 5535603fc0a3Smrg fi 5536603fc0a3Smrg ;; 5537603fc0a3Smrg 5538603fc0a3Smrg amigaos*) 5539603fc0a3Smrg case $host_cpu in 5540603fc0a3Smrg powerpc) 5541603fc0a3Smrg # see comment about AmigaOS4 .so support 5542603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5543603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5544603fc0a3Smrg ;; 5545603fc0a3Smrg m68k) 5546603fc0a3Smrg _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)' 5547603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5548603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5549603fc0a3Smrg ;; 5550603fc0a3Smrg esac 5551603fc0a3Smrg ;; 5552603fc0a3Smrg 5553603fc0a3Smrg bsdi[[45]]*) 5554603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5555603fc0a3Smrg ;; 5556603fc0a3Smrg 5557603fc0a3Smrg cygwin* | mingw* | pw32* | cegcc*) 5558603fc0a3Smrg # When not using gcc, we currently assume that we are using 5559603fc0a3Smrg # Microsoft Visual C++. 5560603fc0a3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5561603fc0a3Smrg # no search path for DLLs. 5562603fc0a3Smrg case $cc_basename in 5563603fc0a3Smrg cl*) 5564603fc0a3Smrg # Native MSVC 5565603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5566603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5567603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5568603fc0a3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5569603fc0a3Smrg # Tell ltmain to make .lib files, not .a files. 5570603fc0a3Smrg libext=lib 5571603fc0a3Smrg # Tell ltmain to make .dll files, not .so files. 5572603fc0a3Smrg shrext_cmds=.dll 5573603fc0a3Smrg # FIXME: Setting linknames here is a bad hack. 5574603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5575603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5576603fc0a3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5577603fc0a3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5578603fc0a3Smrg else 5579603fc0a3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5580603fc0a3Smrg fi~ 5581603fc0a3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5582603fc0a3Smrg linknames=' 5583603fc0a3Smrg # The linker will not automatically build a static lib if we build a DLL. 5584603fc0a3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5585603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5586603fc0a3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5587603fc0a3Smrg _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' 5588603fc0a3Smrg # Don't use ranlib 5589603fc0a3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5590603fc0a3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5591603fc0a3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5592603fc0a3Smrg case $lt_outputfile in 5593603fc0a3Smrg *.exe|*.EXE) ;; 5594603fc0a3Smrg *) 5595603fc0a3Smrg lt_outputfile=$lt_outputfile.exe 5596603fc0a3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5597603fc0a3Smrg ;; 5598603fc0a3Smrg esac~ 5599603fc0a3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5600603fc0a3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5601603fc0a3Smrg $RM "$lt_outputfile.manifest"; 5602603fc0a3Smrg fi' 5603603fc0a3Smrg ;; 5604603fc0a3Smrg *) 5605603fc0a3Smrg # Assume MSVC wrapper 5606603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5607603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5608603fc0a3Smrg # Tell ltmain to make .lib files, not .a files. 5609603fc0a3Smrg libext=lib 5610603fc0a3Smrg # Tell ltmain to make .dll files, not .so files. 5611603fc0a3Smrg shrext_cmds=.dll 5612603fc0a3Smrg # FIXME: Setting linknames here is a bad hack. 5613603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5614603fc0a3Smrg # The linker will automatically build a .lib file if we build a DLL. 5615603fc0a3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5616603fc0a3Smrg # FIXME: Should let the user specify the lib program. 5617603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5618603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5619603fc0a3Smrg ;; 5620603fc0a3Smrg esac 5621603fc0a3Smrg ;; 5622603fc0a3Smrg 5623603fc0a3Smrg darwin* | rhapsody*) 5624603fc0a3Smrg _LT_DARWIN_LINKER_FEATURES($1) 5625603fc0a3Smrg ;; 5626603fc0a3Smrg 5627603fc0a3Smrg dgux*) 5628603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5629603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5630603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5631603fc0a3Smrg ;; 5632603fc0a3Smrg 5633603fc0a3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5634603fc0a3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5635603fc0a3Smrg # does not break anything, and helps significantly (at the cost of a little 5636603fc0a3Smrg # extra space). 5637603fc0a3Smrg freebsd2.2*) 5638603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5639603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5640603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5641603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5642603fc0a3Smrg ;; 5643603fc0a3Smrg 5644603fc0a3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5645603fc0a3Smrg freebsd2.*) 5646603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5647603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5648603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5649603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5650603fc0a3Smrg ;; 5651603fc0a3Smrg 5652603fc0a3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5653603fc0a3Smrg freebsd* | dragonfly*) 5654603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5655603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5656603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5657603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658603fc0a3Smrg ;; 5659603fc0a3Smrg 5660603fc0a3Smrg hpux9*) 5661603fc0a3Smrg if test yes = "$GCC"; then 5662603fc0a3Smrg _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' 5663603fc0a3Smrg else 5664603fc0a3Smrg _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' 5665603fc0a3Smrg fi 5666603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5667603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5668603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5669603fc0a3Smrg 5670603fc0a3Smrg # hardcode_minus_L: Not really in the search PATH, 5671603fc0a3Smrg # but as the default location of the library. 5672603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5673603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5674603fc0a3Smrg ;; 5675603fc0a3Smrg 5676603fc0a3Smrg hpux10*) 5677603fc0a3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5678603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5679603fc0a3Smrg else 5680603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5681603fc0a3Smrg fi 5682603fc0a3Smrg if test no = "$with_gnu_ld"; then 5683603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5684603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5685603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5686603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5687603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5688603fc0a3Smrg # hardcode_minus_L: Not really in the search PATH, 5689603fc0a3Smrg # but as the default location of the library. 5690603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5691603fc0a3Smrg fi 5692603fc0a3Smrg ;; 5693603fc0a3Smrg 5694603fc0a3Smrg hpux11*) 5695603fc0a3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5696603fc0a3Smrg case $host_cpu in 5697603fc0a3Smrg hppa*64*) 5698603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5699603fc0a3Smrg ;; 5700603fc0a3Smrg ia64*) 5701603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5702603fc0a3Smrg ;; 5703603fc0a3Smrg *) 5704603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5705603fc0a3Smrg ;; 5706603fc0a3Smrg esac 5707603fc0a3Smrg else 5708603fc0a3Smrg case $host_cpu in 5709603fc0a3Smrg hppa*64*) 5710603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5711603fc0a3Smrg ;; 5712603fc0a3Smrg ia64*) 5713603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5714603fc0a3Smrg ;; 5715603fc0a3Smrg *) 5716603fc0a3Smrg m4_if($1, [], [ 5717603fc0a3Smrg # Older versions of the 11.00 compiler do not understand -b yet 5718603fc0a3Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5719603fc0a3Smrg _LT_LINKER_OPTION([if $CC understands -b], 5720603fc0a3Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5721603fc0a3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5722603fc0a3Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5723603fc0a3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5724603fc0a3Smrg ;; 5725603fc0a3Smrg esac 5726603fc0a3Smrg fi 5727603fc0a3Smrg if test no = "$with_gnu_ld"; then 5728603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5729603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5730603fc0a3Smrg 5731603fc0a3Smrg case $host_cpu in 5732603fc0a3Smrg hppa*64*|ia64*) 5733603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5734603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5735603fc0a3Smrg ;; 5736603fc0a3Smrg *) 5737603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5738603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5739603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5740603fc0a3Smrg 5741603fc0a3Smrg # hardcode_minus_L: Not really in the search PATH, 5742603fc0a3Smrg # but as the default location of the library. 5743603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5744603fc0a3Smrg ;; 5745603fc0a3Smrg esac 5746603fc0a3Smrg fi 5747603fc0a3Smrg ;; 5748603fc0a3Smrg 5749603fc0a3Smrg irix5* | irix6* | nonstopux*) 5750603fc0a3Smrg if test yes = "$GCC"; then 5751603fc0a3Smrg _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' 5752603fc0a3Smrg # Try to use the -exported_symbol ld option, if it does not 5753603fc0a3Smrg # work, assume that -exports_file does not work either and 5754603fc0a3Smrg # implicitly export all symbols. 5755603fc0a3Smrg # This should be the same for all languages, so no per-tag cache variable. 5756603fc0a3Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5757603fc0a3Smrg [lt_cv_irix_exported_symbol], 5758603fc0a3Smrg [save_LDFLAGS=$LDFLAGS 5759603fc0a3Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5760603fc0a3Smrg AC_LINK_IFELSE( 5761603fc0a3Smrg [AC_LANG_SOURCE( 5762603fc0a3Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5763603fc0a3Smrg [C++], [[int foo (void) { return 0; }]], 5764603fc0a3Smrg [Fortran 77], [[ 5765603fc0a3Smrg subroutine foo 5766603fc0a3Smrg end]], 5767603fc0a3Smrg [Fortran], [[ 5768603fc0a3Smrg subroutine foo 5769603fc0a3Smrg end]])])], 5770603fc0a3Smrg [lt_cv_irix_exported_symbol=yes], 5771603fc0a3Smrg [lt_cv_irix_exported_symbol=no]) 5772603fc0a3Smrg LDFLAGS=$save_LDFLAGS]) 5773603fc0a3Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5774603fc0a3Smrg _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' 5775603fc0a3Smrg fi 5776603fc0a3Smrg else 5777603fc0a3Smrg _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' 5778603fc0a3Smrg _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' 5779603fc0a3Smrg fi 5780603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5781603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5782603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5783603fc0a3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5784603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5785603fc0a3Smrg ;; 5786603fc0a3Smrg 5787603fc0a3Smrg linux*) 5788603fc0a3Smrg case $cc_basename in 5789603fc0a3Smrg tcc*) 5790603fc0a3Smrg # Fabrice Bellard et al's Tiny C Compiler 5791603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5792603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5793603fc0a3Smrg ;; 5794603fc0a3Smrg esac 5795603fc0a3Smrg ;; 5796603fc0a3Smrg 5797603fc0a3Smrg netbsd*) 5798603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5799603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5800603fc0a3Smrg else 5801603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5802603fc0a3Smrg fi 5803603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5804603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5805603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5806603fc0a3Smrg ;; 5807603fc0a3Smrg 5808603fc0a3Smrg newsos6) 5809603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5810603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5811603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5812603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5813603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5814603fc0a3Smrg ;; 5815603fc0a3Smrg 5816603fc0a3Smrg *nto* | *qnx*) 5817603fc0a3Smrg ;; 5818603fc0a3Smrg 5819603fc0a3Smrg openbsd* | bitrig*) 5820603fc0a3Smrg if test -f /usr/libexec/ld.so; then 5821603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5822603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5823603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5824603fc0a3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5825603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5827603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5828603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5829603fc0a3Smrg else 5830603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5831603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5832603fc0a3Smrg fi 5833603fc0a3Smrg else 5834603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5835603fc0a3Smrg fi 5836603fc0a3Smrg ;; 5837603fc0a3Smrg 5838603fc0a3Smrg os2*) 5839603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5840603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5841603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5842603fc0a3Smrg shrext_cmds=.dll 5843603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5844603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5845603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5846603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5847603fc0a3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5848603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5849603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 5850603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5851603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5852603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5853603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5854603fc0a3Smrg prefix_cmds="$SED"~ 5855603fc0a3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5856603fc0a3Smrg prefix_cmds="$prefix_cmds -e 1d"; 5857603fc0a3Smrg fi~ 5858603fc0a3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5859603fc0a3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5860603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5861603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 5862603fc0a3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5863603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5864603fc0a3Smrg ;; 5865603fc0a3Smrg 5866603fc0a3Smrg osf3*) 5867603fc0a3Smrg if test yes = "$GCC"; then 5868603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5869603fc0a3Smrg _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' 5870603fc0a3Smrg else 5871603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5872603fc0a3Smrg _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' 5873603fc0a3Smrg fi 5874603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5875603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5876603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5877603fc0a3Smrg ;; 5878603fc0a3Smrg 5879603fc0a3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5880603fc0a3Smrg if test yes = "$GCC"; then 5881603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5882603fc0a3Smrg _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' 5883603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5884603fc0a3Smrg else 5885603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5886603fc0a3Smrg _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' 5887603fc0a3Smrg _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~ 5888603fc0a3Smrg $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' 5889603fc0a3Smrg 5890603fc0a3Smrg # Both c and cxx compiler support -rpath directly 5891603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5892603fc0a3Smrg fi 5893603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5894603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5895603fc0a3Smrg ;; 5896603fc0a3Smrg 5897603fc0a3Smrg solaris*) 5898603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5899603fc0a3Smrg if test yes = "$GCC"; then 5900603fc0a3Smrg wlarc='$wl' 5901603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5902603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5903603fc0a3Smrg $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' 5904603fc0a3Smrg else 5905603fc0a3Smrg case `$CC -V 2>&1` in 5906603fc0a3Smrg *"Compilers 5.0"*) 5907603fc0a3Smrg wlarc='' 5908603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5909603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5910603fc0a3Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5911603fc0a3Smrg ;; 5912603fc0a3Smrg *) 5913603fc0a3Smrg wlarc='$wl' 5914603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5915603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5916603fc0a3Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5917603fc0a3Smrg ;; 5918603fc0a3Smrg esac 5919603fc0a3Smrg fi 5920603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5921603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5922603fc0a3Smrg case $host_os in 5923603fc0a3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5924603fc0a3Smrg *) 5925603fc0a3Smrg # The compiler driver will combine and reorder linker options, 5926603fc0a3Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5927603fc0a3Smrg # but is careful enough not to reorder. 5928603fc0a3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5929603fc0a3Smrg if test yes = "$GCC"; then 5930603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5931603fc0a3Smrg else 5932603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5933603fc0a3Smrg fi 5934603fc0a3Smrg ;; 5935603fc0a3Smrg esac 5936603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5937603fc0a3Smrg ;; 5938603fc0a3Smrg 5939603fc0a3Smrg sunos4*) 5940603fc0a3Smrg if test sequent = "$host_vendor"; then 5941603fc0a3Smrg # Use $CC to link under sequent, because it throws in some extra .o 5942603fc0a3Smrg # files that make .init and .fini sections work. 5943603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5944603fc0a3Smrg else 5945603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5946603fc0a3Smrg fi 5947603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5948603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5949603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5950603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5951603fc0a3Smrg ;; 5952603fc0a3Smrg 5953603fc0a3Smrg sysv4) 5954603fc0a3Smrg case $host_vendor in 5955603fc0a3Smrg sni) 5956603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5957603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5958603fc0a3Smrg ;; 5959603fc0a3Smrg siemens) 5960603fc0a3Smrg ## LD is ld it makes a PLAMLIB 5961603fc0a3Smrg ## CC just makes a GrossModule. 5962603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5963603fc0a3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5964603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5965603fc0a3Smrg ;; 5966603fc0a3Smrg motorola) 5967603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5968603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5969603fc0a3Smrg ;; 5970603fc0a3Smrg esac 5971603fc0a3Smrg runpath_var='LD_RUN_PATH' 5972603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5973603fc0a3Smrg ;; 5974603fc0a3Smrg 5975603fc0a3Smrg sysv4.3*) 5976603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5977603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5979603fc0a3Smrg ;; 5980603fc0a3Smrg 5981603fc0a3Smrg sysv4*MP*) 5982603fc0a3Smrg if test -d /usr/nec; then 5983603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5985603fc0a3Smrg runpath_var=LD_RUN_PATH 5986603fc0a3Smrg hardcode_runpath_var=yes 5987603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5988603fc0a3Smrg fi 5989603fc0a3Smrg ;; 5990603fc0a3Smrg 5991603fc0a3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5992603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 5993603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5994603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5995603fc0a3Smrg runpath_var='LD_RUN_PATH' 5996603fc0a3Smrg 5997603fc0a3Smrg if test yes = "$GCC"; then 5998603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5999603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6000603fc0a3Smrg else 6001603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6002603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6003603fc0a3Smrg fi 6004603fc0a3Smrg ;; 6005603fc0a3Smrg 6006603fc0a3Smrg sysv5* | sco3.2v5* | sco5v6*) 6007603fc0a3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 6008603fc0a3Smrg # link with -lc, and that would cause any symbols used from libc to 6009603fc0a3Smrg # always be unresolved, which means just about no library would 6010603fc0a3Smrg # ever link correctly. If we're not using GNU ld we use -z text 6011603fc0a3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6012603fc0a3Smrg # as -z defs. 6013603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6014603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6015603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6016603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6018603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6019603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6020603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6021603fc0a3Smrg runpath_var='LD_RUN_PATH' 6022603fc0a3Smrg 6023603fc0a3Smrg if test yes = "$GCC"; then 6024603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026603fc0a3Smrg else 6027603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6028603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6029603fc0a3Smrg fi 6030603fc0a3Smrg ;; 6031603fc0a3Smrg 6032603fc0a3Smrg uts4*) 6033603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6034603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6035603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6036603fc0a3Smrg ;; 6037603fc0a3Smrg 6038603fc0a3Smrg *) 6039603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6040603fc0a3Smrg ;; 6041603fc0a3Smrg esac 6042603fc0a3Smrg 6043603fc0a3Smrg if test sni = "$host_vendor"; then 6044603fc0a3Smrg case $host in 6045603fc0a3Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6046603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6047603fc0a3Smrg ;; 6048603fc0a3Smrg esac 6049603fc0a3Smrg fi 6050603fc0a3Smrg fi 6051603fc0a3Smrg]) 6052603fc0a3SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6053603fc0a3Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6054603fc0a3Smrg 6055603fc0a3Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6056603fc0a3Smrg 6057603fc0a3Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6058603fc0a3Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6059603fc0a3Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6060603fc0a3Smrg [The commands to extract the exported symbol list from a shared archive]) 6061603fc0a3Smrg 6062603fc0a3Smrg# 6063603fc0a3Smrg# Do we need to explicitly link libc? 6064603fc0a3Smrg# 6065603fc0a3Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6066603fc0a3Smrgx|xyes) 6067603fc0a3Smrg # Assume -lc should be added 6068603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6069603fc0a3Smrg 6070603fc0a3Smrg if test yes,yes = "$GCC,$enable_shared"; then 6071603fc0a3Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6072603fc0a3Smrg *'~'*) 6073603fc0a3Smrg # FIXME: we may have to deal with multi-command sequences. 6074603fc0a3Smrg ;; 6075603fc0a3Smrg '$CC '*) 6076603fc0a3Smrg # Test whether the compiler implicitly links with -lc since on some 6077603fc0a3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6078603fc0a3Smrg # to ld, don't add -lc before -lgcc. 6079603fc0a3Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6080603fc0a3Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6081603fc0a3Smrg [$RM conftest* 6082603fc0a3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6083603fc0a3Smrg 6084603fc0a3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6085603fc0a3Smrg soname=conftest 6086603fc0a3Smrg lib=conftest 6087603fc0a3Smrg libobjs=conftest.$ac_objext 6088603fc0a3Smrg deplibs= 6089603fc0a3Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6090603fc0a3Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6091603fc0a3Smrg compiler_flags=-v 6092603fc0a3Smrg linker_flags=-v 6093603fc0a3Smrg verstring= 6094603fc0a3Smrg output_objdir=. 6095603fc0a3Smrg libname=conftest 6096603fc0a3Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6097603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6098603fc0a3Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6099603fc0a3Smrg then 6100603fc0a3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6101603fc0a3Smrg else 6102603fc0a3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6103603fc0a3Smrg fi 6104603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6105603fc0a3Smrg else 6106603fc0a3Smrg cat conftest.err 1>&5 6107603fc0a3Smrg fi 6108603fc0a3Smrg $RM conftest* 6109603fc0a3Smrg ]) 6110603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6111603fc0a3Smrg ;; 6112603fc0a3Smrg esac 6113603fc0a3Smrg fi 6114603fc0a3Smrg ;; 6115603fc0a3Smrgesac 6116603fc0a3Smrg 6117603fc0a3Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6118603fc0a3Smrg [Whether or not to add -lc for building shared libraries]) 6119603fc0a3Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6120603fc0a3Smrg [enable_shared_with_static_runtimes], [0], 6121603fc0a3Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6122603fc0a3Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6123603fc0a3Smrg [Compiler flag to allow reflexive dlopens]) 6124603fc0a3Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6125603fc0a3Smrg [Compiler flag to generate shared objects directly from archives]) 6126603fc0a3Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6127603fc0a3Smrg [Whether the compiler copes with passing no objects directly]) 6128603fc0a3Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6129603fc0a3Smrg [Create an old-style archive from a shared archive]) 6130603fc0a3Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6131603fc0a3Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6132603fc0a3Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6133603fc0a3Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6134603fc0a3Smrg_LT_TAGDECL([], [module_cmds], [2], 6135603fc0a3Smrg [Commands used to build a loadable module if different from building 6136603fc0a3Smrg a shared archive.]) 6137603fc0a3Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6138603fc0a3Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6139603fc0a3Smrg [Whether we are building with GNU ld or not]) 6140603fc0a3Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6141603fc0a3Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6142603fc0a3Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6143603fc0a3Smrg [Flag that enforces no undefined symbols]) 6144603fc0a3Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6145603fc0a3Smrg [Flag to hardcode $libdir into a binary during linking. 6146603fc0a3Smrg This must work even if $libdir does not exist]) 6147603fc0a3Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6148603fc0a3Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6149603fc0a3Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6150603fc0a3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6151603fc0a3Smrg DIR into the resulting binary]) 6152603fc0a3Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6153603fc0a3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6154603fc0a3Smrg DIR into the resulting binary and the resulting library dependency is 6155603fc0a3Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6156603fc0a3Smrg library is relocated]) 6157603fc0a3Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6158603fc0a3Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6159603fc0a3Smrg into the resulting binary]) 6160603fc0a3Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6161603fc0a3Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6162603fc0a3Smrg into the resulting binary]) 6163603fc0a3Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6164603fc0a3Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6165603fc0a3Smrg into the library and all subsequent libraries and executables linked 6166603fc0a3Smrg against it]) 6167603fc0a3Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6168603fc0a3Smrg [Set to yes if linker adds runtime paths of dependent libraries 6169603fc0a3Smrg to runtime path list]) 6170603fc0a3Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6171603fc0a3Smrg [Whether libtool must link a program against all its dependency libraries]) 6172603fc0a3Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6173603fc0a3Smrg [Set to "yes" if exported symbols are required]) 6174603fc0a3Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6175603fc0a3Smrg [The commands to list exported symbols]) 6176603fc0a3Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6177603fc0a3Smrg [Symbols that should not be listed in the preloaded symbols]) 6178603fc0a3Smrg_LT_TAGDECL([], [include_expsyms], [1], 6179603fc0a3Smrg [Symbols that must always be exported]) 6180603fc0a3Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6181603fc0a3Smrg [Commands necessary for linking programs (against libraries) with templates]) 6182603fc0a3Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6183603fc0a3Smrg [Commands necessary for finishing linking programs]) 6184603fc0a3Smrg_LT_TAGDECL([], [file_list_spec], [1], 6185603fc0a3Smrg [Specify filename containing input files]) 6186603fc0a3Smrgdnl FIXME: Not yet implemented 6187603fc0a3Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6188603fc0a3Smrgdnl [Compiler flag to generate thread safe objects]) 6189603fc0a3Smrg])# _LT_LINKER_SHLIBS 6190603fc0a3Smrg 6191603fc0a3Smrg 6192603fc0a3Smrg# _LT_LANG_C_CONFIG([TAG]) 6193603fc0a3Smrg# ------------------------ 6194603fc0a3Smrg# Ensure that the configuration variables for a C compiler are suitably 6195603fc0a3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6196603fc0a3Smrg# the compiler configuration to 'libtool'. 6197603fc0a3Smrgm4_defun([_LT_LANG_C_CONFIG], 6198603fc0a3Smrg[m4_require([_LT_DECL_EGREP])dnl 6199603fc0a3Smrglt_save_CC=$CC 6200603fc0a3SmrgAC_LANG_PUSH(C) 6201603fc0a3Smrg 6202603fc0a3Smrg# Source file extension for C test sources. 6203603fc0a3Smrgac_ext=c 6204603fc0a3Smrg 6205603fc0a3Smrg# Object file extension for compiled C test sources. 6206603fc0a3Smrgobjext=o 6207603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 6208603fc0a3Smrg 6209603fc0a3Smrg# Code to be used in simple compile tests 6210603fc0a3Smrglt_simple_compile_test_code="int some_variable = 0;" 6211603fc0a3Smrg 6212603fc0a3Smrg# Code to be used in simple link tests 6213603fc0a3Smrglt_simple_link_test_code='int main(){return(0);}' 6214603fc0a3Smrg 6215603fc0a3Smrg_LT_TAG_COMPILER 6216603fc0a3Smrg# Save the default compiler, since it gets overwritten when the other 6217603fc0a3Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6218603fc0a3Smrgcompiler_DEFAULT=$CC 6219603fc0a3Smrg 6220603fc0a3Smrg# save warnings/boilerplate of simple test code 6221603fc0a3Smrg_LT_COMPILER_BOILERPLATE 6222603fc0a3Smrg_LT_LINKER_BOILERPLATE 6223603fc0a3Smrg 6224603fc0a3Smrg## CAVEAT EMPTOR: 6225603fc0a3Smrg## There is no encapsulation within the following macros, do not change 6226603fc0a3Smrg## the running order or otherwise move them around unless you know exactly 6227603fc0a3Smrg## what you are doing... 6228603fc0a3Smrgif test -n "$compiler"; then 6229603fc0a3Smrg _LT_COMPILER_NO_RTTI($1) 6230603fc0a3Smrg _LT_COMPILER_PIC($1) 6231603fc0a3Smrg _LT_COMPILER_C_O($1) 6232603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 6233603fc0a3Smrg _LT_LINKER_SHLIBS($1) 6234603fc0a3Smrg _LT_SYS_DYNAMIC_LINKER($1) 6235603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6236603fc0a3Smrg LT_SYS_DLOPEN_SELF 6237603fc0a3Smrg _LT_CMD_STRIPLIB 6238603fc0a3Smrg 6239603fc0a3Smrg # Report what library types will actually be built 6240603fc0a3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6241603fc0a3Smrg AC_MSG_RESULT([$can_build_shared]) 6242603fc0a3Smrg 6243603fc0a3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6244603fc0a3Smrg test no = "$can_build_shared" && enable_shared=no 6245603fc0a3Smrg 6246603fc0a3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6247603fc0a3Smrg # are all built from PIC. 6248603fc0a3Smrg case $host_os in 6249603fc0a3Smrg aix3*) 6250603fc0a3Smrg test yes = "$enable_shared" && enable_static=no 6251603fc0a3Smrg if test -n "$RANLIB"; then 6252603fc0a3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6253603fc0a3Smrg postinstall_cmds='$RANLIB $lib' 6254603fc0a3Smrg fi 6255603fc0a3Smrg ;; 6256603fc0a3Smrg 6257603fc0a3Smrg aix[[4-9]]*) 6258603fc0a3Smrg if test ia64 != "$host_cpu"; then 6259603fc0a3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6260603fc0a3Smrg yes,aix,yes) ;; # shared object as lib.so file only 6261603fc0a3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6262603fc0a3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6263603fc0a3Smrg esac 6264603fc0a3Smrg fi 6265603fc0a3Smrg ;; 6266603fc0a3Smrg esac 6267603fc0a3Smrg AC_MSG_RESULT([$enable_shared]) 6268603fc0a3Smrg 6269603fc0a3Smrg AC_MSG_CHECKING([whether to build static libraries]) 6270603fc0a3Smrg # Make sure either enable_shared or enable_static is yes. 6271603fc0a3Smrg test yes = "$enable_shared" || enable_static=yes 6272603fc0a3Smrg AC_MSG_RESULT([$enable_static]) 6273603fc0a3Smrg 6274603fc0a3Smrg _LT_CONFIG($1) 6275603fc0a3Smrgfi 6276603fc0a3SmrgAC_LANG_POP 6277603fc0a3SmrgCC=$lt_save_CC 6278603fc0a3Smrg])# _LT_LANG_C_CONFIG 6279603fc0a3Smrg 6280603fc0a3Smrg 6281603fc0a3Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6282603fc0a3Smrg# -------------------------- 6283603fc0a3Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6284603fc0a3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6285603fc0a3Smrg# the compiler configuration to 'libtool'. 6286603fc0a3Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6287603fc0a3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6288603fc0a3Smrgm4_require([_LT_DECL_EGREP])dnl 6289603fc0a3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6290603fc0a3Smrgif test -n "$CXX" && ( test no != "$CXX" && 6291603fc0a3Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6292603fc0a3Smrg (test g++ != "$CXX"))); then 6293603fc0a3Smrg AC_PROG_CXXCPP 6294603fc0a3Smrgelse 6295603fc0a3Smrg _lt_caught_CXX_error=yes 6296603fc0a3Smrgfi 6297603fc0a3Smrg 6298603fc0a3SmrgAC_LANG_PUSH(C++) 6299603fc0a3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6300603fc0a3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6301603fc0a3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6302603fc0a3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6303603fc0a3Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6304603fc0a3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6305603fc0a3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6306603fc0a3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6307603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6308603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6309603fc0a3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6310603fc0a3Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6311603fc0a3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6312603fc0a3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6313603fc0a3Smrg_LT_TAGVAR(module_cmds, $1)= 6314603fc0a3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6315603fc0a3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6316603fc0a3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6317603fc0a3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6318603fc0a3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6319603fc0a3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6320603fc0a3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6321603fc0a3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6322603fc0a3Smrg 6323603fc0a3Smrg# Source file extension for C++ test sources. 6324603fc0a3Smrgac_ext=cpp 6325603fc0a3Smrg 6326603fc0a3Smrg# Object file extension for compiled C++ test sources. 6327603fc0a3Smrgobjext=o 6328603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 6329603fc0a3Smrg 6330603fc0a3Smrg# No sense in running all these tests if we already determined that 6331603fc0a3Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6332603fc0a3Smrg# are currently assumed to apply to all compilers on this platform, 6333603fc0a3Smrg# and will be corrupted by setting them based on a non-working compiler. 6334603fc0a3Smrgif test yes != "$_lt_caught_CXX_error"; then 6335603fc0a3Smrg # Code to be used in simple compile tests 6336603fc0a3Smrg lt_simple_compile_test_code="int some_variable = 0;" 6337603fc0a3Smrg 6338603fc0a3Smrg # Code to be used in simple link tests 6339603fc0a3Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6340603fc0a3Smrg 6341603fc0a3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6342603fc0a3Smrg _LT_TAG_COMPILER 6343603fc0a3Smrg 6344603fc0a3Smrg # save warnings/boilerplate of simple test code 6345603fc0a3Smrg _LT_COMPILER_BOILERPLATE 6346603fc0a3Smrg _LT_LINKER_BOILERPLATE 6347603fc0a3Smrg 6348603fc0a3Smrg # Allow CC to be a program name with arguments. 6349603fc0a3Smrg lt_save_CC=$CC 6350603fc0a3Smrg lt_save_CFLAGS=$CFLAGS 6351603fc0a3Smrg lt_save_LD=$LD 6352603fc0a3Smrg lt_save_GCC=$GCC 6353603fc0a3Smrg GCC=$GXX 6354603fc0a3Smrg lt_save_with_gnu_ld=$with_gnu_ld 6355603fc0a3Smrg lt_save_path_LD=$lt_cv_path_LD 6356603fc0a3Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6357603fc0a3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6358603fc0a3Smrg else 6359603fc0a3Smrg $as_unset lt_cv_prog_gnu_ld 6360603fc0a3Smrg fi 6361603fc0a3Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6362603fc0a3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6363603fc0a3Smrg else 6364603fc0a3Smrg $as_unset lt_cv_path_LD 6365603fc0a3Smrg fi 6366603fc0a3Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6367603fc0a3Smrg CC=${CXX-"c++"} 6368603fc0a3Smrg CFLAGS=$CXXFLAGS 6369603fc0a3Smrg compiler=$CC 6370603fc0a3Smrg _LT_TAGVAR(compiler, $1)=$CC 6371603fc0a3Smrg _LT_CC_BASENAME([$compiler]) 6372603fc0a3Smrg 6373603fc0a3Smrg if test -n "$compiler"; then 6374603fc0a3Smrg # We don't want -fno-exception when compiling C++ code, so set the 6375603fc0a3Smrg # no_builtin_flag separately 6376603fc0a3Smrg if test yes = "$GXX"; then 6377603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6378603fc0a3Smrg else 6379603fc0a3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6380603fc0a3Smrg fi 6381603fc0a3Smrg 6382603fc0a3Smrg if test yes = "$GXX"; then 6383603fc0a3Smrg # Set up default GNU C++ configuration 6384603fc0a3Smrg 6385603fc0a3Smrg LT_PATH_LD 6386603fc0a3Smrg 6387603fc0a3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6388603fc0a3Smrg # archiving commands below assume that GNU ld is being used. 6389603fc0a3Smrg if test yes = "$with_gnu_ld"; then 6390603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6391603fc0a3Smrg _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' 6392603fc0a3Smrg 6393603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6394603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6395603fc0a3Smrg 6396603fc0a3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6397603fc0a3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6398603fc0a3Smrg # investigate it a little bit more. (MM) 6399603fc0a3Smrg wlarc='$wl' 6400603fc0a3Smrg 6401603fc0a3Smrg # ancient GNU ld didn't support --whole-archive et. al. 6402603fc0a3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6403603fc0a3Smrg $GREP 'no-whole-archive' > /dev/null; then 6404603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6405603fc0a3Smrg else 6406603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6407603fc0a3Smrg fi 6408603fc0a3Smrg else 6409603fc0a3Smrg with_gnu_ld=no 6410603fc0a3Smrg wlarc= 6411603fc0a3Smrg 6412603fc0a3Smrg # A generic and very simple default shared library creation 6413603fc0a3Smrg # command for GNU C++ for the case where it uses the native 6414603fc0a3Smrg # linker, instead of GNU ld. If possible, this setting should 6415603fc0a3Smrg # overridden to take advantage of the native linker features on 6416603fc0a3Smrg # the platform it is being used on. 6417603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6418603fc0a3Smrg fi 6419603fc0a3Smrg 6420603fc0a3Smrg # Commands to make compiler produce verbose output that lists 6421603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 6422603fc0a3Smrg # linking a shared library. 6423603fc0a3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6424603fc0a3Smrg 6425603fc0a3Smrg else 6426603fc0a3Smrg GXX=no 6427603fc0a3Smrg with_gnu_ld=no 6428603fc0a3Smrg wlarc= 6429603fc0a3Smrg fi 6430603fc0a3Smrg 6431603fc0a3Smrg # PORTME: fill in a description of your system's C++ link characteristics 6432603fc0a3Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6433603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6434603fc0a3Smrg case $host_os in 6435603fc0a3Smrg aix3*) 6436603fc0a3Smrg # FIXME: insert proper C++ library support 6437603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6438603fc0a3Smrg ;; 6439603fc0a3Smrg aix[[4-9]]*) 6440603fc0a3Smrg if test ia64 = "$host_cpu"; then 6441603fc0a3Smrg # On IA64, the linker does run time linking by default, so we don't 6442603fc0a3Smrg # have to do anything special. 6443603fc0a3Smrg aix_use_runtimelinking=no 6444603fc0a3Smrg exp_sym_flag='-Bexport' 6445603fc0a3Smrg no_entry_flag= 6446603fc0a3Smrg else 6447603fc0a3Smrg aix_use_runtimelinking=no 6448603fc0a3Smrg 6449603fc0a3Smrg # Test if we are trying to use run time linking or normal 6450603fc0a3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6451603fc0a3Smrg # have runtime linking enabled, and use it for executables. 6452603fc0a3Smrg # For shared libraries, we enable/disable runtime linking 6453603fc0a3Smrg # depending on the kind of the shared library created - 6454603fc0a3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6455603fc0a3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6456603fc0a3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6457603fc0a3Smrg # lib.a static archive 6458603fc0a3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6459603fc0a3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6460603fc0a3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6461603fc0a3Smrg # lib.a(lib.so.V) shared, rtl:no 6462603fc0a3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6463603fc0a3Smrg # lib.a static archive 6464603fc0a3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6465603fc0a3Smrg for ld_flag in $LDFLAGS; do 6466603fc0a3Smrg case $ld_flag in 6467603fc0a3Smrg *-brtl*) 6468603fc0a3Smrg aix_use_runtimelinking=yes 6469603fc0a3Smrg break 6470603fc0a3Smrg ;; 6471603fc0a3Smrg esac 6472603fc0a3Smrg done 6473603fc0a3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6474603fc0a3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6475603fc0a3Smrg # so we don't have lib.a shared libs to link our executables. 6476603fc0a3Smrg # We have to force runtime linking in this case. 6477603fc0a3Smrg aix_use_runtimelinking=yes 6478603fc0a3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6479603fc0a3Smrg fi 6480603fc0a3Smrg ;; 6481603fc0a3Smrg esac 6482603fc0a3Smrg 6483603fc0a3Smrg exp_sym_flag='-bexport' 6484603fc0a3Smrg no_entry_flag='-bnoentry' 6485603fc0a3Smrg fi 6486603fc0a3Smrg 6487603fc0a3Smrg # When large executables or shared objects are built, AIX ld can 6488603fc0a3Smrg # have problems creating the table of contents. If linking a library 6489603fc0a3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6490603fc0a3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6491603fc0a3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6492603fc0a3Smrg 6493603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='' 6494603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6495603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6496603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6497603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6498603fc0a3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6499603fc0a3Smrg case $with_aix_soname,$aix_use_runtimelinking in 6500603fc0a3Smrg aix,*) ;; # no import file 6501603fc0a3Smrg svr4,* | *,yes) # use import file 6502603fc0a3Smrg # The Import File defines what to hardcode. 6503603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6504603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6505603fc0a3Smrg ;; 6506603fc0a3Smrg esac 6507603fc0a3Smrg 6508603fc0a3Smrg if test yes = "$GXX"; then 6509603fc0a3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6510603fc0a3Smrg # We only want to do this on AIX 4.2 and lower, the check 6511603fc0a3Smrg # below for broken collect2 doesn't work under 4.3+ 6512603fc0a3Smrg collect2name=`$CC -print-prog-name=collect2` 6513603fc0a3Smrg if test -f "$collect2name" && 6514603fc0a3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6515603fc0a3Smrg then 6516603fc0a3Smrg # We have reworked collect2 6517603fc0a3Smrg : 6518603fc0a3Smrg else 6519603fc0a3Smrg # We have old collect2 6520603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6521603fc0a3Smrg # It fails to find uninstalled libraries when the uninstalled 6522603fc0a3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6523603fc0a3Smrg # to unsupported forces relinking 6524603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6525603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6526603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6527603fc0a3Smrg fi 6528603fc0a3Smrg esac 6529603fc0a3Smrg shared_flag='-shared' 6530603fc0a3Smrg if test yes = "$aix_use_runtimelinking"; then 6531603fc0a3Smrg shared_flag=$shared_flag' $wl-G' 6532603fc0a3Smrg fi 6533603fc0a3Smrg # Need to ensure runtime linking is disabled for the traditional 6534603fc0a3Smrg # shared library, or the linker may eventually find shared libraries 6535603fc0a3Smrg # /with/ Import File - we do not want to mix them. 6536603fc0a3Smrg shared_flag_aix='-shared' 6537603fc0a3Smrg shared_flag_svr4='-shared $wl-G' 6538603fc0a3Smrg else 6539603fc0a3Smrg # not using gcc 6540603fc0a3Smrg if test ia64 = "$host_cpu"; then 6541603fc0a3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6542603fc0a3Smrg # chokes on -Wl,-G. The following line is correct: 6543603fc0a3Smrg shared_flag='-G' 6544603fc0a3Smrg else 6545603fc0a3Smrg if test yes = "$aix_use_runtimelinking"; then 6546603fc0a3Smrg shared_flag='$wl-G' 6547603fc0a3Smrg else 6548603fc0a3Smrg shared_flag='$wl-bM:SRE' 6549603fc0a3Smrg fi 6550603fc0a3Smrg shared_flag_aix='$wl-bM:SRE' 6551603fc0a3Smrg shared_flag_svr4='$wl-G' 6552603fc0a3Smrg fi 6553603fc0a3Smrg fi 6554603fc0a3Smrg 6555603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6556603fc0a3Smrg # It seems that -bexpall does not export symbols beginning with 6557603fc0a3Smrg # underscore (_), so it is better to generate a list of symbols to 6558603fc0a3Smrg # export. 6559603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6560603fc0a3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6561603fc0a3Smrg # Warning - without using the other runtime loading flags (-brtl), 6562603fc0a3Smrg # -berok will link without error, but may produce a broken library. 6563603fc0a3Smrg # The "-G" linker flag allows undefined symbols. 6564603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6565603fc0a3Smrg # Determine the default libpath from the value encoded in an empty 6566603fc0a3Smrg # executable. 6567603fc0a3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6568603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6569603fc0a3Smrg 6570603fc0a3Smrg _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 6571603fc0a3Smrg else 6572603fc0a3Smrg if test ia64 = "$host_cpu"; then 6573603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6574603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6575603fc0a3Smrg _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" 6576603fc0a3Smrg else 6577603fc0a3Smrg # Determine the default libpath from the value encoded in an 6578603fc0a3Smrg # empty executable. 6579603fc0a3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6580603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6581603fc0a3Smrg # Warning - without using the other run time loading flags, 6582603fc0a3Smrg # -berok will link without error, but may produce a broken library. 6583603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6584603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6585603fc0a3Smrg if test yes = "$with_gnu_ld"; then 6586603fc0a3Smrg # We only use this code for GNU lds that support --whole-archive. 6587603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6588603fc0a3Smrg else 6589603fc0a3Smrg # Exported symbols can be pulled into shared objects from archives 6590603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6591603fc0a3Smrg fi 6592603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6593603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6594603fc0a3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6595603fc0a3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6596603fc0a3Smrg if test svr4 != "$with_aix_soname"; then 6597603fc0a3Smrg # This is similar to how AIX traditionally builds its shared 6598603fc0a3Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6599603fc0a3Smrg _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' 6600603fc0a3Smrg fi 6601603fc0a3Smrg if test aix != "$with_aix_soname"; then 6602603fc0a3Smrg _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' 6603603fc0a3Smrg else 6604603fc0a3Smrg # used by -dlpreopen to get the symbols 6605603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6606603fc0a3Smrg fi 6607603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6608603fc0a3Smrg fi 6609603fc0a3Smrg fi 6610603fc0a3Smrg ;; 6611603fc0a3Smrg 6612603fc0a3Smrg beos*) 6613603fc0a3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6614603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6615603fc0a3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6616603fc0a3Smrg # support --undefined. This deserves some investigation. FIXME 6617603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6618603fc0a3Smrg else 6619603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6620603fc0a3Smrg fi 6621603fc0a3Smrg ;; 6622603fc0a3Smrg 6623603fc0a3Smrg chorus*) 6624603fc0a3Smrg case $cc_basename in 6625603fc0a3Smrg *) 6626603fc0a3Smrg # FIXME: insert proper C++ library support 6627603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6628603fc0a3Smrg ;; 6629603fc0a3Smrg esac 6630603fc0a3Smrg ;; 6631603fc0a3Smrg 6632603fc0a3Smrg cygwin* | mingw* | pw32* | cegcc*) 6633603fc0a3Smrg case $GXX,$cc_basename in 6634603fc0a3Smrg ,cl* | no,cl*) 6635603fc0a3Smrg # Native MSVC 6636603fc0a3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6637603fc0a3Smrg # no search path for DLLs. 6638603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6639603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6640603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6641603fc0a3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6642603fc0a3Smrg # Tell ltmain to make .lib files, not .a files. 6643603fc0a3Smrg libext=lib 6644603fc0a3Smrg # Tell ltmain to make .dll files, not .so files. 6645603fc0a3Smrg shrext_cmds=.dll 6646603fc0a3Smrg # FIXME: Setting linknames here is a bad hack. 6647603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6648603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6649603fc0a3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6650603fc0a3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6651603fc0a3Smrg else 6652603fc0a3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6653603fc0a3Smrg fi~ 6654603fc0a3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6655603fc0a3Smrg linknames=' 6656603fc0a3Smrg # The linker will not automatically build a static lib if we build a DLL. 6657603fc0a3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6658603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6659603fc0a3Smrg # Don't use ranlib 6660603fc0a3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6661603fc0a3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6662603fc0a3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6663603fc0a3Smrg case $lt_outputfile in 6664603fc0a3Smrg *.exe|*.EXE) ;; 6665603fc0a3Smrg *) 6666603fc0a3Smrg lt_outputfile=$lt_outputfile.exe 6667603fc0a3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6668603fc0a3Smrg ;; 6669603fc0a3Smrg esac~ 6670603fc0a3Smrg func_to_tool_file "$lt_outputfile"~ 6671603fc0a3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6672603fc0a3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6673603fc0a3Smrg $RM "$lt_outputfile.manifest"; 6674603fc0a3Smrg fi' 6675603fc0a3Smrg ;; 6676603fc0a3Smrg *) 6677603fc0a3Smrg # g++ 6678603fc0a3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6679603fc0a3Smrg # as there is no search path for DLLs. 6680603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6681603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6682603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6683603fc0a3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6684603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6685603fc0a3Smrg 6686603fc0a3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6687603fc0a3Smrg _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' 6688603fc0a3Smrg # If the export-symbols file already is a .def file, use it as 6689603fc0a3Smrg # is; otherwise, prepend EXPORTS... 6690603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6691603fc0a3Smrg cp $export_symbols $output_objdir/$soname.def; 6692603fc0a3Smrg else 6693603fc0a3Smrg echo EXPORTS > $output_objdir/$soname.def; 6694603fc0a3Smrg cat $export_symbols >> $output_objdir/$soname.def; 6695603fc0a3Smrg fi~ 6696603fc0a3Smrg $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' 6697603fc0a3Smrg else 6698603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6699603fc0a3Smrg fi 6700603fc0a3Smrg ;; 6701603fc0a3Smrg esac 6702603fc0a3Smrg ;; 6703603fc0a3Smrg darwin* | rhapsody*) 6704603fc0a3Smrg _LT_DARWIN_LINKER_FEATURES($1) 6705603fc0a3Smrg ;; 6706603fc0a3Smrg 6707603fc0a3Smrg os2*) 6708603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6709603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6710603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6711603fc0a3Smrg shrext_cmds=.dll 6712603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6713603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6714603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6715603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6716603fc0a3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6717603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6718603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 6719603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6720603fc0a3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6721603fc0a3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6722603fc0a3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6723603fc0a3Smrg prefix_cmds="$SED"~ 6724603fc0a3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6725603fc0a3Smrg prefix_cmds="$prefix_cmds -e 1d"; 6726603fc0a3Smrg fi~ 6727603fc0a3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6728603fc0a3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6729603fc0a3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6730603fc0a3Smrg emximp -o $lib $output_objdir/$libname.def' 6731603fc0a3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6732603fc0a3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6733603fc0a3Smrg ;; 6734603fc0a3Smrg 6735603fc0a3Smrg dgux*) 6736603fc0a3Smrg case $cc_basename in 6737603fc0a3Smrg ec++*) 6738603fc0a3Smrg # FIXME: insert proper C++ library support 6739603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6740603fc0a3Smrg ;; 6741603fc0a3Smrg ghcx*) 6742603fc0a3Smrg # Green Hills C++ Compiler 6743603fc0a3Smrg # FIXME: insert proper C++ library support 6744603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6745603fc0a3Smrg ;; 6746603fc0a3Smrg *) 6747603fc0a3Smrg # FIXME: insert proper C++ library support 6748603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6749603fc0a3Smrg ;; 6750603fc0a3Smrg esac 6751603fc0a3Smrg ;; 6752603fc0a3Smrg 6753603fc0a3Smrg freebsd2.*) 6754603fc0a3Smrg # C++ shared libraries reported to be fairly broken before 6755603fc0a3Smrg # switch to ELF 6756603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6757603fc0a3Smrg ;; 6758603fc0a3Smrg 6759603fc0a3Smrg freebsd-elf*) 6760603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6761603fc0a3Smrg ;; 6762603fc0a3Smrg 6763603fc0a3Smrg freebsd* | dragonfly*) 6764603fc0a3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6765603fc0a3Smrg # conventions 6766603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6767603fc0a3Smrg ;; 6768603fc0a3Smrg 6769603fc0a3Smrg haiku*) 6770603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6771603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6772603fc0a3Smrg ;; 6773603fc0a3Smrg 6774603fc0a3Smrg hpux9*) 6775603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6776603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6777603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6778603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6779603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6780603fc0a3Smrg # but as the default 6781603fc0a3Smrg # location of the library. 6782603fc0a3Smrg 6783603fc0a3Smrg case $cc_basename in 6784603fc0a3Smrg CC*) 6785603fc0a3Smrg # FIXME: insert proper C++ library support 6786603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6787603fc0a3Smrg ;; 6788603fc0a3Smrg aCC*) 6789603fc0a3Smrg _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' 6790603fc0a3Smrg # Commands to make compiler produce verbose output that lists 6791603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 6792603fc0a3Smrg # linking a shared library. 6793603fc0a3Smrg # 6794603fc0a3Smrg # There doesn't appear to be a way to prevent this compiler from 6795603fc0a3Smrg # explicitly linking system object files so we need to strip them 6796603fc0a3Smrg # from the output so that they don't get included in the library 6797603fc0a3Smrg # dependencies. 6798603fc0a3Smrg 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"' 6799603fc0a3Smrg ;; 6800603fc0a3Smrg *) 6801603fc0a3Smrg if test yes = "$GXX"; then 6802603fc0a3Smrg _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' 6803603fc0a3Smrg else 6804603fc0a3Smrg # FIXME: insert proper C++ library support 6805603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6806603fc0a3Smrg fi 6807603fc0a3Smrg ;; 6808603fc0a3Smrg esac 6809603fc0a3Smrg ;; 6810603fc0a3Smrg 6811603fc0a3Smrg hpux10*|hpux11*) 6812603fc0a3Smrg if test no = "$with_gnu_ld"; then 6813603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6814603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6815603fc0a3Smrg 6816603fc0a3Smrg case $host_cpu in 6817603fc0a3Smrg hppa*64*|ia64*) 6818603fc0a3Smrg ;; 6819603fc0a3Smrg *) 6820603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6821603fc0a3Smrg ;; 6822603fc0a3Smrg esac 6823603fc0a3Smrg fi 6824603fc0a3Smrg case $host_cpu in 6825603fc0a3Smrg hppa*64*|ia64*) 6826603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6827603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6828603fc0a3Smrg ;; 6829603fc0a3Smrg *) 6830603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6831603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6832603fc0a3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6833603fc0a3Smrg # but as the default 6834603fc0a3Smrg # location of the library. 6835603fc0a3Smrg ;; 6836603fc0a3Smrg esac 6837603fc0a3Smrg 6838603fc0a3Smrg case $cc_basename in 6839603fc0a3Smrg CC*) 6840603fc0a3Smrg # FIXME: insert proper C++ library support 6841603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6842603fc0a3Smrg ;; 6843603fc0a3Smrg aCC*) 6844603fc0a3Smrg case $host_cpu in 6845603fc0a3Smrg hppa*64*) 6846603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6847603fc0a3Smrg ;; 6848603fc0a3Smrg ia64*) 6849603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6850603fc0a3Smrg ;; 6851603fc0a3Smrg *) 6852603fc0a3Smrg _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' 6853603fc0a3Smrg ;; 6854603fc0a3Smrg esac 6855603fc0a3Smrg # Commands to make compiler produce verbose output that lists 6856603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 6857603fc0a3Smrg # linking a shared library. 6858603fc0a3Smrg # 6859603fc0a3Smrg # There doesn't appear to be a way to prevent this compiler from 6860603fc0a3Smrg # explicitly linking system object files so we need to strip them 6861603fc0a3Smrg # from the output so that they don't get included in the library 6862603fc0a3Smrg # dependencies. 6863603fc0a3Smrg 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"' 6864603fc0a3Smrg ;; 6865603fc0a3Smrg *) 6866603fc0a3Smrg if test yes = "$GXX"; then 6867603fc0a3Smrg if test no = "$with_gnu_ld"; then 6868603fc0a3Smrg case $host_cpu in 6869603fc0a3Smrg hppa*64*) 6870603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6871603fc0a3Smrg ;; 6872603fc0a3Smrg ia64*) 6873603fc0a3Smrg _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' 6874603fc0a3Smrg ;; 6875603fc0a3Smrg *) 6876603fc0a3Smrg _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' 6877603fc0a3Smrg ;; 6878603fc0a3Smrg esac 6879603fc0a3Smrg fi 6880603fc0a3Smrg else 6881603fc0a3Smrg # FIXME: insert proper C++ library support 6882603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6883603fc0a3Smrg fi 6884603fc0a3Smrg ;; 6885603fc0a3Smrg esac 6886603fc0a3Smrg ;; 6887603fc0a3Smrg 6888603fc0a3Smrg interix[[3-9]]*) 6889603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6890603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6891603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6892603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6893603fc0a3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6894603fc0a3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6895603fc0a3Smrg # default) and relocated if they conflict, which is a slow very memory 6896603fc0a3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6897603fc0a3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6898603fc0a3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6899603fc0a3Smrg _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' 6900603fc0a3Smrg _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' 6901603fc0a3Smrg ;; 6902603fc0a3Smrg irix5* | irix6*) 6903603fc0a3Smrg case $cc_basename in 6904603fc0a3Smrg CC*) 6905603fc0a3Smrg # SGI C++ 6906603fc0a3Smrg _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' 6907603fc0a3Smrg 6908603fc0a3Smrg # Archives containing C++ object files must be created using 6909603fc0a3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6910603fc0a3Smrg # necessary to make sure instantiated templates are included 6911603fc0a3Smrg # in the archive. 6912603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6913603fc0a3Smrg ;; 6914603fc0a3Smrg *) 6915603fc0a3Smrg if test yes = "$GXX"; then 6916603fc0a3Smrg if test no = "$with_gnu_ld"; then 6917603fc0a3Smrg _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' 6918603fc0a3Smrg else 6919603fc0a3Smrg _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' 6920603fc0a3Smrg fi 6921603fc0a3Smrg fi 6922603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6923603fc0a3Smrg ;; 6924603fc0a3Smrg esac 6925603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6926603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6927603fc0a3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6928603fc0a3Smrg ;; 6929603fc0a3Smrg 6930603fc0a3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6931603fc0a3Smrg case $cc_basename in 6932603fc0a3Smrg KCC*) 6933603fc0a3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6934603fc0a3Smrg 6935603fc0a3Smrg # KCC will only create a shared library if the output file 6936603fc0a3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6937603fc0a3Smrg # to its proper name (with version) after linking. 6938603fc0a3Smrg _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' 6939603fc0a3Smrg _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' 6940603fc0a3Smrg # Commands to make compiler produce verbose output that lists 6941603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 6942603fc0a3Smrg # linking a shared library. 6943603fc0a3Smrg # 6944603fc0a3Smrg # There doesn't appear to be a way to prevent this compiler from 6945603fc0a3Smrg # explicitly linking system object files so we need to strip them 6946603fc0a3Smrg # from the output so that they don't get included in the library 6947603fc0a3Smrg # dependencies. 6948603fc0a3Smrg 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"' 6949603fc0a3Smrg 6950603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6951603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6952603fc0a3Smrg 6953603fc0a3Smrg # Archives containing C++ object files must be created using 6954603fc0a3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6955603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6956603fc0a3Smrg ;; 6957603fc0a3Smrg icpc* | ecpc* ) 6958603fc0a3Smrg # Intel C++ 6959603fc0a3Smrg with_gnu_ld=yes 6960603fc0a3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6961603fc0a3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6962603fc0a3Smrg # earlier do not add the objects themselves. 6963603fc0a3Smrg case `$CC -V 2>&1` in 6964603fc0a3Smrg *"Version 7."*) 6965603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6966603fc0a3Smrg _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' 6967603fc0a3Smrg ;; 6968603fc0a3Smrg *) # Version 8.0 or newer 6969603fc0a3Smrg tmp_idyn= 6970603fc0a3Smrg case $host_cpu in 6971603fc0a3Smrg ia64*) tmp_idyn=' -i_dynamic';; 6972603fc0a3Smrg esac 6973603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6974603fc0a3Smrg _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' 6975603fc0a3Smrg ;; 6976603fc0a3Smrg esac 6977603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6978603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6979603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6980603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6981603fc0a3Smrg ;; 6982603fc0a3Smrg pgCC* | pgcpp*) 6983603fc0a3Smrg # Portland Group C++ compiler 6984603fc0a3Smrg case `$CC -V` in 6985603fc0a3Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6986603fc0a3Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6987603fc0a3Smrg rm -rf $tpldir~ 6988603fc0a3Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6989603fc0a3Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6990603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6991603fc0a3Smrg rm -rf $tpldir~ 6992603fc0a3Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6993603fc0a3Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6994603fc0a3Smrg $RANLIB $oldlib' 6995603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6996603fc0a3Smrg rm -rf $tpldir~ 6997603fc0a3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6998603fc0a3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6999603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7000603fc0a3Smrg rm -rf $tpldir~ 7001603fc0a3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7002603fc0a3Smrg $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' 7003603fc0a3Smrg ;; 7004603fc0a3Smrg *) # Version 6 and above use weak symbols 7005603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7006603fc0a3Smrg _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' 7007603fc0a3Smrg ;; 7008603fc0a3Smrg esac 7009603fc0a3Smrg 7010603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7011603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7012603fc0a3Smrg _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' 7013603fc0a3Smrg ;; 7014603fc0a3Smrg cxx*) 7015603fc0a3Smrg # Compaq C++ 7016603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7017603fc0a3Smrg _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' 7018603fc0a3Smrg 7019603fc0a3Smrg runpath_var=LD_RUN_PATH 7020603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7021603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7022603fc0a3Smrg 7023603fc0a3Smrg # Commands to make compiler produce verbose output that lists 7024603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 7025603fc0a3Smrg # linking a shared library. 7026603fc0a3Smrg # 7027603fc0a3Smrg # There doesn't appear to be a way to prevent this compiler from 7028603fc0a3Smrg # explicitly linking system object files so we need to strip them 7029603fc0a3Smrg # from the output so that they don't get included in the library 7030603fc0a3Smrg # dependencies. 7031603fc0a3Smrg 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' 7032603fc0a3Smrg ;; 7033603fc0a3Smrg xl* | mpixl* | bgxl*) 7034603fc0a3Smrg # IBM XL 8.0 on PPC, with GNU ld 7035603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7036603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7037603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7038603fc0a3Smrg if test yes = "$supports_anon_versioning"; then 7039603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7040603fc0a3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7041603fc0a3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7042603fc0a3Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7043603fc0a3Smrg fi 7044603fc0a3Smrg ;; 7045603fc0a3Smrg *) 7046603fc0a3Smrg case `$CC -V 2>&1 | sed 5q` in 7047603fc0a3Smrg *Sun\ C*) 7048603fc0a3Smrg # Sun C++ 5.9 7049603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7050603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7051603fc0a3Smrg _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' 7052603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7053603fc0a3Smrg _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' 7054603fc0a3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7055603fc0a3Smrg 7056603fc0a3Smrg # Not sure whether something based on 7057603fc0a3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7058603fc0a3Smrg # would be better. 7059603fc0a3Smrg output_verbose_link_cmd='func_echo_all' 7060603fc0a3Smrg 7061603fc0a3Smrg # Archives containing C++ object files must be created using 7062603fc0a3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7063603fc0a3Smrg # necessary to make sure instantiated templates are included 7064603fc0a3Smrg # in the archive. 7065603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7066603fc0a3Smrg ;; 7067603fc0a3Smrg esac 7068603fc0a3Smrg ;; 7069603fc0a3Smrg esac 7070603fc0a3Smrg ;; 7071603fc0a3Smrg 7072603fc0a3Smrg lynxos*) 7073603fc0a3Smrg # FIXME: insert proper C++ library support 7074603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7075603fc0a3Smrg ;; 7076603fc0a3Smrg 7077603fc0a3Smrg m88k*) 7078603fc0a3Smrg # FIXME: insert proper C++ library support 7079603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7080603fc0a3Smrg ;; 7081603fc0a3Smrg 7082603fc0a3Smrg mvs*) 7083603fc0a3Smrg case $cc_basename in 7084603fc0a3Smrg cxx*) 7085603fc0a3Smrg # FIXME: insert proper C++ library support 7086603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7087603fc0a3Smrg ;; 7088603fc0a3Smrg *) 7089603fc0a3Smrg # FIXME: insert proper C++ library support 7090603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7091603fc0a3Smrg ;; 7092603fc0a3Smrg esac 7093603fc0a3Smrg ;; 7094603fc0a3Smrg 7095603fc0a3Smrg netbsd*) 7096603fc0a3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7097603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7098603fc0a3Smrg wlarc= 7099603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7100603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7101603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7102603fc0a3Smrg fi 7103603fc0a3Smrg # Workaround some broken pre-1.5 toolchains 7104603fc0a3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7105603fc0a3Smrg ;; 7106603fc0a3Smrg 7107603fc0a3Smrg *nto* | *qnx*) 7108603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7109603fc0a3Smrg ;; 7110603fc0a3Smrg 7111603fc0a3Smrg openbsd* | bitrig*) 7112603fc0a3Smrg if test -f /usr/libexec/ld.so; then 7113603fc0a3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7114603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7115603fc0a3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7116603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7117603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7118603fc0a3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7119603fc0a3Smrg _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' 7120603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7121603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7122603fc0a3Smrg fi 7123603fc0a3Smrg output_verbose_link_cmd=func_echo_all 7124603fc0a3Smrg else 7125603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7126603fc0a3Smrg fi 7127603fc0a3Smrg ;; 7128603fc0a3Smrg 7129603fc0a3Smrg osf3* | osf4* | osf5*) 7130603fc0a3Smrg case $cc_basename in 7131603fc0a3Smrg KCC*) 7132603fc0a3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7133603fc0a3Smrg 7134603fc0a3Smrg # KCC will only create a shared library if the output file 7135603fc0a3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7136603fc0a3Smrg # to its proper name (with version) after linking. 7137603fc0a3Smrg _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' 7138603fc0a3Smrg 7139603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7140603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7141603fc0a3Smrg 7142603fc0a3Smrg # Archives containing C++ object files must be created using 7143603fc0a3Smrg # the KAI C++ compiler. 7144603fc0a3Smrg case $host in 7145603fc0a3Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7146603fc0a3Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7147603fc0a3Smrg esac 7148603fc0a3Smrg ;; 7149603fc0a3Smrg RCC*) 7150603fc0a3Smrg # Rational C++ 2.4.1 7151603fc0a3Smrg # FIXME: insert proper C++ library support 7152603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7153603fc0a3Smrg ;; 7154603fc0a3Smrg cxx*) 7155603fc0a3Smrg case $host in 7156603fc0a3Smrg osf3*) 7157603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7158603fc0a3Smrg _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' 7159603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7160603fc0a3Smrg ;; 7161603fc0a3Smrg *) 7162603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7163603fc0a3Smrg _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' 7164603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7165603fc0a3Smrg echo "-hidden">> $lib.exp~ 7166603fc0a3Smrg $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~ 7167603fc0a3Smrg $RM $lib.exp' 7168603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7169603fc0a3Smrg ;; 7170603fc0a3Smrg esac 7171603fc0a3Smrg 7172603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7173603fc0a3Smrg 7174603fc0a3Smrg # Commands to make compiler produce verbose output that lists 7175603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 7176603fc0a3Smrg # linking a shared library. 7177603fc0a3Smrg # 7178603fc0a3Smrg # There doesn't appear to be a way to prevent this compiler from 7179603fc0a3Smrg # explicitly linking system object files so we need to strip them 7180603fc0a3Smrg # from the output so that they don't get included in the library 7181603fc0a3Smrg # dependencies. 7182603fc0a3Smrg 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"' 7183603fc0a3Smrg ;; 7184603fc0a3Smrg *) 7185603fc0a3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7186603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7187603fc0a3Smrg case $host in 7188603fc0a3Smrg osf3*) 7189603fc0a3Smrg _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' 7190603fc0a3Smrg ;; 7191603fc0a3Smrg *) 7192603fc0a3Smrg _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' 7193603fc0a3Smrg ;; 7194603fc0a3Smrg esac 7195603fc0a3Smrg 7196603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7197603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7198603fc0a3Smrg 7199603fc0a3Smrg # Commands to make compiler produce verbose output that lists 7200603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 7201603fc0a3Smrg # linking a shared library. 7202603fc0a3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7203603fc0a3Smrg 7204603fc0a3Smrg else 7205603fc0a3Smrg # FIXME: insert proper C++ library support 7206603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7207603fc0a3Smrg fi 7208603fc0a3Smrg ;; 7209603fc0a3Smrg esac 7210603fc0a3Smrg ;; 7211603fc0a3Smrg 7212603fc0a3Smrg psos*) 7213603fc0a3Smrg # FIXME: insert proper C++ library support 7214603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7215603fc0a3Smrg ;; 7216603fc0a3Smrg 7217603fc0a3Smrg sunos4*) 7218603fc0a3Smrg case $cc_basename in 7219603fc0a3Smrg CC*) 7220603fc0a3Smrg # Sun C++ 4.x 7221603fc0a3Smrg # FIXME: insert proper C++ library support 7222603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7223603fc0a3Smrg ;; 7224603fc0a3Smrg lcc*) 7225603fc0a3Smrg # Lucid 7226603fc0a3Smrg # FIXME: insert proper C++ library support 7227603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7228603fc0a3Smrg ;; 7229603fc0a3Smrg *) 7230603fc0a3Smrg # FIXME: insert proper C++ library support 7231603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7232603fc0a3Smrg ;; 7233603fc0a3Smrg esac 7234603fc0a3Smrg ;; 7235603fc0a3Smrg 7236603fc0a3Smrg solaris*) 7237603fc0a3Smrg case $cc_basename in 7238603fc0a3Smrg CC* | sunCC*) 7239603fc0a3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7240603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7241603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7242603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7243603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7244603fc0a3Smrg $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' 7245603fc0a3Smrg 7246603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7247603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7248603fc0a3Smrg case $host_os in 7249603fc0a3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7250603fc0a3Smrg *) 7251603fc0a3Smrg # The compiler driver will combine and reorder linker options, 7252603fc0a3Smrg # but understands '-z linker_flag'. 7253603fc0a3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7254603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7255603fc0a3Smrg ;; 7256603fc0a3Smrg esac 7257603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7258603fc0a3Smrg 7259603fc0a3Smrg output_verbose_link_cmd='func_echo_all' 7260603fc0a3Smrg 7261603fc0a3Smrg # Archives containing C++ object files must be created using 7262603fc0a3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7263603fc0a3Smrg # necessary to make sure instantiated templates are included 7264603fc0a3Smrg # in the archive. 7265603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7266603fc0a3Smrg ;; 7267603fc0a3Smrg gcx*) 7268603fc0a3Smrg # Green Hills C++ Compiler 7269603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7270603fc0a3Smrg 7271603fc0a3Smrg # The C++ compiler must be used to create the archive. 7272603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7273603fc0a3Smrg ;; 7274603fc0a3Smrg *) 7275603fc0a3Smrg # GNU C++ compiler with Solaris linker 7276603fc0a3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7277603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7278603fc0a3Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7279603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7280603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7281603fc0a3Smrg $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' 7282603fc0a3Smrg 7283603fc0a3Smrg # Commands to make compiler produce verbose output that lists 7284603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 7285603fc0a3Smrg # linking a shared library. 7286603fc0a3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7287603fc0a3Smrg else 7288603fc0a3Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7289603fc0a3Smrg # platform. 7290603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7291603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7292603fc0a3Smrg $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' 7293603fc0a3Smrg 7294603fc0a3Smrg # Commands to make compiler produce verbose output that lists 7295603fc0a3Smrg # what "hidden" libraries, object files and flags are used when 7296603fc0a3Smrg # linking a shared library. 7297603fc0a3Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7298603fc0a3Smrg fi 7299603fc0a3Smrg 7300603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7301603fc0a3Smrg case $host_os in 7302603fc0a3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7303603fc0a3Smrg *) 7304603fc0a3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7305603fc0a3Smrg ;; 7306603fc0a3Smrg esac 7307603fc0a3Smrg fi 7308603fc0a3Smrg ;; 7309603fc0a3Smrg esac 7310603fc0a3Smrg ;; 7311603fc0a3Smrg 7312603fc0a3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7313603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7314603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7315603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7316603fc0a3Smrg runpath_var='LD_RUN_PATH' 7317603fc0a3Smrg 7318603fc0a3Smrg case $cc_basename in 7319603fc0a3Smrg CC*) 7320603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7321603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7322603fc0a3Smrg ;; 7323603fc0a3Smrg *) 7324603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7325603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7326603fc0a3Smrg ;; 7327603fc0a3Smrg esac 7328603fc0a3Smrg ;; 7329603fc0a3Smrg 7330603fc0a3Smrg sysv5* | sco3.2v5* | sco5v6*) 7331603fc0a3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 7332603fc0a3Smrg # link with -lc, and that would cause any symbols used from libc to 7333603fc0a3Smrg # always be unresolved, which means just about no library would 7334603fc0a3Smrg # ever link correctly. If we're not using GNU ld we use -z text 7335603fc0a3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7336603fc0a3Smrg # as -z defs. 7337603fc0a3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7338603fc0a3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7339603fc0a3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7340603fc0a3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7341603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7342603fc0a3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7343603fc0a3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7344603fc0a3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7345603fc0a3Smrg runpath_var='LD_RUN_PATH' 7346603fc0a3Smrg 7347603fc0a3Smrg case $cc_basename in 7348603fc0a3Smrg CC*) 7349603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7351603fc0a3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7352603fc0a3Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7353603fc0a3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7354603fc0a3Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7355603fc0a3Smrg ;; 7356603fc0a3Smrg *) 7357603fc0a3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7358603fc0a3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7359603fc0a3Smrg ;; 7360603fc0a3Smrg esac 7361603fc0a3Smrg ;; 7362603fc0a3Smrg 7363603fc0a3Smrg tandem*) 7364603fc0a3Smrg case $cc_basename in 7365603fc0a3Smrg NCC*) 7366603fc0a3Smrg # NonStop-UX NCC 3.20 7367603fc0a3Smrg # FIXME: insert proper C++ library support 7368603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7369603fc0a3Smrg ;; 7370603fc0a3Smrg *) 7371603fc0a3Smrg # FIXME: insert proper C++ library support 7372603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7373603fc0a3Smrg ;; 7374603fc0a3Smrg esac 7375603fc0a3Smrg ;; 7376603fc0a3Smrg 7377603fc0a3Smrg vxworks*) 7378603fc0a3Smrg # FIXME: insert proper C++ library support 7379603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7380603fc0a3Smrg ;; 7381603fc0a3Smrg 7382603fc0a3Smrg *) 7383603fc0a3Smrg # FIXME: insert proper C++ library support 7384603fc0a3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7385603fc0a3Smrg ;; 7386603fc0a3Smrg esac 7387603fc0a3Smrg 7388603fc0a3Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7389603fc0a3Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7390603fc0a3Smrg 7391603fc0a3Smrg _LT_TAGVAR(GCC, $1)=$GXX 7392603fc0a3Smrg _LT_TAGVAR(LD, $1)=$LD 7393603fc0a3Smrg 7394603fc0a3Smrg ## CAVEAT EMPTOR: 7395603fc0a3Smrg ## There is no encapsulation within the following macros, do not change 7396603fc0a3Smrg ## the running order or otherwise move them around unless you know exactly 7397603fc0a3Smrg ## what you are doing... 7398603fc0a3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7399603fc0a3Smrg _LT_COMPILER_PIC($1) 7400603fc0a3Smrg _LT_COMPILER_C_O($1) 7401603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 7402603fc0a3Smrg _LT_LINKER_SHLIBS($1) 7403603fc0a3Smrg _LT_SYS_DYNAMIC_LINKER($1) 7404603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7405603fc0a3Smrg 7406603fc0a3Smrg _LT_CONFIG($1) 7407603fc0a3Smrg fi # test -n "$compiler" 7408603fc0a3Smrg 7409603fc0a3Smrg CC=$lt_save_CC 7410603fc0a3Smrg CFLAGS=$lt_save_CFLAGS 7411603fc0a3Smrg LDCXX=$LD 7412603fc0a3Smrg LD=$lt_save_LD 7413603fc0a3Smrg GCC=$lt_save_GCC 7414603fc0a3Smrg with_gnu_ld=$lt_save_with_gnu_ld 7415603fc0a3Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7416603fc0a3Smrg lt_cv_path_LD=$lt_save_path_LD 7417603fc0a3Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7418603fc0a3Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7419603fc0a3Smrgfi # test yes != "$_lt_caught_CXX_error" 7420603fc0a3Smrg 7421603fc0a3SmrgAC_LANG_POP 7422603fc0a3Smrg])# _LT_LANG_CXX_CONFIG 7423603fc0a3Smrg 7424603fc0a3Smrg 7425603fc0a3Smrg# _LT_FUNC_STRIPNAME_CNF 7426603fc0a3Smrg# ---------------------- 7427603fc0a3Smrg# func_stripname_cnf prefix suffix name 7428603fc0a3Smrg# strip PREFIX and SUFFIX off of NAME. 7429603fc0a3Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7430603fc0a3Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7431603fc0a3Smrg# dot (in which case that matches only a dot). 7432603fc0a3Smrg# 7433603fc0a3Smrg# This function is identical to the (non-XSI) version of func_stripname, 7434603fc0a3Smrg# except this one can be used by m4 code that may be executed by configure, 7435603fc0a3Smrg# rather than the libtool script. 7436603fc0a3Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7437603fc0a3SmrgAC_REQUIRE([_LT_DECL_SED]) 7438603fc0a3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7439603fc0a3Smrgfunc_stripname_cnf () 7440603fc0a3Smrg{ 7441603fc0a3Smrg case @S|@2 in 7442603fc0a3Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7443603fc0a3Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7444603fc0a3Smrg esac 7445603fc0a3Smrg} # func_stripname_cnf 7446603fc0a3Smrg])# _LT_FUNC_STRIPNAME_CNF 7447603fc0a3Smrg 7448603fc0a3Smrg 7449603fc0a3Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7450603fc0a3Smrg# --------------------------------- 7451603fc0a3Smrg# Figure out "hidden" library dependencies from verbose 7452603fc0a3Smrg# compiler output when linking a shared library. 7453603fc0a3Smrg# Parse the compiler output and extract the necessary 7454603fc0a3Smrg# objects, libraries and library flags. 7455603fc0a3Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7456603fc0a3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7457603fc0a3SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7458603fc0a3Smrg# Dependencies to place before and after the object being linked: 7459603fc0a3Smrg_LT_TAGVAR(predep_objects, $1)= 7460603fc0a3Smrg_LT_TAGVAR(postdep_objects, $1)= 7461603fc0a3Smrg_LT_TAGVAR(predeps, $1)= 7462603fc0a3Smrg_LT_TAGVAR(postdeps, $1)= 7463603fc0a3Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7464603fc0a3Smrg 7465603fc0a3Smrgdnl we can't use the lt_simple_compile_test_code here, 7466603fc0a3Smrgdnl because it contains code intended for an executable, 7467603fc0a3Smrgdnl not a library. It's possible we should let each 7468603fc0a3Smrgdnl tag define a new lt_????_link_test_code variable, 7469603fc0a3Smrgdnl but it's only used here... 7470603fc0a3Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7471603fc0a3Smrgint a; 7472603fc0a3Smrgvoid foo (void) { a = 0; } 7473603fc0a3Smrg_LT_EOF 7474603fc0a3Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7475603fc0a3Smrgclass Foo 7476603fc0a3Smrg{ 7477603fc0a3Smrgpublic: 7478603fc0a3Smrg Foo (void) { a = 0; } 7479603fc0a3Smrgprivate: 7480603fc0a3Smrg int a; 7481603fc0a3Smrg}; 7482603fc0a3Smrg_LT_EOF 7483603fc0a3Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7484603fc0a3Smrg subroutine foo 7485603fc0a3Smrg implicit none 7486603fc0a3Smrg integer*4 a 7487603fc0a3Smrg a=0 7488603fc0a3Smrg return 7489603fc0a3Smrg end 7490603fc0a3Smrg_LT_EOF 7491603fc0a3Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7492603fc0a3Smrg subroutine foo 7493603fc0a3Smrg implicit none 7494603fc0a3Smrg integer a 7495603fc0a3Smrg a=0 7496603fc0a3Smrg return 7497603fc0a3Smrg end 7498603fc0a3Smrg_LT_EOF 7499603fc0a3Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7500603fc0a3Smrgpublic class foo { 7501603fc0a3Smrg private int a; 7502603fc0a3Smrg public void bar (void) { 7503603fc0a3Smrg a = 0; 7504603fc0a3Smrg } 7505603fc0a3Smrg}; 7506603fc0a3Smrg_LT_EOF 7507603fc0a3Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7508603fc0a3Smrgpackage foo 7509603fc0a3Smrgfunc foo() { 7510603fc0a3Smrg} 7511603fc0a3Smrg_LT_EOF 7512603fc0a3Smrg]) 7513603fc0a3Smrg 7514603fc0a3Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7515603fc0a3Smrgcase "$CC $CFLAGS " in #( 7516603fc0a3Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7517603fc0a3Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7518603fc0a3Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7519603fc0a3Smrgesac 7520603fc0a3Smrg 7521603fc0a3Smrgdnl Parse the compiler output and extract the necessary 7522603fc0a3Smrgdnl objects, libraries and library flags. 7523603fc0a3Smrgif AC_TRY_EVAL(ac_compile); then 7524603fc0a3Smrg # Parse the compiler output and extract the necessary 7525603fc0a3Smrg # objects, libraries and library flags. 7526603fc0a3Smrg 7527603fc0a3Smrg # Sentinel used to keep track of whether or not we are before 7528603fc0a3Smrg # the conftest object file. 7529603fc0a3Smrg pre_test_object_deps_done=no 7530603fc0a3Smrg 7531603fc0a3Smrg for p in `eval "$output_verbose_link_cmd"`; do 7532603fc0a3Smrg case $prev$p in 7533603fc0a3Smrg 7534603fc0a3Smrg -L* | -R* | -l*) 7535603fc0a3Smrg # Some compilers place space between "-{L,R}" and the path. 7536603fc0a3Smrg # Remove the space. 7537603fc0a3Smrg if test x-L = "$p" || 7538603fc0a3Smrg test x-R = "$p"; then 7539603fc0a3Smrg prev=$p 7540603fc0a3Smrg continue 7541603fc0a3Smrg fi 7542603fc0a3Smrg 7543603fc0a3Smrg # Expand the sysroot to ease extracting the directories later. 7544603fc0a3Smrg if test -z "$prev"; then 7545603fc0a3Smrg case $p in 7546603fc0a3Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7547603fc0a3Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7548603fc0a3Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7549603fc0a3Smrg esac 7550603fc0a3Smrg fi 7551603fc0a3Smrg case $p in 7552603fc0a3Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7553603fc0a3Smrg esac 7554603fc0a3Smrg if test no = "$pre_test_object_deps_done"; then 7555603fc0a3Smrg case $prev in 7556603fc0a3Smrg -L | -R) 7557603fc0a3Smrg # Internal compiler library paths should come after those 7558603fc0a3Smrg # provided the user. The postdeps already come after the 7559603fc0a3Smrg # user supplied libs so there is no need to process them. 7560603fc0a3Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7561603fc0a3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7562603fc0a3Smrg else 7563603fc0a3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7564603fc0a3Smrg fi 7565603fc0a3Smrg ;; 7566603fc0a3Smrg # The "-l" case would never come before the object being 7567603fc0a3Smrg # linked, so don't bother handling this case. 7568603fc0a3Smrg esac 7569603fc0a3Smrg else 7570603fc0a3Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7571603fc0a3Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 7572603fc0a3Smrg else 7573603fc0a3Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7574603fc0a3Smrg fi 7575603fc0a3Smrg fi 7576603fc0a3Smrg prev= 7577603fc0a3Smrg ;; 7578603fc0a3Smrg 7579603fc0a3Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7580603fc0a3Smrg *.$objext) 7581603fc0a3Smrg # This assumes that the test object file only shows up 7582603fc0a3Smrg # once in the compiler output. 7583603fc0a3Smrg if test "$p" = "conftest.$objext"; then 7584603fc0a3Smrg pre_test_object_deps_done=yes 7585603fc0a3Smrg continue 7586603fc0a3Smrg fi 7587603fc0a3Smrg 7588603fc0a3Smrg if test no = "$pre_test_object_deps_done"; then 7589603fc0a3Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7590603fc0a3Smrg _LT_TAGVAR(predep_objects, $1)=$p 7591603fc0a3Smrg else 7592603fc0a3Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7593603fc0a3Smrg fi 7594603fc0a3Smrg else 7595603fc0a3Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7596603fc0a3Smrg _LT_TAGVAR(postdep_objects, $1)=$p 7597603fc0a3Smrg else 7598603fc0a3Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7599603fc0a3Smrg fi 7600603fc0a3Smrg fi 7601603fc0a3Smrg ;; 7602603fc0a3Smrg 7603603fc0a3Smrg *) ;; # Ignore the rest. 7604603fc0a3Smrg 7605603fc0a3Smrg esac 7606603fc0a3Smrg done 7607603fc0a3Smrg 7608603fc0a3Smrg # Clean up. 7609603fc0a3Smrg rm -f a.out a.exe 7610603fc0a3Smrgelse 7611603fc0a3Smrg echo "libtool.m4: error: problem compiling $1 test program" 7612603fc0a3Smrgfi 7613603fc0a3Smrg 7614603fc0a3Smrg$RM -f confest.$objext 7615603fc0a3SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7616603fc0a3Smrg 7617603fc0a3Smrg# PORTME: override above test on systems where it is broken 7618603fc0a3Smrgm4_if([$1], [CXX], 7619603fc0a3Smrg[case $host_os in 7620603fc0a3Smrginterix[[3-9]]*) 7621603fc0a3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7622603fc0a3Smrg # hack all around it, let's just trust "g++" to DTRT. 7623603fc0a3Smrg _LT_TAGVAR(predep_objects,$1)= 7624603fc0a3Smrg _LT_TAGVAR(postdep_objects,$1)= 7625603fc0a3Smrg _LT_TAGVAR(postdeps,$1)= 7626603fc0a3Smrg ;; 7627603fc0a3Smrgesac 7628603fc0a3Smrg]) 7629603fc0a3Smrg 7630603fc0a3Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7631603fc0a3Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7632603fc0a3Smrgesac 7633603fc0a3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7634603fc0a3Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7635603fc0a3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7636603fc0a3Smrgfi 7637603fc0a3Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7638603fc0a3Smrg [The directories searched by this compiler when creating a shared library]) 7639603fc0a3Smrg_LT_TAGDECL([], [predep_objects], [1], 7640603fc0a3Smrg [Dependencies to place before and after the objects being linked to 7641603fc0a3Smrg create a shared library]) 7642603fc0a3Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7643603fc0a3Smrg_LT_TAGDECL([], [predeps], [1]) 7644603fc0a3Smrg_LT_TAGDECL([], [postdeps], [1]) 7645603fc0a3Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7646603fc0a3Smrg [The library search path used internally by the compiler when linking 7647603fc0a3Smrg a shared library]) 7648603fc0a3Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7649603fc0a3Smrg 7650603fc0a3Smrg 7651603fc0a3Smrg# _LT_LANG_F77_CONFIG([TAG]) 7652603fc0a3Smrg# -------------------------- 7653603fc0a3Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7654603fc0a3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7655603fc0a3Smrg# to write the compiler configuration to 'libtool'. 7656603fc0a3Smrgm4_defun([_LT_LANG_F77_CONFIG], 7657603fc0a3Smrg[AC_LANG_PUSH(Fortran 77) 7658603fc0a3Smrgif test -z "$F77" || test no = "$F77"; then 7659603fc0a3Smrg _lt_disable_F77=yes 7660603fc0a3Smrgfi 7661603fc0a3Smrg 7662603fc0a3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7663603fc0a3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7664603fc0a3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7665603fc0a3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7666603fc0a3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7667603fc0a3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7668603fc0a3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7669603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7670603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7671603fc0a3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7672603fc0a3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7673603fc0a3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7674603fc0a3Smrg_LT_TAGVAR(module_cmds, $1)= 7675603fc0a3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7676603fc0a3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7677603fc0a3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7678603fc0a3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7679603fc0a3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7680603fc0a3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7681603fc0a3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7682603fc0a3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7683603fc0a3Smrg 7684603fc0a3Smrg# Source file extension for f77 test sources. 7685603fc0a3Smrgac_ext=f 7686603fc0a3Smrg 7687603fc0a3Smrg# Object file extension for compiled f77 test sources. 7688603fc0a3Smrgobjext=o 7689603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 7690603fc0a3Smrg 7691603fc0a3Smrg# No sense in running all these tests if we already determined that 7692603fc0a3Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7693603fc0a3Smrg# are currently assumed to apply to all compilers on this platform, 7694603fc0a3Smrg# and will be corrupted by setting them based on a non-working compiler. 7695603fc0a3Smrgif test yes != "$_lt_disable_F77"; then 7696603fc0a3Smrg # Code to be used in simple compile tests 7697603fc0a3Smrg lt_simple_compile_test_code="\ 7698603fc0a3Smrg subroutine t 7699603fc0a3Smrg return 7700603fc0a3Smrg end 7701603fc0a3Smrg" 7702603fc0a3Smrg 7703603fc0a3Smrg # Code to be used in simple link tests 7704603fc0a3Smrg lt_simple_link_test_code="\ 7705603fc0a3Smrg program t 7706603fc0a3Smrg end 7707603fc0a3Smrg" 7708603fc0a3Smrg 7709603fc0a3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7710603fc0a3Smrg _LT_TAG_COMPILER 7711603fc0a3Smrg 7712603fc0a3Smrg # save warnings/boilerplate of simple test code 7713603fc0a3Smrg _LT_COMPILER_BOILERPLATE 7714603fc0a3Smrg _LT_LINKER_BOILERPLATE 7715603fc0a3Smrg 7716603fc0a3Smrg # Allow CC to be a program name with arguments. 7717603fc0a3Smrg lt_save_CC=$CC 7718603fc0a3Smrg lt_save_GCC=$GCC 7719603fc0a3Smrg lt_save_CFLAGS=$CFLAGS 7720603fc0a3Smrg CC=${F77-"f77"} 7721603fc0a3Smrg CFLAGS=$FFLAGS 7722603fc0a3Smrg compiler=$CC 7723603fc0a3Smrg _LT_TAGVAR(compiler, $1)=$CC 7724603fc0a3Smrg _LT_CC_BASENAME([$compiler]) 7725603fc0a3Smrg GCC=$G77 7726603fc0a3Smrg if test -n "$compiler"; then 7727603fc0a3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7728603fc0a3Smrg AC_MSG_RESULT([$can_build_shared]) 7729603fc0a3Smrg 7730603fc0a3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7731603fc0a3Smrg test no = "$can_build_shared" && enable_shared=no 7732603fc0a3Smrg 7733603fc0a3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7734603fc0a3Smrg # are all built from PIC. 7735603fc0a3Smrg case $host_os in 7736603fc0a3Smrg aix3*) 7737603fc0a3Smrg test yes = "$enable_shared" && enable_static=no 7738603fc0a3Smrg if test -n "$RANLIB"; then 7739603fc0a3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7740603fc0a3Smrg postinstall_cmds='$RANLIB $lib' 7741603fc0a3Smrg fi 7742603fc0a3Smrg ;; 7743603fc0a3Smrg aix[[4-9]]*) 7744603fc0a3Smrg if test ia64 != "$host_cpu"; then 7745603fc0a3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7746603fc0a3Smrg yes,aix,yes) ;; # shared object as lib.so file only 7747603fc0a3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7748603fc0a3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7749603fc0a3Smrg esac 7750603fc0a3Smrg fi 7751603fc0a3Smrg ;; 7752603fc0a3Smrg esac 7753603fc0a3Smrg AC_MSG_RESULT([$enable_shared]) 7754603fc0a3Smrg 7755603fc0a3Smrg AC_MSG_CHECKING([whether to build static libraries]) 7756603fc0a3Smrg # Make sure either enable_shared or enable_static is yes. 7757603fc0a3Smrg test yes = "$enable_shared" || enable_static=yes 7758603fc0a3Smrg AC_MSG_RESULT([$enable_static]) 7759603fc0a3Smrg 7760603fc0a3Smrg _LT_TAGVAR(GCC, $1)=$G77 7761603fc0a3Smrg _LT_TAGVAR(LD, $1)=$LD 7762603fc0a3Smrg 7763603fc0a3Smrg ## CAVEAT EMPTOR: 7764603fc0a3Smrg ## There is no encapsulation within the following macros, do not change 7765603fc0a3Smrg ## the running order or otherwise move them around unless you know exactly 7766603fc0a3Smrg ## what you are doing... 7767603fc0a3Smrg _LT_COMPILER_PIC($1) 7768603fc0a3Smrg _LT_COMPILER_C_O($1) 7769603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 7770603fc0a3Smrg _LT_LINKER_SHLIBS($1) 7771603fc0a3Smrg _LT_SYS_DYNAMIC_LINKER($1) 7772603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7773603fc0a3Smrg 7774603fc0a3Smrg _LT_CONFIG($1) 7775603fc0a3Smrg fi # test -n "$compiler" 7776603fc0a3Smrg 7777603fc0a3Smrg GCC=$lt_save_GCC 7778603fc0a3Smrg CC=$lt_save_CC 7779603fc0a3Smrg CFLAGS=$lt_save_CFLAGS 7780603fc0a3Smrgfi # test yes != "$_lt_disable_F77" 7781603fc0a3Smrg 7782603fc0a3SmrgAC_LANG_POP 7783603fc0a3Smrg])# _LT_LANG_F77_CONFIG 7784603fc0a3Smrg 7785603fc0a3Smrg 7786603fc0a3Smrg# _LT_LANG_FC_CONFIG([TAG]) 7787603fc0a3Smrg# ------------------------- 7788603fc0a3Smrg# Ensure that the configuration variables for a Fortran compiler are 7789603fc0a3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7790603fc0a3Smrg# to write the compiler configuration to 'libtool'. 7791603fc0a3Smrgm4_defun([_LT_LANG_FC_CONFIG], 7792603fc0a3Smrg[AC_LANG_PUSH(Fortran) 7793603fc0a3Smrg 7794603fc0a3Smrgif test -z "$FC" || test no = "$FC"; then 7795603fc0a3Smrg _lt_disable_FC=yes 7796603fc0a3Smrgfi 7797603fc0a3Smrg 7798603fc0a3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7799603fc0a3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7800603fc0a3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7801603fc0a3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7802603fc0a3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7803603fc0a3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7804603fc0a3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7805603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7806603fc0a3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7807603fc0a3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7808603fc0a3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7809603fc0a3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7810603fc0a3Smrg_LT_TAGVAR(module_cmds, $1)= 7811603fc0a3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7812603fc0a3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7813603fc0a3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7814603fc0a3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7815603fc0a3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7816603fc0a3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7817603fc0a3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7818603fc0a3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7819603fc0a3Smrg 7820603fc0a3Smrg# Source file extension for fc test sources. 7821603fc0a3Smrgac_ext=${ac_fc_srcext-f} 7822603fc0a3Smrg 7823603fc0a3Smrg# Object file extension for compiled fc test sources. 7824603fc0a3Smrgobjext=o 7825603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 7826603fc0a3Smrg 7827603fc0a3Smrg# No sense in running all these tests if we already determined that 7828603fc0a3Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7829603fc0a3Smrg# are currently assumed to apply to all compilers on this platform, 7830603fc0a3Smrg# and will be corrupted by setting them based on a non-working compiler. 7831603fc0a3Smrgif test yes != "$_lt_disable_FC"; then 7832603fc0a3Smrg # Code to be used in simple compile tests 7833603fc0a3Smrg lt_simple_compile_test_code="\ 7834603fc0a3Smrg subroutine t 7835603fc0a3Smrg return 7836603fc0a3Smrg end 7837603fc0a3Smrg" 7838603fc0a3Smrg 7839603fc0a3Smrg # Code to be used in simple link tests 7840603fc0a3Smrg lt_simple_link_test_code="\ 7841603fc0a3Smrg program t 7842603fc0a3Smrg end 7843603fc0a3Smrg" 7844603fc0a3Smrg 7845603fc0a3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7846603fc0a3Smrg _LT_TAG_COMPILER 7847603fc0a3Smrg 7848603fc0a3Smrg # save warnings/boilerplate of simple test code 7849603fc0a3Smrg _LT_COMPILER_BOILERPLATE 7850603fc0a3Smrg _LT_LINKER_BOILERPLATE 7851603fc0a3Smrg 7852603fc0a3Smrg # Allow CC to be a program name with arguments. 7853603fc0a3Smrg lt_save_CC=$CC 7854603fc0a3Smrg lt_save_GCC=$GCC 7855603fc0a3Smrg lt_save_CFLAGS=$CFLAGS 7856603fc0a3Smrg CC=${FC-"f95"} 7857603fc0a3Smrg CFLAGS=$FCFLAGS 7858603fc0a3Smrg compiler=$CC 7859603fc0a3Smrg GCC=$ac_cv_fc_compiler_gnu 7860603fc0a3Smrg 7861603fc0a3Smrg _LT_TAGVAR(compiler, $1)=$CC 7862603fc0a3Smrg _LT_CC_BASENAME([$compiler]) 7863603fc0a3Smrg 7864603fc0a3Smrg if test -n "$compiler"; then 7865603fc0a3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7866603fc0a3Smrg AC_MSG_RESULT([$can_build_shared]) 7867603fc0a3Smrg 7868603fc0a3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7869603fc0a3Smrg test no = "$can_build_shared" && enable_shared=no 7870603fc0a3Smrg 7871603fc0a3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7872603fc0a3Smrg # are all built from PIC. 7873603fc0a3Smrg case $host_os in 7874603fc0a3Smrg aix3*) 7875603fc0a3Smrg test yes = "$enable_shared" && enable_static=no 7876603fc0a3Smrg if test -n "$RANLIB"; then 7877603fc0a3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7878603fc0a3Smrg postinstall_cmds='$RANLIB $lib' 7879603fc0a3Smrg fi 7880603fc0a3Smrg ;; 7881603fc0a3Smrg aix[[4-9]]*) 7882603fc0a3Smrg if test ia64 != "$host_cpu"; then 7883603fc0a3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7884603fc0a3Smrg yes,aix,yes) ;; # shared object as lib.so file only 7885603fc0a3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7886603fc0a3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7887603fc0a3Smrg esac 7888603fc0a3Smrg fi 7889603fc0a3Smrg ;; 7890603fc0a3Smrg esac 7891603fc0a3Smrg AC_MSG_RESULT([$enable_shared]) 7892603fc0a3Smrg 7893603fc0a3Smrg AC_MSG_CHECKING([whether to build static libraries]) 7894603fc0a3Smrg # Make sure either enable_shared or enable_static is yes. 7895603fc0a3Smrg test yes = "$enable_shared" || enable_static=yes 7896603fc0a3Smrg AC_MSG_RESULT([$enable_static]) 7897603fc0a3Smrg 7898603fc0a3Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7899603fc0a3Smrg _LT_TAGVAR(LD, $1)=$LD 7900603fc0a3Smrg 7901603fc0a3Smrg ## CAVEAT EMPTOR: 7902603fc0a3Smrg ## There is no encapsulation within the following macros, do not change 7903603fc0a3Smrg ## the running order or otherwise move them around unless you know exactly 7904603fc0a3Smrg ## what you are doing... 7905603fc0a3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7906603fc0a3Smrg _LT_COMPILER_PIC($1) 7907603fc0a3Smrg _LT_COMPILER_C_O($1) 7908603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 7909603fc0a3Smrg _LT_LINKER_SHLIBS($1) 7910603fc0a3Smrg _LT_SYS_DYNAMIC_LINKER($1) 7911603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7912603fc0a3Smrg 7913603fc0a3Smrg _LT_CONFIG($1) 7914603fc0a3Smrg fi # test -n "$compiler" 7915603fc0a3Smrg 7916603fc0a3Smrg GCC=$lt_save_GCC 7917603fc0a3Smrg CC=$lt_save_CC 7918603fc0a3Smrg CFLAGS=$lt_save_CFLAGS 7919603fc0a3Smrgfi # test yes != "$_lt_disable_FC" 7920603fc0a3Smrg 7921603fc0a3SmrgAC_LANG_POP 7922603fc0a3Smrg])# _LT_LANG_FC_CONFIG 7923603fc0a3Smrg 7924603fc0a3Smrg 7925603fc0a3Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7926603fc0a3Smrg# -------------------------- 7927603fc0a3Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7928603fc0a3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7929603fc0a3Smrg# to write the compiler configuration to 'libtool'. 7930603fc0a3Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7931603fc0a3Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7932603fc0a3SmrgAC_LANG_SAVE 7933603fc0a3Smrg 7934603fc0a3Smrg# Source file extension for Java test sources. 7935603fc0a3Smrgac_ext=java 7936603fc0a3Smrg 7937603fc0a3Smrg# Object file extension for compiled Java test sources. 7938603fc0a3Smrgobjext=o 7939603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 7940603fc0a3Smrg 7941603fc0a3Smrg# Code to be used in simple compile tests 7942603fc0a3Smrglt_simple_compile_test_code="class foo {}" 7943603fc0a3Smrg 7944603fc0a3Smrg# Code to be used in simple link tests 7945603fc0a3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7946603fc0a3Smrg 7947603fc0a3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7948603fc0a3Smrg_LT_TAG_COMPILER 7949603fc0a3Smrg 7950603fc0a3Smrg# save warnings/boilerplate of simple test code 7951603fc0a3Smrg_LT_COMPILER_BOILERPLATE 7952603fc0a3Smrg_LT_LINKER_BOILERPLATE 7953603fc0a3Smrg 7954603fc0a3Smrg# Allow CC to be a program name with arguments. 7955603fc0a3Smrglt_save_CC=$CC 7956603fc0a3Smrglt_save_CFLAGS=$CFLAGS 7957603fc0a3Smrglt_save_GCC=$GCC 7958603fc0a3SmrgGCC=yes 7959603fc0a3SmrgCC=${GCJ-"gcj"} 7960603fc0a3SmrgCFLAGS=$GCJFLAGS 7961603fc0a3Smrgcompiler=$CC 7962603fc0a3Smrg_LT_TAGVAR(compiler, $1)=$CC 7963603fc0a3Smrg_LT_TAGVAR(LD, $1)=$LD 7964603fc0a3Smrg_LT_CC_BASENAME([$compiler]) 7965603fc0a3Smrg 7966603fc0a3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7967603fc0a3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7968603fc0a3Smrg 7969603fc0a3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7970603fc0a3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7971603fc0a3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7972603fc0a3Smrg 7973603fc0a3Smrg## CAVEAT EMPTOR: 7974603fc0a3Smrg## There is no encapsulation within the following macros, do not change 7975603fc0a3Smrg## the running order or otherwise move them around unless you know exactly 7976603fc0a3Smrg## what you are doing... 7977603fc0a3Smrgif test -n "$compiler"; then 7978603fc0a3Smrg _LT_COMPILER_NO_RTTI($1) 7979603fc0a3Smrg _LT_COMPILER_PIC($1) 7980603fc0a3Smrg _LT_COMPILER_C_O($1) 7981603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 7982603fc0a3Smrg _LT_LINKER_SHLIBS($1) 7983603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7984603fc0a3Smrg 7985603fc0a3Smrg _LT_CONFIG($1) 7986603fc0a3Smrgfi 7987603fc0a3Smrg 7988603fc0a3SmrgAC_LANG_RESTORE 7989603fc0a3Smrg 7990603fc0a3SmrgGCC=$lt_save_GCC 7991603fc0a3SmrgCC=$lt_save_CC 7992603fc0a3SmrgCFLAGS=$lt_save_CFLAGS 7993603fc0a3Smrg])# _LT_LANG_GCJ_CONFIG 7994603fc0a3Smrg 7995603fc0a3Smrg 7996603fc0a3Smrg# _LT_LANG_GO_CONFIG([TAG]) 7997603fc0a3Smrg# -------------------------- 7998603fc0a3Smrg# Ensure that the configuration variables for the GNU Go compiler 7999603fc0a3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8000603fc0a3Smrg# to write the compiler configuration to 'libtool'. 8001603fc0a3Smrgm4_defun([_LT_LANG_GO_CONFIG], 8002603fc0a3Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8003603fc0a3SmrgAC_LANG_SAVE 8004603fc0a3Smrg 8005603fc0a3Smrg# Source file extension for Go test sources. 8006603fc0a3Smrgac_ext=go 8007603fc0a3Smrg 8008603fc0a3Smrg# Object file extension for compiled Go test sources. 8009603fc0a3Smrgobjext=o 8010603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 8011603fc0a3Smrg 8012603fc0a3Smrg# Code to be used in simple compile tests 8013603fc0a3Smrglt_simple_compile_test_code="package main; func main() { }" 8014603fc0a3Smrg 8015603fc0a3Smrg# Code to be used in simple link tests 8016603fc0a3Smrglt_simple_link_test_code='package main; func main() { }' 8017603fc0a3Smrg 8018603fc0a3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8019603fc0a3Smrg_LT_TAG_COMPILER 8020603fc0a3Smrg 8021603fc0a3Smrg# save warnings/boilerplate of simple test code 8022603fc0a3Smrg_LT_COMPILER_BOILERPLATE 8023603fc0a3Smrg_LT_LINKER_BOILERPLATE 8024603fc0a3Smrg 8025603fc0a3Smrg# Allow CC to be a program name with arguments. 8026603fc0a3Smrglt_save_CC=$CC 8027603fc0a3Smrglt_save_CFLAGS=$CFLAGS 8028603fc0a3Smrglt_save_GCC=$GCC 8029603fc0a3SmrgGCC=yes 8030603fc0a3SmrgCC=${GOC-"gccgo"} 8031603fc0a3SmrgCFLAGS=$GOFLAGS 8032603fc0a3Smrgcompiler=$CC 8033603fc0a3Smrg_LT_TAGVAR(compiler, $1)=$CC 8034603fc0a3Smrg_LT_TAGVAR(LD, $1)=$LD 8035603fc0a3Smrg_LT_CC_BASENAME([$compiler]) 8036603fc0a3Smrg 8037603fc0a3Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8038603fc0a3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8039603fc0a3Smrg 8040603fc0a3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8041603fc0a3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8042603fc0a3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8043603fc0a3Smrg 8044603fc0a3Smrg## CAVEAT EMPTOR: 8045603fc0a3Smrg## There is no encapsulation within the following macros, do not change 8046603fc0a3Smrg## the running order or otherwise move them around unless you know exactly 8047603fc0a3Smrg## what you are doing... 8048603fc0a3Smrgif test -n "$compiler"; then 8049603fc0a3Smrg _LT_COMPILER_NO_RTTI($1) 8050603fc0a3Smrg _LT_COMPILER_PIC($1) 8051603fc0a3Smrg _LT_COMPILER_C_O($1) 8052603fc0a3Smrg _LT_COMPILER_FILE_LOCKS($1) 8053603fc0a3Smrg _LT_LINKER_SHLIBS($1) 8054603fc0a3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8055603fc0a3Smrg 8056603fc0a3Smrg _LT_CONFIG($1) 8057603fc0a3Smrgfi 8058603fc0a3Smrg 8059603fc0a3SmrgAC_LANG_RESTORE 8060603fc0a3Smrg 8061603fc0a3SmrgGCC=$lt_save_GCC 8062603fc0a3SmrgCC=$lt_save_CC 8063603fc0a3SmrgCFLAGS=$lt_save_CFLAGS 8064603fc0a3Smrg])# _LT_LANG_GO_CONFIG 8065603fc0a3Smrg 8066603fc0a3Smrg 8067603fc0a3Smrg# _LT_LANG_RC_CONFIG([TAG]) 8068603fc0a3Smrg# ------------------------- 8069603fc0a3Smrg# Ensure that the configuration variables for the Windows resource compiler 8070603fc0a3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8071603fc0a3Smrg# to write the compiler configuration to 'libtool'. 8072603fc0a3Smrgm4_defun([_LT_LANG_RC_CONFIG], 8073603fc0a3Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8074603fc0a3SmrgAC_LANG_SAVE 8075603fc0a3Smrg 8076603fc0a3Smrg# Source file extension for RC test sources. 8077603fc0a3Smrgac_ext=rc 8078603fc0a3Smrg 8079603fc0a3Smrg# Object file extension for compiled RC test sources. 8080603fc0a3Smrgobjext=o 8081603fc0a3Smrg_LT_TAGVAR(objext, $1)=$objext 8082603fc0a3Smrg 8083603fc0a3Smrg# Code to be used in simple compile tests 8084603fc0a3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8085603fc0a3Smrg 8086603fc0a3Smrg# Code to be used in simple link tests 8087603fc0a3Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8088603fc0a3Smrg 8089603fc0a3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8090603fc0a3Smrg_LT_TAG_COMPILER 8091603fc0a3Smrg 8092603fc0a3Smrg# save warnings/boilerplate of simple test code 8093603fc0a3Smrg_LT_COMPILER_BOILERPLATE 8094603fc0a3Smrg_LT_LINKER_BOILERPLATE 8095603fc0a3Smrg 8096603fc0a3Smrg# Allow CC to be a program name with arguments. 8097603fc0a3Smrglt_save_CC=$CC 8098603fc0a3Smrglt_save_CFLAGS=$CFLAGS 8099603fc0a3Smrglt_save_GCC=$GCC 8100603fc0a3SmrgGCC= 8101603fc0a3SmrgCC=${RC-"windres"} 8102603fc0a3SmrgCFLAGS= 8103603fc0a3Smrgcompiler=$CC 8104603fc0a3Smrg_LT_TAGVAR(compiler, $1)=$CC 8105603fc0a3Smrg_LT_CC_BASENAME([$compiler]) 8106603fc0a3Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8107603fc0a3Smrg 8108603fc0a3Smrgif test -n "$compiler"; then 8109603fc0a3Smrg : 8110603fc0a3Smrg _LT_CONFIG($1) 8111603fc0a3Smrgfi 8112603fc0a3Smrg 8113603fc0a3SmrgGCC=$lt_save_GCC 8114603fc0a3SmrgAC_LANG_RESTORE 8115603fc0a3SmrgCC=$lt_save_CC 8116603fc0a3SmrgCFLAGS=$lt_save_CFLAGS 8117603fc0a3Smrg])# _LT_LANG_RC_CONFIG 8118603fc0a3Smrg 8119603fc0a3Smrg 8120603fc0a3Smrg# LT_PROG_GCJ 8121603fc0a3Smrg# ----------- 8122603fc0a3SmrgAC_DEFUN([LT_PROG_GCJ], 8123603fc0a3Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8124603fc0a3Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8125603fc0a3Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8126603fc0a3Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8127603fc0a3Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8128603fc0a3Smrg]) 8129603fc0a3Smrg 8130603fc0a3Smrg# Old name: 8131603fc0a3SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8132603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 8133603fc0a3Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8134603fc0a3Smrg 8135603fc0a3Smrg 8136603fc0a3Smrg# LT_PROG_GO 8137603fc0a3Smrg# ---------- 8138603fc0a3SmrgAC_DEFUN([LT_PROG_GO], 8139603fc0a3Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8140603fc0a3Smrg]) 8141603fc0a3Smrg 8142603fc0a3Smrg 8143603fc0a3Smrg# LT_PROG_RC 8144603fc0a3Smrg# ---------- 8145603fc0a3SmrgAC_DEFUN([LT_PROG_RC], 8146603fc0a3Smrg[AC_CHECK_TOOL(RC, windres,) 8147603fc0a3Smrg]) 8148603fc0a3Smrg 8149603fc0a3Smrg# Old name: 8150603fc0a3SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8151603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 8152603fc0a3Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8153603fc0a3Smrg 8154603fc0a3Smrg 8155603fc0a3Smrg# _LT_DECL_EGREP 8156603fc0a3Smrg# -------------- 8157603fc0a3Smrg# If we don't have a new enough Autoconf to choose the best grep 8158603fc0a3Smrg# available, choose the one first in the user's PATH. 8159603fc0a3Smrgm4_defun([_LT_DECL_EGREP], 8160603fc0a3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8161603fc0a3SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8162603fc0a3Smrgtest -z "$GREP" && GREP=grep 8163603fc0a3Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8164603fc0a3Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8165603fc0a3Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8166603fc0a3Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8167603fc0a3SmrgAC_SUBST([GREP]) 8168603fc0a3Smrg]) 8169603fc0a3Smrg 8170603fc0a3Smrg 8171603fc0a3Smrg# _LT_DECL_OBJDUMP 8172603fc0a3Smrg# -------------- 8173603fc0a3Smrg# If we don't have a new enough Autoconf to choose the best objdump 8174603fc0a3Smrg# available, choose the one first in the user's PATH. 8175603fc0a3Smrgm4_defun([_LT_DECL_OBJDUMP], 8176603fc0a3Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8177603fc0a3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8178603fc0a3Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8179603fc0a3SmrgAC_SUBST([OBJDUMP]) 8180603fc0a3Smrg]) 8181603fc0a3Smrg 8182603fc0a3Smrg# _LT_DECL_DLLTOOL 8183603fc0a3Smrg# ---------------- 8184603fc0a3Smrg# Ensure DLLTOOL variable is set. 8185603fc0a3Smrgm4_defun([_LT_DECL_DLLTOOL], 8186603fc0a3Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8187603fc0a3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8188603fc0a3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8189603fc0a3SmrgAC_SUBST([DLLTOOL]) 8190603fc0a3Smrg]) 8191603fc0a3Smrg 8192603fc0a3Smrg# _LT_DECL_SED 8193603fc0a3Smrg# ------------ 8194603fc0a3Smrg# Check for a fully-functional sed program, that truncates 8195603fc0a3Smrg# as few characters as possible. Prefer GNU sed if found. 8196603fc0a3Smrgm4_defun([_LT_DECL_SED], 8197603fc0a3Smrg[AC_PROG_SED 8198603fc0a3Smrgtest -z "$SED" && SED=sed 8199603fc0a3SmrgXsed="$SED -e 1s/^X//" 8200603fc0a3Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8201603fc0a3Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8202603fc0a3Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8203603fc0a3Smrg])# _LT_DECL_SED 8204603fc0a3Smrg 8205603fc0a3Smrgm4_ifndef([AC_PROG_SED], [ 8206603fc0a3Smrg############################################################ 8207603fc0a3Smrg# NOTE: This macro has been submitted for inclusion into # 8208603fc0a3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8209603fc0a3Smrg# a released version of Autoconf we should remove this # 8210603fc0a3Smrg# macro and use it instead. # 8211603fc0a3Smrg############################################################ 8212603fc0a3Smrg 8213603fc0a3Smrgm4_defun([AC_PROG_SED], 8214603fc0a3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8215603fc0a3SmrgAC_CACHE_VAL(lt_cv_path_SED, 8216603fc0a3Smrg[# Loop through the user's path and test for sed and gsed. 8217603fc0a3Smrg# Then use that list of sed's as ones to test for truncation. 8218603fc0a3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8219603fc0a3Smrgfor as_dir in $PATH 8220603fc0a3Smrgdo 8221603fc0a3Smrg IFS=$as_save_IFS 8222603fc0a3Smrg test -z "$as_dir" && as_dir=. 8223603fc0a3Smrg for lt_ac_prog in sed gsed; do 8224603fc0a3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8225603fc0a3Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8226603fc0a3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8227603fc0a3Smrg fi 8228603fc0a3Smrg done 8229603fc0a3Smrg done 8230603fc0a3Smrgdone 8231603fc0a3SmrgIFS=$as_save_IFS 8232603fc0a3Smrglt_ac_max=0 8233603fc0a3Smrglt_ac_count=0 8234603fc0a3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8235603fc0a3Smrg# along with /bin/sed that truncates output. 8236603fc0a3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8237603fc0a3Smrg test ! -f "$lt_ac_sed" && continue 8238603fc0a3Smrg cat /dev/null > conftest.in 8239603fc0a3Smrg lt_ac_count=0 8240603fc0a3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8241603fc0a3Smrg # Check for GNU sed and select it if it is found. 8242603fc0a3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8243603fc0a3Smrg lt_cv_path_SED=$lt_ac_sed 8244603fc0a3Smrg break 8245603fc0a3Smrg fi 8246603fc0a3Smrg while true; do 8247603fc0a3Smrg cat conftest.in conftest.in >conftest.tmp 8248603fc0a3Smrg mv conftest.tmp conftest.in 8249603fc0a3Smrg cp conftest.in conftest.nl 8250603fc0a3Smrg echo >>conftest.nl 8251603fc0a3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8252603fc0a3Smrg cmp -s conftest.out conftest.nl || break 8253603fc0a3Smrg # 10000 chars as input seems more than enough 8254603fc0a3Smrg test 10 -lt "$lt_ac_count" && break 8255603fc0a3Smrg lt_ac_count=`expr $lt_ac_count + 1` 8256603fc0a3Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8257603fc0a3Smrg lt_ac_max=$lt_ac_count 8258603fc0a3Smrg lt_cv_path_SED=$lt_ac_sed 8259603fc0a3Smrg fi 8260603fc0a3Smrg done 8261603fc0a3Smrgdone 8262603fc0a3Smrg]) 8263603fc0a3SmrgSED=$lt_cv_path_SED 8264603fc0a3SmrgAC_SUBST([SED]) 8265603fc0a3SmrgAC_MSG_RESULT([$SED]) 8266603fc0a3Smrg])#AC_PROG_SED 8267603fc0a3Smrg])#m4_ifndef 8268603fc0a3Smrg 8269603fc0a3Smrg# Old name: 8270603fc0a3SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8271603fc0a3Smrgdnl aclocal-1.4 backwards compatibility: 8272603fc0a3Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8273603fc0a3Smrg 8274603fc0a3Smrg 8275603fc0a3Smrg# _LT_CHECK_SHELL_FEATURES 8276603fc0a3Smrg# ------------------------ 8277603fc0a3Smrg# Find out whether the shell is Bourne or XSI compatible, 8278603fc0a3Smrg# or has some other useful features. 8279603fc0a3Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8280603fc0a3Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8281603fc0a3Smrg lt_unset=unset 8282603fc0a3Smrgelse 8283603fc0a3Smrg lt_unset=false 8284603fc0a3Smrgfi 8285603fc0a3Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8286603fc0a3Smrg 8287603fc0a3Smrg# test EBCDIC or ASCII 8288603fc0a3Smrgcase `echo X|tr X '\101'` in 8289603fc0a3Smrg A) # ASCII based system 8290603fc0a3Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8291603fc0a3Smrg lt_SP2NL='tr \040 \012' 8292603fc0a3Smrg lt_NL2SP='tr \015\012 \040\040' 8293603fc0a3Smrg ;; 8294603fc0a3Smrg *) # EBCDIC based system 8295603fc0a3Smrg lt_SP2NL='tr \100 \n' 8296603fc0a3Smrg lt_NL2SP='tr \r\n \100\100' 8297603fc0a3Smrg ;; 8298603fc0a3Smrgesac 8299603fc0a3Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8300603fc0a3Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8301603fc0a3Smrg])# _LT_CHECK_SHELL_FEATURES 8302603fc0a3Smrg 8303603fc0a3Smrg 8304603fc0a3Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8305603fc0a3Smrg# ----------------------------- 8306603fc0a3Smrg# Determine what file name conversion functions should be used by 8307603fc0a3Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8308603fc0a3Smrg# for certain cross-compile configurations and native mingw. 8309603fc0a3Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8310603fc0a3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8311603fc0a3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8312603fc0a3SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8313603fc0a3SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8314603fc0a3Smrg[case $host in 8315603fc0a3Smrg *-*-mingw* ) 8316603fc0a3Smrg case $build in 8317603fc0a3Smrg *-*-mingw* ) # actually msys 8318603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8319603fc0a3Smrg ;; 8320603fc0a3Smrg *-*-cygwin* ) 8321603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8322603fc0a3Smrg ;; 8323603fc0a3Smrg * ) # otherwise, assume *nix 8324603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8325603fc0a3Smrg ;; 8326603fc0a3Smrg esac 8327603fc0a3Smrg ;; 8328603fc0a3Smrg *-*-cygwin* ) 8329603fc0a3Smrg case $build in 8330603fc0a3Smrg *-*-mingw* ) # actually msys 8331603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8332603fc0a3Smrg ;; 8333603fc0a3Smrg *-*-cygwin* ) 8334603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8335603fc0a3Smrg ;; 8336603fc0a3Smrg * ) # otherwise, assume *nix 8337603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8338603fc0a3Smrg ;; 8339603fc0a3Smrg esac 8340603fc0a3Smrg ;; 8341603fc0a3Smrg * ) # unhandled hosts (and "normal" native builds) 8342603fc0a3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8343603fc0a3Smrg ;; 8344603fc0a3Smrgesac 8345603fc0a3Smrg]) 8346603fc0a3Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8347603fc0a3SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8348603fc0a3Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8349603fc0a3Smrg [0], [convert $build file names to $host format])dnl 8350603fc0a3Smrg 8351603fc0a3SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8352603fc0a3SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8353603fc0a3Smrg[#assume ordinary cross tools, or native build. 8354603fc0a3Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8355603fc0a3Smrgcase $host in 8356603fc0a3Smrg *-*-mingw* ) 8357603fc0a3Smrg case $build in 8358603fc0a3Smrg *-*-mingw* ) # actually msys 8359603fc0a3Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8360603fc0a3Smrg ;; 8361603fc0a3Smrg esac 8362603fc0a3Smrg ;; 8363603fc0a3Smrgesac 8364603fc0a3Smrg]) 8365603fc0a3Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8366603fc0a3SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8367603fc0a3Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8368603fc0a3Smrg [0], [convert $build files to toolchain format])dnl 8369603fc0a3Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8370