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