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