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