1# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2 3# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18[m4_warning([this file was generated for autoconf 2.71. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24# 25# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 26# Foundation, Inc. 27# Written by Gordon Matzigkeit, 1996 28# 29# This file is free software; the Free Software Foundation gives 30# unlimited permission to copy and/or distribute it, with or without 31# modifications, as long as this notice is preserved. 32 33m4_define([_LT_COPYING], [dnl 34# Copyright (C) 2014 Free Software Foundation, Inc. 35# This is free software; see the source for copying conditions. There is NO 36# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 37 38# GNU Libtool is free software; you can redistribute it and/or modify 39# it under the terms of the GNU General Public License as published by 40# the Free Software Foundation; either version 2 of of the License, or 41# (at your option) any later version. 42# 43# As a special exception to the GNU General Public License, if you 44# distribute this file as part of a program or library that is built 45# using GNU Libtool, you may include this file under the same 46# distribution terms that you use for the rest of that program. 47# 48# GNU Libtool is distributed in the hope that it will be useful, but 49# WITHOUT ANY WARRANTY; without even the implied warranty of 50# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51# GNU General Public License for more details. 52# 53# You should have received a copy of the GNU General Public License 54# along with this program. If not, see <http://www.gnu.org/licenses/>. 55]) 56 57# serial 59 LT_INIT 58 59 60# LT_PREREQ(VERSION) 61# ------------------ 62# Complain and exit if this libtool version is less that VERSION. 63m4_defun([LT_PREREQ], 64[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 65 [m4_default([$3], 66 [m4_fatal([Libtool version $1 or higher is required], 67 63)])], 68 [$2])]) 69 70 71# _LT_CHECK_BUILDDIR 72# ------------------ 73# Complain if the absolute build directory name contains unusual characters 74m4_defun([_LT_CHECK_BUILDDIR], 75[case `pwd` in 76 *\ * | *\ *) 77 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 78esac 79]) 80 81 82# LT_INIT([OPTIONS]) 83# ------------------ 84AC_DEFUN([LT_INIT], 85[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 86AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 87AC_BEFORE([$0], [LT_LANG])dnl 88AC_BEFORE([$0], [LT_OUTPUT])dnl 89AC_BEFORE([$0], [LTDL_INIT])dnl 90m4_require([_LT_CHECK_BUILDDIR])dnl 91 92dnl Autoconf doesn't catch unexpanded LT_ macros by default: 93m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 94m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 95dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 96dnl unless we require an AC_DEFUNed macro: 97AC_REQUIRE([LTOPTIONS_VERSION])dnl 98AC_REQUIRE([LTSUGAR_VERSION])dnl 99AC_REQUIRE([LTVERSION_VERSION])dnl 100AC_REQUIRE([LTOBSOLETE_VERSION])dnl 101m4_require([_LT_PROG_LTMAIN])dnl 102 103_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 104 105dnl Parse OPTIONS 106_LT_SET_OPTIONS([$0], [$1]) 107 108# This can be used to rebuild libtool when needed 109LIBTOOL_DEPS=$ltmain 110 111# Always use our own libtool. 112LIBTOOL='$(SHELL) $(top_builddir)/libtool' 113AC_SUBST(LIBTOOL)dnl 114 115_LT_SETUP 116 117# Only expand once: 118m4_define([LT_INIT]) 119])# LT_INIT 120 121# Old names: 122AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 123AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 124dnl aclocal-1.4 backwards compatibility: 125dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 126dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 127 128 129# _LT_PREPARE_CC_BASENAME 130# ----------------------- 131m4_defun([_LT_PREPARE_CC_BASENAME], [ 132# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133func_cc_basename () 134{ 135 for cc_temp in @S|@*""; do 136 case $cc_temp in 137 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 138 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 139 \-*) ;; 140 *) break;; 141 esac 142 done 143 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 144} 145])# _LT_PREPARE_CC_BASENAME 146 147 148# _LT_CC_BASENAME(CC) 149# ------------------- 150# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 151# but that macro is also expanded into generated libtool script, which 152# arranges for $SED and $ECHO to be set by different means. 153m4_defun([_LT_CC_BASENAME], 154[m4_require([_LT_PREPARE_CC_BASENAME])dnl 155AC_REQUIRE([_LT_DECL_SED])dnl 156AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157func_cc_basename $1 158cc_basename=$func_cc_basename_result 159]) 160 161 162# _LT_FILEUTILS_DEFAULTS 163# ---------------------- 164# It is okay to use these file commands and assume they have been set 165# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 166m4_defun([_LT_FILEUTILS_DEFAULTS], 167[: ${CP="cp -f"} 168: ${MV="mv -f"} 169: ${RM="rm -f"} 170])# _LT_FILEUTILS_DEFAULTS 171 172 173# _LT_SETUP 174# --------- 175m4_defun([_LT_SETUP], 176[AC_REQUIRE([AC_CANONICAL_HOST])dnl 177AC_REQUIRE([AC_CANONICAL_BUILD])dnl 178AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 179AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 180 181_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 182dnl 183_LT_DECL([], [host_alias], [0], [The host system])dnl 184_LT_DECL([], [host], [0])dnl 185_LT_DECL([], [host_os], [0])dnl 186dnl 187_LT_DECL([], [build_alias], [0], [The build system])dnl 188_LT_DECL([], [build], [0])dnl 189_LT_DECL([], [build_os], [0])dnl 190dnl 191AC_REQUIRE([AC_PROG_CC])dnl 192AC_REQUIRE([LT_PATH_LD])dnl 193AC_REQUIRE([LT_PATH_NM])dnl 194dnl 195AC_REQUIRE([AC_PROG_LN_S])dnl 196test -z "$LN_S" && LN_S="ln -s" 197_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 198dnl 199AC_REQUIRE([LT_CMD_MAX_LEN])dnl 200_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 201_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 202dnl 203m4_require([_LT_FILEUTILS_DEFAULTS])dnl 204m4_require([_LT_CHECK_SHELL_FEATURES])dnl 205m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 206m4_require([_LT_CMD_RELOAD])dnl 207m4_require([_LT_DECL_FILECMD])dnl 208m4_require([_LT_CHECK_MAGIC_METHOD])dnl 209m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 210m4_require([_LT_CMD_OLD_ARCHIVE])dnl 211m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 212m4_require([_LT_WITH_SYSROOT])dnl 213m4_require([_LT_CMD_TRUNCATE])dnl 214 215_LT_CONFIG_LIBTOOL_INIT([ 216# See if we are running on zsh, and set the options that allow our 217# commands through without removal of \ escapes INIT. 218if test -n "\${ZSH_VERSION+set}"; then 219 setopt NO_GLOB_SUBST 220fi 221]) 222if test -n "${ZSH_VERSION+set}"; then 223 setopt NO_GLOB_SUBST 224fi 225 226_LT_CHECK_OBJDIR 227 228m4_require([_LT_TAG_COMPILER])dnl 229 230case $host_os in 231aix3*) 232 # AIX sometimes has problems with the GCC collect2 program. For some 233 # reason, if we set the COLLECT_NAMES environment variable, the problems 234 # vanish in a puff of smoke. 235 if test set != "${COLLECT_NAMES+set}"; then 236 COLLECT_NAMES= 237 export COLLECT_NAMES 238 fi 239 ;; 240esac 241 242# Global variables: 243ofile=libtool 244can_build_shared=yes 245 246# All known linkers require a '.a' archive for static linking (except MSVC and 247# ICC, which need '.lib'). 248libext=a 249 250with_gnu_ld=$lt_cv_prog_gnu_ld 251 252old_CC=$CC 253old_CFLAGS=$CFLAGS 254 255# Set sane defaults for various variables 256test -z "$CC" && CC=cc 257test -z "$LTCC" && LTCC=$CC 258test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 259test -z "$LD" && LD=ld 260test -z "$ac_objext" && ac_objext=o 261 262_LT_CC_BASENAME([$compiler]) 263 264# Only perform the check for file, if the check method requires it 265test -z "$MAGIC_CMD" && MAGIC_CMD=file 266case $deplibs_check_method in 267file_magic*) 268 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 269 _LT_PATH_MAGIC 270 fi 271 ;; 272esac 273 274# Use C for the default configuration in the libtool script 275LT_SUPPORTED_TAG([CC]) 276_LT_LANG_C_CONFIG 277_LT_LANG_DEFAULT_CONFIG 278_LT_CONFIG_COMMANDS 279])# _LT_SETUP 280 281 282# _LT_PREPARE_SED_QUOTE_VARS 283# -------------------------- 284# Define a few sed substitution that help us do robust quoting. 285m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 286[# Backslashify metacharacters that are still active within 287# double-quoted strings. 288sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 289 290# Same as above, but do not quote variable references. 291double_quote_subst='s/\([["`\\]]\)/\\\1/g' 292 293# Sed substitution to delay expansion of an escaped shell variable in a 294# double_quote_subst'ed string. 295delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 296 297# Sed substitution to delay expansion of an escaped single quote. 298delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 299 300# Sed substitution to avoid accidental globbing in evaled expressions 301no_glob_subst='s/\*/\\\*/g' 302]) 303 304# _LT_PROG_LTMAIN 305# --------------- 306# Note that this code is called both from 'configure', and 'config.status' 307# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 308# 'config.status' has no value for ac_aux_dir unless we are using Automake, 309# so we pass a copy along to make sure it has a sensible value anyway. 310m4_defun([_LT_PROG_LTMAIN], 311[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 312_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 313ltmain=$ac_aux_dir/ltmain.sh 314])# _LT_PROG_LTMAIN 315 316 317 318# So that we can recreate a full libtool script including additional 319# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 320# in macros and then make a single call at the end using the 'libtool' 321# label. 322 323 324# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 325# ---------------------------------------- 326# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 327m4_define([_LT_CONFIG_LIBTOOL_INIT], 328[m4_ifval([$1], 329 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 330 [$1 331])])]) 332 333# Initialize. 334m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 335 336 337# _LT_CONFIG_LIBTOOL([COMMANDS]) 338# ------------------------------ 339# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 340m4_define([_LT_CONFIG_LIBTOOL], 341[m4_ifval([$1], 342 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 343 [$1 344])])]) 345 346# Initialize. 347m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 348 349 350# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 351# ----------------------------------------------------- 352m4_defun([_LT_CONFIG_SAVE_COMMANDS], 353[_LT_CONFIG_LIBTOOL([$1]) 354_LT_CONFIG_LIBTOOL_INIT([$2]) 355]) 356 357 358# _LT_FORMAT_COMMENT([COMMENT]) 359# ----------------------------- 360# Add leading comment marks to the start of each line, and a trailing 361# full-stop to the whole comment if one is not present already. 362m4_define([_LT_FORMAT_COMMENT], 363[m4_ifval([$1], [ 364m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 365 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 366)]) 367 368 369 370 371 372# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 373# ------------------------------------------------------------------- 374# CONFIGNAME is the name given to the value in the libtool script. 375# VARNAME is the (base) name used in the configure script. 376# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 377# VARNAME. Any other value will be used directly. 378m4_define([_LT_DECL], 379[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 380 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 381 [m4_ifval([$1], [$1], [$2])]) 382 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 383 m4_ifval([$4], 384 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 385 lt_dict_add_subkey([lt_decl_dict], [$2], 386 [tagged?], [m4_ifval([$5], [yes], [no])])]) 387]) 388 389 390# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 391# -------------------------------------------------------- 392m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 393 394 395# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 396# ------------------------------------------------ 397m4_define([lt_decl_tag_varnames], 398[_lt_decl_filter([tagged?], [yes], $@)]) 399 400 401# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 402# --------------------------------------------------------- 403m4_define([_lt_decl_filter], 404[m4_case([$#], 405 [0], [m4_fatal([$0: too few arguments: $#])], 406 [1], [m4_fatal([$0: too few arguments: $#: $1])], 407 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 408 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 409 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 410]) 411 412 413# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 414# -------------------------------------------------- 415m4_define([lt_decl_quote_varnames], 416[_lt_decl_filter([value], [1], $@)]) 417 418 419# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 420# --------------------------------------------------- 421m4_define([lt_decl_dquote_varnames], 422[_lt_decl_filter([value], [2], $@)]) 423 424 425# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 426# --------------------------------------------------- 427m4_define([lt_decl_varnames_tagged], 428[m4_assert([$# <= 2])dnl 429_$0(m4_quote(m4_default([$1], [[, ]])), 430 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 431 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 432m4_define([_lt_decl_varnames_tagged], 433[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 434 435 436# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 437# ------------------------------------------------ 438m4_define([lt_decl_all_varnames], 439[_$0(m4_quote(m4_default([$1], [[, ]])), 440 m4_if([$2], [], 441 m4_quote(lt_decl_varnames), 442 m4_quote(m4_shift($@))))[]dnl 443]) 444m4_define([_lt_decl_all_varnames], 445[lt_join($@, lt_decl_varnames_tagged([$1], 446 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 447]) 448 449 450# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 451# ------------------------------------ 452# Quote a variable value, and forward it to 'config.status' so that its 453# declaration there will have the same value as in 'configure'. VARNAME 454# must have a single quote delimited value for this to work. 455m4_define([_LT_CONFIG_STATUS_DECLARE], 456[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 457 458 459# _LT_CONFIG_STATUS_DECLARATIONS 460# ------------------------------ 461# We delimit libtool config variables with single quotes, so when 462# we write them to config.status, we have to be sure to quote all 463# embedded single quotes properly. In configure, this macro expands 464# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 465# 466# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 467m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 468[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 469 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 470 471 472# _LT_LIBTOOL_TAGS 473# ---------------- 474# Output comment and list of tags supported by the script 475m4_defun([_LT_LIBTOOL_TAGS], 476[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 477available_tags='_LT_TAGS'dnl 478]) 479 480 481# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 482# ----------------------------------- 483# Extract the dictionary values for VARNAME (optionally with TAG) and 484# expand to a commented shell variable setting: 485# 486# # Some comment about what VAR is for. 487# visible_name=$lt_internal_name 488m4_define([_LT_LIBTOOL_DECLARE], 489[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 490 [description])))[]dnl 491m4_pushdef([_libtool_name], 492 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 493m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 494 [0], [_libtool_name=[$]$1], 495 [1], [_libtool_name=$lt_[]$1], 496 [2], [_libtool_name=$lt_[]$1], 497 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 498m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 499]) 500 501 502# _LT_LIBTOOL_CONFIG_VARS 503# ----------------------- 504# Produce commented declarations of non-tagged libtool config variables 505# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 506# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 507# section) are produced by _LT_LIBTOOL_TAG_VARS. 508m4_defun([_LT_LIBTOOL_CONFIG_VARS], 509[m4_foreach([_lt_var], 510 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 511 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 512 513 514# _LT_LIBTOOL_TAG_VARS(TAG) 515# ------------------------- 516m4_define([_LT_LIBTOOL_TAG_VARS], 517[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 518 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 519 520 521# _LT_TAGVAR(VARNAME, [TAGNAME]) 522# ------------------------------ 523m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 524 525 526# _LT_CONFIG_COMMANDS 527# ------------------- 528# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 529# variables for single and double quote escaping we saved from calls 530# to _LT_DECL, we can put quote escaped variables declarations 531# into 'config.status', and then the shell code to quote escape them in 532# for loops in 'config.status'. Finally, any additional code accumulated 533# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 534m4_defun([_LT_CONFIG_COMMANDS], 535[AC_PROVIDE_IFELSE([LT_OUTPUT], 536 dnl If the libtool generation code has been placed in $CONFIG_LT, 537 dnl instead of duplicating it all over again into config.status, 538 dnl then we will have config.status run $CONFIG_LT later, so it 539 dnl needs to know what name is stored there: 540 [AC_CONFIG_COMMANDS([libtool], 541 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 542 dnl If the libtool generation code is destined for config.status, 543 dnl expand the accumulated commands and init code now: 544 [AC_CONFIG_COMMANDS([libtool], 545 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 546])#_LT_CONFIG_COMMANDS 547 548 549# Initialize. 550m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 551[ 552 553# The HP-UX ksh and POSIX shell print the target directory to stdout 554# if CDPATH is set. 555(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 556 557sed_quote_subst='$sed_quote_subst' 558double_quote_subst='$double_quote_subst' 559delay_variable_subst='$delay_variable_subst' 560_LT_CONFIG_STATUS_DECLARATIONS 561LTCC='$LTCC' 562LTCFLAGS='$LTCFLAGS' 563compiler='$compiler_DEFAULT' 564 565# A function that is used when there is no print builtin or printf. 566func_fallback_echo () 567{ 568 eval 'cat <<_LTECHO_EOF 569\$[]1 570_LTECHO_EOF' 571} 572 573# Quote evaled strings. 574for var in lt_decl_all_varnames([[ \ 575]], lt_decl_quote_varnames); do 576 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 577 *[[\\\\\\\`\\"\\\$]]*) 578 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 579 ;; 580 *) 581 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 582 ;; 583 esac 584done 585 586# Double-quote double-evaled strings. 587for var in lt_decl_all_varnames([[ \ 588]], lt_decl_dquote_varnames); do 589 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 590 *[[\\\\\\\`\\"\\\$]]*) 591 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 592 ;; 593 *) 594 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 595 ;; 596 esac 597done 598 599_LT_OUTPUT_LIBTOOL_INIT 600]) 601 602# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 603# ------------------------------------ 604# Generate a child script FILE with all initialization necessary to 605# reuse the environment learned by the parent script, and make the 606# file executable. If COMMENT is supplied, it is inserted after the 607# '#!' sequence but before initialization text begins. After this 608# macro, additional text can be appended to FILE to form the body of 609# the child script. The macro ends with non-zero status if the 610# file could not be fully written (such as if the disk is full). 611m4_ifdef([AS_INIT_GENERATED], 612[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 613[m4_defun([_LT_GENERATED_FILE_INIT], 614[m4_require([AS_PREPARE])]dnl 615[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 616[lt_write_fail=0 617cat >$1 <<_ASEOF || lt_write_fail=1 618#! $SHELL 619# Generated by $as_me. 620$2 621SHELL=\${CONFIG_SHELL-$SHELL} 622export SHELL 623_ASEOF 624cat >>$1 <<\_ASEOF || lt_write_fail=1 625AS_SHELL_SANITIZE 626_AS_PREPARE 627exec AS_MESSAGE_FD>&1 628_ASEOF 629test 0 = "$lt_write_fail" && chmod +x $1[]dnl 630m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 631 632# LT_OUTPUT 633# --------- 634# This macro allows early generation of the libtool script (before 635# AC_OUTPUT is called), incase it is used in configure for compilation 636# tests. 637AC_DEFUN([LT_OUTPUT], 638[: ${CONFIG_LT=./config.lt} 639AC_MSG_NOTICE([creating $CONFIG_LT]) 640_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 641[# Run this file to recreate a libtool stub with the current configuration.]) 642 643cat >>"$CONFIG_LT" <<\_LTEOF 644lt_cl_silent=false 645exec AS_MESSAGE_LOG_FD>>config.log 646{ 647 echo 648 AS_BOX([Running $as_me.]) 649} >&AS_MESSAGE_LOG_FD 650 651lt_cl_help="\ 652'$as_me' creates a local libtool stub from the current configuration, 653for use in further configure time tests before the real libtool is 654generated. 655 656Usage: $[0] [[OPTIONS]] 657 658 -h, --help print this help, then exit 659 -V, --version print version number, then exit 660 -q, --quiet do not print progress messages 661 -d, --debug don't remove temporary files 662 663Report bugs to <bug-libtool@gnu.org>." 664 665lt_cl_version="\ 666m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 667m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 668configured by $[0], generated by m4_PACKAGE_STRING. 669 670Copyright (C) 2011 Free Software Foundation, Inc. 671This config.lt script is free software; the Free Software Foundation 672gives unlimited permision to copy, distribute and modify it." 673 674while test 0 != $[#] 675do 676 case $[1] in 677 --version | --v* | -V ) 678 echo "$lt_cl_version"; exit 0 ;; 679 --help | --h* | -h ) 680 echo "$lt_cl_help"; exit 0 ;; 681 --debug | --d* | -d ) 682 debug=: ;; 683 --quiet | --q* | --silent | --s* | -q ) 684 lt_cl_silent=: ;; 685 686 -*) AC_MSG_ERROR([unrecognized option: $[1] 687Try '$[0] --help' for more information.]) ;; 688 689 *) AC_MSG_ERROR([unrecognized argument: $[1] 690Try '$[0] --help' for more information.]) ;; 691 esac 692 shift 693done 694 695if $lt_cl_silent; then 696 exec AS_MESSAGE_FD>/dev/null 697fi 698_LTEOF 699 700cat >>"$CONFIG_LT" <<_LTEOF 701_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 702_LTEOF 703 704cat >>"$CONFIG_LT" <<\_LTEOF 705AC_MSG_NOTICE([creating $ofile]) 706_LT_OUTPUT_LIBTOOL_COMMANDS 707AS_EXIT(0) 708_LTEOF 709chmod +x "$CONFIG_LT" 710 711# configure is writing to config.log, but config.lt does its own redirection, 712# appending to config.log, which fails on DOS, as config.log is still kept 713# open by configure. Here we exec the FD to /dev/null, effectively closing 714# config.log, so it can be properly (re)opened and appended to by config.lt. 715lt_cl_success=: 716test yes = "$silent" && 717 lt_config_lt_args="$lt_config_lt_args --quiet" 718exec AS_MESSAGE_LOG_FD>/dev/null 719$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 720exec AS_MESSAGE_LOG_FD>>config.log 721$lt_cl_success || AS_EXIT(1) 722])# LT_OUTPUT 723 724 725# _LT_CONFIG(TAG) 726# --------------- 727# If TAG is the built-in tag, create an initial libtool script with a 728# default configuration from the untagged config vars. Otherwise add code 729# to config.status for appending the configuration named by TAG from the 730# matching tagged config vars. 731m4_defun([_LT_CONFIG], 732[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 733_LT_CONFIG_SAVE_COMMANDS([ 734 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 735 m4_if(_LT_TAG, [C], [ 736 # See if we are running on zsh, and set the options that allow our 737 # commands through without removal of \ escapes. 738 if test -n "${ZSH_VERSION+set}"; then 739 setopt NO_GLOB_SUBST 740 fi 741 742 cfgfile=${ofile}T 743 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 744 $RM "$cfgfile" 745 746 cat <<_LT_EOF >> "$cfgfile" 747#! $SHELL 748# Generated automatically by $as_me ($PACKAGE) $VERSION 749# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 750# NOTE: Changes made to this file will be lost: look at ltmain.sh. 751 752# Provide generalized library-building support services. 753# Written by Gordon Matzigkeit, 1996 754 755_LT_COPYING 756_LT_LIBTOOL_TAGS 757 758# Configured defaults for sys_lib_dlsearch_path munging. 759: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 760 761# ### BEGIN LIBTOOL CONFIG 762_LT_LIBTOOL_CONFIG_VARS 763_LT_LIBTOOL_TAG_VARS 764# ### END LIBTOOL CONFIG 765 766_LT_EOF 767 768 cat <<'_LT_EOF' >> "$cfgfile" 769 770# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 771 772_LT_PREPARE_MUNGE_PATH_LIST 773_LT_PREPARE_CC_BASENAME 774 775# ### END FUNCTIONS SHARED WITH CONFIGURE 776 777_LT_EOF 778 779 case $host_os in 780 aix3*) 781 cat <<\_LT_EOF >> "$cfgfile" 782# AIX sometimes has problems with the GCC collect2 program. For some 783# reason, if we set the COLLECT_NAMES environment variable, the problems 784# vanish in a puff of smoke. 785if test set != "${COLLECT_NAMES+set}"; then 786 COLLECT_NAMES= 787 export COLLECT_NAMES 788fi 789_LT_EOF 790 ;; 791 esac 792 793 _LT_PROG_LTMAIN 794 795 # We use sed instead of cat because bash on DJGPP gets confused if 796 # if finds mixed CR/LF and LF-only lines. Since sed operates in 797 # text mode, it properly converts lines to CR/LF. This bash problem 798 # is reportedly fixed, but why not run on old versions too? 799 $SED '$q' "$ltmain" >> "$cfgfile" \ 800 || (rm -f "$cfgfile"; exit 1) 801 802 mv -f "$cfgfile" "$ofile" || 803 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 804 chmod +x "$ofile" 805], 806[cat <<_LT_EOF >> "$ofile" 807 808dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 809dnl in a comment (ie after a #). 810# ### BEGIN LIBTOOL TAG CONFIG: $1 811_LT_LIBTOOL_TAG_VARS(_LT_TAG) 812# ### END LIBTOOL TAG CONFIG: $1 813_LT_EOF 814])dnl /m4_if 815], 816[m4_if([$1], [], [ 817 PACKAGE='$PACKAGE' 818 VERSION='$VERSION' 819 RM='$RM' 820 ofile='$ofile'], []) 821])dnl /_LT_CONFIG_SAVE_COMMANDS 822])# _LT_CONFIG 823 824 825# LT_SUPPORTED_TAG(TAG) 826# --------------------- 827# Trace this macro to discover what tags are supported by the libtool 828# --tag option, using: 829# autoconf --trace 'LT_SUPPORTED_TAG:$1' 830AC_DEFUN([LT_SUPPORTED_TAG], []) 831 832 833# C support is built-in for now 834m4_define([_LT_LANG_C_enabled], []) 835m4_define([_LT_TAGS], []) 836 837 838# LT_LANG(LANG) 839# ------------- 840# Enable libtool support for the given language if not already enabled. 841AC_DEFUN([LT_LANG], 842[AC_BEFORE([$0], [LT_OUTPUT])dnl 843m4_case([$1], 844 [C], [_LT_LANG(C)], 845 [C++], [_LT_LANG(CXX)], 846 [Go], [_LT_LANG(GO)], 847 [Java], [_LT_LANG(GCJ)], 848 [Fortran 77], [_LT_LANG(F77)], 849 [Fortran], [_LT_LANG(FC)], 850 [Windows Resource], [_LT_LANG(RC)], 851 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 852 [_LT_LANG($1)], 853 [m4_fatal([$0: unsupported language: "$1"])])])dnl 854])# LT_LANG 855 856 857# _LT_LANG(LANGNAME) 858# ------------------ 859m4_defun([_LT_LANG], 860[m4_ifdef([_LT_LANG_]$1[_enabled], [], 861 [LT_SUPPORTED_TAG([$1])dnl 862 m4_append([_LT_TAGS], [$1 ])dnl 863 m4_define([_LT_LANG_]$1[_enabled], [])dnl 864 _LT_LANG_$1_CONFIG($1)])dnl 865])# _LT_LANG 866 867 868m4_ifndef([AC_PROG_GO], [ 869# NOTE: This macro has been submitted for inclusion into # 870# GNU Autoconf as AC_PROG_GO. When it is available in # 871# a released version of Autoconf we should remove this # 872# macro and use it instead. # 873m4_defun([AC_PROG_GO], 874[AC_LANG_PUSH(Go)dnl 875AC_ARG_VAR([GOC], [Go compiler command])dnl 876AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 877_AC_ARG_VAR_LDFLAGS()dnl 878AC_CHECK_TOOL(GOC, gccgo) 879if test -z "$GOC"; then 880 if test -n "$ac_tool_prefix"; then 881 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 882 fi 883fi 884if test -z "$GOC"; then 885 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 886fi 887])#m4_defun 888])#m4_ifndef 889 890 891# _LT_LANG_DEFAULT_CONFIG 892# ----------------------- 893m4_defun([_LT_LANG_DEFAULT_CONFIG], 894[AC_PROVIDE_IFELSE([AC_PROG_CXX], 895 [LT_LANG(CXX)], 896 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 897 898AC_PROVIDE_IFELSE([AC_PROG_F77], 899 [LT_LANG(F77)], 900 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 901 902AC_PROVIDE_IFELSE([AC_PROG_FC], 903 [LT_LANG(FC)], 904 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 905 906dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 907dnl pulling things in needlessly. 908AC_PROVIDE_IFELSE([AC_PROG_GCJ], 909 [LT_LANG(GCJ)], 910 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 911 [LT_LANG(GCJ)], 912 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 913 [LT_LANG(GCJ)], 914 [m4_ifdef([AC_PROG_GCJ], 915 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 916 m4_ifdef([A][M_PROG_GCJ], 917 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 918 m4_ifdef([LT_PROG_GCJ], 919 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 920 921AC_PROVIDE_IFELSE([AC_PROG_GO], 922 [LT_LANG(GO)], 923 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 924 925AC_PROVIDE_IFELSE([LT_PROG_RC], 926 [LT_LANG(RC)], 927 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 928])# _LT_LANG_DEFAULT_CONFIG 929 930# Obsolete macros: 931AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 932AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 933AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 934AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 935AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 936dnl aclocal-1.4 backwards compatibility: 937dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 938dnl AC_DEFUN([AC_LIBTOOL_F77], []) 939dnl AC_DEFUN([AC_LIBTOOL_FC], []) 940dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 941dnl AC_DEFUN([AC_LIBTOOL_RC], []) 942 943 944# _LT_TAG_COMPILER 945# ---------------- 946m4_defun([_LT_TAG_COMPILER], 947[AC_REQUIRE([AC_PROG_CC])dnl 948 949_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 950_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 951_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 952_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 953 954# If no C compiler was specified, use CC. 955LTCC=${LTCC-"$CC"} 956 957# If no C compiler flags were specified, use CFLAGS. 958LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 959 960# Allow CC to be a program name with arguments. 961compiler=$CC 962])# _LT_TAG_COMPILER 963 964 965# _LT_COMPILER_BOILERPLATE 966# ------------------------ 967# Check for compiler boilerplate output or warnings with 968# the simple compiler test code. 969m4_defun([_LT_COMPILER_BOILERPLATE], 970[m4_require([_LT_DECL_SED])dnl 971ac_outfile=conftest.$ac_objext 972echo "$lt_simple_compile_test_code" >conftest.$ac_ext 973eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 974_lt_compiler_boilerplate=`cat conftest.err` 975$RM conftest* 976])# _LT_COMPILER_BOILERPLATE 977 978 979# _LT_LINKER_BOILERPLATE 980# ---------------------- 981# Check for linker boilerplate output or warnings with 982# the simple link test code. 983m4_defun([_LT_LINKER_BOILERPLATE], 984[m4_require([_LT_DECL_SED])dnl 985ac_outfile=conftest.$ac_objext 986echo "$lt_simple_link_test_code" >conftest.$ac_ext 987eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 988_lt_linker_boilerplate=`cat conftest.err` 989$RM -r conftest* 990])# _LT_LINKER_BOILERPLATE 991 992# _LT_REQUIRED_DARWIN_CHECKS 993# ------------------------- 994m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 995 case $host_os in 996 rhapsody* | darwin*) 997 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 998 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 999 AC_CHECK_TOOL([LIPO], [lipo], [:]) 1000 AC_CHECK_TOOL([OTOOL], [otool], [:]) 1001 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1002 _LT_DECL([], [DSYMUTIL], [1], 1003 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1004 _LT_DECL([], [NMEDIT], [1], 1005 [Tool to change global to local symbols on Mac OS X]) 1006 _LT_DECL([], [LIPO], [1], 1007 [Tool to manipulate fat objects and archives on Mac OS X]) 1008 _LT_DECL([], [OTOOL], [1], 1009 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1010 _LT_DECL([], [OTOOL64], [1], 1011 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1012 1013 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1014 [lt_cv_apple_cc_single_mod=no 1015 if test -z "$LT_MULTI_MODULE"; then 1016 # By default we will add the -single_module flag. You can override 1017 # by either setting the environment variable LT_MULTI_MODULE 1018 # non-empty at configure time, or by adding -multi_module to the 1019 # link flags. 1020 rm -rf libconftest.dylib* 1021 echo "int foo(void){return 1;}" > conftest.c 1022 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1024 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1025 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1026 _lt_result=$? 1027 # If there is a non-empty error log, and "single_module" 1028 # appears in it, assume the flag caused a linker warning 1029 if test -s conftest.err && $GREP single_module conftest.err; then 1030 cat conftest.err >&AS_MESSAGE_LOG_FD 1031 # Otherwise, if the output was created with a 0 exit code from 1032 # the compiler, it worked. 1033 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1034 lt_cv_apple_cc_single_mod=yes 1035 else 1036 cat conftest.err >&AS_MESSAGE_LOG_FD 1037 fi 1038 rm -rf libconftest.dylib* 1039 rm -f conftest.* 1040 fi]) 1041 1042 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1043 [lt_cv_ld_exported_symbols_list], 1044 [lt_cv_ld_exported_symbols_list=no 1045 save_LDFLAGS=$LDFLAGS 1046 echo "_main" > conftest.sym 1047 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1048 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1049 [lt_cv_ld_exported_symbols_list=yes], 1050 [lt_cv_ld_exported_symbols_list=no]) 1051 LDFLAGS=$save_LDFLAGS 1052 ]) 1053 1054 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1055 [lt_cv_ld_force_load=no 1056 cat > conftest.c << _LT_EOF 1057int forced_loaded() { return 2;} 1058_LT_EOF 1059 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1060 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1061 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1062 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1063 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1064 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1065 cat > conftest.c << _LT_EOF 1066int main() { return 0;} 1067_LT_EOF 1068 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1069 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1070 _lt_result=$? 1071 if test -s conftest.err && $GREP force_load conftest.err; then 1072 cat conftest.err >&AS_MESSAGE_LOG_FD 1073 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1074 lt_cv_ld_force_load=yes 1075 else 1076 cat conftest.err >&AS_MESSAGE_LOG_FD 1077 fi 1078 rm -f conftest.err libconftest.a conftest conftest.c 1079 rm -rf conftest.dSYM 1080 ]) 1081 case $host_os in 1082 rhapsody* | darwin1.[[012]]) 1083 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1084 darwin1.*) 1085 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1086 darwin*) 1087 case $MACOSX_DEPLOYMENT_TARGET,$host in 1088 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1089 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1090 *) 1091 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1092 esac 1093 ;; 1094 esac 1095 if test yes = "$lt_cv_apple_cc_single_mod"; then 1096 _lt_dar_single_mod='$single_module' 1097 fi 1098 if test yes = "$lt_cv_ld_exported_symbols_list"; then 1099 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1100 else 1101 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1102 fi 1103 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1104 _lt_dsymutil='~$DSYMUTIL $lib || :' 1105 else 1106 _lt_dsymutil= 1107 fi 1108 ;; 1109 esac 1110]) 1111 1112 1113# _LT_DARWIN_LINKER_FEATURES([TAG]) 1114# --------------------------------- 1115# Checks for linker and compiler features on darwin 1116m4_defun([_LT_DARWIN_LINKER_FEATURES], 1117[ 1118 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1119 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1120 _LT_TAGVAR(hardcode_direct, $1)=no 1121 _LT_TAGVAR(hardcode_automatic, $1)=yes 1122 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1123 if test yes = "$lt_cv_ld_force_load"; then 1124 _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\"`' 1125 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1126 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1127 else 1128 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1129 fi 1130 _LT_TAGVAR(link_all_deplibs, $1)=yes 1131 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1132 case $cc_basename in 1133 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1134 *) _lt_dar_can_shared=$GCC ;; 1135 esac 1136 if test yes = "$_lt_dar_can_shared"; then 1137 output_verbose_link_cmd=func_echo_all 1138 _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" 1139 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1140 _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" 1141 _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" 1142 m4_if([$1], [CXX], 1143[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1144 _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" 1145 _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" 1146 fi 1147],[]) 1148 else 1149 _LT_TAGVAR(ld_shlibs, $1)=no 1150 fi 1151]) 1152 1153# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1154# ---------------------------------- 1155# Links a minimal program and checks the executable 1156# for the system default hardcoded library path. In most cases, 1157# this is /usr/lib:/lib, but when the MPI compilers are used 1158# the location of the communication and MPI libs are included too. 1159# If we don't find anything, use the default library path according 1160# to the aix ld manual. 1161# Store the results from the different compilers for each TAGNAME. 1162# Allow to override them for all tags through lt_cv_aix_libpath. 1163m4_defun([_LT_SYS_MODULE_PATH_AIX], 1164[m4_require([_LT_DECL_SED])dnl 1165if test set = "${lt_cv_aix_libpath+set}"; then 1166 aix_libpath=$lt_cv_aix_libpath 1167else 1168 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1169 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1170 lt_aix_libpath_sed='[ 1171 /Import File Strings/,/^$/ { 1172 /^0/ { 1173 s/^0 *\([^ ]*\) *$/\1/ 1174 p 1175 } 1176 }]' 1177 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1178 # Check for a 64-bit object if we didn't find anything. 1179 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1180 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181 fi],[]) 1182 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1184 fi 1185 ]) 1186 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1187fi 1188])# _LT_SYS_MODULE_PATH_AIX 1189 1190 1191# _LT_SHELL_INIT(ARG) 1192# ------------------- 1193m4_define([_LT_SHELL_INIT], 1194[m4_divert_text([M4SH-INIT], [$1 1195])])# _LT_SHELL_INIT 1196 1197 1198 1199# _LT_PROG_ECHO_BACKSLASH 1200# ----------------------- 1201# Find how we can fake an echo command that does not interpret backslash. 1202# In particular, with Autoconf 2.60 or later we add some code to the start 1203# of the generated configure script that will find a shell with a builtin 1204# printf (that we can use as an echo command). 1205m4_defun([_LT_PROG_ECHO_BACKSLASH], 1206[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1207ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1208ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1209 1210AC_MSG_CHECKING([how to print strings]) 1211# Test print first, because it will be a builtin if present. 1212if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1213 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1214 ECHO='print -r --' 1215elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1216 ECHO='printf %s\n' 1217else 1218 # Use this function as a fallback that always works. 1219 func_fallback_echo () 1220 { 1221 eval 'cat <<_LTECHO_EOF 1222$[]1 1223_LTECHO_EOF' 1224 } 1225 ECHO='func_fallback_echo' 1226fi 1227 1228# func_echo_all arg... 1229# Invoke $ECHO with all args, space-separated. 1230func_echo_all () 1231{ 1232 $ECHO "$*" 1233} 1234 1235case $ECHO in 1236 printf*) AC_MSG_RESULT([printf]) ;; 1237 print*) AC_MSG_RESULT([print -r]) ;; 1238 *) AC_MSG_RESULT([cat]) ;; 1239esac 1240 1241m4_ifdef([_AS_DETECT_SUGGESTED], 1242[_AS_DETECT_SUGGESTED([ 1243 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1244 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1245 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1246 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1247 PATH=/empty FPATH=/empty; export PATH FPATH 1248 test "X`printf %s $ECHO`" = "X$ECHO" \ 1249 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1250 1251_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1252_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1253])# _LT_PROG_ECHO_BACKSLASH 1254 1255 1256# _LT_WITH_SYSROOT 1257# ---------------- 1258AC_DEFUN([_LT_WITH_SYSROOT], 1259[m4_require([_LT_DECL_SED])dnl 1260AC_MSG_CHECKING([for sysroot]) 1261AC_ARG_WITH([sysroot], 1262[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1263 [Search for dependent libraries within DIR (or the compiler's sysroot 1264 if not specified).])], 1265[], [with_sysroot=no]) 1266 1267dnl lt_sysroot will always be passed unquoted. We quote it here 1268dnl in case the user passed a directory name. 1269lt_sysroot= 1270case $with_sysroot in #( 1271 yes) 1272 if test yes = "$GCC"; then 1273 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1274 fi 1275 ;; #( 1276 /*) 1277 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1278 ;; #( 1279 no|'') 1280 ;; #( 1281 *) 1282 AC_MSG_RESULT([$with_sysroot]) 1283 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1284 ;; 1285esac 1286 1287 AC_MSG_RESULT([${lt_sysroot:-no}]) 1288_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1289[dependent libraries, and where our libraries should be installed.])]) 1290 1291# _LT_ENABLE_LOCK 1292# --------------- 1293m4_defun([_LT_ENABLE_LOCK], 1294[AC_ARG_ENABLE([libtool-lock], 1295 [AS_HELP_STRING([--disable-libtool-lock], 1296 [avoid locking (might break parallel builds)])]) 1297test no = "$enable_libtool_lock" || enable_libtool_lock=yes 1298 1299# Some flags need to be propagated to the compiler or linker for good 1300# libtool support. 1301case $host in 1302ia64-*-hpux*) 1303 # Find out what ABI is being produced by ac_compile, and set mode 1304 # options accordingly. 1305 echo 'int i;' > conftest.$ac_ext 1306 if AC_TRY_EVAL(ac_compile); then 1307 case `$FILECMD conftest.$ac_objext` in 1308 *ELF-32*) 1309 HPUX_IA64_MODE=32 1310 ;; 1311 *ELF-64*) 1312 HPUX_IA64_MODE=64 1313 ;; 1314 esac 1315 fi 1316 rm -rf conftest* 1317 ;; 1318*-*-irix6*) 1319 # Find out what ABI is being produced by ac_compile, and set linker 1320 # options accordingly. 1321 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1322 if AC_TRY_EVAL(ac_compile); then 1323 if test yes = "$lt_cv_prog_gnu_ld"; then 1324 case `$FILECMD conftest.$ac_objext` in 1325 *32-bit*) 1326 LD="${LD-ld} -melf32bsmip" 1327 ;; 1328 *N32*) 1329 LD="${LD-ld} -melf32bmipn32" 1330 ;; 1331 *64-bit*) 1332 LD="${LD-ld} -melf64bmip" 1333 ;; 1334 esac 1335 else 1336 case `$FILECMD conftest.$ac_objext` in 1337 *32-bit*) 1338 LD="${LD-ld} -32" 1339 ;; 1340 *N32*) 1341 LD="${LD-ld} -n32" 1342 ;; 1343 *64-bit*) 1344 LD="${LD-ld} -64" 1345 ;; 1346 esac 1347 fi 1348 fi 1349 rm -rf conftest* 1350 ;; 1351 1352mips64*-*linux*) 1353 # Find out what ABI is being produced by ac_compile, and set linker 1354 # options accordingly. 1355 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1356 if AC_TRY_EVAL(ac_compile); then 1357 emul=elf 1358 case `$FILECMD conftest.$ac_objext` in 1359 *32-bit*) 1360 emul="${emul}32" 1361 ;; 1362 *64-bit*) 1363 emul="${emul}64" 1364 ;; 1365 esac 1366 case `$FILECMD conftest.$ac_objext` in 1367 *MSB*) 1368 emul="${emul}btsmip" 1369 ;; 1370 *LSB*) 1371 emul="${emul}ltsmip" 1372 ;; 1373 esac 1374 case `$FILECMD conftest.$ac_objext` in 1375 *N32*) 1376 emul="${emul}n32" 1377 ;; 1378 esac 1379 LD="${LD-ld} -m $emul" 1380 fi 1381 rm -rf conftest* 1382 ;; 1383 1384x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1385s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1386 # Find out what ABI is being produced by ac_compile, and set linker 1387 # options accordingly. Note that the listed cases only cover the 1388 # situations where additional linker options are needed (such as when 1389 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1390 # vice versa); the common cases where no linker options are needed do 1391 # not appear in the list. 1392 echo 'int i;' > conftest.$ac_ext 1393 if AC_TRY_EVAL(ac_compile); then 1394 case `$FILECMD conftest.o` in 1395 *32-bit*) 1396 case $host in 1397 x86_64-*kfreebsd*-gnu) 1398 LD="${LD-ld} -m elf_i386_fbsd" 1399 ;; 1400 x86_64-*linux*) 1401 case `$FILECMD conftest.o` in 1402 *x86-64*) 1403 LD="${LD-ld} -m elf32_x86_64" 1404 ;; 1405 *) 1406 LD="${LD-ld} -m elf_i386" 1407 ;; 1408 esac 1409 ;; 1410 powerpc64le-*linux*) 1411 LD="${LD-ld} -m elf32lppclinux" 1412 ;; 1413 powerpc64-*linux*) 1414 LD="${LD-ld} -m elf32ppclinux" 1415 ;; 1416 s390x-*linux*) 1417 LD="${LD-ld} -m elf_s390" 1418 ;; 1419 sparc64-*linux*) 1420 LD="${LD-ld} -m elf32_sparc" 1421 ;; 1422 esac 1423 ;; 1424 *64-bit*) 1425 case $host in 1426 x86_64-*kfreebsd*-gnu) 1427 LD="${LD-ld} -m elf_x86_64_fbsd" 1428 ;; 1429 x86_64-*linux*) 1430 LD="${LD-ld} -m elf_x86_64" 1431 ;; 1432 powerpcle-*linux*) 1433 LD="${LD-ld} -m elf64lppc" 1434 ;; 1435 powerpc-*linux*) 1436 LD="${LD-ld} -m elf64ppc" 1437 ;; 1438 s390*-*linux*|s390*-*tpf*) 1439 LD="${LD-ld} -m elf64_s390" 1440 ;; 1441 sparc*-*linux*) 1442 LD="${LD-ld} -m elf64_sparc" 1443 ;; 1444 esac 1445 ;; 1446 esac 1447 fi 1448 rm -rf conftest* 1449 ;; 1450 1451*-*-sco3.2v5*) 1452 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1453 SAVE_CFLAGS=$CFLAGS 1454 CFLAGS="$CFLAGS -belf" 1455 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1456 [AC_LANG_PUSH(C) 1457 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1458 AC_LANG_POP]) 1459 if test yes != "$lt_cv_cc_needs_belf"; then 1460 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1461 CFLAGS=$SAVE_CFLAGS 1462 fi 1463 ;; 1464*-*solaris*) 1465 # Find out what ABI is being produced by ac_compile, and set linker 1466 # options accordingly. 1467 echo 'int i;' > conftest.$ac_ext 1468 if AC_TRY_EVAL(ac_compile); then 1469 case `$FILECMD conftest.o` in 1470 *64-bit*) 1471 case $lt_cv_prog_gnu_ld in 1472 yes*) 1473 case $host in 1474 i?86-*-solaris*|x86_64-*-solaris*) 1475 LD="${LD-ld} -m elf_x86_64" 1476 ;; 1477 sparc*-*-solaris*) 1478 LD="${LD-ld} -m elf64_sparc" 1479 ;; 1480 esac 1481 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1482 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1483 LD=${LD-ld}_sol2 1484 fi 1485 ;; 1486 *) 1487 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1488 LD="${LD-ld} -64" 1489 fi 1490 ;; 1491 esac 1492 ;; 1493 esac 1494 fi 1495 rm -rf conftest* 1496 ;; 1497esac 1498 1499need_locks=$enable_libtool_lock 1500])# _LT_ENABLE_LOCK 1501 1502 1503# _LT_PROG_AR 1504# ----------- 1505m4_defun([_LT_PROG_AR], 1506[AC_CHECK_TOOLS(AR, [ar], false) 1507: ${AR=ar} 1508_LT_DECL([], [AR], [1], [The archiver]) 1509 1510# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1511# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1512# higher priority because thats what people were doing historically (setting 1513# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1514# variable obsoleted/removed. 1515 1516test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1517lt_ar_flags=$AR_FLAGS 1518_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1519 1520# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1521# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1522_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1523 [Flags to create an archive]) 1524 1525AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1526 [lt_cv_ar_at_file=no 1527 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1528 [echo conftest.$ac_objext > conftest.lst 1529 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1530 AC_TRY_EVAL([lt_ar_try]) 1531 if test 0 -eq "$ac_status"; then 1532 # Ensure the archiver fails upon bogus file names. 1533 rm -f conftest.$ac_objext libconftest.a 1534 AC_TRY_EVAL([lt_ar_try]) 1535 if test 0 -ne "$ac_status"; then 1536 lt_cv_ar_at_file=@ 1537 fi 1538 fi 1539 rm -f conftest.* libconftest.a 1540 ]) 1541 ]) 1542 1543if test no = "$lt_cv_ar_at_file"; then 1544 archiver_list_spec= 1545else 1546 archiver_list_spec=$lt_cv_ar_at_file 1547fi 1548_LT_DECL([], [archiver_list_spec], [1], 1549 [How to feed a file listing to the archiver]) 1550])# _LT_PROG_AR 1551 1552 1553# _LT_CMD_OLD_ARCHIVE 1554# ------------------- 1555m4_defun([_LT_CMD_OLD_ARCHIVE], 1556[_LT_PROG_AR 1557 1558AC_CHECK_TOOL(STRIP, strip, :) 1559test -z "$STRIP" && STRIP=: 1560_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1561 1562AC_CHECK_TOOL(RANLIB, ranlib, :) 1563test -z "$RANLIB" && RANLIB=: 1564_LT_DECL([], [RANLIB], [1], 1565 [Commands used to install an old-style archive]) 1566 1567# Determine commands to create old-style static archives. 1568old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1569old_postinstall_cmds='chmod 644 $oldlib' 1570old_postuninstall_cmds= 1571 1572if test -n "$RANLIB"; then 1573 case $host_os in 1574 bitrig* | openbsd*) 1575 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1576 ;; 1577 *) 1578 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1579 ;; 1580 esac 1581 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1582fi 1583 1584case $host_os in 1585 darwin*) 1586 lock_old_archive_extraction=yes ;; 1587 *) 1588 lock_old_archive_extraction=no ;; 1589esac 1590_LT_DECL([], [old_postinstall_cmds], [2]) 1591_LT_DECL([], [old_postuninstall_cmds], [2]) 1592_LT_TAGDECL([], [old_archive_cmds], [2], 1593 [Commands used to build an old-style archive]) 1594_LT_DECL([], [lock_old_archive_extraction], [0], 1595 [Whether to use a lock for old archive extraction]) 1596])# _LT_CMD_OLD_ARCHIVE 1597 1598 1599# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1600# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1601# ---------------------------------------------------------------- 1602# Check whether the given compiler option works 1603AC_DEFUN([_LT_COMPILER_OPTION], 1604[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1605m4_require([_LT_DECL_SED])dnl 1606AC_CACHE_CHECK([$1], [$2], 1607 [$2=no 1608 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1609 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1610 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1611 # Insert the option either (1) after the last *FLAGS variable, or 1612 # (2) before a word containing "conftest.", or (3) at the end. 1613 # Note that $ac_compile itself does not contain backslashes and begins 1614 # with a dollar sign (not a hyphen), so the echo should work correctly. 1615 # The option is referenced via a variable to avoid confusing sed. 1616 lt_compile=`echo "$ac_compile" | $SED \ 1617 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1618 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1619 -e 's:$: $lt_compiler_flag:'` 1620 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1621 (eval "$lt_compile" 2>conftest.err) 1622 ac_status=$? 1623 cat conftest.err >&AS_MESSAGE_LOG_FD 1624 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1625 if (exit $ac_status) && test -s "$ac_outfile"; then 1626 # The compiler can only warn and ignore the option if not recognized 1627 # So say no if there are warnings other than the usual output. 1628 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1629 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1630 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1631 $2=yes 1632 fi 1633 fi 1634 $RM conftest* 1635]) 1636 1637if test yes = "[$]$2"; then 1638 m4_if([$5], , :, [$5]) 1639else 1640 m4_if([$6], , :, [$6]) 1641fi 1642])# _LT_COMPILER_OPTION 1643 1644# Old name: 1645AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1646dnl aclocal-1.4 backwards compatibility: 1647dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1648 1649 1650# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1651# [ACTION-SUCCESS], [ACTION-FAILURE]) 1652# ---------------------------------------------------- 1653# Check whether the given linker option works 1654AC_DEFUN([_LT_LINKER_OPTION], 1655[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1656m4_require([_LT_DECL_SED])dnl 1657AC_CACHE_CHECK([$1], [$2], 1658 [$2=no 1659 save_LDFLAGS=$LDFLAGS 1660 LDFLAGS="$LDFLAGS $3" 1661 echo "$lt_simple_link_test_code" > conftest.$ac_ext 1662 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1663 # The linker can only warn and ignore the option if not recognized 1664 # So say no if there are warnings 1665 if test -s conftest.err; then 1666 # Append any errors to the config.log. 1667 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1668 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1669 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1670 if diff conftest.exp conftest.er2 >/dev/null; then 1671 $2=yes 1672 fi 1673 else 1674 $2=yes 1675 fi 1676 fi 1677 $RM -r conftest* 1678 LDFLAGS=$save_LDFLAGS 1679]) 1680 1681if test yes = "[$]$2"; then 1682 m4_if([$4], , :, [$4]) 1683else 1684 m4_if([$5], , :, [$5]) 1685fi 1686])# _LT_LINKER_OPTION 1687 1688# Old name: 1689AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1690dnl aclocal-1.4 backwards compatibility: 1691dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1692 1693 1694# LT_CMD_MAX_LEN 1695#--------------- 1696AC_DEFUN([LT_CMD_MAX_LEN], 1697[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1698# find the maximum length of command line arguments 1699AC_MSG_CHECKING([the maximum length of command line arguments]) 1700AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1701 i=0 1702 teststring=ABCD 1703 1704 case $build_os in 1705 msdosdjgpp*) 1706 # On DJGPP, this test can blow up pretty badly due to problems in libc 1707 # (any single argument exceeding 2000 bytes causes a buffer overrun 1708 # during glob expansion). Even if it were fixed, the result of this 1709 # check would be larger than it should be. 1710 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1711 ;; 1712 1713 gnu*) 1714 # Under GNU Hurd, this test is not required because there is 1715 # no limit to the length of command line arguments. 1716 # Libtool will interpret -1 as no limit whatsoever 1717 lt_cv_sys_max_cmd_len=-1; 1718 ;; 1719 1720 cygwin* | mingw* | cegcc*) 1721 # On Win9x/ME, this test blows up -- it succeeds, but takes 1722 # about 5 minutes as the teststring grows exponentially. 1723 # Worse, since 9x/ME are not pre-emptively multitasking, 1724 # you end up with a "frozen" computer, even though with patience 1725 # the test eventually succeeds (with a max line length of 256k). 1726 # Instead, let's just punt: use the minimum linelength reported by 1727 # all of the supported platforms: 8192 (on NT/2K/XP). 1728 lt_cv_sys_max_cmd_len=8192; 1729 ;; 1730 1731 mint*) 1732 # On MiNT this can take a long time and run out of memory. 1733 lt_cv_sys_max_cmd_len=8192; 1734 ;; 1735 1736 amigaos*) 1737 # On AmigaOS with pdksh, this test takes hours, literally. 1738 # So we just punt and use a minimum line length of 8192. 1739 lt_cv_sys_max_cmd_len=8192; 1740 ;; 1741 1742 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1743 # This has been around since 386BSD, at least. Likely further. 1744 if test -x /sbin/sysctl; then 1745 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1746 elif test -x /usr/sbin/sysctl; then 1747 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1748 else 1749 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1750 fi 1751 # And add a safety zone 1752 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1753 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1754 ;; 1755 1756 interix*) 1757 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1758 lt_cv_sys_max_cmd_len=196608 1759 ;; 1760 1761 os2*) 1762 # The test takes a long time on OS/2. 1763 lt_cv_sys_max_cmd_len=8192 1764 ;; 1765 1766 osf*) 1767 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1768 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1769 # nice to cause kernel panics so lets avoid the loop below. 1770 # First set a reasonable default. 1771 lt_cv_sys_max_cmd_len=16384 1772 # 1773 if test -x /sbin/sysconfig; then 1774 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1775 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1776 esac 1777 fi 1778 ;; 1779 sco3.2v5*) 1780 lt_cv_sys_max_cmd_len=102400 1781 ;; 1782 sysv5* | sco5v6* | sysv4.2uw2*) 1783 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1784 if test -n "$kargmax"; then 1785 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1786 else 1787 lt_cv_sys_max_cmd_len=32768 1788 fi 1789 ;; 1790 *) 1791 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1792 if test -n "$lt_cv_sys_max_cmd_len" && \ 1793 test undefined != "$lt_cv_sys_max_cmd_len"; then 1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1795 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1796 else 1797 # Make teststring a little bigger before we do anything with it. 1798 # a 1K string should be a reasonable start. 1799 for i in 1 2 3 4 5 6 7 8; do 1800 teststring=$teststring$teststring 1801 done 1802 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1803 # If test is not a shell built-in, we'll probably end up computing a 1804 # maximum length that is only half of the actual maximum length, but 1805 # we can't tell. 1806 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1807 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1808 test 17 != "$i" # 1/2 MB should be enough 1809 do 1810 i=`expr $i + 1` 1811 teststring=$teststring$teststring 1812 done 1813 # Only check the string length outside the loop. 1814 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1815 teststring= 1816 # Add a significant safety factor because C++ compilers can tack on 1817 # massive amounts of additional arguments before passing them to the 1818 # linker. It appears as though 1/2 is a usable value. 1819 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1820 fi 1821 ;; 1822 esac 1823]) 1824if test -n "$lt_cv_sys_max_cmd_len"; then 1825 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1826else 1827 AC_MSG_RESULT(none) 1828fi 1829max_cmd_len=$lt_cv_sys_max_cmd_len 1830_LT_DECL([], [max_cmd_len], [0], 1831 [What is the maximum length of a command?]) 1832])# LT_CMD_MAX_LEN 1833 1834# Old name: 1835AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1836dnl aclocal-1.4 backwards compatibility: 1837dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1838 1839 1840# _LT_HEADER_DLFCN 1841# ---------------- 1842m4_defun([_LT_HEADER_DLFCN], 1843[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1844])# _LT_HEADER_DLFCN 1845 1846 1847# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1848# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1849# ---------------------------------------------------------------- 1850m4_defun([_LT_TRY_DLOPEN_SELF], 1851[m4_require([_LT_HEADER_DLFCN])dnl 1852if test yes = "$cross_compiling"; then : 1853 [$4] 1854else 1855 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1856 lt_status=$lt_dlunknown 1857 cat > conftest.$ac_ext <<_LT_EOF 1858[#line $LINENO "configure" 1859#include "confdefs.h" 1860 1861#if HAVE_DLFCN_H 1862#include <dlfcn.h> 1863#endif 1864 1865#include <stdio.h> 1866 1867#ifdef RTLD_GLOBAL 1868# define LT_DLGLOBAL RTLD_GLOBAL 1869#else 1870# ifdef DL_GLOBAL 1871# define LT_DLGLOBAL DL_GLOBAL 1872# else 1873# define LT_DLGLOBAL 0 1874# endif 1875#endif 1876 1877/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1878 find out it does not work in some platform. */ 1879#ifndef LT_DLLAZY_OR_NOW 1880# ifdef RTLD_LAZY 1881# define LT_DLLAZY_OR_NOW RTLD_LAZY 1882# else 1883# ifdef DL_LAZY 1884# define LT_DLLAZY_OR_NOW DL_LAZY 1885# else 1886# ifdef RTLD_NOW 1887# define LT_DLLAZY_OR_NOW RTLD_NOW 1888# else 1889# ifdef DL_NOW 1890# define LT_DLLAZY_OR_NOW DL_NOW 1891# else 1892# define LT_DLLAZY_OR_NOW 0 1893# endif 1894# endif 1895# endif 1896# endif 1897#endif 1898 1899/* When -fvisibility=hidden is used, assume the code has been annotated 1900 correspondingly for the symbols needed. */ 1901#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1902int fnord () __attribute__((visibility("default"))); 1903#endif 1904 1905int fnord () { return 42; } 1906int main () 1907{ 1908 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1909 int status = $lt_dlunknown; 1910 1911 if (self) 1912 { 1913 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1914 else 1915 { 1916 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1917 else puts (dlerror ()); 1918 } 1919 /* dlclose (self); */ 1920 } 1921 else 1922 puts (dlerror ()); 1923 1924 return status; 1925}] 1926_LT_EOF 1927 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1928 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1929 lt_status=$? 1930 case x$lt_status in 1931 x$lt_dlno_uscore) $1 ;; 1932 x$lt_dlneed_uscore) $2 ;; 1933 x$lt_dlunknown|x*) $3 ;; 1934 esac 1935 else : 1936 # compilation failed 1937 $3 1938 fi 1939fi 1940rm -fr conftest* 1941])# _LT_TRY_DLOPEN_SELF 1942 1943 1944# LT_SYS_DLOPEN_SELF 1945# ------------------ 1946AC_DEFUN([LT_SYS_DLOPEN_SELF], 1947[m4_require([_LT_HEADER_DLFCN])dnl 1948if test yes != "$enable_dlopen"; then 1949 enable_dlopen=unknown 1950 enable_dlopen_self=unknown 1951 enable_dlopen_self_static=unknown 1952else 1953 lt_cv_dlopen=no 1954 lt_cv_dlopen_libs= 1955 1956 case $host_os in 1957 beos*) 1958 lt_cv_dlopen=load_add_on 1959 lt_cv_dlopen_libs= 1960 lt_cv_dlopen_self=yes 1961 ;; 1962 1963 mingw* | pw32* | cegcc*) 1964 lt_cv_dlopen=LoadLibrary 1965 lt_cv_dlopen_libs= 1966 ;; 1967 1968 cygwin*) 1969 lt_cv_dlopen=dlopen 1970 lt_cv_dlopen_libs= 1971 ;; 1972 1973 darwin*) 1974 # if libdl is installed we need to link against it 1975 AC_CHECK_LIB([dl], [dlopen], 1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1977 lt_cv_dlopen=dyld 1978 lt_cv_dlopen_libs= 1979 lt_cv_dlopen_self=yes 1980 ]) 1981 ;; 1982 1983 tpf*) 1984 # Don't try to run any link tests for TPF. We know it's impossible 1985 # because TPF is a cross-compiler, and we know how we open DSOs. 1986 lt_cv_dlopen=dlopen 1987 lt_cv_dlopen_libs= 1988 lt_cv_dlopen_self=no 1989 ;; 1990 1991 *) 1992 AC_CHECK_FUNC([shl_load], 1993 [lt_cv_dlopen=shl_load], 1994 [AC_CHECK_LIB([dld], [shl_load], 1995 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1996 [AC_CHECK_FUNC([dlopen], 1997 [lt_cv_dlopen=dlopen], 1998 [AC_CHECK_LIB([dl], [dlopen], 1999 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 2000 [AC_CHECK_LIB([svld], [dlopen], 2001 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2002 [AC_CHECK_LIB([dld], [dld_link], 2003 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2004 ]) 2005 ]) 2006 ]) 2007 ]) 2008 ]) 2009 ;; 2010 esac 2011 2012 if test no = "$lt_cv_dlopen"; then 2013 enable_dlopen=no 2014 else 2015 enable_dlopen=yes 2016 fi 2017 2018 case $lt_cv_dlopen in 2019 dlopen) 2020 save_CPPFLAGS=$CPPFLAGS 2021 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2022 2023 save_LDFLAGS=$LDFLAGS 2024 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2025 2026 save_LIBS=$LIBS 2027 LIBS="$lt_cv_dlopen_libs $LIBS" 2028 2029 AC_CACHE_CHECK([whether a program can dlopen itself], 2030 lt_cv_dlopen_self, [dnl 2031 _LT_TRY_DLOPEN_SELF( 2032 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2033 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2034 ]) 2035 2036 if test yes = "$lt_cv_dlopen_self"; then 2037 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2038 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2039 lt_cv_dlopen_self_static, [dnl 2040 _LT_TRY_DLOPEN_SELF( 2041 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2042 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2043 ]) 2044 fi 2045 2046 CPPFLAGS=$save_CPPFLAGS 2047 LDFLAGS=$save_LDFLAGS 2048 LIBS=$save_LIBS 2049 ;; 2050 esac 2051 2052 case $lt_cv_dlopen_self in 2053 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2054 *) enable_dlopen_self=unknown ;; 2055 esac 2056 2057 case $lt_cv_dlopen_self_static in 2058 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2059 *) enable_dlopen_self_static=unknown ;; 2060 esac 2061fi 2062_LT_DECL([dlopen_support], [enable_dlopen], [0], 2063 [Whether dlopen is supported]) 2064_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2065 [Whether dlopen of programs is supported]) 2066_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2067 [Whether dlopen of statically linked programs is supported]) 2068])# LT_SYS_DLOPEN_SELF 2069 2070# Old name: 2071AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2072dnl aclocal-1.4 backwards compatibility: 2073dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2074 2075 2076# _LT_COMPILER_C_O([TAGNAME]) 2077# --------------------------- 2078# Check to see if options -c and -o are simultaneously supported by compiler. 2079# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2080m4_defun([_LT_COMPILER_C_O], 2081[m4_require([_LT_DECL_SED])dnl 2082m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2083m4_require([_LT_TAG_COMPILER])dnl 2084AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2085 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2086 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2087 $RM -r conftest 2>/dev/null 2088 mkdir conftest 2089 cd conftest 2090 mkdir out 2091 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2092 2093 lt_compiler_flag="-o out/conftest2.$ac_objext" 2094 # Insert the option either (1) after the last *FLAGS variable, or 2095 # (2) before a word containing "conftest.", or (3) at the end. 2096 # Note that $ac_compile itself does not contain backslashes and begins 2097 # with a dollar sign (not a hyphen), so the echo should work correctly. 2098 lt_compile=`echo "$ac_compile" | $SED \ 2099 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2100 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2101 -e 's:$: $lt_compiler_flag:'` 2102 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2103 (eval "$lt_compile" 2>out/conftest.err) 2104 ac_status=$? 2105 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2106 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2107 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2108 then 2109 # The compiler can only warn and ignore the option if not recognized 2110 # So say no if there are warnings 2111 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2112 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2113 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2114 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2115 fi 2116 fi 2117 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2118 $RM conftest* 2119 # SGI C++ compiler will create directory out/ii_files/ for 2120 # template instantiation 2121 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2122 $RM out/* && rmdir out 2123 cd .. 2124 $RM -r conftest 2125 $RM conftest* 2126]) 2127_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2128 [Does compiler simultaneously support -c and -o options?]) 2129])# _LT_COMPILER_C_O 2130 2131 2132# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2133# ---------------------------------- 2134# Check to see if we can do hard links to lock some files if needed 2135m4_defun([_LT_COMPILER_FILE_LOCKS], 2136[m4_require([_LT_ENABLE_LOCK])dnl 2137m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2138_LT_COMPILER_C_O([$1]) 2139 2140hard_links=nottested 2141if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2142 # do not overwrite the value of need_locks provided by the user 2143 AC_MSG_CHECKING([if we can lock with hard links]) 2144 hard_links=yes 2145 $RM conftest* 2146 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2147 touch conftest.a 2148 ln conftest.a conftest.b 2>&5 || hard_links=no 2149 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2150 AC_MSG_RESULT([$hard_links]) 2151 if test no = "$hard_links"; then 2152 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2153 need_locks=warn 2154 fi 2155else 2156 need_locks=no 2157fi 2158_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2159])# _LT_COMPILER_FILE_LOCKS 2160 2161 2162# _LT_CHECK_OBJDIR 2163# ---------------- 2164m4_defun([_LT_CHECK_OBJDIR], 2165[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2166[rm -f .libs 2>/dev/null 2167mkdir .libs 2>/dev/null 2168if test -d .libs; then 2169 lt_cv_objdir=.libs 2170else 2171 # MS-DOS does not allow filenames that begin with a dot. 2172 lt_cv_objdir=_libs 2173fi 2174rmdir .libs 2>/dev/null]) 2175objdir=$lt_cv_objdir 2176_LT_DECL([], [objdir], [0], 2177 [The name of the directory that contains temporary libtool files])dnl 2178m4_pattern_allow([LT_OBJDIR])dnl 2179AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2180 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2181])# _LT_CHECK_OBJDIR 2182 2183 2184# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2185# -------------------------------------- 2186# Check hardcoding attributes. 2187m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2188[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2189_LT_TAGVAR(hardcode_action, $1)= 2190if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2191 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2192 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2193 2194 # We can hardcode non-existent directories. 2195 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2196 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2197 # have to relink, otherwise we might link with an installed library 2198 # when we should be linking with a yet-to-be-installed one 2199 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2200 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2201 # Linking always hardcodes the temporary library directory. 2202 _LT_TAGVAR(hardcode_action, $1)=relink 2203 else 2204 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2205 _LT_TAGVAR(hardcode_action, $1)=immediate 2206 fi 2207else 2208 # We cannot hardcode anything, or else we can only hardcode existing 2209 # directories. 2210 _LT_TAGVAR(hardcode_action, $1)=unsupported 2211fi 2212AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2213 2214if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2215 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2216 # Fast installation is not supported 2217 enable_fast_install=no 2218elif test yes = "$shlibpath_overrides_runpath" || 2219 test no = "$enable_shared"; then 2220 # Fast installation is not necessary 2221 enable_fast_install=needless 2222fi 2223_LT_TAGDECL([], [hardcode_action], [0], 2224 [How to hardcode a shared library path into an executable]) 2225])# _LT_LINKER_HARDCODE_LIBPATH 2226 2227 2228# _LT_CMD_STRIPLIB 2229# ---------------- 2230m4_defun([_LT_CMD_STRIPLIB], 2231[m4_require([_LT_DECL_EGREP]) 2232striplib= 2233old_striplib= 2234AC_MSG_CHECKING([whether stripping libraries is possible]) 2235if test -z "$STRIP"; then 2236 AC_MSG_RESULT([no]) 2237else 2238 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2239 old_striplib="$STRIP --strip-debug" 2240 striplib="$STRIP --strip-unneeded" 2241 AC_MSG_RESULT([yes]) 2242 else 2243 case $host_os in 2244 darwin*) 2245 # FIXME - insert some real tests, host_os isn't really good enough 2246 striplib="$STRIP -x" 2247 old_striplib="$STRIP -S" 2248 AC_MSG_RESULT([yes]) 2249 ;; 2250 freebsd*) 2251 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2252 old_striplib="$STRIP --strip-debug" 2253 striplib="$STRIP --strip-unneeded" 2254 AC_MSG_RESULT([yes]) 2255 else 2256 AC_MSG_RESULT([no]) 2257 fi 2258 ;; 2259 *) 2260 AC_MSG_RESULT([no]) 2261 ;; 2262 esac 2263 fi 2264fi 2265_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2266_LT_DECL([], [striplib], [1]) 2267])# _LT_CMD_STRIPLIB 2268 2269 2270# _LT_PREPARE_MUNGE_PATH_LIST 2271# --------------------------- 2272# Make sure func_munge_path_list() is defined correctly. 2273m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2274[[# func_munge_path_list VARIABLE PATH 2275# ----------------------------------- 2276# VARIABLE is name of variable containing _space_ separated list of 2277# directories to be munged by the contents of PATH, which is string 2278# having a format: 2279# "DIR[:DIR]:" 2280# string "DIR[ DIR]" will be prepended to VARIABLE 2281# ":DIR[:DIR]" 2282# string "DIR[ DIR]" will be appended to VARIABLE 2283# "DIRP[:DIRP]::[DIRA:]DIRA" 2284# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2285# "DIRA[ DIRA]" will be appended to VARIABLE 2286# "DIR[:DIR]" 2287# VARIABLE will be replaced by "DIR[ DIR]" 2288func_munge_path_list () 2289{ 2290 case x@S|@2 in 2291 x) 2292 ;; 2293 *:) 2294 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2295 ;; 2296 x:*) 2297 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2298 ;; 2299 *::*) 2300 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2301 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2302 ;; 2303 *) 2304 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2305 ;; 2306 esac 2307} 2308]])# _LT_PREPARE_PATH_LIST 2309 2310 2311# _LT_SYS_DYNAMIC_LINKER([TAG]) 2312# ----------------------------- 2313# PORTME Fill in your ld.so characteristics 2314m4_defun([_LT_SYS_DYNAMIC_LINKER], 2315[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2316m4_require([_LT_DECL_EGREP])dnl 2317m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2318m4_require([_LT_DECL_OBJDUMP])dnl 2319m4_require([_LT_DECL_SED])dnl 2320m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2321m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2322AC_MSG_CHECKING([dynamic linker characteristics]) 2323m4_if([$1], 2324 [], [ 2325if test yes = "$GCC"; then 2326 case $host_os in 2327 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2328 *) lt_awk_arg='/^libraries:/' ;; 2329 esac 2330 case $host_os in 2331 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2332 *) lt_sed_strip_eq='s|=/|/|g' ;; 2333 esac 2334 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2335 case $lt_search_path_spec in 2336 *\;*) 2337 # if the path contains ";" then we assume it to be the separator 2338 # otherwise default to the standard path separator (i.e. ":") - it is 2339 # assumed that no part of a normal pathname contains ";" but that should 2340 # okay in the real world where ";" in dirpaths is itself problematic. 2341 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2342 ;; 2343 *) 2344 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2345 ;; 2346 esac 2347 # Ok, now we have the path, separated by spaces, we can step through it 2348 # and add multilib dir if necessary... 2349 lt_tmp_lt_search_path_spec= 2350 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2351 # ...but if some path component already ends with the multilib dir we assume 2352 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2353 case "$lt_multi_os_dir; $lt_search_path_spec " in 2354 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2355 lt_multi_os_dir= 2356 ;; 2357 esac 2358 for lt_sys_path in $lt_search_path_spec; do 2359 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2360 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2361 elif test -n "$lt_multi_os_dir"; then 2362 test -d "$lt_sys_path" && \ 2363 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2364 fi 2365 done 2366 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2367BEGIN {RS = " "; FS = "/|\n";} { 2368 lt_foo = ""; 2369 lt_count = 0; 2370 for (lt_i = NF; lt_i > 0; lt_i--) { 2371 if ($lt_i != "" && $lt_i != ".") { 2372 if ($lt_i == "..") { 2373 lt_count++; 2374 } else { 2375 if (lt_count == 0) { 2376 lt_foo = "/" $lt_i lt_foo; 2377 } else { 2378 lt_count--; 2379 } 2380 } 2381 } 2382 } 2383 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2384 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2385}'` 2386 # AWK program above erroneously prepends '/' to C:/dos/paths 2387 # for these hosts. 2388 case $host_os in 2389 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2390 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2391 esac 2392 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2393else 2394 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2395fi]) 2396library_names_spec= 2397libname_spec='lib$name' 2398soname_spec= 2399shrext_cmds=.so 2400postinstall_cmds= 2401postuninstall_cmds= 2402finish_cmds= 2403finish_eval= 2404shlibpath_var= 2405shlibpath_overrides_runpath=unknown 2406version_type=none 2407dynamic_linker="$host_os ld.so" 2408sys_lib_dlsearch_path_spec="/lib /usr/lib" 2409need_lib_prefix=unknown 2410hardcode_into_libs=no 2411 2412# when you set need_version to no, make sure it does not cause -set_version 2413# flags to be left without arguments 2414need_version=unknown 2415 2416AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2417[User-defined run-time library search path.]) 2418 2419case $host_os in 2420aix3*) 2421 version_type=linux # correct to gnu/linux during the next big refactor 2422 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2423 shlibpath_var=LIBPATH 2424 2425 # AIX 3 has no versioning support, so we append a major version to the name. 2426 soname_spec='$libname$release$shared_ext$major' 2427 ;; 2428 2429aix[[4-9]]*) 2430 version_type=linux # correct to gnu/linux during the next big refactor 2431 need_lib_prefix=no 2432 need_version=no 2433 hardcode_into_libs=yes 2434 if test ia64 = "$host_cpu"; then 2435 # AIX 5 supports IA64 2436 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2437 shlibpath_var=LD_LIBRARY_PATH 2438 else 2439 # With GCC up to 2.95.x, collect2 would create an import file 2440 # for dependence libraries. The import file would start with 2441 # the line '#! .'. This would cause the generated library to 2442 # depend on '.', always an invalid library. This was fixed in 2443 # development snapshots of GCC prior to 3.0. 2444 case $host_os in 2445 aix4 | aix4.[[01]] | aix4.[[01]].*) 2446 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2447 echo ' yes ' 2448 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2449 : 2450 else 2451 can_build_shared=no 2452 fi 2453 ;; 2454 esac 2455 # Using Import Files as archive members, it is possible to support 2456 # filename-based versioning of shared library archives on AIX. While 2457 # this would work for both with and without runtime linking, it will 2458 # prevent static linking of such archives. So we do filename-based 2459 # shared library versioning with .so extension only, which is used 2460 # when both runtime linking and shared linking is enabled. 2461 # Unfortunately, runtime linking may impact performance, so we do 2462 # not want this to be the default eventually. Also, we use the 2463 # versioned .so libs for executables only if there is the -brtl 2464 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2465 # To allow for filename-based versioning support, we need to create 2466 # libNAME.so.V as an archive file, containing: 2467 # *) an Import File, referring to the versioned filename of the 2468 # archive as well as the shared archive member, telling the 2469 # bitwidth (32 or 64) of that shared object, and providing the 2470 # list of exported symbols of that shared object, eventually 2471 # decorated with the 'weak' keyword 2472 # *) the shared object with the F_LOADONLY flag set, to really avoid 2473 # it being seen by the linker. 2474 # At run time we better use the real file rather than another symlink, 2475 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2476 2477 case $with_aix_soname,$aix_use_runtimelinking in 2478 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2479 # soname into executable. Probably we can add versioning support to 2480 # collect2, so additional links can be useful in future. 2481 aix,yes) # traditional libtool 2482 dynamic_linker='AIX unversionable lib.so' 2483 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2484 # instead of lib<name>.a to let people know that these are not 2485 # typical AIX shared libraries. 2486 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2487 ;; 2488 aix,no) # traditional AIX only 2489 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2490 # We preserve .a as extension for shared libraries through AIX4.2 2491 # and later when we are not doing run time linking. 2492 library_names_spec='$libname$release.a $libname.a' 2493 soname_spec='$libname$release$shared_ext$major' 2494 ;; 2495 svr4,*) # full svr4 only 2496 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2497 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2498 # We do not specify a path in Import Files, so LIBPATH fires. 2499 shlibpath_overrides_runpath=yes 2500 ;; 2501 *,yes) # both, prefer svr4 2502 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2503 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2504 # unpreferred sharedlib libNAME.a needs extra handling 2505 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"' 2506 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"' 2507 # We do not specify a path in Import Files, so LIBPATH fires. 2508 shlibpath_overrides_runpath=yes 2509 ;; 2510 *,no) # both, prefer aix 2511 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2512 library_names_spec='$libname$release.a $libname.a' 2513 soname_spec='$libname$release$shared_ext$major' 2514 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2515 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)' 2516 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"' 2517 ;; 2518 esac 2519 shlibpath_var=LIBPATH 2520 fi 2521 ;; 2522 2523amigaos*) 2524 case $host_cpu in 2525 powerpc) 2526 # Since July 2007 AmigaOS4 officially supports .so libraries. 2527 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2528 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2529 ;; 2530 m68k) 2531 library_names_spec='$libname.ixlibrary $libname.a' 2532 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2533 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' 2534 ;; 2535 esac 2536 ;; 2537 2538beos*) 2539 library_names_spec='$libname$shared_ext' 2540 dynamic_linker="$host_os ld.so" 2541 shlibpath_var=LIBRARY_PATH 2542 ;; 2543 2544bsdi[[45]]*) 2545 version_type=linux # correct to gnu/linux during the next big refactor 2546 need_version=no 2547 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2548 soname_spec='$libname$release$shared_ext$major' 2549 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2550 shlibpath_var=LD_LIBRARY_PATH 2551 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2552 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2553 # the default ld.so.conf also contains /usr/contrib/lib and 2554 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2555 # libtool to hard-code these into programs 2556 ;; 2557 2558cygwin* | mingw* | pw32* | cegcc*) 2559 version_type=windows 2560 shrext_cmds=.dll 2561 need_version=no 2562 need_lib_prefix=no 2563 2564 case $GCC,$cc_basename in 2565 yes,*) 2566 # gcc 2567 library_names_spec='$libname.dll.a' 2568 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2569 postinstall_cmds='base_file=`basename \$file`~ 2570 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2571 dldir=$destdir/`dirname \$dlpath`~ 2572 test -d \$dldir || mkdir -p \$dldir~ 2573 $install_prog $dir/$dlname \$dldir/$dlname~ 2574 chmod a+x \$dldir/$dlname~ 2575 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2576 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2577 fi' 2578 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2579 dlpath=$dir/\$dldll~ 2580 $RM \$dlpath' 2581 shlibpath_overrides_runpath=yes 2582 2583 case $host_os in 2584 cygwin*) 2585 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2586 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2587m4_if([$1], [],[ 2588 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2589 ;; 2590 mingw* | cegcc*) 2591 # MinGW DLLs use traditional 'lib' prefix 2592 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2593 ;; 2594 pw32*) 2595 # pw32 DLLs use 'pw' prefix rather than 'lib' 2596 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2597 ;; 2598 esac 2599 dynamic_linker='Win32 ld.exe' 2600 ;; 2601 2602 *,cl* | *,icl*) 2603 # Native MSVC or ICC 2604 libname_spec='$name' 2605 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2606 library_names_spec='$libname.dll.lib' 2607 2608 case $build_os in 2609 mingw*) 2610 sys_lib_search_path_spec= 2611 lt_save_ifs=$IFS 2612 IFS=';' 2613 for lt_path in $LIB 2614 do 2615 IFS=$lt_save_ifs 2616 # Let DOS variable expansion print the short 8.3 style file name. 2617 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2618 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2619 done 2620 IFS=$lt_save_ifs 2621 # Convert to MSYS style. 2622 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2623 ;; 2624 cygwin*) 2625 # Convert to unix form, then to dos form, then back to unix form 2626 # but this time dos style (no spaces!) so that the unix form looks 2627 # like /cygdrive/c/PROGRA~1:/cygdr... 2628 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2629 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2630 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2631 ;; 2632 *) 2633 sys_lib_search_path_spec=$LIB 2634 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2635 # It is most probably a Windows format PATH. 2636 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2637 else 2638 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2639 fi 2640 # FIXME: find the short name or the path components, as spaces are 2641 # common. (e.g. "Program Files" -> "PROGRA~1") 2642 ;; 2643 esac 2644 2645 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2646 postinstall_cmds='base_file=`basename \$file`~ 2647 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2648 dldir=$destdir/`dirname \$dlpath`~ 2649 test -d \$dldir || mkdir -p \$dldir~ 2650 $install_prog $dir/$dlname \$dldir/$dlname' 2651 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2652 dlpath=$dir/\$dldll~ 2653 $RM \$dlpath' 2654 shlibpath_overrides_runpath=yes 2655 dynamic_linker='Win32 link.exe' 2656 ;; 2657 2658 *) 2659 # Assume MSVC and ICC wrapper 2660 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2661 dynamic_linker='Win32 ld.exe' 2662 ;; 2663 esac 2664 # FIXME: first we should search . and the directory the executable is in 2665 shlibpath_var=PATH 2666 ;; 2667 2668darwin* | rhapsody*) 2669 dynamic_linker="$host_os dyld" 2670 version_type=darwin 2671 need_lib_prefix=no 2672 need_version=no 2673 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2674 soname_spec='$libname$release$major$shared_ext' 2675 shlibpath_overrides_runpath=yes 2676 shlibpath_var=DYLD_LIBRARY_PATH 2677 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2678m4_if([$1], [],[ 2679 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2680 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2681 ;; 2682 2683dgux*) 2684 version_type=linux # correct to gnu/linux during the next big refactor 2685 need_lib_prefix=no 2686 need_version=no 2687 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2688 soname_spec='$libname$release$shared_ext$major' 2689 shlibpath_var=LD_LIBRARY_PATH 2690 ;; 2691 2692freebsd* | dragonfly* | midnightbsd*) 2693 # DragonFly does not have aout. When/if they implement a new 2694 # versioning mechanism, adjust this. 2695 if test -x /usr/bin/objformat; then 2696 objformat=`/usr/bin/objformat` 2697 else 2698 case $host_os in 2699 freebsd[[23]].*) objformat=aout ;; 2700 *) objformat=elf ;; 2701 esac 2702 fi 2703 version_type=freebsd-$objformat 2704 case $version_type in 2705 freebsd-elf*) 2706 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2707 soname_spec='$libname$release$shared_ext$major' 2708 need_version=no 2709 need_lib_prefix=no 2710 ;; 2711 freebsd-*) 2712 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2713 need_version=yes 2714 ;; 2715 esac 2716 shlibpath_var=LD_LIBRARY_PATH 2717 case $host_os in 2718 freebsd2.*) 2719 shlibpath_overrides_runpath=yes 2720 ;; 2721 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2722 shlibpath_overrides_runpath=yes 2723 hardcode_into_libs=yes 2724 ;; 2725 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2726 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2727 shlibpath_overrides_runpath=no 2728 hardcode_into_libs=yes 2729 ;; 2730 *) # from 4.6 on, and DragonFly 2731 shlibpath_overrides_runpath=yes 2732 hardcode_into_libs=yes 2733 ;; 2734 esac 2735 ;; 2736 2737haiku*) 2738 version_type=linux # correct to gnu/linux during the next big refactor 2739 need_lib_prefix=no 2740 need_version=no 2741 dynamic_linker="$host_os runtime_loader" 2742 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2743 soname_spec='$libname$release$shared_ext$major' 2744 shlibpath_var=LIBRARY_PATH 2745 shlibpath_overrides_runpath=no 2746 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2747 hardcode_into_libs=yes 2748 ;; 2749 2750hpux9* | hpux10* | hpux11*) 2751 # Give a soname corresponding to the major version so that dld.sl refuses to 2752 # link against other versions. 2753 version_type=sunos 2754 need_lib_prefix=no 2755 need_version=no 2756 case $host_cpu in 2757 ia64*) 2758 shrext_cmds='.so' 2759 hardcode_into_libs=yes 2760 dynamic_linker="$host_os dld.so" 2761 shlibpath_var=LD_LIBRARY_PATH 2762 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2763 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2764 soname_spec='$libname$release$shared_ext$major' 2765 if test 32 = "$HPUX_IA64_MODE"; then 2766 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2767 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2768 else 2769 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2770 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2771 fi 2772 ;; 2773 hppa*64*) 2774 shrext_cmds='.sl' 2775 hardcode_into_libs=yes 2776 dynamic_linker="$host_os dld.sl" 2777 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2778 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2779 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2780 soname_spec='$libname$release$shared_ext$major' 2781 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2782 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2783 ;; 2784 *) 2785 shrext_cmds='.sl' 2786 dynamic_linker="$host_os dld.sl" 2787 shlibpath_var=SHLIB_PATH 2788 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2790 soname_spec='$libname$release$shared_ext$major' 2791 ;; 2792 esac 2793 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2794 postinstall_cmds='chmod 555 $lib' 2795 # or fails outright, so override atomically: 2796 install_override_mode=555 2797 ;; 2798 2799interix[[3-9]]*) 2800 version_type=linux # correct to gnu/linux during the next big refactor 2801 need_lib_prefix=no 2802 need_version=no 2803 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2804 soname_spec='$libname$release$shared_ext$major' 2805 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2806 shlibpath_var=LD_LIBRARY_PATH 2807 shlibpath_overrides_runpath=no 2808 hardcode_into_libs=yes 2809 ;; 2810 2811irix5* | irix6* | nonstopux*) 2812 case $host_os in 2813 nonstopux*) version_type=nonstopux ;; 2814 *) 2815 if test yes = "$lt_cv_prog_gnu_ld"; then 2816 version_type=linux # correct to gnu/linux during the next big refactor 2817 else 2818 version_type=irix 2819 fi ;; 2820 esac 2821 need_lib_prefix=no 2822 need_version=no 2823 soname_spec='$libname$release$shared_ext$major' 2824 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2825 case $host_os in 2826 irix5* | nonstopux*) 2827 libsuff= shlibsuff= 2828 ;; 2829 *) 2830 case $LD in # libtool.m4 will add one of these switches to LD 2831 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2832 libsuff= shlibsuff= libmagic=32-bit;; 2833 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2834 libsuff=32 shlibsuff=N32 libmagic=N32;; 2835 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2836 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2837 *) libsuff= shlibsuff= libmagic=never-match;; 2838 esac 2839 ;; 2840 esac 2841 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2842 shlibpath_overrides_runpath=no 2843 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2844 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2845 hardcode_into_libs=yes 2846 ;; 2847 2848# No shared lib support for Linux oldld, aout, or coff. 2849linux*oldld* | linux*aout* | linux*coff*) 2850 dynamic_linker=no 2851 ;; 2852 2853linux*android*) 2854 version_type=none # Android doesn't support versioned libraries. 2855 need_lib_prefix=no 2856 need_version=no 2857 library_names_spec='$libname$release$shared_ext' 2858 soname_spec='$libname$release$shared_ext' 2859 finish_cmds= 2860 shlibpath_var=LD_LIBRARY_PATH 2861 shlibpath_overrides_runpath=yes 2862 2863 # This implies no fast_install, which is unacceptable. 2864 # Some rework will be needed to allow for fast_install 2865 # before this can be enabled. 2866 hardcode_into_libs=yes 2867 2868 dynamic_linker='Android linker' 2869 # Don't embed -rpath directories since the linker doesn't support them. 2870 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2871 ;; 2872 2873# This must be glibc/ELF. 2874linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2875 version_type=linux # correct to gnu/linux during the next big refactor 2876 need_lib_prefix=no 2877 need_version=no 2878 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2879 soname_spec='$libname$release$shared_ext$major' 2880 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2881 shlibpath_var=LD_LIBRARY_PATH 2882 shlibpath_overrides_runpath=no 2883 2884 # Some binutils ld are patched to set DT_RUNPATH 2885 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2886 [lt_cv_shlibpath_overrides_runpath=no 2887 save_LDFLAGS=$LDFLAGS 2888 save_libdir=$libdir 2889 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2890 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2891 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2892 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2893 [lt_cv_shlibpath_overrides_runpath=yes])]) 2894 LDFLAGS=$save_LDFLAGS 2895 libdir=$save_libdir 2896 ]) 2897 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2898 2899 # This implies no fast_install, which is unacceptable. 2900 # Some rework will be needed to allow for fast_install 2901 # before this can be enabled. 2902 hardcode_into_libs=yes 2903 2904 # Add ABI-specific directories to the system library path. 2905 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2906 2907 # Ideally, we could use ldconfig to report *all* directores which are 2908 # searched for libraries, however this is still not possible. Aside from not 2909 # being certain /sbin/ldconfig is available, command 2910 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2911 # even though it is searched at run-time. Try to do the best guess by 2912 # appending ld.so.conf contents (and includes) to the search path. 2913 if test -f /etc/ld.so.conf; then 2914 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' ' '` 2915 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2916 fi 2917 2918 # We used to test for /lib/ld.so.1 and disable shared libraries on 2919 # powerpc, because MkLinux only supported shared libraries with the 2920 # GNU dynamic linker. Since this was broken with cross compilers, 2921 # most powerpc-linux boxes support dynamic linking these days and 2922 # people can always --disable-shared, the test was removed, and we 2923 # assume the GNU/Linux dynamic linker is in use. 2924 dynamic_linker='GNU/Linux ld.so' 2925 ;; 2926 2927netbsd*) 2928 version_type=sunos 2929 need_lib_prefix=no 2930 need_version=no 2931 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2932 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2933 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2934 dynamic_linker='NetBSD (a.out) ld.so' 2935 else 2936 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937 soname_spec='$libname$release$shared_ext$major' 2938 dynamic_linker='NetBSD ld.elf_so' 2939 fi 2940 shlibpath_var=LD_LIBRARY_PATH 2941 shlibpath_overrides_runpath=yes 2942 hardcode_into_libs=yes 2943 ;; 2944 2945newsos6) 2946 version_type=linux # correct to gnu/linux during the next big refactor 2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2948 shlibpath_var=LD_LIBRARY_PATH 2949 shlibpath_overrides_runpath=yes 2950 ;; 2951 2952*nto* | *qnx*) 2953 version_type=qnx 2954 need_lib_prefix=no 2955 need_version=no 2956 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2957 soname_spec='$libname$release$shared_ext$major' 2958 shlibpath_var=LD_LIBRARY_PATH 2959 shlibpath_overrides_runpath=no 2960 hardcode_into_libs=yes 2961 dynamic_linker='ldqnx.so' 2962 ;; 2963 2964openbsd* | bitrig*) 2965 version_type=sunos 2966 sys_lib_dlsearch_path_spec=/usr/lib 2967 need_lib_prefix=no 2968 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2969 need_version=no 2970 else 2971 need_version=yes 2972 fi 2973 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2974 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2975 shlibpath_var=LD_LIBRARY_PATH 2976 shlibpath_overrides_runpath=yes 2977 ;; 2978 2979os2*) 2980 libname_spec='$name' 2981 version_type=windows 2982 shrext_cmds=.dll 2983 need_version=no 2984 need_lib_prefix=no 2985 # OS/2 can only load a DLL with a base name of 8 characters or less. 2986 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2987 v=$($ECHO $release$versuffix | tr -d .-); 2988 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2989 $ECHO $n$v`$shared_ext' 2990 library_names_spec='${libname}_dll.$libext' 2991 dynamic_linker='OS/2 ld.exe' 2992 shlibpath_var=BEGINLIBPATH 2993 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2994 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2995 postinstall_cmds='base_file=`basename \$file`~ 2996 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2997 dldir=$destdir/`dirname \$dlpath`~ 2998 test -d \$dldir || mkdir -p \$dldir~ 2999 $install_prog $dir/$dlname \$dldir/$dlname~ 3000 chmod a+x \$dldir/$dlname~ 3001 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3002 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3003 fi' 3004 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3005 dlpath=$dir/\$dldll~ 3006 $RM \$dlpath' 3007 ;; 3008 3009osf3* | osf4* | osf5*) 3010 version_type=osf 3011 need_lib_prefix=no 3012 need_version=no 3013 soname_spec='$libname$release$shared_ext$major' 3014 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3015 shlibpath_var=LD_LIBRARY_PATH 3016 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3017 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3018 ;; 3019 3020rdos*) 3021 dynamic_linker=no 3022 ;; 3023 3024solaris*) 3025 version_type=linux # correct to gnu/linux during the next big refactor 3026 need_lib_prefix=no 3027 need_version=no 3028 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3029 soname_spec='$libname$release$shared_ext$major' 3030 shlibpath_var=LD_LIBRARY_PATH 3031 shlibpath_overrides_runpath=yes 3032 hardcode_into_libs=yes 3033 # ldd complains unless libraries are executable 3034 postinstall_cmds='chmod +x $lib' 3035 ;; 3036 3037sunos4*) 3038 version_type=sunos 3039 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3040 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3041 shlibpath_var=LD_LIBRARY_PATH 3042 shlibpath_overrides_runpath=yes 3043 if test yes = "$with_gnu_ld"; then 3044 need_lib_prefix=no 3045 fi 3046 need_version=yes 3047 ;; 3048 3049sysv4 | sysv4.3*) 3050 version_type=linux # correct to gnu/linux during the next big refactor 3051 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3052 soname_spec='$libname$release$shared_ext$major' 3053 shlibpath_var=LD_LIBRARY_PATH 3054 case $host_vendor in 3055 sni) 3056 shlibpath_overrides_runpath=no 3057 need_lib_prefix=no 3058 runpath_var=LD_RUN_PATH 3059 ;; 3060 siemens) 3061 need_lib_prefix=no 3062 ;; 3063 motorola) 3064 need_lib_prefix=no 3065 need_version=no 3066 shlibpath_overrides_runpath=no 3067 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3068 ;; 3069 esac 3070 ;; 3071 3072sysv4*MP*) 3073 if test -d /usr/nec; then 3074 version_type=linux # correct to gnu/linux during the next big refactor 3075 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3076 soname_spec='$libname$shared_ext.$major' 3077 shlibpath_var=LD_LIBRARY_PATH 3078 fi 3079 ;; 3080 3081sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3082 version_type=sco 3083 need_lib_prefix=no 3084 need_version=no 3085 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3086 soname_spec='$libname$release$shared_ext$major' 3087 shlibpath_var=LD_LIBRARY_PATH 3088 shlibpath_overrides_runpath=yes 3089 hardcode_into_libs=yes 3090 if test yes = "$with_gnu_ld"; then 3091 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3092 else 3093 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3094 case $host_os in 3095 sco3.2v5*) 3096 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3097 ;; 3098 esac 3099 fi 3100 sys_lib_dlsearch_path_spec='/usr/lib' 3101 ;; 3102 3103tpf*) 3104 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3105 version_type=linux # correct to gnu/linux during the next big refactor 3106 need_lib_prefix=no 3107 need_version=no 3108 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3109 shlibpath_var=LD_LIBRARY_PATH 3110 shlibpath_overrides_runpath=no 3111 hardcode_into_libs=yes 3112 ;; 3113 3114uts4*) 3115 version_type=linux # correct to gnu/linux during the next big refactor 3116 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3117 soname_spec='$libname$release$shared_ext$major' 3118 shlibpath_var=LD_LIBRARY_PATH 3119 ;; 3120 3121*) 3122 dynamic_linker=no 3123 ;; 3124esac 3125AC_MSG_RESULT([$dynamic_linker]) 3126test no = "$dynamic_linker" && can_build_shared=no 3127 3128variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3129if test yes = "$GCC"; then 3130 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3131fi 3132 3133if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3134 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3135fi 3136 3137if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3138 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3139fi 3140 3141# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3142configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3143 3144# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3145func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3146 3147# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3148configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3149 3150_LT_DECL([], [variables_saved_for_relink], [1], 3151 [Variables whose values should be saved in libtool wrapper scripts and 3152 restored at link time]) 3153_LT_DECL([], [need_lib_prefix], [0], 3154 [Do we need the "lib" prefix for modules?]) 3155_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3156_LT_DECL([], [version_type], [0], [Library versioning type]) 3157_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3158_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3159_LT_DECL([], [shlibpath_overrides_runpath], [0], 3160 [Is shlibpath searched before the hard-coded library search path?]) 3161_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3162_LT_DECL([], [library_names_spec], [1], 3163 [[List of archive names. First name is the real one, the rest are links. 3164 The last name is the one that the linker finds with -lNAME]]) 3165_LT_DECL([], [soname_spec], [1], 3166 [[The coded name of the library, if different from the real name]]) 3167_LT_DECL([], [install_override_mode], [1], 3168 [Permission mode override for installation of shared libraries]) 3169_LT_DECL([], [postinstall_cmds], [2], 3170 [Command to use after installation of a shared archive]) 3171_LT_DECL([], [postuninstall_cmds], [2], 3172 [Command to use after uninstallation of a shared archive]) 3173_LT_DECL([], [finish_cmds], [2], 3174 [Commands used to finish a libtool library installation in a directory]) 3175_LT_DECL([], [finish_eval], [1], 3176 [[As "finish_cmds", except a single script fragment to be evaled but 3177 not shown]]) 3178_LT_DECL([], [hardcode_into_libs], [0], 3179 [Whether we should hardcode library paths into libraries]) 3180_LT_DECL([], [sys_lib_search_path_spec], [2], 3181 [Compile-time system search path for libraries]) 3182_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3183 [Detected run-time system search path for libraries]) 3184_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3185 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3186])# _LT_SYS_DYNAMIC_LINKER 3187 3188 3189# _LT_PATH_TOOL_PREFIX(TOOL) 3190# -------------------------- 3191# find a file program that can recognize shared library 3192AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3193[m4_require([_LT_DECL_EGREP])dnl 3194AC_MSG_CHECKING([for $1]) 3195AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3196[case $MAGIC_CMD in 3197[[\\/*] | ?:[\\/]*]) 3198 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3199 ;; 3200*) 3201 lt_save_MAGIC_CMD=$MAGIC_CMD 3202 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3203dnl $ac_dummy forces splitting on constant user-supplied paths. 3204dnl POSIX.2 word splitting is done only on the output of word expansions, 3205dnl not every word. This closes a longstanding sh security hole. 3206 ac_dummy="m4_if([$2], , $PATH, [$2])" 3207 for ac_dir in $ac_dummy; do 3208 IFS=$lt_save_ifs 3209 test -z "$ac_dir" && ac_dir=. 3210 if test -f "$ac_dir/$1"; then 3211 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3212 if test -n "$file_magic_test_file"; then 3213 case $deplibs_check_method in 3214 "file_magic "*) 3215 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3216 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3217 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3218 $EGREP "$file_magic_regex" > /dev/null; then 3219 : 3220 else 3221 cat <<_LT_EOF 1>&2 3222 3223*** Warning: the command libtool uses to detect shared libraries, 3224*** $file_magic_cmd, produces output that libtool cannot recognize. 3225*** The result is that libtool may fail to recognize shared libraries 3226*** as such. This will affect the creation of libtool libraries that 3227*** depend on shared libraries, but programs linked with such libtool 3228*** libraries will work regardless of this problem. Nevertheless, you 3229*** may want to report the problem to your system manager and/or to 3230*** bug-libtool@gnu.org 3231 3232_LT_EOF 3233 fi ;; 3234 esac 3235 fi 3236 break 3237 fi 3238 done 3239 IFS=$lt_save_ifs 3240 MAGIC_CMD=$lt_save_MAGIC_CMD 3241 ;; 3242esac]) 3243MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3244if test -n "$MAGIC_CMD"; then 3245 AC_MSG_RESULT($MAGIC_CMD) 3246else 3247 AC_MSG_RESULT(no) 3248fi 3249_LT_DECL([], [MAGIC_CMD], [0], 3250 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3251])# _LT_PATH_TOOL_PREFIX 3252 3253# Old name: 3254AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3255dnl aclocal-1.4 backwards compatibility: 3256dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3257 3258 3259# _LT_PATH_MAGIC 3260# -------------- 3261# find a file program that can recognize a shared library 3262m4_defun([_LT_PATH_MAGIC], 3263[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3264if test -z "$lt_cv_path_MAGIC_CMD"; then 3265 if test -n "$ac_tool_prefix"; then 3266 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3267 else 3268 MAGIC_CMD=: 3269 fi 3270fi 3271])# _LT_PATH_MAGIC 3272 3273 3274# LT_PATH_LD 3275# ---------- 3276# find the pathname to the GNU or non-GNU linker 3277AC_DEFUN([LT_PATH_LD], 3278[AC_REQUIRE([AC_PROG_CC])dnl 3279AC_REQUIRE([AC_CANONICAL_HOST])dnl 3280AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3281m4_require([_LT_DECL_SED])dnl 3282m4_require([_LT_DECL_EGREP])dnl 3283m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3284 3285AC_ARG_WITH([gnu-ld], 3286 [AS_HELP_STRING([--with-gnu-ld], 3287 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3288 [test no = "$withval" || with_gnu_ld=yes], 3289 [with_gnu_ld=no])dnl 3290 3291ac_prog=ld 3292if test yes = "$GCC"; then 3293 # Check if gcc -print-prog-name=ld gives a path. 3294 AC_MSG_CHECKING([for ld used by $CC]) 3295 case $host in 3296 *-*-mingw*) 3297 # gcc leaves a trailing carriage return, which upsets mingw 3298 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3299 *) 3300 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3301 esac 3302 case $ac_prog in 3303 # Accept absolute paths. 3304 [[\\/]]* | ?:[[\\/]]*) 3305 re_direlt='/[[^/]][[^/]]*/\.\./' 3306 # Canonicalize the pathname of ld 3307 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3308 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3309 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3310 done 3311 test -z "$LD" && LD=$ac_prog 3312 ;; 3313 "") 3314 # If it fails, then pretend we aren't using GCC. 3315 ac_prog=ld 3316 ;; 3317 *) 3318 # If it is relative, then search for the first ld in PATH. 3319 with_gnu_ld=unknown 3320 ;; 3321 esac 3322elif test yes = "$with_gnu_ld"; then 3323 AC_MSG_CHECKING([for GNU ld]) 3324else 3325 AC_MSG_CHECKING([for non-GNU ld]) 3326fi 3327AC_CACHE_VAL(lt_cv_path_LD, 3328[if test -z "$LD"; then 3329 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3330 for ac_dir in $PATH; do 3331 IFS=$lt_save_ifs 3332 test -z "$ac_dir" && ac_dir=. 3333 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3334 lt_cv_path_LD=$ac_dir/$ac_prog 3335 # Check to see if the program is GNU ld. I'd rather use --version, 3336 # but apparently some variants of GNU ld only accept -v. 3337 # Break only if it was the GNU/non-GNU ld that we prefer. 3338 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3339 *GNU* | *'with BFD'*) 3340 test no != "$with_gnu_ld" && break 3341 ;; 3342 *) 3343 test yes != "$with_gnu_ld" && break 3344 ;; 3345 esac 3346 fi 3347 done 3348 IFS=$lt_save_ifs 3349else 3350 lt_cv_path_LD=$LD # Let the user override the test with a path. 3351fi]) 3352LD=$lt_cv_path_LD 3353if test -n "$LD"; then 3354 AC_MSG_RESULT($LD) 3355else 3356 AC_MSG_RESULT(no) 3357fi 3358test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3359_LT_PATH_LD_GNU 3360AC_SUBST([LD]) 3361 3362_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3363])# LT_PATH_LD 3364 3365# Old names: 3366AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3367AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3368dnl aclocal-1.4 backwards compatibility: 3369dnl AC_DEFUN([AM_PROG_LD], []) 3370dnl AC_DEFUN([AC_PROG_LD], []) 3371 3372 3373# _LT_PATH_LD_GNU 3374#- -------------- 3375m4_defun([_LT_PATH_LD_GNU], 3376[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3377[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3378case `$LD -v 2>&1 </dev/null` in 3379*GNU* | *'with BFD'*) 3380 lt_cv_prog_gnu_ld=yes 3381 ;; 3382*) 3383 lt_cv_prog_gnu_ld=no 3384 ;; 3385esac]) 3386with_gnu_ld=$lt_cv_prog_gnu_ld 3387])# _LT_PATH_LD_GNU 3388 3389 3390# _LT_CMD_RELOAD 3391# -------------- 3392# find reload flag for linker 3393# -- PORTME Some linkers may need a different reload flag. 3394m4_defun([_LT_CMD_RELOAD], 3395[AC_CACHE_CHECK([for $LD option to reload object files], 3396 lt_cv_ld_reload_flag, 3397 [lt_cv_ld_reload_flag='-r']) 3398reload_flag=$lt_cv_ld_reload_flag 3399case $reload_flag in 3400"" | " "*) ;; 3401*) reload_flag=" $reload_flag" ;; 3402esac 3403reload_cmds='$LD$reload_flag -o $output$reload_objs' 3404case $host_os in 3405 cygwin* | mingw* | pw32* | cegcc*) 3406 if test yes != "$GCC"; then 3407 reload_cmds=false 3408 fi 3409 ;; 3410 darwin*) 3411 if test yes = "$GCC"; then 3412 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3413 else 3414 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3415 fi 3416 ;; 3417esac 3418_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3419_LT_TAGDECL([], [reload_cmds], [2])dnl 3420])# _LT_CMD_RELOAD 3421 3422 3423# _LT_PATH_DD 3424# ----------- 3425# find a working dd 3426m4_defun([_LT_PATH_DD], 3427[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3428[printf 0123456789abcdef0123456789abcdef >conftest.i 3429cat conftest.i conftest.i >conftest2.i 3430: ${lt_DD:=$DD} 3431AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3432[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3433 cmp -s conftest.i conftest.out \ 3434 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3435fi]) 3436rm -f conftest.i conftest2.i conftest.out]) 3437])# _LT_PATH_DD 3438 3439 3440# _LT_CMD_TRUNCATE 3441# ---------------- 3442# find command to truncate a binary pipe 3443m4_defun([_LT_CMD_TRUNCATE], 3444[m4_require([_LT_PATH_DD]) 3445AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3446[printf 0123456789abcdef0123456789abcdef >conftest.i 3447cat conftest.i conftest.i >conftest2.i 3448lt_cv_truncate_bin= 3449if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3450 cmp -s conftest.i conftest.out \ 3451 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3452fi 3453rm -f conftest.i conftest2.i conftest.out 3454test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3455_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3456 [Command to truncate a binary pipe]) 3457])# _LT_CMD_TRUNCATE 3458 3459 3460# _LT_CHECK_MAGIC_METHOD 3461# ---------------------- 3462# how to check for library dependencies 3463# -- PORTME fill in with the dynamic library characteristics 3464m4_defun([_LT_CHECK_MAGIC_METHOD], 3465[m4_require([_LT_DECL_EGREP]) 3466m4_require([_LT_DECL_OBJDUMP]) 3467AC_CACHE_CHECK([how to recognize dependent libraries], 3468lt_cv_deplibs_check_method, 3469[lt_cv_file_magic_cmd='$MAGIC_CMD' 3470lt_cv_file_magic_test_file= 3471lt_cv_deplibs_check_method='unknown' 3472# Need to set the preceding variable on all platforms that support 3473# interlibrary dependencies. 3474# 'none' -- dependencies not supported. 3475# 'unknown' -- same as none, but documents that we really don't know. 3476# 'pass_all' -- all dependencies passed with no checks. 3477# 'test_compile' -- check by making test program. 3478# 'file_magic [[regex]]' -- check by looking for files in library path 3479# that responds to the $file_magic_cmd with a given extended regex. 3480# If you have 'file' or equivalent on your system and you're not sure 3481# whether 'pass_all' will *always* work, you probably want this one. 3482 3483case $host_os in 3484aix[[4-9]]*) 3485 lt_cv_deplibs_check_method=pass_all 3486 ;; 3487 3488beos*) 3489 lt_cv_deplibs_check_method=pass_all 3490 ;; 3491 3492bsdi[[45]]*) 3493 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3494 lt_cv_file_magic_cmd='$FILECMD -L' 3495 lt_cv_file_magic_test_file=/shlib/libc.so 3496 ;; 3497 3498cygwin*) 3499 # func_win32_libid is a shell function defined in ltmain.sh 3500 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3501 lt_cv_file_magic_cmd='func_win32_libid' 3502 ;; 3503 3504mingw* | pw32*) 3505 # Base MSYS/MinGW do not provide the 'file' command needed by 3506 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3507 # unless we find 'file', for example because we are cross-compiling. 3508 if ( file / ) >/dev/null 2>&1; then 3509 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3510 lt_cv_file_magic_cmd='func_win32_libid' 3511 else 3512 # Keep this pattern in sync with the one in func_win32_libid. 3513 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3514 lt_cv_file_magic_cmd='$OBJDUMP -f' 3515 fi 3516 ;; 3517 3518cegcc*) 3519 # use the weaker test based on 'objdump'. See mingw*. 3520 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3521 lt_cv_file_magic_cmd='$OBJDUMP -f' 3522 ;; 3523 3524darwin* | rhapsody*) 3525 lt_cv_deplibs_check_method=pass_all 3526 ;; 3527 3528freebsd* | dragonfly* | midnightbsd*) 3529 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3530 case $host_cpu in 3531 i*86 ) 3532 # Not sure whether the presence of OpenBSD here was a mistake. 3533 # Let's accept both of them until this is cleared up. 3534 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3535 lt_cv_file_magic_cmd=$FILECMD 3536 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3537 ;; 3538 esac 3539 else 3540 lt_cv_deplibs_check_method=pass_all 3541 fi 3542 ;; 3543 3544haiku*) 3545 lt_cv_deplibs_check_method=pass_all 3546 ;; 3547 3548hpux10.20* | hpux11*) 3549 lt_cv_file_magic_cmd=$FILECMD 3550 case $host_cpu in 3551 ia64*) 3552 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3553 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3554 ;; 3555 hppa*64*) 3556 [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]'] 3557 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3558 ;; 3559 *) 3560 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3561 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3562 ;; 3563 esac 3564 ;; 3565 3566interix[[3-9]]*) 3567 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3568 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3569 ;; 3570 3571irix5* | irix6* | nonstopux*) 3572 case $LD in 3573 *-32|*"-32 ") libmagic=32-bit;; 3574 *-n32|*"-n32 ") libmagic=N32;; 3575 *-64|*"-64 ") libmagic=64-bit;; 3576 *) libmagic=never-match;; 3577 esac 3578 lt_cv_deplibs_check_method=pass_all 3579 ;; 3580 3581# This must be glibc/ELF. 3582linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3583 lt_cv_deplibs_check_method=pass_all 3584 ;; 3585 3586netbsd*) 3587 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3588 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3589 else 3590 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3591 fi 3592 ;; 3593 3594newos6*) 3595 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3596 lt_cv_file_magic_cmd=$FILECMD 3597 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3598 ;; 3599 3600*nto* | *qnx*) 3601 lt_cv_deplibs_check_method=pass_all 3602 ;; 3603 3604openbsd* | bitrig*) 3605 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3606 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3607 else 3608 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3609 fi 3610 ;; 3611 3612osf3* | osf4* | osf5*) 3613 lt_cv_deplibs_check_method=pass_all 3614 ;; 3615 3616rdos*) 3617 lt_cv_deplibs_check_method=pass_all 3618 ;; 3619 3620solaris*) 3621 lt_cv_deplibs_check_method=pass_all 3622 ;; 3623 3624sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3625 lt_cv_deplibs_check_method=pass_all 3626 ;; 3627 3628sysv4 | sysv4.3*) 3629 case $host_vendor in 3630 motorola) 3631 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]]' 3632 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3633 ;; 3634 ncr) 3635 lt_cv_deplibs_check_method=pass_all 3636 ;; 3637 sequent) 3638 lt_cv_file_magic_cmd='/bin/file' 3639 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3640 ;; 3641 sni) 3642 lt_cv_file_magic_cmd='/bin/file' 3643 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3644 lt_cv_file_magic_test_file=/lib/libc.so 3645 ;; 3646 siemens) 3647 lt_cv_deplibs_check_method=pass_all 3648 ;; 3649 pc) 3650 lt_cv_deplibs_check_method=pass_all 3651 ;; 3652 esac 3653 ;; 3654 3655tpf*) 3656 lt_cv_deplibs_check_method=pass_all 3657 ;; 3658os2*) 3659 lt_cv_deplibs_check_method=pass_all 3660 ;; 3661esac 3662]) 3663 3664file_magic_glob= 3665want_nocaseglob=no 3666if test "$build" = "$host"; then 3667 case $host_os in 3668 mingw* | pw32*) 3669 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3670 want_nocaseglob=yes 3671 else 3672 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3673 fi 3674 ;; 3675 esac 3676fi 3677 3678file_magic_cmd=$lt_cv_file_magic_cmd 3679deplibs_check_method=$lt_cv_deplibs_check_method 3680test -z "$deplibs_check_method" && deplibs_check_method=unknown 3681 3682_LT_DECL([], [deplibs_check_method], [1], 3683 [Method to check whether dependent libraries are shared objects]) 3684_LT_DECL([], [file_magic_cmd], [1], 3685 [Command to use when deplibs_check_method = "file_magic"]) 3686_LT_DECL([], [file_magic_glob], [1], 3687 [How to find potential files when deplibs_check_method = "file_magic"]) 3688_LT_DECL([], [want_nocaseglob], [1], 3689 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3690])# _LT_CHECK_MAGIC_METHOD 3691 3692 3693# LT_PATH_NM 3694# ---------- 3695# find the pathname to a BSD- or MS-compatible name lister 3696AC_DEFUN([LT_PATH_NM], 3697[AC_REQUIRE([AC_PROG_CC])dnl 3698AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3699[if test -n "$NM"; then 3700 # Let the user override the test. 3701 lt_cv_path_NM=$NM 3702else 3703 lt_nm_to_check=${ac_tool_prefix}nm 3704 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3705 lt_nm_to_check="$lt_nm_to_check nm" 3706 fi 3707 for lt_tmp_nm in $lt_nm_to_check; do 3708 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3709 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3710 IFS=$lt_save_ifs 3711 test -z "$ac_dir" && ac_dir=. 3712 tmp_nm=$ac_dir/$lt_tmp_nm 3713 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3714 # Check to see if the nm accepts a BSD-compat flag. 3715 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3716 # nm: unknown option "B" ignored 3717 # Tru64's nm complains that /dev/null is an invalid object file 3718 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3719 case $build_os in 3720 mingw*) lt_bad_file=conftest.nm/nofile ;; 3721 *) lt_bad_file=/dev/null ;; 3722 esac 3723 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3724 *$lt_bad_file* | *'Invalid file or object type'*) 3725 lt_cv_path_NM="$tmp_nm -B" 3726 break 2 3727 ;; 3728 *) 3729 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3730 */dev/null*) 3731 lt_cv_path_NM="$tmp_nm -p" 3732 break 2 3733 ;; 3734 *) 3735 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3736 continue # so that we can try to find one that supports BSD flags 3737 ;; 3738 esac 3739 ;; 3740 esac 3741 fi 3742 done 3743 IFS=$lt_save_ifs 3744 done 3745 : ${lt_cv_path_NM=no} 3746fi]) 3747if test no != "$lt_cv_path_NM"; then 3748 NM=$lt_cv_path_NM 3749else 3750 # Didn't find any BSD compatible name lister, look for dumpbin. 3751 if test -n "$DUMPBIN"; then : 3752 # Let the user override the test. 3753 else 3754 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3755 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3756 *COFF*) 3757 DUMPBIN="$DUMPBIN -symbols -headers" 3758 ;; 3759 *) 3760 DUMPBIN=: 3761 ;; 3762 esac 3763 fi 3764 AC_SUBST([DUMPBIN]) 3765 if test : != "$DUMPBIN"; then 3766 NM=$DUMPBIN 3767 fi 3768fi 3769test -z "$NM" && NM=nm 3770AC_SUBST([NM]) 3771_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3772 3773AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3774 [lt_cv_nm_interface="BSD nm" 3775 echo "int some_variable = 0;" > conftest.$ac_ext 3776 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3777 (eval "$ac_compile" 2>conftest.err) 3778 cat conftest.err >&AS_MESSAGE_LOG_FD 3779 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3780 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3781 cat conftest.err >&AS_MESSAGE_LOG_FD 3782 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3783 cat conftest.out >&AS_MESSAGE_LOG_FD 3784 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3785 lt_cv_nm_interface="MS dumpbin" 3786 fi 3787 rm -f conftest*]) 3788])# LT_PATH_NM 3789 3790# Old names: 3791AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3792AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3793dnl aclocal-1.4 backwards compatibility: 3794dnl AC_DEFUN([AM_PROG_NM], []) 3795dnl AC_DEFUN([AC_PROG_NM], []) 3796 3797# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3798# -------------------------------- 3799# how to determine the name of the shared library 3800# associated with a specific link library. 3801# -- PORTME fill in with the dynamic library characteristics 3802m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3803[m4_require([_LT_DECL_EGREP]) 3804m4_require([_LT_DECL_OBJDUMP]) 3805m4_require([_LT_DECL_DLLTOOL]) 3806AC_CACHE_CHECK([how to associate runtime and link libraries], 3807lt_cv_sharedlib_from_linklib_cmd, 3808[lt_cv_sharedlib_from_linklib_cmd='unknown' 3809 3810case $host_os in 3811cygwin* | mingw* | pw32* | cegcc*) 3812 # two different shell functions defined in ltmain.sh; 3813 # decide which one to use based on capabilities of $DLLTOOL 3814 case `$DLLTOOL --help 2>&1` in 3815 *--identify-strict*) 3816 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3817 ;; 3818 *) 3819 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3820 ;; 3821 esac 3822 ;; 3823*) 3824 # fallback: assume linklib IS sharedlib 3825 lt_cv_sharedlib_from_linklib_cmd=$ECHO 3826 ;; 3827esac 3828]) 3829sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3830test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3831 3832_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3833 [Command to associate shared and link libraries]) 3834])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3835 3836 3837# _LT_PATH_MANIFEST_TOOL 3838# ---------------------- 3839# locate the manifest tool 3840m4_defun([_LT_PATH_MANIFEST_TOOL], 3841[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3842test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3843AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3844 [lt_cv_path_mainfest_tool=no 3845 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3846 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3847 cat conftest.err >&AS_MESSAGE_LOG_FD 3848 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3849 lt_cv_path_mainfest_tool=yes 3850 fi 3851 rm -f conftest*]) 3852if test yes != "$lt_cv_path_mainfest_tool"; then 3853 MANIFEST_TOOL=: 3854fi 3855_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3856])# _LT_PATH_MANIFEST_TOOL 3857 3858 3859# _LT_DLL_DEF_P([FILE]) 3860# --------------------- 3861# True iff FILE is a Windows DLL '.def' file. 3862# Keep in sync with func_dll_def_p in the libtool script 3863AC_DEFUN([_LT_DLL_DEF_P], 3864[dnl 3865 test DEF = "`$SED -n dnl 3866 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3867 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3868 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3869 -e q dnl Only consider the first "real" line 3870 $1`" dnl 3871])# _LT_DLL_DEF_P 3872 3873 3874# LT_LIB_M 3875# -------- 3876# check for math library 3877AC_DEFUN([LT_LIB_M], 3878[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3879LIBM= 3880case $host in 3881*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3882 # These system don't have libm, or don't need it 3883 ;; 3884*-ncr-sysv4.3*) 3885 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3886 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3887 ;; 3888*) 3889 AC_CHECK_LIB(m, cos, LIBM=-lm) 3890 ;; 3891esac 3892AC_SUBST([LIBM]) 3893])# LT_LIB_M 3894 3895# Old name: 3896AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3897dnl aclocal-1.4 backwards compatibility: 3898dnl AC_DEFUN([AC_CHECK_LIBM], []) 3899 3900 3901# _LT_COMPILER_NO_RTTI([TAGNAME]) 3902# ------------------------------- 3903m4_defun([_LT_COMPILER_NO_RTTI], 3904[m4_require([_LT_TAG_COMPILER])dnl 3905 3906_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3907 3908if test yes = "$GCC"; then 3909 case $cc_basename in 3910 nvcc*) 3911 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3912 *) 3913 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3914 esac 3915 3916 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3917 lt_cv_prog_compiler_rtti_exceptions, 3918 [-fno-rtti -fno-exceptions], [], 3919 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3920fi 3921_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3922 [Compiler flag to turn off builtin functions]) 3923])# _LT_COMPILER_NO_RTTI 3924 3925 3926# _LT_CMD_GLOBAL_SYMBOLS 3927# ---------------------- 3928m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3929[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3930AC_REQUIRE([AC_PROG_CC])dnl 3931AC_REQUIRE([AC_PROG_AWK])dnl 3932AC_REQUIRE([LT_PATH_NM])dnl 3933AC_REQUIRE([LT_PATH_LD])dnl 3934m4_require([_LT_DECL_SED])dnl 3935m4_require([_LT_DECL_EGREP])dnl 3936m4_require([_LT_TAG_COMPILER])dnl 3937 3938# Check for command to grab the raw symbol name followed by C symbol from nm. 3939AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3940AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3941[ 3942# These are sane defaults that work on at least a few old systems. 3943# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3944 3945# Character class describing NM global symbol codes. 3946symcode='[[BCDEGRST]]' 3947 3948# Regexp to match symbols that can be accessed directly from C. 3949sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3950 3951# Define system-specific variables. 3952case $host_os in 3953aix*) 3954 symcode='[[BCDT]]' 3955 ;; 3956cygwin* | mingw* | pw32* | cegcc*) 3957 symcode='[[ABCDGISTW]]' 3958 ;; 3959hpux*) 3960 if test ia64 = "$host_cpu"; then 3961 symcode='[[ABCDEGRST]]' 3962 fi 3963 ;; 3964irix* | nonstopux*) 3965 symcode='[[BCDEGRST]]' 3966 ;; 3967osf*) 3968 symcode='[[BCDEGQRST]]' 3969 ;; 3970solaris*) 3971 symcode='[[BDRT]]' 3972 ;; 3973sco3.2v5*) 3974 symcode='[[DT]]' 3975 ;; 3976sysv4.2uw2*) 3977 symcode='[[DT]]' 3978 ;; 3979sysv5* | sco5v6* | unixware* | OpenUNIX*) 3980 symcode='[[ABDT]]' 3981 ;; 3982sysv4) 3983 symcode='[[DFNSTU]]' 3984 ;; 3985esac 3986 3987# If we're using GNU nm, then use its standard symbol codes. 3988case `$NM -V 2>&1` in 3989*GNU* | *'with BFD'*) 3990 symcode='[[ABCDGIRSTW]]' ;; 3991esac 3992 3993if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3994 # Gets list of data symbols to import. 3995 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 3996 # Adjust the below global symbol transforms to fixup imported variables. 3997 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3998 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3999 lt_c_name_lib_hook="\ 4000 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4001 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4002else 4003 # Disable hooks by default. 4004 lt_cv_sys_global_symbol_to_import= 4005 lt_cdecl_hook= 4006 lt_c_name_hook= 4007 lt_c_name_lib_hook= 4008fi 4009 4010# Transform an extracted symbol line into a proper C declaration. 4011# Some systems (esp. on ia64) link data and code symbols differently, 4012# so use this general approach. 4013lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 4014$lt_cdecl_hook\ 4015" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4016" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4017 4018# Transform an extracted symbol line into symbol name and symbol address 4019lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4020$lt_c_name_hook\ 4021" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4022" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4023 4024# Transform an extracted symbol line into symbol name with lib prefix and 4025# symbol address. 4026lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4027$lt_c_name_lib_hook\ 4028" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4029" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4030" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4031 4032# Handle CRLF in mingw tool chain 4033opt_cr= 4034case $build_os in 4035mingw*) 4036 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4037 ;; 4038esac 4039 4040# Try without a prefix underscore, then with it. 4041for ac_symprfx in "" "_"; do 4042 4043 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4044 symxfrm="\\1 $ac_symprfx\\2 \\2" 4045 4046 # Write the raw and C identifiers. 4047 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4048 # Fake it for dumpbin and say T for any non-static function, 4049 # D for any global variable and I for any imported variable. 4050 # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4051 # which start with @ or ?. 4052 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4053" {last_section=section; section=\$ 3};"\ 4054" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4055" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4056" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4057" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4058" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4059" \$ 0!~/External *\|/{next};"\ 4060" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4061" {if(hide[section]) next};"\ 4062" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4063" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4064" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4065" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4066" ' prfx=^$ac_symprfx]" 4067 else 4068 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4069 fi 4070 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4071 4072 # Check to see that the pipe works correctly. 4073 pipe_works=no 4074 4075 rm -f conftest* 4076 cat > conftest.$ac_ext <<_LT_EOF 4077#ifdef __cplusplus 4078extern "C" { 4079#endif 4080char nm_test_var; 4081void nm_test_func(void); 4082void nm_test_func(void){} 4083#ifdef __cplusplus 4084} 4085#endif 4086int main(){nm_test_var='a';nm_test_func();return(0);} 4087_LT_EOF 4088 4089 if AC_TRY_EVAL(ac_compile); then 4090 # Now try to grab the symbols. 4091 nlist=conftest.nm 4092 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4093 # Try sorting and uniquifying the output. 4094 if sort "$nlist" | uniq > "$nlist"T; then 4095 mv -f "$nlist"T "$nlist" 4096 else 4097 rm -f "$nlist"T 4098 fi 4099 4100 # Make sure that we snagged all the symbols we need. 4101 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4102 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4103 cat <<_LT_EOF > conftest.$ac_ext 4104/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4105#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4106/* DATA imports from DLLs on WIN32 can't be const, because runtime 4107 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4108# define LT@&t@_DLSYM_CONST 4109#elif defined __osf__ 4110/* This system does not cope well with relocations in const data. */ 4111# define LT@&t@_DLSYM_CONST 4112#else 4113# define LT@&t@_DLSYM_CONST const 4114#endif 4115 4116#ifdef __cplusplus 4117extern "C" { 4118#endif 4119 4120_LT_EOF 4121 # Now generate the symbol file. 4122 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4123 4124 cat <<_LT_EOF >> conftest.$ac_ext 4125 4126/* The mapping between symbol names and symbols. */ 4127LT@&t@_DLSYM_CONST struct { 4128 const char *name; 4129 void *address; 4130} 4131lt__PROGRAM__LTX_preloaded_symbols[[]] = 4132{ 4133 { "@PROGRAM@", (void *) 0 }, 4134_LT_EOF 4135 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4136 cat <<\_LT_EOF >> conftest.$ac_ext 4137 {0, (void *) 0} 4138}; 4139 4140/* This works around a problem in FreeBSD linker */ 4141#ifdef FREEBSD_WORKAROUND 4142static const void *lt_preloaded_setup() { 4143 return lt__PROGRAM__LTX_preloaded_symbols; 4144} 4145#endif 4146 4147#ifdef __cplusplus 4148} 4149#endif 4150_LT_EOF 4151 # Now try linking the two files. 4152 mv conftest.$ac_objext conftstm.$ac_objext 4153 lt_globsym_save_LIBS=$LIBS 4154 lt_globsym_save_CFLAGS=$CFLAGS 4155 LIBS=conftstm.$ac_objext 4156 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4157 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4158 pipe_works=yes 4159 fi 4160 LIBS=$lt_globsym_save_LIBS 4161 CFLAGS=$lt_globsym_save_CFLAGS 4162 else 4163 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4164 fi 4165 else 4166 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4167 fi 4168 else 4169 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4170 fi 4171 else 4172 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4173 cat conftest.$ac_ext >&5 4174 fi 4175 rm -rf conftest* conftst* 4176 4177 # Do not use the global_symbol_pipe unless it works. 4178 if test yes = "$pipe_works"; then 4179 break 4180 else 4181 lt_cv_sys_global_symbol_pipe= 4182 fi 4183done 4184]) 4185if test -z "$lt_cv_sys_global_symbol_pipe"; then 4186 lt_cv_sys_global_symbol_to_cdecl= 4187fi 4188if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4189 AC_MSG_RESULT(failed) 4190else 4191 AC_MSG_RESULT(ok) 4192fi 4193 4194# Response file support. 4195if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4196 nm_file_list_spec='@' 4197elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4198 nm_file_list_spec='@' 4199fi 4200 4201_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4202 [Take the output of nm and produce a listing of raw symbols and C names]) 4203_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4204 [Transform the output of nm in a proper C declaration]) 4205_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4206 [Transform the output of nm into a list of symbols to manually relocate]) 4207_LT_DECL([global_symbol_to_c_name_address], 4208 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4209 [Transform the output of nm in a C name address pair]) 4210_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4211 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4212 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4213_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4214 [The name lister interface]) 4215_LT_DECL([], [nm_file_list_spec], [1], 4216 [Specify filename containing input files for $NM]) 4217]) # _LT_CMD_GLOBAL_SYMBOLS 4218 4219 4220# _LT_COMPILER_PIC([TAGNAME]) 4221# --------------------------- 4222m4_defun([_LT_COMPILER_PIC], 4223[m4_require([_LT_TAG_COMPILER])dnl 4224_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4225_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4226_LT_TAGVAR(lt_prog_compiler_static, $1)= 4227 4228m4_if([$1], [CXX], [ 4229 # C++ specific cases for pic, static, wl, etc. 4230 if test yes = "$GXX"; then 4231 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4232 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4233 4234 case $host_os in 4235 aix*) 4236 # All AIX code is PIC. 4237 if test ia64 = "$host_cpu"; then 4238 # AIX 5 now supports IA64 processor 4239 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4240 fi 4241 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4242 ;; 4243 4244 amigaos*) 4245 case $host_cpu in 4246 powerpc) 4247 # see comment about AmigaOS4 .so support 4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4249 ;; 4250 m68k) 4251 # FIXME: we need at least 68020 code to build shared libraries, but 4252 # adding the '-m68020' flag to GCC prevents building anything better, 4253 # like '-m68040'. 4254 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4255 ;; 4256 esac 4257 ;; 4258 4259 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4260 # PIC is the default for these OSes. 4261 ;; 4262 mingw* | cygwin* | os2* | pw32* | cegcc*) 4263 # This hack is so that the source file can tell whether it is being 4264 # built for inclusion in a dll (and should export symbols for example). 4265 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4266 # (--disable-auto-import) libraries 4267 m4_if([$1], [GCJ], [], 4268 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4269 case $host_os in 4270 os2*) 4271 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4272 ;; 4273 esac 4274 ;; 4275 darwin* | rhapsody*) 4276 # PIC is the default on this platform 4277 # Common symbols not allowed in MH_DYLIB files 4278 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4279 ;; 4280 *djgpp*) 4281 # DJGPP does not support shared libraries at all 4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4283 ;; 4284 haiku*) 4285 # PIC is the default for Haiku. 4286 # The "-static" flag exists, but is broken. 4287 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4288 ;; 4289 interix[[3-9]]*) 4290 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4291 # Instead, we relocate shared libraries at runtime. 4292 ;; 4293 sysv4*MP*) 4294 if test -d /usr/nec; then 4295 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4296 fi 4297 ;; 4298 hpux*) 4299 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4300 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4301 # sets the default TLS model and affects inlining. 4302 case $host_cpu in 4303 hppa*64*) 4304 ;; 4305 *) 4306 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307 ;; 4308 esac 4309 ;; 4310 *qnx* | *nto*) 4311 # QNX uses GNU C++, but need to define -shared option too, otherwise 4312 # it will coredump. 4313 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4314 ;; 4315 *) 4316 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4317 ;; 4318 esac 4319 else 4320 case $host_os in 4321 aix[[4-9]]*) 4322 # All AIX code is PIC. 4323 if test ia64 = "$host_cpu"; then 4324 # AIX 5 now supports IA64 processor 4325 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4326 else 4327 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4328 fi 4329 ;; 4330 chorus*) 4331 case $cc_basename in 4332 cxch68*) 4333 # Green Hills C++ Compiler 4334 # _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" 4335 ;; 4336 esac 4337 ;; 4338 mingw* | cygwin* | os2* | pw32* | cegcc*) 4339 # This hack is so that the source file can tell whether it is being 4340 # built for inclusion in a dll (and should export symbols for example). 4341 m4_if([$1], [GCJ], [], 4342 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4343 ;; 4344 dgux*) 4345 case $cc_basename in 4346 ec++*) 4347 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4348 ;; 4349 ghcx*) 4350 # Green Hills C++ Compiler 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4352 ;; 4353 *) 4354 ;; 4355 esac 4356 ;; 4357 freebsd* | dragonfly* | midnightbsd*) 4358 # FreeBSD uses GNU C++ 4359 ;; 4360 hpux9* | hpux10* | hpux11*) 4361 case $cc_basename in 4362 CC*) 4363 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4364 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4365 if test ia64 != "$host_cpu"; then 4366 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4367 fi 4368 ;; 4369 aCC*) 4370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4371 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4372 case $host_cpu in 4373 hppa*64*|ia64*) 4374 # +Z the default 4375 ;; 4376 *) 4377 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4378 ;; 4379 esac 4380 ;; 4381 *) 4382 ;; 4383 esac 4384 ;; 4385 interix*) 4386 # This is c89, which is MS Visual C++ (no shared libs) 4387 # Anyone wants to do a port? 4388 ;; 4389 irix5* | irix6* | nonstopux*) 4390 case $cc_basename in 4391 CC*) 4392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4394 # CC pic flag -KPIC is the default. 4395 ;; 4396 *) 4397 ;; 4398 esac 4399 ;; 4400 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4401 case $cc_basename in 4402 KCC*) 4403 # KAI C++ Compiler 4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4406 ;; 4407 ecpc* ) 4408 # old Intel C++ for x86_64, which still supported -KPIC. 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4412 ;; 4413 icpc* ) 4414 # Intel C++, used to be incompatible with GCC. 4415 # ICC 10 doesn't accept -KPIC any more. 4416 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4419 ;; 4420 pgCC* | pgcpp*) 4421 # Portland Group C++ compiler 4422 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425 ;; 4426 cxx*) 4427 # Compaq C++ 4428 # Make sure the PIC flag is empty. It appears that all Alpha 4429 # Linux and Compaq Tru64 Unix objects are PIC. 4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4431 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4432 ;; 4433 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4434 # IBM XL 8.0, 9.0 on PPC and BlueGene 4435 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4436 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4437 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4438 ;; 4439 *) 4440 case `$CC -V 2>&1 | $SED 5q` in 4441 *Sun\ C*) 4442 # Sun C++ 5.9 4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4444 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4445 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4446 ;; 4447 esac 4448 ;; 4449 esac 4450 ;; 4451 lynxos*) 4452 ;; 4453 m88k*) 4454 ;; 4455 mvs*) 4456 case $cc_basename in 4457 cxx*) 4458 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4459 ;; 4460 *) 4461 ;; 4462 esac 4463 ;; 4464 netbsd*) 4465 ;; 4466 *qnx* | *nto*) 4467 # QNX uses GNU C++, but need to define -shared option too, otherwise 4468 # it will coredump. 4469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4470 ;; 4471 osf3* | osf4* | osf5*) 4472 case $cc_basename in 4473 KCC*) 4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4475 ;; 4476 RCC*) 4477 # Rational C++ 2.4.1 4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4479 ;; 4480 cxx*) 4481 # Digital/Compaq C++ 4482 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4483 # Make sure the PIC flag is empty. It appears that all Alpha 4484 # Linux and Compaq Tru64 Unix objects are PIC. 4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4487 ;; 4488 *) 4489 ;; 4490 esac 4491 ;; 4492 psos*) 4493 ;; 4494 solaris*) 4495 case $cc_basename in 4496 CC* | sunCC*) 4497 # Sun C++ 4.2, 5.x and Centerline C++ 4498 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4499 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4500 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4501 ;; 4502 gcx*) 4503 # Green Hills C++ Compiler 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4505 ;; 4506 *) 4507 ;; 4508 esac 4509 ;; 4510 sunos4*) 4511 case $cc_basename in 4512 CC*) 4513 # Sun C++ 4.x 4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4515 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4516 ;; 4517 lcc*) 4518 # Lucid 4519 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4520 ;; 4521 *) 4522 ;; 4523 esac 4524 ;; 4525 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4526 case $cc_basename in 4527 CC*) 4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4529 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4530 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4531 ;; 4532 esac 4533 ;; 4534 tandem*) 4535 case $cc_basename in 4536 NCC*) 4537 # NonStop-UX NCC 3.20 4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4539 ;; 4540 *) 4541 ;; 4542 esac 4543 ;; 4544 vxworks*) 4545 ;; 4546 *) 4547 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4548 ;; 4549 esac 4550 fi 4551], 4552[ 4553 if test yes = "$GCC"; then 4554 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4555 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4556 4557 case $host_os in 4558 aix*) 4559 # All AIX code is PIC. 4560 if test ia64 = "$host_cpu"; then 4561 # AIX 5 now supports IA64 processor 4562 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4563 fi 4564 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4565 ;; 4566 4567 amigaos*) 4568 case $host_cpu in 4569 powerpc) 4570 # see comment about AmigaOS4 .so support 4571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4572 ;; 4573 m68k) 4574 # FIXME: we need at least 68020 code to build shared libraries, but 4575 # adding the '-m68020' flag to GCC prevents building anything better, 4576 # like '-m68040'. 4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4578 ;; 4579 esac 4580 ;; 4581 4582 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4583 # PIC is the default for these OSes. 4584 ;; 4585 4586 mingw* | cygwin* | pw32* | os2* | cegcc*) 4587 # This hack is so that the source file can tell whether it is being 4588 # built for inclusion in a dll (and should export symbols for example). 4589 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4590 # (--disable-auto-import) libraries 4591 m4_if([$1], [GCJ], [], 4592 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4593 case $host_os in 4594 os2*) 4595 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4596 ;; 4597 esac 4598 ;; 4599 4600 darwin* | rhapsody*) 4601 # PIC is the default on this platform 4602 # Common symbols not allowed in MH_DYLIB files 4603 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4604 ;; 4605 4606 haiku*) 4607 # PIC is the default for Haiku. 4608 # The "-static" flag exists, but is broken. 4609 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4610 ;; 4611 4612 hpux*) 4613 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4614 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4615 # sets the default TLS model and affects inlining. 4616 case $host_cpu in 4617 hppa*64*) 4618 # +Z the default 4619 ;; 4620 *) 4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4622 ;; 4623 esac 4624 ;; 4625 4626 interix[[3-9]]*) 4627 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4628 # Instead, we relocate shared libraries at runtime. 4629 ;; 4630 4631 msdosdjgpp*) 4632 # Just because we use GCC doesn't mean we suddenly get shared libraries 4633 # on systems that don't support them. 4634 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4635 enable_shared=no 4636 ;; 4637 4638 *nto* | *qnx*) 4639 # QNX uses GNU C++, but need to define -shared option too, otherwise 4640 # it will coredump. 4641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4642 ;; 4643 4644 sysv4*MP*) 4645 if test -d /usr/nec; then 4646 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4647 fi 4648 ;; 4649 4650 *) 4651 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4652 ;; 4653 esac 4654 4655 case $cc_basename in 4656 nvcc*) # Cuda Compiler Driver 2.2 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4658 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4659 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4660 fi 4661 ;; 4662 esac 4663 else 4664 # PORTME Check for flag to pass linker flags through the system compiler. 4665 case $host_os in 4666 aix*) 4667 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4668 if test ia64 = "$host_cpu"; then 4669 # AIX 5 now supports IA64 processor 4670 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4671 else 4672 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4673 fi 4674 ;; 4675 4676 darwin* | rhapsody*) 4677 # PIC is the default on this platform 4678 # Common symbols not allowed in MH_DYLIB files 4679 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4680 case $cc_basename in 4681 nagfor*) 4682 # NAG Fortran compiler 4683 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4685 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4686 ;; 4687 esac 4688 ;; 4689 4690 mingw* | cygwin* | pw32* | os2* | cegcc*) 4691 # This hack is so that the source file can tell whether it is being 4692 # built for inclusion in a dll (and should export symbols for example). 4693 m4_if([$1], [GCJ], [], 4694 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4695 case $host_os in 4696 os2*) 4697 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4698 ;; 4699 esac 4700 ;; 4701 4702 hpux9* | hpux10* | hpux11*) 4703 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4704 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4705 # not for PA HP-UX. 4706 case $host_cpu in 4707 hppa*64*|ia64*) 4708 # +Z the default 4709 ;; 4710 *) 4711 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4712 ;; 4713 esac 4714 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4715 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4716 ;; 4717 4718 irix5* | irix6* | nonstopux*) 4719 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4720 # PIC (with -KPIC) is the default. 4721 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4722 ;; 4723 4724 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4725 case $cc_basename in 4726 # old Intel for x86_64, which still supported -KPIC. 4727 ecc*) 4728 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4730 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4731 ;; 4732 # icc used to be incompatible with GCC. 4733 # ICC 10 doesn't accept -KPIC any more. 4734 icc* | ifort*) 4735 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4737 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4738 ;; 4739 # Lahey Fortran 8.1. 4740 lf95*) 4741 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4742 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4743 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4744 ;; 4745 nagfor*) 4746 # NAG Fortran compiler 4747 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4748 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4749 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4750 ;; 4751 tcc*) 4752 # Fabrice Bellard et al's Tiny C Compiler 4753 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4756 ;; 4757 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4758 # Portland Group compilers (*not* the Pentium gcc compiler, 4759 # which looks to be a dead project) 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4761 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4762 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4763 ;; 4764 ccc*) 4765 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4766 # All Alpha code is PIC. 4767 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4768 ;; 4769 xl* | bgxl* | bgf* | mpixl*) 4770 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4772 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4773 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4774 ;; 4775 *) 4776 case `$CC -V 2>&1 | $SED 5q` in 4777 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4778 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4779 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4780 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4781 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4782 ;; 4783 *Sun\ F* | *Sun*Fortran*) 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4786 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4787 ;; 4788 *Sun\ C*) 4789 # Sun C 5.9 4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4791 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4792 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4793 ;; 4794 *Intel*\ [[CF]]*Compiler*) 4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4796 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4798 ;; 4799 *Portland\ Group*) 4800 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4801 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4802 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4803 ;; 4804 esac 4805 ;; 4806 esac 4807 ;; 4808 4809 newsos6) 4810 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4811 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4812 ;; 4813 4814 *nto* | *qnx*) 4815 # QNX uses GNU C++, but need to define -shared option too, otherwise 4816 # it will coredump. 4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4818 ;; 4819 4820 osf3* | osf4* | osf5*) 4821 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4822 # All OSF/1 code is PIC. 4823 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4824 ;; 4825 4826 rdos*) 4827 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4828 ;; 4829 4830 solaris*) 4831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4832 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4833 case $cc_basename in 4834 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4836 *) 4837 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4838 esac 4839 ;; 4840 4841 sunos4*) 4842 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4843 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4844 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4845 ;; 4846 4847 sysv4 | sysv4.2uw2* | sysv4.3*) 4848 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4849 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4850 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4851 ;; 4852 4853 sysv4*MP*) 4854 if test -d /usr/nec; then 4855 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4856 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4857 fi 4858 ;; 4859 4860 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4861 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864 ;; 4865 4866 unicos*) 4867 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4868 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4869 ;; 4870 4871 uts4*) 4872 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4873 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4874 ;; 4875 4876 *) 4877 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4878 ;; 4879 esac 4880 fi 4881]) 4882case $host_os in 4883 # For platforms that do not support PIC, -DPIC is meaningless: 4884 *djgpp*) 4885 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4886 ;; 4887 *) 4888 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4889 ;; 4890esac 4891 4892AC_CACHE_CHECK([for $compiler option to produce PIC], 4893 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4894 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4895_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4896 4897# 4898# Check to make sure the PIC flag actually works. 4899# 4900if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4901 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4902 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4903 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4904 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4905 "" | " "*) ;; 4906 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4907 esac], 4908 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4909 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4910fi 4911_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4912 [Additional compiler flags for building library objects]) 4913 4914_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4915 [How to pass a linker flag through the compiler]) 4916# 4917# Check to make sure the static flag actually works. 4918# 4919wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4920_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4921 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4922 $lt_tmp_static_flag, 4923 [], 4924 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4925_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4926 [Compiler flag to prevent dynamic linking]) 4927])# _LT_COMPILER_PIC 4928 4929 4930# _LT_LINKER_SHLIBS([TAGNAME]) 4931# ---------------------------- 4932# See if the linker supports building shared libraries. 4933m4_defun([_LT_LINKER_SHLIBS], 4934[AC_REQUIRE([LT_PATH_LD])dnl 4935AC_REQUIRE([LT_PATH_NM])dnl 4936m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4937m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4938m4_require([_LT_DECL_EGREP])dnl 4939m4_require([_LT_DECL_SED])dnl 4940m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4941m4_require([_LT_TAG_COMPILER])dnl 4942AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4943m4_if([$1], [CXX], [ 4944 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4945 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4946 case $host_os in 4947 aix[[4-9]]*) 4948 # If we're using GNU nm, then we don't want the "-C" option. 4949 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4950 # Without the "-l" option, or with the "-B" option, AIX nm treats 4951 # weak defined symbols like other global defined symbols, whereas 4952 # GNU nm marks them as "W". 4953 # While the 'weak' keyword is ignored in the Export File, we need 4954 # it in the Import File for the 'aix-soname' feature, so we have 4955 # to replace the "-B" option with "-P" for AIX nm. 4956 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4957 _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' 4958 else 4959 _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' 4960 fi 4961 ;; 4962 pw32*) 4963 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4964 ;; 4965 cygwin* | mingw* | cegcc*) 4966 case $cc_basename in 4967 cl* | icl*) 4968 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4969 ;; 4970 *) 4971 _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' 4972 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4973 ;; 4974 esac 4975 ;; 4976 *) 4977 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4978 ;; 4979 esac 4980], [ 4981 runpath_var= 4982 _LT_TAGVAR(allow_undefined_flag, $1)= 4983 _LT_TAGVAR(always_export_symbols, $1)=no 4984 _LT_TAGVAR(archive_cmds, $1)= 4985 _LT_TAGVAR(archive_expsym_cmds, $1)= 4986 _LT_TAGVAR(compiler_needs_object, $1)=no 4987 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4988 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4989 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4990 _LT_TAGVAR(hardcode_automatic, $1)=no 4991 _LT_TAGVAR(hardcode_direct, $1)=no 4992 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4994 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4995 _LT_TAGVAR(hardcode_minus_L, $1)=no 4996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4997 _LT_TAGVAR(inherit_rpath, $1)=no 4998 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4999 _LT_TAGVAR(module_cmds, $1)= 5000 _LT_TAGVAR(module_expsym_cmds, $1)= 5001 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5002 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5003 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5004 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5005 # include_expsyms should be a list of space-separated symbols to be *always* 5006 # included in the symbol list 5007 _LT_TAGVAR(include_expsyms, $1)= 5008 # exclude_expsyms can be an extended regexp of symbols to exclude 5009 # it will be wrapped by ' (' and ')$', so one must not match beginning or 5010 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5011 # as well as any symbol that contains 'd'. 5012 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5013 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5014 # platforms (ab)use it in PIC code, but their linkers get confused if 5015 # the symbol is explicitly referenced. Since portable code cannot 5016 # rely on this symbol name, it's probably fine to never include it in 5017 # preloaded symbol tables. 5018 # Exclude shared library initialization/finalization symbols. 5019dnl Note also adjust exclude_expsyms for C++ above. 5020 extract_expsyms_cmds= 5021 5022 case $host_os in 5023 cygwin* | mingw* | pw32* | cegcc*) 5024 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5025 # When not using gcc, we currently assume that we are using 5026 # Microsoft Visual C++ or Intel C++ Compiler. 5027 if test yes != "$GCC"; then 5028 with_gnu_ld=no 5029 fi 5030 ;; 5031 interix*) 5032 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5033 with_gnu_ld=yes 5034 ;; 5035 openbsd* | bitrig*) 5036 with_gnu_ld=no 5037 ;; 5038 esac 5039 5040 _LT_TAGVAR(ld_shlibs, $1)=yes 5041 5042 # On some targets, GNU ld is compatible enough with the native linker 5043 # that we're better off using the native interface for both. 5044 lt_use_gnu_ld_interface=no 5045 if test yes = "$with_gnu_ld"; then 5046 case $host_os in 5047 aix*) 5048 # The AIX port of GNU ld has always aspired to compatibility 5049 # with the native linker. However, as the warning in the GNU ld 5050 # block says, versions before 2.19.5* couldn't really create working 5051 # shared libraries, regardless of the interface used. 5052 case `$LD -v 2>&1` in 5053 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5054 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5055 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5056 *) 5057 lt_use_gnu_ld_interface=yes 5058 ;; 5059 esac 5060 ;; 5061 *) 5062 lt_use_gnu_ld_interface=yes 5063 ;; 5064 esac 5065 fi 5066 5067 if test yes = "$lt_use_gnu_ld_interface"; then 5068 # If archive_cmds runs LD, not CC, wlarc should be empty 5069 wlarc='$wl' 5070 5071 # Set some defaults for GNU ld with shared library support. These 5072 # are reset later if shared libraries are not supported. Putting them 5073 # here allows them to be overridden if necessary. 5074 runpath_var=LD_RUN_PATH 5075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5076 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5077 # ancient GNU ld didn't support --whole-archive et. al. 5078 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5079 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5080 else 5081 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5082 fi 5083 supports_anon_versioning=no 5084 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5085 *GNU\ gold*) supports_anon_versioning=yes ;; 5086 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5087 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5088 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5089 *\ 2.11.*) ;; # other 2.11 versions 5090 *) supports_anon_versioning=yes ;; 5091 esac 5092 5093 # See if GNU ld supports shared libraries. 5094 case $host_os in 5095 aix[[3-9]]*) 5096 # On AIX/PPC, the GNU linker is very broken 5097 if test ia64 != "$host_cpu"; then 5098 _LT_TAGVAR(ld_shlibs, $1)=no 5099 cat <<_LT_EOF 1>&2 5100 5101*** Warning: the GNU linker, at least up to release 2.19, is reported 5102*** to be unable to reliably create shared libraries on AIX. 5103*** Therefore, libtool is disabling shared libraries support. If you 5104*** really care for shared libraries, you may want to install binutils 5105*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5106*** You will then need to restart the configuration process. 5107 5108_LT_EOF 5109 fi 5110 ;; 5111 5112 amigaos*) 5113 case $host_cpu in 5114 powerpc) 5115 # see comment about AmigaOS4 .so support 5116 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5117 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5118 ;; 5119 m68k) 5120 _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)' 5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5122 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5123 ;; 5124 esac 5125 ;; 5126 5127 beos*) 5128 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5129 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5130 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5131 # support --undefined. This deserves some investigation. FIXME 5132 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5133 else 5134 _LT_TAGVAR(ld_shlibs, $1)=no 5135 fi 5136 ;; 5137 5138 cygwin* | mingw* | pw32* | cegcc*) 5139 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5140 # as there is no search path for DLLs. 5141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5142 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5143 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144 _LT_TAGVAR(always_export_symbols, $1)=no 5145 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5146 _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' 5147 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5148 5149 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5150 _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' 5151 # If the export-symbols file already is a .def file, use it as 5152 # is; otherwise, prepend EXPORTS... 5153 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5154 cp $export_symbols $output_objdir/$soname.def; 5155 else 5156 echo EXPORTS > $output_objdir/$soname.def; 5157 cat $export_symbols >> $output_objdir/$soname.def; 5158 fi~ 5159 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5160 else 5161 _LT_TAGVAR(ld_shlibs, $1)=no 5162 fi 5163 ;; 5164 5165 haiku*) 5166 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5167 _LT_TAGVAR(link_all_deplibs, $1)=yes 5168 ;; 5169 5170 os2*) 5171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5172 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5173 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5174 shrext_cmds=.dll 5175 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5176 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5177 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5178 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5179 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5180 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5181 emximp -o $lib $output_objdir/$libname.def' 5182 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5183 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5184 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5185 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5186 prefix_cmds="$SED"~ 5187 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5188 prefix_cmds="$prefix_cmds -e 1d"; 5189 fi~ 5190 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5191 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5192 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5193 emximp -o $lib $output_objdir/$libname.def' 5194 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5195 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5196 _LT_TAGVAR(file_list_spec, $1)='@' 5197 ;; 5198 5199 interix[[3-9]]*) 5200 _LT_TAGVAR(hardcode_direct, $1)=no 5201 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5202 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5203 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5204 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5205 # Instead, shared libraries are loaded at an image base (0x10000000 by 5206 # default) and relocated if they conflict, which is a slow very memory 5207 # consuming and fragmenting process. To avoid this, we pick a random, 5208 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5209 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5210 _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' 5211 _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' 5212 ;; 5213 5214 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5215 tmp_diet=no 5216 if test linux-dietlibc = "$host_os"; then 5217 case $cc_basename in 5218 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5219 esac 5220 fi 5221 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5222 && test no = "$tmp_diet" 5223 then 5224 tmp_addflag=' $pic_flag' 5225 tmp_sharedflag='-shared' 5226 case $cc_basename,$host_cpu in 5227 pgcc*) # Portland Group C compiler 5228 _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' 5229 tmp_addflag=' $pic_flag' 5230 ;; 5231 pgf77* | pgf90* | pgf95* | pgfortran*) 5232 # Portland Group f77 and f90 compilers 5233 _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' 5234 tmp_addflag=' $pic_flag -Mnomain' ;; 5235 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5236 tmp_addflag=' -i_dynamic' ;; 5237 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5238 tmp_addflag=' -i_dynamic -nofor_main' ;; 5239 ifc* | ifort*) # Intel Fortran compiler 5240 tmp_addflag=' -nofor_main' ;; 5241 lf95*) # Lahey Fortran 8.1 5242 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5243 tmp_sharedflag='--shared' ;; 5244 nagfor*) # NAGFOR 5.3 5245 tmp_sharedflag='-Wl,-shared' ;; 5246 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5247 tmp_sharedflag='-qmkshrobj' 5248 tmp_addflag= ;; 5249 nvcc*) # Cuda Compiler Driver 2.2 5250 _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' 5251 _LT_TAGVAR(compiler_needs_object, $1)=yes 5252 ;; 5253 esac 5254 case `$CC -V 2>&1 | $SED 5q` in 5255 *Sun\ C*) # Sun C 5.9 5256 _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' 5257 _LT_TAGVAR(compiler_needs_object, $1)=yes 5258 tmp_sharedflag='-G' ;; 5259 *Sun\ F*) # Sun Fortran 8.3 5260 tmp_sharedflag='-G' ;; 5261 esac 5262 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5263 5264 if test yes = "$supports_anon_versioning"; then 5265 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5266 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5267 echo "local: *; };" >> $output_objdir/$libname.ver~ 5268 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5269 fi 5270 5271 case $cc_basename in 5272 tcc*) 5273 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5274 ;; 5275 xlf* | bgf* | bgxlf* | mpixlf*) 5276 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5277 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5279 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5280 if test yes = "$supports_anon_versioning"; then 5281 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5282 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5283 echo "local: *; };" >> $output_objdir/$libname.ver~ 5284 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5285 fi 5286 ;; 5287 esac 5288 else 5289 _LT_TAGVAR(ld_shlibs, $1)=no 5290 fi 5291 ;; 5292 5293 netbsd*) 5294 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5295 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5296 wlarc= 5297 else 5298 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5299 _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' 5300 fi 5301 ;; 5302 5303 solaris*) 5304 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5305 _LT_TAGVAR(ld_shlibs, $1)=no 5306 cat <<_LT_EOF 1>&2 5307 5308*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5309*** create shared libraries on Solaris systems. Therefore, libtool 5310*** is disabling shared libraries support. We urge you to upgrade GNU 5311*** binutils to release 2.9.1 or newer. Another option is to modify 5312*** your PATH or compiler configuration so that the native linker is 5313*** used, and then restart. 5314 5315_LT_EOF 5316 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5317 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5318 _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' 5319 else 5320 _LT_TAGVAR(ld_shlibs, $1)=no 5321 fi 5322 ;; 5323 5324 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5325 case `$LD -v 2>&1` in 5326 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5327 _LT_TAGVAR(ld_shlibs, $1)=no 5328 cat <<_LT_EOF 1>&2 5329 5330*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5331*** reliably create shared libraries on SCO systems. Therefore, libtool 5332*** is disabling shared libraries support. We urge you to upgrade GNU 5333*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5334*** your PATH or compiler configuration so that the native linker is 5335*** used, and then restart. 5336 5337_LT_EOF 5338 ;; 5339 *) 5340 # For security reasons, it is highly recommended that you always 5341 # use absolute paths for naming shared libraries, and exclude the 5342 # DT_RUNPATH tag from executables and libraries. But doing so 5343 # requires that you compile everything twice, which is a pain. 5344 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5345 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5347 _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' 5348 else 5349 _LT_TAGVAR(ld_shlibs, $1)=no 5350 fi 5351 ;; 5352 esac 5353 ;; 5354 5355 sunos4*) 5356 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5357 wlarc= 5358 _LT_TAGVAR(hardcode_direct, $1)=yes 5359 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5360 ;; 5361 5362 *) 5363 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5364 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5365 _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' 5366 else 5367 _LT_TAGVAR(ld_shlibs, $1)=no 5368 fi 5369 ;; 5370 esac 5371 5372 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5373 runpath_var= 5374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5375 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5376 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5377 fi 5378 else 5379 # PORTME fill in a description of your system's linker (not GNU ld) 5380 case $host_os in 5381 aix3*) 5382 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5383 _LT_TAGVAR(always_export_symbols, $1)=yes 5384 _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' 5385 # Note: this linker hardcodes the directories in LIBPATH if there 5386 # are no directories specified by -L. 5387 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5388 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5389 # Neither direct hardcoding nor static linking is supported with a 5390 # broken collect2. 5391 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5392 fi 5393 ;; 5394 5395 aix[[4-9]]*) 5396 if test ia64 = "$host_cpu"; then 5397 # On IA64, the linker does run time linking by default, so we don't 5398 # have to do anything special. 5399 aix_use_runtimelinking=no 5400 exp_sym_flag='-Bexport' 5401 no_entry_flag= 5402 else 5403 # If we're using GNU nm, then we don't want the "-C" option. 5404 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5405 # Without the "-l" option, or with the "-B" option, AIX nm treats 5406 # weak defined symbols like other global defined symbols, whereas 5407 # GNU nm marks them as "W". 5408 # While the 'weak' keyword is ignored in the Export File, we need 5409 # it in the Import File for the 'aix-soname' feature, so we have 5410 # to replace the "-B" option with "-P" for AIX nm. 5411 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5412 _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' 5413 else 5414 _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' 5415 fi 5416 aix_use_runtimelinking=no 5417 5418 # Test if we are trying to use run time linking or normal 5419 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5420 # have runtime linking enabled, and use it for executables. 5421 # For shared libraries, we enable/disable runtime linking 5422 # depending on the kind of the shared library created - 5423 # when "with_aix_soname,aix_use_runtimelinking" is: 5424 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5425 # "aix,yes" lib.so shared, rtl:yes, for executables 5426 # lib.a static archive 5427 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5428 # lib.a(lib.so.V) shared, rtl:no, for executables 5429 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5430 # lib.a(lib.so.V) shared, rtl:no 5431 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5432 # lib.a static archive 5433 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5434 for ld_flag in $LDFLAGS; do 5435 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5436 aix_use_runtimelinking=yes 5437 break 5438 fi 5439 done 5440 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5441 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5442 # so we don't have lib.a shared libs to link our executables. 5443 # We have to force runtime linking in this case. 5444 aix_use_runtimelinking=yes 5445 LDFLAGS="$LDFLAGS -Wl,-brtl" 5446 fi 5447 ;; 5448 esac 5449 5450 exp_sym_flag='-bexport' 5451 no_entry_flag='-bnoentry' 5452 fi 5453 5454 # When large executables or shared objects are built, AIX ld can 5455 # have problems creating the table of contents. If linking a library 5456 # or program results in "error TOC overflow" add -mminimal-toc to 5457 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5458 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5459 5460 _LT_TAGVAR(archive_cmds, $1)='' 5461 _LT_TAGVAR(hardcode_direct, $1)=yes 5462 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5463 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5464 _LT_TAGVAR(link_all_deplibs, $1)=yes 5465 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5466 case $with_aix_soname,$aix_use_runtimelinking in 5467 aix,*) ;; # traditional, no import file 5468 svr4,* | *,yes) # use import file 5469 # The Import File defines what to hardcode. 5470 _LT_TAGVAR(hardcode_direct, $1)=no 5471 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5472 ;; 5473 esac 5474 5475 if test yes = "$GCC"; then 5476 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5477 # We only want to do this on AIX 4.2 and lower, the check 5478 # below for broken collect2 doesn't work under 4.3+ 5479 collect2name=`$CC -print-prog-name=collect2` 5480 if test -f "$collect2name" && 5481 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5482 then 5483 # We have reworked collect2 5484 : 5485 else 5486 # We have old collect2 5487 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5488 # It fails to find uninstalled libraries when the uninstalled 5489 # path is not listed in the libpath. Setting hardcode_minus_L 5490 # to unsupported forces relinking 5491 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5493 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5494 fi 5495 ;; 5496 esac 5497 shared_flag='-shared' 5498 if test yes = "$aix_use_runtimelinking"; then 5499 shared_flag="$shared_flag "'$wl-G' 5500 fi 5501 # Need to ensure runtime linking is disabled for the traditional 5502 # shared library, or the linker may eventually find shared libraries 5503 # /with/ Import File - we do not want to mix them. 5504 shared_flag_aix='-shared' 5505 shared_flag_svr4='-shared $wl-G' 5506 else 5507 # not using gcc 5508 if test ia64 = "$host_cpu"; then 5509 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5510 # chokes on -Wl,-G. The following line is correct: 5511 shared_flag='-G' 5512 else 5513 if test yes = "$aix_use_runtimelinking"; then 5514 shared_flag='$wl-G' 5515 else 5516 shared_flag='$wl-bM:SRE' 5517 fi 5518 shared_flag_aix='$wl-bM:SRE' 5519 shared_flag_svr4='$wl-G' 5520 fi 5521 fi 5522 5523 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5524 # It seems that -bexpall does not export symbols beginning with 5525 # underscore (_), so it is better to generate a list of symbols to export. 5526 _LT_TAGVAR(always_export_symbols, $1)=yes 5527 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5528 # Warning - without using the other runtime loading flags (-brtl), 5529 # -berok will link without error, but may produce a broken library. 5530 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5531 # Determine the default libpath from the value encoded in an 5532 # empty executable. 5533 _LT_SYS_MODULE_PATH_AIX([$1]) 5534 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5535 _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 5536 else 5537 if test ia64 = "$host_cpu"; then 5538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5539 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5540 _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" 5541 else 5542 # Determine the default libpath from the value encoded in an 5543 # empty executable. 5544 _LT_SYS_MODULE_PATH_AIX([$1]) 5545 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5546 # Warning - without using the other run time loading flags, 5547 # -berok will link without error, but may produce a broken library. 5548 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5549 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5550 if test yes = "$with_gnu_ld"; then 5551 # We only use this code for GNU lds that support --whole-archive. 5552 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5553 else 5554 # Exported symbols can be pulled into shared objects from archives 5555 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5556 fi 5557 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5558 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5559 # -brtl affects multiple linker settings, -berok does not and is overridden later 5560 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5561 if test svr4 != "$with_aix_soname"; then 5562 # This is similar to how AIX traditionally builds its shared libraries. 5563 _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' 5564 fi 5565 if test aix != "$with_aix_soname"; then 5566 _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' 5567 else 5568 # used by -dlpreopen to get the symbols 5569 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5570 fi 5571 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5572 fi 5573 fi 5574 ;; 5575 5576 amigaos*) 5577 case $host_cpu in 5578 powerpc) 5579 # see comment about AmigaOS4 .so support 5580 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5581 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5582 ;; 5583 m68k) 5584 _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)' 5585 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5586 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5587 ;; 5588 esac 5589 ;; 5590 5591 bsdi[[45]]*) 5592 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5593 ;; 5594 5595 cygwin* | mingw* | pw32* | cegcc*) 5596 # When not using gcc, we currently assume that we are using 5597 # Microsoft Visual C++ or Intel C++ Compiler. 5598 # hardcode_libdir_flag_spec is actually meaningless, as there is 5599 # no search path for DLLs. 5600 case $cc_basename in 5601 cl* | icl*) 5602 # Native MSVC or ICC 5603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5604 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5605 _LT_TAGVAR(always_export_symbols, $1)=yes 5606 _LT_TAGVAR(file_list_spec, $1)='@' 5607 # Tell ltmain to make .lib files, not .a files. 5608 libext=lib 5609 # Tell ltmain to make .dll files, not .so files. 5610 shrext_cmds=.dll 5611 # FIXME: Setting linknames here is a bad hack. 5612 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5613 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5614 cp "$export_symbols" "$output_objdir/$soname.def"; 5615 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5616 else 5617 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5618 fi~ 5619 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5620 linknames=' 5621 # The linker will not automatically build a static lib if we build a DLL. 5622 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5623 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5624 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5625 _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' 5626 # Don't use ranlib 5627 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5628 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5629 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5630 case $lt_outputfile in 5631 *.exe|*.EXE) ;; 5632 *) 5633 lt_outputfile=$lt_outputfile.exe 5634 lt_tool_outputfile=$lt_tool_outputfile.exe 5635 ;; 5636 esac~ 5637 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5638 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5639 $RM "$lt_outputfile.manifest"; 5640 fi' 5641 ;; 5642 *) 5643 # Assume MSVC and ICC wrapper 5644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5645 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5646 # Tell ltmain to make .lib files, not .a files. 5647 libext=lib 5648 # Tell ltmain to make .dll files, not .so files. 5649 shrext_cmds=.dll 5650 # FIXME: Setting linknames here is a bad hack. 5651 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5652 # The linker will automatically build a .lib file if we build a DLL. 5653 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5654 # FIXME: Should let the user specify the lib program. 5655 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5656 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5657 ;; 5658 esac 5659 ;; 5660 5661 darwin* | rhapsody*) 5662 _LT_DARWIN_LINKER_FEATURES($1) 5663 ;; 5664 5665 dgux*) 5666 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5668 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5669 ;; 5670 5671 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5672 # support. Future versions do this automatically, but an explicit c++rt0.o 5673 # does not break anything, and helps significantly (at the cost of a little 5674 # extra space). 5675 freebsd2.2*) 5676 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5678 _LT_TAGVAR(hardcode_direct, $1)=yes 5679 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5680 ;; 5681 5682 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5683 freebsd2.*) 5684 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5685 _LT_TAGVAR(hardcode_direct, $1)=yes 5686 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5687 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5688 ;; 5689 5690 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5691 freebsd* | dragonfly* | midnightbsd*) 5692 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5694 _LT_TAGVAR(hardcode_direct, $1)=yes 5695 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5696 ;; 5697 5698 hpux9*) 5699 if test yes = "$GCC"; then 5700 _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' 5701 else 5702 _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' 5703 fi 5704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5705 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5706 _LT_TAGVAR(hardcode_direct, $1)=yes 5707 5708 # hardcode_minus_L: Not really in the search PATH, 5709 # but as the default location of the library. 5710 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5711 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5712 ;; 5713 5714 hpux10*) 5715 if test yes,no = "$GCC,$with_gnu_ld"; then 5716 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5717 else 5718 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5719 fi 5720 if test no = "$with_gnu_ld"; then 5721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5722 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5723 _LT_TAGVAR(hardcode_direct, $1)=yes 5724 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5725 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5726 # hardcode_minus_L: Not really in the search PATH, 5727 # but as the default location of the library. 5728 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5729 fi 5730 ;; 5731 5732 hpux11*) 5733 if test yes,no = "$GCC,$with_gnu_ld"; then 5734 case $host_cpu in 5735 hppa*64*) 5736 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5737 ;; 5738 ia64*) 5739 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5740 ;; 5741 *) 5742 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5743 ;; 5744 esac 5745 else 5746 case $host_cpu in 5747 hppa*64*) 5748 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5749 ;; 5750 ia64*) 5751 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5752 ;; 5753 *) 5754 m4_if($1, [], [ 5755 # Older versions of the 11.00 compiler do not understand -b yet 5756 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5757 _LT_LINKER_OPTION([if $CC understands -b], 5758 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5759 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5760 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5761 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5762 ;; 5763 esac 5764 fi 5765 if test no = "$with_gnu_ld"; then 5766 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5767 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5768 5769 case $host_cpu in 5770 hppa*64*|ia64*) 5771 _LT_TAGVAR(hardcode_direct, $1)=no 5772 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5773 ;; 5774 *) 5775 _LT_TAGVAR(hardcode_direct, $1)=yes 5776 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5777 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5778 5779 # hardcode_minus_L: Not really in the search PATH, 5780 # but as the default location of the library. 5781 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5782 ;; 5783 esac 5784 fi 5785 ;; 5786 5787 irix5* | irix6* | nonstopux*) 5788 if test yes = "$GCC"; then 5789 _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' 5790 # Try to use the -exported_symbol ld option, if it does not 5791 # work, assume that -exports_file does not work either and 5792 # implicitly export all symbols. 5793 # This should be the same for all languages, so no per-tag cache variable. 5794 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5795 [lt_cv_irix_exported_symbol], 5796 [save_LDFLAGS=$LDFLAGS 5797 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5798 AC_LINK_IFELSE( 5799 [AC_LANG_SOURCE( 5800 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5801 [C++], [[int foo (void) { return 0; }]], 5802 [Fortran 77], [[ 5803 subroutine foo 5804 end]], 5805 [Fortran], [[ 5806 subroutine foo 5807 end]])])], 5808 [lt_cv_irix_exported_symbol=yes], 5809 [lt_cv_irix_exported_symbol=no]) 5810 LDFLAGS=$save_LDFLAGS]) 5811 if test yes = "$lt_cv_irix_exported_symbol"; then 5812 _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' 5813 fi 5814 else 5815 _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' 5816 _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' 5817 fi 5818 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5820 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5821 _LT_TAGVAR(inherit_rpath, $1)=yes 5822 _LT_TAGVAR(link_all_deplibs, $1)=yes 5823 ;; 5824 5825 linux*) 5826 case $cc_basename in 5827 tcc*) 5828 # Fabrice Bellard et al's Tiny C Compiler 5829 _LT_TAGVAR(ld_shlibs, $1)=yes 5830 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5831 ;; 5832 esac 5833 ;; 5834 5835 netbsd*) 5836 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5837 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5838 else 5839 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5840 fi 5841 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5842 _LT_TAGVAR(hardcode_direct, $1)=yes 5843 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5844 ;; 5845 5846 newsos6) 5847 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5848 _LT_TAGVAR(hardcode_direct, $1)=yes 5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5850 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5851 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5852 ;; 5853 5854 *nto* | *qnx*) 5855 ;; 5856 5857 openbsd* | bitrig*) 5858 if test -f /usr/libexec/ld.so; then 5859 _LT_TAGVAR(hardcode_direct, $1)=yes 5860 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5861 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5862 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5863 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5864 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5866 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5867 else 5868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5870 fi 5871 else 5872 _LT_TAGVAR(ld_shlibs, $1)=no 5873 fi 5874 ;; 5875 5876 os2*) 5877 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5878 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5879 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5880 shrext_cmds=.dll 5881 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5882 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5883 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5884 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5885 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5886 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5887 emximp -o $lib $output_objdir/$libname.def' 5888 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5889 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5890 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5891 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5892 prefix_cmds="$SED"~ 5893 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5894 prefix_cmds="$prefix_cmds -e 1d"; 5895 fi~ 5896 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5897 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5898 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5899 emximp -o $lib $output_objdir/$libname.def' 5900 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5901 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5902 _LT_TAGVAR(file_list_spec, $1)='@' 5903 ;; 5904 5905 osf3*) 5906 if test yes = "$GCC"; then 5907 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5908 _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' 5909 else 5910 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5911 _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' 5912 fi 5913 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5915 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5916 ;; 5917 5918 osf4* | osf5*) # as osf3* with the addition of -msym flag 5919 if test yes = "$GCC"; then 5920 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5921 _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' 5922 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5923 else 5924 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5925 _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' 5926 _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~ 5927 $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' 5928 5929 # Both c and cxx compiler support -rpath directly 5930 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5931 fi 5932 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5933 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5934 ;; 5935 5936 solaris*) 5937 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5938 if test yes = "$GCC"; then 5939 wlarc='$wl' 5940 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5941 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5942 $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' 5943 else 5944 case `$CC -V 2>&1` in 5945 *"Compilers 5.0"*) 5946 wlarc='' 5947 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5948 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5949 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5950 ;; 5951 *) 5952 wlarc='$wl' 5953 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5954 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5955 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5956 ;; 5957 esac 5958 fi 5959 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5960 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5961 case $host_os in 5962 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5963 *) 5964 # The compiler driver will combine and reorder linker options, 5965 # but understands '-z linker_flag'. GCC discards it without '$wl', 5966 # but is careful enough not to reorder. 5967 # Supported since Solaris 2.6 (maybe 2.5.1?) 5968 if test yes = "$GCC"; then 5969 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5970 else 5971 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5972 fi 5973 ;; 5974 esac 5975 _LT_TAGVAR(link_all_deplibs, $1)=yes 5976 ;; 5977 5978 sunos4*) 5979 if test sequent = "$host_vendor"; then 5980 # Use $CC to link under sequent, because it throws in some extra .o 5981 # files that make .init and .fini sections work. 5982 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5983 else 5984 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5985 fi 5986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5987 _LT_TAGVAR(hardcode_direct, $1)=yes 5988 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5989 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5990 ;; 5991 5992 sysv4) 5993 case $host_vendor in 5994 sni) 5995 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5996 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5997 ;; 5998 siemens) 5999 ## LD is ld it makes a PLAMLIB 6000 ## CC just makes a GrossModule. 6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6002 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6003 _LT_TAGVAR(hardcode_direct, $1)=no 6004 ;; 6005 motorola) 6006 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6007 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6008 ;; 6009 esac 6010 runpath_var='LD_RUN_PATH' 6011 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012 ;; 6013 6014 sysv4.3*) 6015 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6016 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6018 ;; 6019 6020 sysv4*MP*) 6021 if test -d /usr/nec; then 6022 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6023 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6024 runpath_var=LD_RUN_PATH 6025 hardcode_runpath_var=yes 6026 _LT_TAGVAR(ld_shlibs, $1)=yes 6027 fi 6028 ;; 6029 6030 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6032 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6033 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6034 runpath_var='LD_RUN_PATH' 6035 6036 if test yes = "$GCC"; then 6037 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6038 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6039 else 6040 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6041 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6042 fi 6043 ;; 6044 6045 sysv5* | sco3.2v5* | sco5v6*) 6046 # Note: We CANNOT use -z defs as we might desire, because we do not 6047 # link with -lc, and that would cause any symbols used from libc to 6048 # always be unresolved, which means just about no library would 6049 # ever link correctly. If we're not using GNU ld we use -z text 6050 # though, which does catch some bad symbols but isn't as heavy-handed 6051 # as -z defs. 6052 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6053 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6054 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6055 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6057 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6058 _LT_TAGVAR(link_all_deplibs, $1)=yes 6059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6060 runpath_var='LD_RUN_PATH' 6061 6062 if test yes = "$GCC"; then 6063 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6064 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6065 else 6066 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6067 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6068 fi 6069 ;; 6070 6071 uts4*) 6072 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6073 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6074 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6075 ;; 6076 6077 *) 6078 _LT_TAGVAR(ld_shlibs, $1)=no 6079 ;; 6080 esac 6081 6082 if test sni = "$host_vendor"; then 6083 case $host in 6084 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6085 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6086 ;; 6087 esac 6088 fi 6089 fi 6090]) 6091AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6092test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6093 6094_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6095 6096_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6097_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6098_LT_DECL([], [extract_expsyms_cmds], [2], 6099 [The commands to extract the exported symbol list from a shared archive]) 6100 6101# 6102# Do we need to explicitly link libc? 6103# 6104case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6105x|xyes) 6106 # Assume -lc should be added 6107 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6108 6109 if test yes,yes = "$GCC,$enable_shared"; then 6110 case $_LT_TAGVAR(archive_cmds, $1) in 6111 *'~'*) 6112 # FIXME: we may have to deal with multi-command sequences. 6113 ;; 6114 '$CC '*) 6115 # Test whether the compiler implicitly links with -lc since on some 6116 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6117 # to ld, don't add -lc before -lgcc. 6118 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6119 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6120 [$RM conftest* 6121 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6122 6123 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6124 soname=conftest 6125 lib=conftest 6126 libobjs=conftest.$ac_objext 6127 deplibs= 6128 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6129 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6130 compiler_flags=-v 6131 linker_flags=-v 6132 verstring= 6133 output_objdir=. 6134 libname=conftest 6135 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6136 _LT_TAGVAR(allow_undefined_flag, $1)= 6137 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6138 then 6139 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6140 else 6141 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6142 fi 6143 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6144 else 6145 cat conftest.err 1>&5 6146 fi 6147 $RM conftest* 6148 ]) 6149 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6150 ;; 6151 esac 6152 fi 6153 ;; 6154esac 6155 6156_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6157 [Whether or not to add -lc for building shared libraries]) 6158_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6159 [enable_shared_with_static_runtimes], [0], 6160 [Whether or not to disallow shared libs when runtime libs are static]) 6161_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6162 [Compiler flag to allow reflexive dlopens]) 6163_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6164 [Compiler flag to generate shared objects directly from archives]) 6165_LT_TAGDECL([], [compiler_needs_object], [1], 6166 [Whether the compiler copes with passing no objects directly]) 6167_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6168 [Create an old-style archive from a shared archive]) 6169_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6170 [Create a temporary old-style archive to link instead of a shared archive]) 6171_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6172_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6173_LT_TAGDECL([], [module_cmds], [2], 6174 [Commands used to build a loadable module if different from building 6175 a shared archive.]) 6176_LT_TAGDECL([], [module_expsym_cmds], [2]) 6177_LT_TAGDECL([], [with_gnu_ld], [1], 6178 [Whether we are building with GNU ld or not]) 6179_LT_TAGDECL([], [allow_undefined_flag], [1], 6180 [Flag that allows shared libraries with undefined symbols to be built]) 6181_LT_TAGDECL([], [no_undefined_flag], [1], 6182 [Flag that enforces no undefined symbols]) 6183_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6184 [Flag to hardcode $libdir into a binary during linking. 6185 This must work even if $libdir does not exist]) 6186_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6187 [Whether we need a single "-rpath" flag with a separated argument]) 6188_LT_TAGDECL([], [hardcode_direct], [0], 6189 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6190 DIR into the resulting binary]) 6191_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6192 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6193 DIR into the resulting binary and the resulting library dependency is 6194 "absolute", i.e impossible to change by setting $shlibpath_var if the 6195 library is relocated]) 6196_LT_TAGDECL([], [hardcode_minus_L], [0], 6197 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6198 into the resulting binary]) 6199_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6200 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6201 into the resulting binary]) 6202_LT_TAGDECL([], [hardcode_automatic], [0], 6203 [Set to "yes" if building a shared library automatically hardcodes DIR 6204 into the library and all subsequent libraries and executables linked 6205 against it]) 6206_LT_TAGDECL([], [inherit_rpath], [0], 6207 [Set to yes if linker adds runtime paths of dependent libraries 6208 to runtime path list]) 6209_LT_TAGDECL([], [link_all_deplibs], [0], 6210 [Whether libtool must link a program against all its dependency libraries]) 6211_LT_TAGDECL([], [always_export_symbols], [0], 6212 [Set to "yes" if exported symbols are required]) 6213_LT_TAGDECL([], [export_symbols_cmds], [2], 6214 [The commands to list exported symbols]) 6215_LT_TAGDECL([], [exclude_expsyms], [1], 6216 [Symbols that should not be listed in the preloaded symbols]) 6217_LT_TAGDECL([], [include_expsyms], [1], 6218 [Symbols that must always be exported]) 6219_LT_TAGDECL([], [prelink_cmds], [2], 6220 [Commands necessary for linking programs (against libraries) with templates]) 6221_LT_TAGDECL([], [postlink_cmds], [2], 6222 [Commands necessary for finishing linking programs]) 6223_LT_TAGDECL([], [file_list_spec], [1], 6224 [Specify filename containing input files]) 6225dnl FIXME: Not yet implemented 6226dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6227dnl [Compiler flag to generate thread safe objects]) 6228])# _LT_LINKER_SHLIBS 6229 6230 6231# _LT_LANG_C_CONFIG([TAG]) 6232# ------------------------ 6233# Ensure that the configuration variables for a C compiler are suitably 6234# defined. These variables are subsequently used by _LT_CONFIG to write 6235# the compiler configuration to 'libtool'. 6236m4_defun([_LT_LANG_C_CONFIG], 6237[m4_require([_LT_DECL_EGREP])dnl 6238lt_save_CC=$CC 6239AC_LANG_PUSH(C) 6240 6241# Source file extension for C test sources. 6242ac_ext=c 6243 6244# Object file extension for compiled C test sources. 6245objext=o 6246_LT_TAGVAR(objext, $1)=$objext 6247 6248# Code to be used in simple compile tests 6249lt_simple_compile_test_code="int some_variable = 0;" 6250 6251# Code to be used in simple link tests 6252lt_simple_link_test_code='int main(){return(0);}' 6253 6254_LT_TAG_COMPILER 6255# Save the default compiler, since it gets overwritten when the other 6256# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6257compiler_DEFAULT=$CC 6258 6259# save warnings/boilerplate of simple test code 6260_LT_COMPILER_BOILERPLATE 6261_LT_LINKER_BOILERPLATE 6262 6263if test -n "$compiler"; then 6264 _LT_COMPILER_NO_RTTI($1) 6265 _LT_COMPILER_PIC($1) 6266 _LT_COMPILER_C_O($1) 6267 _LT_COMPILER_FILE_LOCKS($1) 6268 _LT_LINKER_SHLIBS($1) 6269 _LT_SYS_DYNAMIC_LINKER($1) 6270 _LT_LINKER_HARDCODE_LIBPATH($1) 6271 LT_SYS_DLOPEN_SELF 6272 _LT_CMD_STRIPLIB 6273 6274 # Report what library types will actually be built 6275 AC_MSG_CHECKING([if libtool supports shared libraries]) 6276 AC_MSG_RESULT([$can_build_shared]) 6277 6278 AC_MSG_CHECKING([whether to build shared libraries]) 6279 test no = "$can_build_shared" && enable_shared=no 6280 6281 # On AIX, shared libraries and static libraries use the same namespace, and 6282 # are all built from PIC. 6283 case $host_os in 6284 aix3*) 6285 test yes = "$enable_shared" && enable_static=no 6286 if test -n "$RANLIB"; then 6287 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6288 postinstall_cmds='$RANLIB $lib' 6289 fi 6290 ;; 6291 6292 aix[[4-9]]*) 6293 if test ia64 != "$host_cpu"; then 6294 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6295 yes,aix,yes) ;; # shared object as lib.so file only 6296 yes,svr4,*) ;; # shared object as lib.so archive member only 6297 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6298 esac 6299 fi 6300 ;; 6301 esac 6302 AC_MSG_RESULT([$enable_shared]) 6303 6304 AC_MSG_CHECKING([whether to build static libraries]) 6305 # Make sure either enable_shared or enable_static is yes. 6306 test yes = "$enable_shared" || enable_static=yes 6307 AC_MSG_RESULT([$enable_static]) 6308 6309 _LT_CONFIG($1) 6310fi 6311AC_LANG_POP 6312CC=$lt_save_CC 6313])# _LT_LANG_C_CONFIG 6314 6315 6316# _LT_LANG_CXX_CONFIG([TAG]) 6317# -------------------------- 6318# Ensure that the configuration variables for a C++ compiler are suitably 6319# defined. These variables are subsequently used by _LT_CONFIG to write 6320# the compiler configuration to 'libtool'. 6321m4_defun([_LT_LANG_CXX_CONFIG], 6322[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6323m4_require([_LT_DECL_EGREP])dnl 6324m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6325if test -n "$CXX" && ( test no != "$CXX" && 6326 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6327 (test g++ != "$CXX"))); then 6328 AC_PROG_CXXCPP 6329else 6330 _lt_caught_CXX_error=yes 6331fi 6332 6333AC_LANG_PUSH(C++) 6334_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6335_LT_TAGVAR(allow_undefined_flag, $1)= 6336_LT_TAGVAR(always_export_symbols, $1)=no 6337_LT_TAGVAR(archive_expsym_cmds, $1)= 6338_LT_TAGVAR(compiler_needs_object, $1)=no 6339_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6340_LT_TAGVAR(hardcode_direct, $1)=no 6341_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6342_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6343_LT_TAGVAR(hardcode_libdir_separator, $1)= 6344_LT_TAGVAR(hardcode_minus_L, $1)=no 6345_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6346_LT_TAGVAR(hardcode_automatic, $1)=no 6347_LT_TAGVAR(inherit_rpath, $1)=no 6348_LT_TAGVAR(module_cmds, $1)= 6349_LT_TAGVAR(module_expsym_cmds, $1)= 6350_LT_TAGVAR(link_all_deplibs, $1)=unknown 6351_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6352_LT_TAGVAR(reload_flag, $1)=$reload_flag 6353_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6354_LT_TAGVAR(no_undefined_flag, $1)= 6355_LT_TAGVAR(whole_archive_flag_spec, $1)= 6356_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6357 6358# Source file extension for C++ test sources. 6359ac_ext=cpp 6360 6361# Object file extension for compiled C++ test sources. 6362objext=o 6363_LT_TAGVAR(objext, $1)=$objext 6364 6365# No sense in running all these tests if we already determined that 6366# the CXX compiler isn't working. Some variables (like enable_shared) 6367# are currently assumed to apply to all compilers on this platform, 6368# and will be corrupted by setting them based on a non-working compiler. 6369if test yes != "$_lt_caught_CXX_error"; then 6370 # Code to be used in simple compile tests 6371 lt_simple_compile_test_code="int some_variable = 0;" 6372 6373 # Code to be used in simple link tests 6374 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6375 6376 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6377 _LT_TAG_COMPILER 6378 6379 # save warnings/boilerplate of simple test code 6380 _LT_COMPILER_BOILERPLATE 6381 _LT_LINKER_BOILERPLATE 6382 6383 # Allow CC to be a program name with arguments. 6384 lt_save_CC=$CC 6385 lt_save_CFLAGS=$CFLAGS 6386 lt_save_LD=$LD 6387 lt_save_GCC=$GCC 6388 GCC=$GXX 6389 lt_save_with_gnu_ld=$with_gnu_ld 6390 lt_save_path_LD=$lt_cv_path_LD 6391 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6392 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6393 else 6394 $as_unset lt_cv_prog_gnu_ld 6395 fi 6396 if test -n "${lt_cv_path_LDCXX+set}"; then 6397 lt_cv_path_LD=$lt_cv_path_LDCXX 6398 else 6399 $as_unset lt_cv_path_LD 6400 fi 6401 test -z "${LDCXX+set}" || LD=$LDCXX 6402 CC=${CXX-"c++"} 6403 CFLAGS=$CXXFLAGS 6404 compiler=$CC 6405 _LT_TAGVAR(compiler, $1)=$CC 6406 _LT_CC_BASENAME([$compiler]) 6407 6408 if test -n "$compiler"; then 6409 # We don't want -fno-exception when compiling C++ code, so set the 6410 # no_builtin_flag separately 6411 if test yes = "$GXX"; then 6412 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6413 else 6414 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6415 fi 6416 6417 if test yes = "$GXX"; then 6418 # Set up default GNU C++ configuration 6419 6420 LT_PATH_LD 6421 6422 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6423 # archiving commands below assume that GNU ld is being used. 6424 if test yes = "$with_gnu_ld"; then 6425 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6426 _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' 6427 6428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6429 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6430 6431 # If archive_cmds runs LD, not CC, wlarc should be empty 6432 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6433 # investigate it a little bit more. (MM) 6434 wlarc='$wl' 6435 6436 # ancient GNU ld didn't support --whole-archive et. al. 6437 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6438 $GREP 'no-whole-archive' > /dev/null; then 6439 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6440 else 6441 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6442 fi 6443 else 6444 with_gnu_ld=no 6445 wlarc= 6446 6447 # A generic and very simple default shared library creation 6448 # command for GNU C++ for the case where it uses the native 6449 # linker, instead of GNU ld. If possible, this setting should 6450 # overridden to take advantage of the native linker features on 6451 # the platform it is being used on. 6452 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6453 fi 6454 6455 # Commands to make compiler produce verbose output that lists 6456 # what "hidden" libraries, object files and flags are used when 6457 # linking a shared library. 6458 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6459 6460 else 6461 GXX=no 6462 with_gnu_ld=no 6463 wlarc= 6464 fi 6465 6466 # PORTME: fill in a description of your system's C++ link characteristics 6467 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6468 _LT_TAGVAR(ld_shlibs, $1)=yes 6469 case $host_os in 6470 aix3*) 6471 # FIXME: insert proper C++ library support 6472 _LT_TAGVAR(ld_shlibs, $1)=no 6473 ;; 6474 aix[[4-9]]*) 6475 if test ia64 = "$host_cpu"; then 6476 # On IA64, the linker does run time linking by default, so we don't 6477 # have to do anything special. 6478 aix_use_runtimelinking=no 6479 exp_sym_flag='-Bexport' 6480 no_entry_flag= 6481 else 6482 aix_use_runtimelinking=no 6483 6484 # Test if we are trying to use run time linking or normal 6485 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6486 # have runtime linking enabled, and use it for executables. 6487 # For shared libraries, we enable/disable runtime linking 6488 # depending on the kind of the shared library created - 6489 # when "with_aix_soname,aix_use_runtimelinking" is: 6490 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6491 # "aix,yes" lib.so shared, rtl:yes, for executables 6492 # lib.a static archive 6493 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6494 # lib.a(lib.so.V) shared, rtl:no, for executables 6495 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6496 # lib.a(lib.so.V) shared, rtl:no 6497 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6498 # lib.a static archive 6499 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6500 for ld_flag in $LDFLAGS; do 6501 case $ld_flag in 6502 *-brtl*) 6503 aix_use_runtimelinking=yes 6504 break 6505 ;; 6506 esac 6507 done 6508 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6509 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6510 # so we don't have lib.a shared libs to link our executables. 6511 # We have to force runtime linking in this case. 6512 aix_use_runtimelinking=yes 6513 LDFLAGS="$LDFLAGS -Wl,-brtl" 6514 fi 6515 ;; 6516 esac 6517 6518 exp_sym_flag='-bexport' 6519 no_entry_flag='-bnoentry' 6520 fi 6521 6522 # When large executables or shared objects are built, AIX ld can 6523 # have problems creating the table of contents. If linking a library 6524 # or program results in "error TOC overflow" add -mminimal-toc to 6525 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6526 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6527 6528 _LT_TAGVAR(archive_cmds, $1)='' 6529 _LT_TAGVAR(hardcode_direct, $1)=yes 6530 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6531 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6532 _LT_TAGVAR(link_all_deplibs, $1)=yes 6533 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6534 case $with_aix_soname,$aix_use_runtimelinking in 6535 aix,*) ;; # no import file 6536 svr4,* | *,yes) # use import file 6537 # The Import File defines what to hardcode. 6538 _LT_TAGVAR(hardcode_direct, $1)=no 6539 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6540 ;; 6541 esac 6542 6543 if test yes = "$GXX"; then 6544 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6545 # We only want to do this on AIX 4.2 and lower, the check 6546 # below for broken collect2 doesn't work under 4.3+ 6547 collect2name=`$CC -print-prog-name=collect2` 6548 if test -f "$collect2name" && 6549 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6550 then 6551 # We have reworked collect2 6552 : 6553 else 6554 # We have old collect2 6555 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6556 # It fails to find uninstalled libraries when the uninstalled 6557 # path is not listed in the libpath. Setting hardcode_minus_L 6558 # to unsupported forces relinking 6559 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6561 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6562 fi 6563 esac 6564 shared_flag='-shared' 6565 if test yes = "$aix_use_runtimelinking"; then 6566 shared_flag=$shared_flag' $wl-G' 6567 fi 6568 # Need to ensure runtime linking is disabled for the traditional 6569 # shared library, or the linker may eventually find shared libraries 6570 # /with/ Import File - we do not want to mix them. 6571 shared_flag_aix='-shared' 6572 shared_flag_svr4='-shared $wl-G' 6573 else 6574 # not using gcc 6575 if test ia64 = "$host_cpu"; then 6576 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6577 # chokes on -Wl,-G. The following line is correct: 6578 shared_flag='-G' 6579 else 6580 if test yes = "$aix_use_runtimelinking"; then 6581 shared_flag='$wl-G' 6582 else 6583 shared_flag='$wl-bM:SRE' 6584 fi 6585 shared_flag_aix='$wl-bM:SRE' 6586 shared_flag_svr4='$wl-G' 6587 fi 6588 fi 6589 6590 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6591 # It seems that -bexpall does not export symbols beginning with 6592 # underscore (_), so it is better to generate a list of symbols to 6593 # export. 6594 _LT_TAGVAR(always_export_symbols, $1)=yes 6595 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6596 # Warning - without using the other runtime loading flags (-brtl), 6597 # -berok will link without error, but may produce a broken library. 6598 # The "-G" linker flag allows undefined symbols. 6599 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6600 # Determine the default libpath from the value encoded in an empty 6601 # executable. 6602 _LT_SYS_MODULE_PATH_AIX([$1]) 6603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604 6605 _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 6606 else 6607 if test ia64 = "$host_cpu"; then 6608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6609 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6610 _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" 6611 else 6612 # Determine the default libpath from the value encoded in an 6613 # empty executable. 6614 _LT_SYS_MODULE_PATH_AIX([$1]) 6615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6616 # Warning - without using the other run time loading flags, 6617 # -berok will link without error, but may produce a broken library. 6618 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6619 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6620 if test yes = "$with_gnu_ld"; then 6621 # We only use this code for GNU lds that support --whole-archive. 6622 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6623 else 6624 # Exported symbols can be pulled into shared objects from archives 6625 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6626 fi 6627 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6628 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6629 # -brtl affects multiple linker settings, -berok does not and is overridden later 6630 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6631 if test svr4 != "$with_aix_soname"; then 6632 # This is similar to how AIX traditionally builds its shared 6633 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6634 _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' 6635 fi 6636 if test aix != "$with_aix_soname"; then 6637 _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' 6638 else 6639 # used by -dlpreopen to get the symbols 6640 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6641 fi 6642 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6643 fi 6644 fi 6645 ;; 6646 6647 beos*) 6648 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6649 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6650 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6651 # support --undefined. This deserves some investigation. FIXME 6652 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6653 else 6654 _LT_TAGVAR(ld_shlibs, $1)=no 6655 fi 6656 ;; 6657 6658 chorus*) 6659 case $cc_basename in 6660 *) 6661 # FIXME: insert proper C++ library support 6662 _LT_TAGVAR(ld_shlibs, $1)=no 6663 ;; 6664 esac 6665 ;; 6666 6667 cygwin* | mingw* | pw32* | cegcc*) 6668 case $GXX,$cc_basename in 6669 ,cl* | no,cl* | ,icl* | no,icl*) 6670 # Native MSVC or ICC 6671 # hardcode_libdir_flag_spec is actually meaningless, as there is 6672 # no search path for DLLs. 6673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6674 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6675 _LT_TAGVAR(always_export_symbols, $1)=yes 6676 _LT_TAGVAR(file_list_spec, $1)='@' 6677 # Tell ltmain to make .lib files, not .a files. 6678 libext=lib 6679 # Tell ltmain to make .dll files, not .so files. 6680 shrext_cmds=.dll 6681 # FIXME: Setting linknames here is a bad hack. 6682 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6683 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6684 cp "$export_symbols" "$output_objdir/$soname.def"; 6685 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6686 else 6687 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6688 fi~ 6689 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6690 linknames=' 6691 # The linker will not automatically build a static lib if we build a DLL. 6692 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6693 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6694 # Don't use ranlib 6695 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6696 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6697 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6698 case $lt_outputfile in 6699 *.exe|*.EXE) ;; 6700 *) 6701 lt_outputfile=$lt_outputfile.exe 6702 lt_tool_outputfile=$lt_tool_outputfile.exe 6703 ;; 6704 esac~ 6705 func_to_tool_file "$lt_outputfile"~ 6706 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6707 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6708 $RM "$lt_outputfile.manifest"; 6709 fi' 6710 ;; 6711 *) 6712 # g++ 6713 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6714 # as there is no search path for DLLs. 6715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6716 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6717 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6718 _LT_TAGVAR(always_export_symbols, $1)=no 6719 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6720 6721 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6722 _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' 6723 # If the export-symbols file already is a .def file, use it as 6724 # is; otherwise, prepend EXPORTS... 6725 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6726 cp $export_symbols $output_objdir/$soname.def; 6727 else 6728 echo EXPORTS > $output_objdir/$soname.def; 6729 cat $export_symbols >> $output_objdir/$soname.def; 6730 fi~ 6731 $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' 6732 else 6733 _LT_TAGVAR(ld_shlibs, $1)=no 6734 fi 6735 ;; 6736 esac 6737 ;; 6738 darwin* | rhapsody*) 6739 _LT_DARWIN_LINKER_FEATURES($1) 6740 ;; 6741 6742 os2*) 6743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6744 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6745 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6746 shrext_cmds=.dll 6747 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6748 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6749 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6750 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6751 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6752 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6753 emximp -o $lib $output_objdir/$libname.def' 6754 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6755 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6756 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6757 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6758 prefix_cmds="$SED"~ 6759 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6760 prefix_cmds="$prefix_cmds -e 1d"; 6761 fi~ 6762 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6763 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6764 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6765 emximp -o $lib $output_objdir/$libname.def' 6766 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6767 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6768 _LT_TAGVAR(file_list_spec, $1)='@' 6769 ;; 6770 6771 dgux*) 6772 case $cc_basename in 6773 ec++*) 6774 # FIXME: insert proper C++ library support 6775 _LT_TAGVAR(ld_shlibs, $1)=no 6776 ;; 6777 ghcx*) 6778 # Green Hills C++ Compiler 6779 # FIXME: insert proper C++ library support 6780 _LT_TAGVAR(ld_shlibs, $1)=no 6781 ;; 6782 *) 6783 # FIXME: insert proper C++ library support 6784 _LT_TAGVAR(ld_shlibs, $1)=no 6785 ;; 6786 esac 6787 ;; 6788 6789 freebsd2.*) 6790 # C++ shared libraries reported to be fairly broken before 6791 # switch to ELF 6792 _LT_TAGVAR(ld_shlibs, $1)=no 6793 ;; 6794 6795 freebsd-elf*) 6796 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6797 ;; 6798 6799 freebsd* | dragonfly* | midnightbsd*) 6800 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6801 # conventions 6802 _LT_TAGVAR(ld_shlibs, $1)=yes 6803 ;; 6804 6805 haiku*) 6806 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6807 _LT_TAGVAR(link_all_deplibs, $1)=yes 6808 ;; 6809 6810 hpux9*) 6811 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6812 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6813 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6814 _LT_TAGVAR(hardcode_direct, $1)=yes 6815 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6816 # but as the default 6817 # location of the library. 6818 6819 case $cc_basename in 6820 CC*) 6821 # FIXME: insert proper C++ library support 6822 _LT_TAGVAR(ld_shlibs, $1)=no 6823 ;; 6824 aCC*) 6825 _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' 6826 # Commands to make compiler produce verbose output that lists 6827 # what "hidden" libraries, object files and flags are used when 6828 # linking a shared library. 6829 # 6830 # There doesn't appear to be a way to prevent this compiler from 6831 # explicitly linking system object files so we need to strip them 6832 # from the output so that they don't get included in the library 6833 # dependencies. 6834 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"' 6835 ;; 6836 *) 6837 if test yes = "$GXX"; then 6838 _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' 6839 else 6840 # FIXME: insert proper C++ library support 6841 _LT_TAGVAR(ld_shlibs, $1)=no 6842 fi 6843 ;; 6844 esac 6845 ;; 6846 6847 hpux10*|hpux11*) 6848 if test no = "$with_gnu_ld"; then 6849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6850 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6851 6852 case $host_cpu in 6853 hppa*64*|ia64*) 6854 ;; 6855 *) 6856 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6857 ;; 6858 esac 6859 fi 6860 case $host_cpu in 6861 hppa*64*|ia64*) 6862 _LT_TAGVAR(hardcode_direct, $1)=no 6863 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6864 ;; 6865 *) 6866 _LT_TAGVAR(hardcode_direct, $1)=yes 6867 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6868 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6869 # but as the default 6870 # location of the library. 6871 ;; 6872 esac 6873 6874 case $cc_basename in 6875 CC*) 6876 # FIXME: insert proper C++ library support 6877 _LT_TAGVAR(ld_shlibs, $1)=no 6878 ;; 6879 aCC*) 6880 case $host_cpu in 6881 hppa*64*) 6882 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6883 ;; 6884 ia64*) 6885 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6886 ;; 6887 *) 6888 _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' 6889 ;; 6890 esac 6891 # Commands to make compiler produce verbose output that lists 6892 # what "hidden" libraries, object files and flags are used when 6893 # linking a shared library. 6894 # 6895 # There doesn't appear to be a way to prevent this compiler from 6896 # explicitly linking system object files so we need to strip them 6897 # from the output so that they don't get included in the library 6898 # dependencies. 6899 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"' 6900 ;; 6901 *) 6902 if test yes = "$GXX"; then 6903 if test no = "$with_gnu_ld"; then 6904 case $host_cpu in 6905 hppa*64*) 6906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6907 ;; 6908 ia64*) 6909 _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' 6910 ;; 6911 *) 6912 _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' 6913 ;; 6914 esac 6915 fi 6916 else 6917 # FIXME: insert proper C++ library support 6918 _LT_TAGVAR(ld_shlibs, $1)=no 6919 fi 6920 ;; 6921 esac 6922 ;; 6923 6924 interix[[3-9]]*) 6925 _LT_TAGVAR(hardcode_direct, $1)=no 6926 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6927 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6928 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6929 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6930 # Instead, shared libraries are loaded at an image base (0x10000000 by 6931 # default) and relocated if they conflict, which is a slow very memory 6932 # consuming and fragmenting process. To avoid this, we pick a random, 6933 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6934 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6935 _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' 6936 _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' 6937 ;; 6938 irix5* | irix6*) 6939 case $cc_basename in 6940 CC*) 6941 # SGI C++ 6942 _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' 6943 6944 # Archives containing C++ object files must be created using 6945 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6946 # necessary to make sure instantiated templates are included 6947 # in the archive. 6948 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6949 ;; 6950 *) 6951 if test yes = "$GXX"; then 6952 if test no = "$with_gnu_ld"; then 6953 _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' 6954 else 6955 _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' 6956 fi 6957 fi 6958 _LT_TAGVAR(link_all_deplibs, $1)=yes 6959 ;; 6960 esac 6961 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6962 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6963 _LT_TAGVAR(inherit_rpath, $1)=yes 6964 ;; 6965 6966 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6967 case $cc_basename in 6968 KCC*) 6969 # Kuck and Associates, Inc. (KAI) C++ Compiler 6970 6971 # KCC will only create a shared library if the output file 6972 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6973 # to its proper name (with version) after linking. 6974 _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' 6975 _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' 6976 # Commands to make compiler produce verbose output that lists 6977 # what "hidden" libraries, object files and flags are used when 6978 # linking a shared library. 6979 # 6980 # There doesn't appear to be a way to prevent this compiler from 6981 # explicitly linking system object files so we need to strip them 6982 # from the output so that they don't get included in the library 6983 # dependencies. 6984 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"' 6985 6986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6987 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6988 6989 # Archives containing C++ object files must be created using 6990 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6991 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6992 ;; 6993 icpc* | ecpc* ) 6994 # Intel C++ 6995 with_gnu_ld=yes 6996 # version 8.0 and above of icpc choke on multiply defined symbols 6997 # if we add $predep_objects and $postdep_objects, however 7.1 and 6998 # earlier do not add the objects themselves. 6999 case `$CC -V 2>&1` in 7000 *"Version 7."*) 7001 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7002 _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' 7003 ;; 7004 *) # Version 8.0 or newer 7005 tmp_idyn= 7006 case $host_cpu in 7007 ia64*) tmp_idyn=' -i_dynamic';; 7008 esac 7009 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7010 _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' 7011 ;; 7012 esac 7013 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7014 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7015 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7016 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7017 ;; 7018 pgCC* | pgcpp*) 7019 # Portland Group C++ compiler 7020 case `$CC -V` in 7021 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7022 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7023 rm -rf $tpldir~ 7024 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7025 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7026 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7027 rm -rf $tpldir~ 7028 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7029 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7030 $RANLIB $oldlib' 7031 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7032 rm -rf $tpldir~ 7033 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7034 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7035 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7036 rm -rf $tpldir~ 7037 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7038 $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' 7039 ;; 7040 *) # Version 6 and above use weak symbols 7041 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7042 _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' 7043 ;; 7044 esac 7045 7046 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7048 _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' 7049 ;; 7050 cxx*) 7051 # Compaq C++ 7052 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7053 _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' 7054 7055 runpath_var=LD_RUN_PATH 7056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7057 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7058 7059 # Commands to make compiler produce verbose output that lists 7060 # what "hidden" libraries, object files and flags are used when 7061 # linking a shared library. 7062 # 7063 # There doesn't appear to be a way to prevent this compiler from 7064 # explicitly linking system object files so we need to strip them 7065 # from the output so that they don't get included in the library 7066 # dependencies. 7067 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' 7068 ;; 7069 xl* | mpixl* | bgxl*) 7070 # IBM XL 8.0 on PPC, with GNU ld 7071 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7072 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7073 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7074 if test yes = "$supports_anon_versioning"; then 7075 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7076 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7077 echo "local: *; };" >> $output_objdir/$libname.ver~ 7078 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7079 fi 7080 ;; 7081 *) 7082 case `$CC -V 2>&1 | $SED 5q` in 7083 *Sun\ C*) 7084 # Sun C++ 5.9 7085 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7086 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7087 _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' 7088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7089 _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' 7090 _LT_TAGVAR(compiler_needs_object, $1)=yes 7091 7092 # Not sure whether something based on 7093 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7094 # would be better. 7095 output_verbose_link_cmd='func_echo_all' 7096 7097 # Archives containing C++ object files must be created using 7098 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7099 # necessary to make sure instantiated templates are included 7100 # in the archive. 7101 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7102 ;; 7103 esac 7104 ;; 7105 esac 7106 ;; 7107 7108 lynxos*) 7109 # FIXME: insert proper C++ library support 7110 _LT_TAGVAR(ld_shlibs, $1)=no 7111 ;; 7112 7113 m88k*) 7114 # FIXME: insert proper C++ library support 7115 _LT_TAGVAR(ld_shlibs, $1)=no 7116 ;; 7117 7118 mvs*) 7119 case $cc_basename in 7120 cxx*) 7121 # FIXME: insert proper C++ library support 7122 _LT_TAGVAR(ld_shlibs, $1)=no 7123 ;; 7124 *) 7125 # FIXME: insert proper C++ library support 7126 _LT_TAGVAR(ld_shlibs, $1)=no 7127 ;; 7128 esac 7129 ;; 7130 7131 netbsd*) 7132 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7133 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7134 wlarc= 7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7136 _LT_TAGVAR(hardcode_direct, $1)=yes 7137 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138 fi 7139 # Workaround some broken pre-1.5 toolchains 7140 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7141 ;; 7142 7143 *nto* | *qnx*) 7144 _LT_TAGVAR(ld_shlibs, $1)=yes 7145 ;; 7146 7147 openbsd* | bitrig*) 7148 if test -f /usr/libexec/ld.so; then 7149 _LT_TAGVAR(hardcode_direct, $1)=yes 7150 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7151 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7152 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7153 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7154 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7155 _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' 7156 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7157 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7158 fi 7159 output_verbose_link_cmd=func_echo_all 7160 else 7161 _LT_TAGVAR(ld_shlibs, $1)=no 7162 fi 7163 ;; 7164 7165 osf3* | osf4* | osf5*) 7166 case $cc_basename in 7167 KCC*) 7168 # Kuck and Associates, Inc. (KAI) C++ Compiler 7169 7170 # KCC will only create a shared library if the output file 7171 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7172 # to its proper name (with version) after linking. 7173 _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' 7174 7175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7176 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7177 7178 # Archives containing C++ object files must be created using 7179 # the KAI C++ compiler. 7180 case $host in 7181 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7182 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7183 esac 7184 ;; 7185 RCC*) 7186 # Rational C++ 2.4.1 7187 # FIXME: insert proper C++ library support 7188 _LT_TAGVAR(ld_shlibs, $1)=no 7189 ;; 7190 cxx*) 7191 case $host in 7192 osf3*) 7193 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7194 _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' 7195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7196 ;; 7197 *) 7198 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7199 _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' 7200 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7201 echo "-hidden">> $lib.exp~ 7202 $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~ 7203 $RM $lib.exp' 7204 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7205 ;; 7206 esac 7207 7208 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7209 7210 # Commands to make compiler produce verbose output that lists 7211 # what "hidden" libraries, object files and flags are used when 7212 # linking a shared library. 7213 # 7214 # There doesn't appear to be a way to prevent this compiler from 7215 # explicitly linking system object files so we need to strip them 7216 # from the output so that they don't get included in the library 7217 # dependencies. 7218 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"' 7219 ;; 7220 *) 7221 if test yes,no = "$GXX,$with_gnu_ld"; then 7222 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7223 case $host in 7224 osf3*) 7225 _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' 7226 ;; 7227 *) 7228 _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' 7229 ;; 7230 esac 7231 7232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7233 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7234 7235 # Commands to make compiler produce verbose output that lists 7236 # what "hidden" libraries, object files and flags are used when 7237 # linking a shared library. 7238 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7239 7240 else 7241 # FIXME: insert proper C++ library support 7242 _LT_TAGVAR(ld_shlibs, $1)=no 7243 fi 7244 ;; 7245 esac 7246 ;; 7247 7248 psos*) 7249 # FIXME: insert proper C++ library support 7250 _LT_TAGVAR(ld_shlibs, $1)=no 7251 ;; 7252 7253 sunos4*) 7254 case $cc_basename in 7255 CC*) 7256 # Sun C++ 4.x 7257 # FIXME: insert proper C++ library support 7258 _LT_TAGVAR(ld_shlibs, $1)=no 7259 ;; 7260 lcc*) 7261 # Lucid 7262 # FIXME: insert proper C++ library support 7263 _LT_TAGVAR(ld_shlibs, $1)=no 7264 ;; 7265 *) 7266 # FIXME: insert proper C++ library support 7267 _LT_TAGVAR(ld_shlibs, $1)=no 7268 ;; 7269 esac 7270 ;; 7271 7272 solaris*) 7273 case $cc_basename in 7274 CC* | sunCC*) 7275 # Sun C++ 4.2, 5.x and Centerline C++ 7276 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7277 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7278 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7279 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7280 $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' 7281 7282 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7283 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7284 case $host_os in 7285 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7286 *) 7287 # The compiler driver will combine and reorder linker options, 7288 # but understands '-z linker_flag'. 7289 # Supported since Solaris 2.6 (maybe 2.5.1?) 7290 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7291 ;; 7292 esac 7293 _LT_TAGVAR(link_all_deplibs, $1)=yes 7294 7295 output_verbose_link_cmd='func_echo_all' 7296 7297 # Archives containing C++ object files must be created using 7298 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7299 # necessary to make sure instantiated templates are included 7300 # in the archive. 7301 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7302 ;; 7303 gcx*) 7304 # Green Hills C++ Compiler 7305 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7306 7307 # The C++ compiler must be used to create the archive. 7308 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7309 ;; 7310 *) 7311 # GNU C++ compiler with Solaris linker 7312 if test yes,no = "$GXX,$with_gnu_ld"; then 7313 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7314 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7315 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7316 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7317 $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' 7318 7319 # Commands to make compiler produce verbose output that lists 7320 # what "hidden" libraries, object files and flags are used when 7321 # linking a shared library. 7322 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7323 else 7324 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7325 # platform. 7326 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7327 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7328 $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' 7329 7330 # Commands to make compiler produce verbose output that lists 7331 # what "hidden" libraries, object files and flags are used when 7332 # linking a shared library. 7333 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7334 fi 7335 7336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7337 case $host_os in 7338 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7339 *) 7340 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7341 ;; 7342 esac 7343 fi 7344 ;; 7345 esac 7346 ;; 7347 7348 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7349 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7350 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7351 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7352 runpath_var='LD_RUN_PATH' 7353 7354 case $cc_basename in 7355 CC*) 7356 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7357 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7358 ;; 7359 *) 7360 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7361 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7362 ;; 7363 esac 7364 ;; 7365 7366 sysv5* | sco3.2v5* | sco5v6*) 7367 # Note: We CANNOT use -z defs as we might desire, because we do not 7368 # link with -lc, and that would cause any symbols used from libc to 7369 # always be unresolved, which means just about no library would 7370 # ever link correctly. If we're not using GNU ld we use -z text 7371 # though, which does catch some bad symbols but isn't as heavy-handed 7372 # as -z defs. 7373 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7374 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7375 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7376 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7377 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7378 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7379 _LT_TAGVAR(link_all_deplibs, $1)=yes 7380 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7381 runpath_var='LD_RUN_PATH' 7382 7383 case $cc_basename in 7384 CC*) 7385 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7386 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7387 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7388 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7389 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7390 '"$_LT_TAGVAR(reload_cmds, $1)" 7391 ;; 7392 *) 7393 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7394 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7395 ;; 7396 esac 7397 ;; 7398 7399 tandem*) 7400 case $cc_basename in 7401 NCC*) 7402 # NonStop-UX NCC 3.20 7403 # FIXME: insert proper C++ library support 7404 _LT_TAGVAR(ld_shlibs, $1)=no 7405 ;; 7406 *) 7407 # FIXME: insert proper C++ library support 7408 _LT_TAGVAR(ld_shlibs, $1)=no 7409 ;; 7410 esac 7411 ;; 7412 7413 vxworks*) 7414 # FIXME: insert proper C++ library support 7415 _LT_TAGVAR(ld_shlibs, $1)=no 7416 ;; 7417 7418 *) 7419 # FIXME: insert proper C++ library support 7420 _LT_TAGVAR(ld_shlibs, $1)=no 7421 ;; 7422 esac 7423 7424 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7425 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7426 7427 _LT_TAGVAR(GCC, $1)=$GXX 7428 _LT_TAGVAR(LD, $1)=$LD 7429 7430 ## CAVEAT EMPTOR: 7431 ## There is no encapsulation within the following macros, do not change 7432 ## the running order or otherwise move them around unless you know exactly 7433 ## what you are doing... 7434 _LT_SYS_HIDDEN_LIBDEPS($1) 7435 _LT_COMPILER_PIC($1) 7436 _LT_COMPILER_C_O($1) 7437 _LT_COMPILER_FILE_LOCKS($1) 7438 _LT_LINKER_SHLIBS($1) 7439 _LT_SYS_DYNAMIC_LINKER($1) 7440 _LT_LINKER_HARDCODE_LIBPATH($1) 7441 7442 _LT_CONFIG($1) 7443 fi # test -n "$compiler" 7444 7445 CC=$lt_save_CC 7446 CFLAGS=$lt_save_CFLAGS 7447 LDCXX=$LD 7448 LD=$lt_save_LD 7449 GCC=$lt_save_GCC 7450 with_gnu_ld=$lt_save_with_gnu_ld 7451 lt_cv_path_LDCXX=$lt_cv_path_LD 7452 lt_cv_path_LD=$lt_save_path_LD 7453 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7454 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7455fi # test yes != "$_lt_caught_CXX_error" 7456 7457AC_LANG_POP 7458])# _LT_LANG_CXX_CONFIG 7459 7460 7461# _LT_FUNC_STRIPNAME_CNF 7462# ---------------------- 7463# func_stripname_cnf prefix suffix name 7464# strip PREFIX and SUFFIX off of NAME. 7465# PREFIX and SUFFIX must not contain globbing or regex special 7466# characters, hashes, percent signs, but SUFFIX may contain a leading 7467# dot (in which case that matches only a dot). 7468# 7469# This function is identical to the (non-XSI) version of func_stripname, 7470# except this one can be used by m4 code that may be executed by configure, 7471# rather than the libtool script. 7472m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7473AC_REQUIRE([_LT_DECL_SED]) 7474AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7475func_stripname_cnf () 7476{ 7477 case @S|@2 in 7478 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7479 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7480 esac 7481} # func_stripname_cnf 7482])# _LT_FUNC_STRIPNAME_CNF 7483 7484 7485# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7486# --------------------------------- 7487# Figure out "hidden" library dependencies from verbose 7488# compiler output when linking a shared library. 7489# Parse the compiler output and extract the necessary 7490# objects, libraries and library flags. 7491m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7492[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7493AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7494# Dependencies to place before and after the object being linked: 7495_LT_TAGVAR(predep_objects, $1)= 7496_LT_TAGVAR(postdep_objects, $1)= 7497_LT_TAGVAR(predeps, $1)= 7498_LT_TAGVAR(postdeps, $1)= 7499_LT_TAGVAR(compiler_lib_search_path, $1)= 7500 7501dnl we can't use the lt_simple_compile_test_code here, 7502dnl because it contains code intended for an executable, 7503dnl not a library. It's possible we should let each 7504dnl tag define a new lt_????_link_test_code variable, 7505dnl but it's only used here... 7506m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7507int a; 7508void foo (void) { a = 0; } 7509_LT_EOF 7510], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7511class Foo 7512{ 7513public: 7514 Foo (void) { a = 0; } 7515private: 7516 int a; 7517}; 7518_LT_EOF 7519], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7520 subroutine foo 7521 implicit none 7522 integer*4 a 7523 a=0 7524 return 7525 end 7526_LT_EOF 7527], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7528 subroutine foo 7529 implicit none 7530 integer a 7531 a=0 7532 return 7533 end 7534_LT_EOF 7535], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7536public class foo { 7537 private int a; 7538 public void bar (void) { 7539 a = 0; 7540 } 7541}; 7542_LT_EOF 7543], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7544package foo 7545func foo() { 7546} 7547_LT_EOF 7548]) 7549 7550_lt_libdeps_save_CFLAGS=$CFLAGS 7551case "$CC $CFLAGS " in #( 7552*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7553*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7554*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7555esac 7556 7557dnl Parse the compiler output and extract the necessary 7558dnl objects, libraries and library flags. 7559if AC_TRY_EVAL(ac_compile); then 7560 # Parse the compiler output and extract the necessary 7561 # objects, libraries and library flags. 7562 7563 # Sentinel used to keep track of whether or not we are before 7564 # the conftest object file. 7565 pre_test_object_deps_done=no 7566 7567 for p in `eval "$output_verbose_link_cmd"`; do 7568 case $prev$p in 7569 7570 -L* | -R* | -l*) 7571 # Some compilers place space between "-{L,R}" and the path. 7572 # Remove the space. 7573 if test x-L = "$p" || 7574 test x-R = "$p"; then 7575 prev=$p 7576 continue 7577 fi 7578 7579 # Expand the sysroot to ease extracting the directories later. 7580 if test -z "$prev"; then 7581 case $p in 7582 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7583 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7584 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7585 esac 7586 fi 7587 case $p in 7588 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7589 esac 7590 if test no = "$pre_test_object_deps_done"; then 7591 case $prev in 7592 -L | -R) 7593 # Internal compiler library paths should come after those 7594 # provided the user. The postdeps already come after the 7595 # user supplied libs so there is no need to process them. 7596 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7597 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7598 else 7599 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7600 fi 7601 ;; 7602 # The "-l" case would never come before the object being 7603 # linked, so don't bother handling this case. 7604 esac 7605 else 7606 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7607 _LT_TAGVAR(postdeps, $1)=$prev$p 7608 else 7609 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7610 fi 7611 fi 7612 prev= 7613 ;; 7614 7615 *.lto.$objext) ;; # Ignore GCC LTO objects 7616 *.$objext) 7617 # This assumes that the test object file only shows up 7618 # once in the compiler output. 7619 if test "$p" = "conftest.$objext"; then 7620 pre_test_object_deps_done=yes 7621 continue 7622 fi 7623 7624 if test no = "$pre_test_object_deps_done"; then 7625 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7626 _LT_TAGVAR(predep_objects, $1)=$p 7627 else 7628 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7629 fi 7630 else 7631 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7632 _LT_TAGVAR(postdep_objects, $1)=$p 7633 else 7634 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7635 fi 7636 fi 7637 ;; 7638 7639 *) ;; # Ignore the rest. 7640 7641 esac 7642 done 7643 7644 # Clean up. 7645 rm -f a.out a.exe 7646else 7647 echo "libtool.m4: error: problem compiling $1 test program" 7648fi 7649 7650$RM -f confest.$objext 7651CFLAGS=$_lt_libdeps_save_CFLAGS 7652 7653# PORTME: override above test on systems where it is broken 7654m4_if([$1], [CXX], 7655[case $host_os in 7656interix[[3-9]]*) 7657 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7658 # hack all around it, let's just trust "g++" to DTRT. 7659 _LT_TAGVAR(predep_objects,$1)= 7660 _LT_TAGVAR(postdep_objects,$1)= 7661 _LT_TAGVAR(postdeps,$1)= 7662 ;; 7663esac 7664]) 7665 7666case " $_LT_TAGVAR(postdeps, $1) " in 7667*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7668esac 7669 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7670if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7671 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7672fi 7673_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7674 [The directories searched by this compiler when creating a shared library]) 7675_LT_TAGDECL([], [predep_objects], [1], 7676 [Dependencies to place before and after the objects being linked to 7677 create a shared library]) 7678_LT_TAGDECL([], [postdep_objects], [1]) 7679_LT_TAGDECL([], [predeps], [1]) 7680_LT_TAGDECL([], [postdeps], [1]) 7681_LT_TAGDECL([], [compiler_lib_search_path], [1], 7682 [The library search path used internally by the compiler when linking 7683 a shared library]) 7684])# _LT_SYS_HIDDEN_LIBDEPS 7685 7686 7687# _LT_LANG_F77_CONFIG([TAG]) 7688# -------------------------- 7689# Ensure that the configuration variables for a Fortran 77 compiler are 7690# suitably defined. These variables are subsequently used by _LT_CONFIG 7691# to write the compiler configuration to 'libtool'. 7692m4_defun([_LT_LANG_F77_CONFIG], 7693[AC_LANG_PUSH(Fortran 77) 7694if test -z "$F77" || test no = "$F77"; then 7695 _lt_disable_F77=yes 7696fi 7697 7698_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7699_LT_TAGVAR(allow_undefined_flag, $1)= 7700_LT_TAGVAR(always_export_symbols, $1)=no 7701_LT_TAGVAR(archive_expsym_cmds, $1)= 7702_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7703_LT_TAGVAR(hardcode_direct, $1)=no 7704_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7705_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7706_LT_TAGVAR(hardcode_libdir_separator, $1)= 7707_LT_TAGVAR(hardcode_minus_L, $1)=no 7708_LT_TAGVAR(hardcode_automatic, $1)=no 7709_LT_TAGVAR(inherit_rpath, $1)=no 7710_LT_TAGVAR(module_cmds, $1)= 7711_LT_TAGVAR(module_expsym_cmds, $1)= 7712_LT_TAGVAR(link_all_deplibs, $1)=unknown 7713_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7714_LT_TAGVAR(reload_flag, $1)=$reload_flag 7715_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7716_LT_TAGVAR(no_undefined_flag, $1)= 7717_LT_TAGVAR(whole_archive_flag_spec, $1)= 7718_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7719 7720# Source file extension for f77 test sources. 7721ac_ext=f 7722 7723# Object file extension for compiled f77 test sources. 7724objext=o 7725_LT_TAGVAR(objext, $1)=$objext 7726 7727# No sense in running all these tests if we already determined that 7728# the F77 compiler isn't working. Some variables (like enable_shared) 7729# are currently assumed to apply to all compilers on this platform, 7730# and will be corrupted by setting them based on a non-working compiler. 7731if test yes != "$_lt_disable_F77"; then 7732 # Code to be used in simple compile tests 7733 lt_simple_compile_test_code="\ 7734 subroutine t 7735 return 7736 end 7737" 7738 7739 # Code to be used in simple link tests 7740 lt_simple_link_test_code="\ 7741 program t 7742 end 7743" 7744 7745 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7746 _LT_TAG_COMPILER 7747 7748 # save warnings/boilerplate of simple test code 7749 _LT_COMPILER_BOILERPLATE 7750 _LT_LINKER_BOILERPLATE 7751 7752 # Allow CC to be a program name with arguments. 7753 lt_save_CC=$CC 7754 lt_save_GCC=$GCC 7755 lt_save_CFLAGS=$CFLAGS 7756 CC=${F77-"f77"} 7757 CFLAGS=$FFLAGS 7758 compiler=$CC 7759 _LT_TAGVAR(compiler, $1)=$CC 7760 _LT_CC_BASENAME([$compiler]) 7761 GCC=$G77 7762 if test -n "$compiler"; then 7763 AC_MSG_CHECKING([if libtool supports shared libraries]) 7764 AC_MSG_RESULT([$can_build_shared]) 7765 7766 AC_MSG_CHECKING([whether to build shared libraries]) 7767 test no = "$can_build_shared" && enable_shared=no 7768 7769 # On AIX, shared libraries and static libraries use the same namespace, and 7770 # are all built from PIC. 7771 case $host_os in 7772 aix3*) 7773 test yes = "$enable_shared" && enable_static=no 7774 if test -n "$RANLIB"; then 7775 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7776 postinstall_cmds='$RANLIB $lib' 7777 fi 7778 ;; 7779 aix[[4-9]]*) 7780 if test ia64 != "$host_cpu"; then 7781 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7782 yes,aix,yes) ;; # shared object as lib.so file only 7783 yes,svr4,*) ;; # shared object as lib.so archive member only 7784 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7785 esac 7786 fi 7787 ;; 7788 esac 7789 AC_MSG_RESULT([$enable_shared]) 7790 7791 AC_MSG_CHECKING([whether to build static libraries]) 7792 # Make sure either enable_shared or enable_static is yes. 7793 test yes = "$enable_shared" || enable_static=yes 7794 AC_MSG_RESULT([$enable_static]) 7795 7796 _LT_TAGVAR(GCC, $1)=$G77 7797 _LT_TAGVAR(LD, $1)=$LD 7798 7799 ## CAVEAT EMPTOR: 7800 ## There is no encapsulation within the following macros, do not change 7801 ## the running order or otherwise move them around unless you know exactly 7802 ## what you are doing... 7803 _LT_COMPILER_PIC($1) 7804 _LT_COMPILER_C_O($1) 7805 _LT_COMPILER_FILE_LOCKS($1) 7806 _LT_LINKER_SHLIBS($1) 7807 _LT_SYS_DYNAMIC_LINKER($1) 7808 _LT_LINKER_HARDCODE_LIBPATH($1) 7809 7810 _LT_CONFIG($1) 7811 fi # test -n "$compiler" 7812 7813 GCC=$lt_save_GCC 7814 CC=$lt_save_CC 7815 CFLAGS=$lt_save_CFLAGS 7816fi # test yes != "$_lt_disable_F77" 7817 7818AC_LANG_POP 7819])# _LT_LANG_F77_CONFIG 7820 7821 7822# _LT_LANG_FC_CONFIG([TAG]) 7823# ------------------------- 7824# Ensure that the configuration variables for a Fortran compiler are 7825# suitably defined. These variables are subsequently used by _LT_CONFIG 7826# to write the compiler configuration to 'libtool'. 7827m4_defun([_LT_LANG_FC_CONFIG], 7828[AC_LANG_PUSH(Fortran) 7829 7830if test -z "$FC" || test no = "$FC"; then 7831 _lt_disable_FC=yes 7832fi 7833 7834_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7835_LT_TAGVAR(allow_undefined_flag, $1)= 7836_LT_TAGVAR(always_export_symbols, $1)=no 7837_LT_TAGVAR(archive_expsym_cmds, $1)= 7838_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7839_LT_TAGVAR(hardcode_direct, $1)=no 7840_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7841_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7842_LT_TAGVAR(hardcode_libdir_separator, $1)= 7843_LT_TAGVAR(hardcode_minus_L, $1)=no 7844_LT_TAGVAR(hardcode_automatic, $1)=no 7845_LT_TAGVAR(inherit_rpath, $1)=no 7846_LT_TAGVAR(module_cmds, $1)= 7847_LT_TAGVAR(module_expsym_cmds, $1)= 7848_LT_TAGVAR(link_all_deplibs, $1)=unknown 7849_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7850_LT_TAGVAR(reload_flag, $1)=$reload_flag 7851_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7852_LT_TAGVAR(no_undefined_flag, $1)= 7853_LT_TAGVAR(whole_archive_flag_spec, $1)= 7854_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7855 7856# Source file extension for fc test sources. 7857ac_ext=${ac_fc_srcext-f} 7858 7859# Object file extension for compiled fc test sources. 7860objext=o 7861_LT_TAGVAR(objext, $1)=$objext 7862 7863# No sense in running all these tests if we already determined that 7864# the FC compiler isn't working. Some variables (like enable_shared) 7865# are currently assumed to apply to all compilers on this platform, 7866# and will be corrupted by setting them based on a non-working compiler. 7867if test yes != "$_lt_disable_FC"; then 7868 # Code to be used in simple compile tests 7869 lt_simple_compile_test_code="\ 7870 subroutine t 7871 return 7872 end 7873" 7874 7875 # Code to be used in simple link tests 7876 lt_simple_link_test_code="\ 7877 program t 7878 end 7879" 7880 7881 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7882 _LT_TAG_COMPILER 7883 7884 # save warnings/boilerplate of simple test code 7885 _LT_COMPILER_BOILERPLATE 7886 _LT_LINKER_BOILERPLATE 7887 7888 # Allow CC to be a program name with arguments. 7889 lt_save_CC=$CC 7890 lt_save_GCC=$GCC 7891 lt_save_CFLAGS=$CFLAGS 7892 CC=${FC-"f95"} 7893 CFLAGS=$FCFLAGS 7894 compiler=$CC 7895 GCC=$ac_cv_fc_compiler_gnu 7896 7897 _LT_TAGVAR(compiler, $1)=$CC 7898 _LT_CC_BASENAME([$compiler]) 7899 7900 if test -n "$compiler"; then 7901 AC_MSG_CHECKING([if libtool supports shared libraries]) 7902 AC_MSG_RESULT([$can_build_shared]) 7903 7904 AC_MSG_CHECKING([whether to build shared libraries]) 7905 test no = "$can_build_shared" && enable_shared=no 7906 7907 # On AIX, shared libraries and static libraries use the same namespace, and 7908 # are all built from PIC. 7909 case $host_os in 7910 aix3*) 7911 test yes = "$enable_shared" && enable_static=no 7912 if test -n "$RANLIB"; then 7913 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7914 postinstall_cmds='$RANLIB $lib' 7915 fi 7916 ;; 7917 aix[[4-9]]*) 7918 if test ia64 != "$host_cpu"; then 7919 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7920 yes,aix,yes) ;; # shared object as lib.so file only 7921 yes,svr4,*) ;; # shared object as lib.so archive member only 7922 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7923 esac 7924 fi 7925 ;; 7926 esac 7927 AC_MSG_RESULT([$enable_shared]) 7928 7929 AC_MSG_CHECKING([whether to build static libraries]) 7930 # Make sure either enable_shared or enable_static is yes. 7931 test yes = "$enable_shared" || enable_static=yes 7932 AC_MSG_RESULT([$enable_static]) 7933 7934 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7935 _LT_TAGVAR(LD, $1)=$LD 7936 7937 ## CAVEAT EMPTOR: 7938 ## There is no encapsulation within the following macros, do not change 7939 ## the running order or otherwise move them around unless you know exactly 7940 ## what you are doing... 7941 _LT_SYS_HIDDEN_LIBDEPS($1) 7942 _LT_COMPILER_PIC($1) 7943 _LT_COMPILER_C_O($1) 7944 _LT_COMPILER_FILE_LOCKS($1) 7945 _LT_LINKER_SHLIBS($1) 7946 _LT_SYS_DYNAMIC_LINKER($1) 7947 _LT_LINKER_HARDCODE_LIBPATH($1) 7948 7949 _LT_CONFIG($1) 7950 fi # test -n "$compiler" 7951 7952 GCC=$lt_save_GCC 7953 CC=$lt_save_CC 7954 CFLAGS=$lt_save_CFLAGS 7955fi # test yes != "$_lt_disable_FC" 7956 7957AC_LANG_POP 7958])# _LT_LANG_FC_CONFIG 7959 7960 7961# _LT_LANG_GCJ_CONFIG([TAG]) 7962# -------------------------- 7963# Ensure that the configuration variables for the GNU Java Compiler compiler 7964# are suitably defined. These variables are subsequently used by _LT_CONFIG 7965# to write the compiler configuration to 'libtool'. 7966m4_defun([_LT_LANG_GCJ_CONFIG], 7967[AC_REQUIRE([LT_PROG_GCJ])dnl 7968AC_LANG_SAVE 7969 7970# Source file extension for Java test sources. 7971ac_ext=java 7972 7973# Object file extension for compiled Java test sources. 7974objext=o 7975_LT_TAGVAR(objext, $1)=$objext 7976 7977# Code to be used in simple compile tests 7978lt_simple_compile_test_code="class foo {}" 7979 7980# Code to be used in simple link tests 7981lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7982 7983# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7984_LT_TAG_COMPILER 7985 7986# save warnings/boilerplate of simple test code 7987_LT_COMPILER_BOILERPLATE 7988_LT_LINKER_BOILERPLATE 7989 7990# Allow CC to be a program name with arguments. 7991lt_save_CC=$CC 7992lt_save_CFLAGS=$CFLAGS 7993lt_save_GCC=$GCC 7994GCC=yes 7995CC=${GCJ-"gcj"} 7996CFLAGS=$GCJFLAGS 7997compiler=$CC 7998_LT_TAGVAR(compiler, $1)=$CC 7999_LT_TAGVAR(LD, $1)=$LD 8000_LT_CC_BASENAME([$compiler]) 8001 8002# GCJ did not exist at the time GCC didn't implicitly link libc in. 8003_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8004 8005_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8006_LT_TAGVAR(reload_flag, $1)=$reload_flag 8007_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8008 8009if test -n "$compiler"; then 8010 _LT_COMPILER_NO_RTTI($1) 8011 _LT_COMPILER_PIC($1) 8012 _LT_COMPILER_C_O($1) 8013 _LT_COMPILER_FILE_LOCKS($1) 8014 _LT_LINKER_SHLIBS($1) 8015 _LT_LINKER_HARDCODE_LIBPATH($1) 8016 8017 _LT_CONFIG($1) 8018fi 8019 8020AC_LANG_RESTORE 8021 8022GCC=$lt_save_GCC 8023CC=$lt_save_CC 8024CFLAGS=$lt_save_CFLAGS 8025])# _LT_LANG_GCJ_CONFIG 8026 8027 8028# _LT_LANG_GO_CONFIG([TAG]) 8029# -------------------------- 8030# Ensure that the configuration variables for the GNU Go compiler 8031# are suitably defined. These variables are subsequently used by _LT_CONFIG 8032# to write the compiler configuration to 'libtool'. 8033m4_defun([_LT_LANG_GO_CONFIG], 8034[AC_REQUIRE([LT_PROG_GO])dnl 8035AC_LANG_SAVE 8036 8037# Source file extension for Go test sources. 8038ac_ext=go 8039 8040# Object file extension for compiled Go test sources. 8041objext=o 8042_LT_TAGVAR(objext, $1)=$objext 8043 8044# Code to be used in simple compile tests 8045lt_simple_compile_test_code="package main; func main() { }" 8046 8047# Code to be used in simple link tests 8048lt_simple_link_test_code='package main; func main() { }' 8049 8050# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8051_LT_TAG_COMPILER 8052 8053# save warnings/boilerplate of simple test code 8054_LT_COMPILER_BOILERPLATE 8055_LT_LINKER_BOILERPLATE 8056 8057# Allow CC to be a program name with arguments. 8058lt_save_CC=$CC 8059lt_save_CFLAGS=$CFLAGS 8060lt_save_GCC=$GCC 8061GCC=yes 8062CC=${GOC-"gccgo"} 8063CFLAGS=$GOFLAGS 8064compiler=$CC 8065_LT_TAGVAR(compiler, $1)=$CC 8066_LT_TAGVAR(LD, $1)=$LD 8067_LT_CC_BASENAME([$compiler]) 8068 8069# Go did not exist at the time GCC didn't implicitly link libc in. 8070_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8071 8072_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8073_LT_TAGVAR(reload_flag, $1)=$reload_flag 8074_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8075 8076if test -n "$compiler"; then 8077 _LT_COMPILER_NO_RTTI($1) 8078 _LT_COMPILER_PIC($1) 8079 _LT_COMPILER_C_O($1) 8080 _LT_COMPILER_FILE_LOCKS($1) 8081 _LT_LINKER_SHLIBS($1) 8082 _LT_LINKER_HARDCODE_LIBPATH($1) 8083 8084 _LT_CONFIG($1) 8085fi 8086 8087AC_LANG_RESTORE 8088 8089GCC=$lt_save_GCC 8090CC=$lt_save_CC 8091CFLAGS=$lt_save_CFLAGS 8092])# _LT_LANG_GO_CONFIG 8093 8094 8095# _LT_LANG_RC_CONFIG([TAG]) 8096# ------------------------- 8097# Ensure that the configuration variables for the Windows resource compiler 8098# are suitably defined. These variables are subsequently used by _LT_CONFIG 8099# to write the compiler configuration to 'libtool'. 8100m4_defun([_LT_LANG_RC_CONFIG], 8101[AC_REQUIRE([LT_PROG_RC])dnl 8102AC_LANG_SAVE 8103 8104# Source file extension for RC test sources. 8105ac_ext=rc 8106 8107# Object file extension for compiled RC test sources. 8108objext=o 8109_LT_TAGVAR(objext, $1)=$objext 8110 8111# Code to be used in simple compile tests 8112lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8113 8114# Code to be used in simple link tests 8115lt_simple_link_test_code=$lt_simple_compile_test_code 8116 8117# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8118_LT_TAG_COMPILER 8119 8120# save warnings/boilerplate of simple test code 8121_LT_COMPILER_BOILERPLATE 8122_LT_LINKER_BOILERPLATE 8123 8124# Allow CC to be a program name with arguments. 8125lt_save_CC=$CC 8126lt_save_CFLAGS=$CFLAGS 8127lt_save_GCC=$GCC 8128GCC= 8129CC=${RC-"windres"} 8130CFLAGS= 8131compiler=$CC 8132_LT_TAGVAR(compiler, $1)=$CC 8133_LT_CC_BASENAME([$compiler]) 8134_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8135 8136if test -n "$compiler"; then 8137 : 8138 _LT_CONFIG($1) 8139fi 8140 8141GCC=$lt_save_GCC 8142AC_LANG_RESTORE 8143CC=$lt_save_CC 8144CFLAGS=$lt_save_CFLAGS 8145])# _LT_LANG_RC_CONFIG 8146 8147 8148# LT_PROG_GCJ 8149# ----------- 8150AC_DEFUN([LT_PROG_GCJ], 8151[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8152 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8153 [AC_CHECK_TOOL(GCJ, gcj,) 8154 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8155 AC_SUBST(GCJFLAGS)])])[]dnl 8156]) 8157 8158# Old name: 8159AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8160dnl aclocal-1.4 backwards compatibility: 8161dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8162 8163 8164# LT_PROG_GO 8165# ---------- 8166AC_DEFUN([LT_PROG_GO], 8167[AC_CHECK_TOOL(GOC, gccgo,) 8168]) 8169 8170 8171# LT_PROG_RC 8172# ---------- 8173AC_DEFUN([LT_PROG_RC], 8174[AC_CHECK_TOOL(RC, windres,) 8175]) 8176 8177# Old name: 8178AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8179dnl aclocal-1.4 backwards compatibility: 8180dnl AC_DEFUN([LT_AC_PROG_RC], []) 8181 8182 8183# _LT_DECL_EGREP 8184# -------------- 8185# If we don't have a new enough Autoconf to choose the best grep 8186# available, choose the one first in the user's PATH. 8187m4_defun([_LT_DECL_EGREP], 8188[AC_REQUIRE([AC_PROG_EGREP])dnl 8189AC_REQUIRE([AC_PROG_FGREP])dnl 8190test -z "$GREP" && GREP=grep 8191_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8192_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8193_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8194dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8195AC_SUBST([GREP]) 8196]) 8197 8198 8199# _LT_DECL_OBJDUMP 8200# -------------- 8201# If we don't have a new enough Autoconf to choose the best objdump 8202# available, choose the one first in the user's PATH. 8203m4_defun([_LT_DECL_OBJDUMP], 8204[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8205test -z "$OBJDUMP" && OBJDUMP=objdump 8206_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8207AC_SUBST([OBJDUMP]) 8208]) 8209 8210# _LT_DECL_DLLTOOL 8211# ---------------- 8212# Ensure DLLTOOL variable is set. 8213m4_defun([_LT_DECL_DLLTOOL], 8214[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8215test -z "$DLLTOOL" && DLLTOOL=dlltool 8216_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8217AC_SUBST([DLLTOOL]) 8218]) 8219 8220# _LT_DECL_FILECMD 8221# ---------------- 8222# Check for a file(cmd) program that can be used to detect file type and magic 8223m4_defun([_LT_DECL_FILECMD], 8224[AC_CHECK_TOOL([FILECMD], [file], [:]) 8225_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8226])# _LD_DECL_FILECMD 8227 8228# _LT_DECL_SED 8229# ------------ 8230# Check for a fully-functional sed program, that truncates 8231# as few characters as possible. Prefer GNU sed if found. 8232m4_defun([_LT_DECL_SED], 8233[AC_PROG_SED 8234test -z "$SED" && SED=sed 8235Xsed="$SED -e 1s/^X//" 8236_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8237_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8238 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8239])# _LT_DECL_SED 8240 8241m4_ifndef([AC_PROG_SED], [ 8242# NOTE: This macro has been submitted for inclusion into # 8243# GNU Autoconf as AC_PROG_SED. When it is available in # 8244# a released version of Autoconf we should remove this # 8245# macro and use it instead. # 8246 8247m4_defun([AC_PROG_SED], 8248[AC_MSG_CHECKING([for a sed that does not truncate output]) 8249AC_CACHE_VAL(lt_cv_path_SED, 8250[# Loop through the user's path and test for sed and gsed. 8251# Then use that list of sed's as ones to test for truncation. 8252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8253for as_dir in $PATH 8254do 8255 IFS=$as_save_IFS 8256 test -z "$as_dir" && as_dir=. 8257 for lt_ac_prog in sed gsed; do 8258 for ac_exec_ext in '' $ac_executable_extensions; do 8259 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8260 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8261 fi 8262 done 8263 done 8264done 8265IFS=$as_save_IFS 8266lt_ac_max=0 8267lt_ac_count=0 8268# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8269# along with /bin/sed that truncates output. 8270for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8271 test ! -f "$lt_ac_sed" && continue 8272 cat /dev/null > conftest.in 8273 lt_ac_count=0 8274 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8275 # Check for GNU sed and select it if it is found. 8276 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8277 lt_cv_path_SED=$lt_ac_sed 8278 break 8279 fi 8280 while true; do 8281 cat conftest.in conftest.in >conftest.tmp 8282 mv conftest.tmp conftest.in 8283 cp conftest.in conftest.nl 8284 echo >>conftest.nl 8285 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8286 cmp -s conftest.out conftest.nl || break 8287 # 10000 chars as input seems more than enough 8288 test 10 -lt "$lt_ac_count" && break 8289 lt_ac_count=`expr $lt_ac_count + 1` 8290 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8291 lt_ac_max=$lt_ac_count 8292 lt_cv_path_SED=$lt_ac_sed 8293 fi 8294 done 8295done 8296]) 8297SED=$lt_cv_path_SED 8298AC_SUBST([SED]) 8299AC_MSG_RESULT([$SED]) 8300])#AC_PROG_SED 8301])#m4_ifndef 8302 8303# Old name: 8304AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8305dnl aclocal-1.4 backwards compatibility: 8306dnl AC_DEFUN([LT_AC_PROG_SED], []) 8307 8308 8309# _LT_CHECK_SHELL_FEATURES 8310# ------------------------ 8311# Find out whether the shell is Bourne or XSI compatible, 8312# or has some other useful features. 8313m4_defun([_LT_CHECK_SHELL_FEATURES], 8314[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8315 lt_unset=unset 8316else 8317 lt_unset=false 8318fi 8319_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8320 8321# test EBCDIC or ASCII 8322case `echo X|tr X '\101'` in 8323 A) # ASCII based system 8324 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8325 lt_SP2NL='tr \040 \012' 8326 lt_NL2SP='tr \015\012 \040\040' 8327 ;; 8328 *) # EBCDIC based system 8329 lt_SP2NL='tr \100 \n' 8330 lt_NL2SP='tr \r\n \100\100' 8331 ;; 8332esac 8333_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8334_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8335])# _LT_CHECK_SHELL_FEATURES 8336 8337 8338# _LT_PATH_CONVERSION_FUNCTIONS 8339# ----------------------------- 8340# Determine what file name conversion functions should be used by 8341# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8342# for certain cross-compile configurations and native mingw. 8343m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8344[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8345AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8346AC_MSG_CHECKING([how to convert $build file names to $host format]) 8347AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8348[case $host in 8349 *-*-mingw* ) 8350 case $build in 8351 *-*-mingw* ) # actually msys 8352 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8353 ;; 8354 *-*-cygwin* ) 8355 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8356 ;; 8357 * ) # otherwise, assume *nix 8358 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8359 ;; 8360 esac 8361 ;; 8362 *-*-cygwin* ) 8363 case $build in 8364 *-*-mingw* ) # actually msys 8365 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8366 ;; 8367 *-*-cygwin* ) 8368 lt_cv_to_host_file_cmd=func_convert_file_noop 8369 ;; 8370 * ) # otherwise, assume *nix 8371 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8372 ;; 8373 esac 8374 ;; 8375 * ) # unhandled hosts (and "normal" native builds) 8376 lt_cv_to_host_file_cmd=func_convert_file_noop 8377 ;; 8378esac 8379]) 8380to_host_file_cmd=$lt_cv_to_host_file_cmd 8381AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8382_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8383 [0], [convert $build file names to $host format])dnl 8384 8385AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8386AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8387[#assume ordinary cross tools, or native build. 8388lt_cv_to_tool_file_cmd=func_convert_file_noop 8389case $host in 8390 *-*-mingw* ) 8391 case $build in 8392 *-*-mingw* ) # actually msys 8393 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8394 ;; 8395 esac 8396 ;; 8397esac 8398]) 8399to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8400AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8401_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8402 [0], [convert $build files to toolchain format])dnl 8403])# _LT_PATH_CONVERSION_FUNCTIONS 8404 8405# Helper functions for option handling. -*- Autoconf -*- 8406# 8407# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 8408# Software Foundation, Inc. 8409# Written by Gary V. Vaughan, 2004 8410# 8411# This file is free software; the Free Software Foundation gives 8412# unlimited permission to copy and/or distribute it, with or without 8413# modifications, as long as this notice is preserved. 8414 8415# serial 8 ltoptions.m4 8416 8417# This is to help aclocal find these macros, as it can't see m4_define. 8418AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8419 8420 8421# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8422# ------------------------------------------ 8423m4_define([_LT_MANGLE_OPTION], 8424[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8425 8426 8427# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8428# --------------------------------------- 8429# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8430# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8431# saved as a flag. 8432m4_define([_LT_SET_OPTION], 8433[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8434m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8435 _LT_MANGLE_DEFUN([$1], [$2]), 8436 [m4_warning([Unknown $1 option '$2'])])[]dnl 8437]) 8438 8439 8440# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8441# ------------------------------------------------------------ 8442# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8443m4_define([_LT_IF_OPTION], 8444[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8445 8446 8447# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8448# ------------------------------------------------------- 8449# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8450# are set. 8451m4_define([_LT_UNLESS_OPTIONS], 8452[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8453 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8454 [m4_define([$0_found])])])[]dnl 8455m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8456])[]dnl 8457]) 8458 8459 8460# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8461# ---------------------------------------- 8462# OPTION-LIST is a space-separated list of Libtool options associated 8463# with MACRO-NAME. If any OPTION has a matching handler declared with 8464# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8465# the unknown option and exit. 8466m4_defun([_LT_SET_OPTIONS], 8467[# Set options 8468m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8469 [_LT_SET_OPTION([$1], _LT_Option)]) 8470 8471m4_if([$1],[LT_INIT],[ 8472 dnl 8473 dnl Simply set some default values (i.e off) if boolean options were not 8474 dnl specified: 8475 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8476 ]) 8477 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8478 ]) 8479 dnl 8480 dnl If no reference was made to various pairs of opposing options, then 8481 dnl we run the default mode handler for the pair. For example, if neither 8482 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8483 dnl archives by default: 8484 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8485 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8486 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8487 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8488 [_LT_ENABLE_FAST_INSTALL]) 8489 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8490 [_LT_WITH_AIX_SONAME([aix])]) 8491 ]) 8492])# _LT_SET_OPTIONS 8493 8494 8495 8496# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8497# ----------------------------------------- 8498m4_define([_LT_MANGLE_DEFUN], 8499[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8500 8501 8502# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8503# ----------------------------------------------- 8504m4_define([LT_OPTION_DEFINE], 8505[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8506])# LT_OPTION_DEFINE 8507 8508 8509# dlopen 8510# ------ 8511LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8512]) 8513 8514AU_DEFUN([AC_LIBTOOL_DLOPEN], 8515[_LT_SET_OPTION([LT_INIT], [dlopen]) 8516AC_DIAGNOSE([obsolete], 8517[$0: Remove this warning and the call to _LT_SET_OPTION when you 8518put the 'dlopen' option into LT_INIT's first parameter.]) 8519]) 8520 8521dnl aclocal-1.4 backwards compatibility: 8522dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8523 8524 8525# win32-dll 8526# --------- 8527# Declare package support for building win32 dll's. 8528LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8529[enable_win32_dll=yes 8530 8531case $host in 8532*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8533 AC_CHECK_TOOL(AS, as, false) 8534 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8535 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8536 ;; 8537esac 8538 8539test -z "$AS" && AS=as 8540_LT_DECL([], [AS], [1], [Assembler program])dnl 8541 8542test -z "$DLLTOOL" && DLLTOOL=dlltool 8543_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8544 8545test -z "$OBJDUMP" && OBJDUMP=objdump 8546_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8547])# win32-dll 8548 8549AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8550[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8551_LT_SET_OPTION([LT_INIT], [win32-dll]) 8552AC_DIAGNOSE([obsolete], 8553[$0: Remove this warning and the call to _LT_SET_OPTION when you 8554put the 'win32-dll' option into LT_INIT's first parameter.]) 8555]) 8556 8557dnl aclocal-1.4 backwards compatibility: 8558dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8559 8560 8561# _LT_ENABLE_SHARED([DEFAULT]) 8562# ---------------------------- 8563# implement the --enable-shared flag, and supports the 'shared' and 8564# 'disable-shared' LT_INIT options. 8565# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8566m4_define([_LT_ENABLE_SHARED], 8567[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8568AC_ARG_ENABLE([shared], 8569 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8570 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8571 [p=${PACKAGE-default} 8572 case $enableval in 8573 yes) enable_shared=yes ;; 8574 no) enable_shared=no ;; 8575 *) 8576 enable_shared=no 8577 # Look at the argument we got. We use all the common list separators. 8578 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8579 for pkg in $enableval; do 8580 IFS=$lt_save_ifs 8581 if test "X$pkg" = "X$p"; then 8582 enable_shared=yes 8583 fi 8584 done 8585 IFS=$lt_save_ifs 8586 ;; 8587 esac], 8588 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8589 8590 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8591 [Whether or not to build shared libraries]) 8592])# _LT_ENABLE_SHARED 8593 8594LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8595LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8596 8597# Old names: 8598AC_DEFUN([AC_ENABLE_SHARED], 8599[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8600]) 8601 8602AC_DEFUN([AC_DISABLE_SHARED], 8603[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8604]) 8605 8606AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8607AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8608 8609dnl aclocal-1.4 backwards compatibility: 8610dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8611dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8612 8613 8614 8615# _LT_ENABLE_STATIC([DEFAULT]) 8616# ---------------------------- 8617# implement the --enable-static flag, and support the 'static' and 8618# 'disable-static' LT_INIT options. 8619# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8620m4_define([_LT_ENABLE_STATIC], 8621[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8622AC_ARG_ENABLE([static], 8623 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8624 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8625 [p=${PACKAGE-default} 8626 case $enableval in 8627 yes) enable_static=yes ;; 8628 no) enable_static=no ;; 8629 *) 8630 enable_static=no 8631 # Look at the argument we got. We use all the common list separators. 8632 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8633 for pkg in $enableval; do 8634 IFS=$lt_save_ifs 8635 if test "X$pkg" = "X$p"; then 8636 enable_static=yes 8637 fi 8638 done 8639 IFS=$lt_save_ifs 8640 ;; 8641 esac], 8642 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8643 8644 _LT_DECL([build_old_libs], [enable_static], [0], 8645 [Whether or not to build static libraries]) 8646])# _LT_ENABLE_STATIC 8647 8648LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8649LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8650 8651# Old names: 8652AC_DEFUN([AC_ENABLE_STATIC], 8653[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8654]) 8655 8656AC_DEFUN([AC_DISABLE_STATIC], 8657[_LT_SET_OPTION([LT_INIT], [disable-static]) 8658]) 8659 8660AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8661AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8662 8663dnl aclocal-1.4 backwards compatibility: 8664dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8665dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8666 8667 8668 8669# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8670# ---------------------------------- 8671# implement the --enable-fast-install flag, and support the 'fast-install' 8672# and 'disable-fast-install' LT_INIT options. 8673# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8674m4_define([_LT_ENABLE_FAST_INSTALL], 8675[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8676AC_ARG_ENABLE([fast-install], 8677 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8678 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8679 [p=${PACKAGE-default} 8680 case $enableval in 8681 yes) enable_fast_install=yes ;; 8682 no) enable_fast_install=no ;; 8683 *) 8684 enable_fast_install=no 8685 # Look at the argument we got. We use all the common list separators. 8686 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8687 for pkg in $enableval; do 8688 IFS=$lt_save_ifs 8689 if test "X$pkg" = "X$p"; then 8690 enable_fast_install=yes 8691 fi 8692 done 8693 IFS=$lt_save_ifs 8694 ;; 8695 esac], 8696 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8697 8698_LT_DECL([fast_install], [enable_fast_install], [0], 8699 [Whether or not to optimize for fast installation])dnl 8700])# _LT_ENABLE_FAST_INSTALL 8701 8702LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8703LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8704 8705# Old names: 8706AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8707[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8708AC_DIAGNOSE([obsolete], 8709[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8710the 'fast-install' option into LT_INIT's first parameter.]) 8711]) 8712 8713AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8714[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8715AC_DIAGNOSE([obsolete], 8716[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8717the 'disable-fast-install' option into LT_INIT's first parameter.]) 8718]) 8719 8720dnl aclocal-1.4 backwards compatibility: 8721dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8722dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8723 8724 8725# _LT_WITH_AIX_SONAME([DEFAULT]) 8726# ---------------------------------- 8727# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8728# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8729# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8730m4_define([_LT_WITH_AIX_SONAME], 8731[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8732shared_archive_member_spec= 8733case $host,$enable_shared in 8734power*-*-aix[[5-9]]*,yes) 8735 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8736 AC_ARG_WITH([aix-soname], 8737 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8738 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8739 [case $withval in 8740 aix|svr4|both) 8741 ;; 8742 *) 8743 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8744 ;; 8745 esac 8746 lt_cv_with_aix_soname=$with_aix_soname], 8747 [AC_CACHE_VAL([lt_cv_with_aix_soname], 8748 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8749 with_aix_soname=$lt_cv_with_aix_soname]) 8750 AC_MSG_RESULT([$with_aix_soname]) 8751 if test aix != "$with_aix_soname"; then 8752 # For the AIX way of multilib, we name the shared archive member 8753 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8754 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8755 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8756 # the AIX toolchain works better with OBJECT_MODE set (default 32). 8757 if test 64 = "${OBJECT_MODE-32}"; then 8758 shared_archive_member_spec=shr_64 8759 else 8760 shared_archive_member_spec=shr 8761 fi 8762 fi 8763 ;; 8764*) 8765 with_aix_soname=aix 8766 ;; 8767esac 8768 8769_LT_DECL([], [shared_archive_member_spec], [0], 8770 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8771])# _LT_WITH_AIX_SONAME 8772 8773LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8774LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8775LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8776 8777 8778# _LT_WITH_PIC([MODE]) 8779# -------------------- 8780# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8781# LT_INIT options. 8782# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8783m4_define([_LT_WITH_PIC], 8784[AC_ARG_WITH([pic], 8785 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8786 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8787 [lt_p=${PACKAGE-default} 8788 case $withval in 8789 yes|no) pic_mode=$withval ;; 8790 *) 8791 pic_mode=default 8792 # Look at the argument we got. We use all the common list separators. 8793 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8794 for lt_pkg in $withval; do 8795 IFS=$lt_save_ifs 8796 if test "X$lt_pkg" = "X$lt_p"; then 8797 pic_mode=yes 8798 fi 8799 done 8800 IFS=$lt_save_ifs 8801 ;; 8802 esac], 8803 [pic_mode=m4_default([$1], [default])]) 8804 8805_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8806])# _LT_WITH_PIC 8807 8808LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8809LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8810 8811# Old name: 8812AU_DEFUN([AC_LIBTOOL_PICMODE], 8813[_LT_SET_OPTION([LT_INIT], [pic-only]) 8814AC_DIAGNOSE([obsolete], 8815[$0: Remove this warning and the call to _LT_SET_OPTION when you 8816put the 'pic-only' option into LT_INIT's first parameter.]) 8817]) 8818 8819dnl aclocal-1.4 backwards compatibility: 8820dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8821 8822 8823m4_define([_LTDL_MODE], []) 8824LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8825 [m4_define([_LTDL_MODE], [nonrecursive])]) 8826LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8827 [m4_define([_LTDL_MODE], [recursive])]) 8828LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8829 [m4_define([_LTDL_MODE], [subproject])]) 8830 8831m4_define([_LTDL_TYPE], []) 8832LT_OPTION_DEFINE([LTDL_INIT], [installable], 8833 [m4_define([_LTDL_TYPE], [installable])]) 8834LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8835 [m4_define([_LTDL_TYPE], [convenience])]) 8836 8837# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8838# 8839# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 8840# Foundation, Inc. 8841# Written by Gary V. Vaughan, 2004 8842# 8843# This file is free software; the Free Software Foundation gives 8844# unlimited permission to copy and/or distribute it, with or without 8845# modifications, as long as this notice is preserved. 8846 8847# serial 6 ltsugar.m4 8848 8849# This is to help aclocal find these macros, as it can't see m4_define. 8850AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8851 8852 8853# lt_join(SEP, ARG1, [ARG2...]) 8854# ----------------------------- 8855# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8856# associated separator. 8857# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8858# versions in m4sugar had bugs. 8859m4_define([lt_join], 8860[m4_if([$#], [1], [], 8861 [$#], [2], [[$2]], 8862 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8863m4_define([_lt_join], 8864[m4_if([$#$2], [2], [], 8865 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8866 8867 8868# lt_car(LIST) 8869# lt_cdr(LIST) 8870# ------------ 8871# Manipulate m4 lists. 8872# These macros are necessary as long as will still need to support 8873# Autoconf-2.59, which quotes differently. 8874m4_define([lt_car], [[$1]]) 8875m4_define([lt_cdr], 8876[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8877 [$#], 1, [], 8878 [m4_dquote(m4_shift($@))])]) 8879m4_define([lt_unquote], $1) 8880 8881 8882# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8883# ------------------------------------------ 8884# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8885# Note that neither SEPARATOR nor STRING are expanded; they are appended 8886# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8887# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8888# than defined and empty). 8889# 8890# This macro is needed until we can rely on Autoconf 2.62, since earlier 8891# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8892m4_define([lt_append], 8893[m4_define([$1], 8894 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8895 8896 8897 8898# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8899# ---------------------------------------------------------- 8900# Produce a SEP delimited list of all paired combinations of elements of 8901# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8902# has the form PREFIXmINFIXSUFFIXn. 8903# Needed until we can rely on m4_combine added in Autoconf 2.62. 8904m4_define([lt_combine], 8905[m4_if(m4_eval([$# > 3]), [1], 8906 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8907[[m4_foreach([_Lt_prefix], [$2], 8908 [m4_foreach([_Lt_suffix], 8909 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8910 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8911 8912 8913# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8914# ----------------------------------------------------------------------- 8915# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8916# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8917m4_define([lt_if_append_uniq], 8918[m4_ifdef([$1], 8919 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8920 [lt_append([$1], [$2], [$3])$4], 8921 [$5])], 8922 [lt_append([$1], [$2], [$3])$4])]) 8923 8924 8925# lt_dict_add(DICT, KEY, VALUE) 8926# ----------------------------- 8927m4_define([lt_dict_add], 8928[m4_define([$1($2)], [$3])]) 8929 8930 8931# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8932# -------------------------------------------- 8933m4_define([lt_dict_add_subkey], 8934[m4_define([$1($2:$3)], [$4])]) 8935 8936 8937# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8938# ---------------------------------- 8939m4_define([lt_dict_fetch], 8940[m4_ifval([$3], 8941 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8942 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8943 8944 8945# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8946# ----------------------------------------------------------------- 8947m4_define([lt_if_dict_fetch], 8948[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8949 [$5], 8950 [$6])]) 8951 8952 8953# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8954# -------------------------------------------------------------- 8955m4_define([lt_dict_filter], 8956[m4_if([$5], [], [], 8957 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8958 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8959 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8960]) 8961 8962# ltversion.m4 -- version numbers -*- Autoconf -*- 8963# 8964# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 8965# Inc. 8966# Written by Scott James Remnant, 2004 8967# 8968# This file is free software; the Free Software Foundation gives 8969# unlimited permission to copy and/or distribute it, with or without 8970# modifications, as long as this notice is preserved. 8971 8972# @configure_input@ 8973 8974# serial 4245 ltversion.m4 8975# This file is part of GNU Libtool 8976 8977m4_define([LT_PACKAGE_VERSION], [2.4.7]) 8978m4_define([LT_PACKAGE_REVISION], [2.4.7]) 8979 8980AC_DEFUN([LTVERSION_VERSION], 8981[macro_version='2.4.7' 8982macro_revision='2.4.7' 8983_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8984_LT_DECL(, macro_revision, 0) 8985]) 8986 8987# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8988# 8989# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 8990# Software Foundation, Inc. 8991# Written by Scott James Remnant, 2004. 8992# 8993# This file is free software; the Free Software Foundation gives 8994# unlimited permission to copy and/or distribute it, with or without 8995# modifications, as long as this notice is preserved. 8996 8997# serial 5 lt~obsolete.m4 8998 8999# These exist entirely to fool aclocal when bootstrapping libtool. 9000# 9001# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 9002# which have later been changed to m4_define as they aren't part of the 9003# exported API, or moved to Autoconf or Automake where they belong. 9004# 9005# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9006# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9007# using a macro with the same name in our local m4/libtool.m4 it'll 9008# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9009# and doesn't know about Autoconf macros at all.) 9010# 9011# So we provide this file, which has a silly filename so it's always 9012# included after everything else. This provides aclocal with the 9013# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9014# because those macros already exist, or will be overwritten later. 9015# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9016# 9017# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9018# Yes, that means every name once taken will need to remain here until 9019# we give up compatibility with versions before 1.7, at which point 9020# we need to keep only those names which we still refer to. 9021 9022# This is to help aclocal find these macros, as it can't see m4_define. 9023AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9024 9025m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9026m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9027m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9028m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9029m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9030m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9031m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9032m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9033m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9034m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9035m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9036m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9037m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9038m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9039m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9040m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9041m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9042m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9043m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9044m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9045m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9046m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9047m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9048m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9049m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9050m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9051m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9052m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9053m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9054m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9055m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9056m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9057m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9058m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9059m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9060m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9061m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9062m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9063m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9064m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9065m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9066m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9067m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9068m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9069m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9070m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9071m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9072m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9073m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9074m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9075m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9076m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9077m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9078m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9079m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9080m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9081m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9082m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9083m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9084m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9085m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9086 9087# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9088# serial 11 (pkg-config-0.29.1) 9089 9090dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9091dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9092dnl 9093dnl This program is free software; you can redistribute it and/or modify 9094dnl it under the terms of the GNU General Public License as published by 9095dnl the Free Software Foundation; either version 2 of the License, or 9096dnl (at your option) any later version. 9097dnl 9098dnl This program is distributed in the hope that it will be useful, but 9099dnl WITHOUT ANY WARRANTY; without even the implied warranty of 9100dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9101dnl General Public License for more details. 9102dnl 9103dnl You should have received a copy of the GNU General Public License 9104dnl along with this program; if not, write to the Free Software 9105dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9106dnl 02111-1307, USA. 9107dnl 9108dnl As a special exception to the GNU General Public License, if you 9109dnl distribute this file as part of a program that contains a 9110dnl configuration script generated by Autoconf, you may include it under 9111dnl the same distribution terms that you use for the rest of that 9112dnl program. 9113 9114dnl PKG_PREREQ(MIN-VERSION) 9115dnl ----------------------- 9116dnl Since: 0.29 9117dnl 9118dnl Verify that the version of the pkg-config macros are at least 9119dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9120dnl installed version of pkg-config, this checks the developer's version 9121dnl of pkg.m4 when generating configure. 9122dnl 9123dnl To ensure that this macro is defined, also add: 9124dnl m4_ifndef([PKG_PREREQ], 9125dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9126dnl 9127dnl See the "Since" comment for each macro you use to see what version 9128dnl of the macros you require. 9129m4_defun([PKG_PREREQ], 9130[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9131m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9132 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9133])dnl PKG_PREREQ 9134 9135dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9136dnl ---------------------------------- 9137dnl Since: 0.16 9138dnl 9139dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9140dnl first found in the path. Checks that the version of pkg-config found 9141dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9142dnl used since that's the first version where most current features of 9143dnl pkg-config existed. 9144AC_DEFUN([PKG_PROG_PKG_CONFIG], 9145[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9146m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9147m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9148AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9149AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9150AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9151 9152if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9153 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9154fi 9155if test -n "$PKG_CONFIG"; then 9156 _pkg_min_version=m4_default([$1], [0.9.0]) 9157 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9158 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9159 AC_MSG_RESULT([yes]) 9160 else 9161 AC_MSG_RESULT([no]) 9162 PKG_CONFIG="" 9163 fi 9164fi[]dnl 9165])dnl PKG_PROG_PKG_CONFIG 9166 9167dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9168dnl ------------------------------------------------------------------- 9169dnl Since: 0.18 9170dnl 9171dnl Check to see whether a particular set of modules exists. Similar to 9172dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9173dnl 9174dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9175dnl only at the first occurence in configure.ac, so if the first place 9176dnl it's called might be skipped (such as if it is within an "if", you 9177dnl have to call PKG_CHECK_EXISTS manually 9178AC_DEFUN([PKG_CHECK_EXISTS], 9179[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9180if test -n "$PKG_CONFIG" && \ 9181 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9182 m4_default([$2], [:]) 9183m4_ifvaln([$3], [else 9184 $3])dnl 9185fi]) 9186 9187dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9188dnl --------------------------------------------- 9189dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9190dnl pkg_failed based on the result. 9191m4_define([_PKG_CONFIG], 9192[if test -n "$$1"; then 9193 pkg_cv_[]$1="$$1" 9194 elif test -n "$PKG_CONFIG"; then 9195 PKG_CHECK_EXISTS([$3], 9196 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9197 test "x$?" != "x0" && pkg_failed=yes ], 9198 [pkg_failed=yes]) 9199 else 9200 pkg_failed=untried 9201fi[]dnl 9202])dnl _PKG_CONFIG 9203 9204dnl _PKG_SHORT_ERRORS_SUPPORTED 9205dnl --------------------------- 9206dnl Internal check to see if pkg-config supports short errors. 9207AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9208[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9209if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9210 _pkg_short_errors_supported=yes 9211else 9212 _pkg_short_errors_supported=no 9213fi[]dnl 9214])dnl _PKG_SHORT_ERRORS_SUPPORTED 9215 9216 9217dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9218dnl [ACTION-IF-NOT-FOUND]) 9219dnl -------------------------------------------------------------- 9220dnl Since: 0.4.0 9221dnl 9222dnl Note that if there is a possibility the first call to 9223dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9224dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9225AC_DEFUN([PKG_CHECK_MODULES], 9226[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9227AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9228AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9229 9230pkg_failed=no 9231AC_MSG_CHECKING([for $1]) 9232 9233_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9234_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9235 9236m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9237and $1[]_LIBS to avoid the need to call pkg-config. 9238See the pkg-config man page for more details.]) 9239 9240if test $pkg_failed = yes; then 9241 AC_MSG_RESULT([no]) 9242 _PKG_SHORT_ERRORS_SUPPORTED 9243 if test $_pkg_short_errors_supported = yes; then 9244 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9245 else 9246 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9247 fi 9248 # Put the nasty error message in config.log where it belongs 9249 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9250 9251 m4_default([$4], [AC_MSG_ERROR( 9252[Package requirements ($2) were not met: 9253 9254$$1_PKG_ERRORS 9255 9256Consider adjusting the PKG_CONFIG_PATH environment variable if you 9257installed software in a non-standard prefix. 9258 9259_PKG_TEXT])[]dnl 9260 ]) 9261elif test $pkg_failed = untried; then 9262 AC_MSG_RESULT([no]) 9263 m4_default([$4], [AC_MSG_FAILURE( 9264[The pkg-config script could not be found or is too old. Make sure it 9265is in your PATH or set the PKG_CONFIG environment variable to the full 9266path to pkg-config. 9267 9268_PKG_TEXT 9269 9270To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9271 ]) 9272else 9273 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9274 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9275 AC_MSG_RESULT([yes]) 9276 $3 9277fi[]dnl 9278])dnl PKG_CHECK_MODULES 9279 9280 9281dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9282dnl [ACTION-IF-NOT-FOUND]) 9283dnl --------------------------------------------------------------------- 9284dnl Since: 0.29 9285dnl 9286dnl Checks for existence of MODULES and gathers its build flags with 9287dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9288dnl and VARIABLE-PREFIX_LIBS from --libs. 9289dnl 9290dnl Note that if there is a possibility the first call to 9291dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9292dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9293dnl configure.ac. 9294AC_DEFUN([PKG_CHECK_MODULES_STATIC], 9295[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9296_save_PKG_CONFIG=$PKG_CONFIG 9297PKG_CONFIG="$PKG_CONFIG --static" 9298PKG_CHECK_MODULES($@) 9299PKG_CONFIG=$_save_PKG_CONFIG[]dnl 9300])dnl PKG_CHECK_MODULES_STATIC 9301 9302 9303dnl PKG_INSTALLDIR([DIRECTORY]) 9304dnl ------------------------- 9305dnl Since: 0.27 9306dnl 9307dnl Substitutes the variable pkgconfigdir as the location where a module 9308dnl should install pkg-config .pc files. By default the directory is 9309dnl $libdir/pkgconfig, but the default can be changed by passing 9310dnl DIRECTORY. The user can override through the --with-pkgconfigdir 9311dnl parameter. 9312AC_DEFUN([PKG_INSTALLDIR], 9313[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9314m4_pushdef([pkg_description], 9315 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9316AC_ARG_WITH([pkgconfigdir], 9317 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9318 [with_pkgconfigdir=]pkg_default) 9319AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9320m4_popdef([pkg_default]) 9321m4_popdef([pkg_description]) 9322])dnl PKG_INSTALLDIR 9323 9324 9325dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9326dnl -------------------------------- 9327dnl Since: 0.27 9328dnl 9329dnl Substitutes the variable noarch_pkgconfigdir as the location where a 9330dnl module should install arch-independent pkg-config .pc files. By 9331dnl default the directory is $datadir/pkgconfig, but the default can be 9332dnl changed by passing DIRECTORY. The user can override through the 9333dnl --with-noarch-pkgconfigdir parameter. 9334AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9335[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9336m4_pushdef([pkg_description], 9337 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9338AC_ARG_WITH([noarch-pkgconfigdir], 9339 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9340 [with_noarch_pkgconfigdir=]pkg_default) 9341AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9342m4_popdef([pkg_default]) 9343m4_popdef([pkg_description]) 9344])dnl PKG_NOARCH_INSTALLDIR 9345 9346 9347dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9348dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9349dnl ------------------------------------------- 9350dnl Since: 0.28 9351dnl 9352dnl Retrieves the value of the pkg-config variable for the given module. 9353AC_DEFUN([PKG_CHECK_VAR], 9354[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9355AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9356 9357_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9358AS_VAR_COPY([$1], [pkg_cv_][$1]) 9359 9360AS_VAR_IF([$1], [""], [$5], [$4])dnl 9361])dnl PKG_CHECK_VAR 9362 9363dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9364dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9365dnl [DESCRIPTION], [DEFAULT]) 9366dnl ------------------------------------------ 9367dnl 9368dnl Prepare a "--with-" configure option using the lowercase 9369dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9370dnl PKG_CHECK_MODULES in a single macro. 9371AC_DEFUN([PKG_WITH_MODULES], 9372[ 9373m4_pushdef([with_arg], m4_tolower([$1])) 9374 9375m4_pushdef([description], 9376 [m4_default([$5], [build with ]with_arg[ support])]) 9377 9378m4_pushdef([def_arg], [m4_default([$6], [auto])]) 9379m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9380m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9381 9382m4_case(def_arg, 9383 [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9384 [m4_pushdef([with_without],[--with-]with_arg)]) 9385 9386AC_ARG_WITH(with_arg, 9387 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9388 [AS_TR_SH([with_]with_arg)=def_arg]) 9389 9390AS_CASE([$AS_TR_SH([with_]with_arg)], 9391 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9392 [auto],[PKG_CHECK_MODULES([$1],[$2], 9393 [m4_n([def_action_if_found]) $3], 9394 [m4_n([def_action_if_not_found]) $4])]) 9395 9396m4_popdef([with_arg]) 9397m4_popdef([description]) 9398m4_popdef([def_arg]) 9399 9400])dnl PKG_WITH_MODULES 9401 9402dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9403dnl [DESCRIPTION], [DEFAULT]) 9404dnl ----------------------------------------------- 9405dnl 9406dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9407dnl check._[VARIABLE-PREFIX] is exported as make variable. 9408AC_DEFUN([PKG_HAVE_WITH_MODULES], 9409[ 9410PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9411 9412AM_CONDITIONAL([HAVE_][$1], 9413 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9414])dnl PKG_HAVE_WITH_MODULES 9415 9416dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9417dnl [DESCRIPTION], [DEFAULT]) 9418dnl ------------------------------------------------------ 9419dnl 9420dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9421dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9422dnl and preprocessor variable. 9423AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9424[ 9425PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9426 9427AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9428 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9429])dnl PKG_HAVE_DEFINE_WITH_MODULES 9430 9431dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9432dnl 9433dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9434dnl 9435dnl Permission is hereby granted, free of charge, to any person obtaining a 9436dnl copy of this software and associated documentation files (the "Software"), 9437dnl to deal in the Software without restriction, including without limitation 9438dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9439dnl and/or sell copies of the Software, and to permit persons to whom the 9440dnl Software is furnished to do so, subject to the following conditions: 9441dnl 9442dnl The above copyright notice and this permission notice (including the next 9443dnl paragraph) shall be included in all copies or substantial portions of the 9444dnl Software. 9445dnl 9446dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9447dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9448dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9449dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9450dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9451dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9452dnl DEALINGS IN THE SOFTWARE. 9453 9454# XORG_MACROS_VERSION(required-version) 9455# ------------------------------------- 9456# Minimum version: 1.1.0 9457# 9458# If you're using a macro added in Version 1.1 or newer, include this in 9459# your configure.ac with the minimum required version, such as: 9460# XORG_MACROS_VERSION(1.1) 9461# 9462# To ensure that this macro is defined, also add: 9463# m4_ifndef([XORG_MACROS_VERSION], 9464# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9465# 9466# 9467# See the "minimum version" comment for each macro you use to see what 9468# version you require. 9469m4_defun([XORG_MACROS_VERSION],[ 9470m4_define([vers_have], [1.19.3]) 9471m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9472m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9473m4_if(m4_cmp(maj_have, maj_needed), 0,, 9474 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9475m4_if(m4_version_compare(vers_have, [$1]), -1, 9476 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9477m4_undefine([vers_have]) 9478m4_undefine([maj_have]) 9479m4_undefine([maj_needed]) 9480]) # XORG_MACROS_VERSION 9481 9482# XORG_PROG_RAWCPP() 9483# ------------------ 9484# Minimum version: 1.0.0 9485# 9486# Find cpp program and necessary flags for use in pre-processing text files 9487# such as man pages and config files 9488AC_DEFUN([XORG_PROG_RAWCPP],[ 9489AC_REQUIRE([AC_PROG_CPP]) 9490AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 9491 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9492 9493# Check for flag to avoid builtin definitions - assumes unix is predefined, 9494# which is not the best choice for supporting other OS'es, but covers most 9495# of the ones we need for now. 9496AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9497AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9498if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9499 AC_MSG_RESULT([no]) 9500else 9501 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9502 RAWCPPFLAGS=-undef 9503 AC_MSG_RESULT([yes]) 9504 # under Cygwin unix is still defined even with -undef 9505 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9506 RAWCPPFLAGS="-undef -ansi" 9507 AC_MSG_RESULT([yes, with -ansi]) 9508 else 9509 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9510 fi 9511fi 9512rm -f conftest.$ac_ext 9513 9514AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9515AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9516if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9517 AC_MSG_RESULT([no]) 9518else 9519 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9520 TRADITIONALCPPFLAGS="-traditional" 9521 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9522 AC_MSG_RESULT([yes]) 9523 else 9524 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9525 fi 9526fi 9527rm -f conftest.$ac_ext 9528AC_SUBST(RAWCPPFLAGS) 9529AC_SUBST(TRADITIONALCPPFLAGS) 9530]) # XORG_PROG_RAWCPP 9531 9532# XORG_MANPAGE_SECTIONS() 9533# ----------------------- 9534# Minimum version: 1.0.0 9535# 9536# Determine which sections man pages go in for the different man page types 9537# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9538# Not sure if there's any better way than just hardcoding by OS name. 9539# Override default settings by setting environment variables 9540# Added MAN_SUBSTS in version 1.8 9541# Added AC_PROG_SED in version 1.8 9542 9543AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9544AC_REQUIRE([AC_CANONICAL_HOST]) 9545AC_REQUIRE([AC_PROG_SED]) 9546 9547case $host_os in 9548 solaris*) 9549 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 9550 # check for a man page file found in later versions that use 9551 # traditional section numbers instead 9552 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 9553 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 9554 ;; 9555 *) SYSV_MAN_SECTIONS=false ;; 9556esac 9557 9558if test x$APP_MAN_SUFFIX = x ; then 9559 APP_MAN_SUFFIX=1 9560fi 9561if test x$APP_MAN_DIR = x ; then 9562 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9563fi 9564 9565if test x$LIB_MAN_SUFFIX = x ; then 9566 LIB_MAN_SUFFIX=3 9567fi 9568if test x$LIB_MAN_DIR = x ; then 9569 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9570fi 9571 9572if test x$FILE_MAN_SUFFIX = x ; then 9573 case $SYSV_MAN_SECTIONS in 9574 true) FILE_MAN_SUFFIX=4 ;; 9575 *) FILE_MAN_SUFFIX=5 ;; 9576 esac 9577fi 9578if test x$FILE_MAN_DIR = x ; then 9579 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9580fi 9581 9582if test x$MISC_MAN_SUFFIX = x ; then 9583 case $SYSV_MAN_SECTIONS in 9584 true) MISC_MAN_SUFFIX=5 ;; 9585 *) MISC_MAN_SUFFIX=7 ;; 9586 esac 9587fi 9588if test x$MISC_MAN_DIR = x ; then 9589 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9590fi 9591 9592if test x$DRIVER_MAN_SUFFIX = x ; then 9593 case $SYSV_MAN_SECTIONS in 9594 true) DRIVER_MAN_SUFFIX=7 ;; 9595 *) DRIVER_MAN_SUFFIX=4 ;; 9596 esac 9597fi 9598if test x$DRIVER_MAN_DIR = x ; then 9599 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9600fi 9601 9602if test x$ADMIN_MAN_SUFFIX = x ; then 9603 case $SYSV_MAN_SECTIONS in 9604 true) ADMIN_MAN_SUFFIX=1m ;; 9605 *) ADMIN_MAN_SUFFIX=8 ;; 9606 esac 9607fi 9608if test x$ADMIN_MAN_DIR = x ; then 9609 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9610fi 9611 9612 9613AC_SUBST([APP_MAN_SUFFIX]) 9614AC_SUBST([LIB_MAN_SUFFIX]) 9615AC_SUBST([FILE_MAN_SUFFIX]) 9616AC_SUBST([MISC_MAN_SUFFIX]) 9617AC_SUBST([DRIVER_MAN_SUFFIX]) 9618AC_SUBST([ADMIN_MAN_SUFFIX]) 9619AC_SUBST([APP_MAN_DIR]) 9620AC_SUBST([LIB_MAN_DIR]) 9621AC_SUBST([FILE_MAN_DIR]) 9622AC_SUBST([MISC_MAN_DIR]) 9623AC_SUBST([DRIVER_MAN_DIR]) 9624AC_SUBST([ADMIN_MAN_DIR]) 9625 9626XORG_MAN_PAGE="X Version 11" 9627AC_SUBST([XORG_MAN_PAGE]) 9628MAN_SUBSTS="\ 9629 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9630 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9631 -e 's|__xservername__|Xorg|g' \ 9632 -e 's|__xconfigfile__|xorg.conf|g' \ 9633 -e 's|__projectroot__|\$(prefix)|g' \ 9634 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9635 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9636 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9637 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9638 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9639 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9640 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9641AC_SUBST([MAN_SUBSTS]) 9642 9643]) # XORG_MANPAGE_SECTIONS 9644 9645# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9646# ------------------------ 9647# Minimum version: 1.7.0 9648# 9649# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9650# provided by xorg-sgml-doctools, if installed. 9651AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9652AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9653XORG_SGML_PATH= 9654PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9655 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9656 [m4_ifval([$1],[:], 9657 [if test x"$cross_compiling" != x"yes" ; then 9658 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9659 [XORG_SGML_PATH=$prefix/share/sgml]) 9660 fi]) 9661 ]) 9662 9663# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9664# the path and the name of the doc stylesheet 9665if test "x$XORG_SGML_PATH" != "x" ; then 9666 AC_MSG_RESULT([$XORG_SGML_PATH]) 9667 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9668 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9669else 9670 AC_MSG_RESULT([no]) 9671fi 9672 9673AC_SUBST(XORG_SGML_PATH) 9674AC_SUBST(STYLESHEET_SRCDIR) 9675AC_SUBST(XSL_STYLESHEET) 9676AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9677]) # XORG_CHECK_SGML_DOCTOOLS 9678 9679# XORG_CHECK_LINUXDOC 9680# ------------------- 9681# Minimum version: 1.0.0 9682# 9683# Defines the variable MAKE_TEXT if the necessary tools and 9684# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9685# Whether or not the necessary tools and files are found can be checked 9686# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9687AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9688AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9689AC_REQUIRE([XORG_WITH_PS2PDF]) 9690 9691AC_PATH_PROG(LINUXDOC, linuxdoc) 9692 9693AC_MSG_CHECKING([whether to build documentation]) 9694 9695if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9696 BUILDDOC=yes 9697else 9698 BUILDDOC=no 9699fi 9700 9701AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9702 9703AC_MSG_RESULT([$BUILDDOC]) 9704 9705AC_MSG_CHECKING([whether to build pdf documentation]) 9706 9707if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9708 BUILDPDFDOC=yes 9709else 9710 BUILDPDFDOC=no 9711fi 9712 9713AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9714 9715AC_MSG_RESULT([$BUILDPDFDOC]) 9716 9717MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9718MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9719MAKE_PDF="$PS2PDF" 9720MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9721 9722AC_SUBST(MAKE_TEXT) 9723AC_SUBST(MAKE_PS) 9724AC_SUBST(MAKE_PDF) 9725AC_SUBST(MAKE_HTML) 9726]) # XORG_CHECK_LINUXDOC 9727 9728# XORG_CHECK_DOCBOOK 9729# ------------------- 9730# Minimum version: 1.0.0 9731# 9732# Checks for the ability to build output formats from SGML DocBook source. 9733# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9734# indicates whether the necessary tools and files are found and, if set, 9735# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9736AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9737AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9738 9739BUILDTXTDOC=no 9740BUILDPDFDOC=no 9741BUILDPSDOC=no 9742BUILDHTMLDOC=no 9743 9744AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9745AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9746AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9747AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9748 9749AC_MSG_CHECKING([whether to build text documentation]) 9750if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9751 test x$BUILD_TXTDOC != xno; then 9752 BUILDTXTDOC=yes 9753fi 9754AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9755AC_MSG_RESULT([$BUILDTXTDOC]) 9756 9757AC_MSG_CHECKING([whether to build PDF documentation]) 9758if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9759 test x$BUILD_PDFDOC != xno; then 9760 BUILDPDFDOC=yes 9761fi 9762AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9763AC_MSG_RESULT([$BUILDPDFDOC]) 9764 9765AC_MSG_CHECKING([whether to build PostScript documentation]) 9766if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9767 test x$BUILD_PSDOC != xno; then 9768 BUILDPSDOC=yes 9769fi 9770AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9771AC_MSG_RESULT([$BUILDPSDOC]) 9772 9773AC_MSG_CHECKING([whether to build HTML documentation]) 9774if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9775 test x$BUILD_HTMLDOC != xno; then 9776 BUILDHTMLDOC=yes 9777fi 9778AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9779AC_MSG_RESULT([$BUILDHTMLDOC]) 9780 9781MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9782MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9783MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9784MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9785 9786AC_SUBST(MAKE_TEXT) 9787AC_SUBST(MAKE_PS) 9788AC_SUBST(MAKE_PDF) 9789AC_SUBST(MAKE_HTML) 9790]) # XORG_CHECK_DOCBOOK 9791 9792# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9793# ---------------- 9794# Minimum version: 1.5.0 9795# Minimum version for optional DEFAULT argument: 1.11.0 9796# 9797# Documentation tools are not always available on all platforms and sometimes 9798# not at the appropriate level. This macro enables a module to test for the 9799# presence of the tool and obtain it's path in separate variables. Coupled with 9800# the --with-xmlto option, it allows maximum flexibilty in making decisions 9801# as whether or not to use the xmlto package. When DEFAULT is not specified, 9802# --with-xmlto assumes 'auto'. 9803# 9804# Interface to module: 9805# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9806# XMLTO: returns the path of the xmlto program found 9807# returns the path set by the user in the environment 9808# --with-xmlto: 'yes' user instructs the module to use xmlto 9809# 'no' user instructs the module not to use xmlto 9810# 9811# Added in version 1.10.0 9812# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9813# xmlto for text output requires either lynx, links, or w3m browsers 9814# 9815# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9816# 9817AC_DEFUN([XORG_WITH_XMLTO],[ 9818AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9819m4_define([_defopt], m4_default([$2], [auto])) 9820AC_ARG_WITH(xmlto, 9821 AS_HELP_STRING([--with-xmlto], 9822 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9823 [use_xmlto=$withval], [use_xmlto=]_defopt) 9824m4_undefine([_defopt]) 9825 9826if test "x$use_xmlto" = x"auto"; then 9827 AC_PATH_PROG([XMLTO], [xmlto]) 9828 if test "x$XMLTO" = "x"; then 9829 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9830 have_xmlto=no 9831 else 9832 have_xmlto=yes 9833 fi 9834elif test "x$use_xmlto" = x"yes" ; then 9835 AC_PATH_PROG([XMLTO], [xmlto]) 9836 if test "x$XMLTO" = "x"; then 9837 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9838 fi 9839 have_xmlto=yes 9840elif test "x$use_xmlto" = x"no" ; then 9841 if test "x$XMLTO" != "x"; then 9842 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9843 fi 9844 have_xmlto=no 9845else 9846 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9847fi 9848 9849# Test for a minimum version of xmlto, if provided. 9850m4_ifval([$1], 9851[if test "$have_xmlto" = yes; then 9852 # scrape the xmlto version 9853 AC_MSG_CHECKING([the xmlto version]) 9854 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9855 AC_MSG_RESULT([$xmlto_version]) 9856 AS_VERSION_COMPARE([$xmlto_version], [$1], 9857 [if test "x$use_xmlto" = xauto; then 9858 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9859 have_xmlto=no 9860 else 9861 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9862 fi]) 9863fi]) 9864 9865# Test for the ability of xmlto to generate a text target 9866# 9867# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9868# following test for empty XML docbook files. 9869# For compatibility reasons use the following empty XML docbook file and if 9870# it fails try it again with a non-empty XML file. 9871have_xmlto_text=no 9872cat > conftest.xml << "EOF" 9873EOF 9874AS_IF([test "$have_xmlto" = yes], 9875 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9876 [have_xmlto_text=yes], 9877 [# Try it again with a non-empty XML file. 9878 cat > conftest.xml << "EOF" 9879<x></x> 9880EOF 9881 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9882 [have_xmlto_text=yes], 9883 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 9884rm -f conftest.xml 9885AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9886AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9887]) # XORG_WITH_XMLTO 9888 9889# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9890# -------------------------------------------- 9891# Minimum version: 1.12.0 9892# Minimum version for optional DEFAULT argument: 1.12.0 9893# 9894# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9895# XML-based language used for the transformation of XML documents. 9896# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9897# It is used under the cover by xmlto to generate html files from DocBook/XML. 9898# The XSLT processor is often used as a standalone tool for transformations. 9899# It should not be assumed that this tool is used only to work with documnetation. 9900# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9901# 9902# Interface to module: 9903# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9904# XSLTPROC: returns the path of the xsltproc program found 9905# returns the path set by the user in the environment 9906# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9907# 'no' user instructs the module not to use xsltproc 9908# have_xsltproc: returns yes if xsltproc found in PATH or no 9909# 9910# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9911# 9912AC_DEFUN([XORG_WITH_XSLTPROC],[ 9913AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9914# Preserves the interface, should it be implemented later 9915m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9916m4_define([_defopt], m4_default([$2], [auto])) 9917AC_ARG_WITH(xsltproc, 9918 AS_HELP_STRING([--with-xsltproc], 9919 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9920 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9921m4_undefine([_defopt]) 9922 9923if test "x$use_xsltproc" = x"auto"; then 9924 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9925 if test "x$XSLTPROC" = "x"; then 9926 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9927 have_xsltproc=no 9928 else 9929 have_xsltproc=yes 9930 fi 9931elif test "x$use_xsltproc" = x"yes" ; then 9932 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9933 if test "x$XSLTPROC" = "x"; then 9934 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9935 fi 9936 have_xsltproc=yes 9937elif test "x$use_xsltproc" = x"no" ; then 9938 if test "x$XSLTPROC" != "x"; then 9939 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9940 fi 9941 have_xsltproc=no 9942else 9943 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9944fi 9945 9946AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9947]) # XORG_WITH_XSLTPROC 9948 9949# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9950# ---------------------------------------- 9951# Minimum version: 1.15.0 9952# 9953# PERL (Practical Extraction and Report Language) is a language optimized for 9954# scanning arbitrary text files, extracting information from those text files, 9955# and printing reports based on that information. 9956# 9957# When DEFAULT is not specified, --with-perl assumes 'auto'. 9958# 9959# Interface to module: 9960# HAVE_PERL: used in makefiles to conditionally scan text files 9961# PERL: returns the path of the perl program found 9962# returns the path set by the user in the environment 9963# --with-perl: 'yes' user instructs the module to use perl 9964# 'no' user instructs the module not to use perl 9965# have_perl: returns yes if perl found in PATH or no 9966# 9967# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9968# 9969AC_DEFUN([XORG_WITH_PERL],[ 9970AC_ARG_VAR([PERL], [Path to perl command]) 9971# Preserves the interface, should it be implemented later 9972m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9973m4_define([_defopt], m4_default([$2], [auto])) 9974AC_ARG_WITH(perl, 9975 AS_HELP_STRING([--with-perl], 9976 [Use perl for extracting information from files (default: ]_defopt[)]), 9977 [use_perl=$withval], [use_perl=]_defopt) 9978m4_undefine([_defopt]) 9979 9980if test "x$use_perl" = x"auto"; then 9981 AC_PATH_PROG([PERL], [perl]) 9982 if test "x$PERL" = "x"; then 9983 AC_MSG_WARN([perl not found - cannot extract information and report]) 9984 have_perl=no 9985 else 9986 have_perl=yes 9987 fi 9988elif test "x$use_perl" = x"yes" ; then 9989 AC_PATH_PROG([PERL], [perl]) 9990 if test "x$PERL" = "x"; then 9991 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9992 fi 9993 have_perl=yes 9994elif test "x$use_perl" = x"no" ; then 9995 if test "x$PERL" != "x"; then 9996 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9997 fi 9998 have_perl=no 9999else 10000 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10001fi 10002 10003AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10004]) # XORG_WITH_PERL 10005 10006# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10007# ---------------- 10008# Minimum version: 1.5.0 10009# Minimum version for optional DEFAULT argument: 1.11.0 10010# 10011# Documentation tools are not always available on all platforms and sometimes 10012# not at the appropriate level. This macro enables a module to test for the 10013# presence of the tool and obtain it's path in separate variables. Coupled with 10014# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10015# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10016# --with-asciidoc assumes 'auto'. 10017# 10018# Interface to module: 10019# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10020# ASCIIDOC: returns the path of the asciidoc program found 10021# returns the path set by the user in the environment 10022# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10023# 'no' user instructs the module not to use asciidoc 10024# 10025# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10026# 10027AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10028AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10029m4_define([_defopt], m4_default([$2], [auto])) 10030AC_ARG_WITH(asciidoc, 10031 AS_HELP_STRING([--with-asciidoc], 10032 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10033 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10034m4_undefine([_defopt]) 10035 10036if test "x$use_asciidoc" = x"auto"; then 10037 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10038 if test "x$ASCIIDOC" = "x"; then 10039 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10040 have_asciidoc=no 10041 else 10042 have_asciidoc=yes 10043 fi 10044elif test "x$use_asciidoc" = x"yes" ; then 10045 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10046 if test "x$ASCIIDOC" = "x"; then 10047 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10048 fi 10049 have_asciidoc=yes 10050elif test "x$use_asciidoc" = x"no" ; then 10051 if test "x$ASCIIDOC" != "x"; then 10052 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10053 fi 10054 have_asciidoc=no 10055else 10056 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10057fi 10058m4_ifval([$1], 10059[if test "$have_asciidoc" = yes; then 10060 # scrape the asciidoc version 10061 AC_MSG_CHECKING([the asciidoc version]) 10062 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10063 AC_MSG_RESULT([$asciidoc_version]) 10064 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10065 [if test "x$use_asciidoc" = xauto; then 10066 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10067 have_asciidoc=no 10068 else 10069 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10070 fi]) 10071fi]) 10072AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10073]) # XORG_WITH_ASCIIDOC 10074 10075# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10076# ------------------------------------------- 10077# Minimum version: 1.5.0 10078# Minimum version for optional DEFAULT argument: 1.11.0 10079# Minimum version for optional DOT checking: 1.18.0 10080# 10081# Documentation tools are not always available on all platforms and sometimes 10082# not at the appropriate level. This macro enables a module to test for the 10083# presence of the tool and obtain it's path in separate variables. Coupled with 10084# the --with-doxygen option, it allows maximum flexibilty in making decisions 10085# as whether or not to use the doxygen package. When DEFAULT is not specified, 10086# --with-doxygen assumes 'auto'. 10087# 10088# Interface to module: 10089# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10090# DOXYGEN: returns the path of the doxygen program found 10091# returns the path set by the user in the environment 10092# --with-doxygen: 'yes' user instructs the module to use doxygen 10093# 'no' user instructs the module not to use doxygen 10094# 10095# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10096# 10097AC_DEFUN([XORG_WITH_DOXYGEN],[ 10098AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10099AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10100m4_define([_defopt], m4_default([$2], [auto])) 10101AC_ARG_WITH(doxygen, 10102 AS_HELP_STRING([--with-doxygen], 10103 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10104 [use_doxygen=$withval], [use_doxygen=]_defopt) 10105m4_undefine([_defopt]) 10106 10107if test "x$use_doxygen" = x"auto"; then 10108 AC_PATH_PROG([DOXYGEN], [doxygen]) 10109 if test "x$DOXYGEN" = "x"; then 10110 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10111 have_doxygen=no 10112 else 10113 have_doxygen=yes 10114 fi 10115elif test "x$use_doxygen" = x"yes" ; then 10116 AC_PATH_PROG([DOXYGEN], [doxygen]) 10117 if test "x$DOXYGEN" = "x"; then 10118 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10119 fi 10120 have_doxygen=yes 10121elif test "x$use_doxygen" = x"no" ; then 10122 if test "x$DOXYGEN" != "x"; then 10123 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10124 fi 10125 have_doxygen=no 10126else 10127 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10128fi 10129m4_ifval([$1], 10130[if test "$have_doxygen" = yes; then 10131 # scrape the doxygen version 10132 AC_MSG_CHECKING([the doxygen version]) 10133 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10134 AC_MSG_RESULT([$doxygen_version]) 10135 AS_VERSION_COMPARE([$doxygen_version], [$1], 10136 [if test "x$use_doxygen" = xauto; then 10137 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10138 have_doxygen=no 10139 else 10140 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10141 fi]) 10142fi]) 10143 10144dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10145dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10146dnl HAVE_DOT = @HAVE_DOT@ 10147HAVE_DOT=no 10148if test "x$have_doxygen" = "xyes"; then 10149 AC_PATH_PROG([DOT], [dot]) 10150 if test "x$DOT" != "x"; then 10151 HAVE_DOT=yes 10152 fi 10153fi 10154 10155AC_SUBST([HAVE_DOT]) 10156AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10157AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10158]) # XORG_WITH_DOXYGEN 10159 10160# XORG_WITH_GROFF([DEFAULT]) 10161# ---------------- 10162# Minimum version: 1.6.0 10163# Minimum version for optional DEFAULT argument: 1.11.0 10164# 10165# Documentation tools are not always available on all platforms and sometimes 10166# not at the appropriate level. This macro enables a module to test for the 10167# presence of the tool and obtain it's path in separate variables. Coupled with 10168# the --with-groff option, it allows maximum flexibilty in making decisions 10169# as whether or not to use the groff package. When DEFAULT is not specified, 10170# --with-groff assumes 'auto'. 10171# 10172# Interface to module: 10173# HAVE_GROFF: used in makefiles to conditionally generate documentation 10174# HAVE_GROFF_MM: the memorandum macros (-mm) package 10175# HAVE_GROFF_MS: the -ms macros package 10176# GROFF: returns the path of the groff program found 10177# returns the path set by the user in the environment 10178# --with-groff: 'yes' user instructs the module to use groff 10179# 'no' user instructs the module not to use groff 10180# 10181# Added in version 1.9.0: 10182# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10183# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10184# psselect from the psutils package. 10185# the ghostcript package. Refer to the grohtml man pages 10186# 10187# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10188# 10189# OS and distros often splits groff in a basic and full package, the former 10190# having the groff program and the later having devices, fonts and macros 10191# Checking for the groff executable is not enough. 10192# 10193# If macros are missing, we cannot assume that groff is useless, so we don't 10194# unset HAVE_GROFF or GROFF env variables. 10195# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10196# 10197AC_DEFUN([XORG_WITH_GROFF],[ 10198AC_ARG_VAR([GROFF], [Path to groff command]) 10199m4_define([_defopt], m4_default([$1], [auto])) 10200AC_ARG_WITH(groff, 10201 AS_HELP_STRING([--with-groff], 10202 [Use groff to regenerate documentation (default: ]_defopt[)]), 10203 [use_groff=$withval], [use_groff=]_defopt) 10204m4_undefine([_defopt]) 10205 10206if test "x$use_groff" = x"auto"; then 10207 AC_PATH_PROG([GROFF], [groff]) 10208 if test "x$GROFF" = "x"; then 10209 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10210 have_groff=no 10211 else 10212 have_groff=yes 10213 fi 10214elif test "x$use_groff" = x"yes" ; then 10215 AC_PATH_PROG([GROFF], [groff]) 10216 if test "x$GROFF" = "x"; then 10217 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10218 fi 10219 have_groff=yes 10220elif test "x$use_groff" = x"no" ; then 10221 if test "x$GROFF" != "x"; then 10222 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10223 fi 10224 have_groff=no 10225else 10226 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10227fi 10228 10229# We have groff, test for the presence of the macro packages 10230if test "x$have_groff" = x"yes"; then 10231 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10232 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10233 groff_ms_works=yes 10234 else 10235 groff_ms_works=no 10236 fi 10237 AC_MSG_RESULT([$groff_ms_works]) 10238 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10239 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10240 groff_mm_works=yes 10241 else 10242 groff_mm_works=no 10243 fi 10244 AC_MSG_RESULT([$groff_mm_works]) 10245fi 10246 10247# We have groff, test for HTML dependencies, one command per package 10248if test "x$have_groff" = x"yes"; then 10249 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10250 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10251 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10252 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10253 have_groff_html=yes 10254 else 10255 have_groff_html=no 10256 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10257 fi 10258fi 10259 10260# Set Automake conditionals for Makefiles 10261AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10262AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10263AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10264AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10265]) # XORG_WITH_GROFF 10266 10267# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10268# --------------------------------------- 10269# Minimum version: 1.6.0 10270# Minimum version for optional DEFAULT argument: 1.11.0 10271# Minimum version for optional MIN-VERSION argument: 1.15.0 10272# 10273# Documentation tools are not always available on all platforms and sometimes 10274# not at the appropriate level. This macro enables a module to test for the 10275# presence of the tool and obtain it's path in separate variables. Coupled with 10276# the --with-fop option, it allows maximum flexibilty in making decisions 10277# as whether or not to use the fop package. When DEFAULT is not specified, 10278# --with-fop assumes 'auto'. 10279# 10280# Interface to module: 10281# HAVE_FOP: used in makefiles to conditionally generate documentation 10282# FOP: returns the path of the fop program found 10283# returns the path set by the user in the environment 10284# --with-fop: 'yes' user instructs the module to use fop 10285# 'no' user instructs the module not to use fop 10286# 10287# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10288# 10289AC_DEFUN([XORG_WITH_FOP],[ 10290AC_ARG_VAR([FOP], [Path to fop command]) 10291m4_define([_defopt], m4_default([$2], [auto])) 10292AC_ARG_WITH(fop, 10293 AS_HELP_STRING([--with-fop], 10294 [Use fop to regenerate documentation (default: ]_defopt[)]), 10295 [use_fop=$withval], [use_fop=]_defopt) 10296m4_undefine([_defopt]) 10297 10298if test "x$use_fop" = x"auto"; then 10299 AC_PATH_PROG([FOP], [fop]) 10300 if test "x$FOP" = "x"; then 10301 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10302 have_fop=no 10303 else 10304 have_fop=yes 10305 fi 10306elif test "x$use_fop" = x"yes" ; then 10307 AC_PATH_PROG([FOP], [fop]) 10308 if test "x$FOP" = "x"; then 10309 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10310 fi 10311 have_fop=yes 10312elif test "x$use_fop" = x"no" ; then 10313 if test "x$FOP" != "x"; then 10314 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10315 fi 10316 have_fop=no 10317else 10318 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10319fi 10320 10321# Test for a minimum version of fop, if provided. 10322m4_ifval([$1], 10323[if test "$have_fop" = yes; then 10324 # scrape the fop version 10325 AC_MSG_CHECKING([for fop minimum version]) 10326 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10327 AC_MSG_RESULT([$fop_version]) 10328 AS_VERSION_COMPARE([$fop_version], [$1], 10329 [if test "x$use_fop" = xauto; then 10330 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10331 have_fop=no 10332 else 10333 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10334 fi]) 10335fi]) 10336AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10337]) # XORG_WITH_FOP 10338 10339# XORG_WITH_M4([MIN-VERSION]) 10340# --------------------------- 10341# Minimum version: 1.19.0 10342# 10343# This macro attempts to locate an m4 macro processor which supports 10344# -I option and is only useful for modules relying on M4 in order to 10345# expand macros in source code files. 10346# 10347# Interface to module: 10348# M4: returns the path of the m4 program found 10349# returns the path set by the user in the environment 10350# 10351AC_DEFUN([XORG_WITH_M4], [ 10352AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10353 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10354 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10355 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10356 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10357 [$PATH:/usr/gnu/bin])]) 10358 10359AC_SUBST([M4], [$ac_cv_path_M4]) 10360]) # XORG_WITH_M4 10361 10362# XORG_WITH_PS2PDF([DEFAULT]) 10363# ---------------- 10364# Minimum version: 1.6.0 10365# Minimum version for optional DEFAULT argument: 1.11.0 10366# 10367# Documentation tools are not always available on all platforms and sometimes 10368# not at the appropriate level. This macro enables a module to test for the 10369# presence of the tool and obtain it's path in separate variables. Coupled with 10370# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10371# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10372# --with-ps2pdf assumes 'auto'. 10373# 10374# Interface to module: 10375# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10376# PS2PDF: returns the path of the ps2pdf program found 10377# returns the path set by the user in the environment 10378# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10379# 'no' user instructs the module not to use ps2pdf 10380# 10381# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10382# 10383AC_DEFUN([XORG_WITH_PS2PDF],[ 10384AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10385m4_define([_defopt], m4_default([$1], [auto])) 10386AC_ARG_WITH(ps2pdf, 10387 AS_HELP_STRING([--with-ps2pdf], 10388 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10389 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10390m4_undefine([_defopt]) 10391 10392if test "x$use_ps2pdf" = x"auto"; then 10393 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10394 if test "x$PS2PDF" = "x"; then 10395 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10396 have_ps2pdf=no 10397 else 10398 have_ps2pdf=yes 10399 fi 10400elif test "x$use_ps2pdf" = x"yes" ; then 10401 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10402 if test "x$PS2PDF" = "x"; then 10403 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10404 fi 10405 have_ps2pdf=yes 10406elif test "x$use_ps2pdf" = x"no" ; then 10407 if test "x$PS2PDF" != "x"; then 10408 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10409 fi 10410 have_ps2pdf=no 10411else 10412 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10413fi 10414AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10415]) # XORG_WITH_PS2PDF 10416 10417# XORG_ENABLE_DOCS (enable_docs=yes) 10418# ---------------- 10419# Minimum version: 1.6.0 10420# 10421# Documentation tools are not always available on all platforms and sometimes 10422# not at the appropriate level. This macro enables a builder to skip all 10423# documentation targets except traditional man pages. 10424# Combined with the specific tool checking macros XORG_WITH_*, it provides 10425# maximum flexibilty in controlling documentation building. 10426# Refer to: 10427# XORG_WITH_XMLTO --with-xmlto 10428# XORG_WITH_ASCIIDOC --with-asciidoc 10429# XORG_WITH_DOXYGEN --with-doxygen 10430# XORG_WITH_FOP --with-fop 10431# XORG_WITH_GROFF --with-groff 10432# XORG_WITH_PS2PDF --with-ps2pdf 10433# 10434# Interface to module: 10435# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10436# --enable-docs: 'yes' user instructs the module to generate docs 10437# 'no' user instructs the module not to generate docs 10438# parm1: specify the default value, yes or no. 10439# 10440AC_DEFUN([XORG_ENABLE_DOCS],[ 10441m4_define([docs_default], m4_default([$1], [yes])) 10442AC_ARG_ENABLE(docs, 10443 AS_HELP_STRING([--enable-docs], 10444 [Enable building the documentation (default: ]docs_default[)]), 10445 [build_docs=$enableval], [build_docs=]docs_default) 10446m4_undefine([docs_default]) 10447AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10448AC_MSG_CHECKING([whether to build documentation]) 10449AC_MSG_RESULT([$build_docs]) 10450]) # XORG_ENABLE_DOCS 10451 10452# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10453# ---------------- 10454# Minimum version: 1.6.0 10455# 10456# This macro enables a builder to skip all developer documentation. 10457# Combined with the specific tool checking macros XORG_WITH_*, it provides 10458# maximum flexibilty in controlling documentation building. 10459# Refer to: 10460# XORG_WITH_XMLTO --with-xmlto 10461# XORG_WITH_ASCIIDOC --with-asciidoc 10462# XORG_WITH_DOXYGEN --with-doxygen 10463# XORG_WITH_FOP --with-fop 10464# XORG_WITH_GROFF --with-groff 10465# XORG_WITH_PS2PDF --with-ps2pdf 10466# 10467# Interface to module: 10468# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10469# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10470# 'no' user instructs the module not to generate developer docs 10471# parm1: specify the default value, yes or no. 10472# 10473AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10474m4_define([devel_default], m4_default([$1], [yes])) 10475AC_ARG_ENABLE(devel-docs, 10476 AS_HELP_STRING([--enable-devel-docs], 10477 [Enable building the developer documentation (default: ]devel_default[)]), 10478 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10479m4_undefine([devel_default]) 10480AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10481AC_MSG_CHECKING([whether to build developer documentation]) 10482AC_MSG_RESULT([$build_devel_docs]) 10483]) # XORG_ENABLE_DEVEL_DOCS 10484 10485# XORG_ENABLE_SPECS (enable_specs=yes) 10486# ---------------- 10487# Minimum version: 1.6.0 10488# 10489# This macro enables a builder to skip all functional specification targets. 10490# Combined with the specific tool checking macros XORG_WITH_*, it provides 10491# maximum flexibilty in controlling documentation building. 10492# Refer to: 10493# XORG_WITH_XMLTO --with-xmlto 10494# XORG_WITH_ASCIIDOC --with-asciidoc 10495# XORG_WITH_DOXYGEN --with-doxygen 10496# XORG_WITH_FOP --with-fop 10497# XORG_WITH_GROFF --with-groff 10498# XORG_WITH_PS2PDF --with-ps2pdf 10499# 10500# Interface to module: 10501# ENABLE_SPECS: used in makefiles to conditionally generate specs 10502# --enable-specs: 'yes' user instructs the module to generate specs 10503# 'no' user instructs the module not to generate specs 10504# parm1: specify the default value, yes or no. 10505# 10506AC_DEFUN([XORG_ENABLE_SPECS],[ 10507m4_define([spec_default], m4_default([$1], [yes])) 10508AC_ARG_ENABLE(specs, 10509 AS_HELP_STRING([--enable-specs], 10510 [Enable building the specs (default: ]spec_default[)]), 10511 [build_specs=$enableval], [build_specs=]spec_default) 10512m4_undefine([spec_default]) 10513AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10514AC_MSG_CHECKING([whether to build functional specifications]) 10515AC_MSG_RESULT([$build_specs]) 10516]) # XORG_ENABLE_SPECS 10517 10518# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10519# ---------------------------------------------- 10520# Minimum version: 1.13.0 10521# 10522# This macro enables a builder to enable/disable unit testing 10523# It makes no assumption about the test cases implementation 10524# Test cases may or may not use Automake "Support for test suites" 10525# They may or may not use the software utility library GLib 10526# 10527# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10528# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10529# The variable enable_unit_tests is used by other macros in this file. 10530# 10531# Interface to module: 10532# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10533# enable_unit_tests: used in configure.ac for additional configuration 10534# --enable-unit-tests: 'yes' user instructs the module to build tests 10535# 'no' user instructs the module not to build tests 10536# parm1: specify the default value, yes or no. 10537# 10538AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10539AC_BEFORE([$0], [XORG_WITH_GLIB]) 10540AC_BEFORE([$0], [XORG_LD_WRAP]) 10541AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10542m4_define([_defopt], m4_default([$1], [auto])) 10543AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10544 [Enable building unit test cases (default: ]_defopt[)]), 10545 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10546m4_undefine([_defopt]) 10547AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10548AC_MSG_CHECKING([whether to build unit test cases]) 10549AC_MSG_RESULT([$enable_unit_tests]) 10550]) # XORG_ENABLE_UNIT_TESTS 10551 10552# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10553# ------------------------------------------------------ 10554# Minimum version: 1.17.0 10555# 10556# This macro enables a builder to enable/disable integration testing 10557# It makes no assumption about the test cases' implementation 10558# Test cases may or may not use Automake "Support for test suites" 10559# 10560# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10561# usually requires less dependencies and may be built and run under less 10562# stringent environments than integration tests. 10563# 10564# Interface to module: 10565# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10566# enable_integration_tests: used in configure.ac for additional configuration 10567# --enable-integration-tests: 'yes' user instructs the module to build tests 10568# 'no' user instructs the module not to build tests 10569# parm1: specify the default value, yes or no. 10570# 10571AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10572AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10573m4_define([_defopt], m4_default([$1], [auto])) 10574AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10575 [Enable building integration test cases (default: ]_defopt[)]), 10576 [enable_integration_tests=$enableval], 10577 [enable_integration_tests=]_defopt) 10578m4_undefine([_defopt]) 10579AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10580 [test "x$enable_integration_tests" != xno]) 10581AC_MSG_CHECKING([whether to build unit test cases]) 10582AC_MSG_RESULT([$enable_integration_tests]) 10583]) # XORG_ENABLE_INTEGRATION_TESTS 10584 10585# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10586# ---------------------------------------- 10587# Minimum version: 1.13.0 10588# 10589# GLib is a library which provides advanced data structures and functions. 10590# This macro enables a module to test for the presence of Glib. 10591# 10592# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10593# Otherwise the value of $enable_unit_tests is blank. 10594# 10595# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10596# test support usually requires less dependencies and may be built and run under 10597# less stringent environments than integration tests. 10598# 10599# Interface to module: 10600# HAVE_GLIB: used in makefiles to conditionally build targets 10601# with_glib: used in configure.ac to know if GLib has been found 10602# --with-glib: 'yes' user instructs the module to use glib 10603# 'no' user instructs the module not to use glib 10604# 10605AC_DEFUN([XORG_WITH_GLIB],[ 10606AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10607m4_define([_defopt], m4_default([$2], [auto])) 10608AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10609 [Use GLib library for unit testing (default: ]_defopt[)]), 10610 [with_glib=$withval], [with_glib=]_defopt) 10611m4_undefine([_defopt]) 10612 10613have_glib=no 10614# Do not probe GLib if user explicitly disabled unit testing 10615if test "x$enable_unit_tests" != x"no"; then 10616 # Do not probe GLib if user explicitly disabled it 10617 if test "x$with_glib" != x"no"; then 10618 m4_ifval( 10619 [$1], 10620 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10621 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10622 ) 10623 fi 10624fi 10625 10626# Not having GLib when unit testing has been explicitly requested is an error 10627if test "x$enable_unit_tests" = x"yes"; then 10628 if test "x$have_glib" = x"no"; then 10629 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10630 fi 10631fi 10632 10633# Having unit testing disabled when GLib has been explicitly requested is an error 10634if test "x$enable_unit_tests" = x"no"; then 10635 if test "x$with_glib" = x"yes"; then 10636 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10637 fi 10638fi 10639 10640# Not having GLib when it has been explicitly requested is an error 10641if test "x$with_glib" = x"yes"; then 10642 if test "x$have_glib" = x"no"; then 10643 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10644 fi 10645fi 10646 10647AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10648]) # XORG_WITH_GLIB 10649 10650# XORG_LD_WRAP([required|optional]) 10651# --------------------------------- 10652# Minimum version: 1.13.0 10653# 10654# Check if linker supports -wrap, passed via compiler flags 10655# 10656# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10657# Otherwise the value of $enable_unit_tests is blank. 10658# 10659# Argument added in 1.16.0 - default is "required", to match existing behavior 10660# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10661# available, an argument of "optional" allows use when some unit tests require 10662# ld -wrap and others do not. 10663# 10664AC_DEFUN([XORG_LD_WRAP],[ 10665XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10666 [AC_LANG_PROGRAM([#include <stdlib.h> 10667 void __wrap_exit(int status) { return; }], 10668 [exit(0);])]) 10669# Not having ld wrap when unit testing has been explicitly requested is an error 10670if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10671 if test "x$have_ld_wrap" = x"no"; then 10672 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10673 fi 10674fi 10675AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10676# 10677]) # XORG_LD_WRAP 10678 10679# XORG_CHECK_LINKER_FLAGS 10680# ----------------------- 10681# SYNOPSIS 10682# 10683# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10684# 10685# DESCRIPTION 10686# 10687# Check whether the given linker FLAGS work with the current language's 10688# linker, or whether they give an error. 10689# 10690# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10691# success/failure. 10692# 10693# PROGRAM-SOURCE is the program source to link with, if needed 10694# 10695# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10696# 10697# LICENSE 10698# 10699# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10700# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10701# Copyright (c) 2009 Matteo Frigo 10702# 10703# This program is free software: you can redistribute it and/or modify it 10704# under the terms of the GNU General Public License as published by the 10705# Free Software Foundation, either version 3 of the License, or (at your 10706# option) any later version. 10707# 10708# This program is distributed in the hope that it will be useful, but 10709# WITHOUT ANY WARRANTY; without even the implied warranty of 10710# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10711# Public License for more details. 10712# 10713# You should have received a copy of the GNU General Public License along 10714# with this program. If not, see <http://www.gnu.org/licenses/>. 10715# 10716# As a special exception, the respective Autoconf Macro's copyright owner 10717# gives unlimited permission to copy, distribute and modify the configure 10718# scripts that are the output of Autoconf when processing the Macro. You 10719# need not follow the terms of the GNU General Public License when using 10720# or distributing such scripts, even though portions of the text of the 10721# Macro appear in them. The GNU General Public License (GPL) does govern 10722# all other use of the material that constitutes the Autoconf Macro. 10723# 10724# This special exception to the GPL applies to versions of the Autoconf 10725# Macro released by the Autoconf Archive. When you make and distribute a 10726# modified version of the Autoconf Macro, you may extend this special 10727# exception to the GPL to apply to your modified version as well.# 10728AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10729[AC_MSG_CHECKING([whether the linker accepts $1]) 10730dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10731AS_LITERAL_IF([$1], 10732 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10733 ax_save_FLAGS=$LDFLAGS 10734 LDFLAGS="$1" 10735 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10736 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10737 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10738 LDFLAGS=$ax_save_FLAGS])], 10739 [ax_save_FLAGS=$LDFLAGS 10740 LDFLAGS="$1" 10741 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10742 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10743 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10744 LDFLAGS=$ax_save_FLAGS]) 10745eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10746AC_MSG_RESULT($xorg_check_linker_flags) 10747if test "x$xorg_check_linker_flags" = xyes; then 10748 m4_default([$2], :) 10749else 10750 m4_default([$3], :) 10751fi 10752]) # XORG_CHECK_LINKER_FLAGS 10753 10754# XORG_MEMORY_CHECK_FLAGS 10755# ----------------------- 10756# Minimum version: 1.16.0 10757# 10758# This macro attempts to find appropriate memory checking functionality 10759# for various platforms which unit testing code may use to catch various 10760# forms of memory allocation and access errors in testing. 10761# 10762# Interface to module: 10763# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10764# Usually added to TESTS_ENVIRONMENT in Makefile.am 10765# 10766# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10767# 10768AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10769 10770AC_REQUIRE([AC_CANONICAL_HOST]) 10771AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10772 [Environment variables to enable memory checking in tests]) 10773 10774# Check for different types of support on different platforms 10775case $host_os in 10776 solaris*) 10777 AC_CHECK_LIB([umem], [umem_alloc], 10778 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10779 ;; 10780 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10781 # both directly and inverted, so should not be 0 or 255. 10782 malloc_debug_env='MALLOC_PERTURB_=15' 10783 ;; 10784 darwin*) 10785 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10786 ;; 10787 *bsd*) 10788 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10789 ;; 10790esac 10791 10792# User supplied flags override default flags 10793if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10794 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10795fi 10796 10797AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10798]) # XORG_WITH_LINT 10799 10800# XORG_CHECK_MALLOC_ZERO 10801# ---------------------- 10802# Minimum version: 1.0.0 10803# 10804# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10805# malloc(0) returns NULL. Packages should add one of these cflags to 10806# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10807AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10808AC_ARG_ENABLE(malloc0returnsnull, 10809 AS_HELP_STRING([--enable-malloc0returnsnull], 10810 [malloc(0) returns NULL (default: auto)]), 10811 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10812 [MALLOC_ZERO_RETURNS_NULL=auto]) 10813 10814AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10815if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10816AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10817 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10818#include <stdlib.h> 10819],[ 10820 char *m0, *r0, *c0, *p; 10821 m0 = malloc(0); 10822 p = malloc(10); 10823 r0 = realloc(p,0); 10824 c0 = calloc(0,10); 10825 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10826])], 10827 [xorg_cv_malloc0_returns_null=yes], 10828 [xorg_cv_malloc0_returns_null=no])]) 10829MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10830fi 10831AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10832 10833if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10834 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10835 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10836 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10837else 10838 MALLOC_ZERO_CFLAGS="" 10839 XMALLOC_ZERO_CFLAGS="" 10840 XTMALLOC_ZERO_CFLAGS="" 10841fi 10842 10843AC_SUBST([MALLOC_ZERO_CFLAGS]) 10844AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10845AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10846]) # XORG_CHECK_MALLOC_ZERO 10847 10848# XORG_WITH_LINT() 10849# ---------------- 10850# Minimum version: 1.1.0 10851# 10852# This macro enables the use of a tool that flags some suspicious and 10853# non-portable constructs (likely to be bugs) in C language source code. 10854# It will attempt to locate the tool and use appropriate options. 10855# There are various lint type tools on different platforms. 10856# 10857# Interface to module: 10858# LINT: returns the path to the tool found on the platform 10859# or the value set to LINT on the configure cmd line 10860# also an Automake conditional 10861# LINT_FLAGS: an Automake variable with appropriate flags 10862# 10863# --with-lint: 'yes' user instructs the module to use lint 10864# 'no' user instructs the module not to use lint (default) 10865# 10866# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10867# If the user sets the value of LINT_FLAGS, they are used verbatim. 10868# 10869AC_DEFUN([XORG_WITH_LINT],[ 10870 10871AC_ARG_VAR([LINT], [Path to a lint-style command]) 10872AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10873AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10874 [Use a lint-style source code checker (default: disabled)])], 10875 [use_lint=$withval], [use_lint=no]) 10876 10877# Obtain platform specific info like program name and options 10878# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10879case $host_os in 10880 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10881 lint_name=splint 10882 lint_options="-badflag" 10883 ;; 10884 *freebsd* | *netbsd*) 10885 lint_name=lint 10886 lint_options="-u -b" 10887 ;; 10888 *solaris*) 10889 lint_name=lint 10890 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10891 ;; 10892esac 10893 10894# Test for the presence of the program (either guessed by the code or spelled out by the user) 10895if test "x$use_lint" = x"yes" ; then 10896 AC_PATH_PROG([LINT], [$lint_name]) 10897 if test "x$LINT" = "x"; then 10898 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10899 fi 10900elif test "x$use_lint" = x"no" ; then 10901 if test "x$LINT" != "x"; then 10902 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10903 fi 10904else 10905 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10906fi 10907 10908# User supplied flags override default flags 10909if test "x$LINT_FLAGS" != "x"; then 10910 lint_options=$LINT_FLAGS 10911fi 10912 10913AC_SUBST([LINT_FLAGS],[$lint_options]) 10914AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10915 10916]) # XORG_WITH_LINT 10917 10918# XORG_LINT_LIBRARY(LIBNAME) 10919# -------------------------- 10920# Minimum version: 1.1.0 10921# 10922# Sets up flags for building lint libraries for checking programs that call 10923# functions in the library. 10924# 10925# Interface to module: 10926# LINTLIB - Automake variable with the name of lint library file to make 10927# MAKE_LINT_LIB - Automake conditional 10928# 10929# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10930# - 'no' user instructs the module not to create a lint library (default) 10931 10932AC_DEFUN([XORG_LINT_LIBRARY],[ 10933AC_REQUIRE([XORG_WITH_LINT]) 10934AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10935 [Create lint library (default: disabled)])], 10936 [make_lint_lib=$enableval], [make_lint_lib=no]) 10937 10938if test "x$make_lint_lib" = x"yes" ; then 10939 LINTLIB=llib-l$1.ln 10940 if test "x$LINT" = "x"; then 10941 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10942 fi 10943elif test "x$make_lint_lib" != x"no" ; then 10944 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10945fi 10946 10947AC_SUBST(LINTLIB) 10948AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10949 10950]) # XORG_LINT_LIBRARY 10951 10952# XORG_COMPILER_BRAND 10953# ------------------- 10954# Minimum version: 1.14.0 10955# 10956# Checks for various brands of compilers and sets flags as appropriate: 10957# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10958# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10959# clang compiler - sets CLANGCC to "yes" 10960# Intel compiler - sets INTELCC to "yes" 10961# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10962# 10963AC_DEFUN([XORG_COMPILER_BRAND], [ 10964AC_LANG_CASE( 10965 [C], [ 10966 AC_REQUIRE([AC_PROG_CC_C99]) 10967 ], 10968 [C++], [ 10969 AC_REQUIRE([AC_PROG_CXX]) 10970 ] 10971) 10972AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10973AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10974AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10975]) # XORG_COMPILER_BRAND 10976 10977# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10978# --------------- 10979# Minimum version: 1.16.0 10980# 10981# Test if the compiler works when passed the given flag as a command line argument. 10982# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10983# next flag in the list until there are no more options. 10984# 10985# Note that this does not guarantee that the compiler supports the flag as some 10986# compilers will simply ignore arguments that they do not understand, but we do 10987# attempt to weed out false positives by using -Werror=unknown-warning-option and 10988# -Werror=unused-command-line-argument 10989# 10990AC_DEFUN([XORG_TESTSET_CFLAG], [ 10991m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10992m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10993 10994AC_LANG_COMPILER_REQUIRE 10995 10996AC_LANG_CASE( 10997 [C], [ 10998 AC_REQUIRE([AC_PROG_CC_C99]) 10999 define([PREFIX], [C]) 11000 define([CACHE_PREFIX], [cc]) 11001 define([COMPILER], [$CC]) 11002 ], 11003 [C++], [ 11004 define([PREFIX], [CXX]) 11005 define([CACHE_PREFIX], [cxx]) 11006 define([COMPILER], [$CXX]) 11007 ] 11008) 11009 11010[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11011 11012if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11013 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11014 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11015 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11016 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11017 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11018 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11019 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11020 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11021fi 11022 11023if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11024 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11025 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11026 fi 11027 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11028 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11029 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11030 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11031 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11032 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11033 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11034 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11035fi 11036 11037found="no" 11038m4_foreach([flag], m4_cdr($@), [ 11039 if test $found = "no" ; then 11040 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11041 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11042 fi 11043 11044 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11045 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11046 fi 11047 11048 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11049 11050dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11051 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11052 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11053 AC_CACHE_VAL($cacheid, 11054 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11055 [eval $cacheid=yes], 11056 [eval $cacheid=no])]) 11057 11058 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11059 11060 eval supported=\$$cacheid 11061 AC_MSG_RESULT([$supported]) 11062 if test "$supported" = "yes" ; then 11063 $1="$$1 ]flag[" 11064 found="yes" 11065 fi 11066 fi 11067]) 11068]) # XORG_TESTSET_CFLAG 11069 11070# XORG_COMPILER_FLAGS 11071# --------------- 11072# Minimum version: 1.16.0 11073# 11074# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11075# arguments supported by the selected compiler which do NOT alter the generated 11076# code. These arguments will cause the compiler to print various warnings 11077# during compilation AND turn a conservative set of warnings into errors. 11078# 11079# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11080# future versions of util-macros as options are added to new compilers. 11081# 11082AC_DEFUN([XORG_COMPILER_FLAGS], [ 11083AC_REQUIRE([XORG_COMPILER_BRAND]) 11084 11085AC_ARG_ENABLE(selective-werror, 11086 AS_HELP_STRING([--disable-selective-werror], 11087 [Turn off selective compiler errors. (default: enabled)]), 11088 [SELECTIVE_WERROR=$enableval], 11089 [SELECTIVE_WERROR=yes]) 11090 11091AC_LANG_CASE( 11092 [C], [ 11093 define([PREFIX], [C]) 11094 ], 11095 [C++], [ 11096 define([PREFIX], [CXX]) 11097 ] 11098) 11099# -v is too short to test reliably with XORG_TESTSET_CFLAG 11100if test "x$SUNCC" = "xyes"; then 11101 [BASE_]PREFIX[FLAGS]="-v" 11102else 11103 [BASE_]PREFIX[FLAGS]="" 11104fi 11105 11106# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11107XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11108XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11109XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11110XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11111 11112AC_LANG_CASE( 11113 [C], [ 11114 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11115 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11116 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11117 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11118 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11119 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11120 ] 11121) 11122 11123# This chunk adds additional warnings that could catch undesired effects. 11124XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11125XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11126XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11127XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11128XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11129XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11130XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11131 11132# These are currently disabled because they are noisy. They will be enabled 11133# in the future once the codebase is sufficiently modernized to silence 11134# them. For now, I don't want them to drown out the other warnings. 11135# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11136# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11137# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11138 11139# Turn some warnings into errors, so we don't accidently get successful builds 11140# when there are problems that should be fixed. 11141 11142if test "x$SELECTIVE_WERROR" = "xyes" ; then 11143XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11144XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11145XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11146XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11147XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11148XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11149XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11150XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11151XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11152XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11153XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11154XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11155XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11156else 11157AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 11158XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11159XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11160XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11161XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11162XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11163XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11164XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11165XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11166XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11167XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11168XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11169XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11170XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11171fi 11172 11173AC_SUBST([BASE_]PREFIX[FLAGS]) 11174]) # XORG_COMPILER_FLAGS 11175 11176# XORG_CWARNFLAGS 11177# --------------- 11178# Minimum version: 1.2.0 11179# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11180# 11181# Defines CWARNFLAGS to enable C compiler warnings. 11182# 11183# This function is deprecated because it defines -fno-strict-aliasing 11184# which alters the code generated by the compiler. If -fno-strict-aliasing 11185# is needed, then it should be added explicitly in the module when 11186# it is updated to use BASE_CFLAGS. 11187# 11188AC_DEFUN([XORG_CWARNFLAGS], [ 11189AC_REQUIRE([XORG_COMPILER_FLAGS]) 11190AC_REQUIRE([XORG_COMPILER_BRAND]) 11191AC_LANG_CASE( 11192 [C], [ 11193 CWARNFLAGS="$BASE_CFLAGS" 11194 if test "x$GCC" = xyes ; then 11195 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11196 fi 11197 AC_SUBST(CWARNFLAGS) 11198 ] 11199) 11200]) # XORG_CWARNFLAGS 11201 11202# XORG_STRICT_OPTION 11203# ----------------------- 11204# Minimum version: 1.3.0 11205# 11206# Add configure option to enable strict compilation flags, such as treating 11207# warnings as fatal errors. 11208# If --enable-strict-compilation is passed to configure, adds strict flags to 11209# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11210# 11211# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11212# when strict compilation is unconditionally desired. 11213AC_DEFUN([XORG_STRICT_OPTION], [ 11214AC_REQUIRE([XORG_CWARNFLAGS]) 11215AC_REQUIRE([XORG_COMPILER_FLAGS]) 11216 11217AC_ARG_ENABLE(strict-compilation, 11218 AS_HELP_STRING([--enable-strict-compilation], 11219 [Enable all warnings from compiler and make them errors (default: disabled)]), 11220 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11221 11222AC_LANG_CASE( 11223 [C], [ 11224 define([PREFIX], [C]) 11225 ], 11226 [C++], [ 11227 define([PREFIX], [CXX]) 11228 ] 11229) 11230 11231[STRICT_]PREFIX[FLAGS]="" 11232XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11233XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11234 11235# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11236# activate it with -Werror, so we add it here explicitly. 11237XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11238 11239if test "x$STRICT_COMPILE" = "xyes"; then 11240 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11241 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11242fi 11243AC_SUBST([STRICT_]PREFIX[FLAGS]) 11244AC_SUBST([BASE_]PREFIX[FLAGS]) 11245AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11246]) # XORG_STRICT_OPTION 11247 11248# XORG_DEFAULT_OPTIONS 11249# -------------------- 11250# Minimum version: 1.3.0 11251# 11252# Defines default options for X.Org modules. 11253# 11254AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11255AC_REQUIRE([AC_PROG_INSTALL]) 11256XORG_COMPILER_FLAGS 11257XORG_CWARNFLAGS 11258XORG_STRICT_OPTION 11259XORG_RELEASE_VERSION 11260XORG_CHANGELOG 11261XORG_INSTALL 11262XORG_MANPAGE_SECTIONS 11263m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11264 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11265]) # XORG_DEFAULT_OPTIONS 11266 11267# XORG_INSTALL() 11268# ---------------- 11269# Minimum version: 1.4.0 11270# 11271# Defines the variable INSTALL_CMD as the command to copy 11272# INSTALL from $prefix/share/util-macros. 11273# 11274AC_DEFUN([XORG_INSTALL], [ 11275AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11276macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11277INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11278mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11279|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 11280touch \$(top_srcdir)/INSTALL; \ 11281echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 11282AC_SUBST([INSTALL_CMD]) 11283]) # XORG_INSTALL 11284dnl Copyright 2005 Red Hat, Inc 11285dnl 11286dnl Permission to use, copy, modify, distribute, and sell this software and its 11287dnl documentation for any purpose is hereby granted without fee, provided that 11288dnl the above copyright notice appear in all copies and that both that 11289dnl copyright notice and this permission notice appear in supporting 11290dnl documentation. 11291dnl 11292dnl The above copyright notice and this permission notice shall be included 11293dnl in all copies or substantial portions of the Software. 11294dnl 11295dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11296dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11297dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11298dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11299dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11300dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11301dnl OTHER DEALINGS IN THE SOFTWARE. 11302dnl 11303dnl Except as contained in this notice, the name of the copyright holders shall 11304dnl not be used in advertising or otherwise to promote the sale, use or 11305dnl other dealings in this Software without prior written authorization 11306dnl from the copyright holders. 11307dnl 11308 11309# XORG_RELEASE_VERSION 11310# -------------------- 11311# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11312 11313AC_DEFUN([XORG_RELEASE_VERSION],[ 11314 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11315 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11316 [Major version of this package]) 11317 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11318 if test "x$PVM" = "x"; then 11319 PVM="0" 11320 fi 11321 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11322 [$PVM], 11323 [Minor version of this package]) 11324 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11325 if test "x$PVP" = "x"; then 11326 PVP="0" 11327 fi 11328 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11329 [$PVP], 11330 [Patch version of this package]) 11331]) 11332 11333# XORG_CHANGELOG() 11334# ---------------- 11335# Minimum version: 1.2.0 11336# 11337# Defines the variable CHANGELOG_CMD as the command to generate 11338# ChangeLog from git. 11339# 11340# 11341AC_DEFUN([XORG_CHANGELOG], [ 11342CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 11343mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11344|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 11345touch \$(top_srcdir)/ChangeLog; \ 11346echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 11347AC_SUBST([CHANGELOG_CMD]) 11348]) # XORG_CHANGELOG 11349 11350dnl Copyright 2005 Red Hat, Inc 11351dnl 11352dnl Permission to use, copy, modify, distribute, and sell this software and its 11353dnl documentation for any purpose is hereby granted without fee, provided that 11354dnl the above copyright notice appear in all copies and that both that 11355dnl copyright notice and this permission notice appear in supporting 11356dnl documentation. 11357dnl 11358dnl The above copyright notice and this permission notice shall be included 11359dnl in all copies or substantial portions of the Software. 11360dnl 11361dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11362dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11363dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11364dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11365dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11366dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11367dnl OTHER DEALINGS IN THE SOFTWARE. 11368dnl 11369dnl Except as contained in this notice, the name of the copyright holders shall 11370dnl not be used in advertising or otherwise to promote the sale, use or 11371dnl other dealings in this Software without prior written authorization 11372dnl from the copyright holders. 11373dnl 11374 11375# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11376# -------------------------- 11377# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11378# is defined, then add the given PROTO to $REQUIRED_MODULES. 11379 11380AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11381 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11382 SAVE_CFLAGS="$CFLAGS" 11383 CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11384 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11385#include "xorg-server.h" 11386#if !defined $1 11387#error $1 not defined 11388#endif 11389 ]])], 11390 [_EXT_CHECK=yes], 11391 [_EXT_CHECK=no]) 11392 CFLAGS="$SAVE_CFLAGS" 11393 AC_MSG_CHECKING([if $1 is defined]) 11394 AC_MSG_RESULT([$_EXT_CHECK]) 11395 if test "$_EXT_CHECK" != no; then 11396 REQUIRED_MODULES="$REQUIRED_MODULES $2" 11397 fi 11398]) 11399 11400# Copyright (C) 2002-2021 Free Software Foundation, Inc. 11401# 11402# This file is free software; the Free Software Foundation 11403# gives unlimited permission to copy and/or distribute it, 11404# with or without modifications, as long as this notice is preserved. 11405 11406# AM_AUTOMAKE_VERSION(VERSION) 11407# ---------------------------- 11408# Automake X.Y traces this macro to ensure aclocal.m4 has been 11409# generated from the m4 files accompanying Automake X.Y. 11410# (This private macro should not be called outside this file.) 11411AC_DEFUN([AM_AUTOMAKE_VERSION], 11412[am__api_version='1.16' 11413dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11414dnl require some minimum version. Point them to the right macro. 11415m4_if([$1], [1.16.5], [], 11416 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11417]) 11418 11419# _AM_AUTOCONF_VERSION(VERSION) 11420# ----------------------------- 11421# aclocal traces this macro to find the Autoconf version. 11422# This is a private macro too. Using m4_define simplifies 11423# the logic in aclocal, which can simply ignore this definition. 11424m4_define([_AM_AUTOCONF_VERSION], []) 11425 11426# AM_SET_CURRENT_AUTOMAKE_VERSION 11427# ------------------------------- 11428# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11429# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11430AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11431[AM_AUTOMAKE_VERSION([1.16.5])dnl 11432m4_ifndef([AC_AUTOCONF_VERSION], 11433 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11434_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11435 11436# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11437 11438# Copyright (C) 2001-2021 Free Software Foundation, Inc. 11439# 11440# This file is free software; the Free Software Foundation 11441# gives unlimited permission to copy and/or distribute it, 11442# with or without modifications, as long as this notice is preserved. 11443 11444# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11445# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11446# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11447# 11448# Of course, Automake must honor this variable whenever it calls a 11449# tool from the auxiliary directory. The problem is that $srcdir (and 11450# therefore $ac_aux_dir as well) can be either absolute or relative, 11451# depending on how configure is run. This is pretty annoying, since 11452# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11453# source directory, any form will work fine, but in subdirectories a 11454# relative path needs to be adjusted first. 11455# 11456# $ac_aux_dir/missing 11457# fails when called from a subdirectory if $ac_aux_dir is relative 11458# $top_srcdir/$ac_aux_dir/missing 11459# fails if $ac_aux_dir is absolute, 11460# fails when called from a subdirectory in a VPATH build with 11461# a relative $ac_aux_dir 11462# 11463# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11464# are both prefixed by $srcdir. In an in-source build this is usually 11465# harmless because $srcdir is '.', but things will broke when you 11466# start a VPATH build or use an absolute $srcdir. 11467# 11468# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11469# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11470# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11471# and then we would define $MISSING as 11472# MISSING="\${SHELL} $am_aux_dir/missing" 11473# This will work as long as MISSING is not called from configure, because 11474# unfortunately $(top_srcdir) has no meaning in configure. 11475# However there are other variables, like CC, which are often used in 11476# configure, and could therefore not use this "fixed" $ac_aux_dir. 11477# 11478# Another solution, used here, is to always expand $ac_aux_dir to an 11479# absolute PATH. The drawback is that using absolute paths prevent a 11480# configured tree to be moved without reconfiguration. 11481 11482AC_DEFUN([AM_AUX_DIR_EXPAND], 11483[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11484# Expand $ac_aux_dir to an absolute path. 11485am_aux_dir=`cd "$ac_aux_dir" && pwd` 11486]) 11487 11488# AM_CONDITIONAL -*- Autoconf -*- 11489 11490# Copyright (C) 1997-2021 Free Software Foundation, Inc. 11491# 11492# This file is free software; the Free Software Foundation 11493# gives unlimited permission to copy and/or distribute it, 11494# with or without modifications, as long as this notice is preserved. 11495 11496# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11497# ------------------------------------- 11498# Define a conditional. 11499AC_DEFUN([AM_CONDITIONAL], 11500[AC_PREREQ([2.52])dnl 11501 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11502 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11503AC_SUBST([$1_TRUE])dnl 11504AC_SUBST([$1_FALSE])dnl 11505_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11506_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11507m4_define([_AM_COND_VALUE_$1], [$2])dnl 11508if $2; then 11509 $1_TRUE= 11510 $1_FALSE='#' 11511else 11512 $1_TRUE='#' 11513 $1_FALSE= 11514fi 11515AC_CONFIG_COMMANDS_PRE( 11516[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11517 AC_MSG_ERROR([[conditional "$1" was never defined. 11518Usually this means the macro was only invoked conditionally.]]) 11519fi])]) 11520 11521# Copyright (C) 1999-2021 Free Software Foundation, Inc. 11522# 11523# This file is free software; the Free Software Foundation 11524# gives unlimited permission to copy and/or distribute it, 11525# with or without modifications, as long as this notice is preserved. 11526 11527 11528# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11529# written in clear, in which case automake, when reading aclocal.m4, 11530# will think it sees a *use*, and therefore will trigger all it's 11531# C support machinery. Also note that it means that autoscan, seeing 11532# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11533 11534 11535# _AM_DEPENDENCIES(NAME) 11536# ---------------------- 11537# See how the compiler implements dependency checking. 11538# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11539# We try a few techniques and use that to set a single cache variable. 11540# 11541# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11542# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11543# dependency, and given that the user is not expected to run this macro, 11544# just rely on AC_PROG_CC. 11545AC_DEFUN([_AM_DEPENDENCIES], 11546[AC_REQUIRE([AM_SET_DEPDIR])dnl 11547AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11548AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11549AC_REQUIRE([AM_DEP_TRACK])dnl 11550 11551m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11552 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11553 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11554 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11555 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11556 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11557 [depcc="$$1" am_compiler_list=]) 11558 11559AC_CACHE_CHECK([dependency style of $depcc], 11560 [am_cv_$1_dependencies_compiler_type], 11561[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11562 # We make a subdir and do the tests there. Otherwise we can end up 11563 # making bogus files that we don't know about and never remove. For 11564 # instance it was reported that on HP-UX the gcc test will end up 11565 # making a dummy file named 'D' -- because '-MD' means "put the output 11566 # in D". 11567 rm -rf conftest.dir 11568 mkdir conftest.dir 11569 # Copy depcomp to subdir because otherwise we won't find it if we're 11570 # using a relative directory. 11571 cp "$am_depcomp" conftest.dir 11572 cd conftest.dir 11573 # We will build objects and dependencies in a subdirectory because 11574 # it helps to detect inapplicable dependency modes. For instance 11575 # both Tru64's cc and ICC support -MD to output dependencies as a 11576 # side effect of compilation, but ICC will put the dependencies in 11577 # the current directory while Tru64 will put them in the object 11578 # directory. 11579 mkdir sub 11580 11581 am_cv_$1_dependencies_compiler_type=none 11582 if test "$am_compiler_list" = ""; then 11583 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11584 fi 11585 am__universal=false 11586 m4_case([$1], [CC], 11587 [case " $depcc " in #( 11588 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11589 esac], 11590 [CXX], 11591 [case " $depcc " in #( 11592 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11593 esac]) 11594 11595 for depmode in $am_compiler_list; do 11596 # Setup a source with many dependencies, because some compilers 11597 # like to wrap large dependency lists on column 80 (with \), and 11598 # we should not choose a depcomp mode which is confused by this. 11599 # 11600 # We need to recreate these files for each test, as the compiler may 11601 # overwrite some of them when testing with obscure command lines. 11602 # This happens at least with the AIX C compiler. 11603 : > sub/conftest.c 11604 for i in 1 2 3 4 5 6; do 11605 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11606 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11607 # Solaris 10 /bin/sh. 11608 echo '/* dummy */' > sub/conftst$i.h 11609 done 11610 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11611 11612 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11613 # mode. It turns out that the SunPro C++ compiler does not properly 11614 # handle '-M -o', and we need to detect this. Also, some Intel 11615 # versions had trouble with output in subdirs. 11616 am__obj=sub/conftest.${OBJEXT-o} 11617 am__minus_obj="-o $am__obj" 11618 case $depmode in 11619 gcc) 11620 # This depmode causes a compiler race in universal mode. 11621 test "$am__universal" = false || continue 11622 ;; 11623 nosideeffect) 11624 # After this tag, mechanisms are not by side-effect, so they'll 11625 # only be used when explicitly requested. 11626 if test "x$enable_dependency_tracking" = xyes; then 11627 continue 11628 else 11629 break 11630 fi 11631 ;; 11632 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11633 # This compiler won't grok '-c -o', but also, the minuso test has 11634 # not run yet. These depmodes are late enough in the game, and 11635 # so weak that their functioning should not be impacted. 11636 am__obj=conftest.${OBJEXT-o} 11637 am__minus_obj= 11638 ;; 11639 none) break ;; 11640 esac 11641 if depmode=$depmode \ 11642 source=sub/conftest.c object=$am__obj \ 11643 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11644 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11645 >/dev/null 2>conftest.err && 11646 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11647 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11648 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11649 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11650 # icc doesn't choke on unknown options, it will just issue warnings 11651 # or remarks (even with -Werror). So we grep stderr for any message 11652 # that says an option was ignored or not supported. 11653 # When given -MP, icc 7.0 and 7.1 complain thusly: 11654 # icc: Command line warning: ignoring option '-M'; no argument required 11655 # The diagnosis changed in icc 8.0: 11656 # icc: Command line remark: option '-MP' not supported 11657 if (grep 'ignoring option' conftest.err || 11658 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11659 am_cv_$1_dependencies_compiler_type=$depmode 11660 break 11661 fi 11662 fi 11663 done 11664 11665 cd .. 11666 rm -rf conftest.dir 11667else 11668 am_cv_$1_dependencies_compiler_type=none 11669fi 11670]) 11671AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11672AM_CONDITIONAL([am__fastdep$1], [ 11673 test "x$enable_dependency_tracking" != xno \ 11674 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11675]) 11676 11677 11678# AM_SET_DEPDIR 11679# ------------- 11680# Choose a directory name for dependency files. 11681# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11682AC_DEFUN([AM_SET_DEPDIR], 11683[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11684AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11685]) 11686 11687 11688# AM_DEP_TRACK 11689# ------------ 11690AC_DEFUN([AM_DEP_TRACK], 11691[AC_ARG_ENABLE([dependency-tracking], [dnl 11692AS_HELP_STRING( 11693 [--enable-dependency-tracking], 11694 [do not reject slow dependency extractors]) 11695AS_HELP_STRING( 11696 [--disable-dependency-tracking], 11697 [speeds up one-time build])]) 11698if test "x$enable_dependency_tracking" != xno; then 11699 am_depcomp="$ac_aux_dir/depcomp" 11700 AMDEPBACKSLASH='\' 11701 am__nodep='_no' 11702fi 11703AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11704AC_SUBST([AMDEPBACKSLASH])dnl 11705_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11706AC_SUBST([am__nodep])dnl 11707_AM_SUBST_NOTMAKE([am__nodep])dnl 11708]) 11709 11710# Generate code to set up dependency tracking. -*- Autoconf -*- 11711 11712# Copyright (C) 1999-2021 Free Software Foundation, Inc. 11713# 11714# This file is free software; the Free Software Foundation 11715# gives unlimited permission to copy and/or distribute it, 11716# with or without modifications, as long as this notice is preserved. 11717 11718# _AM_OUTPUT_DEPENDENCY_COMMANDS 11719# ------------------------------ 11720AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11721[{ 11722 # Older Autoconf quotes --file arguments for eval, but not when files 11723 # are listed without --file. Let's play safe and only enable the eval 11724 # if we detect the quoting. 11725 # TODO: see whether this extra hack can be removed once we start 11726 # requiring Autoconf 2.70 or later. 11727 AS_CASE([$CONFIG_FILES], 11728 [*\'*], [eval set x "$CONFIG_FILES"], 11729 [*], [set x $CONFIG_FILES]) 11730 shift 11731 # Used to flag and report bootstrapping failures. 11732 am_rc=0 11733 for am_mf 11734 do 11735 # Strip MF so we end up with the name of the file. 11736 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 11737 # Check whether this is an Automake generated Makefile which includes 11738 # dependency-tracking related rules and includes. 11739 # Grep'ing the whole file directly is not great: AIX grep has a line 11740 # limit of 2048, but all sed's we know have understand at least 4000. 11741 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 11742 || continue 11743 am_dirpart=`AS_DIRNAME(["$am_mf"])` 11744 am_filepart=`AS_BASENAME(["$am_mf"])` 11745 AM_RUN_LOG([cd "$am_dirpart" \ 11746 && sed -e '/# am--include-marker/d' "$am_filepart" \ 11747 | $MAKE -f - am--depfiles]) || am_rc=$? 11748 done 11749 if test $am_rc -ne 0; then 11750 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 11751 for automatic dependency tracking. If GNU make was not used, consider 11752 re-running the configure script with MAKE="gmake" (or whatever is 11753 necessary). You can also try re-running configure with the 11754 '--disable-dependency-tracking' option to at least be able to build 11755 the package (albeit without support for automatic dependency tracking).]) 11756 fi 11757 AS_UNSET([am_dirpart]) 11758 AS_UNSET([am_filepart]) 11759 AS_UNSET([am_mf]) 11760 AS_UNSET([am_rc]) 11761 rm -f conftest-deps.mk 11762} 11763])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11764 11765 11766# AM_OUTPUT_DEPENDENCY_COMMANDS 11767# ----------------------------- 11768# This macro should only be invoked once -- use via AC_REQUIRE. 11769# 11770# This code is only required when automatic dependency tracking is enabled. 11771# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 11772# order to bootstrap the dependency handling code. 11773AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11774[AC_CONFIG_COMMANDS([depfiles], 11775 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11776 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 11777 11778# Do all the work for Automake. -*- Autoconf -*- 11779 11780# Copyright (C) 1996-2021 Free Software Foundation, Inc. 11781# 11782# This file is free software; the Free Software Foundation 11783# gives unlimited permission to copy and/or distribute it, 11784# with or without modifications, as long as this notice is preserved. 11785 11786# This macro actually does too much. Some checks are only needed if 11787# your package does certain things. But this isn't really a big deal. 11788 11789dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11790m4_define([AC_PROG_CC], 11791m4_defn([AC_PROG_CC]) 11792[_AM_PROG_CC_C_O 11793]) 11794 11795# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11796# AM_INIT_AUTOMAKE([OPTIONS]) 11797# ----------------------------------------------- 11798# The call with PACKAGE and VERSION arguments is the old style 11799# call (pre autoconf-2.50), which is being phased out. PACKAGE 11800# and VERSION should now be passed to AC_INIT and removed from 11801# the call to AM_INIT_AUTOMAKE. 11802# We support both call styles for the transition. After 11803# the next Automake release, Autoconf can make the AC_INIT 11804# arguments mandatory, and then we can depend on a new Autoconf 11805# release and drop the old call support. 11806AC_DEFUN([AM_INIT_AUTOMAKE], 11807[AC_PREREQ([2.65])dnl 11808m4_ifdef([_$0_ALREADY_INIT], 11809 [m4_fatal([$0 expanded multiple times 11810]m4_defn([_$0_ALREADY_INIT]))], 11811 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 11812dnl Autoconf wants to disallow AM_ names. We explicitly allow 11813dnl the ones we care about. 11814m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11815AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11816AC_REQUIRE([AC_PROG_INSTALL])dnl 11817if test "`cd $srcdir && pwd`" != "`pwd`"; then 11818 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11819 # is not polluted with repeated "-I." 11820 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11821 # test to see if srcdir already configured 11822 if test -f $srcdir/config.status; then 11823 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11824 fi 11825fi 11826 11827# test whether we have cygpath 11828if test -z "$CYGPATH_W"; then 11829 if (cygpath --version) >/dev/null 2>/dev/null; then 11830 CYGPATH_W='cygpath -w' 11831 else 11832 CYGPATH_W=echo 11833 fi 11834fi 11835AC_SUBST([CYGPATH_W]) 11836 11837# Define the identity of the package. 11838dnl Distinguish between old-style and new-style calls. 11839m4_ifval([$2], 11840[AC_DIAGNOSE([obsolete], 11841 [$0: two- and three-arguments forms are deprecated.]) 11842m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11843 AC_SUBST([PACKAGE], [$1])dnl 11844 AC_SUBST([VERSION], [$2])], 11845[_AM_SET_OPTIONS([$1])dnl 11846dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11847m4_if( 11848 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 11849 [ok:ok],, 11850 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11851 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11852 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11853 11854_AM_IF_OPTION([no-define],, 11855[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11856 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11857 11858# Some tools Automake needs. 11859AC_REQUIRE([AM_SANITY_CHECK])dnl 11860AC_REQUIRE([AC_ARG_PROGRAM])dnl 11861AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11862AM_MISSING_PROG([AUTOCONF], [autoconf]) 11863AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11864AM_MISSING_PROG([AUTOHEADER], [autoheader]) 11865AM_MISSING_PROG([MAKEINFO], [makeinfo]) 11866AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11867AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11868AC_REQUIRE([AC_PROG_MKDIR_P])dnl 11869# For better backward compatibility. To be removed once Automake 1.9.x 11870# dies out for good. For more background, see: 11871# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11872# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11873AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11874# We need awk for the "check" target (and possibly the TAP driver). The 11875# system "awk" is bad on some platforms. 11876AC_REQUIRE([AC_PROG_AWK])dnl 11877AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11878AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11879_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11880 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11881 [_AM_PROG_TAR([v7])])]) 11882_AM_IF_OPTION([no-dependencies],, 11883[AC_PROVIDE_IFELSE([AC_PROG_CC], 11884 [_AM_DEPENDENCIES([CC])], 11885 [m4_define([AC_PROG_CC], 11886 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11887AC_PROVIDE_IFELSE([AC_PROG_CXX], 11888 [_AM_DEPENDENCIES([CXX])], 11889 [m4_define([AC_PROG_CXX], 11890 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11891AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11892 [_AM_DEPENDENCIES([OBJC])], 11893 [m4_define([AC_PROG_OBJC], 11894 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11895AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11896 [_AM_DEPENDENCIES([OBJCXX])], 11897 [m4_define([AC_PROG_OBJCXX], 11898 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11899]) 11900# Variables for tags utilities; see am/tags.am 11901if test -z "$CTAGS"; then 11902 CTAGS=ctags 11903fi 11904AC_SUBST([CTAGS]) 11905if test -z "$ETAGS"; then 11906 ETAGS=etags 11907fi 11908AC_SUBST([ETAGS]) 11909if test -z "$CSCOPE"; then 11910 CSCOPE=cscope 11911fi 11912AC_SUBST([CSCOPE]) 11913 11914AC_REQUIRE([AM_SILENT_RULES])dnl 11915dnl The testsuite driver may need to know about EXEEXT, so add the 11916dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11917dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11918AC_CONFIG_COMMANDS_PRE(dnl 11919[m4_provide_if([_AM_COMPILER_EXEEXT], 11920 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11921 11922# POSIX will say in a future version that running "rm -f" with no argument 11923# is OK; and we want to be able to make that assumption in our Makefile 11924# recipes. So use an aggressive probe to check that the usage we want is 11925# actually supported "in the wild" to an acceptable degree. 11926# See automake bug#10828. 11927# To make any issue more visible, cause the running configure to be aborted 11928# by default if the 'rm' program in use doesn't match our expectations; the 11929# user can still override this though. 11930if rm -f && rm -fr && rm -rf; then : OK; else 11931 cat >&2 <<'END' 11932Oops! 11933 11934Your 'rm' program seems unable to run without file operands specified 11935on the command line, even when the '-f' option is present. This is contrary 11936to the behaviour of most rm programs out there, and not conforming with 11937the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11938 11939Please tell bug-automake@gnu.org about your system, including the value 11940of your $PATH and any error possibly output before this message. This 11941can help us improve future automake versions. 11942 11943END 11944 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11945 echo 'Configuration will proceed anyway, since you have set the' >&2 11946 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11947 echo >&2 11948 else 11949 cat >&2 <<'END' 11950Aborting the configuration process, to ensure you take notice of the issue. 11951 11952You can download and install GNU coreutils to get an 'rm' implementation 11953that behaves properly: <https://www.gnu.org/software/coreutils/>. 11954 11955If you want to complete the configuration process using your problematic 11956'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11957to "yes", and re-run configure. 11958 11959END 11960 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11961 fi 11962fi 11963dnl The trailing newline in this macro's definition is deliberate, for 11964dnl backward compatibility and to allow trailing 'dnl'-style comments 11965dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11966]) 11967 11968dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11969dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11970dnl mangled by Autoconf and run in a shell conditional statement. 11971m4_define([_AC_COMPILER_EXEEXT], 11972m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11973 11974# When config.status generates a header, we must update the stamp-h file. 11975# This file resides in the same directory as the config header 11976# that is generated. The stamp files are numbered to have different names. 11977 11978# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11979# loop where config.status creates the headers, so we can generate 11980# our stamp files there. 11981AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11982[# Compute $1's index in $config_headers. 11983_am_arg=$1 11984_am_stamp_count=1 11985for _am_header in $config_headers :; do 11986 case $_am_header in 11987 $_am_arg | $_am_arg:* ) 11988 break ;; 11989 * ) 11990 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11991 esac 11992done 11993echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11994 11995# Copyright (C) 2001-2021 Free Software Foundation, Inc. 11996# 11997# This file is free software; the Free Software Foundation 11998# gives unlimited permission to copy and/or distribute it, 11999# with or without modifications, as long as this notice is preserved. 12000 12001# AM_PROG_INSTALL_SH 12002# ------------------ 12003# Define $install_sh. 12004AC_DEFUN([AM_PROG_INSTALL_SH], 12005[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12006if test x"${install_sh+set}" != xset; then 12007 case $am_aux_dir in 12008 *\ * | *\ *) 12009 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 12010 *) 12011 install_sh="\${SHELL} $am_aux_dir/install-sh" 12012 esac 12013fi 12014AC_SUBST([install_sh])]) 12015 12016# Copyright (C) 2003-2021 Free Software Foundation, Inc. 12017# 12018# This file is free software; the Free Software Foundation 12019# gives unlimited permission to copy and/or distribute it, 12020# with or without modifications, as long as this notice is preserved. 12021 12022# Check whether the underlying file-system supports filenames 12023# with a leading dot. For instance MS-DOS doesn't. 12024AC_DEFUN([AM_SET_LEADING_DOT], 12025[rm -rf .tst 2>/dev/null 12026mkdir .tst 2>/dev/null 12027if test -d .tst; then 12028 am__leading_dot=. 12029else 12030 am__leading_dot=_ 12031fi 12032rmdir .tst 2>/dev/null 12033AC_SUBST([am__leading_dot])]) 12034 12035# Check to see how 'make' treats includes. -*- Autoconf -*- 12036 12037# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12038# 12039# This file is free software; the Free Software Foundation 12040# gives unlimited permission to copy and/or distribute it, 12041# with or without modifications, as long as this notice is preserved. 12042 12043# AM_MAKE_INCLUDE() 12044# ----------------- 12045# Check whether make has an 'include' directive that can support all 12046# the idioms we need for our automatic dependency tracking code. 12047AC_DEFUN([AM_MAKE_INCLUDE], 12048[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 12049cat > confinc.mk << 'END' 12050am__doit: 12051 @echo this is the am__doit target >confinc.out 12052.PHONY: am__doit 12053END 12054am__include="#" 12055am__quote= 12056# BSD make does it like this. 12057echo '.include "confinc.mk" # ignored' > confmf.BSD 12058# Other make implementations (GNU, Solaris 10, AIX) do it like this. 12059echo 'include confinc.mk # ignored' > confmf.GNU 12060_am_result=no 12061for s in GNU BSD; do 12062 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 12063 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 12064 ['0:this is the am__doit target'], 12065 [AS_CASE([$s], 12066 [BSD], [am__include='.include' am__quote='"'], 12067 [am__include='include' am__quote=''])]) 12068 if test "$am__include" != "#"; then 12069 _am_result="yes ($s style)" 12070 break 12071 fi 12072done 12073rm -f confinc.* confmf.* 12074AC_MSG_RESULT([${_am_result}]) 12075AC_SUBST([am__include])]) 12076AC_SUBST([am__quote])]) 12077 12078# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12079 12080# Copyright (C) 1997-2021 Free Software Foundation, Inc. 12081# 12082# This file is free software; the Free Software Foundation 12083# gives unlimited permission to copy and/or distribute it, 12084# with or without modifications, as long as this notice is preserved. 12085 12086# AM_MISSING_PROG(NAME, PROGRAM) 12087# ------------------------------ 12088AC_DEFUN([AM_MISSING_PROG], 12089[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12090$1=${$1-"${am_missing_run}$2"} 12091AC_SUBST($1)]) 12092 12093# AM_MISSING_HAS_RUN 12094# ------------------ 12095# Define MISSING if not defined so far and test if it is modern enough. 12096# If it is, set am_missing_run to use it, otherwise, to nothing. 12097AC_DEFUN([AM_MISSING_HAS_RUN], 12098[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12099AC_REQUIRE_AUX_FILE([missing])dnl 12100if test x"${MISSING+set}" != xset; then 12101 MISSING="\${SHELL} '$am_aux_dir/missing'" 12102fi 12103# Use eval to expand $SHELL 12104if eval "$MISSING --is-lightweight"; then 12105 am_missing_run="$MISSING " 12106else 12107 am_missing_run= 12108 AC_MSG_WARN(['missing' script is too old or missing]) 12109fi 12110]) 12111 12112# Helper functions for option handling. -*- Autoconf -*- 12113 12114# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12115# 12116# This file is free software; the Free Software Foundation 12117# gives unlimited permission to copy and/or distribute it, 12118# with or without modifications, as long as this notice is preserved. 12119 12120# _AM_MANGLE_OPTION(NAME) 12121# ----------------------- 12122AC_DEFUN([_AM_MANGLE_OPTION], 12123[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12124 12125# _AM_SET_OPTION(NAME) 12126# -------------------- 12127# Set option NAME. Presently that only means defining a flag for this option. 12128AC_DEFUN([_AM_SET_OPTION], 12129[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12130 12131# _AM_SET_OPTIONS(OPTIONS) 12132# ------------------------ 12133# OPTIONS is a space-separated list of Automake options. 12134AC_DEFUN([_AM_SET_OPTIONS], 12135[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12136 12137# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12138# ------------------------------------------- 12139# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12140AC_DEFUN([_AM_IF_OPTION], 12141[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12142 12143# Copyright (C) 1999-2021 Free Software Foundation, Inc. 12144# 12145# This file is free software; the Free Software Foundation 12146# gives unlimited permission to copy and/or distribute it, 12147# with or without modifications, as long as this notice is preserved. 12148 12149# _AM_PROG_CC_C_O 12150# --------------- 12151# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12152# to automatically call this. 12153AC_DEFUN([_AM_PROG_CC_C_O], 12154[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12155AC_REQUIRE_AUX_FILE([compile])dnl 12156AC_LANG_PUSH([C])dnl 12157AC_CACHE_CHECK( 12158 [whether $CC understands -c and -o together], 12159 [am_cv_prog_cc_c_o], 12160 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12161 # Make sure it works both with $CC and with simple cc. 12162 # Following AC_PROG_CC_C_O, we do the test twice because some 12163 # compilers refuse to overwrite an existing .o file with -o, 12164 # though they will create one. 12165 am_cv_prog_cc_c_o=yes 12166 for am_i in 1 2; do 12167 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12168 && test -f conftest2.$ac_objext; then 12169 : OK 12170 else 12171 am_cv_prog_cc_c_o=no 12172 break 12173 fi 12174 done 12175 rm -f core conftest* 12176 unset am_i]) 12177if test "$am_cv_prog_cc_c_o" != yes; then 12178 # Losing compiler, so override with the script. 12179 # FIXME: It is wrong to rewrite CC. 12180 # But if we don't then we get into trouble of one sort or another. 12181 # A longer-term fix would be to have automake use am__CC in this case, 12182 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12183 CC="$am_aux_dir/compile $CC" 12184fi 12185AC_LANG_POP([C])]) 12186 12187# For backward compatibility. 12188AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12189 12190# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12191# 12192# This file is free software; the Free Software Foundation 12193# gives unlimited permission to copy and/or distribute it, 12194# with or without modifications, as long as this notice is preserved. 12195 12196# AM_RUN_LOG(COMMAND) 12197# ------------------- 12198# Run COMMAND, save the exit status in ac_status, and log it. 12199# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12200AC_DEFUN([AM_RUN_LOG], 12201[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12202 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12203 ac_status=$? 12204 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12205 (exit $ac_status); }]) 12206 12207# Check to make sure that the build environment is sane. -*- Autoconf -*- 12208 12209# Copyright (C) 1996-2021 Free Software Foundation, Inc. 12210# 12211# This file is free software; the Free Software Foundation 12212# gives unlimited permission to copy and/or distribute it, 12213# with or without modifications, as long as this notice is preserved. 12214 12215# AM_SANITY_CHECK 12216# --------------- 12217AC_DEFUN([AM_SANITY_CHECK], 12218[AC_MSG_CHECKING([whether build environment is sane]) 12219# Reject unsafe characters in $srcdir or the absolute working directory 12220# name. Accept space and tab only in the latter. 12221am_lf=' 12222' 12223case `pwd` in 12224 *[[\\\"\#\$\&\'\`$am_lf]]*) 12225 AC_MSG_ERROR([unsafe absolute working directory name]);; 12226esac 12227case $srcdir in 12228 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12229 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12230esac 12231 12232# Do 'set' in a subshell so we don't clobber the current shell's 12233# arguments. Must try -L first in case configure is actually a 12234# symlink; some systems play weird games with the mod time of symlinks 12235# (eg FreeBSD returns the mod time of the symlink's containing 12236# directory). 12237if ( 12238 am_has_slept=no 12239 for am_try in 1 2; do 12240 echo "timestamp, slept: $am_has_slept" > conftest.file 12241 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12242 if test "$[*]" = "X"; then 12243 # -L didn't work. 12244 set X `ls -t "$srcdir/configure" conftest.file` 12245 fi 12246 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12247 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12248 12249 # If neither matched, then we have a broken ls. This can happen 12250 # if, for instance, CONFIG_SHELL is bash and it inherits a 12251 # broken ls alias from the environment. This has actually 12252 # happened. Such a system could not be considered "sane". 12253 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12254 alias in your environment]) 12255 fi 12256 if test "$[2]" = conftest.file || test $am_try -eq 2; then 12257 break 12258 fi 12259 # Just in case. 12260 sleep 1 12261 am_has_slept=yes 12262 done 12263 test "$[2]" = conftest.file 12264 ) 12265then 12266 # Ok. 12267 : 12268else 12269 AC_MSG_ERROR([newly created file is older than distributed files! 12270Check your system clock]) 12271fi 12272AC_MSG_RESULT([yes]) 12273# If we didn't sleep, we still need to ensure time stamps of config.status and 12274# generated files are strictly newer. 12275am_sleep_pid= 12276if grep 'slept: no' conftest.file >/dev/null 2>&1; then 12277 ( sleep 1 ) & 12278 am_sleep_pid=$! 12279fi 12280AC_CONFIG_COMMANDS_PRE( 12281 [AC_MSG_CHECKING([that generated files are newer than configure]) 12282 if test -n "$am_sleep_pid"; then 12283 # Hide warnings about reused PIDs. 12284 wait $am_sleep_pid 2>/dev/null 12285 fi 12286 AC_MSG_RESULT([done])]) 12287rm -f conftest.file 12288]) 12289 12290# Copyright (C) 2009-2021 Free Software Foundation, Inc. 12291# 12292# This file is free software; the Free Software Foundation 12293# gives unlimited permission to copy and/or distribute it, 12294# with or without modifications, as long as this notice is preserved. 12295 12296# AM_SILENT_RULES([DEFAULT]) 12297# -------------------------- 12298# Enable less verbose build rules; with the default set to DEFAULT 12299# ("yes" being less verbose, "no" or empty being verbose). 12300AC_DEFUN([AM_SILENT_RULES], 12301[AC_ARG_ENABLE([silent-rules], [dnl 12302AS_HELP_STRING( 12303 [--enable-silent-rules], 12304 [less verbose build output (undo: "make V=1")]) 12305AS_HELP_STRING( 12306 [--disable-silent-rules], 12307 [verbose build output (undo: "make V=0")])dnl 12308]) 12309case $enable_silent_rules in @%:@ ((( 12310 yes) AM_DEFAULT_VERBOSITY=0;; 12311 no) AM_DEFAULT_VERBOSITY=1;; 12312 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12313esac 12314dnl 12315dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12316dnl do not support nested variable expansions. 12317dnl See automake bug#9928 and bug#10237. 12318am_make=${MAKE-make} 12319AC_CACHE_CHECK([whether $am_make supports nested variables], 12320 [am_cv_make_support_nested_variables], 12321 [if AS_ECHO([['TRUE=$(BAR$(V)) 12322BAR0=false 12323BAR1=true 12324V=1 12325am__doit: 12326 @$(TRUE) 12327.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12328 am_cv_make_support_nested_variables=yes 12329else 12330 am_cv_make_support_nested_variables=no 12331fi]) 12332if test $am_cv_make_support_nested_variables = yes; then 12333 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12334 AM_V='$(V)' 12335 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12336else 12337 AM_V=$AM_DEFAULT_VERBOSITY 12338 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12339fi 12340AC_SUBST([AM_V])dnl 12341AM_SUBST_NOTMAKE([AM_V])dnl 12342AC_SUBST([AM_DEFAULT_V])dnl 12343AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12344AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12345AM_BACKSLASH='\' 12346AC_SUBST([AM_BACKSLASH])dnl 12347_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12348]) 12349 12350# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12351# 12352# This file is free software; the Free Software Foundation 12353# gives unlimited permission to copy and/or distribute it, 12354# with or without modifications, as long as this notice is preserved. 12355 12356# AM_PROG_INSTALL_STRIP 12357# --------------------- 12358# One issue with vendor 'install' (even GNU) is that you can't 12359# specify the program used to strip binaries. This is especially 12360# annoying in cross-compiling environments, where the build's strip 12361# is unlikely to handle the host's binaries. 12362# Fortunately install-sh will honor a STRIPPROG variable, so we 12363# always use install-sh in "make install-strip", and initialize 12364# STRIPPROG with the value of the STRIP variable (set by the user). 12365AC_DEFUN([AM_PROG_INSTALL_STRIP], 12366[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12367# Installed binaries are usually stripped using 'strip' when the user 12368# run "make install-strip". However 'strip' might not be the right 12369# tool to use in cross-compilation environments, therefore Automake 12370# will honor the 'STRIP' environment variable to overrule this program. 12371dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12372if test "$cross_compiling" != no; then 12373 AC_CHECK_TOOL([STRIP], [strip], :) 12374fi 12375INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12376AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12377 12378# Copyright (C) 2006-2021 Free Software Foundation, Inc. 12379# 12380# This file is free software; the Free Software Foundation 12381# gives unlimited permission to copy and/or distribute it, 12382# with or without modifications, as long as this notice is preserved. 12383 12384# _AM_SUBST_NOTMAKE(VARIABLE) 12385# --------------------------- 12386# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12387# This macro is traced by Automake. 12388AC_DEFUN([_AM_SUBST_NOTMAKE]) 12389 12390# AM_SUBST_NOTMAKE(VARIABLE) 12391# -------------------------- 12392# Public sister of _AM_SUBST_NOTMAKE. 12393AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12394 12395# Check how to create a tarball. -*- Autoconf -*- 12396 12397# Copyright (C) 2004-2021 Free Software Foundation, Inc. 12398# 12399# This file is free software; the Free Software Foundation 12400# gives unlimited permission to copy and/or distribute it, 12401# with or without modifications, as long as this notice is preserved. 12402 12403# _AM_PROG_TAR(FORMAT) 12404# -------------------- 12405# Check how to create a tarball in format FORMAT. 12406# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12407# 12408# Substitute a variable $(am__tar) that is a command 12409# writing to stdout a FORMAT-tarball containing the directory 12410# $tardir. 12411# tardir=directory && $(am__tar) > result.tar 12412# 12413# Substitute a variable $(am__untar) that extract such 12414# a tarball read from stdin. 12415# $(am__untar) < result.tar 12416# 12417AC_DEFUN([_AM_PROG_TAR], 12418[# Always define AMTAR for backward compatibility. Yes, it's still used 12419# in the wild :-( We should find a proper way to deprecate it ... 12420AC_SUBST([AMTAR], ['$${TAR-tar}']) 12421 12422# We'll loop over all known methods to create a tar archive until one works. 12423_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12424 12425m4_if([$1], [v7], 12426 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12427 12428 [m4_case([$1], 12429 [ustar], 12430 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12431 # There is notably a 21 bits limit for the UID and the GID. In fact, 12432 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12433 # and bug#13588). 12434 am_max_uid=2097151 # 2^21 - 1 12435 am_max_gid=$am_max_uid 12436 # The $UID and $GID variables are not portable, so we need to resort 12437 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12438 # below are definitely unexpected, so allow the users to see them 12439 # (that is, avoid stderr redirection). 12440 am_uid=`id -u || echo unknown` 12441 am_gid=`id -g || echo unknown` 12442 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12443 if test $am_uid -le $am_max_uid; then 12444 AC_MSG_RESULT([yes]) 12445 else 12446 AC_MSG_RESULT([no]) 12447 _am_tools=none 12448 fi 12449 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12450 if test $am_gid -le $am_max_gid; then 12451 AC_MSG_RESULT([yes]) 12452 else 12453 AC_MSG_RESULT([no]) 12454 _am_tools=none 12455 fi], 12456 12457 [pax], 12458 [], 12459 12460 [m4_fatal([Unknown tar format])]) 12461 12462 AC_MSG_CHECKING([how to create a $1 tar archive]) 12463 12464 # Go ahead even if we have the value already cached. We do so because we 12465 # need to set the values for the 'am__tar' and 'am__untar' variables. 12466 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12467 12468 for _am_tool in $_am_tools; do 12469 case $_am_tool in 12470 gnutar) 12471 for _am_tar in tar gnutar gtar; do 12472 AM_RUN_LOG([$_am_tar --version]) && break 12473 done 12474 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12475 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12476 am__untar="$_am_tar -xf -" 12477 ;; 12478 plaintar) 12479 # Must skip GNU tar: if it does not support --format= it doesn't create 12480 # ustar tarball either. 12481 (tar --version) >/dev/null 2>&1 && continue 12482 am__tar='tar chf - "$$tardir"' 12483 am__tar_='tar chf - "$tardir"' 12484 am__untar='tar xf -' 12485 ;; 12486 pax) 12487 am__tar='pax -L -x $1 -w "$$tardir"' 12488 am__tar_='pax -L -x $1 -w "$tardir"' 12489 am__untar='pax -r' 12490 ;; 12491 cpio) 12492 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12493 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12494 am__untar='cpio -i -H $1 -d' 12495 ;; 12496 none) 12497 am__tar=false 12498 am__tar_=false 12499 am__untar=false 12500 ;; 12501 esac 12502 12503 # If the value was cached, stop now. We just wanted to have am__tar 12504 # and am__untar set. 12505 test -n "${am_cv_prog_tar_$1}" && break 12506 12507 # tar/untar a dummy directory, and stop if the command works. 12508 rm -rf conftest.dir 12509 mkdir conftest.dir 12510 echo GrepMe > conftest.dir/file 12511 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12512 rm -rf conftest.dir 12513 if test -s conftest.tar; then 12514 AM_RUN_LOG([$am__untar <conftest.tar]) 12515 AM_RUN_LOG([cat conftest.dir/file]) 12516 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12517 fi 12518 done 12519 rm -rf conftest.dir 12520 12521 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12522 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12523 12524AC_SUBST([am__tar]) 12525AC_SUBST([am__untar]) 12526]) # _AM_PROG_TAR 12527 12528