1275970Scy# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2275970Scy# 3275970Scy# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 4275970Scy# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 5275970Scy# Inc. 6275970Scy# Written by Gordon Matzigkeit, 1996 7275970Scy# 8275970Scy# This file is free software; the Free Software Foundation gives 9275970Scy# unlimited permission to copy and/or distribute it, with or without 10275970Scy# modifications, as long as this notice is preserved. 11275970Scy 12275970Scym4_define([_LT_COPYING], [dnl 13275970Scy# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 14275970Scy# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 15275970Scy# Inc. 16275970Scy# Written by Gordon Matzigkeit, 1996 17275970Scy# 18275970Scy# This file is part of GNU Libtool. 19275970Scy# 20275970Scy# GNU Libtool is free software; you can redistribute it and/or 21275970Scy# modify it under the terms of the GNU General Public License as 22275970Scy# published by the Free Software Foundation; either version 2 of 23275970Scy# the License, or (at your option) any later version. 24275970Scy# 25275970Scy# As a special exception to the GNU General Public License, 26275970Scy# if you distribute this file as part of a program or library that 27275970Scy# is built using GNU Libtool, you may include this file under the 28275970Scy# same distribution terms that you use for the rest of that program. 29275970Scy# 30275970Scy# GNU Libtool is distributed in the hope that it will be useful, 31275970Scy# but WITHOUT ANY WARRANTY; without even the implied warranty of 32275970Scy# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33275970Scy# GNU General Public License for more details. 34275970Scy# 35275970Scy# You should have received a copy of the GNU General Public License 36275970Scy# along with GNU Libtool; see the file COPYING. If not, a copy 37275970Scy# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 38275970Scy# obtained by writing to the Free Software Foundation, Inc., 39275970Scy# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 40275970Scy]) 41275970Scy 42275970Scy# serial 57 LT_INIT 43275970Scy 44275970Scy 45275970Scy# LT_PREREQ(VERSION) 46275970Scy# ------------------ 47275970Scy# Complain and exit if this libtool version is less that VERSION. 48275970Scym4_defun([LT_PREREQ], 49275970Scy[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 50275970Scy [m4_default([$3], 51275970Scy [m4_fatal([Libtool version $1 or higher is required], 52275970Scy 63)])], 53275970Scy [$2])]) 54275970Scy 55275970Scy 56275970Scy# _LT_CHECK_BUILDDIR 57275970Scy# ------------------ 58275970Scy# Complain if the absolute build directory name contains unusual characters 59275970Scym4_defun([_LT_CHECK_BUILDDIR], 60275970Scy[case `pwd` in 61275970Scy *\ * | *\ *) 62275970Scy AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 63275970Scyesac 64275970Scy]) 65275970Scy 66275970Scy 67275970Scy# LT_INIT([OPTIONS]) 68275970Scy# ------------------ 69275970ScyAC_DEFUN([LT_INIT], 70275970Scy[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 71275970ScyAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 72275970ScyAC_BEFORE([$0], [LT_LANG])dnl 73275970ScyAC_BEFORE([$0], [LT_OUTPUT])dnl 74275970ScyAC_BEFORE([$0], [LTDL_INIT])dnl 75275970Scym4_require([_LT_CHECK_BUILDDIR])dnl 76275970Scy 77275970Scydnl Autoconf doesn't catch unexpanded LT_ macros by default: 78275970Scym4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 79275970Scym4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 80275970Scydnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 81275970Scydnl unless we require an AC_DEFUNed macro: 82275970ScyAC_REQUIRE([LTOPTIONS_VERSION])dnl 83275970ScyAC_REQUIRE([LTSUGAR_VERSION])dnl 84275970ScyAC_REQUIRE([LTVERSION_VERSION])dnl 85275970ScyAC_REQUIRE([LTOBSOLETE_VERSION])dnl 86275970Scym4_require([_LT_PROG_LTMAIN])dnl 87275970Scy 88275970Scy_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 89275970Scy 90275970Scydnl Parse OPTIONS 91275970Scy_LT_SET_OPTIONS([$0], [$1]) 92275970Scy 93275970Scy# This can be used to rebuild libtool when needed 94275970ScyLIBTOOL_DEPS="$ltmain" 95275970Scy 96275970Scy# Always use our own libtool. 97275970ScyLIBTOOL='$(SHELL) $(top_builddir)/libtool' 98275970ScyAC_SUBST(LIBTOOL)dnl 99275970Scy 100275970Scy_LT_SETUP 101275970Scy 102275970Scy# Only expand once: 103275970Scym4_define([LT_INIT]) 104275970Scy])# LT_INIT 105275970Scy 106275970Scy# Old names: 107275970ScyAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 108275970ScyAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 109275970Scydnl aclocal-1.4 backwards compatibility: 110275970Scydnl AC_DEFUN([AC_PROG_LIBTOOL], []) 111275970Scydnl AC_DEFUN([AM_PROG_LIBTOOL], []) 112275970Scy 113275970Scy 114275970Scy# _LT_CC_BASENAME(CC) 115275970Scy# ------------------- 116275970Scy# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 117275970Scym4_defun([_LT_CC_BASENAME], 118275970Scy[for cc_temp in $1""; do 119275970Scy case $cc_temp in 120275970Scy compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 121275970Scy distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 122275970Scy \-*) ;; 123275970Scy *) break;; 124275970Scy esac 125275970Scydone 126275970Scycc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 127275970Scy]) 128275970Scy 129275970Scy 130275970Scy# _LT_FILEUTILS_DEFAULTS 131275970Scy# ---------------------- 132275970Scy# It is okay to use these file commands and assume they have been set 133275970Scy# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 134275970Scym4_defun([_LT_FILEUTILS_DEFAULTS], 135275970Scy[: ${CP="cp -f"} 136275970Scy: ${MV="mv -f"} 137275970Scy: ${RM="rm -f"} 138275970Scy])# _LT_FILEUTILS_DEFAULTS 139275970Scy 140275970Scy 141275970Scy# _LT_SETUP 142275970Scy# --------- 143275970Scym4_defun([_LT_SETUP], 144275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 145275970ScyAC_REQUIRE([AC_CANONICAL_BUILD])dnl 146275970ScyAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 147275970ScyAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 148275970Scy 149275970Scy_LT_DECL([], [host_alias], [0], [The host system])dnl 150275970Scy_LT_DECL([], [host], [0])dnl 151275970Scy_LT_DECL([], [host_os], [0])dnl 152275970Scydnl 153275970Scy_LT_DECL([], [build_alias], [0], [The build system])dnl 154275970Scy_LT_DECL([], [build], [0])dnl 155275970Scy_LT_DECL([], [build_os], [0])dnl 156275970Scydnl 157275970ScyAC_REQUIRE([AC_PROG_CC])dnl 158275970ScyAC_REQUIRE([LT_PATH_LD])dnl 159275970ScyAC_REQUIRE([LT_PATH_NM])dnl 160275970Scydnl 161275970ScyAC_REQUIRE([AC_PROG_LN_S])dnl 162275970Scytest -z "$LN_S" && LN_S="ln -s" 163275970Scy_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 164275970Scydnl 165275970ScyAC_REQUIRE([LT_CMD_MAX_LEN])dnl 166275970Scy_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 167275970Scy_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 168275970Scydnl 169275970Scym4_require([_LT_FILEUTILS_DEFAULTS])dnl 170275970Scym4_require([_LT_CHECK_SHELL_FEATURES])dnl 171275970Scym4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 172275970Scym4_require([_LT_CMD_RELOAD])dnl 173275970Scym4_require([_LT_CHECK_MAGIC_METHOD])dnl 174275970Scym4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 175275970Scym4_require([_LT_CMD_OLD_ARCHIVE])dnl 176275970Scym4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 177275970Scym4_require([_LT_WITH_SYSROOT])dnl 178275970Scy 179275970Scy_LT_CONFIG_LIBTOOL_INIT([ 180275970Scy# See if we are running on zsh, and set the options which allow our 181275970Scy# commands through without removal of \ escapes INIT. 182275970Scyif test -n "\${ZSH_VERSION+set}" ; then 183275970Scy setopt NO_GLOB_SUBST 184275970Scyfi 185275970Scy]) 186275970Scyif test -n "${ZSH_VERSION+set}" ; then 187275970Scy setopt NO_GLOB_SUBST 188275970Scyfi 189275970Scy 190275970Scy_LT_CHECK_OBJDIR 191275970Scy 192275970Scym4_require([_LT_TAG_COMPILER])dnl 193275970Scy 194275970Scycase $host_os in 195275970Scyaix3*) 196275970Scy # AIX sometimes has problems with the GCC collect2 program. For some 197275970Scy # reason, if we set the COLLECT_NAMES environment variable, the problems 198275970Scy # vanish in a puff of smoke. 199275970Scy if test "X${COLLECT_NAMES+set}" != Xset; then 200275970Scy COLLECT_NAMES= 201275970Scy export COLLECT_NAMES 202275970Scy fi 203275970Scy ;; 204275970Scyesac 205275970Scy 206275970Scy# Global variables: 207275970Scyofile=libtool 208275970Scycan_build_shared=yes 209275970Scy 210275970Scy# All known linkers require a `.a' archive for static linking (except MSVC, 211275970Scy# which needs '.lib'). 212275970Scylibext=a 213275970Scy 214275970Scywith_gnu_ld="$lt_cv_prog_gnu_ld" 215275970Scy 216275970Scyold_CC="$CC" 217275970Scyold_CFLAGS="$CFLAGS" 218275970Scy 219275970Scy# Set sane defaults for various variables 220275970Scytest -z "$CC" && CC=cc 221275970Scytest -z "$LTCC" && LTCC=$CC 222275970Scytest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 223275970Scytest -z "$LD" && LD=ld 224275970Scytest -z "$ac_objext" && ac_objext=o 225275970Scy 226275970Scy_LT_CC_BASENAME([$compiler]) 227275970Scy 228275970Scy# Only perform the check for file, if the check method requires it 229275970Scytest -z "$MAGIC_CMD" && MAGIC_CMD=file 230275970Scycase $deplibs_check_method in 231275970Scyfile_magic*) 232275970Scy if test "$file_magic_cmd" = '$MAGIC_CMD'; then 233275970Scy _LT_PATH_MAGIC 234275970Scy fi 235275970Scy ;; 236275970Scyesac 237275970Scy 238275970Scy# Use C for the default configuration in the libtool script 239275970ScyLT_SUPPORTED_TAG([CC]) 240275970Scy_LT_LANG_C_CONFIG 241275970Scy_LT_LANG_DEFAULT_CONFIG 242275970Scy_LT_CONFIG_COMMANDS 243275970Scy])# _LT_SETUP 244275970Scy 245275970Scy 246275970Scy# _LT_PREPARE_SED_QUOTE_VARS 247275970Scy# -------------------------- 248275970Scy# Define a few sed substitution that help us do robust quoting. 249275970Scym4_defun([_LT_PREPARE_SED_QUOTE_VARS], 250275970Scy[# Backslashify metacharacters that are still active within 251275970Scy# double-quoted strings. 252275970Scysed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 253275970Scy 254275970Scy# Same as above, but do not quote variable references. 255275970Scydouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 256275970Scy 257275970Scy# Sed substitution to delay expansion of an escaped shell variable in a 258275970Scy# double_quote_subst'ed string. 259275970Scydelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 260275970Scy 261275970Scy# Sed substitution to delay expansion of an escaped single quote. 262275970Scydelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 263275970Scy 264275970Scy# Sed substitution to avoid accidental globbing in evaled expressions 265275970Scyno_glob_subst='s/\*/\\\*/g' 266275970Scy]) 267275970Scy 268275970Scy# _LT_PROG_LTMAIN 269275970Scy# --------------- 270275970Scy# Note that this code is called both from `configure', and `config.status' 271275970Scy# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 272275970Scy# `config.status' has no value for ac_aux_dir unless we are using Automake, 273275970Scy# so we pass a copy along to make sure it has a sensible value anyway. 274275970Scym4_defun([_LT_PROG_LTMAIN], 275275970Scy[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 276275970Scy_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 277275970Scyltmain="$ac_aux_dir/ltmain.sh" 278275970Scy])# _LT_PROG_LTMAIN 279275970Scy 280275970Scy 281275970Scy## ------------------------------------- ## 282275970Scy## Accumulate code for creating libtool. ## 283275970Scy## ------------------------------------- ## 284275970Scy 285275970Scy# So that we can recreate a full libtool script including additional 286275970Scy# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 287275970Scy# in macros and then make a single call at the end using the `libtool' 288275970Scy# label. 289275970Scy 290275970Scy 291275970Scy# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 292275970Scy# ---------------------------------------- 293275970Scy# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 294275970Scym4_define([_LT_CONFIG_LIBTOOL_INIT], 295275970Scy[m4_ifval([$1], 296275970Scy [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 297275970Scy [$1 298275970Scy])])]) 299275970Scy 300275970Scy# Initialize. 301275970Scym4_define([_LT_OUTPUT_LIBTOOL_INIT]) 302275970Scy 303275970Scy 304275970Scy# _LT_CONFIG_LIBTOOL([COMMANDS]) 305275970Scy# ------------------------------ 306275970Scy# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 307275970Scym4_define([_LT_CONFIG_LIBTOOL], 308275970Scy[m4_ifval([$1], 309275970Scy [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 310275970Scy [$1 311275970Scy])])]) 312275970Scy 313275970Scy# Initialize. 314275970Scym4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 315275970Scy 316275970Scy 317275970Scy# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 318275970Scy# ----------------------------------------------------- 319275970Scym4_defun([_LT_CONFIG_SAVE_COMMANDS], 320275970Scy[_LT_CONFIG_LIBTOOL([$1]) 321275970Scy_LT_CONFIG_LIBTOOL_INIT([$2]) 322275970Scy]) 323275970Scy 324275970Scy 325275970Scy# _LT_FORMAT_COMMENT([COMMENT]) 326275970Scy# ----------------------------- 327275970Scy# Add leading comment marks to the start of each line, and a trailing 328275970Scy# full-stop to the whole comment if one is not present already. 329275970Scym4_define([_LT_FORMAT_COMMENT], 330275970Scy[m4_ifval([$1], [ 331275970Scym4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 332275970Scy [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 333275970Scy)]) 334275970Scy 335275970Scy 336275970Scy 337275970Scy## ------------------------ ## 338275970Scy## FIXME: Eliminate VARNAME ## 339275970Scy## ------------------------ ## 340275970Scy 341275970Scy 342275970Scy# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343275970Scy# ------------------------------------------------------------------- 344275970Scy# CONFIGNAME is the name given to the value in the libtool script. 345275970Scy# VARNAME is the (base) name used in the configure script. 346275970Scy# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347275970Scy# VARNAME. Any other value will be used directly. 348275970Scym4_define([_LT_DECL], 349275970Scy[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350275970Scy [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351275970Scy [m4_ifval([$1], [$1], [$2])]) 352275970Scy lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353275970Scy m4_ifval([$4], 354275970Scy [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355275970Scy lt_dict_add_subkey([lt_decl_dict], [$2], 356275970Scy [tagged?], [m4_ifval([$5], [yes], [no])])]) 357275970Scy]) 358275970Scy 359275970Scy 360275970Scy# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361275970Scy# -------------------------------------------------------- 362275970Scym4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363275970Scy 364275970Scy 365275970Scy# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366275970Scy# ------------------------------------------------ 367275970Scym4_define([lt_decl_tag_varnames], 368275970Scy[_lt_decl_filter([tagged?], [yes], $@)]) 369275970Scy 370275970Scy 371275970Scy# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372275970Scy# --------------------------------------------------------- 373275970Scym4_define([_lt_decl_filter], 374275970Scy[m4_case([$#], 375275970Scy [0], [m4_fatal([$0: too few arguments: $#])], 376275970Scy [1], [m4_fatal([$0: too few arguments: $#: $1])], 377275970Scy [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378275970Scy [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379275970Scy [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380275970Scy]) 381275970Scy 382275970Scy 383275970Scy# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384275970Scy# -------------------------------------------------- 385275970Scym4_define([lt_decl_quote_varnames], 386275970Scy[_lt_decl_filter([value], [1], $@)]) 387275970Scy 388275970Scy 389275970Scy# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390275970Scy# --------------------------------------------------- 391275970Scym4_define([lt_decl_dquote_varnames], 392275970Scy[_lt_decl_filter([value], [2], $@)]) 393275970Scy 394275970Scy 395275970Scy# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396275970Scy# --------------------------------------------------- 397275970Scym4_define([lt_decl_varnames_tagged], 398275970Scy[m4_assert([$# <= 2])dnl 399275970Scy_$0(m4_quote(m4_default([$1], [[, ]])), 400275970Scy m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401275970Scy m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402275970Scym4_define([_lt_decl_varnames_tagged], 403275970Scy[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404275970Scy 405275970Scy 406275970Scy# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407275970Scy# ------------------------------------------------ 408275970Scym4_define([lt_decl_all_varnames], 409275970Scy[_$0(m4_quote(m4_default([$1], [[, ]])), 410275970Scy m4_if([$2], [], 411275970Scy m4_quote(lt_decl_varnames), 412275970Scy m4_quote(m4_shift($@))))[]dnl 413275970Scy]) 414275970Scym4_define([_lt_decl_all_varnames], 415275970Scy[lt_join($@, lt_decl_varnames_tagged([$1], 416275970Scy lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417275970Scy]) 418275970Scy 419275970Scy 420275970Scy# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421275970Scy# ------------------------------------ 422275970Scy# Quote a variable value, and forward it to `config.status' so that its 423275970Scy# declaration there will have the same value as in `configure'. VARNAME 424275970Scy# must have a single quote delimited value for this to work. 425275970Scym4_define([_LT_CONFIG_STATUS_DECLARE], 426275970Scy[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 427275970Scy 428275970Scy 429275970Scy# _LT_CONFIG_STATUS_DECLARATIONS 430275970Scy# ------------------------------ 431275970Scy# We delimit libtool config variables with single quotes, so when 432275970Scy# we write them to config.status, we have to be sure to quote all 433275970Scy# embedded single quotes properly. In configure, this macro expands 434275970Scy# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435275970Scy# 436275970Scy# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 437275970Scym4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438275970Scy[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439275970Scy [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440275970Scy 441275970Scy 442275970Scy# _LT_LIBTOOL_TAGS 443275970Scy# ---------------- 444275970Scy# Output comment and list of tags supported by the script 445275970Scym4_defun([_LT_LIBTOOL_TAGS], 446275970Scy[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447275970Scyavailable_tags="_LT_TAGS"dnl 448275970Scy]) 449275970Scy 450275970Scy 451275970Scy# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452275970Scy# ----------------------------------- 453275970Scy# Extract the dictionary values for VARNAME (optionally with TAG) and 454275970Scy# expand to a commented shell variable setting: 455275970Scy# 456275970Scy# # Some comment about what VAR is for. 457275970Scy# visible_name=$lt_internal_name 458275970Scym4_define([_LT_LIBTOOL_DECLARE], 459275970Scy[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460275970Scy [description])))[]dnl 461275970Scym4_pushdef([_libtool_name], 462275970Scy m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463275970Scym4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464275970Scy [0], [_libtool_name=[$]$1], 465275970Scy [1], [_libtool_name=$lt_[]$1], 466275970Scy [2], [_libtool_name=$lt_[]$1], 467275970Scy [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468275970Scym4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469275970Scy]) 470275970Scy 471275970Scy 472275970Scy# _LT_LIBTOOL_CONFIG_VARS 473275970Scy# ----------------------- 474275970Scy# Produce commented declarations of non-tagged libtool config variables 475275970Scy# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476275970Scy# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477275970Scy# section) are produced by _LT_LIBTOOL_TAG_VARS. 478275970Scym4_defun([_LT_LIBTOOL_CONFIG_VARS], 479275970Scy[m4_foreach([_lt_var], 480275970Scy m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481275970Scy [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482275970Scy 483275970Scy 484275970Scy# _LT_LIBTOOL_TAG_VARS(TAG) 485275970Scy# ------------------------- 486275970Scym4_define([_LT_LIBTOOL_TAG_VARS], 487275970Scy[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488275970Scy [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489275970Scy 490275970Scy 491275970Scy# _LT_TAGVAR(VARNAME, [TAGNAME]) 492275970Scy# ------------------------------ 493275970Scym4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494275970Scy 495275970Scy 496275970Scy# _LT_CONFIG_COMMANDS 497275970Scy# ------------------- 498275970Scy# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499275970Scy# variables for single and double quote escaping we saved from calls 500275970Scy# to _LT_DECL, we can put quote escaped variables declarations 501275970Scy# into `config.status', and then the shell code to quote escape them in 502275970Scy# for loops in `config.status'. Finally, any additional code accumulated 503275970Scy# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504275970Scym4_defun([_LT_CONFIG_COMMANDS], 505275970Scy[AC_PROVIDE_IFELSE([LT_OUTPUT], 506275970Scy dnl If the libtool generation code has been placed in $CONFIG_LT, 507275970Scy dnl instead of duplicating it all over again into config.status, 508275970Scy dnl then we will have config.status run $CONFIG_LT later, so it 509275970Scy dnl needs to know what name is stored there: 510275970Scy [AC_CONFIG_COMMANDS([libtool], 511275970Scy [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512275970Scy dnl If the libtool generation code is destined for config.status, 513275970Scy dnl expand the accumulated commands and init code now: 514275970Scy [AC_CONFIG_COMMANDS([libtool], 515275970Scy [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516275970Scy])#_LT_CONFIG_COMMANDS 517275970Scy 518275970Scy 519275970Scy# Initialize. 520275970Scym4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521275970Scy[ 522275970Scy 523275970Scy# The HP-UX ksh and POSIX shell print the target directory to stdout 524275970Scy# if CDPATH is set. 525275970Scy(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526275970Scy 527275970Scysed_quote_subst='$sed_quote_subst' 528275970Scydouble_quote_subst='$double_quote_subst' 529275970Scydelay_variable_subst='$delay_variable_subst' 530275970Scy_LT_CONFIG_STATUS_DECLARATIONS 531275970ScyLTCC='$LTCC' 532275970ScyLTCFLAGS='$LTCFLAGS' 533275970Scycompiler='$compiler_DEFAULT' 534275970Scy 535275970Scy# A function that is used when there is no print builtin or printf. 536275970Scyfunc_fallback_echo () 537275970Scy{ 538275970Scy eval 'cat <<_LTECHO_EOF 539275970Scy\$[]1 540275970Scy_LTECHO_EOF' 541275970Scy} 542275970Scy 543275970Scy# Quote evaled strings. 544275970Scyfor var in lt_decl_all_varnames([[ \ 545275970Scy]], lt_decl_quote_varnames); do 546275970Scy case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 547275970Scy *[[\\\\\\\`\\"\\\$]]*) 548275970Scy eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 549275970Scy ;; 550275970Scy *) 551275970Scy eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 552275970Scy ;; 553275970Scy esac 554275970Scydone 555275970Scy 556275970Scy# Double-quote double-evaled strings. 557275970Scyfor var in lt_decl_all_varnames([[ \ 558275970Scy]], lt_decl_dquote_varnames); do 559275970Scy case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 560275970Scy *[[\\\\\\\`\\"\\\$]]*) 561275970Scy eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 562275970Scy ;; 563275970Scy *) 564275970Scy eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 565275970Scy ;; 566275970Scy esac 567275970Scydone 568275970Scy 569275970Scy_LT_OUTPUT_LIBTOOL_INIT 570275970Scy]) 571275970Scy 572275970Scy# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 573275970Scy# ------------------------------------ 574275970Scy# Generate a child script FILE with all initialization necessary to 575275970Scy# reuse the environment learned by the parent script, and make the 576275970Scy# file executable. If COMMENT is supplied, it is inserted after the 577275970Scy# `#!' sequence but before initialization text begins. After this 578275970Scy# macro, additional text can be appended to FILE to form the body of 579275970Scy# the child script. The macro ends with non-zero status if the 580275970Scy# file could not be fully written (such as if the disk is full). 581275970Scym4_ifdef([AS_INIT_GENERATED], 582275970Scy[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 583275970Scy[m4_defun([_LT_GENERATED_FILE_INIT], 584275970Scy[m4_require([AS_PREPARE])]dnl 585275970Scy[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 586275970Scy[lt_write_fail=0 587275970Scycat >$1 <<_ASEOF || lt_write_fail=1 588275970Scy#! $SHELL 589275970Scy# Generated by $as_me. 590275970Scy$2 591275970ScySHELL=\${CONFIG_SHELL-$SHELL} 592275970Scyexport SHELL 593275970Scy_ASEOF 594275970Scycat >>$1 <<\_ASEOF || lt_write_fail=1 595275970ScyAS_SHELL_SANITIZE 596275970Scy_AS_PREPARE 597275970Scyexec AS_MESSAGE_FD>&1 598275970Scy_ASEOF 599275970Scytest $lt_write_fail = 0 && chmod +x $1[]dnl 600275970Scym4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 601275970Scy 602275970Scy# LT_OUTPUT 603275970Scy# --------- 604275970Scy# This macro allows early generation of the libtool script (before 605275970Scy# AC_OUTPUT is called), incase it is used in configure for compilation 606275970Scy# tests. 607275970ScyAC_DEFUN([LT_OUTPUT], 608275970Scy[: ${CONFIG_LT=./config.lt} 609275970ScyAC_MSG_NOTICE([creating $CONFIG_LT]) 610275970Scy_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 611275970Scy[# Run this file to recreate a libtool stub with the current configuration.]) 612275970Scy 613275970Scycat >>"$CONFIG_LT" <<\_LTEOF 614275970Scylt_cl_silent=false 615275970Scyexec AS_MESSAGE_LOG_FD>>config.log 616275970Scy{ 617275970Scy echo 618275970Scy AS_BOX([Running $as_me.]) 619275970Scy} >&AS_MESSAGE_LOG_FD 620275970Scy 621275970Scylt_cl_help="\ 622275970Scy\`$as_me' creates a local libtool stub from the current configuration, 623275970Scyfor use in further configure time tests before the real libtool is 624275970Scygenerated. 625275970Scy 626275970ScyUsage: $[0] [[OPTIONS]] 627275970Scy 628275970Scy -h, --help print this help, then exit 629275970Scy -V, --version print version number, then exit 630275970Scy -q, --quiet do not print progress messages 631275970Scy -d, --debug don't remove temporary files 632275970Scy 633275970ScyReport bugs to <bug-libtool@gnu.org>." 634275970Scy 635275970Scylt_cl_version="\ 636275970Scym4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 637275970Scym4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 638275970Scyconfigured by $[0], generated by m4_PACKAGE_STRING. 639275970Scy 640275970ScyCopyright (C) 2010 Free Software Foundation, Inc. 641275970ScyThis config.lt script is free software; the Free Software Foundation 642275970Scygives unlimited permision to copy, distribute and modify it." 643275970Scy 644275970Scywhile test $[#] != 0 645275970Scydo 646275970Scy case $[1] in 647275970Scy --version | --v* | -V ) 648275970Scy echo "$lt_cl_version"; exit 0 ;; 649275970Scy --help | --h* | -h ) 650275970Scy echo "$lt_cl_help"; exit 0 ;; 651275970Scy --debug | --d* | -d ) 652275970Scy debug=: ;; 653275970Scy --quiet | --q* | --silent | --s* | -q ) 654275970Scy lt_cl_silent=: ;; 655275970Scy 656275970Scy -*) AC_MSG_ERROR([unrecognized option: $[1] 657275970ScyTry \`$[0] --help' for more information.]) ;; 658275970Scy 659275970Scy *) AC_MSG_ERROR([unrecognized argument: $[1] 660275970ScyTry \`$[0] --help' for more information.]) ;; 661275970Scy esac 662275970Scy shift 663275970Scydone 664275970Scy 665275970Scyif $lt_cl_silent; then 666275970Scy exec AS_MESSAGE_FD>/dev/null 667275970Scyfi 668275970Scy_LTEOF 669275970Scy 670275970Scycat >>"$CONFIG_LT" <<_LTEOF 671275970Scy_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 672275970Scy_LTEOF 673275970Scy 674275970Scycat >>"$CONFIG_LT" <<\_LTEOF 675275970ScyAC_MSG_NOTICE([creating $ofile]) 676275970Scy_LT_OUTPUT_LIBTOOL_COMMANDS 677275970ScyAS_EXIT(0) 678275970Scy_LTEOF 679275970Scychmod +x "$CONFIG_LT" 680275970Scy 681275970Scy# configure is writing to config.log, but config.lt does its own redirection, 682275970Scy# appending to config.log, which fails on DOS, as config.log is still kept 683275970Scy# open by configure. Here we exec the FD to /dev/null, effectively closing 684275970Scy# config.log, so it can be properly (re)opened and appended to by config.lt. 685275970Scylt_cl_success=: 686275970Scytest "$silent" = yes && 687275970Scy lt_config_lt_args="$lt_config_lt_args --quiet" 688275970Scyexec AS_MESSAGE_LOG_FD>/dev/null 689275970Scy$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 690275970Scyexec AS_MESSAGE_LOG_FD>>config.log 691275970Scy$lt_cl_success || AS_EXIT(1) 692275970Scy])# LT_OUTPUT 693275970Scy 694275970Scy 695275970Scy# _LT_CONFIG(TAG) 696275970Scy# --------------- 697275970Scy# If TAG is the built-in tag, create an initial libtool script with a 698275970Scy# default configuration from the untagged config vars. Otherwise add code 699275970Scy# to config.status for appending the configuration named by TAG from the 700275970Scy# matching tagged config vars. 701275970Scym4_defun([_LT_CONFIG], 702275970Scy[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 703275970Scy_LT_CONFIG_SAVE_COMMANDS([ 704275970Scy m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 705275970Scy m4_if(_LT_TAG, [C], [ 706275970Scy # See if we are running on zsh, and set the options which allow our 707275970Scy # commands through without removal of \ escapes. 708275970Scy if test -n "${ZSH_VERSION+set}" ; then 709275970Scy setopt NO_GLOB_SUBST 710275970Scy fi 711275970Scy 712275970Scy cfgfile="${ofile}T" 713275970Scy trap "$RM \"$cfgfile\"; exit 1" 1 2 15 714275970Scy $RM "$cfgfile" 715275970Scy 716275970Scy cat <<_LT_EOF >> "$cfgfile" 717275970Scy#! $SHELL 718275970Scy 719275970Scy# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 720275970Scy# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 721275970Scy# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 722275970Scy# NOTE: Changes made to this file will be lost: look at ltmain.sh. 723275970Scy# 724275970Scy_LT_COPYING 725275970Scy_LT_LIBTOOL_TAGS 726275970Scy 727275970Scy# ### BEGIN LIBTOOL CONFIG 728275970Scy_LT_LIBTOOL_CONFIG_VARS 729275970Scy_LT_LIBTOOL_TAG_VARS 730275970Scy# ### END LIBTOOL CONFIG 731275970Scy 732275970Scy_LT_EOF 733275970Scy 734275970Scy case $host_os in 735275970Scy aix3*) 736275970Scy cat <<\_LT_EOF >> "$cfgfile" 737275970Scy# AIX sometimes has problems with the GCC collect2 program. For some 738275970Scy# reason, if we set the COLLECT_NAMES environment variable, the problems 739275970Scy# vanish in a puff of smoke. 740275970Scyif test "X${COLLECT_NAMES+set}" != Xset; then 741275970Scy COLLECT_NAMES= 742275970Scy export COLLECT_NAMES 743275970Scyfi 744275970Scy_LT_EOF 745275970Scy ;; 746275970Scy esac 747275970Scy 748275970Scy _LT_PROG_LTMAIN 749275970Scy 750275970Scy # We use sed instead of cat because bash on DJGPP gets confused if 751275970Scy # if finds mixed CR/LF and LF-only lines. Since sed operates in 752275970Scy # text mode, it properly converts lines to CR/LF. This bash problem 753275970Scy # is reportedly fixed, but why not run on old versions too? 754275970Scy sed '$q' "$ltmain" >> "$cfgfile" \ 755275970Scy || (rm -f "$cfgfile"; exit 1) 756275970Scy 757275970Scy _LT_PROG_REPLACE_SHELLFNS 758275970Scy 759275970Scy mv -f "$cfgfile" "$ofile" || 760275970Scy (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 761275970Scy chmod +x "$ofile" 762275970Scy], 763275970Scy[cat <<_LT_EOF >> "$ofile" 764275970Scy 765275970Scydnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 766275970Scydnl in a comment (ie after a #). 767275970Scy# ### BEGIN LIBTOOL TAG CONFIG: $1 768275970Scy_LT_LIBTOOL_TAG_VARS(_LT_TAG) 769275970Scy# ### END LIBTOOL TAG CONFIG: $1 770275970Scy_LT_EOF 771275970Scy])dnl /m4_if 772275970Scy], 773275970Scy[m4_if([$1], [], [ 774275970Scy PACKAGE='$PACKAGE' 775275970Scy VERSION='$VERSION' 776275970Scy TIMESTAMP='$TIMESTAMP' 777275970Scy RM='$RM' 778275970Scy ofile='$ofile'], []) 779275970Scy])dnl /_LT_CONFIG_SAVE_COMMANDS 780275970Scy])# _LT_CONFIG 781275970Scy 782275970Scy 783275970Scy# LT_SUPPORTED_TAG(TAG) 784275970Scy# --------------------- 785275970Scy# Trace this macro to discover what tags are supported by the libtool 786275970Scy# --tag option, using: 787275970Scy# autoconf --trace 'LT_SUPPORTED_TAG:$1' 788275970ScyAC_DEFUN([LT_SUPPORTED_TAG], []) 789275970Scy 790275970Scy 791275970Scy# C support is built-in for now 792275970Scym4_define([_LT_LANG_C_enabled], []) 793275970Scym4_define([_LT_TAGS], []) 794275970Scy 795275970Scy 796275970Scy# LT_LANG(LANG) 797275970Scy# ------------- 798275970Scy# Enable libtool support for the given language if not already enabled. 799275970ScyAC_DEFUN([LT_LANG], 800275970Scy[AC_BEFORE([$0], [LT_OUTPUT])dnl 801275970Scym4_case([$1], 802275970Scy [C], [_LT_LANG(C)], 803275970Scy [C++], [_LT_LANG(CXX)], 804275970Scy [Java], [_LT_LANG(GCJ)], 805275970Scy [Fortran 77], [_LT_LANG(F77)], 806275970Scy [Fortran], [_LT_LANG(FC)], 807275970Scy [Windows Resource], [_LT_LANG(RC)], 808275970Scy [m4_ifdef([_LT_LANG_]$1[_CONFIG], 809275970Scy [_LT_LANG($1)], 810275970Scy [m4_fatal([$0: unsupported language: "$1"])])])dnl 811275970Scy])# LT_LANG 812275970Scy 813275970Scy 814275970Scy# _LT_LANG(LANGNAME) 815275970Scy# ------------------ 816275970Scym4_defun([_LT_LANG], 817275970Scy[m4_ifdef([_LT_LANG_]$1[_enabled], [], 818275970Scy [LT_SUPPORTED_TAG([$1])dnl 819275970Scy m4_append([_LT_TAGS], [$1 ])dnl 820275970Scy m4_define([_LT_LANG_]$1[_enabled], [])dnl 821275970Scy _LT_LANG_$1_CONFIG($1)])dnl 822275970Scy])# _LT_LANG 823275970Scy 824275970Scy 825275970Scy# _LT_LANG_DEFAULT_CONFIG 826275970Scy# ----------------------- 827275970Scym4_defun([_LT_LANG_DEFAULT_CONFIG], 828275970Scy[AC_PROVIDE_IFELSE([AC_PROG_CXX], 829275970Scy [LT_LANG(CXX)], 830275970Scy [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 831275970Scy 832275970ScyAC_PROVIDE_IFELSE([AC_PROG_F77], 833275970Scy [LT_LANG(F77)], 834275970Scy [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 835275970Scy 836275970ScyAC_PROVIDE_IFELSE([AC_PROG_FC], 837275970Scy [LT_LANG(FC)], 838275970Scy [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 839275970Scy 840275970Scydnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 841275970Scydnl pulling things in needlessly. 842275970ScyAC_PROVIDE_IFELSE([AC_PROG_GCJ], 843275970Scy [LT_LANG(GCJ)], 844275970Scy [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 845275970Scy [LT_LANG(GCJ)], 846275970Scy [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 847275970Scy [LT_LANG(GCJ)], 848275970Scy [m4_ifdef([AC_PROG_GCJ], 849275970Scy [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 850275970Scy m4_ifdef([A][M_PROG_GCJ], 851275970Scy [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 852275970Scy m4_ifdef([LT_PROG_GCJ], 853275970Scy [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 854275970Scy 855275970ScyAC_PROVIDE_IFELSE([LT_PROG_RC], 856275970Scy [LT_LANG(RC)], 857275970Scy [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 858275970Scy])# _LT_LANG_DEFAULT_CONFIG 859275970Scy 860275970Scy# Obsolete macros: 861275970ScyAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 862275970ScyAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 863275970ScyAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 864275970ScyAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 865275970ScyAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 866275970Scydnl aclocal-1.4 backwards compatibility: 867275970Scydnl AC_DEFUN([AC_LIBTOOL_CXX], []) 868275970Scydnl AC_DEFUN([AC_LIBTOOL_F77], []) 869275970Scydnl AC_DEFUN([AC_LIBTOOL_FC], []) 870275970Scydnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 871275970Scydnl AC_DEFUN([AC_LIBTOOL_RC], []) 872275970Scy 873275970Scy 874275970Scy# _LT_TAG_COMPILER 875275970Scy# ---------------- 876275970Scym4_defun([_LT_TAG_COMPILER], 877275970Scy[AC_REQUIRE([AC_PROG_CC])dnl 878275970Scy 879275970Scy_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 880275970Scy_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 881275970Scy_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 882275970Scy_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 883275970Scy 884275970Scy# If no C compiler was specified, use CC. 885275970ScyLTCC=${LTCC-"$CC"} 886275970Scy 887275970Scy# If no C compiler flags were specified, use CFLAGS. 888275970ScyLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 889275970Scy 890275970Scy# Allow CC to be a program name with arguments. 891275970Scycompiler=$CC 892275970Scy])# _LT_TAG_COMPILER 893275970Scy 894275970Scy 895275970Scy# _LT_COMPILER_BOILERPLATE 896275970Scy# ------------------------ 897275970Scy# Check for compiler boilerplate output or warnings with 898275970Scy# the simple compiler test code. 899275970Scym4_defun([_LT_COMPILER_BOILERPLATE], 900275970Scy[m4_require([_LT_DECL_SED])dnl 901275970Scyac_outfile=conftest.$ac_objext 902275970Scyecho "$lt_simple_compile_test_code" >conftest.$ac_ext 903275970Scyeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 904275970Scy_lt_compiler_boilerplate=`cat conftest.err` 905275970Scy$RM conftest* 906275970Scy])# _LT_COMPILER_BOILERPLATE 907275970Scy 908275970Scy 909275970Scy# _LT_LINKER_BOILERPLATE 910275970Scy# ---------------------- 911275970Scy# Check for linker boilerplate output or warnings with 912275970Scy# the simple link test code. 913275970Scym4_defun([_LT_LINKER_BOILERPLATE], 914275970Scy[m4_require([_LT_DECL_SED])dnl 915275970Scyac_outfile=conftest.$ac_objext 916275970Scyecho "$lt_simple_link_test_code" >conftest.$ac_ext 917275970Scyeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 918275970Scy_lt_linker_boilerplate=`cat conftest.err` 919275970Scy$RM -r conftest* 920275970Scy])# _LT_LINKER_BOILERPLATE 921275970Scy 922275970Scy# _LT_REQUIRED_DARWIN_CHECKS 923275970Scy# ------------------------- 924275970Scym4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 925275970Scy case $host_os in 926275970Scy rhapsody* | darwin*) 927275970Scy AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 928275970Scy AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 929275970Scy AC_CHECK_TOOL([LIPO], [lipo], [:]) 930275970Scy AC_CHECK_TOOL([OTOOL], [otool], [:]) 931275970Scy AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 932275970Scy _LT_DECL([], [DSYMUTIL], [1], 933275970Scy [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 934275970Scy _LT_DECL([], [NMEDIT], [1], 935275970Scy [Tool to change global to local symbols on Mac OS X]) 936275970Scy _LT_DECL([], [LIPO], [1], 937275970Scy [Tool to manipulate fat objects and archives on Mac OS X]) 938275970Scy _LT_DECL([], [OTOOL], [1], 939275970Scy [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 940275970Scy _LT_DECL([], [OTOOL64], [1], 941275970Scy [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 942275970Scy 943275970Scy AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 944275970Scy [lt_cv_apple_cc_single_mod=no 945275970Scy if test -z "${LT_MULTI_MODULE}"; then 946275970Scy # By default we will add the -single_module flag. You can override 947275970Scy # by either setting the environment variable LT_MULTI_MODULE 948275970Scy # non-empty at configure time, or by adding -multi_module to the 949275970Scy # link flags. 950275970Scy rm -rf libconftest.dylib* 951275970Scy echo "int foo(void){return 1;}" > conftest.c 952275970Scy echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 953275970Scy-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 954275970Scy $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 955275970Scy -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 956275970Scy _lt_result=$? 957275970Scy if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 958275970Scy lt_cv_apple_cc_single_mod=yes 959275970Scy else 960275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 961275970Scy fi 962275970Scy rm -rf libconftest.dylib* 963275970Scy rm -f conftest.* 964275970Scy fi]) 965275970Scy AC_CACHE_CHECK([for -exported_symbols_list linker flag], 966275970Scy [lt_cv_ld_exported_symbols_list], 967275970Scy [lt_cv_ld_exported_symbols_list=no 968275970Scy save_LDFLAGS=$LDFLAGS 969275970Scy echo "_main" > conftest.sym 970275970Scy LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 971275970Scy AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 972275970Scy [lt_cv_ld_exported_symbols_list=yes], 973275970Scy [lt_cv_ld_exported_symbols_list=no]) 974275970Scy LDFLAGS="$save_LDFLAGS" 975275970Scy ]) 976275970Scy AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 977275970Scy [lt_cv_ld_force_load=no 978275970Scy cat > conftest.c << _LT_EOF 979275970Scyint forced_loaded() { return 2;} 980275970Scy_LT_EOF 981275970Scy echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 982275970Scy $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 983275970Scy echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 984275970Scy $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 985275970Scy echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 986275970Scy $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 987275970Scy cat > conftest.c << _LT_EOF 988275970Scyint main() { return 0;} 989275970Scy_LT_EOF 990275970Scy echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 991275970Scy $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 992275970Scy _lt_result=$? 993275970Scy if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 994275970Scy lt_cv_ld_force_load=yes 995275970Scy else 996275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 997275970Scy fi 998275970Scy rm -f conftest.err libconftest.a conftest conftest.c 999275970Scy rm -rf conftest.dSYM 1000275970Scy ]) 1001275970Scy case $host_os in 1002275970Scy rhapsody* | darwin1.[[012]]) 1003275970Scy _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1004275970Scy darwin1.*) 1005275970Scy _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1006275970Scy darwin*) # darwin 5.x on 1007275970Scy # if running on 10.5 or later, the deployment target defaults 1008275970Scy # to the OS version, if on x86, and 10.4, the deployment 1009275970Scy # target defaults to 10.4. Don't you love it? 1010275970Scy case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1011275970Scy 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1012275970Scy _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1013275970Scy 10.[[012]]*) 1014275970Scy _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1015275970Scy 10.*) 1016275970Scy _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1017275970Scy esac 1018275970Scy ;; 1019275970Scy esac 1020275970Scy if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1021275970Scy _lt_dar_single_mod='$single_module' 1022275970Scy fi 1023275970Scy if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1024275970Scy _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1025275970Scy else 1026275970Scy _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1027275970Scy fi 1028275970Scy if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1029275970Scy _lt_dsymutil='~$DSYMUTIL $lib || :' 1030275970Scy else 1031275970Scy _lt_dsymutil= 1032275970Scy fi 1033275970Scy ;; 1034275970Scy esac 1035275970Scy]) 1036275970Scy 1037275970Scy 1038275970Scy# _LT_DARWIN_LINKER_FEATURES 1039275970Scy# -------------------------- 1040275970Scy# Checks for linker and compiler features on darwin 1041275970Scym4_defun([_LT_DARWIN_LINKER_FEATURES], 1042275970Scy[ 1043275970Scy m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1044275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1045275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 1046275970Scy _LT_TAGVAR(hardcode_automatic, $1)=yes 1047275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1048275970Scy if test "$lt_cv_ld_force_load" = "yes"; then 1049275970Scy _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\"`' 1050275970Scy else 1051275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1052275970Scy fi 1053275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 1054275970Scy _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1055275970Scy case $cc_basename in 1056275970Scy ifort*) _lt_dar_can_shared=yes ;; 1057275970Scy *) _lt_dar_can_shared=$GCC ;; 1058275970Scy esac 1059275970Scy if test "$_lt_dar_can_shared" = "yes"; then 1060275970Scy output_verbose_link_cmd=func_echo_all 1061275970Scy _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}" 1062275970Scy _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1063275970Scy _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}" 1064275970Scy _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}" 1065275970Scy m4_if([$1], [CXX], 1066275970Scy[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1067275970Scy _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}" 1068275970Scy _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}" 1069275970Scy fi 1070275970Scy],[]) 1071275970Scy else 1072275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 1073275970Scy fi 1074275970Scy]) 1075275970Scy 1076275970Scy# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1077275970Scy# ---------------------------------- 1078275970Scy# Links a minimal program and checks the executable 1079275970Scy# for the system default hardcoded library path. In most cases, 1080275970Scy# this is /usr/lib:/lib, but when the MPI compilers are used 1081275970Scy# the location of the communication and MPI libs are included too. 1082275970Scy# If we don't find anything, use the default library path according 1083275970Scy# to the aix ld manual. 1084275970Scy# Store the results from the different compilers for each TAGNAME. 1085275970Scy# Allow to override them for all tags through lt_cv_aix_libpath. 1086275970Scym4_defun([_LT_SYS_MODULE_PATH_AIX], 1087275970Scy[m4_require([_LT_DECL_SED])dnl 1088275970Scyif test "${lt_cv_aix_libpath+set}" = set; then 1089275970Scy aix_libpath=$lt_cv_aix_libpath 1090275970Scyelse 1091275970Scy AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1092275970Scy [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1093275970Scy lt_aix_libpath_sed='[ 1094275970Scy /Import File Strings/,/^$/ { 1095275970Scy /^0/ { 1096275970Scy s/^0 *\([^ ]*\) *$/\1/ 1097275970Scy p 1098275970Scy } 1099275970Scy }]' 1100275970Scy _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1101275970Scy # Check for a 64-bit object if we didn't find anything. 1102275970Scy if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1103275970Scy _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1104275970Scy fi],[]) 1105275970Scy if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1106275970Scy _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1107275970Scy fi 1108275970Scy ]) 1109275970Scy aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1110275970Scyfi 1111275970Scy])# _LT_SYS_MODULE_PATH_AIX 1112275970Scy 1113275970Scy 1114275970Scy# _LT_SHELL_INIT(ARG) 1115275970Scy# ------------------- 1116275970Scym4_define([_LT_SHELL_INIT], 1117275970Scy[m4_divert_text([M4SH-INIT], [$1 1118275970Scy])])# _LT_SHELL_INIT 1119275970Scy 1120275970Scy 1121275970Scy 1122275970Scy# _LT_PROG_ECHO_BACKSLASH 1123275970Scy# ----------------------- 1124275970Scy# Find how we can fake an echo command that does not interpret backslash. 1125275970Scy# In particular, with Autoconf 2.60 or later we add some code to the start 1126275970Scy# of the generated configure script which will find a shell with a builtin 1127275970Scy# printf (which we can use as an echo command). 1128275970Scym4_defun([_LT_PROG_ECHO_BACKSLASH], 1129275970Scy[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1130275970ScyECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1131275970ScyECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1132275970Scy 1133275970ScyAC_MSG_CHECKING([how to print strings]) 1134275970Scy# Test print first, because it will be a builtin if present. 1135275970Scyif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1136275970Scy test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1137275970Scy ECHO='print -r --' 1138275970Scyelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1139275970Scy ECHO='printf %s\n' 1140275970Scyelse 1141275970Scy # Use this function as a fallback that always works. 1142275970Scy func_fallback_echo () 1143275970Scy { 1144275970Scy eval 'cat <<_LTECHO_EOF 1145275970Scy$[]1 1146275970Scy_LTECHO_EOF' 1147275970Scy } 1148275970Scy ECHO='func_fallback_echo' 1149275970Scyfi 1150275970Scy 1151275970Scy# func_echo_all arg... 1152275970Scy# Invoke $ECHO with all args, space-separated. 1153275970Scyfunc_echo_all () 1154275970Scy{ 1155275970Scy $ECHO "$*" 1156275970Scy} 1157275970Scy 1158275970Scycase "$ECHO" in 1159275970Scy printf*) AC_MSG_RESULT([printf]) ;; 1160275970Scy print*) AC_MSG_RESULT([print -r]) ;; 1161275970Scy *) AC_MSG_RESULT([cat]) ;; 1162275970Scyesac 1163275970Scy 1164275970Scym4_ifdef([_AS_DETECT_SUGGESTED], 1165275970Scy[_AS_DETECT_SUGGESTED([ 1166275970Scy test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1167275970Scy ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1168275970Scy ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1169275970Scy ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1170275970Scy PATH=/empty FPATH=/empty; export PATH FPATH 1171275970Scy test "X`printf %s $ECHO`" = "X$ECHO" \ 1172275970Scy || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1173275970Scy 1174275970Scy_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1175275970Scy_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1176275970Scy])# _LT_PROG_ECHO_BACKSLASH 1177275970Scy 1178275970Scy 1179275970Scy# _LT_WITH_SYSROOT 1180275970Scy# ---------------- 1181275970ScyAC_DEFUN([_LT_WITH_SYSROOT], 1182275970Scy[AC_MSG_CHECKING([for sysroot]) 1183275970ScyAC_ARG_WITH([sysroot], 1184275970Scy[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1185275970Scy (or the compiler's sysroot if not specified).], 1186275970Scy[], [with_sysroot=no]) 1187275970Scy 1188275970Scydnl lt_sysroot will always be passed unquoted. We quote it here 1189275970Scydnl in case the user passed a directory name. 1190275970Scylt_sysroot= 1191275970Scycase ${with_sysroot} in #( 1192275970Scy yes) 1193275970Scy if test "$GCC" = yes; then 1194275970Scy lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1195275970Scy fi 1196275970Scy ;; #( 1197275970Scy /*) 1198275970Scy lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1199275970Scy ;; #( 1200275970Scy no|'') 1201275970Scy ;; #( 1202275970Scy *) 1203275970Scy AC_MSG_RESULT([${with_sysroot}]) 1204275970Scy AC_MSG_ERROR([The sysroot must be an absolute path.]) 1205275970Scy ;; 1206275970Scyesac 1207275970Scy 1208275970Scy AC_MSG_RESULT([${lt_sysroot:-no}]) 1209275970Scy_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1210275970Scy[dependent libraries, and in which our libraries should be installed.])]) 1211275970Scy 1212275970Scy# _LT_ENABLE_LOCK 1213275970Scy# --------------- 1214275970Scym4_defun([_LT_ENABLE_LOCK], 1215275970Scy[AC_ARG_ENABLE([libtool-lock], 1216275970Scy [AS_HELP_STRING([--disable-libtool-lock], 1217275970Scy [avoid locking (might break parallel builds)])]) 1218275970Scytest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1219275970Scy 1220275970Scy# Some flags need to be propagated to the compiler or linker for good 1221275970Scy# libtool support. 1222275970Scycase $host in 1223275970Scyia64-*-hpux*) 1224275970Scy # Find out which ABI we are using. 1225275970Scy echo 'int i;' > conftest.$ac_ext 1226275970Scy if AC_TRY_EVAL(ac_compile); then 1227275970Scy case `/usr/bin/file conftest.$ac_objext` in 1228275970Scy *ELF-32*) 1229275970Scy HPUX_IA64_MODE="32" 1230275970Scy ;; 1231275970Scy *ELF-64*) 1232275970Scy HPUX_IA64_MODE="64" 1233275970Scy ;; 1234275970Scy esac 1235275970Scy fi 1236275970Scy rm -rf conftest* 1237275970Scy ;; 1238275970Scy*-*-irix6*) 1239275970Scy # Find out which ABI we are using. 1240275970Scy echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1241275970Scy if AC_TRY_EVAL(ac_compile); then 1242275970Scy if test "$lt_cv_prog_gnu_ld" = yes; then 1243275970Scy case `/usr/bin/file conftest.$ac_objext` in 1244275970Scy *32-bit*) 1245275970Scy LD="${LD-ld} -melf32bsmip" 1246275970Scy ;; 1247275970Scy *N32*) 1248275970Scy LD="${LD-ld} -melf32bmipn32" 1249275970Scy ;; 1250275970Scy *64-bit*) 1251275970Scy LD="${LD-ld} -melf64bmip" 1252275970Scy ;; 1253275970Scy esac 1254275970Scy else 1255275970Scy case `/usr/bin/file conftest.$ac_objext` in 1256275970Scy *32-bit*) 1257275970Scy LD="${LD-ld} -32" 1258275970Scy ;; 1259275970Scy *N32*) 1260275970Scy LD="${LD-ld} -n32" 1261275970Scy ;; 1262275970Scy *64-bit*) 1263275970Scy LD="${LD-ld} -64" 1264275970Scy ;; 1265275970Scy esac 1266275970Scy fi 1267275970Scy fi 1268275970Scy rm -rf conftest* 1269275970Scy ;; 1270275970Scy 1271275970Scyx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1272275970Scys390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1273275970Scy # Find out which ABI we are using. 1274275970Scy echo 'int i;' > conftest.$ac_ext 1275275970Scy if AC_TRY_EVAL(ac_compile); then 1276275970Scy case `/usr/bin/file conftest.o` in 1277275970Scy *32-bit*) 1278275970Scy case $host in 1279275970Scy x86_64-*kfreebsd*-gnu) 1280275970Scy LD="${LD-ld} -m elf_i386_fbsd" 1281275970Scy ;; 1282275970Scy x86_64-*linux*) 1283275970Scy LD="${LD-ld} -m elf_i386" 1284275970Scy ;; 1285275970Scy ppc64-*linux*|powerpc64-*linux*) 1286275970Scy LD="${LD-ld} -m elf32ppclinux" 1287275970Scy ;; 1288275970Scy s390x-*linux*) 1289275970Scy LD="${LD-ld} -m elf_s390" 1290275970Scy ;; 1291275970Scy sparc64-*linux*) 1292275970Scy LD="${LD-ld} -m elf32_sparc" 1293275970Scy ;; 1294275970Scy esac 1295275970Scy ;; 1296275970Scy *64-bit*) 1297275970Scy case $host in 1298275970Scy x86_64-*kfreebsd*-gnu) 1299275970Scy LD="${LD-ld} -m elf_x86_64_fbsd" 1300275970Scy ;; 1301275970Scy x86_64-*linux*) 1302275970Scy LD="${LD-ld} -m elf_x86_64" 1303275970Scy ;; 1304275970Scy ppc*-*linux*|powerpc*-*linux*) 1305275970Scy LD="${LD-ld} -m elf64ppc" 1306275970Scy ;; 1307275970Scy s390*-*linux*|s390*-*tpf*) 1308275970Scy LD="${LD-ld} -m elf64_s390" 1309275970Scy ;; 1310275970Scy sparc*-*linux*) 1311275970Scy LD="${LD-ld} -m elf64_sparc" 1312275970Scy ;; 1313275970Scy esac 1314275970Scy ;; 1315275970Scy esac 1316275970Scy fi 1317275970Scy rm -rf conftest* 1318275970Scy ;; 1319275970Scy 1320275970Scy*-*-sco3.2v5*) 1321275970Scy # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1322275970Scy SAVE_CFLAGS="$CFLAGS" 1323275970Scy CFLAGS="$CFLAGS -belf" 1324275970Scy AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1325275970Scy [AC_LANG_PUSH(C) 1326275970Scy AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1327275970Scy AC_LANG_POP]) 1328275970Scy if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1329275970Scy # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1330275970Scy CFLAGS="$SAVE_CFLAGS" 1331275970Scy fi 1332275970Scy ;; 1333275970Scysparc*-*solaris*) 1334275970Scy # Find out which ABI we are using. 1335275970Scy echo 'int i;' > conftest.$ac_ext 1336275970Scy if AC_TRY_EVAL(ac_compile); then 1337275970Scy case `/usr/bin/file conftest.o` in 1338275970Scy *64-bit*) 1339275970Scy case $lt_cv_prog_gnu_ld in 1340275970Scy yes*) LD="${LD-ld} -m elf64_sparc" ;; 1341275970Scy *) 1342275970Scy if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1343275970Scy LD="${LD-ld} -64" 1344275970Scy fi 1345275970Scy ;; 1346275970Scy esac 1347275970Scy ;; 1348275970Scy esac 1349275970Scy fi 1350275970Scy rm -rf conftest* 1351275970Scy ;; 1352275970Scyesac 1353275970Scy 1354275970Scyneed_locks="$enable_libtool_lock" 1355275970Scy])# _LT_ENABLE_LOCK 1356275970Scy 1357275970Scy 1358275970Scy# _LT_PROG_AR 1359275970Scy# ----------- 1360275970Scym4_defun([_LT_PROG_AR], 1361275970Scy[AC_CHECK_TOOLS(AR, [ar], false) 1362275970Scy: ${AR=ar} 1363275970Scy: ${AR_FLAGS=cru} 1364275970Scy_LT_DECL([], [AR], [1], [The archiver]) 1365275970Scy_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1366275970Scy 1367275970ScyAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1368275970Scy [lt_cv_ar_at_file=no 1369275970Scy AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1370275970Scy [echo conftest.$ac_objext > conftest.lst 1371275970Scy lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1372275970Scy AC_TRY_EVAL([lt_ar_try]) 1373275970Scy if test "$ac_status" -eq 0; then 1374275970Scy # Ensure the archiver fails upon bogus file names. 1375275970Scy rm -f conftest.$ac_objext libconftest.a 1376275970Scy AC_TRY_EVAL([lt_ar_try]) 1377275970Scy if test "$ac_status" -ne 0; then 1378275970Scy lt_cv_ar_at_file=@ 1379275970Scy fi 1380275970Scy fi 1381275970Scy rm -f conftest.* libconftest.a 1382275970Scy ]) 1383275970Scy ]) 1384275970Scy 1385275970Scyif test "x$lt_cv_ar_at_file" = xno; then 1386275970Scy archiver_list_spec= 1387275970Scyelse 1388275970Scy archiver_list_spec=$lt_cv_ar_at_file 1389275970Scyfi 1390275970Scy_LT_DECL([], [archiver_list_spec], [1], 1391275970Scy [How to feed a file listing to the archiver]) 1392275970Scy])# _LT_PROG_AR 1393275970Scy 1394275970Scy 1395275970Scy# _LT_CMD_OLD_ARCHIVE 1396275970Scy# ------------------- 1397275970Scym4_defun([_LT_CMD_OLD_ARCHIVE], 1398275970Scy[_LT_PROG_AR 1399275970Scy 1400275970ScyAC_CHECK_TOOL(STRIP, strip, :) 1401275970Scytest -z "$STRIP" && STRIP=: 1402275970Scy_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1403275970Scy 1404275970ScyAC_CHECK_TOOL(RANLIB, ranlib, :) 1405275970Scytest -z "$RANLIB" && RANLIB=: 1406275970Scy_LT_DECL([], [RANLIB], [1], 1407275970Scy [Commands used to install an old-style archive]) 1408275970Scy 1409275970Scy# Determine commands to create old-style static archives. 1410275970Scyold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1411275970Scyold_postinstall_cmds='chmod 644 $oldlib' 1412275970Scyold_postuninstall_cmds= 1413275970Scy 1414275970Scyif test -n "$RANLIB"; then 1415275970Scy case $host_os in 1416275970Scy openbsd*) 1417275970Scy old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1418275970Scy ;; 1419275970Scy *) 1420275970Scy old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1421275970Scy ;; 1422275970Scy esac 1423275970Scy old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1424275970Scyfi 1425275970Scy 1426275970Scycase $host_os in 1427275970Scy darwin*) 1428275970Scy lock_old_archive_extraction=yes ;; 1429275970Scy *) 1430275970Scy lock_old_archive_extraction=no ;; 1431275970Scyesac 1432275970Scy_LT_DECL([], [old_postinstall_cmds], [2]) 1433275970Scy_LT_DECL([], [old_postuninstall_cmds], [2]) 1434275970Scy_LT_TAGDECL([], [old_archive_cmds], [2], 1435275970Scy [Commands used to build an old-style archive]) 1436275970Scy_LT_DECL([], [lock_old_archive_extraction], [0], 1437275970Scy [Whether to use a lock for old archive extraction]) 1438275970Scy])# _LT_CMD_OLD_ARCHIVE 1439275970Scy 1440275970Scy 1441275970Scy# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1442275970Scy# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1443275970Scy# ---------------------------------------------------------------- 1444275970Scy# Check whether the given compiler option works 1445275970ScyAC_DEFUN([_LT_COMPILER_OPTION], 1446275970Scy[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1447275970Scym4_require([_LT_DECL_SED])dnl 1448275970ScyAC_CACHE_CHECK([$1], [$2], 1449275970Scy [$2=no 1450275970Scy m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1451275970Scy echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1452275970Scy lt_compiler_flag="$3" 1453275970Scy # Insert the option either (1) after the last *FLAGS variable, or 1454275970Scy # (2) before a word containing "conftest.", or (3) at the end. 1455275970Scy # Note that $ac_compile itself does not contain backslashes and begins 1456275970Scy # with a dollar sign (not a hyphen), so the echo should work correctly. 1457275970Scy # The option is referenced via a variable to avoid confusing sed. 1458275970Scy lt_compile=`echo "$ac_compile" | $SED \ 1459275970Scy -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1460275970Scy -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1461275970Scy -e 's:$: $lt_compiler_flag:'` 1462275970Scy (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1463275970Scy (eval "$lt_compile" 2>conftest.err) 1464275970Scy ac_status=$? 1465275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 1466275970Scy echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1467275970Scy if (exit $ac_status) && test -s "$ac_outfile"; then 1468275970Scy # The compiler can only warn and ignore the option if not recognized 1469275970Scy # So say no if there are warnings other than the usual output. 1470275970Scy $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1471275970Scy $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1472275970Scy if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1473275970Scy $2=yes 1474275970Scy fi 1475275970Scy fi 1476275970Scy $RM conftest* 1477275970Scy]) 1478275970Scy 1479275970Scyif test x"[$]$2" = xyes; then 1480275970Scy m4_if([$5], , :, [$5]) 1481275970Scyelse 1482275970Scy m4_if([$6], , :, [$6]) 1483275970Scyfi 1484275970Scy])# _LT_COMPILER_OPTION 1485275970Scy 1486275970Scy# Old name: 1487275970ScyAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1488275970Scydnl aclocal-1.4 backwards compatibility: 1489275970Scydnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1490275970Scy 1491275970Scy 1492275970Scy# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1493275970Scy# [ACTION-SUCCESS], [ACTION-FAILURE]) 1494275970Scy# ---------------------------------------------------- 1495275970Scy# Check whether the given linker option works 1496275970ScyAC_DEFUN([_LT_LINKER_OPTION], 1497275970Scy[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1498275970Scym4_require([_LT_DECL_SED])dnl 1499275970ScyAC_CACHE_CHECK([$1], [$2], 1500275970Scy [$2=no 1501275970Scy save_LDFLAGS="$LDFLAGS" 1502275970Scy LDFLAGS="$LDFLAGS $3" 1503275970Scy echo "$lt_simple_link_test_code" > conftest.$ac_ext 1504275970Scy if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1505275970Scy # The linker can only warn and ignore the option if not recognized 1506275970Scy # So say no if there are warnings 1507275970Scy if test -s conftest.err; then 1508275970Scy # Append any errors to the config.log. 1509275970Scy cat conftest.err 1>&AS_MESSAGE_LOG_FD 1510275970Scy $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1511275970Scy $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1512275970Scy if diff conftest.exp conftest.er2 >/dev/null; then 1513275970Scy $2=yes 1514275970Scy fi 1515275970Scy else 1516275970Scy $2=yes 1517275970Scy fi 1518275970Scy fi 1519275970Scy $RM -r conftest* 1520275970Scy LDFLAGS="$save_LDFLAGS" 1521275970Scy]) 1522275970Scy 1523275970Scyif test x"[$]$2" = xyes; then 1524275970Scy m4_if([$4], , :, [$4]) 1525275970Scyelse 1526275970Scy m4_if([$5], , :, [$5]) 1527275970Scyfi 1528275970Scy])# _LT_LINKER_OPTION 1529275970Scy 1530275970Scy# Old name: 1531275970ScyAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1532275970Scydnl aclocal-1.4 backwards compatibility: 1533275970Scydnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1534275970Scy 1535275970Scy 1536275970Scy# LT_CMD_MAX_LEN 1537275970Scy#--------------- 1538275970ScyAC_DEFUN([LT_CMD_MAX_LEN], 1539275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1540275970Scy# find the maximum length of command line arguments 1541275970ScyAC_MSG_CHECKING([the maximum length of command line arguments]) 1542275970ScyAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1543275970Scy i=0 1544275970Scy teststring="ABCD" 1545275970Scy 1546275970Scy case $build_os in 1547275970Scy msdosdjgpp*) 1548275970Scy # On DJGPP, this test can blow up pretty badly due to problems in libc 1549275970Scy # (any single argument exceeding 2000 bytes causes a buffer overrun 1550275970Scy # during glob expansion). Even if it were fixed, the result of this 1551275970Scy # check would be larger than it should be. 1552275970Scy lt_cv_sys_max_cmd_len=12288; # 12K is about right 1553275970Scy ;; 1554275970Scy 1555275970Scy gnu*) 1556275970Scy # Under GNU Hurd, this test is not required because there is 1557275970Scy # no limit to the length of command line arguments. 1558275970Scy # Libtool will interpret -1 as no limit whatsoever 1559275970Scy lt_cv_sys_max_cmd_len=-1; 1560275970Scy ;; 1561275970Scy 1562275970Scy cygwin* | mingw* | cegcc*) 1563275970Scy # On Win9x/ME, this test blows up -- it succeeds, but takes 1564275970Scy # about 5 minutes as the teststring grows exponentially. 1565275970Scy # Worse, since 9x/ME are not pre-emptively multitasking, 1566275970Scy # you end up with a "frozen" computer, even though with patience 1567275970Scy # the test eventually succeeds (with a max line length of 256k). 1568275970Scy # Instead, let's just punt: use the minimum linelength reported by 1569275970Scy # all of the supported platforms: 8192 (on NT/2K/XP). 1570275970Scy lt_cv_sys_max_cmd_len=8192; 1571275970Scy ;; 1572275970Scy 1573275970Scy mint*) 1574275970Scy # On MiNT this can take a long time and run out of memory. 1575275970Scy lt_cv_sys_max_cmd_len=8192; 1576275970Scy ;; 1577275970Scy 1578275970Scy amigaos*) 1579275970Scy # On AmigaOS with pdksh, this test takes hours, literally. 1580275970Scy # So we just punt and use a minimum line length of 8192. 1581275970Scy lt_cv_sys_max_cmd_len=8192; 1582275970Scy ;; 1583275970Scy 1584275970Scy netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1585275970Scy # This has been around since 386BSD, at least. Likely further. 1586275970Scy if test -x /sbin/sysctl; then 1587275970Scy lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1588275970Scy elif test -x /usr/sbin/sysctl; then 1589275970Scy lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1590275970Scy else 1591275970Scy lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1592275970Scy fi 1593275970Scy # And add a safety zone 1594275970Scy lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1595275970Scy lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1596275970Scy ;; 1597275970Scy 1598275970Scy interix*) 1599275970Scy # We know the value 262144 and hardcode it with a safety zone (like BSD) 1600275970Scy lt_cv_sys_max_cmd_len=196608 1601275970Scy ;; 1602275970Scy 1603275970Scy osf*) 1604275970Scy # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1605275970Scy # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1606275970Scy # nice to cause kernel panics so lets avoid the loop below. 1607275970Scy # First set a reasonable default. 1608275970Scy lt_cv_sys_max_cmd_len=16384 1609275970Scy # 1610275970Scy if test -x /sbin/sysconfig; then 1611275970Scy case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1612275970Scy *1*) lt_cv_sys_max_cmd_len=-1 ;; 1613275970Scy esac 1614275970Scy fi 1615275970Scy ;; 1616275970Scy sco3.2v5*) 1617275970Scy lt_cv_sys_max_cmd_len=102400 1618275970Scy ;; 1619275970Scy sysv5* | sco5v6* | sysv4.2uw2*) 1620275970Scy kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1621275970Scy if test -n "$kargmax"; then 1622275970Scy lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1623275970Scy else 1624275970Scy lt_cv_sys_max_cmd_len=32768 1625275970Scy fi 1626275970Scy ;; 1627275970Scy *) 1628275970Scy lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1629275970Scy if test -n "$lt_cv_sys_max_cmd_len"; then 1630275970Scy lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1631275970Scy lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1632275970Scy else 1633275970Scy # Make teststring a little bigger before we do anything with it. 1634275970Scy # a 1K string should be a reasonable start. 1635275970Scy for i in 1 2 3 4 5 6 7 8 ; do 1636275970Scy teststring=$teststring$teststring 1637275970Scy done 1638275970Scy SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1639275970Scy # If test is not a shell built-in, we'll probably end up computing a 1640275970Scy # maximum length that is only half of the actual maximum length, but 1641275970Scy # we can't tell. 1642275970Scy while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1643275970Scy = "X$teststring$teststring"; } >/dev/null 2>&1 && 1644275970Scy test $i != 17 # 1/2 MB should be enough 1645275970Scy do 1646275970Scy i=`expr $i + 1` 1647275970Scy teststring=$teststring$teststring 1648275970Scy done 1649275970Scy # Only check the string length outside the loop. 1650275970Scy lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1651275970Scy teststring= 1652275970Scy # Add a significant safety factor because C++ compilers can tack on 1653275970Scy # massive amounts of additional arguments before passing them to the 1654275970Scy # linker. It appears as though 1/2 is a usable value. 1655275970Scy lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1656275970Scy fi 1657275970Scy ;; 1658275970Scy esac 1659275970Scy]) 1660275970Scyif test -n $lt_cv_sys_max_cmd_len ; then 1661275970Scy AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1662275970Scyelse 1663275970Scy AC_MSG_RESULT(none) 1664275970Scyfi 1665275970Scymax_cmd_len=$lt_cv_sys_max_cmd_len 1666275970Scy_LT_DECL([], [max_cmd_len], [0], 1667275970Scy [What is the maximum length of a command?]) 1668275970Scy])# LT_CMD_MAX_LEN 1669275970Scy 1670275970Scy# Old name: 1671275970ScyAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1672275970Scydnl aclocal-1.4 backwards compatibility: 1673275970Scydnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1674275970Scy 1675275970Scy 1676275970Scy# _LT_HEADER_DLFCN 1677275970Scy# ---------------- 1678275970Scym4_defun([_LT_HEADER_DLFCN], 1679275970Scy[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1680275970Scy])# _LT_HEADER_DLFCN 1681275970Scy 1682275970Scy 1683275970Scy# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1684275970Scy# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1685275970Scy# ---------------------------------------------------------------- 1686275970Scym4_defun([_LT_TRY_DLOPEN_SELF], 1687275970Scy[m4_require([_LT_HEADER_DLFCN])dnl 1688275970Scyif test "$cross_compiling" = yes; then : 1689275970Scy [$4] 1690275970Scyelse 1691275970Scy lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1692275970Scy lt_status=$lt_dlunknown 1693275970Scy cat > conftest.$ac_ext <<_LT_EOF 1694275970Scy[#line $LINENO "configure" 1695275970Scy#include "confdefs.h" 1696275970Scy 1697275970Scy#if HAVE_DLFCN_H 1698275970Scy#include <dlfcn.h> 1699275970Scy#endif 1700275970Scy 1701275970Scy#include <stdio.h> 1702275970Scy 1703275970Scy#ifdef RTLD_GLOBAL 1704275970Scy# define LT_DLGLOBAL RTLD_GLOBAL 1705275970Scy#else 1706275970Scy# ifdef DL_GLOBAL 1707275970Scy# define LT_DLGLOBAL DL_GLOBAL 1708275970Scy# else 1709275970Scy# define LT_DLGLOBAL 0 1710275970Scy# endif 1711275970Scy#endif 1712275970Scy 1713275970Scy/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1714275970Scy find out it does not work in some platform. */ 1715275970Scy#ifndef LT_DLLAZY_OR_NOW 1716275970Scy# ifdef RTLD_LAZY 1717275970Scy# define LT_DLLAZY_OR_NOW RTLD_LAZY 1718275970Scy# else 1719275970Scy# ifdef DL_LAZY 1720275970Scy# define LT_DLLAZY_OR_NOW DL_LAZY 1721275970Scy# else 1722275970Scy# ifdef RTLD_NOW 1723275970Scy# define LT_DLLAZY_OR_NOW RTLD_NOW 1724275970Scy# else 1725275970Scy# ifdef DL_NOW 1726275970Scy# define LT_DLLAZY_OR_NOW DL_NOW 1727275970Scy# else 1728275970Scy# define LT_DLLAZY_OR_NOW 0 1729275970Scy# endif 1730275970Scy# endif 1731275970Scy# endif 1732275970Scy# endif 1733275970Scy#endif 1734275970Scy 1735275970Scy/* When -fvisbility=hidden is used, assume the code has been annotated 1736275970Scy correspondingly for the symbols needed. */ 1737275970Scy#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1738275970Scyint fnord () __attribute__((visibility("default"))); 1739275970Scy#endif 1740275970Scy 1741275970Scyint fnord () { return 42; } 1742275970Scyint main () 1743275970Scy{ 1744275970Scy void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1745275970Scy int status = $lt_dlunknown; 1746275970Scy 1747275970Scy if (self) 1748275970Scy { 1749275970Scy if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1750275970Scy else 1751275970Scy { 1752275970Scy if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1753275970Scy else puts (dlerror ()); 1754275970Scy } 1755275970Scy /* dlclose (self); */ 1756275970Scy } 1757275970Scy else 1758275970Scy puts (dlerror ()); 1759275970Scy 1760275970Scy return status; 1761275970Scy}] 1762275970Scy_LT_EOF 1763275970Scy if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1764275970Scy (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1765275970Scy lt_status=$? 1766275970Scy case x$lt_status in 1767275970Scy x$lt_dlno_uscore) $1 ;; 1768275970Scy x$lt_dlneed_uscore) $2 ;; 1769275970Scy x$lt_dlunknown|x*) $3 ;; 1770275970Scy esac 1771275970Scy else : 1772275970Scy # compilation failed 1773275970Scy $3 1774275970Scy fi 1775275970Scyfi 1776275970Scyrm -fr conftest* 1777275970Scy])# _LT_TRY_DLOPEN_SELF 1778275970Scy 1779275970Scy 1780275970Scy# LT_SYS_DLOPEN_SELF 1781275970Scy# ------------------ 1782275970ScyAC_DEFUN([LT_SYS_DLOPEN_SELF], 1783275970Scy[m4_require([_LT_HEADER_DLFCN])dnl 1784275970Scyif test "x$enable_dlopen" != xyes; then 1785275970Scy enable_dlopen=unknown 1786275970Scy enable_dlopen_self=unknown 1787275970Scy enable_dlopen_self_static=unknown 1788275970Scyelse 1789275970Scy lt_cv_dlopen=no 1790275970Scy lt_cv_dlopen_libs= 1791275970Scy 1792275970Scy case $host_os in 1793275970Scy beos*) 1794275970Scy lt_cv_dlopen="load_add_on" 1795275970Scy lt_cv_dlopen_libs= 1796275970Scy lt_cv_dlopen_self=yes 1797275970Scy ;; 1798275970Scy 1799275970Scy mingw* | pw32* | cegcc*) 1800275970Scy lt_cv_dlopen="LoadLibrary" 1801275970Scy lt_cv_dlopen_libs= 1802275970Scy ;; 1803275970Scy 1804275970Scy cygwin*) 1805275970Scy lt_cv_dlopen="dlopen" 1806275970Scy lt_cv_dlopen_libs= 1807275970Scy ;; 1808275970Scy 1809275970Scy darwin*) 1810275970Scy # if libdl is installed we need to link against it 1811275970Scy AC_CHECK_LIB([dl], [dlopen], 1812275970Scy [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1813275970Scy lt_cv_dlopen="dyld" 1814275970Scy lt_cv_dlopen_libs= 1815275970Scy lt_cv_dlopen_self=yes 1816275970Scy ]) 1817275970Scy ;; 1818275970Scy 1819275970Scy *) 1820275970Scy AC_CHECK_FUNC([shl_load], 1821275970Scy [lt_cv_dlopen="shl_load"], 1822275970Scy [AC_CHECK_LIB([dld], [shl_load], 1823275970Scy [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1824275970Scy [AC_CHECK_FUNC([dlopen], 1825275970Scy [lt_cv_dlopen="dlopen"], 1826275970Scy [AC_CHECK_LIB([dl], [dlopen], 1827275970Scy [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1828275970Scy [AC_CHECK_LIB([svld], [dlopen], 1829275970Scy [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1830275970Scy [AC_CHECK_LIB([dld], [dld_link], 1831275970Scy [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1832275970Scy ]) 1833275970Scy ]) 1834275970Scy ]) 1835275970Scy ]) 1836275970Scy ]) 1837275970Scy ;; 1838275970Scy esac 1839275970Scy 1840275970Scy if test "x$lt_cv_dlopen" != xno; then 1841275970Scy enable_dlopen=yes 1842275970Scy else 1843275970Scy enable_dlopen=no 1844275970Scy fi 1845275970Scy 1846275970Scy case $lt_cv_dlopen in 1847275970Scy dlopen) 1848275970Scy save_CPPFLAGS="$CPPFLAGS" 1849275970Scy test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1850275970Scy 1851275970Scy save_LDFLAGS="$LDFLAGS" 1852275970Scy wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1853275970Scy 1854275970Scy save_LIBS="$LIBS" 1855275970Scy LIBS="$lt_cv_dlopen_libs $LIBS" 1856275970Scy 1857275970Scy AC_CACHE_CHECK([whether a program can dlopen itself], 1858275970Scy lt_cv_dlopen_self, [dnl 1859275970Scy _LT_TRY_DLOPEN_SELF( 1860275970Scy lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1861275970Scy lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1862275970Scy ]) 1863275970Scy 1864275970Scy if test "x$lt_cv_dlopen_self" = xyes; then 1865275970Scy wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1866275970Scy AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1867275970Scy lt_cv_dlopen_self_static, [dnl 1868275970Scy _LT_TRY_DLOPEN_SELF( 1869275970Scy lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1870275970Scy lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1871275970Scy ]) 1872275970Scy fi 1873275970Scy 1874275970Scy CPPFLAGS="$save_CPPFLAGS" 1875275970Scy LDFLAGS="$save_LDFLAGS" 1876275970Scy LIBS="$save_LIBS" 1877275970Scy ;; 1878275970Scy esac 1879275970Scy 1880275970Scy case $lt_cv_dlopen_self in 1881275970Scy yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1882275970Scy *) enable_dlopen_self=unknown ;; 1883275970Scy esac 1884275970Scy 1885275970Scy case $lt_cv_dlopen_self_static in 1886275970Scy yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1887275970Scy *) enable_dlopen_self_static=unknown ;; 1888275970Scy esac 1889275970Scyfi 1890275970Scy_LT_DECL([dlopen_support], [enable_dlopen], [0], 1891275970Scy [Whether dlopen is supported]) 1892275970Scy_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1893275970Scy [Whether dlopen of programs is supported]) 1894275970Scy_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1895275970Scy [Whether dlopen of statically linked programs is supported]) 1896275970Scy])# LT_SYS_DLOPEN_SELF 1897275970Scy 1898275970Scy# Old name: 1899275970ScyAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1900275970Scydnl aclocal-1.4 backwards compatibility: 1901275970Scydnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1902275970Scy 1903275970Scy 1904275970Scy# _LT_COMPILER_C_O([TAGNAME]) 1905275970Scy# --------------------------- 1906275970Scy# Check to see if options -c and -o are simultaneously supported by compiler. 1907275970Scy# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1908275970Scym4_defun([_LT_COMPILER_C_O], 1909275970Scy[m4_require([_LT_DECL_SED])dnl 1910275970Scym4_require([_LT_FILEUTILS_DEFAULTS])dnl 1911275970Scym4_require([_LT_TAG_COMPILER])dnl 1912275970ScyAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1913275970Scy [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1914275970Scy [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1915275970Scy $RM -r conftest 2>/dev/null 1916275970Scy mkdir conftest 1917275970Scy cd conftest 1918275970Scy mkdir out 1919275970Scy echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1920275970Scy 1921275970Scy lt_compiler_flag="-o out/conftest2.$ac_objext" 1922275970Scy # Insert the option either (1) after the last *FLAGS variable, or 1923275970Scy # (2) before a word containing "conftest.", or (3) at the end. 1924275970Scy # Note that $ac_compile itself does not contain backslashes and begins 1925275970Scy # with a dollar sign (not a hyphen), so the echo should work correctly. 1926275970Scy lt_compile=`echo "$ac_compile" | $SED \ 1927275970Scy -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1928275970Scy -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1929275970Scy -e 's:$: $lt_compiler_flag:'` 1930275970Scy (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1931275970Scy (eval "$lt_compile" 2>out/conftest.err) 1932275970Scy ac_status=$? 1933275970Scy cat out/conftest.err >&AS_MESSAGE_LOG_FD 1934275970Scy echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1935275970Scy if (exit $ac_status) && test -s out/conftest2.$ac_objext 1936275970Scy then 1937275970Scy # The compiler can only warn and ignore the option if not recognized 1938275970Scy # So say no if there are warnings 1939275970Scy $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1940275970Scy $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1941275970Scy if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1942275970Scy _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1943275970Scy fi 1944275970Scy fi 1945275970Scy chmod u+w . 2>&AS_MESSAGE_LOG_FD 1946275970Scy $RM conftest* 1947275970Scy # SGI C++ compiler will create directory out/ii_files/ for 1948275970Scy # template instantiation 1949275970Scy test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1950275970Scy $RM out/* && rmdir out 1951275970Scy cd .. 1952275970Scy $RM -r conftest 1953275970Scy $RM conftest* 1954275970Scy]) 1955275970Scy_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1956275970Scy [Does compiler simultaneously support -c and -o options?]) 1957275970Scy])# _LT_COMPILER_C_O 1958275970Scy 1959275970Scy 1960275970Scy# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1961275970Scy# ---------------------------------- 1962275970Scy# Check to see if we can do hard links to lock some files if needed 1963275970Scym4_defun([_LT_COMPILER_FILE_LOCKS], 1964275970Scy[m4_require([_LT_ENABLE_LOCK])dnl 1965275970Scym4_require([_LT_FILEUTILS_DEFAULTS])dnl 1966275970Scy_LT_COMPILER_C_O([$1]) 1967275970Scy 1968275970Scyhard_links="nottested" 1969275970Scyif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1970275970Scy # do not overwrite the value of need_locks provided by the user 1971275970Scy AC_MSG_CHECKING([if we can lock with hard links]) 1972275970Scy hard_links=yes 1973275970Scy $RM conftest* 1974275970Scy ln conftest.a conftest.b 2>/dev/null && hard_links=no 1975275970Scy touch conftest.a 1976275970Scy ln conftest.a conftest.b 2>&5 || hard_links=no 1977275970Scy ln conftest.a conftest.b 2>/dev/null && hard_links=no 1978275970Scy AC_MSG_RESULT([$hard_links]) 1979275970Scy if test "$hard_links" = no; then 1980275970Scy AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1981275970Scy need_locks=warn 1982275970Scy fi 1983275970Scyelse 1984275970Scy need_locks=no 1985275970Scyfi 1986275970Scy_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1987275970Scy])# _LT_COMPILER_FILE_LOCKS 1988275970Scy 1989275970Scy 1990275970Scy# _LT_CHECK_OBJDIR 1991275970Scy# ---------------- 1992275970Scym4_defun([_LT_CHECK_OBJDIR], 1993275970Scy[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1994275970Scy[rm -f .libs 2>/dev/null 1995275970Scymkdir .libs 2>/dev/null 1996275970Scyif test -d .libs; then 1997275970Scy lt_cv_objdir=.libs 1998275970Scyelse 1999275970Scy # MS-DOS does not allow filenames that begin with a dot. 2000275970Scy lt_cv_objdir=_libs 2001275970Scyfi 2002275970Scyrmdir .libs 2>/dev/null]) 2003275970Scyobjdir=$lt_cv_objdir 2004275970Scy_LT_DECL([], [objdir], [0], 2005275970Scy [The name of the directory that contains temporary libtool files])dnl 2006275970Scym4_pattern_allow([LT_OBJDIR])dnl 2007275970ScyAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2008275970Scy [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2009275970Scy])# _LT_CHECK_OBJDIR 2010275970Scy 2011275970Scy 2012275970Scy# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2013275970Scy# -------------------------------------- 2014275970Scy# Check hardcoding attributes. 2015275970Scym4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2016275970Scy[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2017275970Scy_LT_TAGVAR(hardcode_action, $1)= 2018275970Scyif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2019275970Scy test -n "$_LT_TAGVAR(runpath_var, $1)" || 2020275970Scy test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2021275970Scy 2022275970Scy # We can hardcode non-existent directories. 2023275970Scy if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2024275970Scy # If the only mechanism to avoid hardcoding is shlibpath_var, we 2025275970Scy # have to relink, otherwise we might link with an installed library 2026275970Scy # when we should be linking with a yet-to-be-installed one 2027275970Scy ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2028275970Scy test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2029275970Scy # Linking always hardcodes the temporary library directory. 2030275970Scy _LT_TAGVAR(hardcode_action, $1)=relink 2031275970Scy else 2032275970Scy # We can link without hardcoding, and we can hardcode nonexisting dirs. 2033275970Scy _LT_TAGVAR(hardcode_action, $1)=immediate 2034275970Scy fi 2035275970Scyelse 2036275970Scy # We cannot hardcode anything, or else we can only hardcode existing 2037275970Scy # directories. 2038275970Scy _LT_TAGVAR(hardcode_action, $1)=unsupported 2039275970Scyfi 2040275970ScyAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2041275970Scy 2042275970Scyif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2043275970Scy test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2044275970Scy # Fast installation is not supported 2045275970Scy enable_fast_install=no 2046275970Scyelif test "$shlibpath_overrides_runpath" = yes || 2047275970Scy test "$enable_shared" = no; then 2048275970Scy # Fast installation is not necessary 2049275970Scy enable_fast_install=needless 2050275970Scyfi 2051275970Scy_LT_TAGDECL([], [hardcode_action], [0], 2052275970Scy [How to hardcode a shared library path into an executable]) 2053275970Scy])# _LT_LINKER_HARDCODE_LIBPATH 2054275970Scy 2055275970Scy 2056275970Scy# _LT_CMD_STRIPLIB 2057275970Scy# ---------------- 2058275970Scym4_defun([_LT_CMD_STRIPLIB], 2059275970Scy[m4_require([_LT_DECL_EGREP]) 2060275970Scystriplib= 2061275970Scyold_striplib= 2062275970ScyAC_MSG_CHECKING([whether stripping libraries is possible]) 2063275970Scyif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2064275970Scy test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2065275970Scy test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2066275970Scy AC_MSG_RESULT([yes]) 2067275970Scyelse 2068275970Scy# FIXME - insert some real tests, host_os isn't really good enough 2069275970Scy case $host_os in 2070275970Scy darwin*) 2071275970Scy if test -n "$STRIP" ; then 2072275970Scy striplib="$STRIP -x" 2073275970Scy old_striplib="$STRIP -S" 2074275970Scy AC_MSG_RESULT([yes]) 2075275970Scy else 2076275970Scy AC_MSG_RESULT([no]) 2077275970Scy fi 2078275970Scy ;; 2079275970Scy *) 2080275970Scy AC_MSG_RESULT([no]) 2081275970Scy ;; 2082275970Scy esac 2083275970Scyfi 2084275970Scy_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2085275970Scy_LT_DECL([], [striplib], [1]) 2086275970Scy])# _LT_CMD_STRIPLIB 2087275970Scy 2088275970Scy 2089275970Scy# _LT_SYS_DYNAMIC_LINKER([TAG]) 2090275970Scy# ----------------------------- 2091275970Scy# PORTME Fill in your ld.so characteristics 2092275970Scym4_defun([_LT_SYS_DYNAMIC_LINKER], 2093275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2094275970Scym4_require([_LT_DECL_EGREP])dnl 2095275970Scym4_require([_LT_FILEUTILS_DEFAULTS])dnl 2096275970Scym4_require([_LT_DECL_OBJDUMP])dnl 2097275970Scym4_require([_LT_DECL_SED])dnl 2098275970Scym4_require([_LT_CHECK_SHELL_FEATURES])dnl 2099275970ScyAC_MSG_CHECKING([dynamic linker characteristics]) 2100275970Scym4_if([$1], 2101275970Scy [], [ 2102275970Scyif test "$GCC" = yes; then 2103275970Scy case $host_os in 2104275970Scy darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2105275970Scy *) lt_awk_arg="/^libraries:/" ;; 2106275970Scy esac 2107275970Scy case $host_os in 2108275970Scy mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2109275970Scy *) lt_sed_strip_eq="s,=/,/,g" ;; 2110275970Scy esac 2111275970Scy lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2112275970Scy case $lt_search_path_spec in 2113275970Scy *\;*) 2114275970Scy # if the path contains ";" then we assume it to be the separator 2115275970Scy # otherwise default to the standard path separator (i.e. ":") - it is 2116275970Scy # assumed that no part of a normal pathname contains ";" but that should 2117275970Scy # okay in the real world where ";" in dirpaths is itself problematic. 2118275970Scy lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2119275970Scy ;; 2120275970Scy *) 2121275970Scy lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2122275970Scy ;; 2123275970Scy esac 2124275970Scy # Ok, now we have the path, separated by spaces, we can step through it 2125275970Scy # and add multilib dir if necessary. 2126275970Scy lt_tmp_lt_search_path_spec= 2127275970Scy lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2128275970Scy for lt_sys_path in $lt_search_path_spec; do 2129275970Scy if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2130275970Scy lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2131275970Scy else 2132275970Scy test -d "$lt_sys_path" && \ 2133275970Scy lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2134275970Scy fi 2135275970Scy done 2136275970Scy lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2137275970ScyBEGIN {RS=" "; FS="/|\n";} { 2138275970Scy lt_foo=""; 2139275970Scy lt_count=0; 2140275970Scy for (lt_i = NF; lt_i > 0; lt_i--) { 2141275970Scy if ($lt_i != "" && $lt_i != ".") { 2142275970Scy if ($lt_i == "..") { 2143275970Scy lt_count++; 2144275970Scy } else { 2145275970Scy if (lt_count == 0) { 2146275970Scy lt_foo="/" $lt_i lt_foo; 2147275970Scy } else { 2148275970Scy lt_count--; 2149275970Scy } 2150275970Scy } 2151275970Scy } 2152275970Scy } 2153275970Scy if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2154275970Scy if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2155275970Scy}'` 2156275970Scy # AWK program above erroneously prepends '/' to C:/dos/paths 2157275970Scy # for these hosts. 2158275970Scy case $host_os in 2159275970Scy mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2160275970Scy $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2161275970Scy esac 2162275970Scy sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2163275970Scyelse 2164275970Scy sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2165275970Scyfi]) 2166275970Scylibrary_names_spec= 2167275970Scylibname_spec='lib$name' 2168275970Scysoname_spec= 2169275970Scyshrext_cmds=".so" 2170275970Scypostinstall_cmds= 2171275970Scypostuninstall_cmds= 2172275970Scyfinish_cmds= 2173275970Scyfinish_eval= 2174275970Scyshlibpath_var= 2175275970Scyshlibpath_overrides_runpath=unknown 2176275970Scyversion_type=none 2177275970Scydynamic_linker="$host_os ld.so" 2178275970Scysys_lib_dlsearch_path_spec="/lib /usr/lib" 2179275970Scyneed_lib_prefix=unknown 2180275970Scyhardcode_into_libs=no 2181275970Scy 2182275970Scy# when you set need_version to no, make sure it does not cause -set_version 2183275970Scy# flags to be left without arguments 2184275970Scyneed_version=unknown 2185275970Scy 2186275970Scycase $host_os in 2187275970Scyaix3*) 2188275970Scy version_type=linux 2189275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2190275970Scy shlibpath_var=LIBPATH 2191275970Scy 2192275970Scy # AIX 3 has no versioning support, so we append a major version to the name. 2193275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2194275970Scy ;; 2195275970Scy 2196275970Scyaix[[4-9]]*) 2197275970Scy version_type=linux 2198275970Scy need_lib_prefix=no 2199275970Scy need_version=no 2200275970Scy hardcode_into_libs=yes 2201275970Scy if test "$host_cpu" = ia64; then 2202275970Scy # AIX 5 supports IA64 2203275970Scy library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2204275970Scy shlibpath_var=LD_LIBRARY_PATH 2205275970Scy else 2206275970Scy # With GCC up to 2.95.x, collect2 would create an import file 2207275970Scy # for dependence libraries. The import file would start with 2208275970Scy # the line `#! .'. This would cause the generated library to 2209275970Scy # depend on `.', always an invalid library. This was fixed in 2210275970Scy # development snapshots of GCC prior to 3.0. 2211275970Scy case $host_os in 2212275970Scy aix4 | aix4.[[01]] | aix4.[[01]].*) 2213275970Scy if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2214275970Scy echo ' yes ' 2215275970Scy echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2216275970Scy : 2217275970Scy else 2218275970Scy can_build_shared=no 2219275970Scy fi 2220275970Scy ;; 2221275970Scy esac 2222275970Scy # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2223275970Scy # soname into executable. Probably we can add versioning support to 2224275970Scy # collect2, so additional links can be useful in future. 2225275970Scy if test "$aix_use_runtimelinking" = yes; then 2226275970Scy # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2227275970Scy # instead of lib<name>.a to let people know that these are not 2228275970Scy # typical AIX shared libraries. 2229275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2230275970Scy else 2231275970Scy # We preserve .a as extension for shared libraries through AIX4.2 2232275970Scy # and later when we are not doing run time linking. 2233275970Scy library_names_spec='${libname}${release}.a $libname.a' 2234275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2235275970Scy fi 2236275970Scy shlibpath_var=LIBPATH 2237275970Scy fi 2238275970Scy ;; 2239275970Scy 2240275970Scyamigaos*) 2241275970Scy case $host_cpu in 2242275970Scy powerpc) 2243275970Scy # Since July 2007 AmigaOS4 officially supports .so libraries. 2244275970Scy # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2245275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2246275970Scy ;; 2247275970Scy m68k) 2248275970Scy library_names_spec='$libname.ixlibrary $libname.a' 2249275970Scy # Create ${libname}_ixlibrary.a entries in /sys/libs. 2250275970Scy finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2251275970Scy ;; 2252275970Scy esac 2253275970Scy ;; 2254275970Scy 2255275970Scybeos*) 2256275970Scy library_names_spec='${libname}${shared_ext}' 2257275970Scy dynamic_linker="$host_os ld.so" 2258275970Scy shlibpath_var=LIBRARY_PATH 2259275970Scy ;; 2260275970Scy 2261275970Scybsdi[[45]]*) 2262275970Scy version_type=linux 2263275970Scy need_version=no 2264275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2265275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2266275970Scy finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2267275970Scy shlibpath_var=LD_LIBRARY_PATH 2268275970Scy sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2269275970Scy sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2270275970Scy # the default ld.so.conf also contains /usr/contrib/lib and 2271275970Scy # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2272275970Scy # libtool to hard-code these into programs 2273275970Scy ;; 2274275970Scy 2275275970Scycygwin* | mingw* | pw32* | cegcc*) 2276275970Scy version_type=windows 2277275970Scy shrext_cmds=".dll" 2278275970Scy need_version=no 2279275970Scy need_lib_prefix=no 2280275970Scy 2281275970Scy case $GCC,$cc_basename in 2282275970Scy yes,*) 2283275970Scy # gcc 2284275970Scy library_names_spec='$libname.dll.a' 2285275970Scy # DLL is installed to $(libdir)/../bin by postinstall_cmds 2286275970Scy postinstall_cmds='base_file=`basename \${file}`~ 2287275970Scy dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2288275970Scy dldir=$destdir/`dirname \$dlpath`~ 2289275970Scy test -d \$dldir || mkdir -p \$dldir~ 2290275970Scy $install_prog $dir/$dlname \$dldir/$dlname~ 2291275970Scy chmod a+x \$dldir/$dlname~ 2292275970Scy if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2293275970Scy eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2294275970Scy fi' 2295275970Scy postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2296275970Scy dlpath=$dir/\$dldll~ 2297275970Scy $RM \$dlpath' 2298275970Scy shlibpath_overrides_runpath=yes 2299275970Scy 2300275970Scy case $host_os in 2301275970Scy cygwin*) 2302275970Scy # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2303275970Scy soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2304275970Scym4_if([$1], [],[ 2305275970Scy sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2306275970Scy ;; 2307275970Scy mingw* | cegcc*) 2308275970Scy # MinGW DLLs use traditional 'lib' prefix 2309275970Scy soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2310275970Scy ;; 2311275970Scy pw32*) 2312275970Scy # pw32 DLLs use 'pw' prefix rather than 'lib' 2313275970Scy library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2314275970Scy ;; 2315275970Scy esac 2316275970Scy dynamic_linker='Win32 ld.exe' 2317275970Scy ;; 2318275970Scy 2319275970Scy *,cl*) 2320275970Scy # Native MSVC 2321275970Scy libname_spec='$name' 2322275970Scy soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2323275970Scy library_names_spec='${libname}.dll.lib' 2324275970Scy 2325275970Scy case $build_os in 2326275970Scy mingw*) 2327275970Scy sys_lib_search_path_spec= 2328275970Scy lt_save_ifs=$IFS 2329275970Scy IFS=';' 2330275970Scy for lt_path in $LIB 2331275970Scy do 2332275970Scy IFS=$lt_save_ifs 2333275970Scy # Let DOS variable expansion print the short 8.3 style file name. 2334275970Scy lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2335275970Scy sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2336275970Scy done 2337275970Scy IFS=$lt_save_ifs 2338275970Scy # Convert to MSYS style. 2339275970Scy sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2340275970Scy ;; 2341275970Scy cygwin*) 2342275970Scy # Convert to unix form, then to dos form, then back to unix form 2343275970Scy # but this time dos style (no spaces!) so that the unix form looks 2344275970Scy # like /cygdrive/c/PROGRA~1:/cygdr... 2345275970Scy sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2346275970Scy sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2347275970Scy sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2348275970Scy ;; 2349275970Scy *) 2350275970Scy sys_lib_search_path_spec="$LIB" 2351275970Scy if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2352275970Scy # It is most probably a Windows format PATH. 2353275970Scy sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2354275970Scy else 2355275970Scy sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2356275970Scy fi 2357275970Scy # FIXME: find the short name or the path components, as spaces are 2358275970Scy # common. (e.g. "Program Files" -> "PROGRA~1") 2359275970Scy ;; 2360275970Scy esac 2361275970Scy 2362275970Scy # DLL is installed to $(libdir)/../bin by postinstall_cmds 2363275970Scy postinstall_cmds='base_file=`basename \${file}`~ 2364275970Scy dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2365275970Scy dldir=$destdir/`dirname \$dlpath`~ 2366275970Scy test -d \$dldir || mkdir -p \$dldir~ 2367275970Scy $install_prog $dir/$dlname \$dldir/$dlname' 2368275970Scy postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2369275970Scy dlpath=$dir/\$dldll~ 2370275970Scy $RM \$dlpath' 2371275970Scy shlibpath_overrides_runpath=yes 2372275970Scy dynamic_linker='Win32 link.exe' 2373275970Scy ;; 2374275970Scy 2375275970Scy *) 2376275970Scy # Assume MSVC wrapper 2377275970Scy library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2378275970Scy dynamic_linker='Win32 ld.exe' 2379275970Scy ;; 2380275970Scy esac 2381275970Scy # FIXME: first we should search . and the directory the executable is in 2382275970Scy shlibpath_var=PATH 2383275970Scy ;; 2384275970Scy 2385275970Scydarwin* | rhapsody*) 2386275970Scy dynamic_linker="$host_os dyld" 2387275970Scy version_type=darwin 2388275970Scy need_lib_prefix=no 2389275970Scy need_version=no 2390275970Scy library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2391275970Scy soname_spec='${libname}${release}${major}$shared_ext' 2392275970Scy shlibpath_overrides_runpath=yes 2393275970Scy shlibpath_var=DYLD_LIBRARY_PATH 2394275970Scy shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2395275970Scym4_if([$1], [],[ 2396275970Scy sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2397275970Scy sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2398275970Scy ;; 2399275970Scy 2400275970Scydgux*) 2401275970Scy version_type=linux 2402275970Scy need_lib_prefix=no 2403275970Scy need_version=no 2404275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2405275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2406275970Scy shlibpath_var=LD_LIBRARY_PATH 2407275970Scy ;; 2408275970Scy 2409275970Scyfreebsd1*) 2410275970Scy dynamic_linker=no 2411275970Scy ;; 2412275970Scy 2413275970Scyfreebsd* | dragonfly*) 2414275970Scy # DragonFly does not have aout. When/if they implement a new 2415275970Scy # versioning mechanism, adjust this. 2416275970Scy if test -x /usr/bin/objformat; then 2417275970Scy objformat=`/usr/bin/objformat` 2418275970Scy else 2419275970Scy case $host_os in 2420275970Scy freebsd[[123]]*) objformat=aout ;; 2421275970Scy *) objformat=elf ;; 2422275970Scy esac 2423275970Scy fi 2424275970Scy version_type=freebsd-$objformat 2425275970Scy case $version_type in 2426275970Scy freebsd-elf*) 2427275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2428275970Scy need_version=no 2429275970Scy need_lib_prefix=no 2430275970Scy ;; 2431275970Scy freebsd-*) 2432275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2433275970Scy need_version=yes 2434275970Scy ;; 2435275970Scy esac 2436275970Scy shlibpath_var=LD_LIBRARY_PATH 2437275970Scy case $host_os in 2438275970Scy freebsd2*) 2439275970Scy shlibpath_overrides_runpath=yes 2440275970Scy ;; 2441275970Scy freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2442275970Scy shlibpath_overrides_runpath=yes 2443275970Scy hardcode_into_libs=yes 2444275970Scy ;; 2445275970Scy freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2446275970Scy freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2447275970Scy shlibpath_overrides_runpath=no 2448275970Scy hardcode_into_libs=yes 2449275970Scy ;; 2450275970Scy *) # from 4.6 on, and DragonFly 2451275970Scy shlibpath_overrides_runpath=yes 2452275970Scy hardcode_into_libs=yes 2453275970Scy ;; 2454275970Scy esac 2455275970Scy ;; 2456275970Scy 2457275970Scygnu*) 2458275970Scy version_type=linux 2459275970Scy need_lib_prefix=no 2460275970Scy need_version=no 2461275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2462275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2463275970Scy shlibpath_var=LD_LIBRARY_PATH 2464275970Scy hardcode_into_libs=yes 2465275970Scy ;; 2466275970Scy 2467275970Scyhaiku*) 2468275970Scy version_type=linux 2469275970Scy need_lib_prefix=no 2470275970Scy need_version=no 2471275970Scy dynamic_linker="$host_os runtime_loader" 2472275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2473275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2474275970Scy shlibpath_var=LIBRARY_PATH 2475275970Scy shlibpath_overrides_runpath=yes 2476275970Scy sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2477275970Scy hardcode_into_libs=yes 2478275970Scy ;; 2479275970Scy 2480275970Scyhpux9* | hpux10* | hpux11*) 2481275970Scy # Give a soname corresponding to the major version so that dld.sl refuses to 2482275970Scy # link against other versions. 2483275970Scy version_type=sunos 2484275970Scy need_lib_prefix=no 2485275970Scy need_version=no 2486275970Scy case $host_cpu in 2487275970Scy ia64*) 2488275970Scy shrext_cmds='.so' 2489275970Scy hardcode_into_libs=yes 2490275970Scy dynamic_linker="$host_os dld.so" 2491275970Scy shlibpath_var=LD_LIBRARY_PATH 2492275970Scy shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2493275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2494275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2495275970Scy if test "X$HPUX_IA64_MODE" = X32; then 2496275970Scy sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2497275970Scy else 2498275970Scy sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2499275970Scy fi 2500275970Scy sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2501275970Scy ;; 2502275970Scy hppa*64*) 2503275970Scy shrext_cmds='.sl' 2504275970Scy hardcode_into_libs=yes 2505275970Scy dynamic_linker="$host_os dld.sl" 2506275970Scy shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2507275970Scy shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2508275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2509275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2510275970Scy sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2511275970Scy sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2512275970Scy ;; 2513275970Scy *) 2514275970Scy shrext_cmds='.sl' 2515275970Scy dynamic_linker="$host_os dld.sl" 2516275970Scy shlibpath_var=SHLIB_PATH 2517275970Scy shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2518275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2519275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2520275970Scy ;; 2521275970Scy esac 2522275970Scy # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2523275970Scy postinstall_cmds='chmod 555 $lib' 2524275970Scy # or fails outright, so override atomically: 2525275970Scy install_override_mode=555 2526275970Scy ;; 2527275970Scy 2528275970Scyinterix[[3-9]]*) 2529275970Scy version_type=linux 2530275970Scy need_lib_prefix=no 2531275970Scy need_version=no 2532275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2533275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2534275970Scy dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2535275970Scy shlibpath_var=LD_LIBRARY_PATH 2536275970Scy shlibpath_overrides_runpath=no 2537275970Scy hardcode_into_libs=yes 2538275970Scy ;; 2539275970Scy 2540275970Scyirix5* | irix6* | nonstopux*) 2541275970Scy case $host_os in 2542275970Scy nonstopux*) version_type=nonstopux ;; 2543275970Scy *) 2544275970Scy if test "$lt_cv_prog_gnu_ld" = yes; then 2545275970Scy version_type=linux 2546275970Scy else 2547275970Scy version_type=irix 2548275970Scy fi ;; 2549275970Scy esac 2550275970Scy need_lib_prefix=no 2551275970Scy need_version=no 2552275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2553275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2554275970Scy case $host_os in 2555275970Scy irix5* | nonstopux*) 2556275970Scy libsuff= shlibsuff= 2557275970Scy ;; 2558275970Scy *) 2559275970Scy case $LD in # libtool.m4 will add one of these switches to LD 2560275970Scy *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2561275970Scy libsuff= shlibsuff= libmagic=32-bit;; 2562275970Scy *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2563275970Scy libsuff=32 shlibsuff=N32 libmagic=N32;; 2564275970Scy *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2565275970Scy libsuff=64 shlibsuff=64 libmagic=64-bit;; 2566275970Scy *) libsuff= shlibsuff= libmagic=never-match;; 2567275970Scy esac 2568275970Scy ;; 2569275970Scy esac 2570275970Scy shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2571275970Scy shlibpath_overrides_runpath=no 2572275970Scy sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2573275970Scy sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2574275970Scy hardcode_into_libs=yes 2575275970Scy ;; 2576275970Scy 2577275970Scy# No shared lib support for Linux oldld, aout, or coff. 2578275970Scylinux*oldld* | linux*aout* | linux*coff*) 2579275970Scy dynamic_linker=no 2580275970Scy ;; 2581275970Scy 2582275970Scy# This must be Linux ELF. 2583275970Scylinux* | k*bsd*-gnu | kopensolaris*-gnu) 2584275970Scy version_type=linux 2585275970Scy need_lib_prefix=no 2586275970Scy need_version=no 2587275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2588275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2589275970Scy finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2590275970Scy shlibpath_var=LD_LIBRARY_PATH 2591275970Scy shlibpath_overrides_runpath=no 2592275970Scy 2593275970Scy # Some binutils ld are patched to set DT_RUNPATH 2594275970Scy AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2595275970Scy [lt_cv_shlibpath_overrides_runpath=no 2596275970Scy save_LDFLAGS=$LDFLAGS 2597275970Scy save_libdir=$libdir 2598275970Scy eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2599275970Scy LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2600275970Scy AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2601275970Scy [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2602275970Scy [lt_cv_shlibpath_overrides_runpath=yes])]) 2603275970Scy LDFLAGS=$save_LDFLAGS 2604275970Scy libdir=$save_libdir 2605275970Scy ]) 2606275970Scy shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2607275970Scy 2608275970Scy # This implies no fast_install, which is unacceptable. 2609275970Scy # Some rework will be needed to allow for fast_install 2610275970Scy # before this can be enabled. 2611275970Scy hardcode_into_libs=yes 2612275970Scy 2613275970Scy # Append ld.so.conf contents to the search path 2614275970Scy if test -f /etc/ld.so.conf; then 2615275970Scy 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' ' '` 2616275970Scy sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2617275970Scy fi 2618275970Scy 2619275970Scy # We used to test for /lib/ld.so.1 and disable shared libraries on 2620275970Scy # powerpc, because MkLinux only supported shared libraries with the 2621275970Scy # GNU dynamic linker. Since this was broken with cross compilers, 2622275970Scy # most powerpc-linux boxes support dynamic linking these days and 2623275970Scy # people can always --disable-shared, the test was removed, and we 2624275970Scy # assume the GNU/Linux dynamic linker is in use. 2625275970Scy dynamic_linker='GNU/Linux ld.so' 2626275970Scy ;; 2627275970Scy 2628275970Scynetbsd*) 2629275970Scy version_type=sunos 2630275970Scy need_lib_prefix=no 2631275970Scy need_version=no 2632275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2633275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2634275970Scy finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2635275970Scy dynamic_linker='NetBSD (a.out) ld.so' 2636275970Scy else 2637275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2638275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2639275970Scy dynamic_linker='NetBSD ld.elf_so' 2640275970Scy fi 2641275970Scy shlibpath_var=LD_LIBRARY_PATH 2642275970Scy shlibpath_overrides_runpath=yes 2643275970Scy hardcode_into_libs=yes 2644275970Scy ;; 2645275970Scy 2646275970Scynewsos6) 2647275970Scy version_type=linux 2648275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2649275970Scy shlibpath_var=LD_LIBRARY_PATH 2650275970Scy shlibpath_overrides_runpath=yes 2651275970Scy ;; 2652275970Scy 2653275970Scy*nto* | *qnx*) 2654275970Scy version_type=qnx 2655275970Scy need_lib_prefix=no 2656275970Scy need_version=no 2657275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2658275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2659275970Scy shlibpath_var=LD_LIBRARY_PATH 2660275970Scy shlibpath_overrides_runpath=no 2661275970Scy hardcode_into_libs=yes 2662275970Scy dynamic_linker='ldqnx.so' 2663275970Scy ;; 2664275970Scy 2665275970Scyopenbsd*) 2666275970Scy version_type=sunos 2667275970Scy sys_lib_dlsearch_path_spec="/usr/lib" 2668275970Scy need_lib_prefix=no 2669275970Scy # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2670275970Scy case $host_os in 2671275970Scy openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2672275970Scy *) need_version=no ;; 2673275970Scy esac 2674275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2675275970Scy finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2676275970Scy shlibpath_var=LD_LIBRARY_PATH 2677275970Scy if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2678275970Scy case $host_os in 2679275970Scy openbsd2.[[89]] | openbsd2.[[89]].*) 2680275970Scy shlibpath_overrides_runpath=no 2681275970Scy ;; 2682275970Scy *) 2683275970Scy shlibpath_overrides_runpath=yes 2684275970Scy ;; 2685275970Scy esac 2686275970Scy else 2687275970Scy shlibpath_overrides_runpath=yes 2688275970Scy fi 2689275970Scy ;; 2690275970Scy 2691275970Scyos2*) 2692275970Scy libname_spec='$name' 2693275970Scy shrext_cmds=".dll" 2694275970Scy need_lib_prefix=no 2695275970Scy library_names_spec='$libname${shared_ext} $libname.a' 2696275970Scy dynamic_linker='OS/2 ld.exe' 2697275970Scy shlibpath_var=LIBPATH 2698275970Scy ;; 2699275970Scy 2700275970Scyosf3* | osf4* | osf5*) 2701275970Scy version_type=osf 2702275970Scy need_lib_prefix=no 2703275970Scy need_version=no 2704275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2705275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2706275970Scy shlibpath_var=LD_LIBRARY_PATH 2707275970Scy sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2708275970Scy sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2709275970Scy ;; 2710275970Scy 2711275970Scyrdos*) 2712275970Scy dynamic_linker=no 2713275970Scy ;; 2714275970Scy 2715275970Scysolaris*) 2716275970Scy version_type=linux 2717275970Scy need_lib_prefix=no 2718275970Scy need_version=no 2719275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2720275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2721275970Scy shlibpath_var=LD_LIBRARY_PATH 2722275970Scy shlibpath_overrides_runpath=yes 2723275970Scy hardcode_into_libs=yes 2724275970Scy # ldd complains unless libraries are executable 2725275970Scy postinstall_cmds='chmod +x $lib' 2726275970Scy ;; 2727275970Scy 2728275970Scysunos4*) 2729275970Scy version_type=sunos 2730275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2731275970Scy finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2732275970Scy shlibpath_var=LD_LIBRARY_PATH 2733275970Scy shlibpath_overrides_runpath=yes 2734275970Scy if test "$with_gnu_ld" = yes; then 2735275970Scy need_lib_prefix=no 2736275970Scy fi 2737275970Scy need_version=yes 2738275970Scy ;; 2739275970Scy 2740275970Scysysv4 | sysv4.3*) 2741275970Scy version_type=linux 2742275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2743275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2744275970Scy shlibpath_var=LD_LIBRARY_PATH 2745275970Scy case $host_vendor in 2746275970Scy sni) 2747275970Scy shlibpath_overrides_runpath=no 2748275970Scy need_lib_prefix=no 2749275970Scy runpath_var=LD_RUN_PATH 2750275970Scy ;; 2751275970Scy siemens) 2752275970Scy need_lib_prefix=no 2753275970Scy ;; 2754275970Scy motorola) 2755275970Scy need_lib_prefix=no 2756275970Scy need_version=no 2757275970Scy shlibpath_overrides_runpath=no 2758275970Scy sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2759275970Scy ;; 2760275970Scy esac 2761275970Scy ;; 2762275970Scy 2763275970Scysysv4*MP*) 2764275970Scy if test -d /usr/nec ;then 2765275970Scy version_type=linux 2766275970Scy library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2767275970Scy soname_spec='$libname${shared_ext}.$major' 2768275970Scy shlibpath_var=LD_LIBRARY_PATH 2769275970Scy fi 2770275970Scy ;; 2771275970Scy 2772275970Scysysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2773275970Scy version_type=freebsd-elf 2774275970Scy need_lib_prefix=no 2775275970Scy need_version=no 2776275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2777275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2778275970Scy shlibpath_var=LD_LIBRARY_PATH 2779275970Scy shlibpath_overrides_runpath=yes 2780275970Scy hardcode_into_libs=yes 2781275970Scy if test "$with_gnu_ld" = yes; then 2782275970Scy sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2783275970Scy else 2784275970Scy sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2785275970Scy case $host_os in 2786275970Scy sco3.2v5*) 2787275970Scy sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2788275970Scy ;; 2789275970Scy esac 2790275970Scy fi 2791275970Scy sys_lib_dlsearch_path_spec='/usr/lib' 2792275970Scy ;; 2793275970Scy 2794275970Scytpf*) 2795275970Scy # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2796275970Scy version_type=linux 2797275970Scy need_lib_prefix=no 2798275970Scy need_version=no 2799275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2800275970Scy shlibpath_var=LD_LIBRARY_PATH 2801275970Scy shlibpath_overrides_runpath=no 2802275970Scy hardcode_into_libs=yes 2803275970Scy ;; 2804275970Scy 2805275970Scyuts4*) 2806275970Scy version_type=linux 2807275970Scy library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2808275970Scy soname_spec='${libname}${release}${shared_ext}$major' 2809275970Scy shlibpath_var=LD_LIBRARY_PATH 2810275970Scy ;; 2811275970Scy 2812275970Scy*) 2813275970Scy dynamic_linker=no 2814275970Scy ;; 2815275970Scyesac 2816275970ScyAC_MSG_RESULT([$dynamic_linker]) 2817275970Scytest "$dynamic_linker" = no && can_build_shared=no 2818275970Scy 2819275970Scyvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2820275970Scyif test "$GCC" = yes; then 2821275970Scy variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2822275970Scyfi 2823275970Scy 2824275970Scyif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2825275970Scy sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2826275970Scyfi 2827275970Scyif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2828275970Scy sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2829275970Scyfi 2830275970Scy 2831275970Scy_LT_DECL([], [variables_saved_for_relink], [1], 2832275970Scy [Variables whose values should be saved in libtool wrapper scripts and 2833275970Scy restored at link time]) 2834275970Scy_LT_DECL([], [need_lib_prefix], [0], 2835275970Scy [Do we need the "lib" prefix for modules?]) 2836275970Scy_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2837275970Scy_LT_DECL([], [version_type], [0], [Library versioning type]) 2838275970Scy_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2839275970Scy_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2840275970Scy_LT_DECL([], [shlibpath_overrides_runpath], [0], 2841275970Scy [Is shlibpath searched before the hard-coded library search path?]) 2842275970Scy_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2843275970Scy_LT_DECL([], [library_names_spec], [1], 2844275970Scy [[List of archive names. First name is the real one, the rest are links. 2845275970Scy The last name is the one that the linker finds with -lNAME]]) 2846275970Scy_LT_DECL([], [soname_spec], [1], 2847275970Scy [[The coded name of the library, if different from the real name]]) 2848275970Scy_LT_DECL([], [install_override_mode], [1], 2849275970Scy [Permission mode override for installation of shared libraries]) 2850275970Scy_LT_DECL([], [postinstall_cmds], [2], 2851275970Scy [Command to use after installation of a shared archive]) 2852275970Scy_LT_DECL([], [postuninstall_cmds], [2], 2853275970Scy [Command to use after uninstallation of a shared archive]) 2854275970Scy_LT_DECL([], [finish_cmds], [2], 2855275970Scy [Commands used to finish a libtool library installation in a directory]) 2856275970Scy_LT_DECL([], [finish_eval], [1], 2857275970Scy [[As "finish_cmds", except a single script fragment to be evaled but 2858275970Scy not shown]]) 2859275970Scy_LT_DECL([], [hardcode_into_libs], [0], 2860275970Scy [Whether we should hardcode library paths into libraries]) 2861275970Scy_LT_DECL([], [sys_lib_search_path_spec], [2], 2862275970Scy [Compile-time system search path for libraries]) 2863275970Scy_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2864275970Scy [Run-time system search path for libraries]) 2865275970Scy])# _LT_SYS_DYNAMIC_LINKER 2866275970Scy 2867275970Scy 2868275970Scy# _LT_PATH_TOOL_PREFIX(TOOL) 2869275970Scy# -------------------------- 2870275970Scy# find a file program which can recognize shared library 2871275970ScyAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2872275970Scy[m4_require([_LT_DECL_EGREP])dnl 2873275970ScyAC_MSG_CHECKING([for $1]) 2874275970ScyAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2875275970Scy[case $MAGIC_CMD in 2876275970Scy[[\\/*] | ?:[\\/]*]) 2877275970Scy lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2878275970Scy ;; 2879275970Scy*) 2880275970Scy lt_save_MAGIC_CMD="$MAGIC_CMD" 2881275970Scy lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2882275970Scydnl $ac_dummy forces splitting on constant user-supplied paths. 2883275970Scydnl POSIX.2 word splitting is done only on the output of word expansions, 2884275970Scydnl not every word. This closes a longstanding sh security hole. 2885275970Scy ac_dummy="m4_if([$2], , $PATH, [$2])" 2886275970Scy for ac_dir in $ac_dummy; do 2887275970Scy IFS="$lt_save_ifs" 2888275970Scy test -z "$ac_dir" && ac_dir=. 2889275970Scy if test -f $ac_dir/$1; then 2890275970Scy lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2891275970Scy if test -n "$file_magic_test_file"; then 2892275970Scy case $deplibs_check_method in 2893275970Scy "file_magic "*) 2894275970Scy file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2895275970Scy MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2896275970Scy if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2897275970Scy $EGREP "$file_magic_regex" > /dev/null; then 2898275970Scy : 2899275970Scy else 2900275970Scy cat <<_LT_EOF 1>&2 2901275970Scy 2902275970Scy*** Warning: the command libtool uses to detect shared libraries, 2903275970Scy*** $file_magic_cmd, produces output that libtool cannot recognize. 2904275970Scy*** The result is that libtool may fail to recognize shared libraries 2905275970Scy*** as such. This will affect the creation of libtool libraries that 2906275970Scy*** depend on shared libraries, but programs linked with such libtool 2907275970Scy*** libraries will work regardless of this problem. Nevertheless, you 2908275970Scy*** may want to report the problem to your system manager and/or to 2909275970Scy*** bug-libtool@gnu.org 2910275970Scy 2911275970Scy_LT_EOF 2912275970Scy fi ;; 2913275970Scy esac 2914275970Scy fi 2915275970Scy break 2916275970Scy fi 2917275970Scy done 2918275970Scy IFS="$lt_save_ifs" 2919275970Scy MAGIC_CMD="$lt_save_MAGIC_CMD" 2920275970Scy ;; 2921275970Scyesac]) 2922275970ScyMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2923275970Scyif test -n "$MAGIC_CMD"; then 2924275970Scy AC_MSG_RESULT($MAGIC_CMD) 2925275970Scyelse 2926275970Scy AC_MSG_RESULT(no) 2927275970Scyfi 2928275970Scy_LT_DECL([], [MAGIC_CMD], [0], 2929275970Scy [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2930275970Scy])# _LT_PATH_TOOL_PREFIX 2931275970Scy 2932275970Scy# Old name: 2933275970ScyAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2934275970Scydnl aclocal-1.4 backwards compatibility: 2935275970Scydnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2936275970Scy 2937275970Scy 2938275970Scy# _LT_PATH_MAGIC 2939275970Scy# -------------- 2940275970Scy# find a file program which can recognize a shared library 2941275970Scym4_defun([_LT_PATH_MAGIC], 2942275970Scy[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2943275970Scyif test -z "$lt_cv_path_MAGIC_CMD"; then 2944275970Scy if test -n "$ac_tool_prefix"; then 2945275970Scy _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2946275970Scy else 2947275970Scy MAGIC_CMD=: 2948275970Scy fi 2949275970Scyfi 2950275970Scy])# _LT_PATH_MAGIC 2951275970Scy 2952275970Scy 2953275970Scy# LT_PATH_LD 2954275970Scy# ---------- 2955275970Scy# find the pathname to the GNU or non-GNU linker 2956275970ScyAC_DEFUN([LT_PATH_LD], 2957275970Scy[AC_REQUIRE([AC_PROG_CC])dnl 2958275970ScyAC_REQUIRE([AC_CANONICAL_HOST])dnl 2959275970ScyAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2960275970Scym4_require([_LT_DECL_SED])dnl 2961275970Scym4_require([_LT_DECL_EGREP])dnl 2962275970Scym4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2963275970Scy 2964275970ScyAC_ARG_WITH([gnu-ld], 2965275970Scy [AS_HELP_STRING([--with-gnu-ld], 2966275970Scy [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2967275970Scy [test "$withval" = no || with_gnu_ld=yes], 2968275970Scy [with_gnu_ld=no])dnl 2969275970Scy 2970275970Scyac_prog=ld 2971275970Scyif test "$GCC" = yes; then 2972275970Scy # Check if gcc -print-prog-name=ld gives a path. 2973275970Scy AC_MSG_CHECKING([for ld used by $CC]) 2974275970Scy case $host in 2975275970Scy *-*-mingw*) 2976275970Scy # gcc leaves a trailing carriage return which upsets mingw 2977275970Scy ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2978275970Scy *) 2979275970Scy ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2980275970Scy esac 2981275970Scy case $ac_prog in 2982275970Scy # Accept absolute paths. 2983275970Scy [[\\/]]* | ?:[[\\/]]*) 2984275970Scy re_direlt='/[[^/]][[^/]]*/\.\./' 2985275970Scy # Canonicalize the pathname of ld 2986275970Scy ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2987275970Scy while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2988275970Scy ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2989275970Scy done 2990275970Scy test -z "$LD" && LD="$ac_prog" 2991275970Scy ;; 2992275970Scy "") 2993275970Scy # If it fails, then pretend we aren't using GCC. 2994275970Scy ac_prog=ld 2995275970Scy ;; 2996275970Scy *) 2997275970Scy # If it is relative, then search for the first ld in PATH. 2998275970Scy with_gnu_ld=unknown 2999275970Scy ;; 3000275970Scy esac 3001275970Scyelif test "$with_gnu_ld" = yes; then 3002275970Scy AC_MSG_CHECKING([for GNU ld]) 3003275970Scyelse 3004275970Scy AC_MSG_CHECKING([for non-GNU ld]) 3005275970Scyfi 3006275970ScyAC_CACHE_VAL(lt_cv_path_LD, 3007275970Scy[if test -z "$LD"; then 3008275970Scy lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3009275970Scy for ac_dir in $PATH; do 3010275970Scy IFS="$lt_save_ifs" 3011275970Scy test -z "$ac_dir" && ac_dir=. 3012275970Scy if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3013275970Scy lt_cv_path_LD="$ac_dir/$ac_prog" 3014275970Scy # Check to see if the program is GNU ld. I'd rather use --version, 3015275970Scy # but apparently some variants of GNU ld only accept -v. 3016275970Scy # Break only if it was the GNU/non-GNU ld that we prefer. 3017275970Scy case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3018275970Scy *GNU* | *'with BFD'*) 3019275970Scy test "$with_gnu_ld" != no && break 3020275970Scy ;; 3021275970Scy *) 3022275970Scy test "$with_gnu_ld" != yes && break 3023275970Scy ;; 3024275970Scy esac 3025275970Scy fi 3026275970Scy done 3027275970Scy IFS="$lt_save_ifs" 3028275970Scyelse 3029275970Scy lt_cv_path_LD="$LD" # Let the user override the test with a path. 3030275970Scyfi]) 3031275970ScyLD="$lt_cv_path_LD" 3032275970Scyif test -n "$LD"; then 3033275970Scy AC_MSG_RESULT($LD) 3034275970Scyelse 3035275970Scy AC_MSG_RESULT(no) 3036275970Scyfi 3037275970Scytest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3038275970Scy_LT_PATH_LD_GNU 3039275970ScyAC_SUBST([LD]) 3040275970Scy 3041275970Scy_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3042275970Scy])# LT_PATH_LD 3043275970Scy 3044275970Scy# Old names: 3045275970ScyAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3046275970ScyAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3047275970Scydnl aclocal-1.4 backwards compatibility: 3048275970Scydnl AC_DEFUN([AM_PROG_LD], []) 3049275970Scydnl AC_DEFUN([AC_PROG_LD], []) 3050275970Scy 3051275970Scy 3052275970Scy# _LT_PATH_LD_GNU 3053275970Scy#- -------------- 3054275970Scym4_defun([_LT_PATH_LD_GNU], 3055275970Scy[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3056275970Scy[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3057275970Scycase `$LD -v 2>&1 </dev/null` in 3058275970Scy*GNU* | *'with BFD'*) 3059275970Scy lt_cv_prog_gnu_ld=yes 3060275970Scy ;; 3061275970Scy*) 3062275970Scy lt_cv_prog_gnu_ld=no 3063275970Scy ;; 3064275970Scyesac]) 3065275970Scywith_gnu_ld=$lt_cv_prog_gnu_ld 3066275970Scy])# _LT_PATH_LD_GNU 3067275970Scy 3068275970Scy 3069275970Scy# _LT_CMD_RELOAD 3070275970Scy# -------------- 3071275970Scy# find reload flag for linker 3072275970Scy# -- PORTME Some linkers may need a different reload flag. 3073275970Scym4_defun([_LT_CMD_RELOAD], 3074275970Scy[AC_CACHE_CHECK([for $LD option to reload object files], 3075275970Scy lt_cv_ld_reload_flag, 3076275970Scy [lt_cv_ld_reload_flag='-r']) 3077275970Scyreload_flag=$lt_cv_ld_reload_flag 3078275970Scycase $reload_flag in 3079275970Scy"" | " "*) ;; 3080275970Scy*) reload_flag=" $reload_flag" ;; 3081275970Scyesac 3082275970Scyreload_cmds='$LD$reload_flag -o $output$reload_objs' 3083275970Scycase $host_os in 3084275970Scy cygwin* | mingw* | pw32* | cegcc*) 3085275970Scy if test "$GCC" != yes; then 3086275970Scy reload_cmds=false 3087275970Scy fi 3088275970Scy ;; 3089275970Scy darwin*) 3090275970Scy if test "$GCC" = yes; then 3091275970Scy reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3092275970Scy else 3093275970Scy reload_cmds='$LD$reload_flag -o $output$reload_objs' 3094275970Scy fi 3095275970Scy ;; 3096275970Scyesac 3097275970Scy_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3098275970Scy_LT_TAGDECL([], [reload_cmds], [2])dnl 3099275970Scy])# _LT_CMD_RELOAD 3100275970Scy 3101275970Scy 3102275970Scy# _LT_CHECK_MAGIC_METHOD 3103275970Scy# ---------------------- 3104275970Scy# how to check for library dependencies 3105275970Scy# -- PORTME fill in with the dynamic library characteristics 3106275970Scym4_defun([_LT_CHECK_MAGIC_METHOD], 3107275970Scy[m4_require([_LT_DECL_EGREP]) 3108275970Scym4_require([_LT_DECL_OBJDUMP]) 3109275970ScyAC_CACHE_CHECK([how to recognize dependent libraries], 3110275970Scylt_cv_deplibs_check_method, 3111275970Scy[lt_cv_file_magic_cmd='$MAGIC_CMD' 3112275970Scylt_cv_file_magic_test_file= 3113275970Scylt_cv_deplibs_check_method='unknown' 3114275970Scy# Need to set the preceding variable on all platforms that support 3115275970Scy# interlibrary dependencies. 3116275970Scy# 'none' -- dependencies not supported. 3117275970Scy# `unknown' -- same as none, but documents that we really don't know. 3118275970Scy# 'pass_all' -- all dependencies passed with no checks. 3119275970Scy# 'test_compile' -- check by making test program. 3120275970Scy# 'file_magic [[regex]]' -- check by looking for files in library path 3121275970Scy# which responds to the $file_magic_cmd with a given extended regex. 3122275970Scy# If you have `file' or equivalent on your system and you're not sure 3123275970Scy# whether `pass_all' will *always* work, you probably want this one. 3124275970Scy 3125275970Scycase $host_os in 3126275970Scyaix[[4-9]]*) 3127275970Scy lt_cv_deplibs_check_method=pass_all 3128275970Scy ;; 3129275970Scy 3130275970Scybeos*) 3131275970Scy lt_cv_deplibs_check_method=pass_all 3132275970Scy ;; 3133275970Scy 3134275970Scybsdi[[45]]*) 3135275970Scy lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3136275970Scy lt_cv_file_magic_cmd='/usr/bin/file -L' 3137275970Scy lt_cv_file_magic_test_file=/shlib/libc.so 3138275970Scy ;; 3139275970Scy 3140275970Scycygwin*) 3141275970Scy # func_win32_libid is a shell function defined in ltmain.sh 3142275970Scy lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3143275970Scy lt_cv_file_magic_cmd='func_win32_libid' 3144275970Scy ;; 3145275970Scy 3146275970Scymingw* | pw32*) 3147275970Scy # Base MSYS/MinGW do not provide the 'file' command needed by 3148275970Scy # func_win32_libid shell function, so use a weaker test based on 'objdump', 3149275970Scy # unless we find 'file', for example because we are cross-compiling. 3150275970Scy # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3151275970Scy if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3152275970Scy lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3153275970Scy lt_cv_file_magic_cmd='func_win32_libid' 3154275970Scy else 3155275970Scy # Keep this pattern in sync with the one in func_win32_libid. 3156275970Scy lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3157275970Scy lt_cv_file_magic_cmd='$OBJDUMP -f' 3158275970Scy fi 3159275970Scy ;; 3160275970Scy 3161275970Scycegcc*) 3162275970Scy # use the weaker test based on 'objdump'. See mingw*. 3163275970Scy lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3164275970Scy lt_cv_file_magic_cmd='$OBJDUMP -f' 3165275970Scy ;; 3166275970Scy 3167275970Scydarwin* | rhapsody*) 3168275970Scy lt_cv_deplibs_check_method=pass_all 3169275970Scy ;; 3170275970Scy 3171275970Scyfreebsd* | dragonfly*) 3172275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3173275970Scy case $host_cpu in 3174275970Scy i*86 ) 3175275970Scy # Not sure whether the presence of OpenBSD here was a mistake. 3176275970Scy # Let's accept both of them until this is cleared up. 3177275970Scy lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3178275970Scy lt_cv_file_magic_cmd=/usr/bin/file 3179275970Scy lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3180275970Scy ;; 3181275970Scy esac 3182275970Scy else 3183275970Scy lt_cv_deplibs_check_method=pass_all 3184275970Scy fi 3185275970Scy ;; 3186275970Scy 3187275970Scygnu*) 3188275970Scy lt_cv_deplibs_check_method=pass_all 3189275970Scy ;; 3190275970Scy 3191275970Scyhaiku*) 3192275970Scy lt_cv_deplibs_check_method=pass_all 3193275970Scy ;; 3194275970Scy 3195275970Scyhpux10.20* | hpux11*) 3196275970Scy lt_cv_file_magic_cmd=/usr/bin/file 3197275970Scy case $host_cpu in 3198275970Scy ia64*) 3199275970Scy lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3200275970Scy lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3201275970Scy ;; 3202275970Scy hppa*64*) 3203275970Scy [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]'] 3204275970Scy lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3205275970Scy ;; 3206275970Scy *) 3207275970Scy lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3208275970Scy lt_cv_file_magic_test_file=/usr/lib/libc.sl 3209275970Scy ;; 3210275970Scy esac 3211275970Scy ;; 3212275970Scy 3213275970Scyinterix[[3-9]]*) 3214275970Scy # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3215275970Scy lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3216275970Scy ;; 3217275970Scy 3218275970Scyirix5* | irix6* | nonstopux*) 3219275970Scy case $LD in 3220275970Scy *-32|*"-32 ") libmagic=32-bit;; 3221275970Scy *-n32|*"-n32 ") libmagic=N32;; 3222275970Scy *-64|*"-64 ") libmagic=64-bit;; 3223275970Scy *) libmagic=never-match;; 3224275970Scy esac 3225275970Scy lt_cv_deplibs_check_method=pass_all 3226275970Scy ;; 3227275970Scy 3228275970Scy# This must be Linux ELF. 3229275970Scylinux* | k*bsd*-gnu | kopensolaris*-gnu) 3230275970Scy lt_cv_deplibs_check_method=pass_all 3231275970Scy ;; 3232275970Scy 3233275970Scynetbsd*) 3234275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3235275970Scy lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3236275970Scy else 3237275970Scy lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3238275970Scy fi 3239275970Scy ;; 3240275970Scy 3241275970Scynewos6*) 3242275970Scy lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3243275970Scy lt_cv_file_magic_cmd=/usr/bin/file 3244275970Scy lt_cv_file_magic_test_file=/usr/lib/libnls.so 3245275970Scy ;; 3246275970Scy 3247275970Scy*nto* | *qnx*) 3248275970Scy lt_cv_deplibs_check_method=pass_all 3249275970Scy ;; 3250275970Scy 3251275970Scyopenbsd*) 3252275970Scy if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3253275970Scy lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3254275970Scy else 3255275970Scy lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3256275970Scy fi 3257275970Scy ;; 3258275970Scy 3259275970Scyosf3* | osf4* | osf5*) 3260275970Scy lt_cv_deplibs_check_method=pass_all 3261275970Scy ;; 3262275970Scy 3263275970Scyrdos*) 3264275970Scy lt_cv_deplibs_check_method=pass_all 3265275970Scy ;; 3266275970Scy 3267275970Scysolaris*) 3268275970Scy lt_cv_deplibs_check_method=pass_all 3269275970Scy ;; 3270275970Scy 3271275970Scysysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3272275970Scy lt_cv_deplibs_check_method=pass_all 3273275970Scy ;; 3274275970Scy 3275275970Scysysv4 | sysv4.3*) 3276275970Scy case $host_vendor in 3277275970Scy motorola) 3278275970Scy 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]]' 3279275970Scy lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3280275970Scy ;; 3281275970Scy ncr) 3282275970Scy lt_cv_deplibs_check_method=pass_all 3283275970Scy ;; 3284275970Scy sequent) 3285275970Scy lt_cv_file_magic_cmd='/bin/file' 3286275970Scy lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3287275970Scy ;; 3288275970Scy sni) 3289275970Scy lt_cv_file_magic_cmd='/bin/file' 3290275970Scy lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3291275970Scy lt_cv_file_magic_test_file=/lib/libc.so 3292275970Scy ;; 3293275970Scy siemens) 3294275970Scy lt_cv_deplibs_check_method=pass_all 3295275970Scy ;; 3296275970Scy pc) 3297275970Scy lt_cv_deplibs_check_method=pass_all 3298275970Scy ;; 3299275970Scy esac 3300275970Scy ;; 3301275970Scy 3302275970Scytpf*) 3303275970Scy lt_cv_deplibs_check_method=pass_all 3304275970Scy ;; 3305275970Scyesac 3306275970Scy]) 3307275970Scy 3308275970Scyfile_magic_glob= 3309275970Scywant_nocaseglob=no 3310275970Scyif test "$build" = "$host"; then 3311275970Scy case $host_os in 3312275970Scy mingw* | pw32*) 3313275970Scy if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3314275970Scy want_nocaseglob=yes 3315275970Scy else 3316275970Scy file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3317275970Scy fi 3318275970Scy ;; 3319275970Scy esac 3320275970Scyfi 3321275970Scy 3322275970Scyfile_magic_cmd=$lt_cv_file_magic_cmd 3323275970Scydeplibs_check_method=$lt_cv_deplibs_check_method 3324275970Scytest -z "$deplibs_check_method" && deplibs_check_method=unknown 3325275970Scy 3326275970Scy_LT_DECL([], [deplibs_check_method], [1], 3327275970Scy [Method to check whether dependent libraries are shared objects]) 3328275970Scy_LT_DECL([], [file_magic_cmd], [1], 3329275970Scy [Command to use when deplibs_check_method = "file_magic"]) 3330275970Scy_LT_DECL([], [file_magic_glob], [1], 3331275970Scy [How to find potential files when deplibs_check_method = "file_magic"]) 3332275970Scy_LT_DECL([], [want_nocaseglob], [1], 3333275970Scy [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3334275970Scy])# _LT_CHECK_MAGIC_METHOD 3335275970Scy 3336275970Scy 3337275970Scy# LT_PATH_NM 3338275970Scy# ---------- 3339275970Scy# find the pathname to a BSD- or MS-compatible name lister 3340275970ScyAC_DEFUN([LT_PATH_NM], 3341275970Scy[AC_REQUIRE([AC_PROG_CC])dnl 3342275970ScyAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3343275970Scy[if test -n "$NM"; then 3344275970Scy # Let the user override the test. 3345275970Scy lt_cv_path_NM="$NM" 3346275970Scyelse 3347275970Scy lt_nm_to_check="${ac_tool_prefix}nm" 3348275970Scy if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3349275970Scy lt_nm_to_check="$lt_nm_to_check nm" 3350275970Scy fi 3351275970Scy for lt_tmp_nm in $lt_nm_to_check; do 3352275970Scy lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3353275970Scy for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3354275970Scy IFS="$lt_save_ifs" 3355275970Scy test -z "$ac_dir" && ac_dir=. 3356275970Scy tmp_nm="$ac_dir/$lt_tmp_nm" 3357275970Scy if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3358275970Scy # Check to see if the nm accepts a BSD-compat flag. 3359275970Scy # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3360275970Scy # nm: unknown option "B" ignored 3361275970Scy # Tru64's nm complains that /dev/null is an invalid object file 3362275970Scy case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3363275970Scy */dev/null* | *'Invalid file or object type'*) 3364275970Scy lt_cv_path_NM="$tmp_nm -B" 3365275970Scy break 3366275970Scy ;; 3367275970Scy *) 3368275970Scy case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3369275970Scy */dev/null*) 3370275970Scy lt_cv_path_NM="$tmp_nm -p" 3371275970Scy break 3372275970Scy ;; 3373275970Scy *) 3374275970Scy lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3375275970Scy continue # so that we can try to find one that supports BSD flags 3376275970Scy ;; 3377275970Scy esac 3378275970Scy ;; 3379275970Scy esac 3380275970Scy fi 3381275970Scy done 3382275970Scy IFS="$lt_save_ifs" 3383275970Scy done 3384275970Scy : ${lt_cv_path_NM=no} 3385275970Scyfi]) 3386275970Scyif test "$lt_cv_path_NM" != "no"; then 3387275970Scy NM="$lt_cv_path_NM" 3388275970Scyelse 3389275970Scy # Didn't find any BSD compatible name lister, look for dumpbin. 3390275970Scy if test -n "$DUMPBIN"; then : 3391275970Scy # Let the user override the test. 3392275970Scy else 3393275970Scy AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3394275970Scy case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3395275970Scy *COFF*) 3396275970Scy DUMPBIN="$DUMPBIN -symbols" 3397275970Scy ;; 3398275970Scy *) 3399275970Scy DUMPBIN=: 3400275970Scy ;; 3401275970Scy esac 3402275970Scy fi 3403275970Scy AC_SUBST([DUMPBIN]) 3404275970Scy if test "$DUMPBIN" != ":"; then 3405275970Scy NM="$DUMPBIN" 3406275970Scy fi 3407275970Scyfi 3408275970Scytest -z "$NM" && NM=nm 3409275970ScyAC_SUBST([NM]) 3410275970Scy_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3411275970Scy 3412275970ScyAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3413275970Scy [lt_cv_nm_interface="BSD nm" 3414275970Scy echo "int some_variable = 0;" > conftest.$ac_ext 3415275970Scy (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3416275970Scy (eval "$ac_compile" 2>conftest.err) 3417275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 3418275970Scy (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3419275970Scy (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3420275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 3421275970Scy (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3422275970Scy cat conftest.out >&AS_MESSAGE_LOG_FD 3423275970Scy if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3424275970Scy lt_cv_nm_interface="MS dumpbin" 3425275970Scy fi 3426275970Scy rm -f conftest*]) 3427275970Scy])# LT_PATH_NM 3428275970Scy 3429275970Scy# Old names: 3430275970ScyAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3431275970ScyAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3432275970Scydnl aclocal-1.4 backwards compatibility: 3433275970Scydnl AC_DEFUN([AM_PROG_NM], []) 3434275970Scydnl AC_DEFUN([AC_PROG_NM], []) 3435275970Scy 3436275970Scy# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3437275970Scy# -------------------------------- 3438275970Scy# how to determine the name of the shared library 3439275970Scy# associated with a specific link library. 3440275970Scy# -- PORTME fill in with the dynamic library characteristics 3441275970Scym4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3442275970Scy[m4_require([_LT_DECL_EGREP]) 3443275970Scym4_require([_LT_DECL_OBJDUMP]) 3444275970Scym4_require([_LT_DECL_DLLTOOL]) 3445275970ScyAC_CACHE_CHECK([how to associate runtime and link libraries], 3446275970Scylt_cv_sharedlib_from_linklib_cmd, 3447275970Scy[lt_cv_sharedlib_from_linklib_cmd='unknown' 3448275970Scy 3449275970Scycase $host_os in 3450275970Scycygwin* | mingw* | pw32* | cegcc*) 3451275970Scy # two different shell functions defined in ltmain.sh 3452275970Scy # decide which to use based on capabilities of $DLLTOOL 3453275970Scy case `$DLLTOOL --help 2>&1` in 3454275970Scy *--identify-strict*) 3455275970Scy lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3456275970Scy ;; 3457275970Scy *) 3458275970Scy lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3459275970Scy ;; 3460275970Scy esac 3461275970Scy ;; 3462275970Scy*) 3463275970Scy # fallback: assume linklib IS sharedlib 3464275970Scy lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3465275970Scy ;; 3466275970Scyesac 3467275970Scy]) 3468275970Scysharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3469275970Scytest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3470275970Scy 3471275970Scy_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3472275970Scy [Command to associate shared and link libraries]) 3473275970Scy])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3474275970Scy 3475275970Scy 3476275970Scy# _LT_PATH_MANIFEST_TOOL 3477275970Scy# ---------------------- 3478275970Scy# locate the manifest tool 3479275970Scym4_defun([_LT_PATH_MANIFEST_TOOL], 3480275970Scy[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3481275970Scytest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3482275970ScyAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3483275970Scy [lt_cv_path_mainfest_tool=no 3484275970Scy echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3485275970Scy $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3486275970Scy cat conftest.err >&AS_MESSAGE_LOG_FD 3487275970Scy if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3488275970Scy lt_cv_path_mainfest_tool=yes 3489275970Scy fi 3490275970Scy rm -f conftest*]) 3491275970Scyif test "x$lt_cv_path_mainfest_tool" != xyes; then 3492275970Scy MANIFEST_TOOL=: 3493275970Scyfi 3494275970Scy_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3495275970Scy])# _LT_PATH_MANIFEST_TOOL 3496275970Scy 3497275970Scy 3498275970Scy# LT_LIB_M 3499275970Scy# -------- 3500275970Scy# check for math library 3501275970ScyAC_DEFUN([LT_LIB_M], 3502275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3503275970ScyLIBM= 3504275970Scycase $host in 3505275970Scy*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3506275970Scy # These system don't have libm, or don't need it 3507275970Scy ;; 3508275970Scy*-ncr-sysv4.3*) 3509275970Scy AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3510275970Scy AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3511275970Scy ;; 3512275970Scy*) 3513275970Scy AC_CHECK_LIB(m, cos, LIBM="-lm") 3514275970Scy ;; 3515275970Scyesac 3516275970ScyAC_SUBST([LIBM]) 3517275970Scy])# LT_LIB_M 3518275970Scy 3519275970Scy# Old name: 3520275970ScyAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3521275970Scydnl aclocal-1.4 backwards compatibility: 3522275970Scydnl AC_DEFUN([AC_CHECK_LIBM], []) 3523275970Scy 3524275970Scy 3525275970Scy# _LT_COMPILER_NO_RTTI([TAGNAME]) 3526275970Scy# ------------------------------- 3527275970Scym4_defun([_LT_COMPILER_NO_RTTI], 3528275970Scy[m4_require([_LT_TAG_COMPILER])dnl 3529275970Scy 3530275970Scy_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3531275970Scy 3532275970Scyif test "$GCC" = yes; then 3533275970Scy case $cc_basename in 3534275970Scy nvcc*) 3535275970Scy _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3536275970Scy *) 3537275970Scy _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3538275970Scy esac 3539275970Scy 3540275970Scy _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3541275970Scy lt_cv_prog_compiler_rtti_exceptions, 3542275970Scy [-fno-rtti -fno-exceptions], [], 3543275970Scy [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3544275970Scyfi 3545275970Scy_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3546275970Scy [Compiler flag to turn off builtin functions]) 3547275970Scy])# _LT_COMPILER_NO_RTTI 3548275970Scy 3549275970Scy 3550275970Scy# _LT_CMD_GLOBAL_SYMBOLS 3551275970Scy# ---------------------- 3552275970Scym4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3553275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3554275970ScyAC_REQUIRE([AC_PROG_CC])dnl 3555275970ScyAC_REQUIRE([AC_PROG_AWK])dnl 3556275970ScyAC_REQUIRE([LT_PATH_NM])dnl 3557275970ScyAC_REQUIRE([LT_PATH_LD])dnl 3558275970Scym4_require([_LT_DECL_SED])dnl 3559275970Scym4_require([_LT_DECL_EGREP])dnl 3560275970Scym4_require([_LT_TAG_COMPILER])dnl 3561275970Scy 3562275970Scy# Check for command to grab the raw symbol name followed by C symbol from nm. 3563275970ScyAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3564275970ScyAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3565275970Scy[ 3566275970Scy# These are sane defaults that work on at least a few old systems. 3567275970Scy# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3568275970Scy 3569275970Scy# Character class describing NM global symbol codes. 3570275970Scysymcode='[[BCDEGRST]]' 3571275970Scy 3572275970Scy# Regexp to match symbols that can be accessed directly from C. 3573275970Scysympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3574275970Scy 3575275970Scy# Define system-specific variables. 3576275970Scycase $host_os in 3577275970Scyaix*) 3578275970Scy symcode='[[BCDT]]' 3579275970Scy ;; 3580275970Scycygwin* | mingw* | pw32* | cegcc*) 3581275970Scy symcode='[[ABCDGISTW]]' 3582275970Scy ;; 3583275970Scyhpux*) 3584275970Scy if test "$host_cpu" = ia64; then 3585275970Scy symcode='[[ABCDEGRST]]' 3586275970Scy fi 3587275970Scy ;; 3588275970Scyirix* | nonstopux*) 3589275970Scy symcode='[[BCDEGRST]]' 3590275970Scy ;; 3591275970Scyosf*) 3592275970Scy symcode='[[BCDEGQRST]]' 3593275970Scy ;; 3594275970Scysolaris*) 3595275970Scy symcode='[[BDRT]]' 3596275970Scy ;; 3597275970Scysco3.2v5*) 3598275970Scy symcode='[[DT]]' 3599275970Scy ;; 3600275970Scysysv4.2uw2*) 3601275970Scy symcode='[[DT]]' 3602275970Scy ;; 3603275970Scysysv5* | sco5v6* | unixware* | OpenUNIX*) 3604275970Scy symcode='[[ABDT]]' 3605275970Scy ;; 3606275970Scysysv4) 3607275970Scy symcode='[[DFNSTU]]' 3608275970Scy ;; 3609275970Scyesac 3610275970Scy 3611275970Scy# If we're using GNU nm, then use its standard symbol codes. 3612275970Scycase `$NM -V 2>&1` in 3613275970Scy*GNU* | *'with BFD'*) 3614275970Scy symcode='[[ABCDGIRSTW]]' ;; 3615275970Scyesac 3616275970Scy 3617275970Scy# Transform an extracted symbol line into a proper C declaration. 3618275970Scy# Some systems (esp. on ia64) link data and code symbols differently, 3619275970Scy# so use this general approach. 3620275970Scylt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3621275970Scy 3622275970Scy# Transform an extracted symbol line into symbol name and symbol address 3623275970Scylt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3624275970Scylt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3625275970Scy 3626275970Scy# Handle CRLF in mingw tool chain 3627275970Scyopt_cr= 3628275970Scycase $build_os in 3629275970Scymingw*) 3630275970Scy opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3631275970Scy ;; 3632275970Scyesac 3633275970Scy 3634275970Scy# Try without a prefix underscore, then with it. 3635275970Scyfor ac_symprfx in "" "_"; do 3636275970Scy 3637275970Scy # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3638275970Scy symxfrm="\\1 $ac_symprfx\\2 \\2" 3639275970Scy 3640275970Scy # Write the raw and C identifiers. 3641275970Scy if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3642275970Scy # Fake it for dumpbin and say T for any non-static function 3643275970Scy # and D for any global variable. 3644275970Scy # Also find C++ and __fastcall symbols from MSVC++, 3645275970Scy # which start with @ or ?. 3646275970Scy lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3647275970Scy" {last_section=section; section=\$ 3};"\ 3648275970Scy" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3649275970Scy" \$ 0!~/External *\|/{next};"\ 3650275970Scy" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3651275970Scy" {if(hide[section]) next};"\ 3652275970Scy" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3653275970Scy" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3654275970Scy" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3655275970Scy" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3656275970Scy" ' prfx=^$ac_symprfx]" 3657275970Scy else 3658275970Scy lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3659275970Scy fi 3660275970Scy lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3661275970Scy 3662275970Scy # Check to see that the pipe works correctly. 3663275970Scy pipe_works=no 3664275970Scy 3665275970Scy rm -f conftest* 3666275970Scy cat > conftest.$ac_ext <<_LT_EOF 3667275970Scy#ifdef __cplusplus 3668275970Scyextern "C" { 3669275970Scy#endif 3670275970Scychar nm_test_var; 3671275970Scyvoid nm_test_func(void); 3672275970Scyvoid nm_test_func(void){} 3673275970Scy#ifdef __cplusplus 3674275970Scy} 3675275970Scy#endif 3676275970Scyint main(){nm_test_var='a';nm_test_func();return(0);} 3677275970Scy_LT_EOF 3678275970Scy 3679275970Scy if AC_TRY_EVAL(ac_compile); then 3680275970Scy # Now try to grab the symbols. 3681275970Scy nlist=conftest.nm 3682275970Scy if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3683275970Scy # Try sorting and uniquifying the output. 3684275970Scy if sort "$nlist" | uniq > "$nlist"T; then 3685275970Scy mv -f "$nlist"T "$nlist" 3686275970Scy else 3687275970Scy rm -f "$nlist"T 3688275970Scy fi 3689275970Scy 3690275970Scy # Make sure that we snagged all the symbols we need. 3691275970Scy if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3692275970Scy if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3693275970Scy cat <<_LT_EOF > conftest.$ac_ext 3694275970Scy/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3695275970Scy#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3696275970Scy/* DATA imports from DLLs on WIN32 con't be const, because runtime 3697275970Scy relocations are performed -- see ld's documentation on pseudo-relocs. */ 3698275970Scy# define LT@&t@_DLSYM_CONST 3699275970Scy#elif defined(__osf__) 3700275970Scy/* This system does not cope well with relocations in const data. */ 3701275970Scy# define LT@&t@_DLSYM_CONST 3702275970Scy#else 3703275970Scy# define LT@&t@_DLSYM_CONST const 3704275970Scy#endif 3705275970Scy 3706275970Scy#ifdef __cplusplus 3707275970Scyextern "C" { 3708275970Scy#endif 3709275970Scy 3710275970Scy_LT_EOF 3711275970Scy # Now generate the symbol file. 3712275970Scy eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3713275970Scy 3714275970Scy cat <<_LT_EOF >> conftest.$ac_ext 3715275970Scy 3716275970Scy/* The mapping between symbol names and symbols. */ 3717275970ScyLT@&t@_DLSYM_CONST struct { 3718275970Scy const char *name; 3719275970Scy void *address; 3720275970Scy} 3721275970Scylt__PROGRAM__LTX_preloaded_symbols[[]] = 3722275970Scy{ 3723275970Scy { "@PROGRAM@", (void *) 0 }, 3724275970Scy_LT_EOF 3725275970Scy $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3726275970Scy cat <<\_LT_EOF >> conftest.$ac_ext 3727275970Scy {0, (void *) 0} 3728275970Scy}; 3729275970Scy 3730275970Scy/* This works around a problem in FreeBSD linker */ 3731275970Scy#ifdef FREEBSD_WORKAROUND 3732275970Scystatic const void *lt_preloaded_setup() { 3733275970Scy return lt__PROGRAM__LTX_preloaded_symbols; 3734275970Scy} 3735275970Scy#endif 3736275970Scy 3737275970Scy#ifdef __cplusplus 3738275970Scy} 3739275970Scy#endif 3740275970Scy_LT_EOF 3741275970Scy # Now try linking the two files. 3742275970Scy mv conftest.$ac_objext conftstm.$ac_objext 3743275970Scy lt_globsym_save_LIBS=$LIBS 3744275970Scy lt_globsym_save_CFLAGS=$CFLAGS 3745275970Scy LIBS="conftstm.$ac_objext" 3746275970Scy CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3747275970Scy if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3748275970Scy pipe_works=yes 3749275970Scy fi 3750275970Scy LIBS=$lt_globsym_save_LIBS 3751275970Scy CFLAGS=$lt_globsym_save_CFLAGS 3752275970Scy else 3753275970Scy echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3754275970Scy fi 3755275970Scy else 3756275970Scy echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3757275970Scy fi 3758275970Scy else 3759275970Scy echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3760275970Scy fi 3761275970Scy else 3762275970Scy echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3763275970Scy cat conftest.$ac_ext >&5 3764275970Scy fi 3765275970Scy rm -rf conftest* conftst* 3766275970Scy 3767275970Scy # Do not use the global_symbol_pipe unless it works. 3768275970Scy if test "$pipe_works" = yes; then 3769275970Scy break 3770275970Scy else 3771275970Scy lt_cv_sys_global_symbol_pipe= 3772275970Scy fi 3773275970Scydone 3774275970Scy]) 3775275970Scyif test -z "$lt_cv_sys_global_symbol_pipe"; then 3776275970Scy lt_cv_sys_global_symbol_to_cdecl= 3777275970Scyfi 3778275970Scyif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3779275970Scy AC_MSG_RESULT(failed) 3780275970Scyelse 3781275970Scy AC_MSG_RESULT(ok) 3782275970Scyfi 3783275970Scy 3784275970Scy# Response file support. 3785275970Scyif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3786275970Scy nm_file_list_spec='@' 3787275970Scyelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3788275970Scy nm_file_list_spec='@' 3789275970Scyfi 3790275970Scy 3791275970Scy_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3792275970Scy [Take the output of nm and produce a listing of raw symbols and C names]) 3793275970Scy_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3794275970Scy [Transform the output of nm in a proper C declaration]) 3795275970Scy_LT_DECL([global_symbol_to_c_name_address], 3796275970Scy [lt_cv_sys_global_symbol_to_c_name_address], [1], 3797275970Scy [Transform the output of nm in a C name address pair]) 3798275970Scy_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3799275970Scy [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3800275970Scy [Transform the output of nm in a C name address pair when lib prefix is needed]) 3801275970Scy_LT_DECL([], [nm_file_list_spec], [1], 3802275970Scy [Specify filename containing input files for $NM]) 3803275970Scy]) # _LT_CMD_GLOBAL_SYMBOLS 3804275970Scy 3805275970Scy 3806275970Scy# _LT_COMPILER_PIC([TAGNAME]) 3807275970Scy# --------------------------- 3808275970Scym4_defun([_LT_COMPILER_PIC], 3809275970Scy[m4_require([_LT_TAG_COMPILER])dnl 3810275970Scy_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3811275970Scy_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3812275970Scy_LT_TAGVAR(lt_prog_compiler_static, $1)= 3813275970Scy 3814275970Scym4_if([$1], [CXX], [ 3815275970Scy # C++ specific cases for pic, static, wl, etc. 3816275970Scy if test "$GXX" = yes; then 3817275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3818275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3819275970Scy 3820275970Scy case $host_os in 3821275970Scy aix*) 3822275970Scy # All AIX code is PIC. 3823275970Scy if test "$host_cpu" = ia64; then 3824275970Scy # AIX 5 now supports IA64 processor 3825275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3826275970Scy fi 3827275970Scy ;; 3828275970Scy 3829275970Scy amigaos*) 3830275970Scy case $host_cpu in 3831275970Scy powerpc) 3832275970Scy # see comment about AmigaOS4 .so support 3833275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3834275970Scy ;; 3835275970Scy m68k) 3836275970Scy # FIXME: we need at least 68020 code to build shared libraries, but 3837275970Scy # adding the `-m68020' flag to GCC prevents building anything better, 3838275970Scy # like `-m68040'. 3839275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3840275970Scy ;; 3841275970Scy esac 3842275970Scy ;; 3843275970Scy 3844275970Scy beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3845275970Scy # PIC is the default for these OSes. 3846275970Scy ;; 3847275970Scy mingw* | cygwin* | os2* | pw32* | cegcc*) 3848275970Scy # This hack is so that the source file can tell whether it is being 3849275970Scy # built for inclusion in a dll (and should export symbols for example). 3850275970Scy # Although the cygwin gcc ignores -fPIC, still need this for old-style 3851275970Scy # (--disable-auto-import) libraries 3852275970Scy m4_if([$1], [GCJ], [], 3853275970Scy [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3854275970Scy ;; 3855275970Scy darwin* | rhapsody*) 3856275970Scy # PIC is the default on this platform 3857275970Scy # Common symbols not allowed in MH_DYLIB files 3858275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3859275970Scy ;; 3860275970Scy *djgpp*) 3861275970Scy # DJGPP does not support shared libraries at all 3862275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3863275970Scy ;; 3864275970Scy haiku*) 3865275970Scy # PIC is the default for Haiku. 3866275970Scy # The "-static" flag exists, but is broken. 3867275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)= 3868275970Scy ;; 3869275970Scy interix[[3-9]]*) 3870275970Scy # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3871275970Scy # Instead, we relocate shared libraries at runtime. 3872275970Scy ;; 3873275970Scy sysv4*MP*) 3874275970Scy if test -d /usr/nec; then 3875275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3876275970Scy fi 3877275970Scy ;; 3878275970Scy hpux*) 3879275970Scy # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3880275970Scy # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3881275970Scy # sets the default TLS model and affects inlining. 3882275970Scy case $host_cpu in 3883275970Scy hppa*64*) 3884275970Scy ;; 3885275970Scy *) 3886275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3887275970Scy ;; 3888275970Scy esac 3889275970Scy ;; 3890275970Scy *qnx* | *nto*) 3891275970Scy # QNX uses GNU C++, but need to define -shared option too, otherwise 3892275970Scy # it will coredump. 3893275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3894275970Scy ;; 3895275970Scy *) 3896275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3897275970Scy ;; 3898275970Scy esac 3899275970Scy else 3900275970Scy case $host_os in 3901275970Scy aix[[4-9]]*) 3902275970Scy # All AIX code is PIC. 3903275970Scy if test "$host_cpu" = ia64; then 3904275970Scy # AIX 5 now supports IA64 processor 3905275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3906275970Scy else 3907275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3908275970Scy fi 3909275970Scy ;; 3910275970Scy chorus*) 3911275970Scy case $cc_basename in 3912275970Scy cxch68*) 3913275970Scy # Green Hills C++ Compiler 3914275970Scy # _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" 3915275970Scy ;; 3916275970Scy esac 3917275970Scy ;; 3918275970Scy mingw* | cygwin* | os2* | pw32* | cegcc*) 3919275970Scy # This hack is so that the source file can tell whether it is being 3920275970Scy # built for inclusion in a dll (and should export symbols for example). 3921275970Scy m4_if([$1], [GCJ], [], 3922275970Scy [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3923275970Scy ;; 3924275970Scy dgux*) 3925275970Scy case $cc_basename in 3926275970Scy ec++*) 3927275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3928275970Scy ;; 3929275970Scy ghcx*) 3930275970Scy # Green Hills C++ Compiler 3931275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3932275970Scy ;; 3933275970Scy *) 3934275970Scy ;; 3935275970Scy esac 3936275970Scy ;; 3937275970Scy freebsd* | dragonfly*) 3938275970Scy # FreeBSD uses GNU C++ 3939275970Scy ;; 3940275970Scy hpux9* | hpux10* | hpux11*) 3941275970Scy case $cc_basename in 3942275970Scy CC*) 3943275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3944275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3945275970Scy if test "$host_cpu" != ia64; then 3946275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3947275970Scy fi 3948275970Scy ;; 3949275970Scy aCC*) 3950275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3951275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3952275970Scy case $host_cpu in 3953275970Scy hppa*64*|ia64*) 3954275970Scy # +Z the default 3955275970Scy ;; 3956275970Scy *) 3957275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3958275970Scy ;; 3959275970Scy esac 3960275970Scy ;; 3961275970Scy *) 3962275970Scy ;; 3963275970Scy esac 3964275970Scy ;; 3965275970Scy interix*) 3966275970Scy # This is c89, which is MS Visual C++ (no shared libs) 3967275970Scy # Anyone wants to do a port? 3968275970Scy ;; 3969275970Scy irix5* | irix6* | nonstopux*) 3970275970Scy case $cc_basename in 3971275970Scy CC*) 3972275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3973275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3974275970Scy # CC pic flag -KPIC is the default. 3975275970Scy ;; 3976275970Scy *) 3977275970Scy ;; 3978275970Scy esac 3979275970Scy ;; 3980275970Scy linux* | k*bsd*-gnu | kopensolaris*-gnu) 3981275970Scy case $cc_basename in 3982275970Scy KCC*) 3983275970Scy # KAI C++ Compiler 3984275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3985275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3986275970Scy ;; 3987275970Scy ecpc* ) 3988275970Scy # old Intel C++ for x86_64 which still supported -KPIC. 3989275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3990275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3991275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3992275970Scy ;; 3993275970Scy icpc* ) 3994275970Scy # Intel C++, used to be incompatible with GCC. 3995275970Scy # ICC 10 doesn't accept -KPIC any more. 3996275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3997275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3998275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3999275970Scy ;; 4000275970Scy pgCC* | pgcpp*) 4001275970Scy # Portland Group C++ compiler 4002275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4004275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4005275970Scy ;; 4006275970Scy cxx*) 4007275970Scy # Compaq C++ 4008275970Scy # Make sure the PIC flag is empty. It appears that all Alpha 4009275970Scy # Linux and Compaq Tru64 Unix objects are PIC. 4010275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4011275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4012275970Scy ;; 4013275970Scy xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4014275970Scy # IBM XL 8.0, 9.0 on PPC and BlueGene 4015275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4017275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4018275970Scy ;; 4019275970Scy *) 4020275970Scy case `$CC -V 2>&1 | sed 5q` in 4021275970Scy *Sun\ C*) 4022275970Scy # Sun C++ 5.9 4023275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4024275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4026275970Scy ;; 4027275970Scy esac 4028275970Scy ;; 4029275970Scy esac 4030275970Scy ;; 4031275970Scy lynxos*) 4032275970Scy ;; 4033275970Scy m88k*) 4034275970Scy ;; 4035275970Scy mvs*) 4036275970Scy case $cc_basename in 4037275970Scy cxx*) 4038275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4039275970Scy ;; 4040275970Scy *) 4041275970Scy ;; 4042275970Scy esac 4043275970Scy ;; 4044275970Scy netbsd*) 4045275970Scy ;; 4046275970Scy *qnx* | *nto*) 4047275970Scy # QNX uses GNU C++, but need to define -shared option too, otherwise 4048275970Scy # it will coredump. 4049275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4050275970Scy ;; 4051275970Scy osf3* | osf4* | osf5*) 4052275970Scy case $cc_basename in 4053275970Scy KCC*) 4054275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4055275970Scy ;; 4056275970Scy RCC*) 4057275970Scy # Rational C++ 2.4.1 4058275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4059275970Scy ;; 4060275970Scy cxx*) 4061275970Scy # Digital/Compaq C++ 4062275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4063275970Scy # Make sure the PIC flag is empty. It appears that all Alpha 4064275970Scy # Linux and Compaq Tru64 Unix objects are PIC. 4065275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4066275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4067275970Scy ;; 4068275970Scy *) 4069275970Scy ;; 4070275970Scy esac 4071275970Scy ;; 4072275970Scy psos*) 4073275970Scy ;; 4074275970Scy solaris*) 4075275970Scy case $cc_basename in 4076275970Scy CC* | sunCC*) 4077275970Scy # Sun C++ 4.2, 5.x and Centerline C++ 4078275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4081275970Scy ;; 4082275970Scy gcx*) 4083275970Scy # Green Hills C++ Compiler 4084275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4085275970Scy ;; 4086275970Scy *) 4087275970Scy ;; 4088275970Scy esac 4089275970Scy ;; 4090275970Scy sunos4*) 4091275970Scy case $cc_basename in 4092275970Scy CC*) 4093275970Scy # Sun C++ 4.x 4094275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4095275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4096275970Scy ;; 4097275970Scy lcc*) 4098275970Scy # Lucid 4099275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4100275970Scy ;; 4101275970Scy *) 4102275970Scy ;; 4103275970Scy esac 4104275970Scy ;; 4105275970Scy sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4106275970Scy case $cc_basename in 4107275970Scy CC*) 4108275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111275970Scy ;; 4112275970Scy esac 4113275970Scy ;; 4114275970Scy tandem*) 4115275970Scy case $cc_basename in 4116275970Scy NCC*) 4117275970Scy # NonStop-UX NCC 3.20 4118275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4119275970Scy ;; 4120275970Scy *) 4121275970Scy ;; 4122275970Scy esac 4123275970Scy ;; 4124275970Scy vxworks*) 4125275970Scy ;; 4126275970Scy *) 4127275970Scy _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4128275970Scy ;; 4129275970Scy esac 4130275970Scy fi 4131275970Scy], 4132275970Scy[ 4133275970Scy if test "$GCC" = yes; then 4134275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4135275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4136275970Scy 4137275970Scy case $host_os in 4138275970Scy aix*) 4139275970Scy # All AIX code is PIC. 4140275970Scy if test "$host_cpu" = ia64; then 4141275970Scy # AIX 5 now supports IA64 processor 4142275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4143275970Scy fi 4144275970Scy ;; 4145275970Scy 4146275970Scy amigaos*) 4147275970Scy case $host_cpu in 4148275970Scy powerpc) 4149275970Scy # see comment about AmigaOS4 .so support 4150275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4151275970Scy ;; 4152275970Scy m68k) 4153275970Scy # FIXME: we need at least 68020 code to build shared libraries, but 4154275970Scy # adding the `-m68020' flag to GCC prevents building anything better, 4155275970Scy # like `-m68040'. 4156275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4157275970Scy ;; 4158275970Scy esac 4159275970Scy ;; 4160275970Scy 4161275970Scy beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4162275970Scy # PIC is the default for these OSes. 4163275970Scy ;; 4164275970Scy 4165275970Scy mingw* | cygwin* | pw32* | os2* | cegcc*) 4166275970Scy # This hack is so that the source file can tell whether it is being 4167275970Scy # built for inclusion in a dll (and should export symbols for example). 4168275970Scy # Although the cygwin gcc ignores -fPIC, still need this for old-style 4169275970Scy # (--disable-auto-import) libraries 4170275970Scy m4_if([$1], [GCJ], [], 4171275970Scy [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4172275970Scy ;; 4173275970Scy 4174275970Scy darwin* | rhapsody*) 4175275970Scy # PIC is the default on this platform 4176275970Scy # Common symbols not allowed in MH_DYLIB files 4177275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4178275970Scy ;; 4179275970Scy 4180275970Scy haiku*) 4181275970Scy # PIC is the default for Haiku. 4182275970Scy # The "-static" flag exists, but is broken. 4183275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)= 4184275970Scy ;; 4185275970Scy 4186275970Scy hpux*) 4187275970Scy # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4188275970Scy # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4189275970Scy # sets the default TLS model and affects inlining. 4190275970Scy case $host_cpu in 4191275970Scy hppa*64*) 4192275970Scy # +Z the default 4193275970Scy ;; 4194275970Scy *) 4195275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4196275970Scy ;; 4197275970Scy esac 4198275970Scy ;; 4199275970Scy 4200275970Scy interix[[3-9]]*) 4201275970Scy # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4202275970Scy # Instead, we relocate shared libraries at runtime. 4203275970Scy ;; 4204275970Scy 4205275970Scy msdosdjgpp*) 4206275970Scy # Just because we use GCC doesn't mean we suddenly get shared libraries 4207275970Scy # on systems that don't support them. 4208275970Scy _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4209275970Scy enable_shared=no 4210275970Scy ;; 4211275970Scy 4212275970Scy *nto* | *qnx*) 4213275970Scy # QNX uses GNU C++, but need to define -shared option too, otherwise 4214275970Scy # it will coredump. 4215275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4216275970Scy ;; 4217275970Scy 4218275970Scy sysv4*MP*) 4219275970Scy if test -d /usr/nec; then 4220275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4221275970Scy fi 4222275970Scy ;; 4223275970Scy 4224275970Scy *) 4225275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4226275970Scy ;; 4227275970Scy esac 4228275970Scy 4229275970Scy case $cc_basename in 4230275970Scy nvcc*) # Cuda Compiler Driver 2.2 4231275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4232275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4233275970Scy ;; 4234275970Scy esac 4235275970Scy else 4236275970Scy # PORTME Check for flag to pass linker flags through the system compiler. 4237275970Scy case $host_os in 4238275970Scy aix*) 4239275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4240275970Scy if test "$host_cpu" = ia64; then 4241275970Scy # AIX 5 now supports IA64 processor 4242275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4243275970Scy else 4244275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4245275970Scy fi 4246275970Scy ;; 4247275970Scy 4248275970Scy mingw* | cygwin* | pw32* | os2* | cegcc*) 4249275970Scy # This hack is so that the source file can tell whether it is being 4250275970Scy # built for inclusion in a dll (and should export symbols for example). 4251275970Scy m4_if([$1], [GCJ], [], 4252275970Scy [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4253275970Scy ;; 4254275970Scy 4255275970Scy hpux9* | hpux10* | hpux11*) 4256275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4257275970Scy # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4258275970Scy # not for PA HP-UX. 4259275970Scy case $host_cpu in 4260275970Scy hppa*64*|ia64*) 4261275970Scy # +Z the default 4262275970Scy ;; 4263275970Scy *) 4264275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4265275970Scy ;; 4266275970Scy esac 4267275970Scy # Is there a better lt_prog_compiler_static that works with the bundled CC? 4268275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4269275970Scy ;; 4270275970Scy 4271275970Scy irix5* | irix6* | nonstopux*) 4272275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4273275970Scy # PIC (with -KPIC) is the default. 4274275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4275275970Scy ;; 4276275970Scy 4277275970Scy linux* | k*bsd*-gnu | kopensolaris*-gnu) 4278275970Scy case $cc_basename in 4279275970Scy # old Intel for x86_64 which still supported -KPIC. 4280275970Scy ecc*) 4281275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4282275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4283275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4284275970Scy ;; 4285275970Scy # icc used to be incompatible with GCC. 4286275970Scy # ICC 10 doesn't accept -KPIC any more. 4287275970Scy icc* | ifort*) 4288275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4289275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4290275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4291275970Scy ;; 4292275970Scy # Lahey Fortran 8.1. 4293275970Scy lf95*) 4294275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4295275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4296275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4297275970Scy ;; 4298275970Scy nagfor*) 4299275970Scy # NAG Fortran compiler 4300275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4301275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4302275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4303275970Scy ;; 4304275970Scy pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4305275970Scy # Portland Group compilers (*not* the Pentium gcc compiler, 4306275970Scy # which looks to be a dead project) 4307275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4308275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4309275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4310275970Scy ;; 4311275970Scy ccc*) 4312275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4313275970Scy # All Alpha code is PIC. 4314275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4315275970Scy ;; 4316275970Scy xl* | bgxl* | bgf* | mpixl*) 4317275970Scy # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4318275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4319275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4320275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4321275970Scy ;; 4322275970Scy *) 4323275970Scy case `$CC -V 2>&1 | sed 5q` in 4324275970Scy *Sun\ F* | *Sun*Fortran*) 4325275970Scy # Sun Fortran 8.3 passes all unrecognized flags to the linker 4326275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4327275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4328275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4329275970Scy ;; 4330275970Scy *Sun\ C*) 4331275970Scy # Sun C 5.9 4332275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4333275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4334275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4335275970Scy ;; 4336275970Scy esac 4337275970Scy ;; 4338275970Scy esac 4339275970Scy ;; 4340275970Scy 4341275970Scy newsos6) 4342275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4343275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4344275970Scy ;; 4345275970Scy 4346275970Scy *nto* | *qnx*) 4347275970Scy # QNX uses GNU C++, but need to define -shared option too, otherwise 4348275970Scy # it will coredump. 4349275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4350275970Scy ;; 4351275970Scy 4352275970Scy osf3* | osf4* | osf5*) 4353275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354275970Scy # All OSF/1 code is PIC. 4355275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4356275970Scy ;; 4357275970Scy 4358275970Scy rdos*) 4359275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4360275970Scy ;; 4361275970Scy 4362275970Scy solaris*) 4363275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4364275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4365275970Scy case $cc_basename in 4366275970Scy f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4367275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4368275970Scy *) 4369275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4370275970Scy esac 4371275970Scy ;; 4372275970Scy 4373275970Scy sunos4*) 4374275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4375275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4376275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4377275970Scy ;; 4378275970Scy 4379275970Scy sysv4 | sysv4.2uw2* | sysv4.3*) 4380275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4381275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4382275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383275970Scy ;; 4384275970Scy 4385275970Scy sysv4*MP*) 4386275970Scy if test -d /usr/nec ;then 4387275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4388275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4389275970Scy fi 4390275970Scy ;; 4391275970Scy 4392275970Scy sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4393275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4394275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4395275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4396275970Scy ;; 4397275970Scy 4398275970Scy unicos*) 4399275970Scy _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400275970Scy _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4401275970Scy ;; 4402275970Scy 4403275970Scy uts4*) 4404275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4405275970Scy _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4406275970Scy ;; 4407275970Scy 4408275970Scy *) 4409275970Scy _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4410275970Scy ;; 4411275970Scy esac 4412275970Scy fi 4413275970Scy]) 4414275970Scycase $host_os in 4415275970Scy # For platforms which do not support PIC, -DPIC is meaningless: 4416275970Scy *djgpp*) 4417275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4418275970Scy ;; 4419275970Scy *) 4420275970Scy _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4421275970Scy ;; 4422275970Scyesac 4423275970Scy 4424275970ScyAC_CACHE_CHECK([for $compiler option to produce PIC], 4425275970Scy [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4426275970Scy [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4427275970Scy_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4428275970Scy 4429275970Scy# 4430275970Scy# Check to make sure the PIC flag actually works. 4431275970Scy# 4432275970Scyif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4433275970Scy _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4434275970Scy [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4435275970Scy [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4436275970Scy [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4437275970Scy "" | " "*) ;; 4438275970Scy *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4439275970Scy esac], 4440275970Scy [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4441275970Scy _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4442275970Scyfi 4443275970Scy_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4444275970Scy [Additional compiler flags for building library objects]) 4445275970Scy 4446275970Scy_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4447275970Scy [How to pass a linker flag through the compiler]) 4448275970Scy# 4449275970Scy# Check to make sure the static flag actually works. 4450275970Scy# 4451275970Scywl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4452275970Scy_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4453275970Scy _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4454275970Scy $lt_tmp_static_flag, 4455275970Scy [], 4456275970Scy [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4457275970Scy_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4458275970Scy [Compiler flag to prevent dynamic linking]) 4459275970Scy])# _LT_COMPILER_PIC 4460275970Scy 4461275970Scy 4462275970Scy# _LT_LINKER_SHLIBS([TAGNAME]) 4463275970Scy# ---------------------------- 4464275970Scy# See if the linker supports building shared libraries. 4465275970Scym4_defun([_LT_LINKER_SHLIBS], 4466275970Scy[AC_REQUIRE([LT_PATH_LD])dnl 4467275970ScyAC_REQUIRE([LT_PATH_NM])dnl 4468275970Scym4_require([_LT_PATH_MANIFEST_TOOL])dnl 4469275970Scym4_require([_LT_FILEUTILS_DEFAULTS])dnl 4470275970Scym4_require([_LT_DECL_EGREP])dnl 4471275970Scym4_require([_LT_DECL_SED])dnl 4472275970Scym4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4473275970Scym4_require([_LT_TAG_COMPILER])dnl 4474275970ScyAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4475275970Scym4_if([$1], [CXX], [ 4476275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4477275970Scy _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4478275970Scy case $host_os in 4479275970Scy aix[[4-9]]*) 4480275970Scy # If we're using GNU nm, then we don't want the "-C" option. 4481275970Scy # -C means demangle to AIX nm, but means don't demangle with GNU nm 4482275970Scy # Also, AIX nm treats weak defined symbols like other global defined 4483275970Scy # symbols, whereas GNU nm marks them as "W". 4484275970Scy if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4485275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4486275970Scy else 4487275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4488275970Scy fi 4489275970Scy ;; 4490275970Scy pw32*) 4491275970Scy _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4492275970Scy ;; 4493275970Scy cygwin* | mingw* | cegcc*) 4494275970Scy case $cc_basename in 4495275970Scy cl*) ;; 4496275970Scy *) 4497275970Scy _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' 4498275970Scy _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4499275970Scy ;; 4500275970Scy esac 4501275970Scy ;; 4502275970Scy *) 4503275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4504275970Scy ;; 4505275970Scy esac 4506275970Scy], [ 4507275970Scy runpath_var= 4508275970Scy _LT_TAGVAR(allow_undefined_flag, $1)= 4509275970Scy _LT_TAGVAR(always_export_symbols, $1)=no 4510275970Scy _LT_TAGVAR(archive_cmds, $1)= 4511275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)= 4512275970Scy _LT_TAGVAR(compiler_needs_object, $1)=no 4513275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4514275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4515275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4516275970Scy _LT_TAGVAR(hardcode_automatic, $1)=no 4517275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 4518275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4519275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4520275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4521275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)= 4522275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=no 4523275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4524275970Scy _LT_TAGVAR(inherit_rpath, $1)=no 4525275970Scy _LT_TAGVAR(link_all_deplibs, $1)=unknown 4526275970Scy _LT_TAGVAR(module_cmds, $1)= 4527275970Scy _LT_TAGVAR(module_expsym_cmds, $1)= 4528275970Scy _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4529275970Scy _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4530275970Scy _LT_TAGVAR(thread_safe_flag_spec, $1)= 4531275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)= 4532275970Scy # include_expsyms should be a list of space-separated symbols to be *always* 4533275970Scy # included in the symbol list 4534275970Scy _LT_TAGVAR(include_expsyms, $1)= 4535275970Scy # exclude_expsyms can be an extended regexp of symbols to exclude 4536275970Scy # it will be wrapped by ` (' and `)$', so one must not match beginning or 4537275970Scy # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4538275970Scy # as well as any symbol that contains `d'. 4539275970Scy _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4540275970Scy # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4541275970Scy # platforms (ab)use it in PIC code, but their linkers get confused if 4542275970Scy # the symbol is explicitly referenced. Since portable code cannot 4543275970Scy # rely on this symbol name, it's probably fine to never include it in 4544275970Scy # preloaded symbol tables. 4545275970Scy # Exclude shared library initialization/finalization symbols. 4546275970Scydnl Note also adjust exclude_expsyms for C++ above. 4547275970Scy extract_expsyms_cmds= 4548275970Scy 4549275970Scy case $host_os in 4550275970Scy cygwin* | mingw* | pw32* | cegcc*) 4551275970Scy # FIXME: the MSVC++ port hasn't been tested in a loooong time 4552275970Scy # When not using gcc, we currently assume that we are using 4553275970Scy # Microsoft Visual C++. 4554275970Scy if test "$GCC" != yes; then 4555275970Scy with_gnu_ld=no 4556275970Scy fi 4557275970Scy ;; 4558275970Scy interix*) 4559275970Scy # we just hope/assume this is gcc and not c89 (= MSVC++) 4560275970Scy with_gnu_ld=yes 4561275970Scy ;; 4562275970Scy openbsd*) 4563275970Scy with_gnu_ld=no 4564275970Scy ;; 4565275970Scy esac 4566275970Scy 4567275970Scy _LT_TAGVAR(ld_shlibs, $1)=yes 4568275970Scy 4569275970Scy # On some targets, GNU ld is compatible enough with the native linker 4570275970Scy # that we're better off using the native interface for both. 4571275970Scy lt_use_gnu_ld_interface=no 4572275970Scy if test "$with_gnu_ld" = yes; then 4573275970Scy case $host_os in 4574275970Scy aix*) 4575275970Scy # The AIX port of GNU ld has always aspired to compatibility 4576275970Scy # with the native linker. However, as the warning in the GNU ld 4577275970Scy # block says, versions before 2.19.5* couldn't really create working 4578275970Scy # shared libraries, regardless of the interface used. 4579275970Scy case `$LD -v 2>&1` in 4580275970Scy *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4581275970Scy *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4582275970Scy *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4583275970Scy *) 4584275970Scy lt_use_gnu_ld_interface=yes 4585275970Scy ;; 4586275970Scy esac 4587275970Scy ;; 4588275970Scy *) 4589275970Scy lt_use_gnu_ld_interface=yes 4590275970Scy ;; 4591275970Scy esac 4592275970Scy fi 4593275970Scy 4594275970Scy if test "$lt_use_gnu_ld_interface" = yes; then 4595275970Scy # If archive_cmds runs LD, not CC, wlarc should be empty 4596275970Scy wlarc='${wl}' 4597275970Scy 4598275970Scy # Set some defaults for GNU ld with shared library support. These 4599275970Scy # are reset later if shared libraries are not supported. Putting them 4600275970Scy # here allows them to be overridden if necessary. 4601275970Scy runpath_var=LD_RUN_PATH 4602275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4603275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4604275970Scy # ancient GNU ld didn't support --whole-archive et. al. 4605275970Scy if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4606275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4607275970Scy else 4608275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)= 4609275970Scy fi 4610275970Scy supports_anon_versioning=no 4611275970Scy case `$LD -v 2>&1` in 4612275970Scy *GNU\ gold*) supports_anon_versioning=yes ;; 4613275970Scy *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4614275970Scy *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4615275970Scy *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4616275970Scy *\ 2.11.*) ;; # other 2.11 versions 4617275970Scy *) supports_anon_versioning=yes ;; 4618275970Scy esac 4619275970Scy 4620275970Scy # See if GNU ld supports shared libraries. 4621275970Scy case $host_os in 4622275970Scy aix[[3-9]]*) 4623275970Scy # On AIX/PPC, the GNU linker is very broken 4624275970Scy if test "$host_cpu" != ia64; then 4625275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4626275970Scy cat <<_LT_EOF 1>&2 4627275970Scy 4628275970Scy*** Warning: the GNU linker, at least up to release 2.19, is reported 4629275970Scy*** to be unable to reliably create shared libraries on AIX. 4630275970Scy*** Therefore, libtool is disabling shared libraries support. If you 4631275970Scy*** really care for shared libraries, you may want to install binutils 4632275970Scy*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4633275970Scy*** You will then need to restart the configuration process. 4634275970Scy 4635275970Scy_LT_EOF 4636275970Scy fi 4637275970Scy ;; 4638275970Scy 4639275970Scy amigaos*) 4640275970Scy case $host_cpu in 4641275970Scy powerpc) 4642275970Scy # see comment about AmigaOS4 .so support 4643275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4644275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='' 4645275970Scy ;; 4646275970Scy m68k) 4647275970Scy _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)' 4648275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4649275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 4650275970Scy ;; 4651275970Scy esac 4652275970Scy ;; 4653275970Scy 4654275970Scy beos*) 4655275970Scy if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4656275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4657275970Scy # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4658275970Scy # support --undefined. This deserves some investigation. FIXME 4659275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4660275970Scy else 4661275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4662275970Scy fi 4663275970Scy ;; 4664275970Scy 4665275970Scy cygwin* | mingw* | pw32* | cegcc*) 4666275970Scy # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4667275970Scy # as there is no search path for DLLs. 4668275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4669275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4670275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4671275970Scy _LT_TAGVAR(always_export_symbols, $1)=no 4672275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4673275970Scy _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' 4674275970Scy _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4675275970Scy 4676275970Scy if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4677275970Scy _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' 4678275970Scy # If the export-symbols file already is a .def file (1st line 4679275970Scy # is EXPORTS), use it as is; otherwise, prepend... 4680275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4681275970Scy cp $export_symbols $output_objdir/$soname.def; 4682275970Scy else 4683275970Scy echo EXPORTS > $output_objdir/$soname.def; 4684275970Scy cat $export_symbols >> $output_objdir/$soname.def; 4685275970Scy fi~ 4686275970Scy $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4687275970Scy else 4688275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4689275970Scy fi 4690275970Scy ;; 4691275970Scy 4692275970Scy haiku*) 4693275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4694275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 4695275970Scy ;; 4696275970Scy 4697275970Scy interix[[3-9]]*) 4698275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 4699275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4700275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4701275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4702275970Scy # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4703275970Scy # Instead, shared libraries are loaded at an image base (0x10000000 by 4704275970Scy # default) and relocated if they conflict, which is a slow very memory 4705275970Scy # consuming and fragmenting process. To avoid this, we pick a random, 4706275970Scy # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4707275970Scy # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4708275970Scy _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' 4709275970Scy _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' 4710275970Scy ;; 4711275970Scy 4712275970Scy gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4713275970Scy tmp_diet=no 4714275970Scy if test "$host_os" = linux-dietlibc; then 4715275970Scy case $cc_basename in 4716275970Scy diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4717275970Scy esac 4718275970Scy fi 4719275970Scy if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4720275970Scy && test "$tmp_diet" = no 4721275970Scy then 4722275970Scy tmp_addflag=' $pic_flag' 4723275970Scy tmp_sharedflag='-shared' 4724275970Scy case $cc_basename,$host_cpu in 4725275970Scy pgcc*) # Portland Group C compiler 4726275970Scy _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' 4727275970Scy tmp_addflag=' $pic_flag' 4728275970Scy ;; 4729275970Scy pgf77* | pgf90* | pgf95* | pgfortran*) 4730275970Scy # Portland Group f77 and f90 compilers 4731275970Scy _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' 4732275970Scy tmp_addflag=' $pic_flag -Mnomain' ;; 4733275970Scy ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4734275970Scy tmp_addflag=' -i_dynamic' ;; 4735275970Scy efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4736275970Scy tmp_addflag=' -i_dynamic -nofor_main' ;; 4737275970Scy ifc* | ifort*) # Intel Fortran compiler 4738275970Scy tmp_addflag=' -nofor_main' ;; 4739275970Scy lf95*) # Lahey Fortran 8.1 4740275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)= 4741275970Scy tmp_sharedflag='--shared' ;; 4742275970Scy xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4743275970Scy tmp_sharedflag='-qmkshrobj' 4744275970Scy tmp_addflag= ;; 4745275970Scy nvcc*) # Cuda Compiler Driver 2.2 4746275970Scy _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' 4747275970Scy _LT_TAGVAR(compiler_needs_object, $1)=yes 4748275970Scy ;; 4749275970Scy esac 4750275970Scy case `$CC -V 2>&1 | sed 5q` in 4751275970Scy *Sun\ C*) # Sun C 5.9 4752275970Scy _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' 4753275970Scy _LT_TAGVAR(compiler_needs_object, $1)=yes 4754275970Scy tmp_sharedflag='-G' ;; 4755275970Scy *Sun\ F*) # Sun Fortran 8.3 4756275970Scy tmp_sharedflag='-G' ;; 4757275970Scy esac 4758275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4759275970Scy 4760275970Scy if test "x$supports_anon_versioning" = xyes; then 4761275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4762275970Scy cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4763275970Scy echo "local: *; };" >> $output_objdir/$libname.ver~ 4764275970Scy $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4765275970Scy fi 4766275970Scy 4767275970Scy case $cc_basename in 4768275970Scy xlf* | bgf* | bgxlf* | mpixlf*) 4769275970Scy # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4770275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4771275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4772275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4773275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4774275970Scy if test "x$supports_anon_versioning" = xyes; then 4775275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4776275970Scy cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4777275970Scy echo "local: *; };" >> $output_objdir/$libname.ver~ 4778275970Scy $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4779275970Scy fi 4780275970Scy ;; 4781275970Scy esac 4782275970Scy else 4783275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4784275970Scy fi 4785275970Scy ;; 4786275970Scy 4787275970Scy netbsd*) 4788275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4789275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4790275970Scy wlarc= 4791275970Scy else 4792275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4793275970Scy _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' 4794275970Scy fi 4795275970Scy ;; 4796275970Scy 4797275970Scy solaris*) 4798275970Scy if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4799275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4800275970Scy cat <<_LT_EOF 1>&2 4801275970Scy 4802275970Scy*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4803275970Scy*** create shared libraries on Solaris systems. Therefore, libtool 4804275970Scy*** is disabling shared libraries support. We urge you to upgrade GNU 4805275970Scy*** binutils to release 2.9.1 or newer. Another option is to modify 4806275970Scy*** your PATH or compiler configuration so that the native linker is 4807275970Scy*** used, and then restart. 4808275970Scy 4809275970Scy_LT_EOF 4810275970Scy elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4811275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4812275970Scy _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' 4813275970Scy else 4814275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4815275970Scy fi 4816275970Scy ;; 4817275970Scy 4818275970Scy sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4819275970Scy case `$LD -v 2>&1` in 4820275970Scy *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4821275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4822275970Scy cat <<_LT_EOF 1>&2 4823275970Scy 4824275970Scy*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4825275970Scy*** reliably create shared libraries on SCO systems. Therefore, libtool 4826275970Scy*** is disabling shared libraries support. We urge you to upgrade GNU 4827275970Scy*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4828275970Scy*** your PATH or compiler configuration so that the native linker is 4829275970Scy*** used, and then restart. 4830275970Scy 4831275970Scy_LT_EOF 4832275970Scy ;; 4833275970Scy *) 4834275970Scy # For security reasons, it is highly recommended that you always 4835275970Scy # use absolute paths for naming shared libraries, and exclude the 4836275970Scy # DT_RUNPATH tag from executables and libraries. But doing so 4837275970Scy # requires that you compile everything twice, which is a pain. 4838275970Scy if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4839275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4840275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4841275970Scy _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' 4842275970Scy else 4843275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4844275970Scy fi 4845275970Scy ;; 4846275970Scy esac 4847275970Scy ;; 4848275970Scy 4849275970Scy sunos4*) 4850275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4851275970Scy wlarc= 4852275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 4853275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4854275970Scy ;; 4855275970Scy 4856275970Scy *) 4857275970Scy if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4858275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4859275970Scy _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' 4860275970Scy else 4861275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 4862275970Scy fi 4863275970Scy ;; 4864275970Scy esac 4865275970Scy 4866275970Scy if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4867275970Scy runpath_var= 4868275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4869275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4870275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)= 4871275970Scy fi 4872275970Scy else 4873275970Scy # PORTME fill in a description of your system's linker (not GNU ld) 4874275970Scy case $host_os in 4875275970Scy aix3*) 4876275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4877275970Scy _LT_TAGVAR(always_export_symbols, $1)=yes 4878275970Scy _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' 4879275970Scy # Note: this linker hardcodes the directories in LIBPATH if there 4880275970Scy # are no directories specified by -L. 4881275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 4882275970Scy if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4883275970Scy # Neither direct hardcoding nor static linking is supported with a 4884275970Scy # broken collect2. 4885275970Scy _LT_TAGVAR(hardcode_direct, $1)=unsupported 4886275970Scy fi 4887275970Scy ;; 4888275970Scy 4889275970Scy aix[[4-9]]*) 4890275970Scy if test "$host_cpu" = ia64; then 4891275970Scy # On IA64, the linker does run time linking by default, so we don't 4892275970Scy # have to do anything special. 4893275970Scy aix_use_runtimelinking=no 4894275970Scy exp_sym_flag='-Bexport' 4895275970Scy no_entry_flag="" 4896275970Scy else 4897275970Scy # If we're using GNU nm, then we don't want the "-C" option. 4898275970Scy # -C means demangle to AIX nm, but means don't demangle with GNU nm 4899275970Scy # Also, AIX nm treats weak defined symbols like other global 4900275970Scy # defined symbols, whereas GNU nm marks them as "W". 4901275970Scy if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4902275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4903275970Scy else 4904275970Scy _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4905275970Scy fi 4906275970Scy aix_use_runtimelinking=no 4907275970Scy 4908275970Scy # Test if we are trying to use run time linking or normal 4909275970Scy # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4910275970Scy # need to do runtime linking. 4911275970Scy case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4912275970Scy for ld_flag in $LDFLAGS; do 4913275970Scy if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4914275970Scy aix_use_runtimelinking=yes 4915275970Scy break 4916275970Scy fi 4917275970Scy done 4918275970Scy ;; 4919275970Scy esac 4920275970Scy 4921275970Scy exp_sym_flag='-bexport' 4922275970Scy no_entry_flag='-bnoentry' 4923275970Scy fi 4924275970Scy 4925275970Scy # When large executables or shared objects are built, AIX ld can 4926275970Scy # have problems creating the table of contents. If linking a library 4927275970Scy # or program results in "error TOC overflow" add -mminimal-toc to 4928275970Scy # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4929275970Scy # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4930275970Scy 4931275970Scy _LT_TAGVAR(archive_cmds, $1)='' 4932275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 4933275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4934275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4935275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 4936275970Scy _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4937275970Scy 4938275970Scy if test "$GCC" = yes; then 4939275970Scy case $host_os in aix4.[[012]]|aix4.[[012]].*) 4940275970Scy # We only want to do this on AIX 4.2 and lower, the check 4941275970Scy # below for broken collect2 doesn't work under 4.3+ 4942275970Scy collect2name=`${CC} -print-prog-name=collect2` 4943275970Scy if test -f "$collect2name" && 4944275970Scy strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4945275970Scy then 4946275970Scy # We have reworked collect2 4947275970Scy : 4948275970Scy else 4949275970Scy # We have old collect2 4950275970Scy _LT_TAGVAR(hardcode_direct, $1)=unsupported 4951275970Scy # It fails to find uninstalled libraries when the uninstalled 4952275970Scy # path is not listed in the libpath. Setting hardcode_minus_L 4953275970Scy # to unsupported forces relinking 4954275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 4955275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4956275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)= 4957275970Scy fi 4958275970Scy ;; 4959275970Scy esac 4960275970Scy shared_flag='-shared' 4961275970Scy if test "$aix_use_runtimelinking" = yes; then 4962275970Scy shared_flag="$shared_flag "'${wl}-G' 4963275970Scy fi 4964275970Scy else 4965275970Scy # not using gcc 4966275970Scy if test "$host_cpu" = ia64; then 4967275970Scy # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4968275970Scy # chokes on -Wl,-G. The following line is correct: 4969275970Scy shared_flag='-G' 4970275970Scy else 4971275970Scy if test "$aix_use_runtimelinking" = yes; then 4972275970Scy shared_flag='${wl}-G' 4973275970Scy else 4974275970Scy shared_flag='${wl}-bM:SRE' 4975275970Scy fi 4976275970Scy fi 4977275970Scy fi 4978275970Scy 4979275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4980275970Scy # It seems that -bexpall does not export symbols beginning with 4981275970Scy # underscore (_), so it is better to generate a list of symbols to export. 4982275970Scy _LT_TAGVAR(always_export_symbols, $1)=yes 4983275970Scy if test "$aix_use_runtimelinking" = yes; then 4984275970Scy # Warning - without using the other runtime loading flags (-brtl), 4985275970Scy # -berok will link without error, but may produce a broken library. 4986275970Scy _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4987275970Scy # Determine the default libpath from the value encoded in an 4988275970Scy # empty executable. 4989275970Scy _LT_SYS_MODULE_PATH_AIX([$1]) 4990275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4991275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 4992275970Scy else 4993275970Scy if test "$host_cpu" = ia64; then 4994275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4995275970Scy _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4996275970Scy _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" 4997275970Scy else 4998275970Scy # Determine the default libpath from the value encoded in an 4999275970Scy # empty executable. 5000275970Scy _LT_SYS_MODULE_PATH_AIX([$1]) 5001275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5002275970Scy # Warning - without using the other run time loading flags, 5003275970Scy # -berok will link without error, but may produce a broken library. 5004275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5005275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5006275970Scy if test "$with_gnu_ld" = yes; then 5007275970Scy # We only use this code for GNU lds that support --whole-archive. 5008275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5009275970Scy else 5010275970Scy # Exported symbols can be pulled into shared objects from archives 5011275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5012275970Scy fi 5013275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5014275970Scy # This is similar to how AIX traditionally builds its shared libraries. 5015275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5016275970Scy fi 5017275970Scy fi 5018275970Scy ;; 5019275970Scy 5020275970Scy amigaos*) 5021275970Scy case $host_cpu in 5022275970Scy powerpc) 5023275970Scy # see comment about AmigaOS4 .so support 5024275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5025275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='' 5026275970Scy ;; 5027275970Scy m68k) 5028275970Scy _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)' 5029275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5030275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5031275970Scy ;; 5032275970Scy esac 5033275970Scy ;; 5034275970Scy 5035275970Scy bsdi[[45]]*) 5036275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5037275970Scy ;; 5038275970Scy 5039275970Scy cygwin* | mingw* | pw32* | cegcc*) 5040275970Scy # When not using gcc, we currently assume that we are using 5041275970Scy # Microsoft Visual C++. 5042275970Scy # hardcode_libdir_flag_spec is actually meaningless, as there is 5043275970Scy # no search path for DLLs. 5044275970Scy case $cc_basename in 5045275970Scy cl*) 5046275970Scy # Native MSVC 5047275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5048275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5049275970Scy _LT_TAGVAR(always_export_symbols, $1)=yes 5050275970Scy _LT_TAGVAR(file_list_spec, $1)='@' 5051275970Scy # Tell ltmain to make .lib files, not .a files. 5052275970Scy libext=lib 5053275970Scy # Tell ltmain to make .dll files, not .so files. 5054275970Scy shrext_cmds=".dll" 5055275970Scy # FIXME: Setting linknames here is a bad hack. 5056275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5057275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5058275970Scy sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5059275970Scy else 5060275970Scy sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5061275970Scy fi~ 5062275970Scy $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5063275970Scy linknames=' 5064275970Scy # The linker will not automatically build a static lib if we build a DLL. 5065275970Scy # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5066275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5067275970Scy _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' 5068275970Scy # Don't use ranlib 5069275970Scy _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5070275970Scy _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5071275970Scy lt_tool_outputfile="@TOOL_OUTPUT@"~ 5072275970Scy case $lt_outputfile in 5073275970Scy *.exe|*.EXE) ;; 5074275970Scy *) 5075275970Scy lt_outputfile="$lt_outputfile.exe" 5076275970Scy lt_tool_outputfile="$lt_tool_outputfile.exe" 5077275970Scy ;; 5078275970Scy esac~ 5079275970Scy if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5080275970Scy $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5081275970Scy $RM "$lt_outputfile.manifest"; 5082275970Scy fi' 5083275970Scy ;; 5084275970Scy *) 5085275970Scy # Assume MSVC wrapper 5086275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5087275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5088275970Scy # Tell ltmain to make .lib files, not .a files. 5089275970Scy libext=lib 5090275970Scy # Tell ltmain to make .dll files, not .so files. 5091275970Scy shrext_cmds=".dll" 5092275970Scy # FIXME: Setting linknames here is a bad hack. 5093275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5094275970Scy # The linker will automatically build a .lib file if we build a DLL. 5095275970Scy _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5096275970Scy # FIXME: Should let the user specify the lib program. 5097275970Scy _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5098275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5099275970Scy ;; 5100275970Scy esac 5101275970Scy ;; 5102275970Scy 5103275970Scy darwin* | rhapsody*) 5104275970Scy _LT_DARWIN_LINKER_FEATURES($1) 5105275970Scy ;; 5106275970Scy 5107275970Scy dgux*) 5108275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5109275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5110275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5111275970Scy ;; 5112275970Scy 5113275970Scy freebsd1*) 5114275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 5115275970Scy ;; 5116275970Scy 5117275970Scy # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5118275970Scy # support. Future versions do this automatically, but an explicit c++rt0.o 5119275970Scy # does not break anything, and helps significantly (at the cost of a little 5120275970Scy # extra space). 5121275970Scy freebsd2.2*) 5122275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5123275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5124275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5125275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5126275970Scy ;; 5127275970Scy 5128275970Scy # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5129275970Scy freebsd2*) 5130275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5131275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5132275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5133275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5134275970Scy ;; 5135275970Scy 5136275970Scy # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5137275970Scy freebsd* | dragonfly*) 5138275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5139275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5140275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5141275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5142275970Scy ;; 5143275970Scy 5144275970Scy hpux9*) 5145275970Scy if test "$GCC" = yes; then 5146275970Scy _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5147275970Scy else 5148275970Scy _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5149275970Scy fi 5150275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5151275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5152275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5153275970Scy 5154275970Scy # hardcode_minus_L: Not really in the search PATH, 5155275970Scy # but as the default location of the library. 5156275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5157275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5158275970Scy ;; 5159275970Scy 5160275970Scy hpux10*) 5161275970Scy if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5162275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5163275970Scy else 5164275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5165275970Scy fi 5166275970Scy if test "$with_gnu_ld" = no; then 5167275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5168275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5169275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5170275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5171275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5172275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5173275970Scy # hardcode_minus_L: Not really in the search PATH, 5174275970Scy # but as the default location of the library. 5175275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5176275970Scy fi 5177275970Scy ;; 5178275970Scy 5179275970Scy hpux11*) 5180275970Scy if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5181275970Scy case $host_cpu in 5182275970Scy hppa*64*) 5183275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5184275970Scy ;; 5185275970Scy ia64*) 5186275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5187275970Scy ;; 5188275970Scy *) 5189275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5190275970Scy ;; 5191275970Scy esac 5192275970Scy else 5193275970Scy case $host_cpu in 5194275970Scy hppa*64*) 5195275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5196275970Scy ;; 5197275970Scy ia64*) 5198275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5199275970Scy ;; 5200275970Scy *) 5201275970Scy m4_if($1, [], [ 5202275970Scy # Older versions of the 11.00 compiler do not understand -b yet 5203275970Scy # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5204275970Scy _LT_LINKER_OPTION([if $CC understands -b], 5205275970Scy _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5206275970Scy [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5207275970Scy [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5208275970Scy [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5209275970Scy ;; 5210275970Scy esac 5211275970Scy fi 5212275970Scy if test "$with_gnu_ld" = no; then 5213275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5214275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5215275970Scy 5216275970Scy case $host_cpu in 5217275970Scy hppa*64*|ia64*) 5218275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 5219275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5220275970Scy ;; 5221275970Scy *) 5222275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5223275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5224275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5225275970Scy 5226275970Scy # hardcode_minus_L: Not really in the search PATH, 5227275970Scy # but as the default location of the library. 5228275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5229275970Scy ;; 5230275970Scy esac 5231275970Scy fi 5232275970Scy ;; 5233275970Scy 5234275970Scy irix5* | irix6* | nonstopux*) 5235275970Scy if test "$GCC" = yes; then 5236275970Scy _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' 5237275970Scy # Try to use the -exported_symbol ld option, if it does not 5238275970Scy # work, assume that -exports_file does not work either and 5239275970Scy # implicitly export all symbols. 5240275970Scy # This should be the same for all languages, so no per-tag cache variable. 5241275970Scy AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5242275970Scy [lt_cv_irix_exported_symbol], 5243275970Scy [save_LDFLAGS="$LDFLAGS" 5244275970Scy LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5245275970Scy AC_LINK_IFELSE( 5246275970Scy [AC_LANG_SOURCE( 5247275970Scy [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5248275970Scy [C++], [[int foo (void) { return 0; }]], 5249275970Scy [Fortran 77], [[ 5250275970Scy subroutine foo 5251275970Scy end]], 5252275970Scy [Fortran], [[ 5253275970Scy subroutine foo 5254275970Scy end]])])], 5255275970Scy [lt_cv_irix_exported_symbol=yes], 5256275970Scy [lt_cv_irix_exported_symbol=no]) 5257275970Scy LDFLAGS="$save_LDFLAGS"]) 5258275970Scy if test "$lt_cv_irix_exported_symbol" = yes; then 5259275970Scy _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' 5260275970Scy fi 5261275970Scy else 5262275970Scy _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' 5263275970Scy _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' 5264275970Scy fi 5265275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5266275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5267275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5268275970Scy _LT_TAGVAR(inherit_rpath, $1)=yes 5269275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 5270275970Scy ;; 5271275970Scy 5272275970Scy netbsd*) 5273275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5274275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5275275970Scy else 5276275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5277275970Scy fi 5278275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5279275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5280275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5281275970Scy ;; 5282275970Scy 5283275970Scy newsos6) 5284275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5285275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5286275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5287275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5288275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5289275970Scy ;; 5290275970Scy 5291275970Scy *nto* | *qnx*) 5292275970Scy ;; 5293275970Scy 5294275970Scy openbsd*) 5295275970Scy if test -f /usr/libexec/ld.so; then 5296275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5297275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5298275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5299275970Scy if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5300275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5301275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5302275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5303275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5304275970Scy else 5305275970Scy case $host_os in 5306275970Scy openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5307275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5308275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5309275970Scy ;; 5310275970Scy *) 5311275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5312275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5313275970Scy ;; 5314275970Scy esac 5315275970Scy fi 5316275970Scy else 5317275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 5318275970Scy fi 5319275970Scy ;; 5320275970Scy 5321275970Scy os2*) 5322275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5323275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5324275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5325275970Scy _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5326275970Scy _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5327275970Scy ;; 5328275970Scy 5329275970Scy osf3*) 5330275970Scy if test "$GCC" = yes; then 5331275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5332275970Scy _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' 5333275970Scy else 5334275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5335275970Scy _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' 5336275970Scy fi 5337275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5338275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5339275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5340275970Scy ;; 5341275970Scy 5342275970Scy osf4* | osf5*) # as osf3* with the addition of -msym flag 5343275970Scy if test "$GCC" = yes; then 5344275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5345275970Scy _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' 5346275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5347275970Scy else 5348275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5349275970Scy _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' 5350275970Scy _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~ 5351275970Scy $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' 5352275970Scy 5353275970Scy # Both c and cxx compiler support -rpath directly 5354275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5355275970Scy fi 5356275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5358275970Scy ;; 5359275970Scy 5360275970Scy solaris*) 5361275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5362275970Scy if test "$GCC" = yes; then 5363275970Scy wlarc='${wl}' 5364275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5365275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5366275970Scy $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' 5367275970Scy else 5368275970Scy case `$CC -V 2>&1` in 5369275970Scy *"Compilers 5.0"*) 5370275970Scy wlarc='' 5371275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5372275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5373275970Scy $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5374275970Scy ;; 5375275970Scy *) 5376275970Scy wlarc='${wl}' 5377275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5378275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5379275970Scy $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5380275970Scy ;; 5381275970Scy esac 5382275970Scy fi 5383275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5384275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5385275970Scy case $host_os in 5386275970Scy solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5387275970Scy *) 5388275970Scy # The compiler driver will combine and reorder linker options, 5389275970Scy # but understands `-z linker_flag'. GCC discards it without `$wl', 5390275970Scy # but is careful enough not to reorder. 5391275970Scy # Supported since Solaris 2.6 (maybe 2.5.1?) 5392275970Scy if test "$GCC" = yes; then 5393275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5394275970Scy else 5395275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5396275970Scy fi 5397275970Scy ;; 5398275970Scy esac 5399275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 5400275970Scy ;; 5401275970Scy 5402275970Scy sunos4*) 5403275970Scy if test "x$host_vendor" = xsequent; then 5404275970Scy # Use $CC to link under sequent, because it throws in some extra .o 5405275970Scy # files that make .init and .fini sections work. 5406275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5407275970Scy else 5408275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5409275970Scy fi 5410275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5411275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5412275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5413275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5414275970Scy ;; 5415275970Scy 5416275970Scy sysv4) 5417275970Scy case $host_vendor in 5418275970Scy sni) 5419275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5420275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5421275970Scy ;; 5422275970Scy siemens) 5423275970Scy ## LD is ld it makes a PLAMLIB 5424275970Scy ## CC just makes a GrossModule. 5425275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5426275970Scy _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5427275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 5428275970Scy ;; 5429275970Scy motorola) 5430275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5431275970Scy _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5432275970Scy ;; 5433275970Scy esac 5434275970Scy runpath_var='LD_RUN_PATH' 5435275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5436275970Scy ;; 5437275970Scy 5438275970Scy sysv4.3*) 5439275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5440275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5441275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5442275970Scy ;; 5443275970Scy 5444275970Scy sysv4*MP*) 5445275970Scy if test -d /usr/nec; then 5446275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5447275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5448275970Scy runpath_var=LD_RUN_PATH 5449275970Scy hardcode_runpath_var=yes 5450275970Scy _LT_TAGVAR(ld_shlibs, $1)=yes 5451275970Scy fi 5452275970Scy ;; 5453275970Scy 5454275970Scy sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5455275970Scy _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5456275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5457275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5458275970Scy runpath_var='LD_RUN_PATH' 5459275970Scy 5460275970Scy if test "$GCC" = yes; then 5461275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5462275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5463275970Scy else 5464275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5465275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5466275970Scy fi 5467275970Scy ;; 5468275970Scy 5469275970Scy sysv5* | sco3.2v5* | sco5v6*) 5470275970Scy # Note: We can NOT use -z defs as we might desire, because we do not 5471275970Scy # link with -lc, and that would cause any symbols used from libc to 5472275970Scy # always be unresolved, which means just about no library would 5473275970Scy # ever link correctly. If we're not using GNU ld we use -z text 5474275970Scy # though, which does catch some bad symbols but isn't as heavy-handed 5475275970Scy # as -z defs. 5476275970Scy _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5477275970Scy _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5478275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5479275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5480275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5481275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5482275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 5483275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5484275970Scy runpath_var='LD_RUN_PATH' 5485275970Scy 5486275970Scy if test "$GCC" = yes; then 5487275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5488275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5489275970Scy else 5490275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5491275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5492275970Scy fi 5493275970Scy ;; 5494275970Scy 5495275970Scy uts4*) 5496275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5497275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5498275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5499275970Scy ;; 5500275970Scy 5501275970Scy *) 5502275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 5503275970Scy ;; 5504275970Scy esac 5505275970Scy 5506275970Scy if test x$host_vendor = xsni; then 5507275970Scy case $host in 5508275970Scy sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5509275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5510275970Scy ;; 5511275970Scy esac 5512275970Scy fi 5513275970Scy fi 5514275970Scy]) 5515275970ScyAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5516275970Scytest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5517275970Scy 5518275970Scy_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5519275970Scy 5520275970Scy_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5521275970Scy_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5522275970Scy_LT_DECL([], [extract_expsyms_cmds], [2], 5523275970Scy [The commands to extract the exported symbol list from a shared archive]) 5524275970Scy 5525275970Scy# 5526275970Scy# Do we need to explicitly link libc? 5527275970Scy# 5528275970Scycase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5529275970Scyx|xyes) 5530275970Scy # Assume -lc should be added 5531275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5532275970Scy 5533275970Scy if test "$enable_shared" = yes && test "$GCC" = yes; then 5534275970Scy case $_LT_TAGVAR(archive_cmds, $1) in 5535275970Scy *'~'*) 5536275970Scy # FIXME: we may have to deal with multi-command sequences. 5537275970Scy ;; 5538275970Scy '$CC '*) 5539275970Scy # Test whether the compiler implicitly links with -lc since on some 5540275970Scy # systems, -lgcc has to come before -lc. If gcc already passes -lc 5541275970Scy # to ld, don't add -lc before -lgcc. 5542275970Scy AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5543275970Scy [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5544275970Scy [$RM conftest* 5545275970Scy echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5546275970Scy 5547275970Scy if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5548275970Scy soname=conftest 5549275970Scy lib=conftest 5550275970Scy libobjs=conftest.$ac_objext 5551275970Scy deplibs= 5552275970Scy wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5553275970Scy pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5554275970Scy compiler_flags=-v 5555275970Scy linker_flags=-v 5556275970Scy verstring= 5557275970Scy output_objdir=. 5558275970Scy libname=conftest 5559275970Scy lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5560275970Scy _LT_TAGVAR(allow_undefined_flag, $1)= 5561275970Scy if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5562275970Scy then 5563275970Scy lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5564275970Scy else 5565275970Scy lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5566275970Scy fi 5567275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5568275970Scy else 5569275970Scy cat conftest.err 1>&5 5570275970Scy fi 5571275970Scy $RM conftest* 5572275970Scy ]) 5573275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5574275970Scy ;; 5575275970Scy esac 5576275970Scy fi 5577275970Scy ;; 5578275970Scyesac 5579275970Scy 5580275970Scy_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5581275970Scy [Whether or not to add -lc for building shared libraries]) 5582275970Scy_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5583275970Scy [enable_shared_with_static_runtimes], [0], 5584275970Scy [Whether or not to disallow shared libs when runtime libs are static]) 5585275970Scy_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5586275970Scy [Compiler flag to allow reflexive dlopens]) 5587275970Scy_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5588275970Scy [Compiler flag to generate shared objects directly from archives]) 5589275970Scy_LT_TAGDECL([], [compiler_needs_object], [1], 5590275970Scy [Whether the compiler copes with passing no objects directly]) 5591275970Scy_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5592275970Scy [Create an old-style archive from a shared archive]) 5593275970Scy_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5594275970Scy [Create a temporary old-style archive to link instead of a shared archive]) 5595275970Scy_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5596275970Scy_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5597275970Scy_LT_TAGDECL([], [module_cmds], [2], 5598275970Scy [Commands used to build a loadable module if different from building 5599275970Scy a shared archive.]) 5600275970Scy_LT_TAGDECL([], [module_expsym_cmds], [2]) 5601275970Scy_LT_TAGDECL([], [with_gnu_ld], [1], 5602275970Scy [Whether we are building with GNU ld or not]) 5603275970Scy_LT_TAGDECL([], [allow_undefined_flag], [1], 5604275970Scy [Flag that allows shared libraries with undefined symbols to be built]) 5605275970Scy_LT_TAGDECL([], [no_undefined_flag], [1], 5606275970Scy [Flag that enforces no undefined symbols]) 5607275970Scy_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5608275970Scy [Flag to hardcode $libdir into a binary during linking. 5609275970Scy This must work even if $libdir does not exist]) 5610275970Scy_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5611275970Scy [[If ld is used when linking, flag to hardcode $libdir into a binary 5612275970Scy during linking. This must work even if $libdir does not exist]]) 5613275970Scy_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5614275970Scy [Whether we need a single "-rpath" flag with a separated argument]) 5615275970Scy_LT_TAGDECL([], [hardcode_direct], [0], 5616275970Scy [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5617275970Scy DIR into the resulting binary]) 5618275970Scy_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5619275970Scy [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5620275970Scy DIR into the resulting binary and the resulting library dependency is 5621275970Scy "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5622275970Scy library is relocated]) 5623275970Scy_LT_TAGDECL([], [hardcode_minus_L], [0], 5624275970Scy [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5625275970Scy into the resulting binary]) 5626275970Scy_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5627275970Scy [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5628275970Scy into the resulting binary]) 5629275970Scy_LT_TAGDECL([], [hardcode_automatic], [0], 5630275970Scy [Set to "yes" if building a shared library automatically hardcodes DIR 5631275970Scy into the library and all subsequent libraries and executables linked 5632275970Scy against it]) 5633275970Scy_LT_TAGDECL([], [inherit_rpath], [0], 5634275970Scy [Set to yes if linker adds runtime paths of dependent libraries 5635275970Scy to runtime path list]) 5636275970Scy_LT_TAGDECL([], [link_all_deplibs], [0], 5637275970Scy [Whether libtool must link a program against all its dependency libraries]) 5638275970Scy_LT_TAGDECL([], [always_export_symbols], [0], 5639275970Scy [Set to "yes" if exported symbols are required]) 5640275970Scy_LT_TAGDECL([], [export_symbols_cmds], [2], 5641275970Scy [The commands to list exported symbols]) 5642275970Scy_LT_TAGDECL([], [exclude_expsyms], [1], 5643275970Scy [Symbols that should not be listed in the preloaded symbols]) 5644275970Scy_LT_TAGDECL([], [include_expsyms], [1], 5645275970Scy [Symbols that must always be exported]) 5646275970Scy_LT_TAGDECL([], [prelink_cmds], [2], 5647275970Scy [Commands necessary for linking programs (against libraries) with templates]) 5648275970Scy_LT_TAGDECL([], [postlink_cmds], [2], 5649275970Scy [Commands necessary for finishing linking programs]) 5650275970Scy_LT_TAGDECL([], [file_list_spec], [1], 5651275970Scy [Specify filename containing input files]) 5652275970Scydnl FIXME: Not yet implemented 5653275970Scydnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5654275970Scydnl [Compiler flag to generate thread safe objects]) 5655275970Scy])# _LT_LINKER_SHLIBS 5656275970Scy 5657275970Scy 5658275970Scy# _LT_LANG_C_CONFIG([TAG]) 5659275970Scy# ------------------------ 5660275970Scy# Ensure that the configuration variables for a C compiler are suitably 5661275970Scy# defined. These variables are subsequently used by _LT_CONFIG to write 5662275970Scy# the compiler configuration to `libtool'. 5663275970Scym4_defun([_LT_LANG_C_CONFIG], 5664275970Scy[m4_require([_LT_DECL_EGREP])dnl 5665275970Scylt_save_CC="$CC" 5666275970ScyAC_LANG_PUSH(C) 5667275970Scy 5668275970Scy# Source file extension for C test sources. 5669275970Scyac_ext=c 5670275970Scy 5671275970Scy# Object file extension for compiled C test sources. 5672275970Scyobjext=o 5673275970Scy_LT_TAGVAR(objext, $1)=$objext 5674275970Scy 5675275970Scy# Code to be used in simple compile tests 5676275970Scylt_simple_compile_test_code="int some_variable = 0;" 5677275970Scy 5678275970Scy# Code to be used in simple link tests 5679275970Scylt_simple_link_test_code='int main(){return(0);}' 5680275970Scy 5681275970Scy_LT_TAG_COMPILER 5682275970Scy# Save the default compiler, since it gets overwritten when the other 5683275970Scy# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5684275970Scycompiler_DEFAULT=$CC 5685275970Scy 5686275970Scy# save warnings/boilerplate of simple test code 5687275970Scy_LT_COMPILER_BOILERPLATE 5688275970Scy_LT_LINKER_BOILERPLATE 5689275970Scy 5690275970Scy## CAVEAT EMPTOR: 5691275970Scy## There is no encapsulation within the following macros, do not change 5692275970Scy## the running order or otherwise move them around unless you know exactly 5693275970Scy## what you are doing... 5694275970Scyif test -n "$compiler"; then 5695275970Scy _LT_COMPILER_NO_RTTI($1) 5696275970Scy _LT_COMPILER_PIC($1) 5697275970Scy _LT_COMPILER_C_O($1) 5698275970Scy _LT_COMPILER_FILE_LOCKS($1) 5699275970Scy _LT_LINKER_SHLIBS($1) 5700275970Scy _LT_SYS_DYNAMIC_LINKER($1) 5701275970Scy _LT_LINKER_HARDCODE_LIBPATH($1) 5702275970Scy LT_SYS_DLOPEN_SELF 5703275970Scy _LT_CMD_STRIPLIB 5704275970Scy 5705275970Scy # Report which library types will actually be built 5706275970Scy AC_MSG_CHECKING([if libtool supports shared libraries]) 5707275970Scy AC_MSG_RESULT([$can_build_shared]) 5708275970Scy 5709275970Scy AC_MSG_CHECKING([whether to build shared libraries]) 5710275970Scy test "$can_build_shared" = "no" && enable_shared=no 5711275970Scy 5712275970Scy # On AIX, shared libraries and static libraries use the same namespace, and 5713275970Scy # are all built from PIC. 5714275970Scy case $host_os in 5715275970Scy aix3*) 5716275970Scy test "$enable_shared" = yes && enable_static=no 5717275970Scy if test -n "$RANLIB"; then 5718275970Scy archive_cmds="$archive_cmds~\$RANLIB \$lib" 5719275970Scy postinstall_cmds='$RANLIB $lib' 5720275970Scy fi 5721275970Scy ;; 5722275970Scy 5723275970Scy aix[[4-9]]*) 5724275970Scy if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5725275970Scy test "$enable_shared" = yes && enable_static=no 5726275970Scy fi 5727275970Scy ;; 5728275970Scy esac 5729275970Scy AC_MSG_RESULT([$enable_shared]) 5730275970Scy 5731275970Scy AC_MSG_CHECKING([whether to build static libraries]) 5732275970Scy # Make sure either enable_shared or enable_static is yes. 5733275970Scy test "$enable_shared" = yes || enable_static=yes 5734275970Scy AC_MSG_RESULT([$enable_static]) 5735275970Scy 5736275970Scy _LT_CONFIG($1) 5737275970Scyfi 5738275970ScyAC_LANG_POP 5739275970ScyCC="$lt_save_CC" 5740275970Scy])# _LT_LANG_C_CONFIG 5741275970Scy 5742275970Scy 5743275970Scy# _LT_LANG_CXX_CONFIG([TAG]) 5744275970Scy# -------------------------- 5745275970Scy# Ensure that the configuration variables for a C++ compiler are suitably 5746275970Scy# defined. These variables are subsequently used by _LT_CONFIG to write 5747275970Scy# the compiler configuration to `libtool'. 5748275970Scym4_defun([_LT_LANG_CXX_CONFIG], 5749275970Scy[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5750275970Scym4_require([_LT_DECL_EGREP])dnl 5751275970Scym4_require([_LT_PATH_MANIFEST_TOOL])dnl 5752275970Scyif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5753275970Scy ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5754275970Scy (test "X$CXX" != "Xg++"))) ; then 5755275970Scy AC_PROG_CXXCPP 5756275970Scyelse 5757275970Scy _lt_caught_CXX_error=yes 5758275970Scyfi 5759275970Scy 5760275970ScyAC_LANG_PUSH(C++) 5761275970Scy_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5762275970Scy_LT_TAGVAR(allow_undefined_flag, $1)= 5763275970Scy_LT_TAGVAR(always_export_symbols, $1)=no 5764275970Scy_LT_TAGVAR(archive_expsym_cmds, $1)= 5765275970Scy_LT_TAGVAR(compiler_needs_object, $1)=no 5766275970Scy_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5767275970Scy_LT_TAGVAR(hardcode_direct, $1)=no 5768275970Scy_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5769275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5770275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5771275970Scy_LT_TAGVAR(hardcode_libdir_separator, $1)= 5772275970Scy_LT_TAGVAR(hardcode_minus_L, $1)=no 5773275970Scy_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5774275970Scy_LT_TAGVAR(hardcode_automatic, $1)=no 5775275970Scy_LT_TAGVAR(inherit_rpath, $1)=no 5776275970Scy_LT_TAGVAR(module_cmds, $1)= 5777275970Scy_LT_TAGVAR(module_expsym_cmds, $1)= 5778275970Scy_LT_TAGVAR(link_all_deplibs, $1)=unknown 5779275970Scy_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5780275970Scy_LT_TAGVAR(reload_flag, $1)=$reload_flag 5781275970Scy_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5782275970Scy_LT_TAGVAR(no_undefined_flag, $1)= 5783275970Scy_LT_TAGVAR(whole_archive_flag_spec, $1)= 5784275970Scy_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5785275970Scy 5786275970Scy# Source file extension for C++ test sources. 5787275970Scyac_ext=cpp 5788275970Scy 5789275970Scy# Object file extension for compiled C++ test sources. 5790275970Scyobjext=o 5791275970Scy_LT_TAGVAR(objext, $1)=$objext 5792275970Scy 5793275970Scy# No sense in running all these tests if we already determined that 5794275970Scy# the CXX compiler isn't working. Some variables (like enable_shared) 5795275970Scy# are currently assumed to apply to all compilers on this platform, 5796275970Scy# and will be corrupted by setting them based on a non-working compiler. 5797275970Scyif test "$_lt_caught_CXX_error" != yes; then 5798275970Scy # Code to be used in simple compile tests 5799275970Scy lt_simple_compile_test_code="int some_variable = 0;" 5800275970Scy 5801275970Scy # Code to be used in simple link tests 5802275970Scy lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5803275970Scy 5804275970Scy # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5805275970Scy _LT_TAG_COMPILER 5806275970Scy 5807275970Scy # save warnings/boilerplate of simple test code 5808275970Scy _LT_COMPILER_BOILERPLATE 5809275970Scy _LT_LINKER_BOILERPLATE 5810275970Scy 5811275970Scy # Allow CC to be a program name with arguments. 5812275970Scy lt_save_CC=$CC 5813275970Scy lt_save_CFLAGS=$CFLAGS 5814275970Scy lt_save_LD=$LD 5815275970Scy lt_save_GCC=$GCC 5816275970Scy GCC=$GXX 5817275970Scy lt_save_with_gnu_ld=$with_gnu_ld 5818275970Scy lt_save_path_LD=$lt_cv_path_LD 5819275970Scy if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5820275970Scy lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5821275970Scy else 5822275970Scy $as_unset lt_cv_prog_gnu_ld 5823275970Scy fi 5824275970Scy if test -n "${lt_cv_path_LDCXX+set}"; then 5825275970Scy lt_cv_path_LD=$lt_cv_path_LDCXX 5826275970Scy else 5827275970Scy $as_unset lt_cv_path_LD 5828275970Scy fi 5829275970Scy test -z "${LDCXX+set}" || LD=$LDCXX 5830275970Scy CC=${CXX-"c++"} 5831275970Scy CFLAGS=$CXXFLAGS 5832275970Scy compiler=$CC 5833275970Scy _LT_TAGVAR(compiler, $1)=$CC 5834275970Scy _LT_CC_BASENAME([$compiler]) 5835275970Scy 5836275970Scy if test -n "$compiler"; then 5837275970Scy # We don't want -fno-exception when compiling C++ code, so set the 5838275970Scy # no_builtin_flag separately 5839275970Scy if test "$GXX" = yes; then 5840275970Scy _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5841275970Scy else 5842275970Scy _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5843275970Scy fi 5844275970Scy 5845275970Scy if test "$GXX" = yes; then 5846275970Scy # Set up default GNU C++ configuration 5847275970Scy 5848275970Scy LT_PATH_LD 5849275970Scy 5850275970Scy # Check if GNU C++ uses GNU ld as the underlying linker, since the 5851275970Scy # archiving commands below assume that GNU ld is being used. 5852275970Scy if test "$with_gnu_ld" = yes; then 5853275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5854275970Scy _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' 5855275970Scy 5856275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5857275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5858275970Scy 5859275970Scy # If archive_cmds runs LD, not CC, wlarc should be empty 5860275970Scy # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5861275970Scy # investigate it a little bit more. (MM) 5862275970Scy wlarc='${wl}' 5863275970Scy 5864275970Scy # ancient GNU ld didn't support --whole-archive et. al. 5865275970Scy if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5866275970Scy $GREP 'no-whole-archive' > /dev/null; then 5867275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5868275970Scy else 5869275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)= 5870275970Scy fi 5871275970Scy else 5872275970Scy with_gnu_ld=no 5873275970Scy wlarc= 5874275970Scy 5875275970Scy # A generic and very simple default shared library creation 5876275970Scy # command for GNU C++ for the case where it uses the native 5877275970Scy # linker, instead of GNU ld. If possible, this setting should 5878275970Scy # overridden to take advantage of the native linker features on 5879275970Scy # the platform it is being used on. 5880275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5881275970Scy fi 5882275970Scy 5883275970Scy # Commands to make compiler produce verbose output that lists 5884275970Scy # what "hidden" libraries, object files and flags are used when 5885275970Scy # linking a shared library. 5886275970Scy output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5887275970Scy 5888275970Scy else 5889275970Scy GXX=no 5890275970Scy with_gnu_ld=no 5891275970Scy wlarc= 5892275970Scy fi 5893275970Scy 5894275970Scy # PORTME: fill in a description of your system's C++ link characteristics 5895275970Scy AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5896275970Scy _LT_TAGVAR(ld_shlibs, $1)=yes 5897275970Scy case $host_os in 5898275970Scy aix3*) 5899275970Scy # FIXME: insert proper C++ library support 5900275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 5901275970Scy ;; 5902275970Scy aix[[4-9]]*) 5903275970Scy if test "$host_cpu" = ia64; then 5904275970Scy # On IA64, the linker does run time linking by default, so we don't 5905275970Scy # have to do anything special. 5906275970Scy aix_use_runtimelinking=no 5907275970Scy exp_sym_flag='-Bexport' 5908275970Scy no_entry_flag="" 5909275970Scy else 5910275970Scy aix_use_runtimelinking=no 5911275970Scy 5912275970Scy # Test if we are trying to use run time linking or normal 5913275970Scy # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5914275970Scy # need to do runtime linking. 5915275970Scy case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5916275970Scy for ld_flag in $LDFLAGS; do 5917275970Scy case $ld_flag in 5918275970Scy *-brtl*) 5919275970Scy aix_use_runtimelinking=yes 5920275970Scy break 5921275970Scy ;; 5922275970Scy esac 5923275970Scy done 5924275970Scy ;; 5925275970Scy esac 5926275970Scy 5927275970Scy exp_sym_flag='-bexport' 5928275970Scy no_entry_flag='-bnoentry' 5929275970Scy fi 5930275970Scy 5931275970Scy # When large executables or shared objects are built, AIX ld can 5932275970Scy # have problems creating the table of contents. If linking a library 5933275970Scy # or program results in "error TOC overflow" add -mminimal-toc to 5934275970Scy # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935275970Scy # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936275970Scy 5937275970Scy _LT_TAGVAR(archive_cmds, $1)='' 5938275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 5939275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5940275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5941275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 5942275970Scy _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5943275970Scy 5944275970Scy if test "$GXX" = yes; then 5945275970Scy case $host_os in aix4.[[012]]|aix4.[[012]].*) 5946275970Scy # We only want to do this on AIX 4.2 and lower, the check 5947275970Scy # below for broken collect2 doesn't work under 4.3+ 5948275970Scy collect2name=`${CC} -print-prog-name=collect2` 5949275970Scy if test -f "$collect2name" && 5950275970Scy strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5951275970Scy then 5952275970Scy # We have reworked collect2 5953275970Scy : 5954275970Scy else 5955275970Scy # We have old collect2 5956275970Scy _LT_TAGVAR(hardcode_direct, $1)=unsupported 5957275970Scy # It fails to find uninstalled libraries when the uninstalled 5958275970Scy # path is not listed in the libpath. Setting hardcode_minus_L 5959275970Scy # to unsupported forces relinking 5960275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes 5961275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5962275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)= 5963275970Scy fi 5964275970Scy esac 5965275970Scy shared_flag='-shared' 5966275970Scy if test "$aix_use_runtimelinking" = yes; then 5967275970Scy shared_flag="$shared_flag "'${wl}-G' 5968275970Scy fi 5969275970Scy else 5970275970Scy # not using gcc 5971275970Scy if test "$host_cpu" = ia64; then 5972275970Scy # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5973275970Scy # chokes on -Wl,-G. The following line is correct: 5974275970Scy shared_flag='-G' 5975275970Scy else 5976275970Scy if test "$aix_use_runtimelinking" = yes; then 5977275970Scy shared_flag='${wl}-G' 5978275970Scy else 5979275970Scy shared_flag='${wl}-bM:SRE' 5980275970Scy fi 5981275970Scy fi 5982275970Scy fi 5983275970Scy 5984275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5985275970Scy # It seems that -bexpall does not export symbols beginning with 5986275970Scy # underscore (_), so it is better to generate a list of symbols to 5987275970Scy # export. 5988275970Scy _LT_TAGVAR(always_export_symbols, $1)=yes 5989275970Scy if test "$aix_use_runtimelinking" = yes; then 5990275970Scy # Warning - without using the other runtime loading flags (-brtl), 5991275970Scy # -berok will link without error, but may produce a broken library. 5992275970Scy _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5993275970Scy # Determine the default libpath from the value encoded in an empty 5994275970Scy # executable. 5995275970Scy _LT_SYS_MODULE_PATH_AIX([$1]) 5996275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5997275970Scy 5998275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5999275970Scy else 6000275970Scy if test "$host_cpu" = ia64; then 6001275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6002275970Scy _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6003275970Scy _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" 6004275970Scy else 6005275970Scy # Determine the default libpath from the value encoded in an 6006275970Scy # empty executable. 6007275970Scy _LT_SYS_MODULE_PATH_AIX([$1]) 6008275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6009275970Scy # Warning - without using the other run time loading flags, 6010275970Scy # -berok will link without error, but may produce a broken library. 6011275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6012275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6013275970Scy if test "$with_gnu_ld" = yes; then 6014275970Scy # We only use this code for GNU lds that support --whole-archive. 6015275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6016275970Scy else 6017275970Scy # Exported symbols can be pulled into shared objects from archives 6018275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6019275970Scy fi 6020275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6021275970Scy # This is similar to how AIX traditionally builds its shared 6022275970Scy # libraries. 6023275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6024275970Scy fi 6025275970Scy fi 6026275970Scy ;; 6027275970Scy 6028275970Scy beos*) 6029275970Scy if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6030275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6031275970Scy # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6032275970Scy # support --undefined. This deserves some investigation. FIXME 6033275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6034275970Scy else 6035275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6036275970Scy fi 6037275970Scy ;; 6038275970Scy 6039275970Scy chorus*) 6040275970Scy case $cc_basename in 6041275970Scy *) 6042275970Scy # FIXME: insert proper C++ library support 6043275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6044275970Scy ;; 6045275970Scy esac 6046275970Scy ;; 6047275970Scy 6048275970Scy cygwin* | mingw* | pw32* | cegcc*) 6049275970Scy case $GXX,$cc_basename in 6050275970Scy ,cl* | no,cl*) 6051275970Scy # Native MSVC 6052275970Scy # hardcode_libdir_flag_spec is actually meaningless, as there is 6053275970Scy # no search path for DLLs. 6054275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6055275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6056275970Scy _LT_TAGVAR(always_export_symbols, $1)=yes 6057275970Scy _LT_TAGVAR(file_list_spec, $1)='@' 6058275970Scy # Tell ltmain to make .lib files, not .a files. 6059275970Scy libext=lib 6060275970Scy # Tell ltmain to make .dll files, not .so files. 6061275970Scy shrext_cmds=".dll" 6062275970Scy # FIXME: Setting linknames here is a bad hack. 6063275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6064275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6065275970Scy $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6066275970Scy else 6067275970Scy $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6068275970Scy fi~ 6069275970Scy $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6070275970Scy linknames=' 6071275970Scy # The linker will not automatically build a static lib if we build a DLL. 6072275970Scy # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6073275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6074275970Scy # Don't use ranlib 6075275970Scy _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6076275970Scy _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6077275970Scy lt_tool_outputfile="@TOOL_OUTPUT@"~ 6078275970Scy case $lt_outputfile in 6079275970Scy *.exe|*.EXE) ;; 6080275970Scy *) 6081275970Scy lt_outputfile="$lt_outputfile.exe" 6082275970Scy lt_tool_outputfile="$lt_tool_outputfile.exe" 6083275970Scy ;; 6084275970Scy esac~ 6085275970Scy func_to_tool_file "$lt_outputfile"~ 6086275970Scy if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6087275970Scy $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6088275970Scy $RM "$lt_outputfile.manifest"; 6089275970Scy fi' 6090275970Scy ;; 6091275970Scy *) 6092275970Scy # g++ 6093275970Scy # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6094275970Scy # as there is no search path for DLLs. 6095275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6096275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6097275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6098275970Scy _LT_TAGVAR(always_export_symbols, $1)=no 6099275970Scy _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6100275970Scy 6101275970Scy if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6102275970Scy _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' 6103275970Scy # If the export-symbols file already is a .def file (1st line 6104275970Scy # is EXPORTS), use it as is; otherwise, prepend... 6105275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6106275970Scy cp $export_symbols $output_objdir/$soname.def; 6107275970Scy else 6108275970Scy echo EXPORTS > $output_objdir/$soname.def; 6109275970Scy cat $export_symbols >> $output_objdir/$soname.def; 6110275970Scy fi~ 6111275970Scy $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' 6112275970Scy else 6113275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6114275970Scy fi 6115275970Scy ;; 6116275970Scy esac 6117275970Scy ;; 6118275970Scy darwin* | rhapsody*) 6119275970Scy _LT_DARWIN_LINKER_FEATURES($1) 6120275970Scy ;; 6121275970Scy 6122275970Scy dgux*) 6123275970Scy case $cc_basename in 6124275970Scy ec++*) 6125275970Scy # FIXME: insert proper C++ library support 6126275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6127275970Scy ;; 6128275970Scy ghcx*) 6129275970Scy # Green Hills C++ Compiler 6130275970Scy # FIXME: insert proper C++ library support 6131275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6132275970Scy ;; 6133275970Scy *) 6134275970Scy # FIXME: insert proper C++ library support 6135275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6136275970Scy ;; 6137275970Scy esac 6138275970Scy ;; 6139275970Scy 6140275970Scy freebsd[[12]]*) 6141275970Scy # C++ shared libraries reported to be fairly broken before 6142275970Scy # switch to ELF 6143275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6144275970Scy ;; 6145275970Scy 6146275970Scy freebsd-elf*) 6147275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6148275970Scy ;; 6149275970Scy 6150275970Scy freebsd* | dragonfly*) 6151275970Scy # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6152275970Scy # conventions 6153275970Scy _LT_TAGVAR(ld_shlibs, $1)=yes 6154275970Scy ;; 6155275970Scy 6156275970Scy gnu*) 6157275970Scy ;; 6158275970Scy 6159275970Scy haiku*) 6160275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6161275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 6162275970Scy ;; 6163275970Scy 6164275970Scy hpux9*) 6165275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6166275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6167275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6168275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 6169275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6170275970Scy # but as the default 6171275970Scy # location of the library. 6172275970Scy 6173275970Scy case $cc_basename in 6174275970Scy CC*) 6175275970Scy # FIXME: insert proper C++ library support 6176275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6177275970Scy ;; 6178275970Scy aCC*) 6179275970Scy _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6180275970Scy # Commands to make compiler produce verbose output that lists 6181275970Scy # what "hidden" libraries, object files and flags are used when 6182275970Scy # linking a shared library. 6183275970Scy # 6184275970Scy # There doesn't appear to be a way to prevent this compiler from 6185275970Scy # explicitly linking system object files so we need to strip them 6186275970Scy # from the output so that they don't get included in the library 6187275970Scy # dependencies. 6188275970Scy 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"' 6189275970Scy ;; 6190275970Scy *) 6191275970Scy if test "$GXX" = yes; then 6192275970Scy _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6193275970Scy else 6194275970Scy # FIXME: insert proper C++ library support 6195275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6196275970Scy fi 6197275970Scy ;; 6198275970Scy esac 6199275970Scy ;; 6200275970Scy 6201275970Scy hpux10*|hpux11*) 6202275970Scy if test $with_gnu_ld = no; then 6203275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6204275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6205275970Scy 6206275970Scy case $host_cpu in 6207275970Scy hppa*64*|ia64*) 6208275970Scy ;; 6209275970Scy *) 6210275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6211275970Scy ;; 6212275970Scy esac 6213275970Scy fi 6214275970Scy case $host_cpu in 6215275970Scy hppa*64*|ia64*) 6216275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 6217275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6218275970Scy ;; 6219275970Scy *) 6220275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 6221275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6222275970Scy _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6223275970Scy # but as the default 6224275970Scy # location of the library. 6225275970Scy ;; 6226275970Scy esac 6227275970Scy 6228275970Scy case $cc_basename in 6229275970Scy CC*) 6230275970Scy # FIXME: insert proper C++ library support 6231275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6232275970Scy ;; 6233275970Scy aCC*) 6234275970Scy case $host_cpu in 6235275970Scy hppa*64*) 6236275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6237275970Scy ;; 6238275970Scy ia64*) 6239275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6240275970Scy ;; 6241275970Scy *) 6242275970Scy _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' 6243275970Scy ;; 6244275970Scy esac 6245275970Scy # Commands to make compiler produce verbose output that lists 6246275970Scy # what "hidden" libraries, object files and flags are used when 6247275970Scy # linking a shared library. 6248275970Scy # 6249275970Scy # There doesn't appear to be a way to prevent this compiler from 6250275970Scy # explicitly linking system object files so we need to strip them 6251275970Scy # from the output so that they don't get included in the library 6252275970Scy # dependencies. 6253275970Scy 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"' 6254275970Scy ;; 6255275970Scy *) 6256275970Scy if test "$GXX" = yes; then 6257275970Scy if test $with_gnu_ld = no; then 6258275970Scy case $host_cpu in 6259275970Scy hppa*64*) 6260275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6261275970Scy ;; 6262275970Scy ia64*) 6263275970Scy _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' 6264275970Scy ;; 6265275970Scy *) 6266275970Scy _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' 6267275970Scy ;; 6268275970Scy esac 6269275970Scy fi 6270275970Scy else 6271275970Scy # FIXME: insert proper C++ library support 6272275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6273275970Scy fi 6274275970Scy ;; 6275275970Scy esac 6276275970Scy ;; 6277275970Scy 6278275970Scy interix[[3-9]]*) 6279275970Scy _LT_TAGVAR(hardcode_direct, $1)=no 6280275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6281275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6282275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6283275970Scy # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6284275970Scy # Instead, shared libraries are loaded at an image base (0x10000000 by 6285275970Scy # default) and relocated if they conflict, which is a slow very memory 6286275970Scy # consuming and fragmenting process. To avoid this, we pick a random, 6287275970Scy # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6288275970Scy # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6289275970Scy _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' 6290275970Scy _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' 6291275970Scy ;; 6292275970Scy irix5* | irix6*) 6293275970Scy case $cc_basename in 6294275970Scy CC*) 6295275970Scy # SGI C++ 6296275970Scy _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' 6297275970Scy 6298275970Scy # Archives containing C++ object files must be created using 6299275970Scy # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6300275970Scy # necessary to make sure instantiated templates are included 6301275970Scy # in the archive. 6302275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6303275970Scy ;; 6304275970Scy *) 6305275970Scy if test "$GXX" = yes; then 6306275970Scy if test "$with_gnu_ld" = no; then 6307275970Scy _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' 6308275970Scy else 6309275970Scy _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' 6310275970Scy fi 6311275970Scy fi 6312275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 6313275970Scy ;; 6314275970Scy esac 6315275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6316275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6317275970Scy _LT_TAGVAR(inherit_rpath, $1)=yes 6318275970Scy ;; 6319275970Scy 6320275970Scy linux* | k*bsd*-gnu | kopensolaris*-gnu) 6321275970Scy case $cc_basename in 6322275970Scy KCC*) 6323275970Scy # Kuck and Associates, Inc. (KAI) C++ Compiler 6324275970Scy 6325275970Scy # KCC will only create a shared library if the output file 6326275970Scy # ends with ".so" (or ".sl" for HP-UX), so rename the library 6327275970Scy # to its proper name (with version) after linking. 6328275970Scy _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' 6329275970Scy _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' 6330275970Scy # Commands to make compiler produce verbose output that lists 6331275970Scy # what "hidden" libraries, object files and flags are used when 6332275970Scy # linking a shared library. 6333275970Scy # 6334275970Scy # There doesn't appear to be a way to prevent this compiler from 6335275970Scy # explicitly linking system object files so we need to strip them 6336275970Scy # from the output so that they don't get included in the library 6337275970Scy # dependencies. 6338275970Scy 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"' 6339275970Scy 6340275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6341275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6342275970Scy 6343275970Scy # Archives containing C++ object files must be created using 6344275970Scy # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6345275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6346275970Scy ;; 6347275970Scy icpc* | ecpc* ) 6348275970Scy # Intel C++ 6349275970Scy with_gnu_ld=yes 6350275970Scy # version 8.0 and above of icpc choke on multiply defined symbols 6351275970Scy # if we add $predep_objects and $postdep_objects, however 7.1 and 6352275970Scy # earlier do not add the objects themselves. 6353275970Scy case `$CC -V 2>&1` in 6354275970Scy *"Version 7."*) 6355275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6356275970Scy _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' 6357275970Scy ;; 6358275970Scy *) # Version 8.0 or newer 6359275970Scy tmp_idyn= 6360275970Scy case $host_cpu in 6361275970Scy ia64*) tmp_idyn=' -i_dynamic';; 6362275970Scy esac 6363275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6364275970Scy _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' 6365275970Scy ;; 6366275970Scy esac 6367275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6368275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6369275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6370275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6371275970Scy ;; 6372275970Scy pgCC* | pgcpp*) 6373275970Scy # Portland Group C++ compiler 6374275970Scy case `$CC -V` in 6375275970Scy *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6376275970Scy _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6377275970Scy rm -rf $tpldir~ 6378275970Scy $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6379275970Scy compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6380275970Scy _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6381275970Scy rm -rf $tpldir~ 6382275970Scy $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6383275970Scy $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6384275970Scy $RANLIB $oldlib' 6385275970Scy _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6386275970Scy rm -rf $tpldir~ 6387275970Scy $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6388275970Scy $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6389275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6390275970Scy rm -rf $tpldir~ 6391275970Scy $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6392275970Scy $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' 6393275970Scy ;; 6394275970Scy *) # Version 6 and above use weak symbols 6395275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6396275970Scy _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' 6397275970Scy ;; 6398275970Scy esac 6399275970Scy 6400275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6401275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6402275970Scy _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' 6403275970Scy ;; 6404275970Scy cxx*) 6405275970Scy # Compaq C++ 6406275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6407275970Scy _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' 6408275970Scy 6409275970Scy runpath_var=LD_RUN_PATH 6410275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6411275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6412275970Scy 6413275970Scy # Commands to make compiler produce verbose output that lists 6414275970Scy # what "hidden" libraries, object files and flags are used when 6415275970Scy # linking a shared library. 6416275970Scy # 6417275970Scy # There doesn't appear to be a way to prevent this compiler from 6418275970Scy # explicitly linking system object files so we need to strip them 6419275970Scy # from the output so that they don't get included in the library 6420275970Scy # dependencies. 6421275970Scy 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' 6422275970Scy ;; 6423275970Scy xl* | mpixl* | bgxl*) 6424275970Scy # IBM XL 8.0 on PPC, with GNU ld 6425275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6426275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6427275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6428275970Scy if test "x$supports_anon_versioning" = xyes; then 6429275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6430275970Scy cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6431275970Scy echo "local: *; };" >> $output_objdir/$libname.ver~ 6432275970Scy $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6433275970Scy fi 6434275970Scy ;; 6435275970Scy *) 6436275970Scy case `$CC -V 2>&1 | sed 5q` in 6437275970Scy *Sun\ C*) 6438275970Scy # Sun C++ 5.9 6439275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6440275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6441275970Scy _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' 6442275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6443275970Scy _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' 6444275970Scy _LT_TAGVAR(compiler_needs_object, $1)=yes 6445275970Scy 6446275970Scy # Not sure whether something based on 6447275970Scy # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6448275970Scy # would be better. 6449275970Scy output_verbose_link_cmd='func_echo_all' 6450275970Scy 6451275970Scy # Archives containing C++ object files must be created using 6452275970Scy # "CC -xar", where "CC" is the Sun C++ compiler. This is 6453275970Scy # necessary to make sure instantiated templates are included 6454275970Scy # in the archive. 6455275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6456275970Scy ;; 6457275970Scy esac 6458275970Scy ;; 6459275970Scy esac 6460275970Scy ;; 6461275970Scy 6462275970Scy lynxos*) 6463275970Scy # FIXME: insert proper C++ library support 6464275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6465275970Scy ;; 6466275970Scy 6467275970Scy m88k*) 6468275970Scy # FIXME: insert proper C++ library support 6469275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6470275970Scy ;; 6471275970Scy 6472275970Scy mvs*) 6473275970Scy case $cc_basename in 6474275970Scy cxx*) 6475275970Scy # FIXME: insert proper C++ library support 6476275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6477275970Scy ;; 6478275970Scy *) 6479275970Scy # FIXME: insert proper C++ library support 6480275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6481275970Scy ;; 6482275970Scy esac 6483275970Scy ;; 6484275970Scy 6485275970Scy netbsd*) 6486275970Scy if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6487275970Scy _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6488275970Scy wlarc= 6489275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6490275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 6491275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6492275970Scy fi 6493275970Scy # Workaround some broken pre-1.5 toolchains 6494275970Scy output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6495275970Scy ;; 6496275970Scy 6497275970Scy *nto* | *qnx*) 6498275970Scy _LT_TAGVAR(ld_shlibs, $1)=yes 6499275970Scy ;; 6500275970Scy 6501275970Scy openbsd2*) 6502275970Scy # C++ shared libraries are fairly broken 6503275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6504275970Scy ;; 6505275970Scy 6506275970Scy openbsd*) 6507275970Scy if test -f /usr/libexec/ld.so; then 6508275970Scy _LT_TAGVAR(hardcode_direct, $1)=yes 6509275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6510275970Scy _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6511275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6512275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6513275970Scy if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6514275970Scy _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' 6515275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6516275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6517275970Scy fi 6518275970Scy output_verbose_link_cmd=func_echo_all 6519275970Scy else 6520275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6521275970Scy fi 6522275970Scy ;; 6523275970Scy 6524275970Scy osf3* | osf4* | osf5*) 6525275970Scy case $cc_basename in 6526275970Scy KCC*) 6527275970Scy # Kuck and Associates, Inc. (KAI) C++ Compiler 6528275970Scy 6529275970Scy # KCC will only create a shared library if the output file 6530275970Scy # ends with ".so" (or ".sl" for HP-UX), so rename the library 6531275970Scy # to its proper name (with version) after linking. 6532275970Scy _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' 6533275970Scy 6534275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6535275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6536275970Scy 6537275970Scy # Archives containing C++ object files must be created using 6538275970Scy # the KAI C++ compiler. 6539275970Scy case $host in 6540275970Scy osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6541275970Scy *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6542275970Scy esac 6543275970Scy ;; 6544275970Scy RCC*) 6545275970Scy # Rational C++ 2.4.1 6546275970Scy # FIXME: insert proper C++ library support 6547275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6548275970Scy ;; 6549275970Scy cxx*) 6550275970Scy case $host in 6551275970Scy osf3*) 6552275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6553275970Scy _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' 6554275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6555275970Scy ;; 6556275970Scy *) 6557275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6558275970Scy _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' 6559275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6560275970Scy echo "-hidden">> $lib.exp~ 6561275970Scy $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~ 6562275970Scy $RM $lib.exp' 6563275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6564275970Scy ;; 6565275970Scy esac 6566275970Scy 6567275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6568275970Scy 6569275970Scy # Commands to make compiler produce verbose output that lists 6570275970Scy # what "hidden" libraries, object files and flags are used when 6571275970Scy # linking a shared library. 6572275970Scy # 6573275970Scy # There doesn't appear to be a way to prevent this compiler from 6574275970Scy # explicitly linking system object files so we need to strip them 6575275970Scy # from the output so that they don't get included in the library 6576275970Scy # dependencies. 6577275970Scy 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"' 6578275970Scy ;; 6579275970Scy *) 6580275970Scy if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6581275970Scy _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6582275970Scy case $host in 6583275970Scy osf3*) 6584275970Scy _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' 6585275970Scy ;; 6586275970Scy *) 6587275970Scy _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' 6588275970Scy ;; 6589275970Scy esac 6590275970Scy 6591275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6592275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6593275970Scy 6594275970Scy # Commands to make compiler produce verbose output that lists 6595275970Scy # what "hidden" libraries, object files and flags are used when 6596275970Scy # linking a shared library. 6597275970Scy output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6598275970Scy 6599275970Scy else 6600275970Scy # FIXME: insert proper C++ library support 6601275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6602275970Scy fi 6603275970Scy ;; 6604275970Scy esac 6605275970Scy ;; 6606275970Scy 6607275970Scy psos*) 6608275970Scy # FIXME: insert proper C++ library support 6609275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6610275970Scy ;; 6611275970Scy 6612275970Scy sunos4*) 6613275970Scy case $cc_basename in 6614275970Scy CC*) 6615275970Scy # Sun C++ 4.x 6616275970Scy # FIXME: insert proper C++ library support 6617275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6618275970Scy ;; 6619275970Scy lcc*) 6620275970Scy # Lucid 6621275970Scy # FIXME: insert proper C++ library support 6622275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6623275970Scy ;; 6624275970Scy *) 6625275970Scy # FIXME: insert proper C++ library support 6626275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6627275970Scy ;; 6628275970Scy esac 6629275970Scy ;; 6630275970Scy 6631275970Scy solaris*) 6632275970Scy case $cc_basename in 6633275970Scy CC* | sunCC*) 6634275970Scy # Sun C++ 4.2, 5.x and Centerline C++ 6635275970Scy _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6636275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6637275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6638275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6639275970Scy $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' 6640275970Scy 6641275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6642275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6643275970Scy case $host_os in 6644275970Scy solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6645275970Scy *) 6646275970Scy # The compiler driver will combine and reorder linker options, 6647275970Scy # but understands `-z linker_flag'. 6648275970Scy # Supported since Solaris 2.6 (maybe 2.5.1?) 6649275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6650275970Scy ;; 6651275970Scy esac 6652275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 6653275970Scy 6654275970Scy output_verbose_link_cmd='func_echo_all' 6655275970Scy 6656275970Scy # Archives containing C++ object files must be created using 6657275970Scy # "CC -xar", where "CC" is the Sun C++ compiler. This is 6658275970Scy # necessary to make sure instantiated templates are included 6659275970Scy # in the archive. 6660275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6661275970Scy ;; 6662275970Scy gcx*) 6663275970Scy # Green Hills C++ Compiler 6664275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6665275970Scy 6666275970Scy # The C++ compiler must be used to create the archive. 6667275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6668275970Scy ;; 6669275970Scy *) 6670275970Scy # GNU C++ compiler with Solaris linker 6671275970Scy if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6672275970Scy _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6673275970Scy if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6674275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6675275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6676275970Scy $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6677275970Scy 6678275970Scy # Commands to make compiler produce verbose output that lists 6679275970Scy # what "hidden" libraries, object files and flags are used when 6680275970Scy # linking a shared library. 6681275970Scy output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6682275970Scy else 6683275970Scy # g++ 2.7 appears to require `-G' NOT `-shared' on this 6684275970Scy # platform. 6685275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6686275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6687275970Scy $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6688275970Scy 6689275970Scy # Commands to make compiler produce verbose output that lists 6690275970Scy # what "hidden" libraries, object files and flags are used when 6691275970Scy # linking a shared library. 6692275970Scy output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6693275970Scy fi 6694275970Scy 6695275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6696275970Scy case $host_os in 6697275970Scy solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6698275970Scy *) 6699275970Scy _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6700275970Scy ;; 6701275970Scy esac 6702275970Scy fi 6703275970Scy ;; 6704275970Scy esac 6705275970Scy ;; 6706275970Scy 6707275970Scy sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6708275970Scy _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6709275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6710275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6711275970Scy runpath_var='LD_RUN_PATH' 6712275970Scy 6713275970Scy case $cc_basename in 6714275970Scy CC*) 6715275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6716275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6717275970Scy ;; 6718275970Scy *) 6719275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6720275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6721275970Scy ;; 6722275970Scy esac 6723275970Scy ;; 6724275970Scy 6725275970Scy sysv5* | sco3.2v5* | sco5v6*) 6726275970Scy # Note: We can NOT use -z defs as we might desire, because we do not 6727275970Scy # link with -lc, and that would cause any symbols used from libc to 6728275970Scy # always be unresolved, which means just about no library would 6729275970Scy # ever link correctly. If we're not using GNU ld we use -z text 6730275970Scy # though, which does catch some bad symbols but isn't as heavy-handed 6731275970Scy # as -z defs. 6732275970Scy _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6733275970Scy _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6734275970Scy _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6735275970Scy _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6736275970Scy _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6737275970Scy _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6738275970Scy _LT_TAGVAR(link_all_deplibs, $1)=yes 6739275970Scy _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6740275970Scy runpath_var='LD_RUN_PATH' 6741275970Scy 6742275970Scy case $cc_basename in 6743275970Scy CC*) 6744275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6745275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6746275970Scy _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6747275970Scy '"$_LT_TAGVAR(old_archive_cmds, $1)" 6748275970Scy _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6749275970Scy '"$_LT_TAGVAR(reload_cmds, $1)" 6750275970Scy ;; 6751275970Scy *) 6752275970Scy _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6753275970Scy _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6754275970Scy ;; 6755275970Scy esac 6756275970Scy ;; 6757275970Scy 6758275970Scy tandem*) 6759275970Scy case $cc_basename in 6760275970Scy NCC*) 6761275970Scy # NonStop-UX NCC 3.20 6762275970Scy # FIXME: insert proper C++ library support 6763275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6764275970Scy ;; 6765275970Scy *) 6766275970Scy # FIXME: insert proper C++ library support 6767275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6768275970Scy ;; 6769275970Scy esac 6770275970Scy ;; 6771275970Scy 6772275970Scy vxworks*) 6773275970Scy # FIXME: insert proper C++ library support 6774275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6775275970Scy ;; 6776275970Scy 6777275970Scy *) 6778275970Scy # FIXME: insert proper C++ library support 6779275970Scy _LT_TAGVAR(ld_shlibs, $1)=no 6780275970Scy ;; 6781275970Scy esac 6782275970Scy 6783275970Scy AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6784275970Scy test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6785275970Scy 6786275970Scy _LT_TAGVAR(GCC, $1)="$GXX" 6787275970Scy _LT_TAGVAR(LD, $1)="$LD" 6788275970Scy 6789275970Scy ## CAVEAT EMPTOR: 6790275970Scy ## There is no encapsulation within the following macros, do not change 6791275970Scy ## the running order or otherwise move them around unless you know exactly 6792275970Scy ## what you are doing... 6793275970Scy _LT_SYS_HIDDEN_LIBDEPS($1) 6794275970Scy _LT_COMPILER_PIC($1) 6795275970Scy _LT_COMPILER_C_O($1) 6796275970Scy _LT_COMPILER_FILE_LOCKS($1) 6797275970Scy _LT_LINKER_SHLIBS($1) 6798275970Scy _LT_SYS_DYNAMIC_LINKER($1) 6799275970Scy _LT_LINKER_HARDCODE_LIBPATH($1) 6800275970Scy 6801275970Scy _LT_CONFIG($1) 6802275970Scy fi # test -n "$compiler" 6803275970Scy 6804275970Scy CC=$lt_save_CC 6805275970Scy CFLAGS=$lt_save_CFLAGS 6806275970Scy LDCXX=$LD 6807275970Scy LD=$lt_save_LD 6808275970Scy GCC=$lt_save_GCC 6809275970Scy with_gnu_ld=$lt_save_with_gnu_ld 6810275970Scy lt_cv_path_LDCXX=$lt_cv_path_LD 6811275970Scy lt_cv_path_LD=$lt_save_path_LD 6812275970Scy lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6813275970Scy lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6814275970Scyfi # test "$_lt_caught_CXX_error" != yes 6815275970Scy 6816275970ScyAC_LANG_POP 6817275970Scy])# _LT_LANG_CXX_CONFIG 6818275970Scy 6819275970Scy 6820275970Scy# _LT_FUNC_STRIPNAME_CNF 6821275970Scy# ---------------------- 6822275970Scy# func_stripname_cnf prefix suffix name 6823275970Scy# strip PREFIX and SUFFIX off of NAME. 6824275970Scy# PREFIX and SUFFIX must not contain globbing or regex special 6825275970Scy# characters, hashes, percent signs, but SUFFIX may contain a leading 6826275970Scy# dot (in which case that matches only a dot). 6827275970Scy# 6828275970Scy# This function is identical to the (non-XSI) version of func_stripname, 6829275970Scy# except this one can be used by m4 code that may be executed by configure, 6830275970Scy# rather than the libtool script. 6831275970Scym4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6832275970ScyAC_REQUIRE([_LT_DECL_SED]) 6833275970ScyAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6834275970Scyfunc_stripname_cnf () 6835275970Scy{ 6836275970Scy case ${2} in 6837275970Scy .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6838275970Scy *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6839275970Scy esac 6840275970Scy} # func_stripname_cnf 6841275970Scy])# _LT_FUNC_STRIPNAME_CNF 6842275970Scy 6843275970Scy# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6844275970Scy# --------------------------------- 6845275970Scy# Figure out "hidden" library dependencies from verbose 6846275970Scy# compiler output when linking a shared library. 6847275970Scy# Parse the compiler output and extract the necessary 6848275970Scy# objects, libraries and library flags. 6849275970Scym4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6850275970Scy[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6851275970ScyAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6852275970Scy# Dependencies to place before and after the object being linked: 6853275970Scy_LT_TAGVAR(predep_objects, $1)= 6854275970Scy_LT_TAGVAR(postdep_objects, $1)= 6855275970Scy_LT_TAGVAR(predeps, $1)= 6856275970Scy_LT_TAGVAR(postdeps, $1)= 6857275970Scy_LT_TAGVAR(compiler_lib_search_path, $1)= 6858275970Scy 6859275970Scydnl we can't use the lt_simple_compile_test_code here, 6860275970Scydnl because it contains code intended for an executable, 6861275970Scydnl not a library. It's possible we should let each 6862275970Scydnl tag define a new lt_????_link_test_code variable, 6863275970Scydnl but it's only used here... 6864275970Scym4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6865275970Scyint a; 6866275970Scyvoid foo (void) { a = 0; } 6867275970Scy_LT_EOF 6868275970Scy], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6869275970Scyclass Foo 6870275970Scy{ 6871275970Scypublic: 6872275970Scy Foo (void) { a = 0; } 6873275970Scyprivate: 6874275970Scy int a; 6875275970Scy}; 6876275970Scy_LT_EOF 6877275970Scy], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6878275970Scy subroutine foo 6879275970Scy implicit none 6880275970Scy integer*4 a 6881275970Scy a=0 6882275970Scy return 6883275970Scy end 6884275970Scy_LT_EOF 6885275970Scy], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6886275970Scy subroutine foo 6887275970Scy implicit none 6888275970Scy integer a 6889275970Scy a=0 6890275970Scy return 6891275970Scy end 6892275970Scy_LT_EOF 6893275970Scy], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6894275970Scypublic class foo { 6895275970Scy private int a; 6896275970Scy public void bar (void) { 6897275970Scy a = 0; 6898275970Scy } 6899275970Scy}; 6900275970Scy_LT_EOF 6901275970Scy]) 6902275970Scy 6903275970Scy_lt_libdeps_save_CFLAGS=$CFLAGS 6904275970Scycase "$CC $CFLAGS " in #( 6905275970Scy*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6906275970Scy*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6907275970Scyesac 6908275970Scy 6909275970Scydnl Parse the compiler output and extract the necessary 6910275970Scydnl objects, libraries and library flags. 6911275970Scyif AC_TRY_EVAL(ac_compile); then 6912275970Scy # Parse the compiler output and extract the necessary 6913275970Scy # objects, libraries and library flags. 6914275970Scy 6915275970Scy # Sentinel used to keep track of whether or not we are before 6916275970Scy # the conftest object file. 6917275970Scy pre_test_object_deps_done=no 6918275970Scy 6919275970Scy for p in `eval "$output_verbose_link_cmd"`; do 6920275970Scy case ${prev}${p} in 6921275970Scy 6922275970Scy -L* | -R* | -l*) 6923275970Scy # Some compilers place space between "-{L,R}" and the path. 6924275970Scy # Remove the space. 6925275970Scy if test $p = "-L" || 6926275970Scy test $p = "-R"; then 6927275970Scy prev=$p 6928275970Scy continue 6929275970Scy fi 6930275970Scy 6931275970Scy # Expand the sysroot to ease extracting the directories later. 6932275970Scy if test -z "$prev"; then 6933275970Scy case $p in 6934275970Scy -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6935275970Scy -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6936275970Scy -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6937275970Scy esac 6938275970Scy fi 6939275970Scy case $p in 6940275970Scy =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6941275970Scy esac 6942275970Scy if test "$pre_test_object_deps_done" = no; then 6943275970Scy case ${prev} in 6944275970Scy -L | -R) 6945275970Scy # Internal compiler library paths should come after those 6946275970Scy # provided the user. The postdeps already come after the 6947275970Scy # user supplied libs so there is no need to process them. 6948275970Scy if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6949275970Scy _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6950275970Scy else 6951275970Scy _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6952275970Scy fi 6953275970Scy ;; 6954275970Scy # The "-l" case would never come before the object being 6955275970Scy # linked, so don't bother handling this case. 6956275970Scy esac 6957275970Scy else 6958275970Scy if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6959275970Scy _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6960275970Scy else 6961275970Scy _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6962275970Scy fi 6963275970Scy fi 6964275970Scy prev= 6965275970Scy ;; 6966275970Scy 6967275970Scy *.lto.$objext) ;; # Ignore GCC LTO objects 6968275970Scy *.$objext) 6969275970Scy # This assumes that the test object file only shows up 6970275970Scy # once in the compiler output. 6971275970Scy if test "$p" = "conftest.$objext"; then 6972275970Scy pre_test_object_deps_done=yes 6973275970Scy continue 6974275970Scy fi 6975275970Scy 6976275970Scy if test "$pre_test_object_deps_done" = no; then 6977275970Scy if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6978275970Scy _LT_TAGVAR(predep_objects, $1)="$p" 6979275970Scy else 6980275970Scy _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6981275970Scy fi 6982275970Scy else 6983275970Scy if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6984275970Scy _LT_TAGVAR(postdep_objects, $1)="$p" 6985275970Scy else 6986275970Scy _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6987275970Scy fi 6988275970Scy fi 6989275970Scy ;; 6990275970Scy 6991275970Scy *) ;; # Ignore the rest. 6992275970Scy 6993275970Scy esac 6994275970Scy done 6995275970Scy 6996275970Scy # Clean up. 6997275970Scy rm -f a.out a.exe 6998275970Scyelse 6999275970Scy echo "libtool.m4: error: problem compiling $1 test program" 7000275970Scyfi 7001275970Scy 7002275970Scy$RM -f confest.$objext 7003275970ScyCFLAGS=$_lt_libdeps_save_CFLAGS 7004275970Scy 7005275970Scy# PORTME: override above test on systems where it is broken 7006275970Scym4_if([$1], [CXX], 7007275970Scy[case $host_os in 7008275970Scyinterix[[3-9]]*) 7009275970Scy # Interix 3.5 installs completely hosed .la files for C++, so rather than 7010275970Scy # hack all around it, let's just trust "g++" to DTRT. 7011275970Scy _LT_TAGVAR(predep_objects,$1)= 7012275970Scy _LT_TAGVAR(postdep_objects,$1)= 7013275970Scy _LT_TAGVAR(postdeps,$1)= 7014275970Scy ;; 7015275970Scy 7016275970Scylinux*) 7017275970Scy case `$CC -V 2>&1 | sed 5q` in 7018275970Scy *Sun\ C*) 7019275970Scy # Sun C++ 5.9 7020275970Scy 7021275970Scy # The more standards-conforming stlport4 library is 7022275970Scy # incompatible with the Cstd library. Avoid specifying 7023275970Scy # it if it's in CXXFLAGS. Ignore libCrun as 7024275970Scy # -library=stlport4 depends on it. 7025275970Scy case " $CXX $CXXFLAGS " in 7026275970Scy *" -library=stlport4 "*) 7027275970Scy solaris_use_stlport4=yes 7028275970Scy ;; 7029275970Scy esac 7030275970Scy 7031275970Scy if test "$solaris_use_stlport4" != yes; then 7032275970Scy _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7033275970Scy fi 7034275970Scy ;; 7035275970Scy esac 7036275970Scy ;; 7037275970Scy 7038275970Scysolaris*) 7039275970Scy case $cc_basename in 7040275970Scy CC* | sunCC*) 7041275970Scy # The more standards-conforming stlport4 library is 7042275970Scy # incompatible with the Cstd library. Avoid specifying 7043275970Scy # it if it's in CXXFLAGS. Ignore libCrun as 7044275970Scy # -library=stlport4 depends on it. 7045275970Scy case " $CXX $CXXFLAGS " in 7046275970Scy *" -library=stlport4 "*) 7047275970Scy solaris_use_stlport4=yes 7048275970Scy ;; 7049275970Scy esac 7050275970Scy 7051275970Scy # Adding this requires a known-good setup of shared libraries for 7052275970Scy # Sun compiler versions before 5.6, else PIC objects from an old 7053275970Scy # archive will be linked into the output, leading to subtle bugs. 7054275970Scy if test "$solaris_use_stlport4" != yes; then 7055275970Scy _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7056275970Scy fi 7057275970Scy ;; 7058275970Scy esac 7059275970Scy ;; 7060275970Scyesac 7061275970Scy]) 7062275970Scy 7063275970Scycase " $_LT_TAGVAR(postdeps, $1) " in 7064275970Scy*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7065275970Scyesac 7066275970Scy _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7067275970Scyif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7068275970Scy _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7069275970Scyfi 7070275970Scy_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7071275970Scy [The directories searched by this compiler when creating a shared library]) 7072275970Scy_LT_TAGDECL([], [predep_objects], [1], 7073275970Scy [Dependencies to place before and after the objects being linked to 7074275970Scy create a shared library]) 7075275970Scy_LT_TAGDECL([], [postdep_objects], [1]) 7076275970Scy_LT_TAGDECL([], [predeps], [1]) 7077275970Scy_LT_TAGDECL([], [postdeps], [1]) 7078275970Scy_LT_TAGDECL([], [compiler_lib_search_path], [1], 7079275970Scy [The library search path used internally by the compiler when linking 7080275970Scy a shared library]) 7081275970Scy])# _LT_SYS_HIDDEN_LIBDEPS 7082275970Scy 7083275970Scy 7084275970Scy# _LT_LANG_F77_CONFIG([TAG]) 7085275970Scy# -------------------------- 7086275970Scy# Ensure that the configuration variables for a Fortran 77 compiler are 7087275970Scy# suitably defined. These variables are subsequently used by _LT_CONFIG 7088275970Scy# to write the compiler configuration to `libtool'. 7089275970Scym4_defun([_LT_LANG_F77_CONFIG], 7090275970Scy[AC_LANG_PUSH(Fortran 77) 7091275970Scyif test -z "$F77" || test "X$F77" = "Xno"; then 7092275970Scy _lt_disable_F77=yes 7093275970Scyfi 7094275970Scy 7095275970Scy_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7096275970Scy_LT_TAGVAR(allow_undefined_flag, $1)= 7097275970Scy_LT_TAGVAR(always_export_symbols, $1)=no 7098275970Scy_LT_TAGVAR(archive_expsym_cmds, $1)= 7099275970Scy_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7100275970Scy_LT_TAGVAR(hardcode_direct, $1)=no 7101275970Scy_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7102275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7103275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7104275970Scy_LT_TAGVAR(hardcode_libdir_separator, $1)= 7105275970Scy_LT_TAGVAR(hardcode_minus_L, $1)=no 7106275970Scy_LT_TAGVAR(hardcode_automatic, $1)=no 7107275970Scy_LT_TAGVAR(inherit_rpath, $1)=no 7108275970Scy_LT_TAGVAR(module_cmds, $1)= 7109275970Scy_LT_TAGVAR(module_expsym_cmds, $1)= 7110275970Scy_LT_TAGVAR(link_all_deplibs, $1)=unknown 7111275970Scy_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7112275970Scy_LT_TAGVAR(reload_flag, $1)=$reload_flag 7113275970Scy_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7114275970Scy_LT_TAGVAR(no_undefined_flag, $1)= 7115275970Scy_LT_TAGVAR(whole_archive_flag_spec, $1)= 7116275970Scy_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7117275970Scy 7118275970Scy# Source file extension for f77 test sources. 7119275970Scyac_ext=f 7120275970Scy 7121275970Scy# Object file extension for compiled f77 test sources. 7122275970Scyobjext=o 7123275970Scy_LT_TAGVAR(objext, $1)=$objext 7124275970Scy 7125275970Scy# No sense in running all these tests if we already determined that 7126275970Scy# the F77 compiler isn't working. Some variables (like enable_shared) 7127275970Scy# are currently assumed to apply to all compilers on this platform, 7128275970Scy# and will be corrupted by setting them based on a non-working compiler. 7129275970Scyif test "$_lt_disable_F77" != yes; then 7130275970Scy # Code to be used in simple compile tests 7131275970Scy lt_simple_compile_test_code="\ 7132275970Scy subroutine t 7133275970Scy return 7134275970Scy end 7135275970Scy" 7136275970Scy 7137275970Scy # Code to be used in simple link tests 7138275970Scy lt_simple_link_test_code="\ 7139275970Scy program t 7140275970Scy end 7141275970Scy" 7142275970Scy 7143275970Scy # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7144275970Scy _LT_TAG_COMPILER 7145275970Scy 7146275970Scy # save warnings/boilerplate of simple test code 7147275970Scy _LT_COMPILER_BOILERPLATE 7148275970Scy _LT_LINKER_BOILERPLATE 7149275970Scy 7150275970Scy # Allow CC to be a program name with arguments. 7151275970Scy lt_save_CC="$CC" 7152275970Scy lt_save_GCC=$GCC 7153275970Scy lt_save_CFLAGS=$CFLAGS 7154275970Scy CC=${F77-"f77"} 7155275970Scy CFLAGS=$FFLAGS 7156275970Scy compiler=$CC 7157275970Scy _LT_TAGVAR(compiler, $1)=$CC 7158275970Scy _LT_CC_BASENAME([$compiler]) 7159275970Scy GCC=$G77 7160275970Scy if test -n "$compiler"; then 7161275970Scy AC_MSG_CHECKING([if libtool supports shared libraries]) 7162275970Scy AC_MSG_RESULT([$can_build_shared]) 7163275970Scy 7164275970Scy AC_MSG_CHECKING([whether to build shared libraries]) 7165275970Scy test "$can_build_shared" = "no" && enable_shared=no 7166275970Scy 7167275970Scy # On AIX, shared libraries and static libraries use the same namespace, and 7168275970Scy # are all built from PIC. 7169275970Scy case $host_os in 7170275970Scy aix3*) 7171275970Scy test "$enable_shared" = yes && enable_static=no 7172275970Scy if test -n "$RANLIB"; then 7173275970Scy archive_cmds="$archive_cmds~\$RANLIB \$lib" 7174275970Scy postinstall_cmds='$RANLIB $lib' 7175275970Scy fi 7176275970Scy ;; 7177275970Scy aix[[4-9]]*) 7178275970Scy if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7179275970Scy test "$enable_shared" = yes && enable_static=no 7180275970Scy fi 7181275970Scy ;; 7182275970Scy esac 7183275970Scy AC_MSG_RESULT([$enable_shared]) 7184275970Scy 7185275970Scy AC_MSG_CHECKING([whether to build static libraries]) 7186275970Scy # Make sure either enable_shared or enable_static is yes. 7187275970Scy test "$enable_shared" = yes || enable_static=yes 7188275970Scy AC_MSG_RESULT([$enable_static]) 7189275970Scy 7190275970Scy _LT_TAGVAR(GCC, $1)="$G77" 7191275970Scy _LT_TAGVAR(LD, $1)="$LD" 7192275970Scy 7193275970Scy ## CAVEAT EMPTOR: 7194275970Scy ## There is no encapsulation within the following macros, do not change 7195275970Scy ## the running order or otherwise move them around unless you know exactly 7196275970Scy ## what you are doing... 7197275970Scy _LT_COMPILER_PIC($1) 7198275970Scy _LT_COMPILER_C_O($1) 7199275970Scy _LT_COMPILER_FILE_LOCKS($1) 7200275970Scy _LT_LINKER_SHLIBS($1) 7201275970Scy _LT_SYS_DYNAMIC_LINKER($1) 7202275970Scy _LT_LINKER_HARDCODE_LIBPATH($1) 7203275970Scy 7204275970Scy _LT_CONFIG($1) 7205275970Scy fi # test -n "$compiler" 7206275970Scy 7207275970Scy GCC=$lt_save_GCC 7208275970Scy CC="$lt_save_CC" 7209275970Scy CFLAGS="$lt_save_CFLAGS" 7210275970Scyfi # test "$_lt_disable_F77" != yes 7211275970Scy 7212275970ScyAC_LANG_POP 7213275970Scy])# _LT_LANG_F77_CONFIG 7214275970Scy 7215275970Scy 7216275970Scy# _LT_LANG_FC_CONFIG([TAG]) 7217275970Scy# ------------------------- 7218275970Scy# Ensure that the configuration variables for a Fortran compiler are 7219275970Scy# suitably defined. These variables are subsequently used by _LT_CONFIG 7220275970Scy# to write the compiler configuration to `libtool'. 7221275970Scym4_defun([_LT_LANG_FC_CONFIG], 7222275970Scy[AC_LANG_PUSH(Fortran) 7223275970Scy 7224275970Scyif test -z "$FC" || test "X$FC" = "Xno"; then 7225275970Scy _lt_disable_FC=yes 7226275970Scyfi 7227275970Scy 7228275970Scy_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7229275970Scy_LT_TAGVAR(allow_undefined_flag, $1)= 7230275970Scy_LT_TAGVAR(always_export_symbols, $1)=no 7231275970Scy_LT_TAGVAR(archive_expsym_cmds, $1)= 7232275970Scy_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7233275970Scy_LT_TAGVAR(hardcode_direct, $1)=no 7234275970Scy_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7235275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7236275970Scy_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7237275970Scy_LT_TAGVAR(hardcode_libdir_separator, $1)= 7238275970Scy_LT_TAGVAR(hardcode_minus_L, $1)=no 7239275970Scy_LT_TAGVAR(hardcode_automatic, $1)=no 7240275970Scy_LT_TAGVAR(inherit_rpath, $1)=no 7241275970Scy_LT_TAGVAR(module_cmds, $1)= 7242275970Scy_LT_TAGVAR(module_expsym_cmds, $1)= 7243275970Scy_LT_TAGVAR(link_all_deplibs, $1)=unknown 7244275970Scy_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7245275970Scy_LT_TAGVAR(reload_flag, $1)=$reload_flag 7246275970Scy_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7247275970Scy_LT_TAGVAR(no_undefined_flag, $1)= 7248275970Scy_LT_TAGVAR(whole_archive_flag_spec, $1)= 7249275970Scy_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7250275970Scy 7251275970Scy# Source file extension for fc test sources. 7252275970Scyac_ext=${ac_fc_srcext-f} 7253275970Scy 7254275970Scy# Object file extension for compiled fc test sources. 7255275970Scyobjext=o 7256275970Scy_LT_TAGVAR(objext, $1)=$objext 7257275970Scy 7258275970Scy# No sense in running all these tests if we already determined that 7259275970Scy# the FC compiler isn't working. Some variables (like enable_shared) 7260275970Scy# are currently assumed to apply to all compilers on this platform, 7261275970Scy# and will be corrupted by setting them based on a non-working compiler. 7262275970Scyif test "$_lt_disable_FC" != yes; then 7263275970Scy # Code to be used in simple compile tests 7264275970Scy lt_simple_compile_test_code="\ 7265275970Scy subroutine t 7266275970Scy return 7267275970Scy end 7268275970Scy" 7269275970Scy 7270275970Scy # Code to be used in simple link tests 7271275970Scy lt_simple_link_test_code="\ 7272275970Scy program t 7273275970Scy end 7274275970Scy" 7275275970Scy 7276275970Scy # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7277275970Scy _LT_TAG_COMPILER 7278275970Scy 7279275970Scy # save warnings/boilerplate of simple test code 7280275970Scy _LT_COMPILER_BOILERPLATE 7281275970Scy _LT_LINKER_BOILERPLATE 7282275970Scy 7283275970Scy # Allow CC to be a program name with arguments. 7284275970Scy lt_save_CC="$CC" 7285275970Scy lt_save_GCC=$GCC 7286275970Scy lt_save_CFLAGS=$CFLAGS 7287275970Scy CC=${FC-"f95"} 7288275970Scy CFLAGS=$FCFLAGS 7289275970Scy compiler=$CC 7290275970Scy GCC=$ac_cv_fc_compiler_gnu 7291275970Scy 7292275970Scy _LT_TAGVAR(compiler, $1)=$CC 7293275970Scy _LT_CC_BASENAME([$compiler]) 7294275970Scy 7295275970Scy if test -n "$compiler"; then 7296275970Scy AC_MSG_CHECKING([if libtool supports shared libraries]) 7297275970Scy AC_MSG_RESULT([$can_build_shared]) 7298275970Scy 7299275970Scy AC_MSG_CHECKING([whether to build shared libraries]) 7300275970Scy test "$can_build_shared" = "no" && enable_shared=no 7301275970Scy 7302275970Scy # On AIX, shared libraries and static libraries use the same namespace, and 7303275970Scy # are all built from PIC. 7304275970Scy case $host_os in 7305275970Scy aix3*) 7306275970Scy test "$enable_shared" = yes && enable_static=no 7307275970Scy if test -n "$RANLIB"; then 7308275970Scy archive_cmds="$archive_cmds~\$RANLIB \$lib" 7309275970Scy postinstall_cmds='$RANLIB $lib' 7310275970Scy fi 7311275970Scy ;; 7312275970Scy aix[[4-9]]*) 7313275970Scy if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7314275970Scy test "$enable_shared" = yes && enable_static=no 7315275970Scy fi 7316275970Scy ;; 7317275970Scy esac 7318275970Scy AC_MSG_RESULT([$enable_shared]) 7319275970Scy 7320275970Scy AC_MSG_CHECKING([whether to build static libraries]) 7321275970Scy # Make sure either enable_shared or enable_static is yes. 7322275970Scy test "$enable_shared" = yes || enable_static=yes 7323275970Scy AC_MSG_RESULT([$enable_static]) 7324275970Scy 7325275970Scy _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7326275970Scy _LT_TAGVAR(LD, $1)="$LD" 7327275970Scy 7328275970Scy ## CAVEAT EMPTOR: 7329275970Scy ## There is no encapsulation within the following macros, do not change 7330275970Scy ## the running order or otherwise move them around unless you know exactly 7331275970Scy ## what you are doing... 7332275970Scy _LT_SYS_HIDDEN_LIBDEPS($1) 7333275970Scy _LT_COMPILER_PIC($1) 7334275970Scy _LT_COMPILER_C_O($1) 7335275970Scy _LT_COMPILER_FILE_LOCKS($1) 7336275970Scy _LT_LINKER_SHLIBS($1) 7337275970Scy _LT_SYS_DYNAMIC_LINKER($1) 7338275970Scy _LT_LINKER_HARDCODE_LIBPATH($1) 7339275970Scy 7340275970Scy _LT_CONFIG($1) 7341275970Scy fi # test -n "$compiler" 7342275970Scy 7343275970Scy GCC=$lt_save_GCC 7344275970Scy CC=$lt_save_CC 7345275970Scy CFLAGS=$lt_save_CFLAGS 7346275970Scyfi # test "$_lt_disable_FC" != yes 7347275970Scy 7348275970ScyAC_LANG_POP 7349275970Scy])# _LT_LANG_FC_CONFIG 7350275970Scy 7351275970Scy 7352275970Scy# _LT_LANG_GCJ_CONFIG([TAG]) 7353275970Scy# -------------------------- 7354275970Scy# Ensure that the configuration variables for the GNU Java Compiler compiler 7355275970Scy# are suitably defined. These variables are subsequently used by _LT_CONFIG 7356275970Scy# to write the compiler configuration to `libtool'. 7357275970Scym4_defun([_LT_LANG_GCJ_CONFIG], 7358275970Scy[AC_REQUIRE([LT_PROG_GCJ])dnl 7359275970ScyAC_LANG_SAVE 7360275970Scy 7361275970Scy# Source file extension for Java test sources. 7362275970Scyac_ext=java 7363275970Scy 7364275970Scy# Object file extension for compiled Java test sources. 7365275970Scyobjext=o 7366275970Scy_LT_TAGVAR(objext, $1)=$objext 7367275970Scy 7368275970Scy# Code to be used in simple compile tests 7369275970Scylt_simple_compile_test_code="class foo {}" 7370275970Scy 7371275970Scy# Code to be used in simple link tests 7372275970Scylt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7373275970Scy 7374275970Scy# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7375275970Scy_LT_TAG_COMPILER 7376275970Scy 7377275970Scy# save warnings/boilerplate of simple test code 7378275970Scy_LT_COMPILER_BOILERPLATE 7379275970Scy_LT_LINKER_BOILERPLATE 7380275970Scy 7381275970Scy# Allow CC to be a program name with arguments. 7382275970Scylt_save_CC=$CC 7383275970Scylt_save_CFLAGS=$CFLAGS 7384275970Scylt_save_GCC=$GCC 7385275970ScyGCC=yes 7386275970ScyCC=${GCJ-"gcj"} 7387275970ScyCFLAGS=$GCJFLAGS 7388275970Scycompiler=$CC 7389275970Scy_LT_TAGVAR(compiler, $1)=$CC 7390275970Scy_LT_TAGVAR(LD, $1)="$LD" 7391275970Scy_LT_CC_BASENAME([$compiler]) 7392275970Scy 7393275970Scy# GCJ did not exist at the time GCC didn't implicitly link libc in. 7394275970Scy_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7395275970Scy 7396275970Scy_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7397275970Scy_LT_TAGVAR(reload_flag, $1)=$reload_flag 7398275970Scy_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7399275970Scy 7400275970Scy## CAVEAT EMPTOR: 7401275970Scy## There is no encapsulation within the following macros, do not change 7402275970Scy## the running order or otherwise move them around unless you know exactly 7403275970Scy## what you are doing... 7404275970Scyif test -n "$compiler"; then 7405275970Scy _LT_COMPILER_NO_RTTI($1) 7406275970Scy _LT_COMPILER_PIC($1) 7407275970Scy _LT_COMPILER_C_O($1) 7408275970Scy _LT_COMPILER_FILE_LOCKS($1) 7409275970Scy _LT_LINKER_SHLIBS($1) 7410275970Scy _LT_LINKER_HARDCODE_LIBPATH($1) 7411275970Scy 7412275970Scy _LT_CONFIG($1) 7413275970Scyfi 7414275970Scy 7415275970ScyAC_LANG_RESTORE 7416275970Scy 7417275970ScyGCC=$lt_save_GCC 7418275970ScyCC=$lt_save_CC 7419275970ScyCFLAGS=$lt_save_CFLAGS 7420275970Scy])# _LT_LANG_GCJ_CONFIG 7421275970Scy 7422275970Scy 7423275970Scy# _LT_LANG_RC_CONFIG([TAG]) 7424275970Scy# ------------------------- 7425275970Scy# Ensure that the configuration variables for the Windows resource compiler 7426275970Scy# are suitably defined. These variables are subsequently used by _LT_CONFIG 7427275970Scy# to write the compiler configuration to `libtool'. 7428275970Scym4_defun([_LT_LANG_RC_CONFIG], 7429275970Scy[AC_REQUIRE([LT_PROG_RC])dnl 7430275970ScyAC_LANG_SAVE 7431275970Scy 7432275970Scy# Source file extension for RC test sources. 7433275970Scyac_ext=rc 7434275970Scy 7435275970Scy# Object file extension for compiled RC test sources. 7436275970Scyobjext=o 7437275970Scy_LT_TAGVAR(objext, $1)=$objext 7438275970Scy 7439275970Scy# Code to be used in simple compile tests 7440275970Scylt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7441275970Scy 7442275970Scy# Code to be used in simple link tests 7443275970Scylt_simple_link_test_code="$lt_simple_compile_test_code" 7444275970Scy 7445275970Scy# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7446275970Scy_LT_TAG_COMPILER 7447275970Scy 7448275970Scy# save warnings/boilerplate of simple test code 7449275970Scy_LT_COMPILER_BOILERPLATE 7450275970Scy_LT_LINKER_BOILERPLATE 7451275970Scy 7452275970Scy# Allow CC to be a program name with arguments. 7453275970Scylt_save_CC="$CC" 7454275970Scylt_save_CFLAGS=$CFLAGS 7455275970Scylt_save_GCC=$GCC 7456275970ScyGCC= 7457275970ScyCC=${RC-"windres"} 7458275970ScyCFLAGS= 7459275970Scycompiler=$CC 7460275970Scy_LT_TAGVAR(compiler, $1)=$CC 7461275970Scy_LT_CC_BASENAME([$compiler]) 7462275970Scy_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7463275970Scy 7464275970Scyif test -n "$compiler"; then 7465275970Scy : 7466275970Scy _LT_CONFIG($1) 7467275970Scyfi 7468275970Scy 7469275970ScyGCC=$lt_save_GCC 7470275970ScyAC_LANG_RESTORE 7471275970ScyCC=$lt_save_CC 7472275970ScyCFLAGS=$lt_save_CFLAGS 7473275970Scy])# _LT_LANG_RC_CONFIG 7474275970Scy 7475275970Scy 7476275970Scy# LT_PROG_GCJ 7477275970Scy# ----------- 7478275970ScyAC_DEFUN([LT_PROG_GCJ], 7479275970Scy[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7480275970Scy [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7481275970Scy [AC_CHECK_TOOL(GCJ, gcj,) 7482275970Scy test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7483275970Scy AC_SUBST(GCJFLAGS)])])[]dnl 7484275970Scy]) 7485275970Scy 7486275970Scy# Old name: 7487275970ScyAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7488275970Scydnl aclocal-1.4 backwards compatibility: 7489275970Scydnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7490275970Scy 7491275970Scy 7492275970Scy# LT_PROG_RC 7493275970Scy# ---------- 7494275970ScyAC_DEFUN([LT_PROG_RC], 7495275970Scy[AC_CHECK_TOOL(RC, windres,) 7496275970Scy]) 7497275970Scy 7498275970Scy# Old name: 7499275970ScyAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7500275970Scydnl aclocal-1.4 backwards compatibility: 7501275970Scydnl AC_DEFUN([LT_AC_PROG_RC], []) 7502275970Scy 7503275970Scy 7504275970Scy# _LT_DECL_EGREP 7505275970Scy# -------------- 7506275970Scy# If we don't have a new enough Autoconf to choose the best grep 7507275970Scy# available, choose the one first in the user's PATH. 7508275970Scym4_defun([_LT_DECL_EGREP], 7509275970Scy[AC_REQUIRE([AC_PROG_EGREP])dnl 7510275970ScyAC_REQUIRE([AC_PROG_FGREP])dnl 7511275970Scytest -z "$GREP" && GREP=grep 7512275970Scy_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7513275970Scy_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7514275970Scy_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7515275970Scydnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7516275970ScyAC_SUBST([GREP]) 7517275970Scy]) 7518275970Scy 7519275970Scy 7520275970Scy# _LT_DECL_OBJDUMP 7521275970Scy# -------------- 7522275970Scy# If we don't have a new enough Autoconf to choose the best objdump 7523275970Scy# available, choose the one first in the user's PATH. 7524275970Scym4_defun([_LT_DECL_OBJDUMP], 7525275970Scy[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7526275970Scytest -z "$OBJDUMP" && OBJDUMP=objdump 7527275970Scy_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7528275970ScyAC_SUBST([OBJDUMP]) 7529275970Scy]) 7530275970Scy 7531275970Scy# _LT_DECL_DLLTOOL 7532275970Scy# ---------------- 7533275970Scy# Ensure DLLTOOL variable is set. 7534275970Scym4_defun([_LT_DECL_DLLTOOL], 7535275970Scy[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7536275970Scytest -z "$DLLTOOL" && DLLTOOL=dlltool 7537275970Scy_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7538275970ScyAC_SUBST([DLLTOOL]) 7539275970Scy]) 7540275970Scy 7541275970Scy# _LT_DECL_SED 7542275970Scy# ------------ 7543275970Scy# Check for a fully-functional sed program, that truncates 7544275970Scy# as few characters as possible. Prefer GNU sed if found. 7545275970Scym4_defun([_LT_DECL_SED], 7546275970Scy[AC_PROG_SED 7547275970Scytest -z "$SED" && SED=sed 7548275970ScyXsed="$SED -e 1s/^X//" 7549275970Scy_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7550275970Scy_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7551275970Scy [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7552275970Scy])# _LT_DECL_SED 7553275970Scy 7554275970Scym4_ifndef([AC_PROG_SED], [ 7555275970Scy############################################################ 7556275970Scy# NOTE: This macro has been submitted for inclusion into # 7557275970Scy# GNU Autoconf as AC_PROG_SED. When it is available in # 7558275970Scy# a released version of Autoconf we should remove this # 7559275970Scy# macro and use it instead. # 7560275970Scy############################################################ 7561275970Scy 7562275970Scym4_defun([AC_PROG_SED], 7563275970Scy[AC_MSG_CHECKING([for a sed that does not truncate output]) 7564275970ScyAC_CACHE_VAL(lt_cv_path_SED, 7565275970Scy[# Loop through the user's path and test for sed and gsed. 7566275970Scy# Then use that list of sed's as ones to test for truncation. 7567275970Scyas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7568275970Scyfor as_dir in $PATH 7569275970Scydo 7570275970Scy IFS=$as_save_IFS 7571275970Scy test -z "$as_dir" && as_dir=. 7572275970Scy for lt_ac_prog in sed gsed; do 7573275970Scy for ac_exec_ext in '' $ac_executable_extensions; do 7574275970Scy if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7575275970Scy lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7576275970Scy fi 7577275970Scy done 7578275970Scy done 7579275970Scydone 7580275970ScyIFS=$as_save_IFS 7581275970Scylt_ac_max=0 7582275970Scylt_ac_count=0 7583275970Scy# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7584275970Scy# along with /bin/sed that truncates output. 7585275970Scyfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7586275970Scy test ! -f $lt_ac_sed && continue 7587275970Scy cat /dev/null > conftest.in 7588275970Scy lt_ac_count=0 7589275970Scy echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7590275970Scy # Check for GNU sed and select it if it is found. 7591275970Scy if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7592275970Scy lt_cv_path_SED=$lt_ac_sed 7593275970Scy break 7594275970Scy fi 7595275970Scy while true; do 7596275970Scy cat conftest.in conftest.in >conftest.tmp 7597275970Scy mv conftest.tmp conftest.in 7598275970Scy cp conftest.in conftest.nl 7599275970Scy echo >>conftest.nl 7600275970Scy $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7601275970Scy cmp -s conftest.out conftest.nl || break 7602275970Scy # 10000 chars as input seems more than enough 7603275970Scy test $lt_ac_count -gt 10 && break 7604275970Scy lt_ac_count=`expr $lt_ac_count + 1` 7605275970Scy if test $lt_ac_count -gt $lt_ac_max; then 7606275970Scy lt_ac_max=$lt_ac_count 7607275970Scy lt_cv_path_SED=$lt_ac_sed 7608275970Scy fi 7609275970Scy done 7610275970Scydone 7611275970Scy]) 7612275970ScySED=$lt_cv_path_SED 7613275970ScyAC_SUBST([SED]) 7614275970ScyAC_MSG_RESULT([$SED]) 7615275970Scy])#AC_PROG_SED 7616275970Scy])#m4_ifndef 7617275970Scy 7618275970Scy# Old name: 7619275970ScyAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7620275970Scydnl aclocal-1.4 backwards compatibility: 7621275970Scydnl AC_DEFUN([LT_AC_PROG_SED], []) 7622275970Scy 7623275970Scy 7624275970Scy# _LT_CHECK_SHELL_FEATURES 7625275970Scy# ------------------------ 7626275970Scy# Find out whether the shell is Bourne or XSI compatible, 7627275970Scy# or has some other useful features. 7628275970Scym4_defun([_LT_CHECK_SHELL_FEATURES], 7629275970Scy[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7630275970Scy# Try some XSI features 7631275970Scyxsi_shell=no 7632275970Scy( _lt_dummy="a/b/c" 7633275970Scy test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7634275970Scy = c,a/b,b/c, \ 7635275970Scy && eval 'test $(( 1 + 1 )) -eq 2 \ 7636275970Scy && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7637275970Scy && xsi_shell=yes 7638275970ScyAC_MSG_RESULT([$xsi_shell]) 7639275970Scy_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7640275970Scy 7641275970ScyAC_MSG_CHECKING([whether the shell understands "+="]) 7642275970Scylt_shell_append=no 7643275970Scy( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7644275970Scy >/dev/null 2>&1 \ 7645275970Scy && lt_shell_append=yes 7646275970ScyAC_MSG_RESULT([$lt_shell_append]) 7647275970Scy_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7648275970Scy 7649275970Scyif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7650275970Scy lt_unset=unset 7651275970Scyelse 7652275970Scy lt_unset=false 7653275970Scyfi 7654275970Scy_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7655275970Scy 7656275970Scy# test EBCDIC or ASCII 7657275970Scycase `echo X|tr X '\101'` in 7658275970Scy A) # ASCII based system 7659275970Scy # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7660275970Scy lt_SP2NL='tr \040 \012' 7661275970Scy lt_NL2SP='tr \015\012 \040\040' 7662275970Scy ;; 7663275970Scy *) # EBCDIC based system 7664275970Scy lt_SP2NL='tr \100 \n' 7665275970Scy lt_NL2SP='tr \r\n \100\100' 7666275970Scy ;; 7667275970Scyesac 7668275970Scy_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7669275970Scy_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7670275970Scy])# _LT_CHECK_SHELL_FEATURES 7671275970Scy 7672275970Scy 7673275970Scy# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7674275970Scy# ------------------------------------------------------ 7675275970Scy# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7676275970Scy# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7677275970Scym4_defun([_LT_PROG_FUNCTION_REPLACE], 7678275970Scy[dnl { 7679275970Scysed -e '/^$1 ()$/,/^} # $1 /c\ 7680275970Scy$1 ()\ 7681275970Scy{\ 7682275970Scym4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7683275970Scy} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7684275970Scy && mv -f "$cfgfile.tmp" "$cfgfile" \ 7685275970Scy || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7686275970Scytest 0 -eq $? || _lt_function_replace_fail=: 7687275970Scy]) 7688275970Scy 7689275970Scy 7690275970Scy# _LT_PROG_REPLACE_SHELLFNS 7691275970Scy# ------------------------- 7692275970Scy# Replace existing portable implementations of several shell functions with 7693275970Scy# equivalent extended shell implementations where those features are available.. 7694275970Scym4_defun([_LT_PROG_REPLACE_SHELLFNS], 7695275970Scy[if test x"$xsi_shell" = xyes; then 7696275970Scy _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7697275970Scy case ${1} in 7698275970Scy */*) func_dirname_result="${1%/*}${2}" ;; 7699275970Scy * ) func_dirname_result="${3}" ;; 7700275970Scy esac]) 7701275970Scy 7702275970Scy _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7703275970Scy func_basename_result="${1##*/}"]) 7704275970Scy 7705275970Scy _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7706275970Scy case ${1} in 7707275970Scy */*) func_dirname_result="${1%/*}${2}" ;; 7708275970Scy * ) func_dirname_result="${3}" ;; 7709275970Scy esac 7710275970Scy func_basename_result="${1##*/}"]) 7711275970Scy 7712275970Scy _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7713275970Scy # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7714275970Scy # positional parameters, so assign one to ordinary parameter first. 7715275970Scy func_stripname_result=${3} 7716275970Scy func_stripname_result=${func_stripname_result#"${1}"} 7717275970Scy func_stripname_result=${func_stripname_result%"${2}"}]) 7718275970Scy 7719275970Scy _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7720275970Scy func_split_long_opt_name=${1%%=*} 7721275970Scy func_split_long_opt_arg=${1#*=}]) 7722275970Scy 7723275970Scy _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7724275970Scy func_split_short_opt_arg=${1#??} 7725275970Scy func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7726275970Scy 7727275970Scy _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7728275970Scy case ${1} in 7729275970Scy *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7730275970Scy *) func_lo2o_result=${1} ;; 7731275970Scy esac]) 7732275970Scy 7733275970Scy _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7734275970Scy 7735275970Scy _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7736275970Scy 7737275970Scy _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7738275970Scyfi 7739275970Scy 7740275970Scyif test x"$lt_shell_append" = xyes; then 7741275970Scy _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7742275970Scy 7743275970Scy _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7744275970Scy func_quote_for_eval "${2}" 7745275970Scydnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7746275970Scy eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7747275970Scy 7748275970Scy # Save a `func_append' function call where possible by direct use of '+=' 7749275970Scy sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7750275970Scy && mv -f "$cfgfile.tmp" "$cfgfile" \ 7751275970Scy || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7752275970Scy test 0 -eq $? || _lt_function_replace_fail=: 7753275970Scyelse 7754275970Scy # Save a `func_append' function call even when '+=' is not available 7755275970Scy sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7756275970Scy && mv -f "$cfgfile.tmp" "$cfgfile" \ 7757275970Scy || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7758275970Scy test 0 -eq $? || _lt_function_replace_fail=: 7759275970Scyfi 7760275970Scy 7761275970Scyif test x"$_lt_function_replace_fail" = x":"; then 7762275970Scy AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7763275970Scyfi 7764275970Scy]) 7765275970Scy 7766275970Scy# _LT_PATH_CONVERSION_FUNCTIONS 7767275970Scy# ----------------------------- 7768275970Scy# Determine which file name conversion functions should be used by 7769275970Scy# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7770275970Scy# for certain cross-compile configurations and native mingw. 7771275970Scym4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7772275970Scy[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7773275970ScyAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7774275970ScyAC_MSG_CHECKING([how to convert $build file names to $host format]) 7775275970ScyAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7776275970Scy[case $host in 7777275970Scy *-*-mingw* ) 7778275970Scy case $build in 7779275970Scy *-*-mingw* ) # actually msys 7780275970Scy lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7781275970Scy ;; 7782275970Scy *-*-cygwin* ) 7783275970Scy lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7784275970Scy ;; 7785275970Scy * ) # otherwise, assume *nix 7786275970Scy lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7787275970Scy ;; 7788275970Scy esac 7789275970Scy ;; 7790275970Scy *-*-cygwin* ) 7791275970Scy case $build in 7792275970Scy *-*-mingw* ) # actually msys 7793275970Scy lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7794275970Scy ;; 7795275970Scy *-*-cygwin* ) 7796275970Scy lt_cv_to_host_file_cmd=func_convert_file_noop 7797275970Scy ;; 7798275970Scy * ) # otherwise, assume *nix 7799275970Scy lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7800275970Scy ;; 7801275970Scy esac 7802275970Scy ;; 7803275970Scy * ) # unhandled hosts (and "normal" native builds) 7804275970Scy lt_cv_to_host_file_cmd=func_convert_file_noop 7805275970Scy ;; 7806275970Scyesac 7807275970Scy]) 7808275970Scyto_host_file_cmd=$lt_cv_to_host_file_cmd 7809275970ScyAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7810275970Scy_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7811275970Scy [0], [convert $build file names to $host format])dnl 7812275970Scy 7813275970ScyAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7814275970ScyAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7815275970Scy[#assume ordinary cross tools, or native build. 7816275970Scylt_cv_to_tool_file_cmd=func_convert_file_noop 7817275970Scycase $host in 7818275970Scy *-*-mingw* ) 7819275970Scy case $build in 7820275970Scy *-*-mingw* ) # actually msys 7821275970Scy lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7822275970Scy ;; 7823275970Scy esac 7824275970Scy ;; 7825275970Scyesac 7826275970Scy]) 7827275970Scyto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7828275970ScyAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7829275970Scy_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7830275970Scy [0], [convert $build files to toolchain format])dnl 7831275970Scy])# _LT_PATH_CONVERSION_FUNCTIONS 7832