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