aclocal.m4 revision 5ec34c4c
1# generated automatically by aclocal 1.16.2 -*- Autoconf -*- 2 3# Copyright (C) 1996-2020 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.69],, 18[m4_warning([this file was generated for autoconf 2.69. 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-2015 Free Software Foundation, Inc. 26# Written by Gordon Matzigkeit, 1996 27# 28# This file is free software; the Free Software Foundation gives 29# unlimited permission to copy and/or distribute it, with or without 30# modifications, as long as this notice is preserved. 31 32m4_define([_LT_COPYING], [dnl 33# Copyright (C) 2014 Free Software Foundation, Inc. 34# This is free software; see the source for copying conditions. There is NO 35# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36 37# GNU Libtool is free software; you can redistribute it and/or modify 38# it under the terms of the GNU General Public License as published by 39# the Free Software Foundation; either version 2 of of the License, or 40# (at your option) any later version. 41# 42# As a special exception to the GNU General Public License, if you 43# distribute this file as part of a program or library that is built 44# using GNU Libtool, you may include this file under the same 45# distribution terms that you use for the rest of that program. 46# 47# GNU Libtool is distributed in the hope that it will be useful, but 48# WITHOUT ANY WARRANTY; without even the implied warranty of 49# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50# GNU General Public License for more details. 51# 52# You should have received a copy of the GNU General Public License 53# along with this program. If not, see <http://www.gnu.org/licenses/>. 54]) 55 56# serial 58 LT_INIT 57 58 59# LT_PREREQ(VERSION) 60# ------------------ 61# Complain and exit if this libtool version is less that VERSION. 62m4_defun([LT_PREREQ], 63[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64 [m4_default([$3], 65 [m4_fatal([Libtool version $1 or higher is required], 66 63)])], 67 [$2])]) 68 69 70# _LT_CHECK_BUILDDIR 71# ------------------ 72# Complain if the absolute build directory name contains unusual characters 73m4_defun([_LT_CHECK_BUILDDIR], 74[case `pwd` in 75 *\ * | *\ *) 76 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77esac 78]) 79 80 81# LT_INIT([OPTIONS]) 82# ------------------ 83AC_DEFUN([LT_INIT], 84[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86AC_BEFORE([$0], [LT_LANG])dnl 87AC_BEFORE([$0], [LT_OUTPUT])dnl 88AC_BEFORE([$0], [LTDL_INIT])dnl 89m4_require([_LT_CHECK_BUILDDIR])dnl 90 91dnl Autoconf doesn't catch unexpanded LT_ macros by default: 92m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95dnl unless we require an AC_DEFUNed macro: 96AC_REQUIRE([LTOPTIONS_VERSION])dnl 97AC_REQUIRE([LTSUGAR_VERSION])dnl 98AC_REQUIRE([LTVERSION_VERSION])dnl 99AC_REQUIRE([LTOBSOLETE_VERSION])dnl 100m4_require([_LT_PROG_LTMAIN])dnl 101 102_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103 104dnl Parse OPTIONS 105_LT_SET_OPTIONS([$0], [$1]) 106 107# This can be used to rebuild libtool when needed 108LIBTOOL_DEPS=$ltmain 109 110# Always use our own libtool. 111LIBTOOL='$(SHELL) $(top_builddir)/libtool' 112AC_SUBST(LIBTOOL)dnl 113 114_LT_SETUP 115 116# Only expand once: 117m4_define([LT_INIT]) 118])# LT_INIT 119 120# Old names: 121AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123dnl aclocal-1.4 backwards compatibility: 124dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126 127 128# _LT_PREPARE_CC_BASENAME 129# ----------------------- 130m4_defun([_LT_PREPARE_CC_BASENAME], [ 131# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132func_cc_basename () 133{ 134 for cc_temp in @S|@*""; do 135 case $cc_temp in 136 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138 \-*) ;; 139 *) break;; 140 esac 141 done 142 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143} 144])# _LT_PREPARE_CC_BASENAME 145 146 147# _LT_CC_BASENAME(CC) 148# ------------------- 149# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150# but that macro is also expanded into generated libtool script, which 151# arranges for $SED and $ECHO to be set by different means. 152m4_defun([_LT_CC_BASENAME], 153[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154AC_REQUIRE([_LT_DECL_SED])dnl 155AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156func_cc_basename $1 157cc_basename=$func_cc_basename_result 158]) 159 160 161# _LT_FILEUTILS_DEFAULTS 162# ---------------------- 163# It is okay to use these file commands and assume they have been set 164# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165m4_defun([_LT_FILEUTILS_DEFAULTS], 166[: ${CP="cp -f"} 167: ${MV="mv -f"} 168: ${RM="rm -f"} 169])# _LT_FILEUTILS_DEFAULTS 170 171 172# _LT_SETUP 173# --------- 174m4_defun([_LT_SETUP], 175[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176AC_REQUIRE([AC_CANONICAL_BUILD])dnl 177AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179 180_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181dnl 182_LT_DECL([], [host_alias], [0], [The host system])dnl 183_LT_DECL([], [host], [0])dnl 184_LT_DECL([], [host_os], [0])dnl 185dnl 186_LT_DECL([], [build_alias], [0], [The build system])dnl 187_LT_DECL([], [build], [0])dnl 188_LT_DECL([], [build_os], [0])dnl 189dnl 190AC_REQUIRE([AC_PROG_CC])dnl 191AC_REQUIRE([LT_PATH_LD])dnl 192AC_REQUIRE([LT_PATH_NM])dnl 193dnl 194AC_REQUIRE([AC_PROG_LN_S])dnl 195test -z "$LN_S" && LN_S="ln -s" 196_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197dnl 198AC_REQUIRE([LT_CMD_MAX_LEN])dnl 199_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201dnl 202m4_require([_LT_FILEUTILS_DEFAULTS])dnl 203m4_require([_LT_CHECK_SHELL_FEATURES])dnl 204m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205m4_require([_LT_CMD_RELOAD])dnl 206m4_require([_LT_CHECK_MAGIC_METHOD])dnl 207m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208m4_require([_LT_CMD_OLD_ARCHIVE])dnl 209m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210m4_require([_LT_WITH_SYSROOT])dnl 211m4_require([_LT_CMD_TRUNCATE])dnl 212 213_LT_CONFIG_LIBTOOL_INIT([ 214# See if we are running on zsh, and set the options that allow our 215# commands through without removal of \ escapes INIT. 216if test -n "\${ZSH_VERSION+set}"; then 217 setopt NO_GLOB_SUBST 218fi 219]) 220if test -n "${ZSH_VERSION+set}"; then 221 setopt NO_GLOB_SUBST 222fi 223 224_LT_CHECK_OBJDIR 225 226m4_require([_LT_TAG_COMPILER])dnl 227 228case $host_os in 229aix3*) 230 # AIX sometimes has problems with the GCC collect2 program. For some 231 # reason, if we set the COLLECT_NAMES environment variable, the problems 232 # vanish in a puff of smoke. 233 if test set != "${COLLECT_NAMES+set}"; then 234 COLLECT_NAMES= 235 export COLLECT_NAMES 236 fi 237 ;; 238esac 239 240# Global variables: 241ofile=libtool 242can_build_shared=yes 243 244# All known linkers require a '.a' archive for static linking (except MSVC, 245# which needs '.lib'). 246libext=a 247 248with_gnu_ld=$lt_cv_prog_gnu_ld 249 250old_CC=$CC 251old_CFLAGS=$CFLAGS 252 253# Set sane defaults for various variables 254test -z "$CC" && CC=cc 255test -z "$LTCC" && LTCC=$CC 256test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257test -z "$LD" && LD=ld 258test -z "$ac_objext" && ac_objext=o 259 260_LT_CC_BASENAME([$compiler]) 261 262# Only perform the check for file, if the check method requires it 263test -z "$MAGIC_CMD" && MAGIC_CMD=file 264case $deplibs_check_method in 265file_magic*) 266 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267 _LT_PATH_MAGIC 268 fi 269 ;; 270esac 271 272# Use C for the default configuration in the libtool script 273LT_SUPPORTED_TAG([CC]) 274_LT_LANG_C_CONFIG 275_LT_LANG_DEFAULT_CONFIG 276_LT_CONFIG_COMMANDS 277])# _LT_SETUP 278 279 280# _LT_PREPARE_SED_QUOTE_VARS 281# -------------------------- 282# Define a few sed substitution that help us do robust quoting. 283m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284[# Backslashify metacharacters that are still active within 285# double-quoted strings. 286sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287 288# Same as above, but do not quote variable references. 289double_quote_subst='s/\([["`\\]]\)/\\\1/g' 290 291# Sed substitution to delay expansion of an escaped shell variable in a 292# double_quote_subst'ed string. 293delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294 295# Sed substitution to delay expansion of an escaped single quote. 296delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297 298# Sed substitution to avoid accidental globbing in evaled expressions 299no_glob_subst='s/\*/\\\*/g' 300]) 301 302# _LT_PROG_LTMAIN 303# --------------- 304# Note that this code is called both from 'configure', and 'config.status' 305# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307# so we pass a copy along to make sure it has a sensible value anyway. 308m4_defun([_LT_PROG_LTMAIN], 309[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311ltmain=$ac_aux_dir/ltmain.sh 312])# _LT_PROG_LTMAIN 313 314 315 316# So that we can recreate a full libtool script including additional 317# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318# in macros and then make a single call at the end using the 'libtool' 319# label. 320 321 322# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323# ---------------------------------------- 324# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325m4_define([_LT_CONFIG_LIBTOOL_INIT], 326[m4_ifval([$1], 327 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328 [$1 329])])]) 330 331# Initialize. 332m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333 334 335# _LT_CONFIG_LIBTOOL([COMMANDS]) 336# ------------------------------ 337# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338m4_define([_LT_CONFIG_LIBTOOL], 339[m4_ifval([$1], 340 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341 [$1 342])])]) 343 344# Initialize. 345m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346 347 348# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349# ----------------------------------------------------- 350m4_defun([_LT_CONFIG_SAVE_COMMANDS], 351[_LT_CONFIG_LIBTOOL([$1]) 352_LT_CONFIG_LIBTOOL_INIT([$2]) 353]) 354 355 356# _LT_FORMAT_COMMENT([COMMENT]) 357# ----------------------------- 358# Add leading comment marks to the start of each line, and a trailing 359# full-stop to the whole comment if one is not present already. 360m4_define([_LT_FORMAT_COMMENT], 361[m4_ifval([$1], [ 362m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364)]) 365 366 367 368 369 370# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371# ------------------------------------------------------------------- 372# CONFIGNAME is the name given to the value in the libtool script. 373# VARNAME is the (base) name used in the configure script. 374# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375# VARNAME. Any other value will be used directly. 376m4_define([_LT_DECL], 377[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379 [m4_ifval([$1], [$1], [$2])]) 380 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381 m4_ifval([$4], 382 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383 lt_dict_add_subkey([lt_decl_dict], [$2], 384 [tagged?], [m4_ifval([$5], [yes], [no])])]) 385]) 386 387 388# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389# -------------------------------------------------------- 390m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391 392 393# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394# ------------------------------------------------ 395m4_define([lt_decl_tag_varnames], 396[_lt_decl_filter([tagged?], [yes], $@)]) 397 398 399# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400# --------------------------------------------------------- 401m4_define([_lt_decl_filter], 402[m4_case([$#], 403 [0], [m4_fatal([$0: too few arguments: $#])], 404 [1], [m4_fatal([$0: too few arguments: $#: $1])], 405 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408]) 409 410 411# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412# -------------------------------------------------- 413m4_define([lt_decl_quote_varnames], 414[_lt_decl_filter([value], [1], $@)]) 415 416 417# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418# --------------------------------------------------- 419m4_define([lt_decl_dquote_varnames], 420[_lt_decl_filter([value], [2], $@)]) 421 422 423# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424# --------------------------------------------------- 425m4_define([lt_decl_varnames_tagged], 426[m4_assert([$# <= 2])dnl 427_$0(m4_quote(m4_default([$1], [[, ]])), 428 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430m4_define([_lt_decl_varnames_tagged], 431[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432 433 434# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435# ------------------------------------------------ 436m4_define([lt_decl_all_varnames], 437[_$0(m4_quote(m4_default([$1], [[, ]])), 438 m4_if([$2], [], 439 m4_quote(lt_decl_varnames), 440 m4_quote(m4_shift($@))))[]dnl 441]) 442m4_define([_lt_decl_all_varnames], 443[lt_join($@, lt_decl_varnames_tagged([$1], 444 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445]) 446 447 448# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449# ------------------------------------ 450# Quote a variable value, and forward it to 'config.status' so that its 451# declaration there will have the same value as in 'configure'. VARNAME 452# must have a single quote delimited value for this to work. 453m4_define([_LT_CONFIG_STATUS_DECLARE], 454[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455 456 457# _LT_CONFIG_STATUS_DECLARATIONS 458# ------------------------------ 459# We delimit libtool config variables with single quotes, so when 460# we write them to config.status, we have to be sure to quote all 461# embedded single quotes properly. In configure, this macro expands 462# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463# 464# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468 469 470# _LT_LIBTOOL_TAGS 471# ---------------- 472# Output comment and list of tags supported by the script 473m4_defun([_LT_LIBTOOL_TAGS], 474[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475available_tags='_LT_TAGS'dnl 476]) 477 478 479# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480# ----------------------------------- 481# Extract the dictionary values for VARNAME (optionally with TAG) and 482# expand to a commented shell variable setting: 483# 484# # Some comment about what VAR is for. 485# visible_name=$lt_internal_name 486m4_define([_LT_LIBTOOL_DECLARE], 487[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488 [description])))[]dnl 489m4_pushdef([_libtool_name], 490 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492 [0], [_libtool_name=[$]$1], 493 [1], [_libtool_name=$lt_[]$1], 494 [2], [_libtool_name=$lt_[]$1], 495 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497]) 498 499 500# _LT_LIBTOOL_CONFIG_VARS 501# ----------------------- 502# Produce commented declarations of non-tagged libtool config variables 503# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505# section) are produced by _LT_LIBTOOL_TAG_VARS. 506m4_defun([_LT_LIBTOOL_CONFIG_VARS], 507[m4_foreach([_lt_var], 508 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510 511 512# _LT_LIBTOOL_TAG_VARS(TAG) 513# ------------------------- 514m4_define([_LT_LIBTOOL_TAG_VARS], 515[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517 518 519# _LT_TAGVAR(VARNAME, [TAGNAME]) 520# ------------------------------ 521m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522 523 524# _LT_CONFIG_COMMANDS 525# ------------------- 526# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527# variables for single and double quote escaping we saved from calls 528# to _LT_DECL, we can put quote escaped variables declarations 529# into 'config.status', and then the shell code to quote escape them in 530# for loops in 'config.status'. Finally, any additional code accumulated 531# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532m4_defun([_LT_CONFIG_COMMANDS], 533[AC_PROVIDE_IFELSE([LT_OUTPUT], 534 dnl If the libtool generation code has been placed in $CONFIG_LT, 535 dnl instead of duplicating it all over again into config.status, 536 dnl then we will have config.status run $CONFIG_LT later, so it 537 dnl needs to know what name is stored there: 538 [AC_CONFIG_COMMANDS([libtool], 539 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540 dnl If the libtool generation code is destined for config.status, 541 dnl expand the accumulated commands and init code now: 542 [AC_CONFIG_COMMANDS([libtool], 543 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544])#_LT_CONFIG_COMMANDS 545 546 547# Initialize. 548m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549[ 550 551# The HP-UX ksh and POSIX shell print the target directory to stdout 552# if CDPATH is set. 553(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554 555sed_quote_subst='$sed_quote_subst' 556double_quote_subst='$double_quote_subst' 557delay_variable_subst='$delay_variable_subst' 558_LT_CONFIG_STATUS_DECLARATIONS 559LTCC='$LTCC' 560LTCFLAGS='$LTCFLAGS' 561compiler='$compiler_DEFAULT' 562 563# A function that is used when there is no print builtin or printf. 564func_fallback_echo () 565{ 566 eval 'cat <<_LTECHO_EOF 567\$[]1 568_LTECHO_EOF' 569} 570 571# Quote evaled strings. 572for var in lt_decl_all_varnames([[ \ 573]], lt_decl_quote_varnames); do 574 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575 *[[\\\\\\\`\\"\\\$]]*) 576 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577 ;; 578 *) 579 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580 ;; 581 esac 582done 583 584# Double-quote double-evaled strings. 585for var in lt_decl_all_varnames([[ \ 586]], lt_decl_dquote_varnames); do 587 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588 *[[\\\\\\\`\\"\\\$]]*) 589 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590 ;; 591 *) 592 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593 ;; 594 esac 595done 596 597_LT_OUTPUT_LIBTOOL_INIT 598]) 599 600# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601# ------------------------------------ 602# Generate a child script FILE with all initialization necessary to 603# reuse the environment learned by the parent script, and make the 604# file executable. If COMMENT is supplied, it is inserted after the 605# '#!' sequence but before initialization text begins. After this 606# macro, additional text can be appended to FILE to form the body of 607# the child script. The macro ends with non-zero status if the 608# file could not be fully written (such as if the disk is full). 609m4_ifdef([AS_INIT_GENERATED], 610[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611[m4_defun([_LT_GENERATED_FILE_INIT], 612[m4_require([AS_PREPARE])]dnl 613[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614[lt_write_fail=0 615cat >$1 <<_ASEOF || lt_write_fail=1 616#! $SHELL 617# Generated by $as_me. 618$2 619SHELL=\${CONFIG_SHELL-$SHELL} 620export SHELL 621_ASEOF 622cat >>$1 <<\_ASEOF || lt_write_fail=1 623AS_SHELL_SANITIZE 624_AS_PREPARE 625exec AS_MESSAGE_FD>&1 626_ASEOF 627test 0 = "$lt_write_fail" && chmod +x $1[]dnl 628m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629 630# LT_OUTPUT 631# --------- 632# This macro allows early generation of the libtool script (before 633# AC_OUTPUT is called), incase it is used in configure for compilation 634# tests. 635AC_DEFUN([LT_OUTPUT], 636[: ${CONFIG_LT=./config.lt} 637AC_MSG_NOTICE([creating $CONFIG_LT]) 638_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639[# Run this file to recreate a libtool stub with the current configuration.]) 640 641cat >>"$CONFIG_LT" <<\_LTEOF 642lt_cl_silent=false 643exec AS_MESSAGE_LOG_FD>>config.log 644{ 645 echo 646 AS_BOX([Running $as_me.]) 647} >&AS_MESSAGE_LOG_FD 648 649lt_cl_help="\ 650'$as_me' creates a local libtool stub from the current configuration, 651for use in further configure time tests before the real libtool is 652generated. 653 654Usage: $[0] [[OPTIONS]] 655 656 -h, --help print this help, then exit 657 -V, --version print version number, then exit 658 -q, --quiet do not print progress messages 659 -d, --debug don't remove temporary files 660 661Report bugs to <bug-libtool@gnu.org>." 662 663lt_cl_version="\ 664m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666configured by $[0], generated by m4_PACKAGE_STRING. 667 668Copyright (C) 2011 Free Software Foundation, Inc. 669This config.lt script is free software; the Free Software Foundation 670gives unlimited permision to copy, distribute and modify it." 671 672while test 0 != $[#] 673do 674 case $[1] in 675 --version | --v* | -V ) 676 echo "$lt_cl_version"; exit 0 ;; 677 --help | --h* | -h ) 678 echo "$lt_cl_help"; exit 0 ;; 679 --debug | --d* | -d ) 680 debug=: ;; 681 --quiet | --q* | --silent | --s* | -q ) 682 lt_cl_silent=: ;; 683 684 -*) AC_MSG_ERROR([unrecognized option: $[1] 685Try '$[0] --help' for more information.]) ;; 686 687 *) AC_MSG_ERROR([unrecognized argument: $[1] 688Try '$[0] --help' for more information.]) ;; 689 esac 690 shift 691done 692 693if $lt_cl_silent; then 694 exec AS_MESSAGE_FD>/dev/null 695fi 696_LTEOF 697 698cat >>"$CONFIG_LT" <<_LTEOF 699_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700_LTEOF 701 702cat >>"$CONFIG_LT" <<\_LTEOF 703AC_MSG_NOTICE([creating $ofile]) 704_LT_OUTPUT_LIBTOOL_COMMANDS 705AS_EXIT(0) 706_LTEOF 707chmod +x "$CONFIG_LT" 708 709# configure is writing to config.log, but config.lt does its own redirection, 710# appending to config.log, which fails on DOS, as config.log is still kept 711# open by configure. Here we exec the FD to /dev/null, effectively closing 712# config.log, so it can be properly (re)opened and appended to by config.lt. 713lt_cl_success=: 714test yes = "$silent" && 715 lt_config_lt_args="$lt_config_lt_args --quiet" 716exec AS_MESSAGE_LOG_FD>/dev/null 717$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718exec AS_MESSAGE_LOG_FD>>config.log 719$lt_cl_success || AS_EXIT(1) 720])# LT_OUTPUT 721 722 723# _LT_CONFIG(TAG) 724# --------------- 725# If TAG is the built-in tag, create an initial libtool script with a 726# default configuration from the untagged config vars. Otherwise add code 727# to config.status for appending the configuration named by TAG from the 728# matching tagged config vars. 729m4_defun([_LT_CONFIG], 730[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731_LT_CONFIG_SAVE_COMMANDS([ 732 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733 m4_if(_LT_TAG, [C], [ 734 # See if we are running on zsh, and set the options that allow our 735 # commands through without removal of \ escapes. 736 if test -n "${ZSH_VERSION+set}"; then 737 setopt NO_GLOB_SUBST 738 fi 739 740 cfgfile=${ofile}T 741 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742 $RM "$cfgfile" 743 744 cat <<_LT_EOF >> "$cfgfile" 745#! $SHELL 746# Generated automatically by $as_me ($PACKAGE) $VERSION 747# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749 750# Provide generalized library-building support services. 751# Written by Gordon Matzigkeit, 1996 752 753_LT_COPYING 754_LT_LIBTOOL_TAGS 755 756# Configured defaults for sys_lib_dlsearch_path munging. 757: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758 759# ### BEGIN LIBTOOL CONFIG 760_LT_LIBTOOL_CONFIG_VARS 761_LT_LIBTOOL_TAG_VARS 762# ### END LIBTOOL CONFIG 763 764_LT_EOF 765 766 cat <<'_LT_EOF' >> "$cfgfile" 767 768# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769 770_LT_PREPARE_MUNGE_PATH_LIST 771_LT_PREPARE_CC_BASENAME 772 773# ### END FUNCTIONS SHARED WITH CONFIGURE 774 775_LT_EOF 776 777 case $host_os in 778 aix3*) 779 cat <<\_LT_EOF >> "$cfgfile" 780# AIX sometimes has problems with the GCC collect2 program. For some 781# reason, if we set the COLLECT_NAMES environment variable, the problems 782# vanish in a puff of smoke. 783if test set != "${COLLECT_NAMES+set}"; then 784 COLLECT_NAMES= 785 export COLLECT_NAMES 786fi 787_LT_EOF 788 ;; 789 esac 790 791 _LT_PROG_LTMAIN 792 793 # We use sed instead of cat because bash on DJGPP gets confused if 794 # if finds mixed CR/LF and LF-only lines. Since sed operates in 795 # text mode, it properly converts lines to CR/LF. This bash problem 796 # is reportedly fixed, but why not run on old versions too? 797 sed '$q' "$ltmain" >> "$cfgfile" \ 798 || (rm -f "$cfgfile"; exit 1) 799 800 mv -f "$cfgfile" "$ofile" || 801 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802 chmod +x "$ofile" 803], 804[cat <<_LT_EOF >> "$ofile" 805 806dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807dnl in a comment (ie after a #). 808# ### BEGIN LIBTOOL TAG CONFIG: $1 809_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810# ### END LIBTOOL TAG CONFIG: $1 811_LT_EOF 812])dnl /m4_if 813], 814[m4_if([$1], [], [ 815 PACKAGE='$PACKAGE' 816 VERSION='$VERSION' 817 RM='$RM' 818 ofile='$ofile'], []) 819])dnl /_LT_CONFIG_SAVE_COMMANDS 820])# _LT_CONFIG 821 822 823# LT_SUPPORTED_TAG(TAG) 824# --------------------- 825# Trace this macro to discover what tags are supported by the libtool 826# --tag option, using: 827# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828AC_DEFUN([LT_SUPPORTED_TAG], []) 829 830 831# C support is built-in for now 832m4_define([_LT_LANG_C_enabled], []) 833m4_define([_LT_TAGS], []) 834 835 836# LT_LANG(LANG) 837# ------------- 838# Enable libtool support for the given language if not already enabled. 839AC_DEFUN([LT_LANG], 840[AC_BEFORE([$0], [LT_OUTPUT])dnl 841m4_case([$1], 842 [C], [_LT_LANG(C)], 843 [C++], [_LT_LANG(CXX)], 844 [Go], [_LT_LANG(GO)], 845 [Java], [_LT_LANG(GCJ)], 846 [Fortran 77], [_LT_LANG(F77)], 847 [Fortran], [_LT_LANG(FC)], 848 [Windows Resource], [_LT_LANG(RC)], 849 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850 [_LT_LANG($1)], 851 [m4_fatal([$0: unsupported language: "$1"])])])dnl 852])# LT_LANG 853 854 855# _LT_LANG(LANGNAME) 856# ------------------ 857m4_defun([_LT_LANG], 858[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859 [LT_SUPPORTED_TAG([$1])dnl 860 m4_append([_LT_TAGS], [$1 ])dnl 861 m4_define([_LT_LANG_]$1[_enabled], [])dnl 862 _LT_LANG_$1_CONFIG($1)])dnl 863])# _LT_LANG 864 865 866m4_ifndef([AC_PROG_GO], [ 867# NOTE: This macro has been submitted for inclusion into # 868# GNU Autoconf as AC_PROG_GO. When it is available in # 869# a released version of Autoconf we should remove this # 870# macro and use it instead. # 871m4_defun([AC_PROG_GO], 872[AC_LANG_PUSH(Go)dnl 873AC_ARG_VAR([GOC], [Go compiler command])dnl 874AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875_AC_ARG_VAR_LDFLAGS()dnl 876AC_CHECK_TOOL(GOC, gccgo) 877if test -z "$GOC"; then 878 if test -n "$ac_tool_prefix"; then 879 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880 fi 881fi 882if test -z "$GOC"; then 883 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884fi 885])#m4_defun 886])#m4_ifndef 887 888 889# _LT_LANG_DEFAULT_CONFIG 890# ----------------------- 891m4_defun([_LT_LANG_DEFAULT_CONFIG], 892[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893 [LT_LANG(CXX)], 894 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895 896AC_PROVIDE_IFELSE([AC_PROG_F77], 897 [LT_LANG(F77)], 898 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899 900AC_PROVIDE_IFELSE([AC_PROG_FC], 901 [LT_LANG(FC)], 902 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903 904dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905dnl pulling things in needlessly. 906AC_PROVIDE_IFELSE([AC_PROG_GCJ], 907 [LT_LANG(GCJ)], 908 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909 [LT_LANG(GCJ)], 910 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911 [LT_LANG(GCJ)], 912 [m4_ifdef([AC_PROG_GCJ], 913 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914 m4_ifdef([A][M_PROG_GCJ], 915 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916 m4_ifdef([LT_PROG_GCJ], 917 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918 919AC_PROVIDE_IFELSE([AC_PROG_GO], 920 [LT_LANG(GO)], 921 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922 923AC_PROVIDE_IFELSE([LT_PROG_RC], 924 [LT_LANG(RC)], 925 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926])# _LT_LANG_DEFAULT_CONFIG 927 928# Obsolete macros: 929AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934dnl aclocal-1.4 backwards compatibility: 935dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936dnl AC_DEFUN([AC_LIBTOOL_F77], []) 937dnl AC_DEFUN([AC_LIBTOOL_FC], []) 938dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939dnl AC_DEFUN([AC_LIBTOOL_RC], []) 940 941 942# _LT_TAG_COMPILER 943# ---------------- 944m4_defun([_LT_TAG_COMPILER], 945[AC_REQUIRE([AC_PROG_CC])dnl 946 947_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951 952# If no C compiler was specified, use CC. 953LTCC=${LTCC-"$CC"} 954 955# If no C compiler flags were specified, use CFLAGS. 956LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957 958# Allow CC to be a program name with arguments. 959compiler=$CC 960])# _LT_TAG_COMPILER 961 962 963# _LT_COMPILER_BOILERPLATE 964# ------------------------ 965# Check for compiler boilerplate output or warnings with 966# the simple compiler test code. 967m4_defun([_LT_COMPILER_BOILERPLATE], 968[m4_require([_LT_DECL_SED])dnl 969ac_outfile=conftest.$ac_objext 970echo "$lt_simple_compile_test_code" >conftest.$ac_ext 971eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972_lt_compiler_boilerplate=`cat conftest.err` 973$RM conftest* 974])# _LT_COMPILER_BOILERPLATE 975 976 977# _LT_LINKER_BOILERPLATE 978# ---------------------- 979# Check for linker boilerplate output or warnings with 980# the simple link test code. 981m4_defun([_LT_LINKER_BOILERPLATE], 982[m4_require([_LT_DECL_SED])dnl 983ac_outfile=conftest.$ac_objext 984echo "$lt_simple_link_test_code" >conftest.$ac_ext 985eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986_lt_linker_boilerplate=`cat conftest.err` 987$RM -r conftest* 988])# _LT_LINKER_BOILERPLATE 989 990# _LT_REQUIRED_DARWIN_CHECKS 991# ------------------------- 992m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993 case $host_os in 994 rhapsody* | darwin*) 995 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997 AC_CHECK_TOOL([LIPO], [lipo], [:]) 998 AC_CHECK_TOOL([OTOOL], [otool], [:]) 999 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000 _LT_DECL([], [DSYMUTIL], [1], 1001 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002 _LT_DECL([], [NMEDIT], [1], 1003 [Tool to change global to local symbols on Mac OS X]) 1004 _LT_DECL([], [LIPO], [1], 1005 [Tool to manipulate fat objects and archives on Mac OS X]) 1006 _LT_DECL([], [OTOOL], [1], 1007 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008 _LT_DECL([], [OTOOL64], [1], 1009 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010 1011 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012 [lt_cv_apple_cc_single_mod=no 1013 if test -z "$LT_MULTI_MODULE"; then 1014 # By default we will add the -single_module flag. You can override 1015 # by either setting the environment variable LT_MULTI_MODULE 1016 # non-empty at configure time, or by adding -multi_module to the 1017 # link flags. 1018 rm -rf libconftest.dylib* 1019 echo "int foo(void){return 1;}" > conftest.c 1020 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024 _lt_result=$? 1025 # If there is a non-empty error log, and "single_module" 1026 # appears in it, assume the flag caused a linker warning 1027 if test -s conftest.err && $GREP single_module conftest.err; then 1028 cat conftest.err >&AS_MESSAGE_LOG_FD 1029 # Otherwise, if the output was created with a 0 exit code from 1030 # the compiler, it worked. 1031 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032 lt_cv_apple_cc_single_mod=yes 1033 else 1034 cat conftest.err >&AS_MESSAGE_LOG_FD 1035 fi 1036 rm -rf libconftest.dylib* 1037 rm -f conftest.* 1038 fi]) 1039 1040 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041 [lt_cv_ld_exported_symbols_list], 1042 [lt_cv_ld_exported_symbols_list=no 1043 save_LDFLAGS=$LDFLAGS 1044 echo "_main" > conftest.sym 1045 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047 [lt_cv_ld_exported_symbols_list=yes], 1048 [lt_cv_ld_exported_symbols_list=no]) 1049 LDFLAGS=$save_LDFLAGS 1050 ]) 1051 1052 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053 [lt_cv_ld_force_load=no 1054 cat > conftest.c << _LT_EOF 1055int forced_loaded() { return 2;} 1056_LT_EOF 1057 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063 cat > conftest.c << _LT_EOF 1064int main() { return 0;} 1065_LT_EOF 1066 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068 _lt_result=$? 1069 if test -s conftest.err && $GREP force_load conftest.err; then 1070 cat conftest.err >&AS_MESSAGE_LOG_FD 1071 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072 lt_cv_ld_force_load=yes 1073 else 1074 cat conftest.err >&AS_MESSAGE_LOG_FD 1075 fi 1076 rm -f conftest.err libconftest.a conftest conftest.c 1077 rm -rf conftest.dSYM 1078 ]) 1079 case $host_os in 1080 rhapsody* | darwin1.[[012]]) 1081 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082 darwin1.*) 1083 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084 darwin*) # darwin 5.x on 1085 # if running on 10.5 or later, the deployment target defaults 1086 # to the OS version, if on x86, and 10.4, the deployment 1087 # target defaults to 10.4. Don't you love it? 1088 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091 10.[[012]][[,.]]*) 1092 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093 10.*) 1094 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095 esac 1096 ;; 1097 esac 1098 if test yes = "$lt_cv_apple_cc_single_mod"; then 1099 _lt_dar_single_mod='$single_module' 1100 fi 1101 if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103 else 1104 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105 fi 1106 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107 _lt_dsymutil='~$DSYMUTIL $lib || :' 1108 else 1109 _lt_dsymutil= 1110 fi 1111 ;; 1112 esac 1113]) 1114 1115 1116# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117# --------------------------------- 1118# Checks for linker and compiler features on darwin 1119m4_defun([_LT_DARWIN_LINKER_FEATURES], 1120[ 1121 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123 _LT_TAGVAR(hardcode_direct, $1)=no 1124 _LT_TAGVAR(hardcode_automatic, $1)=yes 1125 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126 if test yes = "$lt_cv_ld_force_load"; then 1127 _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\"`' 1128 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130 else 1131 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132 fi 1133 _LT_TAGVAR(link_all_deplibs, $1)=yes 1134 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135 case $cc_basename in 1136 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137 *) _lt_dar_can_shared=$GCC ;; 1138 esac 1139 if test yes = "$_lt_dar_can_shared"; then 1140 output_verbose_link_cmd=func_echo_all 1141 _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" 1142 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143 _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" 1144 _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" 1145 m4_if([$1], [CXX], 1146[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147 _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" 1148 _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" 1149 fi 1150],[]) 1151 else 1152 _LT_TAGVAR(ld_shlibs, $1)=no 1153 fi 1154]) 1155 1156# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157# ---------------------------------- 1158# Links a minimal program and checks the executable 1159# for the system default hardcoded library path. In most cases, 1160# this is /usr/lib:/lib, but when the MPI compilers are used 1161# the location of the communication and MPI libs are included too. 1162# If we don't find anything, use the default library path according 1163# to the aix ld manual. 1164# Store the results from the different compilers for each TAGNAME. 1165# Allow to override them for all tags through lt_cv_aix_libpath. 1166m4_defun([_LT_SYS_MODULE_PATH_AIX], 1167[m4_require([_LT_DECL_SED])dnl 1168if test set = "${lt_cv_aix_libpath+set}"; then 1169 aix_libpath=$lt_cv_aix_libpath 1170else 1171 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173 lt_aix_libpath_sed='[ 1174 /Import File Strings/,/^$/ { 1175 /^0/ { 1176 s/^0 *\([^ ]*\) *$/\1/ 1177 p 1178 } 1179 }]' 1180 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181 # Check for a 64-bit object if we didn't find anything. 1182 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184 fi],[]) 1185 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187 fi 1188 ]) 1189 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190fi 1191])# _LT_SYS_MODULE_PATH_AIX 1192 1193 1194# _LT_SHELL_INIT(ARG) 1195# ------------------- 1196m4_define([_LT_SHELL_INIT], 1197[m4_divert_text([M4SH-INIT], [$1 1198])])# _LT_SHELL_INIT 1199 1200 1201 1202# _LT_PROG_ECHO_BACKSLASH 1203# ----------------------- 1204# Find how we can fake an echo command that does not interpret backslash. 1205# In particular, with Autoconf 2.60 or later we add some code to the start 1206# of the generated configure script that will find a shell with a builtin 1207# printf (that we can use as an echo command). 1208m4_defun([_LT_PROG_ECHO_BACKSLASH], 1209[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212 1213AC_MSG_CHECKING([how to print strings]) 1214# Test print first, because it will be a builtin if present. 1215if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217 ECHO='print -r --' 1218elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219 ECHO='printf %s\n' 1220else 1221 # Use this function as a fallback that always works. 1222 func_fallback_echo () 1223 { 1224 eval 'cat <<_LTECHO_EOF 1225$[]1 1226_LTECHO_EOF' 1227 } 1228 ECHO='func_fallback_echo' 1229fi 1230 1231# func_echo_all arg... 1232# Invoke $ECHO with all args, space-separated. 1233func_echo_all () 1234{ 1235 $ECHO "$*" 1236} 1237 1238case $ECHO in 1239 printf*) AC_MSG_RESULT([printf]) ;; 1240 print*) AC_MSG_RESULT([print -r]) ;; 1241 *) AC_MSG_RESULT([cat]) ;; 1242esac 1243 1244m4_ifdef([_AS_DETECT_SUGGESTED], 1245[_AS_DETECT_SUGGESTED([ 1246 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250 PATH=/empty FPATH=/empty; export PATH FPATH 1251 test "X`printf %s $ECHO`" = "X$ECHO" \ 1252 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253 1254_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256])# _LT_PROG_ECHO_BACKSLASH 1257 1258 1259# _LT_WITH_SYSROOT 1260# ---------------- 1261AC_DEFUN([_LT_WITH_SYSROOT], 1262[AC_MSG_CHECKING([for sysroot]) 1263AC_ARG_WITH([sysroot], 1264[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265 [Search for dependent libraries within DIR (or the compiler's sysroot 1266 if not specified).])], 1267[], [with_sysroot=no]) 1268 1269dnl lt_sysroot will always be passed unquoted. We quote it here 1270dnl in case the user passed a directory name. 1271lt_sysroot= 1272case $with_sysroot in #( 1273 yes) 1274 if test yes = "$GCC"; then 1275 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276 fi 1277 ;; #( 1278 /*) 1279 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280 ;; #( 1281 no|'') 1282 ;; #( 1283 *) 1284 AC_MSG_RESULT([$with_sysroot]) 1285 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286 ;; 1287esac 1288 1289 AC_MSG_RESULT([${lt_sysroot:-no}]) 1290_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291[dependent libraries, and where our libraries should be installed.])]) 1292 1293# _LT_ENABLE_LOCK 1294# --------------- 1295m4_defun([_LT_ENABLE_LOCK], 1296[AC_ARG_ENABLE([libtool-lock], 1297 [AS_HELP_STRING([--disable-libtool-lock], 1298 [avoid locking (might break parallel builds)])]) 1299test no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300 1301# Some flags need to be propagated to the compiler or linker for good 1302# libtool support. 1303case $host in 1304ia64-*-hpux*) 1305 # Find out what ABI is being produced by ac_compile, and set mode 1306 # options accordingly. 1307 echo 'int i;' > conftest.$ac_ext 1308 if AC_TRY_EVAL(ac_compile); then 1309 case `/usr/bin/file conftest.$ac_objext` in 1310 *ELF-32*) 1311 HPUX_IA64_MODE=32 1312 ;; 1313 *ELF-64*) 1314 HPUX_IA64_MODE=64 1315 ;; 1316 esac 1317 fi 1318 rm -rf conftest* 1319 ;; 1320*-*-irix6*) 1321 # Find out what ABI is being produced by ac_compile, and set linker 1322 # options accordingly. 1323 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324 if AC_TRY_EVAL(ac_compile); then 1325 if test yes = "$lt_cv_prog_gnu_ld"; then 1326 case `/usr/bin/file conftest.$ac_objext` in 1327 *32-bit*) 1328 LD="${LD-ld} -melf32bsmip" 1329 ;; 1330 *N32*) 1331 LD="${LD-ld} -melf32bmipn32" 1332 ;; 1333 *64-bit*) 1334 LD="${LD-ld} -melf64bmip" 1335 ;; 1336 esac 1337 else 1338 case `/usr/bin/file conftest.$ac_objext` in 1339 *32-bit*) 1340 LD="${LD-ld} -32" 1341 ;; 1342 *N32*) 1343 LD="${LD-ld} -n32" 1344 ;; 1345 *64-bit*) 1346 LD="${LD-ld} -64" 1347 ;; 1348 esac 1349 fi 1350 fi 1351 rm -rf conftest* 1352 ;; 1353 1354mips64*-*linux*) 1355 # Find out what ABI is being produced by ac_compile, and set linker 1356 # options accordingly. 1357 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358 if AC_TRY_EVAL(ac_compile); then 1359 emul=elf 1360 case `/usr/bin/file conftest.$ac_objext` in 1361 *32-bit*) 1362 emul="${emul}32" 1363 ;; 1364 *64-bit*) 1365 emul="${emul}64" 1366 ;; 1367 esac 1368 case `/usr/bin/file conftest.$ac_objext` in 1369 *MSB*) 1370 emul="${emul}btsmip" 1371 ;; 1372 *LSB*) 1373 emul="${emul}ltsmip" 1374 ;; 1375 esac 1376 case `/usr/bin/file conftest.$ac_objext` in 1377 *N32*) 1378 emul="${emul}n32" 1379 ;; 1380 esac 1381 LD="${LD-ld} -m $emul" 1382 fi 1383 rm -rf conftest* 1384 ;; 1385 1386x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388 # Find out what ABI is being produced by ac_compile, and set linker 1389 # options accordingly. Note that the listed cases only cover the 1390 # situations where additional linker options are needed (such as when 1391 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392 # vice versa); the common cases where no linker options are needed do 1393 # not appear in the list. 1394 echo 'int i;' > conftest.$ac_ext 1395 if AC_TRY_EVAL(ac_compile); then 1396 case `/usr/bin/file conftest.o` in 1397 *32-bit*) 1398 case $host in 1399 x86_64-*kfreebsd*-gnu) 1400 LD="${LD-ld} -m elf_i386_fbsd" 1401 ;; 1402 x86_64-*linux*) 1403 case `/usr/bin/file conftest.o` in 1404 *x86-64*) 1405 LD="${LD-ld} -m elf32_x86_64" 1406 ;; 1407 *) 1408 LD="${LD-ld} -m elf_i386" 1409 ;; 1410 esac 1411 ;; 1412 powerpc64le-*linux*) 1413 LD="${LD-ld} -m elf32lppclinux" 1414 ;; 1415 powerpc64-*linux*) 1416 LD="${LD-ld} -m elf32ppclinux" 1417 ;; 1418 s390x-*linux*) 1419 LD="${LD-ld} -m elf_s390" 1420 ;; 1421 sparc64-*linux*) 1422 LD="${LD-ld} -m elf32_sparc" 1423 ;; 1424 esac 1425 ;; 1426 *64-bit*) 1427 case $host in 1428 x86_64-*kfreebsd*-gnu) 1429 LD="${LD-ld} -m elf_x86_64_fbsd" 1430 ;; 1431 x86_64-*linux*) 1432 LD="${LD-ld} -m elf_x86_64" 1433 ;; 1434 powerpcle-*linux*|powerpc64le-*linux*) 1435 LD="${LD-ld} -m elf64lppc" 1436 ;; 1437 powerpc-*linux*|powerpc64-*linux*) 1438 LD="${LD-ld} -m elf64ppc" 1439 ;; 1440 s390*-*linux*|s390*-*tpf*) 1441 LD="${LD-ld} -m elf64_s390" 1442 ;; 1443 sparc*-*linux*) 1444 LD="${LD-ld} -m elf64_sparc" 1445 ;; 1446 esac 1447 ;; 1448 esac 1449 fi 1450 rm -rf conftest* 1451 ;; 1452 1453*-*-sco3.2v5*) 1454 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455 SAVE_CFLAGS=$CFLAGS 1456 CFLAGS="$CFLAGS -belf" 1457 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458 [AC_LANG_PUSH(C) 1459 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460 AC_LANG_POP]) 1461 if test yes != "$lt_cv_cc_needs_belf"; then 1462 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463 CFLAGS=$SAVE_CFLAGS 1464 fi 1465 ;; 1466*-*solaris*) 1467 # Find out what ABI is being produced by ac_compile, and set linker 1468 # options accordingly. 1469 echo 'int i;' > conftest.$ac_ext 1470 if AC_TRY_EVAL(ac_compile); then 1471 case `/usr/bin/file conftest.o` in 1472 *64-bit*) 1473 case $lt_cv_prog_gnu_ld in 1474 yes*) 1475 case $host in 1476 i?86-*-solaris*|x86_64-*-solaris*) 1477 LD="${LD-ld} -m elf_x86_64" 1478 ;; 1479 sparc*-*-solaris*) 1480 LD="${LD-ld} -m elf64_sparc" 1481 ;; 1482 esac 1483 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485 LD=${LD-ld}_sol2 1486 fi 1487 ;; 1488 *) 1489 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490 LD="${LD-ld} -64" 1491 fi 1492 ;; 1493 esac 1494 ;; 1495 esac 1496 fi 1497 rm -rf conftest* 1498 ;; 1499esac 1500 1501need_locks=$enable_libtool_lock 1502])# _LT_ENABLE_LOCK 1503 1504 1505# _LT_PROG_AR 1506# ----------- 1507m4_defun([_LT_PROG_AR], 1508[AC_CHECK_TOOLS(AR, [ar], false) 1509: ${AR=ar} 1510: ${AR_FLAGS=cru} 1511_LT_DECL([], [AR], [1], [The archiver]) 1512_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513 1514AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515 [lt_cv_ar_at_file=no 1516 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517 [echo conftest.$ac_objext > conftest.lst 1518 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519 AC_TRY_EVAL([lt_ar_try]) 1520 if test 0 -eq "$ac_status"; then 1521 # Ensure the archiver fails upon bogus file names. 1522 rm -f conftest.$ac_objext libconftest.a 1523 AC_TRY_EVAL([lt_ar_try]) 1524 if test 0 -ne "$ac_status"; then 1525 lt_cv_ar_at_file=@ 1526 fi 1527 fi 1528 rm -f conftest.* libconftest.a 1529 ]) 1530 ]) 1531 1532if test no = "$lt_cv_ar_at_file"; then 1533 archiver_list_spec= 1534else 1535 archiver_list_spec=$lt_cv_ar_at_file 1536fi 1537_LT_DECL([], [archiver_list_spec], [1], 1538 [How to feed a file listing to the archiver]) 1539])# _LT_PROG_AR 1540 1541 1542# _LT_CMD_OLD_ARCHIVE 1543# ------------------- 1544m4_defun([_LT_CMD_OLD_ARCHIVE], 1545[_LT_PROG_AR 1546 1547AC_CHECK_TOOL(STRIP, strip, :) 1548test -z "$STRIP" && STRIP=: 1549_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550 1551AC_CHECK_TOOL(RANLIB, ranlib, :) 1552test -z "$RANLIB" && RANLIB=: 1553_LT_DECL([], [RANLIB], [1], 1554 [Commands used to install an old-style archive]) 1555 1556# Determine commands to create old-style static archives. 1557old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558old_postinstall_cmds='chmod 644 $oldlib' 1559old_postuninstall_cmds= 1560 1561if test -n "$RANLIB"; then 1562 case $host_os in 1563 bitrig* | openbsd*) 1564 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565 ;; 1566 *) 1567 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568 ;; 1569 esac 1570 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571fi 1572 1573case $host_os in 1574 darwin*) 1575 lock_old_archive_extraction=yes ;; 1576 *) 1577 lock_old_archive_extraction=no ;; 1578esac 1579_LT_DECL([], [old_postinstall_cmds], [2]) 1580_LT_DECL([], [old_postuninstall_cmds], [2]) 1581_LT_TAGDECL([], [old_archive_cmds], [2], 1582 [Commands used to build an old-style archive]) 1583_LT_DECL([], [lock_old_archive_extraction], [0], 1584 [Whether to use a lock for old archive extraction]) 1585])# _LT_CMD_OLD_ARCHIVE 1586 1587 1588# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590# ---------------------------------------------------------------- 1591# Check whether the given compiler option works 1592AC_DEFUN([_LT_COMPILER_OPTION], 1593[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594m4_require([_LT_DECL_SED])dnl 1595AC_CACHE_CHECK([$1], [$2], 1596 [$2=no 1597 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600 # Insert the option either (1) after the last *FLAGS variable, or 1601 # (2) before a word containing "conftest.", or (3) at the end. 1602 # Note that $ac_compile itself does not contain backslashes and begins 1603 # with a dollar sign (not a hyphen), so the echo should work correctly. 1604 # The option is referenced via a variable to avoid confusing sed. 1605 lt_compile=`echo "$ac_compile" | $SED \ 1606 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608 -e 's:$: $lt_compiler_flag:'` 1609 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610 (eval "$lt_compile" 2>conftest.err) 1611 ac_status=$? 1612 cat conftest.err >&AS_MESSAGE_LOG_FD 1613 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614 if (exit $ac_status) && test -s "$ac_outfile"; then 1615 # The compiler can only warn and ignore the option if not recognized 1616 # So say no if there are warnings other than the usual output. 1617 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620 $2=yes 1621 fi 1622 fi 1623 $RM conftest* 1624]) 1625 1626if test yes = "[$]$2"; then 1627 m4_if([$5], , :, [$5]) 1628else 1629 m4_if([$6], , :, [$6]) 1630fi 1631])# _LT_COMPILER_OPTION 1632 1633# Old name: 1634AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635dnl aclocal-1.4 backwards compatibility: 1636dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637 1638 1639# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641# ---------------------------------------------------- 1642# Check whether the given linker option works 1643AC_DEFUN([_LT_LINKER_OPTION], 1644[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645m4_require([_LT_DECL_SED])dnl 1646AC_CACHE_CHECK([$1], [$2], 1647 [$2=no 1648 save_LDFLAGS=$LDFLAGS 1649 LDFLAGS="$LDFLAGS $3" 1650 echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652 # The linker can only warn and ignore the option if not recognized 1653 # So say no if there are warnings 1654 if test -s conftest.err; then 1655 # Append any errors to the config.log. 1656 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659 if diff conftest.exp conftest.er2 >/dev/null; then 1660 $2=yes 1661 fi 1662 else 1663 $2=yes 1664 fi 1665 fi 1666 $RM -r conftest* 1667 LDFLAGS=$save_LDFLAGS 1668]) 1669 1670if test yes = "[$]$2"; then 1671 m4_if([$4], , :, [$4]) 1672else 1673 m4_if([$5], , :, [$5]) 1674fi 1675])# _LT_LINKER_OPTION 1676 1677# Old name: 1678AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679dnl aclocal-1.4 backwards compatibility: 1680dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681 1682 1683# LT_CMD_MAX_LEN 1684#--------------- 1685AC_DEFUN([LT_CMD_MAX_LEN], 1686[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687# find the maximum length of command line arguments 1688AC_MSG_CHECKING([the maximum length of command line arguments]) 1689AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690 i=0 1691 teststring=ABCD 1692 1693 case $build_os in 1694 msdosdjgpp*) 1695 # On DJGPP, this test can blow up pretty badly due to problems in libc 1696 # (any single argument exceeding 2000 bytes causes a buffer overrun 1697 # during glob expansion). Even if it were fixed, the result of this 1698 # check would be larger than it should be. 1699 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700 ;; 1701 1702 gnu*) 1703 # Under GNU Hurd, this test is not required because there is 1704 # no limit to the length of command line arguments. 1705 # Libtool will interpret -1 as no limit whatsoever 1706 lt_cv_sys_max_cmd_len=-1; 1707 ;; 1708 1709 cygwin* | mingw* | cegcc*) 1710 # On Win9x/ME, this test blows up -- it succeeds, but takes 1711 # about 5 minutes as the teststring grows exponentially. 1712 # Worse, since 9x/ME are not pre-emptively multitasking, 1713 # you end up with a "frozen" computer, even though with patience 1714 # the test eventually succeeds (with a max line length of 256k). 1715 # Instead, let's just punt: use the minimum linelength reported by 1716 # all of the supported platforms: 8192 (on NT/2K/XP). 1717 lt_cv_sys_max_cmd_len=8192; 1718 ;; 1719 1720 mint*) 1721 # On MiNT this can take a long time and run out of memory. 1722 lt_cv_sys_max_cmd_len=8192; 1723 ;; 1724 1725 mint*) 1726 # On MiNT this can take a long time and run out of memory. 1727 lt_cv_sys_max_cmd_len=8192; 1728 ;; 1729 1730 amigaos*) 1731 # On AmigaOS with pdksh, this test takes hours, literally. 1732 # So we just punt and use a minimum line length of 8192. 1733 lt_cv_sys_max_cmd_len=8192; 1734 ;; 1735 1736 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1737 # This has been around since 386BSD, at least. Likely further. 1738 if test -x /sbin/sysctl; then 1739 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1740 elif test -x /usr/sbin/sysctl; then 1741 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1742 else 1743 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1744 fi 1745 # And add a safety zone 1746 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1747 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1748 ;; 1749 1750 interix*) 1751 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1752 lt_cv_sys_max_cmd_len=196608 1753 ;; 1754 1755 os2*) 1756 # The test takes a long time on OS/2. 1757 lt_cv_sys_max_cmd_len=8192 1758 ;; 1759 1760 osf*) 1761 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1762 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1763 # nice to cause kernel panics so lets avoid the loop below. 1764 # First set a reasonable default. 1765 lt_cv_sys_max_cmd_len=16384 1766 # 1767 if test -x /sbin/sysconfig; then 1768 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1769 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1770 esac 1771 fi 1772 ;; 1773 sco3.2v5*) 1774 lt_cv_sys_max_cmd_len=102400 1775 ;; 1776 sysv5* | sco5v6* | sysv4.2uw2*) 1777 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1778 if test -n "$kargmax"; then 1779 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1780 else 1781 lt_cv_sys_max_cmd_len=32768 1782 fi 1783 ;; 1784 *) 1785 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1786 if test -n "$lt_cv_sys_max_cmd_len" && \ 1787 test undefined != "$lt_cv_sys_max_cmd_len"; then 1788 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1789 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1790 else 1791 # Make teststring a little bigger before we do anything with it. 1792 # a 1K string should be a reasonable start. 1793 for i in 1 2 3 4 5 6 7 8; do 1794 teststring=$teststring$teststring 1795 done 1796 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1797 # If test is not a shell built-in, we'll probably end up computing a 1798 # maximum length that is only half of the actual maximum length, but 1799 # we can't tell. 1800 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1801 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1802 test 17 != "$i" # 1/2 MB should be enough 1803 do 1804 i=`expr $i + 1` 1805 teststring=$teststring$teststring 1806 done 1807 # Only check the string length outside the loop. 1808 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1809 teststring= 1810 # Add a significant safety factor because C++ compilers can tack on 1811 # massive amounts of additional arguments before passing them to the 1812 # linker. It appears as though 1/2 is a usable value. 1813 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1814 fi 1815 ;; 1816 esac 1817]) 1818if test -n "$lt_cv_sys_max_cmd_len"; then 1819 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1820else 1821 AC_MSG_RESULT(none) 1822fi 1823max_cmd_len=$lt_cv_sys_max_cmd_len 1824_LT_DECL([], [max_cmd_len], [0], 1825 [What is the maximum length of a command?]) 1826])# LT_CMD_MAX_LEN 1827 1828# Old name: 1829AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1830dnl aclocal-1.4 backwards compatibility: 1831dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1832 1833 1834# _LT_HEADER_DLFCN 1835# ---------------- 1836m4_defun([_LT_HEADER_DLFCN], 1837[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1838])# _LT_HEADER_DLFCN 1839 1840 1841# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1842# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1843# ---------------------------------------------------------------- 1844m4_defun([_LT_TRY_DLOPEN_SELF], 1845[m4_require([_LT_HEADER_DLFCN])dnl 1846if test yes = "$cross_compiling"; then : 1847 [$4] 1848else 1849 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1850 lt_status=$lt_dlunknown 1851 cat > conftest.$ac_ext <<_LT_EOF 1852[#line $LINENO "configure" 1853#include "confdefs.h" 1854 1855#if HAVE_DLFCN_H 1856#include <dlfcn.h> 1857#endif 1858 1859#include <stdio.h> 1860 1861#ifdef RTLD_GLOBAL 1862# define LT_DLGLOBAL RTLD_GLOBAL 1863#else 1864# ifdef DL_GLOBAL 1865# define LT_DLGLOBAL DL_GLOBAL 1866# else 1867# define LT_DLGLOBAL 0 1868# endif 1869#endif 1870 1871/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1872 find out it does not work in some platform. */ 1873#ifndef LT_DLLAZY_OR_NOW 1874# ifdef RTLD_LAZY 1875# define LT_DLLAZY_OR_NOW RTLD_LAZY 1876# else 1877# ifdef DL_LAZY 1878# define LT_DLLAZY_OR_NOW DL_LAZY 1879# else 1880# ifdef RTLD_NOW 1881# define LT_DLLAZY_OR_NOW RTLD_NOW 1882# else 1883# ifdef DL_NOW 1884# define LT_DLLAZY_OR_NOW DL_NOW 1885# else 1886# define LT_DLLAZY_OR_NOW 0 1887# endif 1888# endif 1889# endif 1890# endif 1891#endif 1892 1893/* When -fvisibility=hidden is used, assume the code has been annotated 1894 correspondingly for the symbols needed. */ 1895#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1896int fnord () __attribute__((visibility("default"))); 1897#endif 1898 1899int fnord () { return 42; } 1900int main () 1901{ 1902 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1903 int status = $lt_dlunknown; 1904 1905 if (self) 1906 { 1907 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1908 else 1909 { 1910 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1911 else puts (dlerror ()); 1912 } 1913 /* dlclose (self); */ 1914 } 1915 else 1916 puts (dlerror ()); 1917 1918 return status; 1919}] 1920_LT_EOF 1921 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1922 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1923 lt_status=$? 1924 case x$lt_status in 1925 x$lt_dlno_uscore) $1 ;; 1926 x$lt_dlneed_uscore) $2 ;; 1927 x$lt_dlunknown|x*) $3 ;; 1928 esac 1929 else : 1930 # compilation failed 1931 $3 1932 fi 1933fi 1934rm -fr conftest* 1935])# _LT_TRY_DLOPEN_SELF 1936 1937 1938# LT_SYS_DLOPEN_SELF 1939# ------------------ 1940AC_DEFUN([LT_SYS_DLOPEN_SELF], 1941[m4_require([_LT_HEADER_DLFCN])dnl 1942if test yes != "$enable_dlopen"; then 1943 enable_dlopen=unknown 1944 enable_dlopen_self=unknown 1945 enable_dlopen_self_static=unknown 1946else 1947 lt_cv_dlopen=no 1948 lt_cv_dlopen_libs= 1949 1950 case $host_os in 1951 beos*) 1952 lt_cv_dlopen=load_add_on 1953 lt_cv_dlopen_libs= 1954 lt_cv_dlopen_self=yes 1955 ;; 1956 1957 mingw* | pw32* | cegcc*) 1958 lt_cv_dlopen=LoadLibrary 1959 lt_cv_dlopen_libs= 1960 ;; 1961 1962 cygwin*) 1963 lt_cv_dlopen=dlopen 1964 lt_cv_dlopen_libs= 1965 ;; 1966 1967 darwin*) 1968 # if libdl is installed we need to link against it 1969 AC_CHECK_LIB([dl], [dlopen], 1970 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1971 lt_cv_dlopen=dyld 1972 lt_cv_dlopen_libs= 1973 lt_cv_dlopen_self=yes 1974 ]) 1975 ;; 1976 1977 tpf*) 1978 # Don't try to run any link tests for TPF. We know it's impossible 1979 # because TPF is a cross-compiler, and we know how we open DSOs. 1980 lt_cv_dlopen=dlopen 1981 lt_cv_dlopen_libs= 1982 lt_cv_dlopen_self=no 1983 ;; 1984 1985 *) 1986 AC_CHECK_FUNC([shl_load], 1987 [lt_cv_dlopen=shl_load], 1988 [AC_CHECK_LIB([dld], [shl_load], 1989 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1990 [AC_CHECK_FUNC([dlopen], 1991 [lt_cv_dlopen=dlopen], 1992 [AC_CHECK_LIB([dl], [dlopen], 1993 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1994 [AC_CHECK_LIB([svld], [dlopen], 1995 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1996 [AC_CHECK_LIB([dld], [dld_link], 1997 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1998 ]) 1999 ]) 2000 ]) 2001 ]) 2002 ]) 2003 ;; 2004 esac 2005 2006 if test no = "$lt_cv_dlopen"; then 2007 enable_dlopen=no 2008 else 2009 enable_dlopen=yes 2010 fi 2011 2012 case $lt_cv_dlopen in 2013 dlopen) 2014 save_CPPFLAGS=$CPPFLAGS 2015 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2016 2017 save_LDFLAGS=$LDFLAGS 2018 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2019 2020 save_LIBS=$LIBS 2021 LIBS="$lt_cv_dlopen_libs $LIBS" 2022 2023 AC_CACHE_CHECK([whether a program can dlopen itself], 2024 lt_cv_dlopen_self, [dnl 2025 _LT_TRY_DLOPEN_SELF( 2026 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2027 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2028 ]) 2029 2030 if test yes = "$lt_cv_dlopen_self"; then 2031 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2032 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2033 lt_cv_dlopen_self_static, [dnl 2034 _LT_TRY_DLOPEN_SELF( 2035 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2036 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2037 ]) 2038 fi 2039 2040 CPPFLAGS=$save_CPPFLAGS 2041 LDFLAGS=$save_LDFLAGS 2042 LIBS=$save_LIBS 2043 ;; 2044 esac 2045 2046 case $lt_cv_dlopen_self in 2047 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2048 *) enable_dlopen_self=unknown ;; 2049 esac 2050 2051 case $lt_cv_dlopen_self_static in 2052 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2053 *) enable_dlopen_self_static=unknown ;; 2054 esac 2055fi 2056_LT_DECL([dlopen_support], [enable_dlopen], [0], 2057 [Whether dlopen is supported]) 2058_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2059 [Whether dlopen of programs is supported]) 2060_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2061 [Whether dlopen of statically linked programs is supported]) 2062])# LT_SYS_DLOPEN_SELF 2063 2064# Old name: 2065AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2066dnl aclocal-1.4 backwards compatibility: 2067dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2068 2069 2070# _LT_COMPILER_C_O([TAGNAME]) 2071# --------------------------- 2072# Check to see if options -c and -o are simultaneously supported by compiler. 2073# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2074m4_defun([_LT_COMPILER_C_O], 2075[m4_require([_LT_DECL_SED])dnl 2076m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2077m4_require([_LT_TAG_COMPILER])dnl 2078AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2079 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2080 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2081 $RM -r conftest 2>/dev/null 2082 mkdir conftest 2083 cd conftest 2084 mkdir out 2085 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2086 2087 lt_compiler_flag="-o out/conftest2.$ac_objext" 2088 # Insert the option either (1) after the last *FLAGS variable, or 2089 # (2) before a word containing "conftest.", or (3) at the end. 2090 # Note that $ac_compile itself does not contain backslashes and begins 2091 # with a dollar sign (not a hyphen), so the echo should work correctly. 2092 lt_compile=`echo "$ac_compile" | $SED \ 2093 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2094 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2095 -e 's:$: $lt_compiler_flag:'` 2096 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2097 (eval "$lt_compile" 2>out/conftest.err) 2098 ac_status=$? 2099 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2100 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2101 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2102 then 2103 # The compiler can only warn and ignore the option if not recognized 2104 # So say no if there are warnings 2105 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2106 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2107 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2108 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2109 fi 2110 fi 2111 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2112 $RM conftest* 2113 # SGI C++ compiler will create directory out/ii_files/ for 2114 # template instantiation 2115 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2116 $RM out/* && rmdir out 2117 cd .. 2118 $RM -r conftest 2119 $RM conftest* 2120]) 2121_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2122 [Does compiler simultaneously support -c and -o options?]) 2123])# _LT_COMPILER_C_O 2124 2125 2126# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2127# ---------------------------------- 2128# Check to see if we can do hard links to lock some files if needed 2129m4_defun([_LT_COMPILER_FILE_LOCKS], 2130[m4_require([_LT_ENABLE_LOCK])dnl 2131m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2132_LT_COMPILER_C_O([$1]) 2133 2134hard_links=nottested 2135if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2136 # do not overwrite the value of need_locks provided by the user 2137 AC_MSG_CHECKING([if we can lock with hard links]) 2138 hard_links=yes 2139 $RM conftest* 2140 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2141 touch conftest.a 2142 ln conftest.a conftest.b 2>&5 || hard_links=no 2143 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2144 AC_MSG_RESULT([$hard_links]) 2145 if test no = "$hard_links"; then 2146 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2147 need_locks=warn 2148 fi 2149else 2150 need_locks=no 2151fi 2152_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2153])# _LT_COMPILER_FILE_LOCKS 2154 2155 2156# _LT_CHECK_OBJDIR 2157# ---------------- 2158m4_defun([_LT_CHECK_OBJDIR], 2159[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2160[rm -f .libs 2>/dev/null 2161mkdir .libs 2>/dev/null 2162if test -d .libs; then 2163 lt_cv_objdir=.libs 2164else 2165 # MS-DOS does not allow filenames that begin with a dot. 2166 lt_cv_objdir=_libs 2167fi 2168rmdir .libs 2>/dev/null]) 2169objdir=$lt_cv_objdir 2170_LT_DECL([], [objdir], [0], 2171 [The name of the directory that contains temporary libtool files])dnl 2172m4_pattern_allow([LT_OBJDIR])dnl 2173AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2174 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2175])# _LT_CHECK_OBJDIR 2176 2177 2178# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2179# -------------------------------------- 2180# Check hardcoding attributes. 2181m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2182[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2183_LT_TAGVAR(hardcode_action, $1)= 2184if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2185 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2186 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2187 2188 # We can hardcode non-existent directories. 2189 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2190 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2191 # have to relink, otherwise we might link with an installed library 2192 # when we should be linking with a yet-to-be-installed one 2193 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2194 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2195 # Linking always hardcodes the temporary library directory. 2196 _LT_TAGVAR(hardcode_action, $1)=relink 2197 else 2198 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2199 _LT_TAGVAR(hardcode_action, $1)=immediate 2200 fi 2201else 2202 # We cannot hardcode anything, or else we can only hardcode existing 2203 # directories. 2204 _LT_TAGVAR(hardcode_action, $1)=unsupported 2205fi 2206AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2207 2208if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2209 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2210 # Fast installation is not supported 2211 enable_fast_install=no 2212elif test yes = "$shlibpath_overrides_runpath" || 2213 test no = "$enable_shared"; then 2214 # Fast installation is not necessary 2215 enable_fast_install=needless 2216fi 2217_LT_TAGDECL([], [hardcode_action], [0], 2218 [How to hardcode a shared library path into an executable]) 2219])# _LT_LINKER_HARDCODE_LIBPATH 2220 2221 2222# _LT_CMD_STRIPLIB 2223# ---------------- 2224m4_defun([_LT_CMD_STRIPLIB], 2225[m4_require([_LT_DECL_EGREP]) 2226striplib= 2227old_striplib= 2228AC_MSG_CHECKING([whether stripping libraries is possible]) 2229if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2230 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2231 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2232 AC_MSG_RESULT([yes]) 2233else 2234# FIXME - insert some real tests, host_os isn't really good enough 2235 case $host_os in 2236 darwin*) 2237 if test -n "$STRIP"; then 2238 striplib="$STRIP -x" 2239 old_striplib="$STRIP -S" 2240 AC_MSG_RESULT([yes]) 2241 else 2242 AC_MSG_RESULT([no]) 2243 fi 2244 ;; 2245 *) 2246 AC_MSG_RESULT([no]) 2247 ;; 2248 esac 2249fi 2250_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2251_LT_DECL([], [striplib], [1]) 2252])# _LT_CMD_STRIPLIB 2253 2254 2255# _LT_PREPARE_MUNGE_PATH_LIST 2256# --------------------------- 2257# Make sure func_munge_path_list() is defined correctly. 2258m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2259[[# func_munge_path_list VARIABLE PATH 2260# ----------------------------------- 2261# VARIABLE is name of variable containing _space_ separated list of 2262# directories to be munged by the contents of PATH, which is string 2263# having a format: 2264# "DIR[:DIR]:" 2265# string "DIR[ DIR]" will be prepended to VARIABLE 2266# ":DIR[:DIR]" 2267# string "DIR[ DIR]" will be appended to VARIABLE 2268# "DIRP[:DIRP]::[DIRA:]DIRA" 2269# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2270# "DIRA[ DIRA]" will be appended to VARIABLE 2271# "DIR[:DIR]" 2272# VARIABLE will be replaced by "DIR[ DIR]" 2273func_munge_path_list () 2274{ 2275 case x@S|@2 in 2276 x) 2277 ;; 2278 *:) 2279 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2280 ;; 2281 x:*) 2282 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2283 ;; 2284 *::*) 2285 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2286 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2287 ;; 2288 *) 2289 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2290 ;; 2291 esac 2292} 2293]])# _LT_PREPARE_PATH_LIST 2294 2295 2296# _LT_SYS_DYNAMIC_LINKER([TAG]) 2297# ----------------------------- 2298# PORTME Fill in your ld.so characteristics 2299m4_defun([_LT_SYS_DYNAMIC_LINKER], 2300[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2301m4_require([_LT_DECL_EGREP])dnl 2302m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2303m4_require([_LT_DECL_OBJDUMP])dnl 2304m4_require([_LT_DECL_SED])dnl 2305m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2306m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2307AC_MSG_CHECKING([dynamic linker characteristics]) 2308m4_if([$1], 2309 [], [ 2310if test yes = "$GCC"; then 2311 case $host_os in 2312 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2313 *) lt_awk_arg='/^libraries:/' ;; 2314 esac 2315 case $host_os in 2316 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2317 *) lt_sed_strip_eq='s|=/|/|g' ;; 2318 esac 2319 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2320 case $lt_search_path_spec in 2321 *\;*) 2322 # if the path contains ";" then we assume it to be the separator 2323 # otherwise default to the standard path separator (i.e. ":") - it is 2324 # assumed that no part of a normal pathname contains ";" but that should 2325 # okay in the real world where ";" in dirpaths is itself problematic. 2326 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2327 ;; 2328 *) 2329 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2330 ;; 2331 esac 2332 # Ok, now we have the path, separated by spaces, we can step through it 2333 # and add multilib dir if necessary... 2334 lt_tmp_lt_search_path_spec= 2335 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2336 # ...but if some path component already ends with the multilib dir we assume 2337 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2338 case "$lt_multi_os_dir; $lt_search_path_spec " in 2339 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2340 lt_multi_os_dir= 2341 ;; 2342 esac 2343 for lt_sys_path in $lt_search_path_spec; do 2344 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2345 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2346 elif test -n "$lt_multi_os_dir"; then 2347 test -d "$lt_sys_path" && \ 2348 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2349 fi 2350 done 2351 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2352BEGIN {RS = " "; FS = "/|\n";} { 2353 lt_foo = ""; 2354 lt_count = 0; 2355 for (lt_i = NF; lt_i > 0; lt_i--) { 2356 if ($lt_i != "" && $lt_i != ".") { 2357 if ($lt_i == "..") { 2358 lt_count++; 2359 } else { 2360 if (lt_count == 0) { 2361 lt_foo = "/" $lt_i lt_foo; 2362 } else { 2363 lt_count--; 2364 } 2365 } 2366 } 2367 } 2368 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2369 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2370}'` 2371 # AWK program above erroneously prepends '/' to C:/dos/paths 2372 # for these hosts. 2373 case $host_os in 2374 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2375 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2376 esac 2377 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2378else 2379 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2380fi]) 2381library_names_spec= 2382libname_spec='lib$name' 2383soname_spec= 2384shrext_cmds=.so 2385postinstall_cmds= 2386postuninstall_cmds= 2387finish_cmds= 2388finish_eval= 2389shlibpath_var= 2390shlibpath_overrides_runpath=unknown 2391version_type=none 2392dynamic_linker="$host_os ld.so" 2393sys_lib_dlsearch_path_spec="/lib /usr/lib" 2394need_lib_prefix=unknown 2395hardcode_into_libs=no 2396 2397# when you set need_version to no, make sure it does not cause -set_version 2398# flags to be left without arguments 2399need_version=unknown 2400 2401AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2402[User-defined run-time library search path.]) 2403 2404case $host_os in 2405aix3*) 2406 version_type=linux # correct to gnu/linux during the next big refactor 2407 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2408 shlibpath_var=LIBPATH 2409 2410 # AIX 3 has no versioning support, so we append a major version to the name. 2411 soname_spec='$libname$release$shared_ext$major' 2412 ;; 2413 2414aix[[4-9]]*) 2415 version_type=linux # correct to gnu/linux during the next big refactor 2416 need_lib_prefix=no 2417 need_version=no 2418 hardcode_into_libs=yes 2419 if test ia64 = "$host_cpu"; then 2420 # AIX 5 supports IA64 2421 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2422 shlibpath_var=LD_LIBRARY_PATH 2423 else 2424 # With GCC up to 2.95.x, collect2 would create an import file 2425 # for dependence libraries. The import file would start with 2426 # the line '#! .'. This would cause the generated library to 2427 # depend on '.', always an invalid library. This was fixed in 2428 # development snapshots of GCC prior to 3.0. 2429 case $host_os in 2430 aix4 | aix4.[[01]] | aix4.[[01]].*) 2431 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2432 echo ' yes ' 2433 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2434 : 2435 else 2436 can_build_shared=no 2437 fi 2438 ;; 2439 esac 2440 # Using Import Files as archive members, it is possible to support 2441 # filename-based versioning of shared library archives on AIX. While 2442 # this would work for both with and without runtime linking, it will 2443 # prevent static linking of such archives. So we do filename-based 2444 # shared library versioning with .so extension only, which is used 2445 # when both runtime linking and shared linking is enabled. 2446 # Unfortunately, runtime linking may impact performance, so we do 2447 # not want this to be the default eventually. Also, we use the 2448 # versioned .so libs for executables only if there is the -brtl 2449 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2450 # To allow for filename-based versioning support, we need to create 2451 # libNAME.so.V as an archive file, containing: 2452 # *) an Import File, referring to the versioned filename of the 2453 # archive as well as the shared archive member, telling the 2454 # bitwidth (32 or 64) of that shared object, and providing the 2455 # list of exported symbols of that shared object, eventually 2456 # decorated with the 'weak' keyword 2457 # *) the shared object with the F_LOADONLY flag set, to really avoid 2458 # it being seen by the linker. 2459 # At run time we better use the real file rather than another symlink, 2460 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2461 2462 case $with_aix_soname,$aix_use_runtimelinking in 2463 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2464 # soname into executable. Probably we can add versioning support to 2465 # collect2, so additional links can be useful in future. 2466 aix,yes) # traditional libtool 2467 dynamic_linker='AIX unversionable lib.so' 2468 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2469 # instead of lib<name>.a to let people know that these are not 2470 # typical AIX shared libraries. 2471 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2472 ;; 2473 aix,no) # traditional AIX only 2474 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2475 # We preserve .a as extension for shared libraries through AIX4.2 2476 # and later when we are not doing run time linking. 2477 library_names_spec='$libname$release.a $libname.a' 2478 soname_spec='$libname$release$shared_ext$major' 2479 ;; 2480 svr4,*) # full svr4 only 2481 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2482 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2483 # We do not specify a path in Import Files, so LIBPATH fires. 2484 shlibpath_overrides_runpath=yes 2485 ;; 2486 *,yes) # both, prefer svr4 2487 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2488 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2489 # unpreferred sharedlib libNAME.a needs extra handling 2490 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"' 2491 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"' 2492 # We do not specify a path in Import Files, so LIBPATH fires. 2493 shlibpath_overrides_runpath=yes 2494 ;; 2495 *,no) # both, prefer aix 2496 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2497 library_names_spec='$libname$release.a $libname.a' 2498 soname_spec='$libname$release$shared_ext$major' 2499 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2500 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)' 2501 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"' 2502 ;; 2503 esac 2504 shlibpath_var=LIBPATH 2505 fi 2506 ;; 2507 2508amigaos*) 2509 case $host_cpu in 2510 powerpc) 2511 # Since July 2007 AmigaOS4 officially supports .so libraries. 2512 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2514 ;; 2515 m68k) 2516 library_names_spec='$libname.ixlibrary $libname.a' 2517 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2518 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' 2519 ;; 2520 esac 2521 ;; 2522 2523beos*) 2524 library_names_spec='$libname$shared_ext' 2525 dynamic_linker="$host_os ld.so" 2526 shlibpath_var=LIBRARY_PATH 2527 ;; 2528 2529bsdi[[45]]*) 2530 version_type=linux # correct to gnu/linux during the next big refactor 2531 need_version=no 2532 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2533 soname_spec='$libname$release$shared_ext$major' 2534 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2535 shlibpath_var=LD_LIBRARY_PATH 2536 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2537 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2538 # the default ld.so.conf also contains /usr/contrib/lib and 2539 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2540 # libtool to hard-code these into programs 2541 ;; 2542 2543cygwin* | mingw* | pw32* | cegcc*) 2544 version_type=windows 2545 shrext_cmds=.dll 2546 need_version=no 2547 need_lib_prefix=no 2548 2549 case $GCC,$cc_basename in 2550 yes,*) 2551 # gcc 2552 library_names_spec='$libname.dll.a' 2553 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2554 postinstall_cmds='base_file=`basename \$file`~ 2555 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2556 dldir=$destdir/`dirname \$dlpath`~ 2557 test -d \$dldir || mkdir -p \$dldir~ 2558 $install_prog $dir/$dlname \$dldir/$dlname~ 2559 chmod a+x \$dldir/$dlname~ 2560 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2561 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2562 fi' 2563 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2564 dlpath=$dir/\$dldll~ 2565 $RM \$dlpath' 2566 shlibpath_overrides_runpath=yes 2567 2568 case $host_os in 2569 cygwin*) 2570 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2571 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2572m4_if([$1], [],[ 2573 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2574 ;; 2575 mingw* | cegcc*) 2576 # MinGW DLLs use traditional 'lib' prefix 2577 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2578 ;; 2579 pw32*) 2580 # pw32 DLLs use 'pw' prefix rather than 'lib' 2581 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2582 ;; 2583 esac 2584 dynamic_linker='Win32 ld.exe' 2585 ;; 2586 2587 *,cl*) 2588 # Native MSVC 2589 libname_spec='$name' 2590 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2591 library_names_spec='$libname.dll.lib' 2592 2593 case $build_os in 2594 mingw*) 2595 sys_lib_search_path_spec= 2596 lt_save_ifs=$IFS 2597 IFS=';' 2598 for lt_path in $LIB 2599 do 2600 IFS=$lt_save_ifs 2601 # Let DOS variable expansion print the short 8.3 style file name. 2602 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2603 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2604 done 2605 IFS=$lt_save_ifs 2606 # Convert to MSYS style. 2607 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2608 ;; 2609 cygwin*) 2610 # Convert to unix form, then to dos form, then back to unix form 2611 # but this time dos style (no spaces!) so that the unix form looks 2612 # like /cygdrive/c/PROGRA~1:/cygdr... 2613 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2614 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2615 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2616 ;; 2617 *) 2618 sys_lib_search_path_spec=$LIB 2619 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2620 # It is most probably a Windows format PATH. 2621 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2622 else 2623 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2624 fi 2625 # FIXME: find the short name or the path components, as spaces are 2626 # common. (e.g. "Program Files" -> "PROGRA~1") 2627 ;; 2628 esac 2629 2630 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2631 postinstall_cmds='base_file=`basename \$file`~ 2632 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2633 dldir=$destdir/`dirname \$dlpath`~ 2634 test -d \$dldir || mkdir -p \$dldir~ 2635 $install_prog $dir/$dlname \$dldir/$dlname' 2636 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2637 dlpath=$dir/\$dldll~ 2638 $RM \$dlpath' 2639 shlibpath_overrides_runpath=yes 2640 dynamic_linker='Win32 link.exe' 2641 ;; 2642 2643 *) 2644 # Assume MSVC wrapper 2645 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2646 dynamic_linker='Win32 ld.exe' 2647 ;; 2648 esac 2649 # FIXME: first we should search . and the directory the executable is in 2650 shlibpath_var=PATH 2651 ;; 2652 2653darwin* | rhapsody*) 2654 dynamic_linker="$host_os dyld" 2655 version_type=darwin 2656 need_lib_prefix=no 2657 need_version=no 2658 library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 2659 soname_spec='$libname$release$major$shared_ext' 2660 shlibpath_overrides_runpath=yes 2661 shlibpath_var=DYLD_LIBRARY_PATH 2662 shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 2663m4_if([$1], [],[ 2664 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2665 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2666 ;; 2667 2668dgux*) 2669 version_type=linux # correct to gnu/linux during the next big refactor 2670 need_lib_prefix=no 2671 need_version=no 2672 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2673 soname_spec='$libname$release$shared_ext$major' 2674 shlibpath_var=LD_LIBRARY_PATH 2675 ;; 2676 2677freebsd* | dragonfly*) 2678 # DragonFly does not have aout. When/if they implement a new 2679 # versioning mechanism, adjust this. 2680 if test -x /usr/bin/objformat; then 2681 objformat=`/usr/bin/objformat` 2682 else 2683 case $host_os in 2684 freebsd[[23]].*) objformat=aout ;; 2685 *) objformat=elf ;; 2686 esac 2687 fi 2688 # Handle Gentoo/FreeBSD as it was Linux 2689 case $host_vendor in 2690 gentoo) 2691 version_type=linux ;; 2692 *) 2693 version_type=freebsd-$objformat ;; 2694 esac 2695 2696 case $version_type in 2697 freebsd-elf*) 2698 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2699 soname_spec='$libname$release$shared_ext$major' 2700 need_version=no 2701 need_lib_prefix=no 2702 ;; 2703 freebsd-*) 2704 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2705 need_version=yes 2706 ;; 2707 linux) 2708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2709 soname_spec='${libname}${release}${shared_ext}$major' 2710 need_lib_prefix=no 2711 need_version=no 2712 ;; 2713 esac 2714 shlibpath_var=LD_LIBRARY_PATH 2715 case $host_os in 2716 freebsd2.*) 2717 shlibpath_overrides_runpath=yes 2718 ;; 2719 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2720 shlibpath_overrides_runpath=yes 2721 hardcode_into_libs=yes 2722 ;; 2723 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2724 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2725 shlibpath_overrides_runpath=no 2726 hardcode_into_libs=yes 2727 ;; 2728 *) # from 4.6 on, and DragonFly 2729 shlibpath_overrides_runpath=yes 2730 hardcode_into_libs=yes 2731 ;; 2732 esac 2733 ;; 2734 2735haiku*) 2736 version_type=linux # correct to gnu/linux during the next big refactor 2737 need_lib_prefix=no 2738 need_version=no 2739 dynamic_linker="$host_os runtime_loader" 2740 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2741 soname_spec='$libname$release$shared_ext$major' 2742 shlibpath_var=LIBRARY_PATH 2743 shlibpath_overrides_runpath=no 2744 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2745 hardcode_into_libs=yes 2746 ;; 2747 2748hpux9* | hpux10* | hpux11*) 2749 # Give a soname corresponding to the major version so that dld.sl refuses to 2750 # link against other versions. 2751 version_type=sunos 2752 need_lib_prefix=no 2753 need_version=no 2754 case $host_cpu in 2755 ia64*) 2756 shrext_cmds='.so' 2757 hardcode_into_libs=yes 2758 dynamic_linker="$host_os dld.so" 2759 shlibpath_var=LD_LIBRARY_PATH 2760 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2761 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2762 soname_spec='$libname$release$shared_ext$major' 2763 if test 32 = "$HPUX_IA64_MODE"; then 2764 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2765 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2766 else 2767 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2768 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2769 fi 2770 ;; 2771 hppa*64*) 2772 shrext_cmds='.sl' 2773 hardcode_into_libs=yes 2774 dynamic_linker="$host_os dld.sl" 2775 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2776 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2777 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2778 soname_spec='$libname$release$shared_ext$major' 2779 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2780 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2781 ;; 2782 *) 2783 shrext_cmds='.sl' 2784 dynamic_linker="$host_os dld.sl" 2785 shlibpath_var=SHLIB_PATH 2786 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2787 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2788 soname_spec='$libname$release$shared_ext$major' 2789 ;; 2790 esac 2791 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2792 postinstall_cmds='chmod 555 $lib' 2793 # or fails outright, so override atomically: 2794 install_override_mode=555 2795 ;; 2796 2797interix[[3-9]]*) 2798 version_type=linux # correct to gnu/linux during the next big refactor 2799 need_lib_prefix=no 2800 need_version=no 2801 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2802 soname_spec='$libname$release$shared_ext$major' 2803 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2804 shlibpath_var=LD_LIBRARY_PATH 2805 shlibpath_overrides_runpath=no 2806 hardcode_into_libs=yes 2807 ;; 2808 2809irix5* | irix6* | nonstopux*) 2810 case $host_os in 2811 nonstopux*) version_type=nonstopux ;; 2812 *) 2813 if test yes = "$lt_cv_prog_gnu_ld"; then 2814 version_type=linux # correct to gnu/linux during the next big refactor 2815 else 2816 version_type=irix 2817 fi ;; 2818 esac 2819 need_lib_prefix=no 2820 need_version=no 2821 soname_spec='$libname$release$shared_ext$major' 2822 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2823 case $host_os in 2824 irix5* | nonstopux*) 2825 libsuff= shlibsuff= 2826 ;; 2827 *) 2828 case $LD in # libtool.m4 will add one of these switches to LD 2829 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2830 libsuff= shlibsuff= libmagic=32-bit;; 2831 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2832 libsuff=32 shlibsuff=N32 libmagic=N32;; 2833 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2834 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2835 *) libsuff= shlibsuff= libmagic=never-match;; 2836 esac 2837 ;; 2838 esac 2839 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2840 shlibpath_overrides_runpath=no 2841 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2842 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2843 hardcode_into_libs=yes 2844 ;; 2845 2846# No shared lib support for Linux oldld, aout, or coff. 2847linux*oldld* | linux*aout* | linux*coff*) 2848 dynamic_linker=no 2849 ;; 2850 2851linux*android*) 2852 version_type=none # Android doesn't support versioned libraries. 2853 need_lib_prefix=no 2854 need_version=no 2855 library_names_spec='$libname$release$shared_ext' 2856 soname_spec='$libname$release$shared_ext' 2857 finish_cmds= 2858 shlibpath_var=LD_LIBRARY_PATH 2859 shlibpath_overrides_runpath=yes 2860 2861 # This implies no fast_install, which is unacceptable. 2862 # Some rework will be needed to allow for fast_install 2863 # before this can be enabled. 2864 hardcode_into_libs=yes 2865 2866 dynamic_linker='Android linker' 2867 # Don't embed -rpath directories since the linker doesn't support them. 2868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2869 ;; 2870 2871# This must be glibc/ELF. 2872linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2873 version_type=linux # correct to gnu/linux during the next big refactor 2874 need_lib_prefix=no 2875 need_version=no 2876 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2877 soname_spec='$libname$release$shared_ext$major' 2878 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2879 shlibpath_var=LD_LIBRARY_PATH 2880 shlibpath_overrides_runpath=no 2881 2882 # Some binutils ld are patched to set DT_RUNPATH 2883 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2884 [lt_cv_shlibpath_overrides_runpath=no 2885 save_LDFLAGS=$LDFLAGS 2886 save_libdir=$libdir 2887 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2888 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2889 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2890 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2891 [lt_cv_shlibpath_overrides_runpath=yes])]) 2892 LDFLAGS=$save_LDFLAGS 2893 libdir=$save_libdir 2894 ]) 2895 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2896 2897 # This implies no fast_install, which is unacceptable. 2898 # Some rework will be needed to allow for fast_install 2899 # before this can be enabled. 2900 hardcode_into_libs=yes 2901 2902 # Ideally, we could use ldconfig to report *all* directores which are 2903 # searched for libraries, however this is still not possible. Aside from not 2904 # being certain /sbin/ldconfig is available, command 2905 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2906 # even though it is searched at run-time. Try to do the best guess by 2907 # appending ld.so.conf contents (and includes) to the search path. 2908 if test -f /etc/ld.so.conf; then 2909 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' ' '` 2910 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2911 fi 2912 2913 # We used to test for /lib/ld.so.1 and disable shared libraries on 2914 # powerpc, because MkLinux only supported shared libraries with the 2915 # GNU dynamic linker. Since this was broken with cross compilers, 2916 # most powerpc-linux boxes support dynamic linking these days and 2917 # people can always --disable-shared, the test was removed, and we 2918 # assume the GNU/Linux dynamic linker is in use. 2919 dynamic_linker='GNU/Linux ld.so' 2920 ;; 2921 2922netbsd*) 2923 version_type=sunos 2924 need_lib_prefix=no 2925 need_version=no 2926 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2927 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2928 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2929 dynamic_linker='NetBSD (a.out) ld.so' 2930 else 2931 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2932 soname_spec='$libname$release$shared_ext$major' 2933 dynamic_linker='NetBSD ld.elf_so' 2934 fi 2935 shlibpath_var=LD_LIBRARY_PATH 2936 shlibpath_overrides_runpath=yes 2937 hardcode_into_libs=yes 2938 ;; 2939 2940newsos6) 2941 version_type=linux # correct to gnu/linux during the next big refactor 2942 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2943 shlibpath_var=LD_LIBRARY_PATH 2944 shlibpath_overrides_runpath=yes 2945 ;; 2946 2947*nto* | *qnx*) 2948 version_type=qnx 2949 need_lib_prefix=no 2950 need_version=no 2951 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2952 soname_spec='$libname$release$shared_ext$major' 2953 shlibpath_var=LD_LIBRARY_PATH 2954 shlibpath_overrides_runpath=no 2955 hardcode_into_libs=yes 2956 dynamic_linker='ldqnx.so' 2957 ;; 2958 2959openbsd* | bitrig*) 2960 version_type=sunos 2961 sys_lib_dlsearch_path_spec=/usr/lib 2962 need_lib_prefix=no 2963 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2964 need_version=no 2965 else 2966 need_version=yes 2967 fi 2968 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2969 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2970 shlibpath_var=LD_LIBRARY_PATH 2971 shlibpath_overrides_runpath=yes 2972 ;; 2973 2974os2*) 2975 libname_spec='$name' 2976 version_type=windows 2977 shrext_cmds=.dll 2978 need_version=no 2979 need_lib_prefix=no 2980 # OS/2 can only load a DLL with a base name of 8 characters or less. 2981 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2982 v=$($ECHO $release$versuffix | tr -d .-); 2983 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2984 $ECHO $n$v`$shared_ext' 2985 library_names_spec='${libname}_dll.$libext' 2986 dynamic_linker='OS/2 ld.exe' 2987 shlibpath_var=BEGINLIBPATH 2988 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2989 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2990 postinstall_cmds='base_file=`basename \$file`~ 2991 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2992 dldir=$destdir/`dirname \$dlpath`~ 2993 test -d \$dldir || mkdir -p \$dldir~ 2994 $install_prog $dir/$dlname \$dldir/$dlname~ 2995 chmod a+x \$dldir/$dlname~ 2996 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2997 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2998 fi' 2999 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3000 dlpath=$dir/\$dldll~ 3001 $RM \$dlpath' 3002 ;; 3003 3004osf3* | osf4* | osf5*) 3005 version_type=osf 3006 need_lib_prefix=no 3007 need_version=no 3008 soname_spec='$libname$release$shared_ext$major' 3009 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3010 shlibpath_var=LD_LIBRARY_PATH 3011 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3012 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3013 ;; 3014 3015rdos*) 3016 dynamic_linker=no 3017 ;; 3018 3019solaris*) 3020 version_type=linux # correct to gnu/linux during the next big refactor 3021 need_lib_prefix=no 3022 need_version=no 3023 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3024 soname_spec='$libname$release$shared_ext$major' 3025 shlibpath_var=LD_LIBRARY_PATH 3026 shlibpath_overrides_runpath=yes 3027 hardcode_into_libs=yes 3028 # ldd complains unless libraries are executable 3029 postinstall_cmds='chmod +x $lib' 3030 ;; 3031 3032sunos4*) 3033 version_type=sunos 3034 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3035 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3036 shlibpath_var=LD_LIBRARY_PATH 3037 shlibpath_overrides_runpath=yes 3038 if test yes = "$with_gnu_ld"; then 3039 need_lib_prefix=no 3040 fi 3041 need_version=yes 3042 ;; 3043 3044sysv4 | sysv4.3*) 3045 version_type=linux # correct to gnu/linux during the next big refactor 3046 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3047 soname_spec='$libname$release$shared_ext$major' 3048 shlibpath_var=LD_LIBRARY_PATH 3049 case $host_vendor in 3050 sni) 3051 shlibpath_overrides_runpath=no 3052 need_lib_prefix=no 3053 runpath_var=LD_RUN_PATH 3054 ;; 3055 siemens) 3056 need_lib_prefix=no 3057 ;; 3058 motorola) 3059 need_lib_prefix=no 3060 need_version=no 3061 shlibpath_overrides_runpath=no 3062 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3063 ;; 3064 esac 3065 ;; 3066 3067sysv4*MP*) 3068 if test -d /usr/nec; then 3069 version_type=linux # correct to gnu/linux during the next big refactor 3070 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3071 soname_spec='$libname$shared_ext.$major' 3072 shlibpath_var=LD_LIBRARY_PATH 3073 fi 3074 ;; 3075 3076sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3077 version_type=sco 3078 need_lib_prefix=no 3079 need_version=no 3080 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3081 soname_spec='$libname$release$shared_ext$major' 3082 shlibpath_var=LD_LIBRARY_PATH 3083 shlibpath_overrides_runpath=yes 3084 hardcode_into_libs=yes 3085 if test yes = "$with_gnu_ld"; then 3086 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3087 else 3088 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3089 case $host_os in 3090 sco3.2v5*) 3091 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3092 ;; 3093 esac 3094 fi 3095 sys_lib_dlsearch_path_spec='/usr/lib' 3096 ;; 3097 3098tpf*) 3099 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3100 version_type=linux # correct to gnu/linux during the next big refactor 3101 need_lib_prefix=no 3102 need_version=no 3103 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3104 shlibpath_var=LD_LIBRARY_PATH 3105 shlibpath_overrides_runpath=no 3106 hardcode_into_libs=yes 3107 ;; 3108 3109uts4*) 3110 version_type=linux # correct to gnu/linux during the next big refactor 3111 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3112 soname_spec='$libname$release$shared_ext$major' 3113 shlibpath_var=LD_LIBRARY_PATH 3114 ;; 3115 3116*) 3117 dynamic_linker=no 3118 ;; 3119esac 3120AC_MSG_RESULT([$dynamic_linker]) 3121test no = "$dynamic_linker" && can_build_shared=no 3122 3123variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3124if test yes = "$GCC"; then 3125 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3126fi 3127 3128if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3129 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3130fi 3131 3132if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3133 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3134fi 3135 3136# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3137configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3138 3139# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3140func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3141 3142# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3143configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3144 3145_LT_DECL([], [variables_saved_for_relink], [1], 3146 [Variables whose values should be saved in libtool wrapper scripts and 3147 restored at link time]) 3148_LT_DECL([], [need_lib_prefix], [0], 3149 [Do we need the "lib" prefix for modules?]) 3150_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3151_LT_DECL([], [version_type], [0], [Library versioning type]) 3152_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3153_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3154_LT_DECL([], [shlibpath_overrides_runpath], [0], 3155 [Is shlibpath searched before the hard-coded library search path?]) 3156_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3157_LT_DECL([], [library_names_spec], [1], 3158 [[List of archive names. First name is the real one, the rest are links. 3159 The last name is the one that the linker finds with -lNAME]]) 3160_LT_DECL([], [soname_spec], [1], 3161 [[The coded name of the library, if different from the real name]]) 3162_LT_DECL([], [install_override_mode], [1], 3163 [Permission mode override for installation of shared libraries]) 3164_LT_DECL([], [postinstall_cmds], [2], 3165 [Command to use after installation of a shared archive]) 3166_LT_DECL([], [postuninstall_cmds], [2], 3167 [Command to use after uninstallation of a shared archive]) 3168_LT_DECL([], [finish_cmds], [2], 3169 [Commands used to finish a libtool library installation in a directory]) 3170_LT_DECL([], [finish_eval], [1], 3171 [[As "finish_cmds", except a single script fragment to be evaled but 3172 not shown]]) 3173_LT_DECL([], [hardcode_into_libs], [0], 3174 [Whether we should hardcode library paths into libraries]) 3175_LT_DECL([], [sys_lib_search_path_spec], [2], 3176 [Compile-time system search path for libraries]) 3177_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3178 [Detected run-time system search path for libraries]) 3179_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3180 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3181])# _LT_SYS_DYNAMIC_LINKER 3182 3183 3184# _LT_PATH_TOOL_PREFIX(TOOL) 3185# -------------------------- 3186# find a file program that can recognize shared library 3187AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3188[m4_require([_LT_DECL_EGREP])dnl 3189AC_MSG_CHECKING([for $1]) 3190AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3191[case $MAGIC_CMD in 3192[[\\/*] | ?:[\\/]*]) 3193 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3194 ;; 3195*) 3196 lt_save_MAGIC_CMD=$MAGIC_CMD 3197 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3198dnl $ac_dummy forces splitting on constant user-supplied paths. 3199dnl POSIX.2 word splitting is done only on the output of word expansions, 3200dnl not every word. This closes a longstanding sh security hole. 3201 ac_dummy="m4_if([$2], , $PATH, [$2])" 3202 for ac_dir in $ac_dummy; do 3203 IFS=$lt_save_ifs 3204 test -z "$ac_dir" && ac_dir=. 3205 if test -f "$ac_dir/$1"; then 3206 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3207 if test -n "$file_magic_test_file"; then 3208 case $deplibs_check_method in 3209 "file_magic "*) 3210 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3211 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3212 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3213 $EGREP "$file_magic_regex" > /dev/null; then 3214 : 3215 else 3216 cat <<_LT_EOF 1>&2 3217 3218*** Warning: the command libtool uses to detect shared libraries, 3219*** $file_magic_cmd, produces output that libtool cannot recognize. 3220*** The result is that libtool may fail to recognize shared libraries 3221*** as such. This will affect the creation of libtool libraries that 3222*** depend on shared libraries, but programs linked with such libtool 3223*** libraries will work regardless of this problem. Nevertheless, you 3224*** may want to report the problem to your system manager and/or to 3225*** bug-libtool@gnu.org 3226 3227_LT_EOF 3228 fi ;; 3229 esac 3230 fi 3231 break 3232 fi 3233 done 3234 IFS=$lt_save_ifs 3235 MAGIC_CMD=$lt_save_MAGIC_CMD 3236 ;; 3237esac]) 3238MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3239if test -n "$MAGIC_CMD"; then 3240 AC_MSG_RESULT($MAGIC_CMD) 3241else 3242 AC_MSG_RESULT(no) 3243fi 3244_LT_DECL([], [MAGIC_CMD], [0], 3245 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3246])# _LT_PATH_TOOL_PREFIX 3247 3248# Old name: 3249AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3250dnl aclocal-1.4 backwards compatibility: 3251dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3252 3253 3254# _LT_PATH_MAGIC 3255# -------------- 3256# find a file program that can recognize a shared library 3257m4_defun([_LT_PATH_MAGIC], 3258[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3259if test -z "$lt_cv_path_MAGIC_CMD"; then 3260 if test -n "$ac_tool_prefix"; then 3261 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3262 else 3263 MAGIC_CMD=: 3264 fi 3265fi 3266])# _LT_PATH_MAGIC 3267 3268 3269# LT_PATH_LD 3270# ---------- 3271# find the pathname to the GNU or non-GNU linker 3272AC_DEFUN([LT_PATH_LD], 3273[AC_REQUIRE([AC_PROG_CC])dnl 3274AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3276m4_require([_LT_DECL_SED])dnl 3277m4_require([_LT_DECL_EGREP])dnl 3278m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3279 3280AC_ARG_WITH([gnu-ld], 3281 [AS_HELP_STRING([--with-gnu-ld], 3282 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3283 [test no = "$withval" || with_gnu_ld=yes], 3284 [with_gnu_ld=no])dnl 3285 3286ac_prog=ld 3287if test yes = "$GCC"; then 3288 # Check if gcc -print-prog-name=ld gives a path. 3289 AC_MSG_CHECKING([for ld used by $CC]) 3290 case $host in 3291 *-*-mingw*) 3292 # gcc leaves a trailing carriage return, which upsets mingw 3293 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3294 *) 3295 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3296 esac 3297 case $ac_prog in 3298 # Accept absolute paths. 3299 [[\\/]]* | ?:[[\\/]]*) 3300 re_direlt='/[[^/]][[^/]]*/\.\./' 3301 # Canonicalize the pathname of ld 3302 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3303 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3304 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3305 done 3306 test -z "$LD" && LD=$ac_prog 3307 ;; 3308 "") 3309 # If it fails, then pretend we aren't using GCC. 3310 ac_prog=ld 3311 ;; 3312 *) 3313 # If it is relative, then search for the first ld in PATH. 3314 with_gnu_ld=unknown 3315 ;; 3316 esac 3317elif test yes = "$with_gnu_ld"; then 3318 AC_MSG_CHECKING([for GNU ld]) 3319else 3320 AC_MSG_CHECKING([for non-GNU ld]) 3321fi 3322AC_CACHE_VAL(lt_cv_path_LD, 3323[if test -z "$LD"; then 3324 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3325 for ac_dir in $PATH; do 3326 IFS=$lt_save_ifs 3327 test -z "$ac_dir" && ac_dir=. 3328 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3329 lt_cv_path_LD=$ac_dir/$ac_prog 3330 # Check to see if the program is GNU ld. I'd rather use --version, 3331 # but apparently some variants of GNU ld only accept -v. 3332 # Break only if it was the GNU/non-GNU ld that we prefer. 3333 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3334 *GNU* | *'with BFD'*) 3335 test no != "$with_gnu_ld" && break 3336 ;; 3337 *) 3338 test yes != "$with_gnu_ld" && break 3339 ;; 3340 esac 3341 fi 3342 done 3343 IFS=$lt_save_ifs 3344else 3345 lt_cv_path_LD=$LD # Let the user override the test with a path. 3346fi]) 3347LD=$lt_cv_path_LD 3348if test -n "$LD"; then 3349 AC_MSG_RESULT($LD) 3350else 3351 AC_MSG_RESULT(no) 3352fi 3353test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3354_LT_PATH_LD_GNU 3355AC_SUBST([LD]) 3356 3357_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3358])# LT_PATH_LD 3359 3360# Old names: 3361AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3362AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3363dnl aclocal-1.4 backwards compatibility: 3364dnl AC_DEFUN([AM_PROG_LD], []) 3365dnl AC_DEFUN([AC_PROG_LD], []) 3366 3367 3368# _LT_PATH_LD_GNU 3369#- -------------- 3370m4_defun([_LT_PATH_LD_GNU], 3371[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3372[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3373case `$LD -v 2>&1 </dev/null` in 3374*GNU* | *'with BFD'*) 3375 lt_cv_prog_gnu_ld=yes 3376 ;; 3377*) 3378 lt_cv_prog_gnu_ld=no 3379 ;; 3380esac]) 3381with_gnu_ld=$lt_cv_prog_gnu_ld 3382])# _LT_PATH_LD_GNU 3383 3384 3385# _LT_CMD_RELOAD 3386# -------------- 3387# find reload flag for linker 3388# -- PORTME Some linkers may need a different reload flag. 3389m4_defun([_LT_CMD_RELOAD], 3390[AC_CACHE_CHECK([for $LD option to reload object files], 3391 lt_cv_ld_reload_flag, 3392 [lt_cv_ld_reload_flag='-r']) 3393reload_flag=$lt_cv_ld_reload_flag 3394case $reload_flag in 3395"" | " "*) ;; 3396*) reload_flag=" $reload_flag" ;; 3397esac 3398reload_cmds='$LD$reload_flag -o $output$reload_objs' 3399case $host_os in 3400 cygwin* | mingw* | pw32* | cegcc*) 3401 if test yes != "$GCC"; then 3402 reload_cmds=false 3403 fi 3404 ;; 3405 darwin*) 3406 if test yes = "$GCC"; then 3407 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3408 else 3409 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3410 fi 3411 ;; 3412esac 3413_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3414_LT_TAGDECL([], [reload_cmds], [2])dnl 3415])# _LT_CMD_RELOAD 3416 3417 3418# _LT_PATH_DD 3419# ----------- 3420# find a working dd 3421m4_defun([_LT_PATH_DD], 3422[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3423[printf 0123456789abcdef0123456789abcdef >conftest.i 3424cat conftest.i conftest.i >conftest2.i 3425: ${lt_DD:=$DD} 3426AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3427[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3428 cmp -s conftest.i conftest.out \ 3429 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3430fi]) 3431rm -f conftest.i conftest2.i conftest.out]) 3432])# _LT_PATH_DD 3433 3434 3435# _LT_CMD_TRUNCATE 3436# ---------------- 3437# find command to truncate a binary pipe 3438m4_defun([_LT_CMD_TRUNCATE], 3439[m4_require([_LT_PATH_DD]) 3440AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3441[printf 0123456789abcdef0123456789abcdef >conftest.i 3442cat conftest.i conftest.i >conftest2.i 3443lt_cv_truncate_bin= 3444if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3445 cmp -s conftest.i conftest.out \ 3446 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3447fi 3448rm -f conftest.i conftest2.i conftest.out 3449test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3450_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3451 [Command to truncate a binary pipe]) 3452])# _LT_CMD_TRUNCATE 3453 3454 3455# _LT_CHECK_MAGIC_METHOD 3456# ---------------------- 3457# how to check for library dependencies 3458# -- PORTME fill in with the dynamic library characteristics 3459m4_defun([_LT_CHECK_MAGIC_METHOD], 3460[m4_require([_LT_DECL_EGREP]) 3461m4_require([_LT_DECL_OBJDUMP]) 3462AC_CACHE_CHECK([how to recognize dependent libraries], 3463lt_cv_deplibs_check_method, 3464[lt_cv_file_magic_cmd='$MAGIC_CMD' 3465lt_cv_file_magic_test_file= 3466lt_cv_deplibs_check_method='unknown' 3467# Need to set the preceding variable on all platforms that support 3468# interlibrary dependencies. 3469# 'none' -- dependencies not supported. 3470# 'unknown' -- same as none, but documents that we really don't know. 3471# 'pass_all' -- all dependencies passed with no checks. 3472# 'test_compile' -- check by making test program. 3473# 'file_magic [[regex]]' -- check by looking for files in library path 3474# that responds to the $file_magic_cmd with a given extended regex. 3475# If you have 'file' or equivalent on your system and you're not sure 3476# whether 'pass_all' will *always* work, you probably want this one. 3477 3478case $host_os in 3479aix[[4-9]]*) 3480 lt_cv_deplibs_check_method=pass_all 3481 ;; 3482 3483beos*) 3484 lt_cv_deplibs_check_method=pass_all 3485 ;; 3486 3487bsdi[[45]]*) 3488 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3489 lt_cv_file_magic_cmd='/usr/bin/file -L' 3490 lt_cv_file_magic_test_file=/shlib/libc.so 3491 ;; 3492 3493cygwin*) 3494 # func_win32_libid is a shell function defined in ltmain.sh 3495 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3496 lt_cv_file_magic_cmd='func_win32_libid' 3497 ;; 3498 3499mingw* | pw32*) 3500 # Base MSYS/MinGW do not provide the 'file' command needed by 3501 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3502 # unless we find 'file', for example because we are cross-compiling. 3503 if ( file / ) >/dev/null 2>&1; then 3504 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3505 lt_cv_file_magic_cmd='func_win32_libid' 3506 else 3507 # Keep this pattern in sync with the one in func_win32_libid. 3508 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3509 lt_cv_file_magic_cmd='$OBJDUMP -f' 3510 fi 3511 ;; 3512 3513cegcc*) 3514 # use the weaker test based on 'objdump'. See mingw*. 3515 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3516 lt_cv_file_magic_cmd='$OBJDUMP -f' 3517 ;; 3518 3519darwin* | rhapsody*) 3520 lt_cv_deplibs_check_method=pass_all 3521 ;; 3522 3523freebsd* | dragonfly*) 3524 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3525 case $host_cpu in 3526 i*86 ) 3527 # Not sure whether the presence of OpenBSD here was a mistake. 3528 # Let's accept both of them until this is cleared up. 3529 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3530 lt_cv_file_magic_cmd=/usr/bin/file 3531 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3532 ;; 3533 esac 3534 else 3535 lt_cv_deplibs_check_method=pass_all 3536 fi 3537 ;; 3538 3539haiku*) 3540 lt_cv_deplibs_check_method=pass_all 3541 ;; 3542 3543hpux10.20* | hpux11*) 3544 lt_cv_file_magic_cmd=/usr/bin/file 3545 case $host_cpu in 3546 ia64*) 3547 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3548 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3549 ;; 3550 hppa*64*) 3551 [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]'] 3552 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3553 ;; 3554 *) 3555 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3556 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3557 ;; 3558 esac 3559 ;; 3560 3561interix[[3-9]]*) 3562 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3564 ;; 3565 3566irix5* | irix6* | nonstopux*) 3567 case $LD in 3568 *-32|*"-32 ") libmagic=32-bit;; 3569 *-n32|*"-n32 ") libmagic=N32;; 3570 *-64|*"-64 ") libmagic=64-bit;; 3571 *) libmagic=never-match;; 3572 esac 3573 lt_cv_deplibs_check_method=pass_all 3574 ;; 3575 3576# This must be glibc/ELF. 3577linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3578 lt_cv_deplibs_check_method=pass_all 3579 ;; 3580 3581netbsd*) 3582 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3583 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3584 else 3585 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3586 fi 3587 ;; 3588 3589newos6*) 3590 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3591 lt_cv_file_magic_cmd=/usr/bin/file 3592 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3593 ;; 3594 3595*nto* | *qnx*) 3596 lt_cv_deplibs_check_method=pass_all 3597 ;; 3598 3599openbsd* | bitrig*) 3600 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3601 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3602 else 3603 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3604 fi 3605 ;; 3606 3607osf3* | osf4* | osf5*) 3608 lt_cv_deplibs_check_method=pass_all 3609 ;; 3610 3611rdos*) 3612 lt_cv_deplibs_check_method=pass_all 3613 ;; 3614 3615solaris*) 3616 lt_cv_deplibs_check_method=pass_all 3617 ;; 3618 3619sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3620 lt_cv_deplibs_check_method=pass_all 3621 ;; 3622 3623sysv4 | sysv4.3*) 3624 case $host_vendor in 3625 motorola) 3626 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]]' 3627 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3628 ;; 3629 ncr) 3630 lt_cv_deplibs_check_method=pass_all 3631 ;; 3632 sequent) 3633 lt_cv_file_magic_cmd='/bin/file' 3634 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3635 ;; 3636 sni) 3637 lt_cv_file_magic_cmd='/bin/file' 3638 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3639 lt_cv_file_magic_test_file=/lib/libc.so 3640 ;; 3641 siemens) 3642 lt_cv_deplibs_check_method=pass_all 3643 ;; 3644 pc) 3645 lt_cv_deplibs_check_method=pass_all 3646 ;; 3647 esac 3648 ;; 3649 3650tpf*) 3651 lt_cv_deplibs_check_method=pass_all 3652 ;; 3653os2*) 3654 lt_cv_deplibs_check_method=pass_all 3655 ;; 3656esac 3657]) 3658 3659file_magic_glob= 3660want_nocaseglob=no 3661if test "$build" = "$host"; then 3662 case $host_os in 3663 mingw* | pw32*) 3664 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3665 want_nocaseglob=yes 3666 else 3667 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3668 fi 3669 ;; 3670 esac 3671fi 3672 3673file_magic_cmd=$lt_cv_file_magic_cmd 3674deplibs_check_method=$lt_cv_deplibs_check_method 3675test -z "$deplibs_check_method" && deplibs_check_method=unknown 3676 3677_LT_DECL([], [deplibs_check_method], [1], 3678 [Method to check whether dependent libraries are shared objects]) 3679_LT_DECL([], [file_magic_cmd], [1], 3680 [Command to use when deplibs_check_method = "file_magic"]) 3681_LT_DECL([], [file_magic_glob], [1], 3682 [How to find potential files when deplibs_check_method = "file_magic"]) 3683_LT_DECL([], [want_nocaseglob], [1], 3684 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3685])# _LT_CHECK_MAGIC_METHOD 3686 3687 3688# LT_PATH_NM 3689# ---------- 3690# find the pathname to a BSD- or MS-compatible name lister 3691AC_DEFUN([LT_PATH_NM], 3692[AC_REQUIRE([AC_PROG_CC])dnl 3693AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3694[if test -n "$NM"; then 3695 # Let the user override the test. 3696 lt_cv_path_NM=$NM 3697else 3698 lt_nm_to_check=${ac_tool_prefix}nm 3699 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3700 lt_nm_to_check="$lt_nm_to_check nm" 3701 fi 3702 for lt_tmp_nm in $lt_nm_to_check; do 3703 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3704 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3705 IFS=$lt_save_ifs 3706 test -z "$ac_dir" && ac_dir=. 3707 tmp_nm=$ac_dir/$lt_tmp_nm 3708 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3709 # Check to see if the nm accepts a BSD-compat flag. 3710 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3711 # nm: unknown option "B" ignored 3712 # Tru64's nm complains that /dev/null is an invalid object file 3713 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3714 case $build_os in 3715 mingw*) lt_bad_file=conftest.nm/nofile ;; 3716 *) lt_bad_file=/dev/null ;; 3717 esac 3718 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3719 *$lt_bad_file* | *'Invalid file or object type'*) 3720 lt_cv_path_NM="$tmp_nm -B" 3721 break 2 3722 ;; 3723 *) 3724 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3725 */dev/null*) 3726 lt_cv_path_NM="$tmp_nm -p" 3727 break 2 3728 ;; 3729 *) 3730 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3731 continue # so that we can try to find one that supports BSD flags 3732 ;; 3733 esac 3734 ;; 3735 esac 3736 fi 3737 done 3738 IFS=$lt_save_ifs 3739 done 3740 : ${lt_cv_path_NM=no} 3741fi]) 3742if test no != "$lt_cv_path_NM"; then 3743 NM=$lt_cv_path_NM 3744else 3745 # Didn't find any BSD compatible name lister, look for dumpbin. 3746 if test -n "$DUMPBIN"; then : 3747 # Let the user override the test. 3748 else 3749 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3750 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3751 *COFF*) 3752 DUMPBIN="$DUMPBIN -symbols -headers" 3753 ;; 3754 *) 3755 DUMPBIN=: 3756 ;; 3757 esac 3758 fi 3759 AC_SUBST([DUMPBIN]) 3760 if test : != "$DUMPBIN"; then 3761 NM=$DUMPBIN 3762 fi 3763fi 3764test -z "$NM" && NM=nm 3765AC_SUBST([NM]) 3766_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3767 3768AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3769 [lt_cv_nm_interface="BSD nm" 3770 echo "int some_variable = 0;" > conftest.$ac_ext 3771 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3772 (eval "$ac_compile" 2>conftest.err) 3773 cat conftest.err >&AS_MESSAGE_LOG_FD 3774 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3775 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3776 cat conftest.err >&AS_MESSAGE_LOG_FD 3777 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3778 cat conftest.out >&AS_MESSAGE_LOG_FD 3779 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3780 lt_cv_nm_interface="MS dumpbin" 3781 fi 3782 rm -f conftest*]) 3783])# LT_PATH_NM 3784 3785# Old names: 3786AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3787AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3788dnl aclocal-1.4 backwards compatibility: 3789dnl AC_DEFUN([AM_PROG_NM], []) 3790dnl AC_DEFUN([AC_PROG_NM], []) 3791 3792# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3793# -------------------------------- 3794# how to determine the name of the shared library 3795# associated with a specific link library. 3796# -- PORTME fill in with the dynamic library characteristics 3797m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3798[m4_require([_LT_DECL_EGREP]) 3799m4_require([_LT_DECL_OBJDUMP]) 3800m4_require([_LT_DECL_DLLTOOL]) 3801AC_CACHE_CHECK([how to associate runtime and link libraries], 3802lt_cv_sharedlib_from_linklib_cmd, 3803[lt_cv_sharedlib_from_linklib_cmd='unknown' 3804 3805case $host_os in 3806cygwin* | mingw* | pw32* | cegcc*) 3807 # two different shell functions defined in ltmain.sh; 3808 # decide which one to use based on capabilities of $DLLTOOL 3809 case `$DLLTOOL --help 2>&1` in 3810 *--identify-strict*) 3811 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3812 ;; 3813 *) 3814 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3815 ;; 3816 esac 3817 ;; 3818*) 3819 # fallback: assume linklib IS sharedlib 3820 lt_cv_sharedlib_from_linklib_cmd=$ECHO 3821 ;; 3822esac 3823]) 3824sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3825test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3826 3827_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3828 [Command to associate shared and link libraries]) 3829])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3830 3831 3832# _LT_PATH_MANIFEST_TOOL 3833# ---------------------- 3834# locate the manifest tool 3835m4_defun([_LT_PATH_MANIFEST_TOOL], 3836[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3837test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3838AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3839 [lt_cv_path_mainfest_tool=no 3840 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3841 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3842 cat conftest.err >&AS_MESSAGE_LOG_FD 3843 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3844 lt_cv_path_mainfest_tool=yes 3845 fi 3846 rm -f conftest*]) 3847if test yes != "$lt_cv_path_mainfest_tool"; then 3848 MANIFEST_TOOL=: 3849fi 3850_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3851])# _LT_PATH_MANIFEST_TOOL 3852 3853 3854# _LT_DLL_DEF_P([FILE]) 3855# --------------------- 3856# True iff FILE is a Windows DLL '.def' file. 3857# Keep in sync with func_dll_def_p in the libtool script 3858AC_DEFUN([_LT_DLL_DEF_P], 3859[dnl 3860 test DEF = "`$SED -n dnl 3861 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3862 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3863 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3864 -e q dnl Only consider the first "real" line 3865 $1`" dnl 3866])# _LT_DLL_DEF_P 3867 3868 3869# LT_LIB_M 3870# -------- 3871# check for math library 3872AC_DEFUN([LT_LIB_M], 3873[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3874LIBM= 3875case $host in 3876*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3877 # These system don't have libm, or don't need it 3878 ;; 3879*-ncr-sysv4.3*) 3880 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3881 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3882 ;; 3883*) 3884 AC_CHECK_LIB(m, cos, LIBM=-lm) 3885 ;; 3886esac 3887AC_SUBST([LIBM]) 3888])# LT_LIB_M 3889 3890# Old name: 3891AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3892dnl aclocal-1.4 backwards compatibility: 3893dnl AC_DEFUN([AC_CHECK_LIBM], []) 3894 3895 3896# _LT_COMPILER_NO_RTTI([TAGNAME]) 3897# ------------------------------- 3898m4_defun([_LT_COMPILER_NO_RTTI], 3899[m4_require([_LT_TAG_COMPILER])dnl 3900 3901_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3902 3903if test yes = "$GCC"; then 3904 case $cc_basename in 3905 nvcc*) 3906 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3907 *) 3908 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3909 esac 3910 3911 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3912 lt_cv_prog_compiler_rtti_exceptions, 3913 [-fno-rtti -fno-exceptions], [], 3914 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3915fi 3916_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3917 [Compiler flag to turn off builtin functions]) 3918])# _LT_COMPILER_NO_RTTI 3919 3920 3921# _LT_CMD_GLOBAL_SYMBOLS 3922# ---------------------- 3923m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3924[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3925AC_REQUIRE([AC_PROG_CC])dnl 3926AC_REQUIRE([AC_PROG_AWK])dnl 3927AC_REQUIRE([LT_PATH_NM])dnl 3928AC_REQUIRE([LT_PATH_LD])dnl 3929m4_require([_LT_DECL_SED])dnl 3930m4_require([_LT_DECL_EGREP])dnl 3931m4_require([_LT_TAG_COMPILER])dnl 3932 3933# Check for command to grab the raw symbol name followed by C symbol from nm. 3934AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3935AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3936[ 3937# These are sane defaults that work on at least a few old systems. 3938# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3939 3940# Character class describing NM global symbol codes. 3941symcode='[[BCDEGRST]]' 3942 3943# Regexp to match symbols that can be accessed directly from C. 3944sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3945 3946# Define system-specific variables. 3947case $host_os in 3948aix*) 3949 symcode='[[BCDT]]' 3950 ;; 3951cygwin* | mingw* | pw32* | cegcc*) 3952 symcode='[[ABCDGISTW]]' 3953 ;; 3954hpux*) 3955 if test ia64 = "$host_cpu"; then 3956 symcode='[[ABCDEGRST]]' 3957 fi 3958 ;; 3959irix* | nonstopux*) 3960 symcode='[[BCDEGRST]]' 3961 ;; 3962osf*) 3963 symcode='[[BCDEGQRST]]' 3964 ;; 3965solaris*) 3966 symcode='[[BDRT]]' 3967 ;; 3968sco3.2v5*) 3969 symcode='[[DT]]' 3970 ;; 3971sysv4.2uw2*) 3972 symcode='[[DT]]' 3973 ;; 3974sysv5* | sco5v6* | unixware* | OpenUNIX*) 3975 symcode='[[ABDT]]' 3976 ;; 3977sysv4) 3978 symcode='[[DFNSTU]]' 3979 ;; 3980esac 3981 3982# If we're using GNU nm, then use its standard symbol codes. 3983case `$NM -V 2>&1` in 3984*GNU* | *'with BFD'*) 3985 symcode='[[ABCDGIRSTW]]' ;; 3986esac 3987 3988if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3989 # Gets list of data symbols to import. 3990 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3991 # Adjust the below global symbol transforms to fixup imported variables. 3992 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3993 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3994 lt_c_name_lib_hook="\ 3995 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3996 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3997else 3998 # Disable hooks by default. 3999 lt_cv_sys_global_symbol_to_import= 4000 lt_cdecl_hook= 4001 lt_c_name_hook= 4002 lt_c_name_lib_hook= 4003fi 4004 4005# Transform an extracted symbol line into a proper C declaration. 4006# Some systems (esp. on ia64) link data and code symbols differently, 4007# so use this general approach. 4008lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4009$lt_cdecl_hook\ 4010" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4011" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4012 4013# Transform an extracted symbol line into symbol name and symbol address 4014lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4015$lt_c_name_hook\ 4016" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4017" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4018 4019# Transform an extracted symbol line into symbol name with lib prefix and 4020# symbol address. 4021lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4022$lt_c_name_lib_hook\ 4023" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4024" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4025" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4026 4027# Handle CRLF in mingw tool chain 4028opt_cr= 4029case $build_os in 4030mingw*) 4031 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4032 ;; 4033esac 4034 4035# Try without a prefix underscore, then with it. 4036for ac_symprfx in "" "_"; do 4037 4038 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4039 symxfrm="\\1 $ac_symprfx\\2 \\2" 4040 4041 # Write the raw and C identifiers. 4042 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4043 # Fake it for dumpbin and say T for any non-static function, 4044 # D for any global variable and I for any imported variable. 4045 # Also find C++ and __fastcall symbols from MSVC++, 4046 # which start with @ or ?. 4047 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4048" {last_section=section; section=\$ 3};"\ 4049" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4050" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4051" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4052" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4053" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4054" \$ 0!~/External *\|/{next};"\ 4055" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4056" {if(hide[section]) next};"\ 4057" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4058" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4059" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4060" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4061" ' prfx=^$ac_symprfx]" 4062 else 4063 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4064 fi 4065 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4066 4067 # Check to see that the pipe works correctly. 4068 pipe_works=no 4069 4070 rm -f conftest* 4071 cat > conftest.$ac_ext <<_LT_EOF 4072#ifdef __cplusplus 4073extern "C" { 4074#endif 4075char nm_test_var; 4076void nm_test_func(void); 4077void nm_test_func(void){} 4078#ifdef __cplusplus 4079} 4080#endif 4081int main(){nm_test_var='a';nm_test_func();return(0);} 4082_LT_EOF 4083 4084 if AC_TRY_EVAL(ac_compile); then 4085 # Now try to grab the symbols. 4086 nlist=conftest.nm 4087 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4088 # Try sorting and uniquifying the output. 4089 if sort "$nlist" | uniq > "$nlist"T; then 4090 mv -f "$nlist"T "$nlist" 4091 else 4092 rm -f "$nlist"T 4093 fi 4094 4095 # Make sure that we snagged all the symbols we need. 4096 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4097 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4098 cat <<_LT_EOF > conftest.$ac_ext 4099/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4100#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4101/* DATA imports from DLLs on WIN32 can't be const, because runtime 4102 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4103# define LT@&t@_DLSYM_CONST 4104#elif defined __osf__ 4105/* This system does not cope well with relocations in const data. */ 4106# define LT@&t@_DLSYM_CONST 4107#else 4108# define LT@&t@_DLSYM_CONST const 4109#endif 4110 4111#ifdef __cplusplus 4112extern "C" { 4113#endif 4114 4115_LT_EOF 4116 # Now generate the symbol file. 4117 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4118 4119 cat <<_LT_EOF >> conftest.$ac_ext 4120 4121/* The mapping between symbol names and symbols. */ 4122LT@&t@_DLSYM_CONST struct { 4123 const char *name; 4124 void *address; 4125} 4126lt__PROGRAM__LTX_preloaded_symbols[[]] = 4127{ 4128 { "@PROGRAM@", (void *) 0 }, 4129_LT_EOF 4130 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4131 cat <<\_LT_EOF >> conftest.$ac_ext 4132 {0, (void *) 0} 4133}; 4134 4135/* This works around a problem in FreeBSD linker */ 4136#ifdef FREEBSD_WORKAROUND 4137static const void *lt_preloaded_setup() { 4138 return lt__PROGRAM__LTX_preloaded_symbols; 4139} 4140#endif 4141 4142#ifdef __cplusplus 4143} 4144#endif 4145_LT_EOF 4146 # Now try linking the two files. 4147 mv conftest.$ac_objext conftstm.$ac_objext 4148 lt_globsym_save_LIBS=$LIBS 4149 lt_globsym_save_CFLAGS=$CFLAGS 4150 LIBS=conftstm.$ac_objext 4151 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4152 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4153 pipe_works=yes 4154 fi 4155 LIBS=$lt_globsym_save_LIBS 4156 CFLAGS=$lt_globsym_save_CFLAGS 4157 else 4158 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4159 fi 4160 else 4161 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4162 fi 4163 else 4164 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4165 fi 4166 else 4167 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4168 cat conftest.$ac_ext >&5 4169 fi 4170 rm -rf conftest* conftst* 4171 4172 # Do not use the global_symbol_pipe unless it works. 4173 if test yes = "$pipe_works"; then 4174 break 4175 else 4176 lt_cv_sys_global_symbol_pipe= 4177 fi 4178done 4179]) 4180if test -z "$lt_cv_sys_global_symbol_pipe"; then 4181 lt_cv_sys_global_symbol_to_cdecl= 4182fi 4183if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4184 AC_MSG_RESULT(failed) 4185else 4186 AC_MSG_RESULT(ok) 4187fi 4188 4189# Response file support. 4190if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4191 nm_file_list_spec='@' 4192elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4193 nm_file_list_spec='@' 4194fi 4195 4196_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4197 [Take the output of nm and produce a listing of raw symbols and C names]) 4198_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4199 [Transform the output of nm in a proper C declaration]) 4200_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4201 [Transform the output of nm into a list of symbols to manually relocate]) 4202_LT_DECL([global_symbol_to_c_name_address], 4203 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4204 [Transform the output of nm in a C name address pair]) 4205_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4206 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4207 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4208_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4209 [The name lister interface]) 4210_LT_DECL([], [nm_file_list_spec], [1], 4211 [Specify filename containing input files for $NM]) 4212]) # _LT_CMD_GLOBAL_SYMBOLS 4213 4214 4215# _LT_COMPILER_PIC([TAGNAME]) 4216# --------------------------- 4217m4_defun([_LT_COMPILER_PIC], 4218[m4_require([_LT_TAG_COMPILER])dnl 4219_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4220_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4221_LT_TAGVAR(lt_prog_compiler_static, $1)= 4222 4223m4_if([$1], [CXX], [ 4224 # C++ specific cases for pic, static, wl, etc. 4225 if test yes = "$GXX"; then 4226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4227 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4228 4229 case $host_os in 4230 aix*) 4231 # All AIX code is PIC. 4232 if test ia64 = "$host_cpu"; then 4233 # AIX 5 now supports IA64 processor 4234 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4235 fi 4236 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4237 ;; 4238 4239 amigaos*) 4240 case $host_cpu in 4241 powerpc) 4242 # see comment about AmigaOS4 .so support 4243 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4244 ;; 4245 m68k) 4246 # FIXME: we need at least 68020 code to build shared libraries, but 4247 # adding the '-m68020' flag to GCC prevents building anything better, 4248 # like '-m68040'. 4249 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4250 ;; 4251 esac 4252 ;; 4253 4254 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4255 # PIC is the default for these OSes. 4256 ;; 4257 mingw* | cygwin* | os2* | pw32* | cegcc*) 4258 # This hack is so that the source file can tell whether it is being 4259 # built for inclusion in a dll (and should export symbols for example). 4260 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4261 # (--disable-auto-import) libraries 4262 m4_if([$1], [GCJ], [], 4263 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4264 case $host_os in 4265 os2*) 4266 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4267 ;; 4268 esac 4269 ;; 4270 darwin* | rhapsody*) 4271 # PIC is the default on this platform 4272 # Common symbols not allowed in MH_DYLIB files 4273 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4274 ;; 4275 *djgpp*) 4276 # DJGPP does not support shared libraries at all 4277 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4278 ;; 4279 haiku*) 4280 # PIC is the default for Haiku. 4281 # The "-static" flag exists, but is broken. 4282 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4283 ;; 4284 interix[[3-9]]*) 4285 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4286 # Instead, we relocate shared libraries at runtime. 4287 ;; 4288 sysv4*MP*) 4289 if test -d /usr/nec; then 4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4291 fi 4292 ;; 4293 hpux*) 4294 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4295 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4296 # sets the default TLS model and affects inlining. 4297 case $host_cpu in 4298 hppa*64*) 4299 ;; 4300 *) 4301 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4302 ;; 4303 esac 4304 ;; 4305 *qnx* | *nto*) 4306 # QNX uses GNU C++, but need to define -shared option too, otherwise 4307 # it will coredump. 4308 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4309 ;; 4310 *) 4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4312 ;; 4313 esac 4314 else 4315 case $host_os in 4316 aix[[4-9]]*) 4317 # All AIX code is PIC. 4318 if test ia64 = "$host_cpu"; then 4319 # AIX 5 now supports IA64 processor 4320 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4321 else 4322 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4323 fi 4324 ;; 4325 chorus*) 4326 case $cc_basename in 4327 cxch68*) 4328 # Green Hills C++ Compiler 4329 # _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" 4330 ;; 4331 esac 4332 ;; 4333 mingw* | cygwin* | os2* | pw32* | cegcc*) 4334 # This hack is so that the source file can tell whether it is being 4335 # built for inclusion in a dll (and should export symbols for example). 4336 m4_if([$1], [GCJ], [], 4337 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4338 ;; 4339 dgux*) 4340 case $cc_basename in 4341 ec++*) 4342 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4343 ;; 4344 ghcx*) 4345 # Green Hills C++ Compiler 4346 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4347 ;; 4348 *) 4349 ;; 4350 esac 4351 ;; 4352 freebsd* | dragonfly*) 4353 # FreeBSD uses GNU C++ 4354 ;; 4355 hpux9* | hpux10* | hpux11*) 4356 case $cc_basename in 4357 CC*) 4358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4359 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4360 if test ia64 != "$host_cpu"; then 4361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4362 fi 4363 ;; 4364 aCC*) 4365 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4366 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4367 case $host_cpu in 4368 hppa*64*|ia64*) 4369 # +Z the default 4370 ;; 4371 *) 4372 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4373 ;; 4374 esac 4375 ;; 4376 *) 4377 ;; 4378 esac 4379 ;; 4380 interix*) 4381 # This is c89, which is MS Visual C++ (no shared libs) 4382 # Anyone wants to do a port? 4383 ;; 4384 irix5* | irix6* | nonstopux*) 4385 case $cc_basename in 4386 CC*) 4387 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4389 # CC pic flag -KPIC is the default. 4390 ;; 4391 *) 4392 ;; 4393 esac 4394 ;; 4395 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4396 case $cc_basename in 4397 KCC*) 4398 # KAI C++ Compiler 4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4401 ;; 4402 ecpc* ) 4403 # old Intel C++ for x86_64, which still supported -KPIC. 4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4407 ;; 4408 icpc* ) 4409 # Intel C++, used to be incompatible with GCC. 4410 # ICC 10 doesn't accept -KPIC any more. 4411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4414 ;; 4415 pgCC* | pgcpp*) 4416 # Portland Group C++ compiler 4417 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4420 ;; 4421 cxx*) 4422 # Compaq C++ 4423 # Make sure the PIC flag is empty. It appears that all Alpha 4424 # Linux and Compaq Tru64 Unix objects are PIC. 4425 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4426 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4427 ;; 4428 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4429 # IBM XL 8.0, 9.0 on PPC and BlueGene 4430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4431 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4432 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4433 ;; 4434 *) 4435 case `$CC -V 2>&1 | sed 5q` in 4436 *Sun\ C*) 4437 # Sun C++ 5.9 4438 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4439 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4441 ;; 4442 esac 4443 ;; 4444 esac 4445 ;; 4446 lynxos*) 4447 ;; 4448 m88k*) 4449 ;; 4450 mvs*) 4451 case $cc_basename in 4452 cxx*) 4453 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4454 ;; 4455 *) 4456 ;; 4457 esac 4458 ;; 4459 netbsd*) 4460 ;; 4461 *qnx* | *nto*) 4462 # QNX uses GNU C++, but need to define -shared option too, otherwise 4463 # it will coredump. 4464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4465 ;; 4466 osf3* | osf4* | osf5*) 4467 case $cc_basename in 4468 KCC*) 4469 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4470 ;; 4471 RCC*) 4472 # Rational C++ 2.4.1 4473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4474 ;; 4475 cxx*) 4476 # Digital/Compaq C++ 4477 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4478 # Make sure the PIC flag is empty. It appears that all Alpha 4479 # Linux and Compaq Tru64 Unix objects are PIC. 4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4482 ;; 4483 *) 4484 ;; 4485 esac 4486 ;; 4487 psos*) 4488 ;; 4489 solaris*) 4490 case $cc_basename in 4491 CC* | sunCC*) 4492 # Sun C++ 4.2, 5.x and Centerline C++ 4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4495 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4496 ;; 4497 gcx*) 4498 # Green Hills C++ Compiler 4499 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4500 ;; 4501 *) 4502 ;; 4503 esac 4504 ;; 4505 sunos4*) 4506 case $cc_basename in 4507 CC*) 4508 # Sun C++ 4.x 4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4510 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4511 ;; 4512 lcc*) 4513 # Lucid 4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4515 ;; 4516 *) 4517 ;; 4518 esac 4519 ;; 4520 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4521 case $cc_basename in 4522 CC*) 4523 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4524 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4525 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4526 ;; 4527 esac 4528 ;; 4529 tandem*) 4530 case $cc_basename in 4531 NCC*) 4532 # NonStop-UX NCC 3.20 4533 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4534 ;; 4535 *) 4536 ;; 4537 esac 4538 ;; 4539 vxworks*) 4540 ;; 4541 *) 4542 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4543 ;; 4544 esac 4545 fi 4546], 4547[ 4548 if test yes = "$GCC"; then 4549 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4550 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4551 4552 case $host_os in 4553 aix*) 4554 # All AIX code is PIC. 4555 if test ia64 = "$host_cpu"; then 4556 # AIX 5 now supports IA64 processor 4557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4558 fi 4559 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4560 ;; 4561 4562 amigaos*) 4563 case $host_cpu in 4564 powerpc) 4565 # see comment about AmigaOS4 .so support 4566 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4567 ;; 4568 m68k) 4569 # FIXME: we need at least 68020 code to build shared libraries, but 4570 # adding the '-m68020' flag to GCC prevents building anything better, 4571 # like '-m68040'. 4572 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4573 ;; 4574 esac 4575 ;; 4576 4577 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4578 # PIC is the default for these OSes. 4579 ;; 4580 4581 mingw* | cygwin* | pw32* | os2* | cegcc*) 4582 # This hack is so that the source file can tell whether it is being 4583 # built for inclusion in a dll (and should export symbols for example). 4584 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4585 # (--disable-auto-import) libraries 4586 m4_if([$1], [GCJ], [], 4587 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4588 case $host_os in 4589 os2*) 4590 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4591 ;; 4592 esac 4593 ;; 4594 4595 darwin* | rhapsody*) 4596 # PIC is the default on this platform 4597 # Common symbols not allowed in MH_DYLIB files 4598 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4599 ;; 4600 4601 haiku*) 4602 # PIC is the default for Haiku. 4603 # The "-static" flag exists, but is broken. 4604 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4605 ;; 4606 4607 hpux*) 4608 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4609 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4610 # sets the default TLS model and affects inlining. 4611 case $host_cpu in 4612 hppa*64*) 4613 # +Z the default 4614 ;; 4615 *) 4616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4617 ;; 4618 esac 4619 ;; 4620 4621 interix[[3-9]]*) 4622 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4623 # Instead, we relocate shared libraries at runtime. 4624 ;; 4625 4626 msdosdjgpp*) 4627 # Just because we use GCC doesn't mean we suddenly get shared libraries 4628 # on systems that don't support them. 4629 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4630 enable_shared=no 4631 ;; 4632 4633 *nto* | *qnx*) 4634 # QNX uses GNU C++, but need to define -shared option too, otherwise 4635 # it will coredump. 4636 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4637 ;; 4638 4639 sysv4*MP*) 4640 if test -d /usr/nec; then 4641 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4642 fi 4643 ;; 4644 4645 *) 4646 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4647 ;; 4648 esac 4649 4650 case $cc_basename in 4651 nvcc*) # Cuda Compiler Driver 2.2 4652 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4653 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4654 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4655 fi 4656 ;; 4657 esac 4658 else 4659 # PORTME Check for flag to pass linker flags through the system compiler. 4660 case $host_os in 4661 aix*) 4662 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4663 if test ia64 = "$host_cpu"; then 4664 # AIX 5 now supports IA64 processor 4665 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4666 else 4667 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4668 fi 4669 ;; 4670 4671 darwin* | rhapsody*) 4672 # PIC is the default on this platform 4673 # Common symbols not allowed in MH_DYLIB files 4674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4675 case $cc_basename in 4676 nagfor*) 4677 # NAG Fortran compiler 4678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4679 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4680 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4681 ;; 4682 esac 4683 ;; 4684 4685 mingw* | cygwin* | pw32* | os2* | cegcc*) 4686 # This hack is so that the source file can tell whether it is being 4687 # built for inclusion in a dll (and should export symbols for example). 4688 m4_if([$1], [GCJ], [], 4689 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4690 case $host_os in 4691 os2*) 4692 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4693 ;; 4694 esac 4695 ;; 4696 4697 hpux9* | hpux10* | hpux11*) 4698 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4699 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4700 # not for PA HP-UX. 4701 case $host_cpu in 4702 hppa*64*|ia64*) 4703 # +Z the default 4704 ;; 4705 *) 4706 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4707 ;; 4708 esac 4709 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4711 ;; 4712 4713 irix5* | irix6* | nonstopux*) 4714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4715 # PIC (with -KPIC) is the default. 4716 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4717 ;; 4718 4719 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4720 case $cc_basename in 4721 # old Intel for x86_64, which still supported -KPIC. 4722 ecc*) 4723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4725 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4726 ;; 4727 # icc used to be incompatible with GCC. 4728 # ICC 10 doesn't accept -KPIC any more. 4729 icc* | ifort*) 4730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4732 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4733 ;; 4734 # Lahey Fortran 8.1. 4735 lf95*) 4736 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4738 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4739 ;; 4740 nagfor*) 4741 # NAG Fortran compiler 4742 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4743 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4744 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4745 ;; 4746 tcc*) 4747 # Fabrice Bellard et al's Tiny C Compiler 4748 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4749 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4750 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4751 ;; 4752 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4753 # Portland Group compilers (*not* the Pentium gcc compiler, 4754 # which looks to be a dead project) 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4757 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4758 ;; 4759 ccc*) 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4761 # All Alpha code is PIC. 4762 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4763 ;; 4764 xl* | bgxl* | bgf* | mpixl*) 4765 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4768 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4769 ;; 4770 *) 4771 case `$CC -V 2>&1 | sed 5q` in 4772 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4773 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4774 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4775 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4777 ;; 4778 *Sun\ F* | *Sun*Fortran*) 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)='-Qoption ld ' 4782 ;; 4783 *Sun\ C*) 4784 # Sun C 5.9 4785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4787 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4788 ;; 4789 *Intel*\ [[CF]]*Compiler*) 4790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4792 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4793 ;; 4794 *Portland\ Group*) 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)='-Bstatic' 4798 ;; 4799 esac 4800 ;; 4801 esac 4802 ;; 4803 4804 newsos6) 4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4807 ;; 4808 4809 *nto* | *qnx*) 4810 # QNX uses GNU C++, but need to define -shared option too, otherwise 4811 # it will coredump. 4812 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4813 ;; 4814 4815 osf3* | osf4* | osf5*) 4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4817 # All OSF/1 code is PIC. 4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4819 ;; 4820 4821 rdos*) 4822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4823 ;; 4824 4825 solaris*) 4826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4827 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4828 case $cc_basename in 4829 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4830 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4831 *) 4832 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4833 esac 4834 ;; 4835 4836 sunos4*) 4837 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840 ;; 4841 4842 sysv4 | sysv4.2uw2* | sysv4.3*) 4843 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4844 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4845 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4846 ;; 4847 4848 sysv4*MP*) 4849 if test -d /usr/nec; then 4850 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4851 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4852 fi 4853 ;; 4854 4855 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4856 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4857 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4858 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4859 ;; 4860 4861 unicos*) 4862 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4863 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4864 ;; 4865 4866 uts4*) 4867 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4868 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4869 ;; 4870 4871 *) 4872 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4873 ;; 4874 esac 4875 fi 4876]) 4877case $host_os in 4878 # For platforms that do not support PIC, -DPIC is meaningless: 4879 *djgpp*) 4880 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4881 ;; 4882 *) 4883 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4884 ;; 4885esac 4886 4887AC_CACHE_CHECK([for $compiler option to produce PIC], 4888 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4889 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4890_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4891 4892# 4893# Check to make sure the PIC flag actually works. 4894# 4895if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4896 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4897 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4898 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4899 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4900 "" | " "*) ;; 4901 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4902 esac], 4903 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4904 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4905fi 4906_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4907 [Additional compiler flags for building library objects]) 4908 4909_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4910 [How to pass a linker flag through the compiler]) 4911# 4912# Check to make sure the static flag actually works. 4913# 4914wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4915_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4916 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4917 $lt_tmp_static_flag, 4918 [], 4919 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4920_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4921 [Compiler flag to prevent dynamic linking]) 4922])# _LT_COMPILER_PIC 4923 4924 4925# _LT_LINKER_SHLIBS([TAGNAME]) 4926# ---------------------------- 4927# See if the linker supports building shared libraries. 4928m4_defun([_LT_LINKER_SHLIBS], 4929[AC_REQUIRE([LT_PATH_LD])dnl 4930AC_REQUIRE([LT_PATH_NM])dnl 4931m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4932m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4933m4_require([_LT_DECL_EGREP])dnl 4934m4_require([_LT_DECL_SED])dnl 4935m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4936m4_require([_LT_TAG_COMPILER])dnl 4937AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4938m4_if([$1], [CXX], [ 4939 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4940 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4941 case $host_os in 4942 aix[[4-9]]*) 4943 # If we're using GNU nm, then we don't want the "-C" option. 4944 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4945 # Without the "-l" option, or with the "-B" option, AIX nm treats 4946 # weak defined symbols like other global defined symbols, whereas 4947 # GNU nm marks them as "W". 4948 # While the 'weak' keyword is ignored in the Export File, we need 4949 # it in the Import File for the 'aix-soname' feature, so we have 4950 # to replace the "-B" option with "-P" for AIX nm. 4951 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4952 _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' 4953 else 4954 _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 == "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' 4955 fi 4956 ;; 4957 pw32*) 4958 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4959 ;; 4960 cygwin* | mingw* | cegcc*) 4961 case $cc_basename in 4962 cl*) 4963 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4964 ;; 4965 *) 4966 _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' 4967 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4968 ;; 4969 esac 4970 ;; 4971 *) 4972 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4973 ;; 4974 esac 4975], [ 4976 runpath_var= 4977 _LT_TAGVAR(allow_undefined_flag, $1)= 4978 _LT_TAGVAR(always_export_symbols, $1)=no 4979 _LT_TAGVAR(archive_cmds, $1)= 4980 _LT_TAGVAR(archive_expsym_cmds, $1)= 4981 _LT_TAGVAR(compiler_needs_object, $1)=no 4982 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4983 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4984 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4985 _LT_TAGVAR(hardcode_automatic, $1)=no 4986 _LT_TAGVAR(hardcode_direct, $1)=no 4987 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4988 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4989 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4990 _LT_TAGVAR(hardcode_minus_L, $1)=no 4991 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4992 _LT_TAGVAR(inherit_rpath, $1)=no 4993 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4994 _LT_TAGVAR(module_cmds, $1)= 4995 _LT_TAGVAR(module_expsym_cmds, $1)= 4996 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4997 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4998 _LT_TAGVAR(thread_safe_flag_spec, $1)= 4999 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5000 # include_expsyms should be a list of space-separated symbols to be *always* 5001 # included in the symbol list 5002 _LT_TAGVAR(include_expsyms, $1)= 5003 # exclude_expsyms can be an extended regexp of symbols to exclude 5004 # it will be wrapped by ' (' and ')$', so one must not match beginning or 5005 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5006 # as well as any symbol that contains 'd'. 5007 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5008 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5009 # platforms (ab)use it in PIC code, but their linkers get confused if 5010 # the symbol is explicitly referenced. Since portable code cannot 5011 # rely on this symbol name, it's probably fine to never include it in 5012 # preloaded symbol tables. 5013 # Exclude shared library initialization/finalization symbols. 5014dnl Note also adjust exclude_expsyms for C++ above. 5015 extract_expsyms_cmds= 5016 5017 case $host_os in 5018 cygwin* | mingw* | pw32* | cegcc*) 5019 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5020 # When not using gcc, we currently assume that we are using 5021 # Microsoft Visual C++. 5022 if test yes != "$GCC"; then 5023 with_gnu_ld=no 5024 fi 5025 ;; 5026 interix*) 5027 # we just hope/assume this is gcc and not c89 (= MSVC++) 5028 with_gnu_ld=yes 5029 ;; 5030 openbsd* | bitrig*) 5031 with_gnu_ld=no 5032 ;; 5033 esac 5034 5035 _LT_TAGVAR(ld_shlibs, $1)=yes 5036 5037 # On some targets, GNU ld is compatible enough with the native linker 5038 # that we're better off using the native interface for both. 5039 lt_use_gnu_ld_interface=no 5040 if test yes = "$with_gnu_ld"; then 5041 case $host_os in 5042 aix*) 5043 # The AIX port of GNU ld has always aspired to compatibility 5044 # with the native linker. However, as the warning in the GNU ld 5045 # block says, versions before 2.19.5* couldn't really create working 5046 # shared libraries, regardless of the interface used. 5047 case `$LD -v 2>&1` in 5048 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5049 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5050 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5051 *) 5052 lt_use_gnu_ld_interface=yes 5053 ;; 5054 esac 5055 ;; 5056 *) 5057 lt_use_gnu_ld_interface=yes 5058 ;; 5059 esac 5060 fi 5061 5062 if test yes = "$lt_use_gnu_ld_interface"; then 5063 # If archive_cmds runs LD, not CC, wlarc should be empty 5064 wlarc='$wl' 5065 5066 # Set some defaults for GNU ld with shared library support. These 5067 # are reset later if shared libraries are not supported. Putting them 5068 # here allows them to be overridden if necessary. 5069 runpath_var=LD_RUN_PATH 5070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5071 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5072 # ancient GNU ld didn't support --whole-archive et. al. 5073 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5074 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5075 else 5076 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5077 fi 5078 supports_anon_versioning=no 5079 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5080 *GNU\ gold*) supports_anon_versioning=yes ;; 5081 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5082 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5083 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5084 *\ 2.11.*) ;; # other 2.11 versions 5085 *) supports_anon_versioning=yes ;; 5086 esac 5087 5088 # See if GNU ld supports shared libraries. 5089 case $host_os in 5090 aix[[3-9]]*) 5091 # On AIX/PPC, the GNU linker is very broken 5092 if test ia64 != "$host_cpu"; then 5093 _LT_TAGVAR(ld_shlibs, $1)=no 5094 cat <<_LT_EOF 1>&2 5095 5096*** Warning: the GNU linker, at least up to release 2.19, is reported 5097*** to be unable to reliably create shared libraries on AIX. 5098*** Therefore, libtool is disabling shared libraries support. If you 5099*** really care for shared libraries, you may want to install binutils 5100*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5101*** You will then need to restart the configuration process. 5102 5103_LT_EOF 5104 fi 5105 ;; 5106 5107 amigaos*) 5108 case $host_cpu in 5109 powerpc) 5110 # see comment about AmigaOS4 .so support 5111 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5112 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5113 ;; 5114 m68k) 5115 _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)' 5116 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5117 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5118 ;; 5119 esac 5120 ;; 5121 5122 beos*) 5123 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5124 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5125 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5126 # support --undefined. This deserves some investigation. FIXME 5127 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5128 else 5129 _LT_TAGVAR(ld_shlibs, $1)=no 5130 fi 5131 ;; 5132 5133 cygwin* | mingw* | pw32* | cegcc*) 5134 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5135 # as there is no search path for DLLs. 5136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5137 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5138 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5139 _LT_TAGVAR(always_export_symbols, $1)=no 5140 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5141 _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' 5142 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5143 5144 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5145 _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' 5146 # If the export-symbols file already is a .def file, use it as 5147 # is; otherwise, prepend EXPORTS... 5148 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5149 cp $export_symbols $output_objdir/$soname.def; 5150 else 5151 echo EXPORTS > $output_objdir/$soname.def; 5152 cat $export_symbols >> $output_objdir/$soname.def; 5153 fi~ 5154 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5155 else 5156 _LT_TAGVAR(ld_shlibs, $1)=no 5157 fi 5158 ;; 5159 5160 haiku*) 5161 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5162 _LT_TAGVAR(link_all_deplibs, $1)=yes 5163 ;; 5164 5165 os2*) 5166 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5167 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5168 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5169 shrext_cmds=.dll 5170 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5171 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5172 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5173 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5174 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5175 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176 emximp -o $lib $output_objdir/$libname.def' 5177 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5178 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5179 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5180 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5181 prefix_cmds="$SED"~ 5182 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5183 prefix_cmds="$prefix_cmds -e 1d"; 5184 fi~ 5185 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5186 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5187 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5188 emximp -o $lib $output_objdir/$libname.def' 5189 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5190 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5191 ;; 5192 5193 interix[[3-9]]*) 5194 _LT_TAGVAR(hardcode_direct, $1)=no 5195 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5197 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5198 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5199 # Instead, shared libraries are loaded at an image base (0x10000000 by 5200 # default) and relocated if they conflict, which is a slow very memory 5201 # consuming and fragmenting process. To avoid this, we pick a random, 5202 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5203 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5204 _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' 5205 _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' 5206 ;; 5207 5208 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5209 tmp_diet=no 5210 if test linux-dietlibc = "$host_os"; then 5211 case $cc_basename in 5212 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5213 esac 5214 fi 5215 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5216 && test no = "$tmp_diet" 5217 then 5218 tmp_addflag=' $pic_flag' 5219 tmp_sharedflag='-shared' 5220 case $cc_basename,$host_cpu in 5221 pgcc*) # Portland Group C compiler 5222 _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' 5223 tmp_addflag=' $pic_flag' 5224 ;; 5225 pgf77* | pgf90* | pgf95* | pgfortran*) 5226 # Portland Group f77 and f90 compilers 5227 _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' 5228 tmp_addflag=' $pic_flag -Mnomain' ;; 5229 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5230 tmp_addflag=' -i_dynamic' ;; 5231 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5232 tmp_addflag=' -i_dynamic -nofor_main' ;; 5233 ifc* | ifort*) # Intel Fortran compiler 5234 tmp_addflag=' -nofor_main' ;; 5235 lf95*) # Lahey Fortran 8.1 5236 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5237 tmp_sharedflag='--shared' ;; 5238 nagfor*) # NAGFOR 5.3 5239 tmp_sharedflag='-Wl,-shared' ;; 5240 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5241 tmp_sharedflag='-qmkshrobj' 5242 tmp_addflag= ;; 5243 nvcc*) # Cuda Compiler Driver 2.2 5244 _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' 5245 _LT_TAGVAR(compiler_needs_object, $1)=yes 5246 ;; 5247 esac 5248 case `$CC -V 2>&1 | sed 5q` in 5249 *Sun\ C*) # Sun C 5.9 5250 _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' 5251 _LT_TAGVAR(compiler_needs_object, $1)=yes 5252 tmp_sharedflag='-G' ;; 5253 *Sun\ F*) # Sun Fortran 8.3 5254 tmp_sharedflag='-G' ;; 5255 esac 5256 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5257 5258 if test yes = "$supports_anon_versioning"; then 5259 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5260 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5261 echo "local: *; };" >> $output_objdir/$libname.ver~ 5262 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5263 fi 5264 5265 case $cc_basename in 5266 tcc*) 5267 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5268 ;; 5269 xlf* | bgf* | bgxlf* | mpixlf*) 5270 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5271 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5272 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5273 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5274 if test yes = "$supports_anon_versioning"; then 5275 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5276 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5277 echo "local: *; };" >> $output_objdir/$libname.ver~ 5278 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5279 fi 5280 ;; 5281 esac 5282 else 5283 _LT_TAGVAR(ld_shlibs, $1)=no 5284 fi 5285 ;; 5286 5287 netbsd*) 5288 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5289 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5290 wlarc= 5291 else 5292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5293 _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' 5294 fi 5295 ;; 5296 5297 solaris*) 5298 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5299 _LT_TAGVAR(ld_shlibs, $1)=no 5300 cat <<_LT_EOF 1>&2 5301 5302*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5303*** create shared libraries on Solaris systems. Therefore, libtool 5304*** is disabling shared libraries support. We urge you to upgrade GNU 5305*** binutils to release 2.9.1 or newer. Another option is to modify 5306*** your PATH or compiler configuration so that the native linker is 5307*** used, and then restart. 5308 5309_LT_EOF 5310 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5311 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5312 _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' 5313 else 5314 _LT_TAGVAR(ld_shlibs, $1)=no 5315 fi 5316 ;; 5317 5318 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5319 case `$LD -v 2>&1` in 5320 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5321 _LT_TAGVAR(ld_shlibs, $1)=no 5322 cat <<_LT_EOF 1>&2 5323 5324*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5325*** reliably create shared libraries on SCO systems. Therefore, libtool 5326*** is disabling shared libraries support. We urge you to upgrade GNU 5327*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5328*** your PATH or compiler configuration so that the native linker is 5329*** used, and then restart. 5330 5331_LT_EOF 5332 ;; 5333 *) 5334 # For security reasons, it is highly recommended that you always 5335 # use absolute paths for naming shared libraries, and exclude the 5336 # DT_RUNPATH tag from executables and libraries. But doing so 5337 # requires that you compile everything twice, which is a pain. 5338 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5340 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5341 _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' 5342 else 5343 _LT_TAGVAR(ld_shlibs, $1)=no 5344 fi 5345 ;; 5346 esac 5347 ;; 5348 5349 sunos4*) 5350 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5351 wlarc= 5352 _LT_TAGVAR(hardcode_direct, $1)=yes 5353 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5354 ;; 5355 5356 *) 5357 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5358 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5359 _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' 5360 else 5361 _LT_TAGVAR(ld_shlibs, $1)=no 5362 fi 5363 ;; 5364 esac 5365 5366 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5367 runpath_var= 5368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5370 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5371 fi 5372 else 5373 # PORTME fill in a description of your system's linker (not GNU ld) 5374 case $host_os in 5375 aix3*) 5376 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5377 _LT_TAGVAR(always_export_symbols, $1)=yes 5378 _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' 5379 # Note: this linker hardcodes the directories in LIBPATH if there 5380 # are no directories specified by -L. 5381 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5382 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5383 # Neither direct hardcoding nor static linking is supported with a 5384 # broken collect2. 5385 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5386 fi 5387 ;; 5388 5389 aix[[4-9]]*) 5390 if test ia64 = "$host_cpu"; then 5391 # On IA64, the linker does run time linking by default, so we don't 5392 # have to do anything special. 5393 aix_use_runtimelinking=no 5394 exp_sym_flag='-Bexport' 5395 no_entry_flag= 5396 else 5397 # If we're using GNU nm, then we don't want the "-C" option. 5398 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5399 # Without the "-l" option, or with the "-B" option, AIX nm treats 5400 # weak defined symbols like other global defined symbols, whereas 5401 # GNU nm marks them as "W". 5402 # While the 'weak' keyword is ignored in the Export File, we need 5403 # it in the Import File for the 'aix-soname' feature, so we have 5404 # to replace the "-B" option with "-P" for AIX nm. 5405 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5406 _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' 5407 else 5408 _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 == "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' 5409 fi 5410 aix_use_runtimelinking=no 5411 5412 # Test if we are trying to use run time linking or normal 5413 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5414 # have runtime linking enabled, and use it for executables. 5415 # For shared libraries, we enable/disable runtime linking 5416 # depending on the kind of the shared library created - 5417 # when "with_aix_soname,aix_use_runtimelinking" is: 5418 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5419 # "aix,yes" lib.so shared, rtl:yes, for executables 5420 # lib.a static archive 5421 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5422 # lib.a(lib.so.V) shared, rtl:no, for executables 5423 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5424 # lib.a(lib.so.V) shared, rtl:no 5425 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5426 # lib.a static archive 5427 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5428 for ld_flag in $LDFLAGS; do 5429 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5430 aix_use_runtimelinking=yes 5431 break 5432 fi 5433 done 5434 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5435 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5436 # so we don't have lib.a shared libs to link our executables. 5437 # We have to force runtime linking in this case. 5438 aix_use_runtimelinking=yes 5439 LDFLAGS="$LDFLAGS -Wl,-brtl" 5440 fi 5441 ;; 5442 esac 5443 5444 exp_sym_flag='-bexport' 5445 no_entry_flag='-bnoentry' 5446 fi 5447 5448 # When large executables or shared objects are built, AIX ld can 5449 # have problems creating the table of contents. If linking a library 5450 # or program results in "error TOC overflow" add -mminimal-toc to 5451 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5452 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5453 5454 _LT_TAGVAR(archive_cmds, $1)='' 5455 _LT_TAGVAR(hardcode_direct, $1)=yes 5456 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5457 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5458 _LT_TAGVAR(link_all_deplibs, $1)=yes 5459 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5460 case $with_aix_soname,$aix_use_runtimelinking in 5461 aix,*) ;; # traditional, no import file 5462 svr4,* | *,yes) # use import file 5463 # The Import File defines what to hardcode. 5464 _LT_TAGVAR(hardcode_direct, $1)=no 5465 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5466 ;; 5467 esac 5468 5469 if test yes = "$GCC"; then 5470 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5471 # We only want to do this on AIX 4.2 and lower, the check 5472 # below for broken collect2 doesn't work under 4.3+ 5473 collect2name=`$CC -print-prog-name=collect2` 5474 if test -f "$collect2name" && 5475 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5476 then 5477 # We have reworked collect2 5478 : 5479 else 5480 # We have old collect2 5481 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5482 # It fails to find uninstalled libraries when the uninstalled 5483 # path is not listed in the libpath. Setting hardcode_minus_L 5484 # to unsupported forces relinking 5485 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5486 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5487 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5488 fi 5489 ;; 5490 esac 5491 shared_flag='-shared' 5492 if test yes = "$aix_use_runtimelinking"; then 5493 shared_flag="$shared_flag "'$wl-G' 5494 fi 5495 # Need to ensure runtime linking is disabled for the traditional 5496 # shared library, or the linker may eventually find shared libraries 5497 # /with/ Import File - we do not want to mix them. 5498 shared_flag_aix='-shared' 5499 shared_flag_svr4='-shared $wl-G' 5500 else 5501 # not using gcc 5502 if test ia64 = "$host_cpu"; then 5503 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5504 # chokes on -Wl,-G. The following line is correct: 5505 shared_flag='-G' 5506 else 5507 if test yes = "$aix_use_runtimelinking"; then 5508 shared_flag='$wl-G' 5509 else 5510 shared_flag='$wl-bM:SRE' 5511 fi 5512 shared_flag_aix='$wl-bM:SRE' 5513 shared_flag_svr4='$wl-G' 5514 fi 5515 fi 5516 5517 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5518 # It seems that -bexpall does not export symbols beginning with 5519 # underscore (_), so it is better to generate a list of symbols to export. 5520 _LT_TAGVAR(always_export_symbols, $1)=yes 5521 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5522 # Warning - without using the other runtime loading flags (-brtl), 5523 # -berok will link without error, but may produce a broken library. 5524 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5525 # Determine the default libpath from the value encoded in an 5526 # empty executable. 5527 _LT_SYS_MODULE_PATH_AIX([$1]) 5528 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5529 _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 5530 else 5531 if test ia64 = "$host_cpu"; then 5532 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5533 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5534 _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" 5535 else 5536 # Determine the default libpath from the value encoded in an 5537 # empty executable. 5538 _LT_SYS_MODULE_PATH_AIX([$1]) 5539 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5540 # Warning - without using the other run time loading flags, 5541 # -berok will link without error, but may produce a broken library. 5542 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5543 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5544 if test yes = "$with_gnu_ld"; then 5545 # We only use this code for GNU lds that support --whole-archive. 5546 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5547 else 5548 # Exported symbols can be pulled into shared objects from archives 5549 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5550 fi 5551 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5552 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5553 # -brtl affects multiple linker settings, -berok does not and is overridden later 5554 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5555 if test svr4 != "$with_aix_soname"; then 5556 # This is similar to how AIX traditionally builds its shared libraries. 5557 _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' 5558 fi 5559 if test aix != "$with_aix_soname"; then 5560 _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' 5561 else 5562 # used by -dlpreopen to get the symbols 5563 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5564 fi 5565 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5566 fi 5567 fi 5568 ;; 5569 5570 amigaos*) 5571 case $host_cpu in 5572 powerpc) 5573 # see comment about AmigaOS4 .so support 5574 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5575 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5576 ;; 5577 m68k) 5578 _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)' 5579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5580 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5581 ;; 5582 esac 5583 ;; 5584 5585 bsdi[[45]]*) 5586 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5587 ;; 5588 5589 cygwin* | mingw* | pw32* | cegcc*) 5590 # When not using gcc, we currently assume that we are using 5591 # Microsoft Visual C++. 5592 # hardcode_libdir_flag_spec is actually meaningless, as there is 5593 # no search path for DLLs. 5594 case $cc_basename in 5595 cl*) 5596 # Native MSVC 5597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5598 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5599 _LT_TAGVAR(always_export_symbols, $1)=yes 5600 _LT_TAGVAR(file_list_spec, $1)='@' 5601 # Tell ltmain to make .lib files, not .a files. 5602 libext=lib 5603 # Tell ltmain to make .dll files, not .so files. 5604 shrext_cmds=.dll 5605 # FIXME: Setting linknames here is a bad hack. 5606 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5607 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5608 cp "$export_symbols" "$output_objdir/$soname.def"; 5609 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5610 else 5611 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5612 fi~ 5613 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5614 linknames=' 5615 # The linker will not automatically build a static lib if we build a DLL. 5616 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5617 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5618 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5619 _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' 5620 # Don't use ranlib 5621 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5622 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5623 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5624 case $lt_outputfile in 5625 *.exe|*.EXE) ;; 5626 *) 5627 lt_outputfile=$lt_outputfile.exe 5628 lt_tool_outputfile=$lt_tool_outputfile.exe 5629 ;; 5630 esac~ 5631 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5632 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5633 $RM "$lt_outputfile.manifest"; 5634 fi' 5635 ;; 5636 *) 5637 # Assume MSVC wrapper 5638 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5639 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5640 # Tell ltmain to make .lib files, not .a files. 5641 libext=lib 5642 # Tell ltmain to make .dll files, not .so files. 5643 shrext_cmds=.dll 5644 # FIXME: Setting linknames here is a bad hack. 5645 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5646 # The linker will automatically build a .lib file if we build a DLL. 5647 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5648 # FIXME: Should let the user specify the lib program. 5649 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5650 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5651 ;; 5652 esac 5653 ;; 5654 5655 darwin* | rhapsody*) 5656 _LT_DARWIN_LINKER_FEATURES($1) 5657 ;; 5658 5659 dgux*) 5660 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5661 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5662 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663 ;; 5664 5665 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5666 # support. Future versions do this automatically, but an explicit c++rt0.o 5667 # does not break anything, and helps significantly (at the cost of a little 5668 # extra space). 5669 freebsd2.2*) 5670 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5672 _LT_TAGVAR(hardcode_direct, $1)=yes 5673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5674 ;; 5675 5676 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5677 freebsd2.*) 5678 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5679 _LT_TAGVAR(hardcode_direct, $1)=yes 5680 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5681 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5682 ;; 5683 5684 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5685 freebsd* | dragonfly*) 5686 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5688 _LT_TAGVAR(hardcode_direct, $1)=yes 5689 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5690 ;; 5691 5692 hpux9*) 5693 if test yes = "$GCC"; then 5694 _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' 5695 else 5696 _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' 5697 fi 5698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5699 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5700 _LT_TAGVAR(hardcode_direct, $1)=yes 5701 5702 # hardcode_minus_L: Not really in the search PATH, 5703 # but as the default location of the library. 5704 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5706 ;; 5707 5708 hpux10*) 5709 if test yes,no = "$GCC,$with_gnu_ld"; then 5710 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5711 else 5712 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5713 fi 5714 if test no = "$with_gnu_ld"; then 5715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5716 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5717 _LT_TAGVAR(hardcode_direct, $1)=yes 5718 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5719 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5720 # hardcode_minus_L: Not really in the search PATH, 5721 # but as the default location of the library. 5722 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5723 fi 5724 ;; 5725 5726 hpux11*) 5727 if test yes,no = "$GCC,$with_gnu_ld"; then 5728 case $host_cpu in 5729 hppa*64*) 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5731 ;; 5732 ia64*) 5733 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5734 ;; 5735 *) 5736 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5737 ;; 5738 esac 5739 else 5740 case $host_cpu in 5741 hppa*64*) 5742 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5743 ;; 5744 ia64*) 5745 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5746 ;; 5747 *) 5748 m4_if($1, [], [ 5749 # Older versions of the 11.00 compiler do not understand -b yet 5750 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5751 _LT_LINKER_OPTION([if $CC understands -b], 5752 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5753 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5754 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5755 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5756 ;; 5757 esac 5758 fi 5759 if test no = "$with_gnu_ld"; then 5760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5761 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5762 5763 case $host_cpu in 5764 hppa*64*|ia64*) 5765 _LT_TAGVAR(hardcode_direct, $1)=no 5766 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5767 ;; 5768 *) 5769 _LT_TAGVAR(hardcode_direct, $1)=yes 5770 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5772 5773 # hardcode_minus_L: Not really in the search PATH, 5774 # but as the default location of the library. 5775 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5776 ;; 5777 esac 5778 fi 5779 ;; 5780 5781 irix5* | irix6* | nonstopux*) 5782 if test yes = "$GCC"; then 5783 _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' 5784 # Try to use the -exported_symbol ld option, if it does not 5785 # work, assume that -exports_file does not work either and 5786 # implicitly export all symbols. 5787 # This should be the same for all languages, so no per-tag cache variable. 5788 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5789 [lt_cv_irix_exported_symbol], 5790 [save_LDFLAGS=$LDFLAGS 5791 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5792 AC_LINK_IFELSE( 5793 [AC_LANG_SOURCE( 5794 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5795 [C++], [[int foo (void) { return 0; }]], 5796 [Fortran 77], [[ 5797 subroutine foo 5798 end]], 5799 [Fortran], [[ 5800 subroutine foo 5801 end]])])], 5802 [lt_cv_irix_exported_symbol=yes], 5803 [lt_cv_irix_exported_symbol=no]) 5804 LDFLAGS=$save_LDFLAGS]) 5805 if test yes = "$lt_cv_irix_exported_symbol"; then 5806 _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' 5807 fi 5808 else 5809 _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' 5810 _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' 5811 fi 5812 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5813 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5814 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5815 _LT_TAGVAR(inherit_rpath, $1)=yes 5816 _LT_TAGVAR(link_all_deplibs, $1)=yes 5817 ;; 5818 5819 linux*) 5820 case $cc_basename in 5821 tcc*) 5822 # Fabrice Bellard et al's Tiny C Compiler 5823 _LT_TAGVAR(ld_shlibs, $1)=yes 5824 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5825 ;; 5826 esac 5827 ;; 5828 5829 netbsd*) 5830 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5831 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5832 else 5833 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5834 fi 5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5836 _LT_TAGVAR(hardcode_direct, $1)=yes 5837 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5838 ;; 5839 5840 newsos6) 5841 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5842 _LT_TAGVAR(hardcode_direct, $1)=yes 5843 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5844 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5846 ;; 5847 5848 *nto* | *qnx*) 5849 ;; 5850 5851 openbsd* | bitrig*) 5852 if test -f /usr/libexec/ld.so; then 5853 _LT_TAGVAR(hardcode_direct, $1)=yes 5854 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5855 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5856 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5858 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5860 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5861 else 5862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5863 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5864 fi 5865 else 5866 _LT_TAGVAR(ld_shlibs, $1)=no 5867 fi 5868 ;; 5869 5870 os2*) 5871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5872 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5873 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5874 shrext_cmds=.dll 5875 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5876 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5877 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5878 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5879 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5880 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5881 emximp -o $lib $output_objdir/$libname.def' 5882 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5883 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5884 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5885 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5886 prefix_cmds="$SED"~ 5887 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5888 prefix_cmds="$prefix_cmds -e 1d"; 5889 fi~ 5890 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5891 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5892 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5893 emximp -o $lib $output_objdir/$libname.def' 5894 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5895 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5896 ;; 5897 5898 osf3*) 5899 if test yes = "$GCC"; then 5900 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5901 _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' 5902 else 5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5904 _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' 5905 fi 5906 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5907 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5908 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5909 ;; 5910 5911 osf4* | osf5*) # as osf3* with the addition of -msym flag 5912 if test yes = "$GCC"; then 5913 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5914 _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' 5915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5916 else 5917 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5918 _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' 5919 _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~ 5920 $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' 5921 5922 # Both c and cxx compiler support -rpath directly 5923 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5924 fi 5925 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5926 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5927 ;; 5928 5929 solaris*) 5930 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5931 if test yes = "$GCC"; then 5932 wlarc='$wl' 5933 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5934 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5935 $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' 5936 else 5937 case `$CC -V 2>&1` in 5938 *"Compilers 5.0"*) 5939 wlarc='' 5940 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_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 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5943 ;; 5944 *) 5945 wlarc='$wl' 5946 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5947 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5948 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5949 ;; 5950 esac 5951 fi 5952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5953 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5954 case $host_os in 5955 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5956 *) 5957 # The compiler driver will combine and reorder linker options, 5958 # but understands '-z linker_flag'. GCC discards it without '$wl', 5959 # but is careful enough not to reorder. 5960 # Supported since Solaris 2.6 (maybe 2.5.1?) 5961 if test yes = "$GCC"; then 5962 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5963 else 5964 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5965 fi 5966 ;; 5967 esac 5968 _LT_TAGVAR(link_all_deplibs, $1)=yes 5969 ;; 5970 5971 sunos4*) 5972 if test sequent = "$host_vendor"; then 5973 # Use $CC to link under sequent, because it throws in some extra .o 5974 # files that make .init and .fini sections work. 5975 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5976 else 5977 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5978 fi 5979 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5980 _LT_TAGVAR(hardcode_direct, $1)=yes 5981 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5982 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5983 ;; 5984 5985 sysv4) 5986 case $host_vendor in 5987 sni) 5988 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5989 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5990 ;; 5991 siemens) 5992 ## LD is ld it makes a PLAMLIB 5993 ## CC just makes a GrossModule. 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5995 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5996 _LT_TAGVAR(hardcode_direct, $1)=no 5997 ;; 5998 motorola) 5999 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6000 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6001 ;; 6002 esac 6003 runpath_var='LD_RUN_PATH' 6004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005 ;; 6006 6007 sysv4.3*) 6008 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6009 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6010 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6011 ;; 6012 6013 sysv4*MP*) 6014 if test -d /usr/nec; then 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 runpath_var=LD_RUN_PATH 6018 hardcode_runpath_var=yes 6019 _LT_TAGVAR(ld_shlibs, $1)=yes 6020 fi 6021 ;; 6022 6023 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6024 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6025 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6026 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6027 runpath_var='LD_RUN_PATH' 6028 6029 if test yes = "$GCC"; then 6030 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6031 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6032 else 6033 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6034 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6035 fi 6036 ;; 6037 6038 sysv5* | sco3.2v5* | sco5v6*) 6039 # Note: We CANNOT use -z defs as we might desire, because we do not 6040 # link with -lc, and that would cause any symbols used from libc to 6041 # always be unresolved, which means just about no library would 6042 # ever link correctly. If we're not using GNU ld we use -z text 6043 # though, which does catch some bad symbols but isn't as heavy-handed 6044 # as -z defs. 6045 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6046 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6047 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6048 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6050 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6051 _LT_TAGVAR(link_all_deplibs, $1)=yes 6052 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6053 runpath_var='LD_RUN_PATH' 6054 6055 if test yes = "$GCC"; then 6056 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6057 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6058 else 6059 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6060 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6061 fi 6062 ;; 6063 6064 uts4*) 6065 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6067 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6068 ;; 6069 6070 *) 6071 _LT_TAGVAR(ld_shlibs, $1)=no 6072 ;; 6073 esac 6074 6075 if test sni = "$host_vendor"; then 6076 case $host in 6077 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6078 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6079 ;; 6080 esac 6081 fi 6082 fi 6083]) 6084AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6085test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6086 6087_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6088 6089_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6090_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6091_LT_DECL([], [extract_expsyms_cmds], [2], 6092 [The commands to extract the exported symbol list from a shared archive]) 6093 6094# 6095# Do we need to explicitly link libc? 6096# 6097case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6098x|xyes) 6099 # Assume -lc should be added 6100 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6101 6102 if test yes,yes = "$GCC,$enable_shared"; then 6103 case $_LT_TAGVAR(archive_cmds, $1) in 6104 *'~'*) 6105 # FIXME: we may have to deal with multi-command sequences. 6106 ;; 6107 '$CC '*) 6108 # Test whether the compiler implicitly links with -lc since on some 6109 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6110 # to ld, don't add -lc before -lgcc. 6111 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6112 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6113 [$RM conftest* 6114 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6115 6116 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6117 soname=conftest 6118 lib=conftest 6119 libobjs=conftest.$ac_objext 6120 deplibs= 6121 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6122 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6123 compiler_flags=-v 6124 linker_flags=-v 6125 verstring= 6126 output_objdir=. 6127 libname=conftest 6128 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6129 _LT_TAGVAR(allow_undefined_flag, $1)= 6130 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6131 then 6132 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6133 else 6134 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6135 fi 6136 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6137 else 6138 cat conftest.err 1>&5 6139 fi 6140 $RM conftest* 6141 ]) 6142 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6143 ;; 6144 esac 6145 fi 6146 ;; 6147esac 6148 6149_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6150 [Whether or not to add -lc for building shared libraries]) 6151_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6152 [enable_shared_with_static_runtimes], [0], 6153 [Whether or not to disallow shared libs when runtime libs are static]) 6154_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6155 [Compiler flag to allow reflexive dlopens]) 6156_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6157 [Compiler flag to generate shared objects directly from archives]) 6158_LT_TAGDECL([], [compiler_needs_object], [1], 6159 [Whether the compiler copes with passing no objects directly]) 6160_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6161 [Create an old-style archive from a shared archive]) 6162_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6163 [Create a temporary old-style archive to link instead of a shared archive]) 6164_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6165_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6166_LT_TAGDECL([], [module_cmds], [2], 6167 [Commands used to build a loadable module if different from building 6168 a shared archive.]) 6169_LT_TAGDECL([], [module_expsym_cmds], [2]) 6170_LT_TAGDECL([], [with_gnu_ld], [1], 6171 [Whether we are building with GNU ld or not]) 6172_LT_TAGDECL([], [allow_undefined_flag], [1], 6173 [Flag that allows shared libraries with undefined symbols to be built]) 6174_LT_TAGDECL([], [no_undefined_flag], [1], 6175 [Flag that enforces no undefined symbols]) 6176_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6177 [Flag to hardcode $libdir into a binary during linking. 6178 This must work even if $libdir does not exist]) 6179_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6180 [Whether we need a single "-rpath" flag with a separated argument]) 6181_LT_TAGDECL([], [hardcode_direct], [0], 6182 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6183 DIR into the resulting binary]) 6184_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6185 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6186 DIR into the resulting binary and the resulting library dependency is 6187 "absolute", i.e impossible to change by setting $shlibpath_var if the 6188 library is relocated]) 6189_LT_TAGDECL([], [hardcode_minus_L], [0], 6190 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6191 into the resulting binary]) 6192_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6193 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6194 into the resulting binary]) 6195_LT_TAGDECL([], [hardcode_automatic], [0], 6196 [Set to "yes" if building a shared library automatically hardcodes DIR 6197 into the library and all subsequent libraries and executables linked 6198 against it]) 6199_LT_TAGDECL([], [inherit_rpath], [0], 6200 [Set to yes if linker adds runtime paths of dependent libraries 6201 to runtime path list]) 6202_LT_TAGDECL([], [link_all_deplibs], [0], 6203 [Whether libtool must link a program against all its dependency libraries]) 6204_LT_TAGDECL([], [always_export_symbols], [0], 6205 [Set to "yes" if exported symbols are required]) 6206_LT_TAGDECL([], [export_symbols_cmds], [2], 6207 [The commands to list exported symbols]) 6208_LT_TAGDECL([], [exclude_expsyms], [1], 6209 [Symbols that should not be listed in the preloaded symbols]) 6210_LT_TAGDECL([], [include_expsyms], [1], 6211 [Symbols that must always be exported]) 6212_LT_TAGDECL([], [prelink_cmds], [2], 6213 [Commands necessary for linking programs (against libraries) with templates]) 6214_LT_TAGDECL([], [postlink_cmds], [2], 6215 [Commands necessary for finishing linking programs]) 6216_LT_TAGDECL([], [file_list_spec], [1], 6217 [Specify filename containing input files]) 6218dnl FIXME: Not yet implemented 6219dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6220dnl [Compiler flag to generate thread safe objects]) 6221])# _LT_LINKER_SHLIBS 6222 6223 6224# _LT_LANG_C_CONFIG([TAG]) 6225# ------------------------ 6226# Ensure that the configuration variables for a C compiler are suitably 6227# defined. These variables are subsequently used by _LT_CONFIG to write 6228# the compiler configuration to 'libtool'. 6229m4_defun([_LT_LANG_C_CONFIG], 6230[m4_require([_LT_DECL_EGREP])dnl 6231lt_save_CC=$CC 6232AC_LANG_PUSH(C) 6233 6234# Source file extension for C test sources. 6235ac_ext=c 6236 6237# Object file extension for compiled C test sources. 6238objext=o 6239_LT_TAGVAR(objext, $1)=$objext 6240 6241# Code to be used in simple compile tests 6242lt_simple_compile_test_code="int some_variable = 0;" 6243 6244# Code to be used in simple link tests 6245lt_simple_link_test_code='int main(){return(0);}' 6246 6247_LT_TAG_COMPILER 6248# Save the default compiler, since it gets overwritten when the other 6249# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6250compiler_DEFAULT=$CC 6251 6252# save warnings/boilerplate of simple test code 6253_LT_COMPILER_BOILERPLATE 6254_LT_LINKER_BOILERPLATE 6255 6256if test -n "$compiler"; then 6257 _LT_COMPILER_NO_RTTI($1) 6258 _LT_COMPILER_PIC($1) 6259 _LT_COMPILER_C_O($1) 6260 _LT_COMPILER_FILE_LOCKS($1) 6261 _LT_LINKER_SHLIBS($1) 6262 _LT_SYS_DYNAMIC_LINKER($1) 6263 _LT_LINKER_HARDCODE_LIBPATH($1) 6264 LT_SYS_DLOPEN_SELF 6265 _LT_CMD_STRIPLIB 6266 6267 # Report what library types will actually be built 6268 AC_MSG_CHECKING([if libtool supports shared libraries]) 6269 AC_MSG_RESULT([$can_build_shared]) 6270 6271 AC_MSG_CHECKING([whether to build shared libraries]) 6272 test no = "$can_build_shared" && enable_shared=no 6273 6274 # On AIX, shared libraries and static libraries use the same namespace, and 6275 # are all built from PIC. 6276 case $host_os in 6277 aix3*) 6278 test yes = "$enable_shared" && enable_static=no 6279 if test -n "$RANLIB"; then 6280 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6281 postinstall_cmds='$RANLIB $lib' 6282 fi 6283 ;; 6284 6285 aix[[4-9]]*) 6286 if test ia64 != "$host_cpu"; then 6287 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6288 yes,aix,yes) ;; # shared object as lib.so file only 6289 yes,svr4,*) ;; # shared object as lib.so archive member only 6290 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6291 esac 6292 fi 6293 ;; 6294 esac 6295 AC_MSG_RESULT([$enable_shared]) 6296 6297 AC_MSG_CHECKING([whether to build static libraries]) 6298 # Make sure either enable_shared or enable_static is yes. 6299 test yes = "$enable_shared" || enable_static=yes 6300 AC_MSG_RESULT([$enable_static]) 6301 6302 _LT_CONFIG($1) 6303fi 6304AC_LANG_POP 6305CC=$lt_save_CC 6306])# _LT_LANG_C_CONFIG 6307 6308 6309# _LT_LANG_CXX_CONFIG([TAG]) 6310# -------------------------- 6311# Ensure that the configuration variables for a C++ compiler are suitably 6312# defined. These variables are subsequently used by _LT_CONFIG to write 6313# the compiler configuration to 'libtool'. 6314m4_defun([_LT_LANG_CXX_CONFIG], 6315[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6316m4_require([_LT_DECL_EGREP])dnl 6317m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6318if test -n "$CXX" && ( test no != "$CXX" && 6319 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6320 (test g++ != "$CXX"))); then 6321 AC_PROG_CXXCPP 6322else 6323 _lt_caught_CXX_error=yes 6324fi 6325 6326AC_LANG_PUSH(C++) 6327_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6328_LT_TAGVAR(allow_undefined_flag, $1)= 6329_LT_TAGVAR(always_export_symbols, $1)=no 6330_LT_TAGVAR(archive_expsym_cmds, $1)= 6331_LT_TAGVAR(compiler_needs_object, $1)=no 6332_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6333_LT_TAGVAR(hardcode_direct, $1)=no 6334_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6335_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6336_LT_TAGVAR(hardcode_libdir_separator, $1)= 6337_LT_TAGVAR(hardcode_minus_L, $1)=no 6338_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6339_LT_TAGVAR(hardcode_automatic, $1)=no 6340_LT_TAGVAR(inherit_rpath, $1)=no 6341_LT_TAGVAR(module_cmds, $1)= 6342_LT_TAGVAR(module_expsym_cmds, $1)= 6343_LT_TAGVAR(link_all_deplibs, $1)=unknown 6344_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6345_LT_TAGVAR(reload_flag, $1)=$reload_flag 6346_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6347_LT_TAGVAR(no_undefined_flag, $1)= 6348_LT_TAGVAR(whole_archive_flag_spec, $1)= 6349_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6350 6351# Source file extension for C++ test sources. 6352ac_ext=cpp 6353 6354# Object file extension for compiled C++ test sources. 6355objext=o 6356_LT_TAGVAR(objext, $1)=$objext 6357 6358# No sense in running all these tests if we already determined that 6359# the CXX compiler isn't working. Some variables (like enable_shared) 6360# are currently assumed to apply to all compilers on this platform, 6361# and will be corrupted by setting them based on a non-working compiler. 6362if test yes != "$_lt_caught_CXX_error"; then 6363 # Code to be used in simple compile tests 6364 lt_simple_compile_test_code="int some_variable = 0;" 6365 6366 # Code to be used in simple link tests 6367 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6368 6369 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6370 _LT_TAG_COMPILER 6371 6372 # save warnings/boilerplate of simple test code 6373 _LT_COMPILER_BOILERPLATE 6374 _LT_LINKER_BOILERPLATE 6375 6376 # Allow CC to be a program name with arguments. 6377 lt_save_CC=$CC 6378 lt_save_CFLAGS=$CFLAGS 6379 lt_save_LD=$LD 6380 lt_save_GCC=$GCC 6381 GCC=$GXX 6382 lt_save_with_gnu_ld=$with_gnu_ld 6383 lt_save_path_LD=$lt_cv_path_LD 6384 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6385 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6386 else 6387 $as_unset lt_cv_prog_gnu_ld 6388 fi 6389 if test -n "${lt_cv_path_LDCXX+set}"; then 6390 lt_cv_path_LD=$lt_cv_path_LDCXX 6391 else 6392 $as_unset lt_cv_path_LD 6393 fi 6394 test -z "${LDCXX+set}" || LD=$LDCXX 6395 CC=${CXX-"c++"} 6396 CFLAGS=$CXXFLAGS 6397 compiler=$CC 6398 _LT_TAGVAR(compiler, $1)=$CC 6399 _LT_CC_BASENAME([$compiler]) 6400 6401 if test -n "$compiler"; then 6402 # We don't want -fno-exception when compiling C++ code, so set the 6403 # no_builtin_flag separately 6404 if test yes = "$GXX"; then 6405 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6406 else 6407 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6408 fi 6409 6410 if test yes = "$GXX"; then 6411 # Set up default GNU C++ configuration 6412 6413 LT_PATH_LD 6414 6415 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6416 # archiving commands below assume that GNU ld is being used. 6417 if test yes = "$with_gnu_ld"; then 6418 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6419 _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' 6420 6421 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6422 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6423 6424 # If archive_cmds runs LD, not CC, wlarc should be empty 6425 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6426 # investigate it a little bit more. (MM) 6427 wlarc='$wl' 6428 6429 # ancient GNU ld didn't support --whole-archive et. al. 6430 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6431 $GREP 'no-whole-archive' > /dev/null; then 6432 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6433 else 6434 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6435 fi 6436 else 6437 with_gnu_ld=no 6438 wlarc= 6439 6440 # A generic and very simple default shared library creation 6441 # command for GNU C++ for the case where it uses the native 6442 # linker, instead of GNU ld. If possible, this setting should 6443 # overridden to take advantage of the native linker features on 6444 # the platform it is being used on. 6445 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6446 fi 6447 6448 # Commands to make compiler produce verbose output that lists 6449 # what "hidden" libraries, object files and flags are used when 6450 # linking a shared library. 6451 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6452 6453 else 6454 GXX=no 6455 with_gnu_ld=no 6456 wlarc= 6457 fi 6458 6459 # PORTME: fill in a description of your system's C++ link characteristics 6460 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6461 _LT_TAGVAR(ld_shlibs, $1)=yes 6462 case $host_os in 6463 aix3*) 6464 # FIXME: insert proper C++ library support 6465 _LT_TAGVAR(ld_shlibs, $1)=no 6466 ;; 6467 aix[[4-9]]*) 6468 if test ia64 = "$host_cpu"; then 6469 # On IA64, the linker does run time linking by default, so we don't 6470 # have to do anything special. 6471 aix_use_runtimelinking=no 6472 exp_sym_flag='-Bexport' 6473 no_entry_flag= 6474 else 6475 aix_use_runtimelinking=no 6476 6477 # Test if we are trying to use run time linking or normal 6478 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6479 # have runtime linking enabled, and use it for executables. 6480 # For shared libraries, we enable/disable runtime linking 6481 # depending on the kind of the shared library created - 6482 # when "with_aix_soname,aix_use_runtimelinking" is: 6483 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6484 # "aix,yes" lib.so shared, rtl:yes, for executables 6485 # lib.a static archive 6486 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6487 # lib.a(lib.so.V) shared, rtl:no, for executables 6488 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6489 # lib.a(lib.so.V) shared, rtl:no 6490 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6491 # lib.a static archive 6492 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6493 for ld_flag in $LDFLAGS; do 6494 case $ld_flag in 6495 *-brtl*) 6496 aix_use_runtimelinking=yes 6497 break 6498 ;; 6499 esac 6500 done 6501 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6502 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6503 # so we don't have lib.a shared libs to link our executables. 6504 # We have to force runtime linking in this case. 6505 aix_use_runtimelinking=yes 6506 LDFLAGS="$LDFLAGS -Wl,-brtl" 6507 fi 6508 ;; 6509 esac 6510 6511 exp_sym_flag='-bexport' 6512 no_entry_flag='-bnoentry' 6513 fi 6514 6515 # When large executables or shared objects are built, AIX ld can 6516 # have problems creating the table of contents. If linking a library 6517 # or program results in "error TOC overflow" add -mminimal-toc to 6518 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6519 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6520 6521 _LT_TAGVAR(archive_cmds, $1)='' 6522 _LT_TAGVAR(hardcode_direct, $1)=yes 6523 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6524 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6525 _LT_TAGVAR(link_all_deplibs, $1)=yes 6526 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6527 case $with_aix_soname,$aix_use_runtimelinking in 6528 aix,*) ;; # no import file 6529 svr4,* | *,yes) # use import file 6530 # The Import File defines what to hardcode. 6531 _LT_TAGVAR(hardcode_direct, $1)=no 6532 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6533 ;; 6534 esac 6535 6536 if test yes = "$GXX"; then 6537 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6538 # We only want to do this on AIX 4.2 and lower, the check 6539 # below for broken collect2 doesn't work under 4.3+ 6540 collect2name=`$CC -print-prog-name=collect2` 6541 if test -f "$collect2name" && 6542 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6543 then 6544 # We have reworked collect2 6545 : 6546 else 6547 # We have old collect2 6548 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6549 # It fails to find uninstalled libraries when the uninstalled 6550 # path is not listed in the libpath. Setting hardcode_minus_L 6551 # to unsupported forces relinking 6552 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6553 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6554 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6555 fi 6556 esac 6557 shared_flag='-shared' 6558 if test yes = "$aix_use_runtimelinking"; then 6559 shared_flag=$shared_flag' $wl-G' 6560 fi 6561 # Need to ensure runtime linking is disabled for the traditional 6562 # shared library, or the linker may eventually find shared libraries 6563 # /with/ Import File - we do not want to mix them. 6564 shared_flag_aix='-shared' 6565 shared_flag_svr4='-shared $wl-G' 6566 else 6567 # not using gcc 6568 if test ia64 = "$host_cpu"; then 6569 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6570 # chokes on -Wl,-G. The following line is correct: 6571 shared_flag='-G' 6572 else 6573 if test yes = "$aix_use_runtimelinking"; then 6574 shared_flag='$wl-G' 6575 else 6576 shared_flag='$wl-bM:SRE' 6577 fi 6578 shared_flag_aix='$wl-bM:SRE' 6579 shared_flag_svr4='$wl-G' 6580 fi 6581 fi 6582 6583 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6584 # It seems that -bexpall does not export symbols beginning with 6585 # underscore (_), so it is better to generate a list of symbols to 6586 # export. 6587 _LT_TAGVAR(always_export_symbols, $1)=yes 6588 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6589 # Warning - without using the other runtime loading flags (-brtl), 6590 # -berok will link without error, but may produce a broken library. 6591 # The "-G" linker flag allows undefined symbols. 6592 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6593 # Determine the default libpath from the value encoded in an empty 6594 # executable. 6595 _LT_SYS_MODULE_PATH_AIX([$1]) 6596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6597 6598 _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 6599 else 6600 if test ia64 = "$host_cpu"; then 6601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6602 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6603 _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" 6604 else 6605 # Determine the default libpath from the value encoded in an 6606 # empty executable. 6607 _LT_SYS_MODULE_PATH_AIX([$1]) 6608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6609 # Warning - without using the other run time loading flags, 6610 # -berok will link without error, but may produce a broken library. 6611 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6612 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6613 if test yes = "$with_gnu_ld"; then 6614 # We only use this code for GNU lds that support --whole-archive. 6615 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6616 else 6617 # Exported symbols can be pulled into shared objects from archives 6618 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6619 fi 6620 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6621 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6622 # -brtl affects multiple linker settings, -berok does not and is overridden later 6623 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6624 if test svr4 != "$with_aix_soname"; then 6625 # This is similar to how AIX traditionally builds its shared 6626 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6627 _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' 6628 fi 6629 if test aix != "$with_aix_soname"; then 6630 _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' 6631 else 6632 # used by -dlpreopen to get the symbols 6633 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6634 fi 6635 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6636 fi 6637 fi 6638 ;; 6639 6640 beos*) 6641 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6642 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6643 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6644 # support --undefined. This deserves some investigation. FIXME 6645 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6646 else 6647 _LT_TAGVAR(ld_shlibs, $1)=no 6648 fi 6649 ;; 6650 6651 chorus*) 6652 case $cc_basename in 6653 *) 6654 # FIXME: insert proper C++ library support 6655 _LT_TAGVAR(ld_shlibs, $1)=no 6656 ;; 6657 esac 6658 ;; 6659 6660 cygwin* | mingw* | pw32* | cegcc*) 6661 case $GXX,$cc_basename in 6662 ,cl* | no,cl*) 6663 # Native MSVC 6664 # hardcode_libdir_flag_spec is actually meaningless, as there is 6665 # no search path for DLLs. 6666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6667 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6668 _LT_TAGVAR(always_export_symbols, $1)=yes 6669 _LT_TAGVAR(file_list_spec, $1)='@' 6670 # Tell ltmain to make .lib files, not .a files. 6671 libext=lib 6672 # Tell ltmain to make .dll files, not .so files. 6673 shrext_cmds=.dll 6674 # FIXME: Setting linknames here is a bad hack. 6675 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6676 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6677 cp "$export_symbols" "$output_objdir/$soname.def"; 6678 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6679 else 6680 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6681 fi~ 6682 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6683 linknames=' 6684 # The linker will not automatically build a static lib if we build a DLL. 6685 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6686 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6687 # Don't use ranlib 6688 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6689 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6690 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6691 case $lt_outputfile in 6692 *.exe|*.EXE) ;; 6693 *) 6694 lt_outputfile=$lt_outputfile.exe 6695 lt_tool_outputfile=$lt_tool_outputfile.exe 6696 ;; 6697 esac~ 6698 func_to_tool_file "$lt_outputfile"~ 6699 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6700 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6701 $RM "$lt_outputfile.manifest"; 6702 fi' 6703 ;; 6704 *) 6705 # g++ 6706 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6707 # as there is no search path for DLLs. 6708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6709 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6710 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6711 _LT_TAGVAR(always_export_symbols, $1)=no 6712 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6713 6714 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6715 _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' 6716 # If the export-symbols file already is a .def file, use it as 6717 # is; otherwise, prepend EXPORTS... 6718 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6719 cp $export_symbols $output_objdir/$soname.def; 6720 else 6721 echo EXPORTS > $output_objdir/$soname.def; 6722 cat $export_symbols >> $output_objdir/$soname.def; 6723 fi~ 6724 $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' 6725 else 6726 _LT_TAGVAR(ld_shlibs, $1)=no 6727 fi 6728 ;; 6729 esac 6730 ;; 6731 darwin* | rhapsody*) 6732 _LT_DARWIN_LINKER_FEATURES($1) 6733 ;; 6734 6735 os2*) 6736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6737 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6738 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6739 shrext_cmds=.dll 6740 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6741 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6742 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6743 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6744 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6745 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6746 emximp -o $lib $output_objdir/$libname.def' 6747 _LT_TAGVAR(archive_expsym_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 prefix_cmds="$SED"~ 6752 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6753 prefix_cmds="$prefix_cmds -e 1d"; 6754 fi~ 6755 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6756 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6757 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6758 emximp -o $lib $output_objdir/$libname.def' 6759 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6760 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6761 ;; 6762 6763 dgux*) 6764 case $cc_basename in 6765 ec++*) 6766 # FIXME: insert proper C++ library support 6767 _LT_TAGVAR(ld_shlibs, $1)=no 6768 ;; 6769 ghcx*) 6770 # Green Hills C++ Compiler 6771 # FIXME: insert proper C++ library support 6772 _LT_TAGVAR(ld_shlibs, $1)=no 6773 ;; 6774 *) 6775 # FIXME: insert proper C++ library support 6776 _LT_TAGVAR(ld_shlibs, $1)=no 6777 ;; 6778 esac 6779 ;; 6780 6781 freebsd2.*) 6782 # C++ shared libraries reported to be fairly broken before 6783 # switch to ELF 6784 _LT_TAGVAR(ld_shlibs, $1)=no 6785 ;; 6786 6787 freebsd-elf*) 6788 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6789 ;; 6790 6791 freebsd* | dragonfly*) 6792 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6793 # conventions 6794 _LT_TAGVAR(ld_shlibs, $1)=yes 6795 ;; 6796 6797 haiku*) 6798 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6799 _LT_TAGVAR(link_all_deplibs, $1)=yes 6800 ;; 6801 6802 hpux9*) 6803 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6804 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6805 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6806 _LT_TAGVAR(hardcode_direct, $1)=yes 6807 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6808 # but as the default 6809 # location of the library. 6810 6811 case $cc_basename in 6812 CC*) 6813 # FIXME: insert proper C++ library support 6814 _LT_TAGVAR(ld_shlibs, $1)=no 6815 ;; 6816 aCC*) 6817 _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' 6818 # Commands to make compiler produce verbose output that lists 6819 # what "hidden" libraries, object files and flags are used when 6820 # linking a shared library. 6821 # 6822 # There doesn't appear to be a way to prevent this compiler from 6823 # explicitly linking system object files so we need to strip them 6824 # from the output so that they don't get included in the library 6825 # dependencies. 6826 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"' 6827 ;; 6828 *) 6829 if test yes = "$GXX"; then 6830 _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' 6831 else 6832 # FIXME: insert proper C++ library support 6833 _LT_TAGVAR(ld_shlibs, $1)=no 6834 fi 6835 ;; 6836 esac 6837 ;; 6838 6839 hpux10*|hpux11*) 6840 if test no = "$with_gnu_ld"; then 6841 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6842 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6843 6844 case $host_cpu in 6845 hppa*64*|ia64*) 6846 ;; 6847 *) 6848 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6849 ;; 6850 esac 6851 fi 6852 case $host_cpu in 6853 hppa*64*|ia64*) 6854 _LT_TAGVAR(hardcode_direct, $1)=no 6855 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6856 ;; 6857 *) 6858 _LT_TAGVAR(hardcode_direct, $1)=yes 6859 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6860 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6861 # but as the default 6862 # location of the library. 6863 ;; 6864 esac 6865 6866 case $cc_basename in 6867 CC*) 6868 # FIXME: insert proper C++ library support 6869 _LT_TAGVAR(ld_shlibs, $1)=no 6870 ;; 6871 aCC*) 6872 case $host_cpu in 6873 hppa*64*) 6874 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6875 ;; 6876 ia64*) 6877 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6878 ;; 6879 *) 6880 _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' 6881 ;; 6882 esac 6883 # Commands to make compiler produce verbose output that lists 6884 # what "hidden" libraries, object files and flags are used when 6885 # linking a shared library. 6886 # 6887 # There doesn't appear to be a way to prevent this compiler from 6888 # explicitly linking system object files so we need to strip them 6889 # from the output so that they don't get included in the library 6890 # dependencies. 6891 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"' 6892 ;; 6893 *) 6894 if test yes = "$GXX"; then 6895 if test no = "$with_gnu_ld"; then 6896 case $host_cpu in 6897 hppa*64*) 6898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6899 ;; 6900 ia64*) 6901 _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' 6902 ;; 6903 *) 6904 _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' 6905 ;; 6906 esac 6907 fi 6908 else 6909 # FIXME: insert proper C++ library support 6910 _LT_TAGVAR(ld_shlibs, $1)=no 6911 fi 6912 ;; 6913 esac 6914 ;; 6915 6916 interix[[3-9]]*) 6917 _LT_TAGVAR(hardcode_direct, $1)=no 6918 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6919 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6920 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6921 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6922 # Instead, shared libraries are loaded at an image base (0x10000000 by 6923 # default) and relocated if they conflict, which is a slow very memory 6924 # consuming and fragmenting process. To avoid this, we pick a random, 6925 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6926 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6927 _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' 6928 _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' 6929 ;; 6930 irix5* | irix6*) 6931 case $cc_basename in 6932 CC*) 6933 # SGI C++ 6934 _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' 6935 6936 # Archives containing C++ object files must be created using 6937 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6938 # necessary to make sure instantiated templates are included 6939 # in the archive. 6940 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6941 ;; 6942 *) 6943 if test yes = "$GXX"; then 6944 if test no = "$with_gnu_ld"; then 6945 _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' 6946 else 6947 _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' 6948 fi 6949 fi 6950 _LT_TAGVAR(link_all_deplibs, $1)=yes 6951 ;; 6952 esac 6953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6954 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6955 _LT_TAGVAR(inherit_rpath, $1)=yes 6956 ;; 6957 6958 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6959 case $cc_basename in 6960 KCC*) 6961 # Kuck and Associates, Inc. (KAI) C++ Compiler 6962 6963 # KCC will only create a shared library if the output file 6964 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6965 # to its proper name (with version) after linking. 6966 _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' 6967 _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' 6968 # Commands to make compiler produce verbose output that lists 6969 # what "hidden" libraries, object files and flags are used when 6970 # linking a shared library. 6971 # 6972 # There doesn't appear to be a way to prevent this compiler from 6973 # explicitly linking system object files so we need to strip them 6974 # from the output so that they don't get included in the library 6975 # dependencies. 6976 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"' 6977 6978 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6979 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6980 6981 # Archives containing C++ object files must be created using 6982 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6983 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6984 ;; 6985 icpc* | ecpc* ) 6986 # Intel C++ 6987 with_gnu_ld=yes 6988 # version 8.0 and above of icpc choke on multiply defined symbols 6989 # if we add $predep_objects and $postdep_objects, however 7.1 and 6990 # earlier do not add the objects themselves. 6991 case `$CC -V 2>&1` in 6992 *"Version 7."*) 6993 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6994 _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' 6995 ;; 6996 *) # Version 8.0 or newer 6997 tmp_idyn= 6998 case $host_cpu in 6999 ia64*) tmp_idyn=' -i_dynamic';; 7000 esac 7001 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7002 _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' 7003 ;; 7004 esac 7005 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7006 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7007 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7008 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7009 ;; 7010 pgCC* | pgcpp*) 7011 # Portland Group C++ compiler 7012 case `$CC -V` in 7013 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7014 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7015 rm -rf $tpldir~ 7016 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7017 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7018 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7019 rm -rf $tpldir~ 7020 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7021 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7022 $RANLIB $oldlib' 7023 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7024 rm -rf $tpldir~ 7025 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7026 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7027 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7028 rm -rf $tpldir~ 7029 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7030 $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' 7031 ;; 7032 *) # Version 6 and above use weak symbols 7033 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7034 _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' 7035 ;; 7036 esac 7037 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7039 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7040 _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' 7041 ;; 7042 cxx*) 7043 # Compaq C++ 7044 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7045 _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' 7046 7047 runpath_var=LD_RUN_PATH 7048 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7049 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7050 7051 # Commands to make compiler produce verbose output that lists 7052 # what "hidden" libraries, object files and flags are used when 7053 # linking a shared library. 7054 # 7055 # There doesn't appear to be a way to prevent this compiler from 7056 # explicitly linking system object files so we need to strip them 7057 # from the output so that they don't get included in the library 7058 # dependencies. 7059 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' 7060 ;; 7061 xl* | mpixl* | bgxl*) 7062 # IBM XL 8.0 on PPC, with GNU ld 7063 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7065 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7066 if test yes = "$supports_anon_versioning"; then 7067 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7068 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7069 echo "local: *; };" >> $output_objdir/$libname.ver~ 7070 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7071 fi 7072 ;; 7073 *) 7074 case `$CC -V 2>&1 | sed 5q` in 7075 *Sun\ C*) 7076 # Sun C++ 5.9 7077 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7078 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7079 _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' 7080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7081 _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' 7082 _LT_TAGVAR(compiler_needs_object, $1)=yes 7083 7084 # Not sure whether something based on 7085 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7086 # would be better. 7087 output_verbose_link_cmd='func_echo_all' 7088 7089 # Archives containing C++ object files must be created using 7090 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7091 # necessary to make sure instantiated templates are included 7092 # in the archive. 7093 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7094 ;; 7095 esac 7096 ;; 7097 esac 7098 ;; 7099 7100 lynxos*) 7101 # FIXME: insert proper C++ library support 7102 _LT_TAGVAR(ld_shlibs, $1)=no 7103 ;; 7104 7105 m88k*) 7106 # FIXME: insert proper C++ library support 7107 _LT_TAGVAR(ld_shlibs, $1)=no 7108 ;; 7109 7110 mvs*) 7111 case $cc_basename in 7112 cxx*) 7113 # FIXME: insert proper C++ library support 7114 _LT_TAGVAR(ld_shlibs, $1)=no 7115 ;; 7116 *) 7117 # FIXME: insert proper C++ library support 7118 _LT_TAGVAR(ld_shlibs, $1)=no 7119 ;; 7120 esac 7121 ;; 7122 7123 netbsd*) 7124 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7125 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7126 wlarc= 7127 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7128 _LT_TAGVAR(hardcode_direct, $1)=yes 7129 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7130 fi 7131 # Workaround some broken pre-1.5 toolchains 7132 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7133 ;; 7134 7135 *nto* | *qnx*) 7136 _LT_TAGVAR(ld_shlibs, $1)=yes 7137 ;; 7138 7139 openbsd* | bitrig*) 7140 if test -f /usr/libexec/ld.so; then 7141 _LT_TAGVAR(hardcode_direct, $1)=yes 7142 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7143 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7144 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7146 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7147 _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' 7148 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7149 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7150 fi 7151 output_verbose_link_cmd=func_echo_all 7152 else 7153 _LT_TAGVAR(ld_shlibs, $1)=no 7154 fi 7155 ;; 7156 7157 osf3* | osf4* | osf5*) 7158 case $cc_basename in 7159 KCC*) 7160 # Kuck and Associates, Inc. (KAI) C++ Compiler 7161 7162 # KCC will only create a shared library if the output file 7163 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7164 # to its proper name (with version) after linking. 7165 _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' 7166 7167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7168 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7169 7170 # Archives containing C++ object files must be created using 7171 # the KAI C++ compiler. 7172 case $host in 7173 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7174 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7175 esac 7176 ;; 7177 RCC*) 7178 # Rational C++ 2.4.1 7179 # FIXME: insert proper C++ library support 7180 _LT_TAGVAR(ld_shlibs, $1)=no 7181 ;; 7182 cxx*) 7183 case $host in 7184 osf3*) 7185 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7186 _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' 7187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7188 ;; 7189 *) 7190 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7191 _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' 7192 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7193 echo "-hidden">> $lib.exp~ 7194 $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~ 7195 $RM $lib.exp' 7196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7197 ;; 7198 esac 7199 7200 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7201 7202 # Commands to make compiler produce verbose output that lists 7203 # what "hidden" libraries, object files and flags are used when 7204 # linking a shared library. 7205 # 7206 # There doesn't appear to be a way to prevent this compiler from 7207 # explicitly linking system object files so we need to strip them 7208 # from the output so that they don't get included in the library 7209 # dependencies. 7210 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"' 7211 ;; 7212 *) 7213 if test yes,no = "$GXX,$with_gnu_ld"; then 7214 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7215 case $host in 7216 osf3*) 7217 _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' 7218 ;; 7219 *) 7220 _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' 7221 ;; 7222 esac 7223 7224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7225 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7226 7227 # Commands to make compiler produce verbose output that lists 7228 # what "hidden" libraries, object files and flags are used when 7229 # linking a shared library. 7230 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7231 7232 else 7233 # FIXME: insert proper C++ library support 7234 _LT_TAGVAR(ld_shlibs, $1)=no 7235 fi 7236 ;; 7237 esac 7238 ;; 7239 7240 psos*) 7241 # FIXME: insert proper C++ library support 7242 _LT_TAGVAR(ld_shlibs, $1)=no 7243 ;; 7244 7245 sunos4*) 7246 case $cc_basename in 7247 CC*) 7248 # Sun C++ 4.x 7249 # FIXME: insert proper C++ library support 7250 _LT_TAGVAR(ld_shlibs, $1)=no 7251 ;; 7252 lcc*) 7253 # Lucid 7254 # FIXME: insert proper C++ library support 7255 _LT_TAGVAR(ld_shlibs, $1)=no 7256 ;; 7257 *) 7258 # FIXME: insert proper C++ library support 7259 _LT_TAGVAR(ld_shlibs, $1)=no 7260 ;; 7261 esac 7262 ;; 7263 7264 solaris*) 7265 case $cc_basename in 7266 CC* | sunCC*) 7267 # Sun C++ 4.2, 5.x and Centerline C++ 7268 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7269 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7270 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7271 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7272 $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' 7273 7274 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7275 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7276 case $host_os in 7277 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7278 *) 7279 # The compiler driver will combine and reorder linker options, 7280 # but understands '-z linker_flag'. 7281 # Supported since Solaris 2.6 (maybe 2.5.1?) 7282 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7283 ;; 7284 esac 7285 _LT_TAGVAR(link_all_deplibs, $1)=yes 7286 7287 output_verbose_link_cmd='func_echo_all' 7288 7289 # Archives containing C++ object files must be created using 7290 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7291 # necessary to make sure instantiated templates are included 7292 # in the archive. 7293 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7294 ;; 7295 gcx*) 7296 # Green Hills C++ Compiler 7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7298 7299 # The C++ compiler must be used to create the archive. 7300 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7301 ;; 7302 *) 7303 # GNU C++ compiler with Solaris linker 7304 if test yes,no = "$GXX,$with_gnu_ld"; then 7305 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7306 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7307 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7308 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7309 $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' 7310 7311 # Commands to make compiler produce verbose output that lists 7312 # what "hidden" libraries, object files and flags are used when 7313 # linking a shared library. 7314 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7315 else 7316 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7317 # platform. 7318 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7319 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7320 $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' 7321 7322 # Commands to make compiler produce verbose output that lists 7323 # what "hidden" libraries, object files and flags are used when 7324 # linking a shared library. 7325 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7326 fi 7327 7328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7329 case $host_os in 7330 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7331 *) 7332 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7333 ;; 7334 esac 7335 fi 7336 ;; 7337 esac 7338 ;; 7339 7340 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7341 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7342 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7343 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7344 runpath_var='LD_RUN_PATH' 7345 7346 case $cc_basename in 7347 CC*) 7348 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350 ;; 7351 *) 7352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7353 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7354 ;; 7355 esac 7356 ;; 7357 7358 sysv5* | sco3.2v5* | sco5v6*) 7359 # Note: We CANNOT use -z defs as we might desire, because we do not 7360 # link with -lc, and that would cause any symbols used from libc to 7361 # always be unresolved, which means just about no library would 7362 # ever link correctly. If we're not using GNU ld we use -z text 7363 # though, which does catch some bad symbols but isn't as heavy-handed 7364 # as -z defs. 7365 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7366 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7367 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7368 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7369 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7370 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7371 _LT_TAGVAR(link_all_deplibs, $1)=yes 7372 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7373 runpath_var='LD_RUN_PATH' 7374 7375 case $cc_basename in 7376 CC*) 7377 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7378 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7379 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7380 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7381 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7382 '"$_LT_TAGVAR(reload_cmds, $1)" 7383 ;; 7384 *) 7385 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7386 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7387 ;; 7388 esac 7389 ;; 7390 7391 tandem*) 7392 case $cc_basename in 7393 NCC*) 7394 # NonStop-UX NCC 3.20 7395 # FIXME: insert proper C++ library support 7396 _LT_TAGVAR(ld_shlibs, $1)=no 7397 ;; 7398 *) 7399 # FIXME: insert proper C++ library support 7400 _LT_TAGVAR(ld_shlibs, $1)=no 7401 ;; 7402 esac 7403 ;; 7404 7405 vxworks*) 7406 # FIXME: insert proper C++ library support 7407 _LT_TAGVAR(ld_shlibs, $1)=no 7408 ;; 7409 7410 *) 7411 # FIXME: insert proper C++ library support 7412 _LT_TAGVAR(ld_shlibs, $1)=no 7413 ;; 7414 esac 7415 7416 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7417 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7418 7419 _LT_TAGVAR(GCC, $1)=$GXX 7420 _LT_TAGVAR(LD, $1)=$LD 7421 7422 ## CAVEAT EMPTOR: 7423 ## There is no encapsulation within the following macros, do not change 7424 ## the running order or otherwise move them around unless you know exactly 7425 ## what you are doing... 7426 _LT_SYS_HIDDEN_LIBDEPS($1) 7427 _LT_COMPILER_PIC($1) 7428 _LT_COMPILER_C_O($1) 7429 _LT_COMPILER_FILE_LOCKS($1) 7430 _LT_LINKER_SHLIBS($1) 7431 _LT_SYS_DYNAMIC_LINKER($1) 7432 _LT_LINKER_HARDCODE_LIBPATH($1) 7433 7434 _LT_CONFIG($1) 7435 fi # test -n "$compiler" 7436 7437 CC=$lt_save_CC 7438 CFLAGS=$lt_save_CFLAGS 7439 LDCXX=$LD 7440 LD=$lt_save_LD 7441 GCC=$lt_save_GCC 7442 with_gnu_ld=$lt_save_with_gnu_ld 7443 lt_cv_path_LDCXX=$lt_cv_path_LD 7444 lt_cv_path_LD=$lt_save_path_LD 7445 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7446 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7447fi # test yes != "$_lt_caught_CXX_error" 7448 7449AC_LANG_POP 7450])# _LT_LANG_CXX_CONFIG 7451 7452 7453# _LT_FUNC_STRIPNAME_CNF 7454# ---------------------- 7455# func_stripname_cnf prefix suffix name 7456# strip PREFIX and SUFFIX off of NAME. 7457# PREFIX and SUFFIX must not contain globbing or regex special 7458# characters, hashes, percent signs, but SUFFIX may contain a leading 7459# dot (in which case that matches only a dot). 7460# 7461# This function is identical to the (non-XSI) version of func_stripname, 7462# except this one can be used by m4 code that may be executed by configure, 7463# rather than the libtool script. 7464m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7465AC_REQUIRE([_LT_DECL_SED]) 7466AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7467func_stripname_cnf () 7468{ 7469 case @S|@2 in 7470 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7471 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7472 esac 7473} # func_stripname_cnf 7474])# _LT_FUNC_STRIPNAME_CNF 7475 7476 7477# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7478# --------------------------------- 7479# Figure out "hidden" library dependencies from verbose 7480# compiler output when linking a shared library. 7481# Parse the compiler output and extract the necessary 7482# objects, libraries and library flags. 7483m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7484[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7485AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7486# Dependencies to place before and after the object being linked: 7487_LT_TAGVAR(predep_objects, $1)= 7488_LT_TAGVAR(postdep_objects, $1)= 7489_LT_TAGVAR(predeps, $1)= 7490_LT_TAGVAR(postdeps, $1)= 7491_LT_TAGVAR(compiler_lib_search_path, $1)= 7492 7493dnl we can't use the lt_simple_compile_test_code here, 7494dnl because it contains code intended for an executable, 7495dnl not a library. It's possible we should let each 7496dnl tag define a new lt_????_link_test_code variable, 7497dnl but it's only used here... 7498m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7499int a; 7500void foo (void) { a = 0; } 7501_LT_EOF 7502], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7503class Foo 7504{ 7505public: 7506 Foo (void) { a = 0; } 7507private: 7508 int a; 7509}; 7510_LT_EOF 7511], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7512 subroutine foo 7513 implicit none 7514 integer*4 a 7515 a=0 7516 return 7517 end 7518_LT_EOF 7519], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7520 subroutine foo 7521 implicit none 7522 integer a 7523 a=0 7524 return 7525 end 7526_LT_EOF 7527], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7528public class foo { 7529 private int a; 7530 public void bar (void) { 7531 a = 0; 7532 } 7533}; 7534_LT_EOF 7535], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7536package foo 7537func foo() { 7538} 7539_LT_EOF 7540]) 7541 7542_lt_libdeps_save_CFLAGS=$CFLAGS 7543case "$CC $CFLAGS " in #( 7544*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7545*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7546*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7547esac 7548 7549dnl Parse the compiler output and extract the necessary 7550dnl objects, libraries and library flags. 7551if AC_TRY_EVAL(ac_compile); then 7552 # Parse the compiler output and extract the necessary 7553 # objects, libraries and library flags. 7554 7555 # Sentinel used to keep track of whether or not we are before 7556 # the conftest object file. 7557 pre_test_object_deps_done=no 7558 7559 for p in `eval "$output_verbose_link_cmd"`; do 7560 case $prev$p in 7561 7562 -L* | -R* | -l*) 7563 # Some compilers place space between "-{L,R}" and the path. 7564 # Remove the space. 7565 if test x-L = "$p" || 7566 test x-R = "$p"; then 7567 prev=$p 7568 continue 7569 fi 7570 7571 # Expand the sysroot to ease extracting the directories later. 7572 if test -z "$prev"; then 7573 case $p in 7574 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7575 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7576 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7577 esac 7578 fi 7579 case $p in 7580 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7581 esac 7582 if test no = "$pre_test_object_deps_done"; then 7583 case $prev in 7584 -L | -R) 7585 # Internal compiler library paths should come after those 7586 # provided the user. The postdeps already come after the 7587 # user supplied libs so there is no need to process them. 7588 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7589 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7590 else 7591 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7592 fi 7593 ;; 7594 # The "-l" case would never come before the object being 7595 # linked, so don't bother handling this case. 7596 esac 7597 else 7598 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7599 _LT_TAGVAR(postdeps, $1)=$prev$p 7600 else 7601 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7602 fi 7603 fi 7604 prev= 7605 ;; 7606 7607 *.lto.$objext) ;; # Ignore GCC LTO objects 7608 *.$objext) 7609 # This assumes that the test object file only shows up 7610 # once in the compiler output. 7611 if test "$p" = "conftest.$objext"; then 7612 pre_test_object_deps_done=yes 7613 continue 7614 fi 7615 7616 if test no = "$pre_test_object_deps_done"; then 7617 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7618 _LT_TAGVAR(predep_objects, $1)=$p 7619 else 7620 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7621 fi 7622 else 7623 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7624 _LT_TAGVAR(postdep_objects, $1)=$p 7625 else 7626 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7627 fi 7628 fi 7629 ;; 7630 7631 *) ;; # Ignore the rest. 7632 7633 esac 7634 done 7635 7636 # Clean up. 7637 rm -f a.out a.exe 7638else 7639 echo "libtool.m4: error: problem compiling $1 test program" 7640fi 7641 7642$RM -f confest.$objext 7643CFLAGS=$_lt_libdeps_save_CFLAGS 7644 7645# PORTME: override above test on systems where it is broken 7646m4_if([$1], [CXX], 7647[case $host_os in 7648interix[[3-9]]*) 7649 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7650 # hack all around it, let's just trust "g++" to DTRT. 7651 _LT_TAGVAR(predep_objects,$1)= 7652 _LT_TAGVAR(postdep_objects,$1)= 7653 _LT_TAGVAR(postdeps,$1)= 7654 ;; 7655esac 7656]) 7657 7658case " $_LT_TAGVAR(postdeps, $1) " in 7659*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7660esac 7661 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7662if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7663 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7664fi 7665_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7666 [The directories searched by this compiler when creating a shared library]) 7667_LT_TAGDECL([], [predep_objects], [1], 7668 [Dependencies to place before and after the objects being linked to 7669 create a shared library]) 7670_LT_TAGDECL([], [postdep_objects], [1]) 7671_LT_TAGDECL([], [predeps], [1]) 7672_LT_TAGDECL([], [postdeps], [1]) 7673_LT_TAGDECL([], [compiler_lib_search_path], [1], 7674 [The library search path used internally by the compiler when linking 7675 a shared library]) 7676])# _LT_SYS_HIDDEN_LIBDEPS 7677 7678 7679# _LT_LANG_F77_CONFIG([TAG]) 7680# -------------------------- 7681# Ensure that the configuration variables for a Fortran 77 compiler are 7682# suitably defined. These variables are subsequently used by _LT_CONFIG 7683# to write the compiler configuration to 'libtool'. 7684m4_defun([_LT_LANG_F77_CONFIG], 7685[AC_LANG_PUSH(Fortran 77) 7686if test -z "$F77" || test no = "$F77"; then 7687 _lt_disable_F77=yes 7688fi 7689 7690_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7691_LT_TAGVAR(allow_undefined_flag, $1)= 7692_LT_TAGVAR(always_export_symbols, $1)=no 7693_LT_TAGVAR(archive_expsym_cmds, $1)= 7694_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7695_LT_TAGVAR(hardcode_direct, $1)=no 7696_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7697_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7698_LT_TAGVAR(hardcode_libdir_separator, $1)= 7699_LT_TAGVAR(hardcode_minus_L, $1)=no 7700_LT_TAGVAR(hardcode_automatic, $1)=no 7701_LT_TAGVAR(inherit_rpath, $1)=no 7702_LT_TAGVAR(module_cmds, $1)= 7703_LT_TAGVAR(module_expsym_cmds, $1)= 7704_LT_TAGVAR(link_all_deplibs, $1)=unknown 7705_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7706_LT_TAGVAR(reload_flag, $1)=$reload_flag 7707_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7708_LT_TAGVAR(no_undefined_flag, $1)= 7709_LT_TAGVAR(whole_archive_flag_spec, $1)= 7710_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7711 7712# Source file extension for f77 test sources. 7713ac_ext=f 7714 7715# Object file extension for compiled f77 test sources. 7716objext=o 7717_LT_TAGVAR(objext, $1)=$objext 7718 7719# No sense in running all these tests if we already determined that 7720# the F77 compiler isn't working. Some variables (like enable_shared) 7721# are currently assumed to apply to all compilers on this platform, 7722# and will be corrupted by setting them based on a non-working compiler. 7723if test yes != "$_lt_disable_F77"; then 7724 # Code to be used in simple compile tests 7725 lt_simple_compile_test_code="\ 7726 subroutine t 7727 return 7728 end 7729" 7730 7731 # Code to be used in simple link tests 7732 lt_simple_link_test_code="\ 7733 program t 7734 end 7735" 7736 7737 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7738 _LT_TAG_COMPILER 7739 7740 # save warnings/boilerplate of simple test code 7741 _LT_COMPILER_BOILERPLATE 7742 _LT_LINKER_BOILERPLATE 7743 7744 # Allow CC to be a program name with arguments. 7745 lt_save_CC=$CC 7746 lt_save_GCC=$GCC 7747 lt_save_CFLAGS=$CFLAGS 7748 CC=${F77-"f77"} 7749 CFLAGS=$FFLAGS 7750 compiler=$CC 7751 _LT_TAGVAR(compiler, $1)=$CC 7752 _LT_CC_BASENAME([$compiler]) 7753 GCC=$G77 7754 if test -n "$compiler"; then 7755 AC_MSG_CHECKING([if libtool supports shared libraries]) 7756 AC_MSG_RESULT([$can_build_shared]) 7757 7758 AC_MSG_CHECKING([whether to build shared libraries]) 7759 test no = "$can_build_shared" && enable_shared=no 7760 7761 # On AIX, shared libraries and static libraries use the same namespace, and 7762 # are all built from PIC. 7763 case $host_os in 7764 aix3*) 7765 test yes = "$enable_shared" && enable_static=no 7766 if test -n "$RANLIB"; then 7767 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7768 postinstall_cmds='$RANLIB $lib' 7769 fi 7770 ;; 7771 aix[[4-9]]*) 7772 if test ia64 != "$host_cpu"; then 7773 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7774 yes,aix,yes) ;; # shared object as lib.so file only 7775 yes,svr4,*) ;; # shared object as lib.so archive member only 7776 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7777 esac 7778 fi 7779 ;; 7780 esac 7781 AC_MSG_RESULT([$enable_shared]) 7782 7783 AC_MSG_CHECKING([whether to build static libraries]) 7784 # Make sure either enable_shared or enable_static is yes. 7785 test yes = "$enable_shared" || enable_static=yes 7786 AC_MSG_RESULT([$enable_static]) 7787 7788 _LT_TAGVAR(GCC, $1)=$G77 7789 _LT_TAGVAR(LD, $1)=$LD 7790 7791 ## CAVEAT EMPTOR: 7792 ## There is no encapsulation within the following macros, do not change 7793 ## the running order or otherwise move them around unless you know exactly 7794 ## what you are doing... 7795 _LT_COMPILER_PIC($1) 7796 _LT_COMPILER_C_O($1) 7797 _LT_COMPILER_FILE_LOCKS($1) 7798 _LT_LINKER_SHLIBS($1) 7799 _LT_SYS_DYNAMIC_LINKER($1) 7800 _LT_LINKER_HARDCODE_LIBPATH($1) 7801 7802 _LT_CONFIG($1) 7803 fi # test -n "$compiler" 7804 7805 GCC=$lt_save_GCC 7806 CC=$lt_save_CC 7807 CFLAGS=$lt_save_CFLAGS 7808fi # test yes != "$_lt_disable_F77" 7809 7810AC_LANG_POP 7811])# _LT_LANG_F77_CONFIG 7812 7813 7814# _LT_LANG_FC_CONFIG([TAG]) 7815# ------------------------- 7816# Ensure that the configuration variables for a Fortran compiler are 7817# suitably defined. These variables are subsequently used by _LT_CONFIG 7818# to write the compiler configuration to 'libtool'. 7819m4_defun([_LT_LANG_FC_CONFIG], 7820[AC_LANG_PUSH(Fortran) 7821 7822if test -z "$FC" || test no = "$FC"; then 7823 _lt_disable_FC=yes 7824fi 7825 7826_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7827_LT_TAGVAR(allow_undefined_flag, $1)= 7828_LT_TAGVAR(always_export_symbols, $1)=no 7829_LT_TAGVAR(archive_expsym_cmds, $1)= 7830_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7831_LT_TAGVAR(hardcode_direct, $1)=no 7832_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7833_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7834_LT_TAGVAR(hardcode_libdir_separator, $1)= 7835_LT_TAGVAR(hardcode_minus_L, $1)=no 7836_LT_TAGVAR(hardcode_automatic, $1)=no 7837_LT_TAGVAR(inherit_rpath, $1)=no 7838_LT_TAGVAR(module_cmds, $1)= 7839_LT_TAGVAR(module_expsym_cmds, $1)= 7840_LT_TAGVAR(link_all_deplibs, $1)=unknown 7841_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7842_LT_TAGVAR(reload_flag, $1)=$reload_flag 7843_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7844_LT_TAGVAR(no_undefined_flag, $1)= 7845_LT_TAGVAR(whole_archive_flag_spec, $1)= 7846_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7847 7848# Source file extension for fc test sources. 7849ac_ext=${ac_fc_srcext-f} 7850 7851# Object file extension for compiled fc test sources. 7852objext=o 7853_LT_TAGVAR(objext, $1)=$objext 7854 7855# No sense in running all these tests if we already determined that 7856# the FC compiler isn't working. Some variables (like enable_shared) 7857# are currently assumed to apply to all compilers on this platform, 7858# and will be corrupted by setting them based on a non-working compiler. 7859if test yes != "$_lt_disable_FC"; then 7860 # Code to be used in simple compile tests 7861 lt_simple_compile_test_code="\ 7862 subroutine t 7863 return 7864 end 7865" 7866 7867 # Code to be used in simple link tests 7868 lt_simple_link_test_code="\ 7869 program t 7870 end 7871" 7872 7873 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7874 _LT_TAG_COMPILER 7875 7876 # save warnings/boilerplate of simple test code 7877 _LT_COMPILER_BOILERPLATE 7878 _LT_LINKER_BOILERPLATE 7879 7880 # Allow CC to be a program name with arguments. 7881 lt_save_CC=$CC 7882 lt_save_GCC=$GCC 7883 lt_save_CFLAGS=$CFLAGS 7884 CC=${FC-"f95"} 7885 CFLAGS=$FCFLAGS 7886 compiler=$CC 7887 GCC=$ac_cv_fc_compiler_gnu 7888 7889 _LT_TAGVAR(compiler, $1)=$CC 7890 _LT_CC_BASENAME([$compiler]) 7891 7892 if test -n "$compiler"; then 7893 AC_MSG_CHECKING([if libtool supports shared libraries]) 7894 AC_MSG_RESULT([$can_build_shared]) 7895 7896 AC_MSG_CHECKING([whether to build shared libraries]) 7897 test no = "$can_build_shared" && enable_shared=no 7898 7899 # On AIX, shared libraries and static libraries use the same namespace, and 7900 # are all built from PIC. 7901 case $host_os in 7902 aix3*) 7903 test yes = "$enable_shared" && enable_static=no 7904 if test -n "$RANLIB"; then 7905 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7906 postinstall_cmds='$RANLIB $lib' 7907 fi 7908 ;; 7909 aix[[4-9]]*) 7910 if test ia64 != "$host_cpu"; then 7911 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7912 yes,aix,yes) ;; # shared object as lib.so file only 7913 yes,svr4,*) ;; # shared object as lib.so archive member only 7914 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7915 esac 7916 fi 7917 ;; 7918 esac 7919 AC_MSG_RESULT([$enable_shared]) 7920 7921 AC_MSG_CHECKING([whether to build static libraries]) 7922 # Make sure either enable_shared or enable_static is yes. 7923 test yes = "$enable_shared" || enable_static=yes 7924 AC_MSG_RESULT([$enable_static]) 7925 7926 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7927 _LT_TAGVAR(LD, $1)=$LD 7928 7929 ## CAVEAT EMPTOR: 7930 ## There is no encapsulation within the following macros, do not change 7931 ## the running order or otherwise move them around unless you know exactly 7932 ## what you are doing... 7933 _LT_SYS_HIDDEN_LIBDEPS($1) 7934 _LT_COMPILER_PIC($1) 7935 _LT_COMPILER_C_O($1) 7936 _LT_COMPILER_FILE_LOCKS($1) 7937 _LT_LINKER_SHLIBS($1) 7938 _LT_SYS_DYNAMIC_LINKER($1) 7939 _LT_LINKER_HARDCODE_LIBPATH($1) 7940 7941 _LT_CONFIG($1) 7942 fi # test -n "$compiler" 7943 7944 GCC=$lt_save_GCC 7945 CC=$lt_save_CC 7946 CFLAGS=$lt_save_CFLAGS 7947fi # test yes != "$_lt_disable_FC" 7948 7949AC_LANG_POP 7950])# _LT_LANG_FC_CONFIG 7951 7952 7953# _LT_LANG_GCJ_CONFIG([TAG]) 7954# -------------------------- 7955# Ensure that the configuration variables for the GNU Java Compiler compiler 7956# are suitably defined. These variables are subsequently used by _LT_CONFIG 7957# to write the compiler configuration to 'libtool'. 7958m4_defun([_LT_LANG_GCJ_CONFIG], 7959[AC_REQUIRE([LT_PROG_GCJ])dnl 7960AC_LANG_SAVE 7961 7962# Source file extension for Java test sources. 7963ac_ext=java 7964 7965# Object file extension for compiled Java test sources. 7966objext=o 7967_LT_TAGVAR(objext, $1)=$objext 7968 7969# Code to be used in simple compile tests 7970lt_simple_compile_test_code="class foo {}" 7971 7972# Code to be used in simple link tests 7973lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7974 7975# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7976_LT_TAG_COMPILER 7977 7978# save warnings/boilerplate of simple test code 7979_LT_COMPILER_BOILERPLATE 7980_LT_LINKER_BOILERPLATE 7981 7982# Allow CC to be a program name with arguments. 7983lt_save_CC=$CC 7984lt_save_CFLAGS=$CFLAGS 7985lt_save_GCC=$GCC 7986GCC=yes 7987CC=${GCJ-"gcj"} 7988CFLAGS=$GCJFLAGS 7989compiler=$CC 7990_LT_TAGVAR(compiler, $1)=$CC 7991_LT_TAGVAR(LD, $1)=$LD 7992_LT_CC_BASENAME([$compiler]) 7993 7994# GCJ did not exist at the time GCC didn't implicitly link libc in. 7995_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7996 7997_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7998_LT_TAGVAR(reload_flag, $1)=$reload_flag 7999_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8000 8001if test -n "$compiler"; then 8002 _LT_COMPILER_NO_RTTI($1) 8003 _LT_COMPILER_PIC($1) 8004 _LT_COMPILER_C_O($1) 8005 _LT_COMPILER_FILE_LOCKS($1) 8006 _LT_LINKER_SHLIBS($1) 8007 _LT_LINKER_HARDCODE_LIBPATH($1) 8008 8009 _LT_CONFIG($1) 8010fi 8011 8012AC_LANG_RESTORE 8013 8014GCC=$lt_save_GCC 8015CC=$lt_save_CC 8016CFLAGS=$lt_save_CFLAGS 8017])# _LT_LANG_GCJ_CONFIG 8018 8019 8020# _LT_LANG_GO_CONFIG([TAG]) 8021# -------------------------- 8022# Ensure that the configuration variables for the GNU Go compiler 8023# are suitably defined. These variables are subsequently used by _LT_CONFIG 8024# to write the compiler configuration to 'libtool'. 8025m4_defun([_LT_LANG_GO_CONFIG], 8026[AC_REQUIRE([LT_PROG_GO])dnl 8027AC_LANG_SAVE 8028 8029# Source file extension for Go test sources. 8030ac_ext=go 8031 8032# Object file extension for compiled Go test sources. 8033objext=o 8034_LT_TAGVAR(objext, $1)=$objext 8035 8036# Code to be used in simple compile tests 8037lt_simple_compile_test_code="package main; func main() { }" 8038 8039# Code to be used in simple link tests 8040lt_simple_link_test_code='package main; func main() { }' 8041 8042# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8043_LT_TAG_COMPILER 8044 8045# save warnings/boilerplate of simple test code 8046_LT_COMPILER_BOILERPLATE 8047_LT_LINKER_BOILERPLATE 8048 8049# Allow CC to be a program name with arguments. 8050lt_save_CC=$CC 8051lt_save_CFLAGS=$CFLAGS 8052lt_save_GCC=$GCC 8053GCC=yes 8054CC=${GOC-"gccgo"} 8055CFLAGS=$GOFLAGS 8056compiler=$CC 8057_LT_TAGVAR(compiler, $1)=$CC 8058_LT_TAGVAR(LD, $1)=$LD 8059_LT_CC_BASENAME([$compiler]) 8060 8061# Go did not exist at the time GCC didn't implicitly link libc in. 8062_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8063 8064_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8065_LT_TAGVAR(reload_flag, $1)=$reload_flag 8066_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8067 8068if test -n "$compiler"; then 8069 _LT_COMPILER_NO_RTTI($1) 8070 _LT_COMPILER_PIC($1) 8071 _LT_COMPILER_C_O($1) 8072 _LT_COMPILER_FILE_LOCKS($1) 8073 _LT_LINKER_SHLIBS($1) 8074 _LT_LINKER_HARDCODE_LIBPATH($1) 8075 8076 _LT_CONFIG($1) 8077fi 8078 8079AC_LANG_RESTORE 8080 8081GCC=$lt_save_GCC 8082CC=$lt_save_CC 8083CFLAGS=$lt_save_CFLAGS 8084])# _LT_LANG_GO_CONFIG 8085 8086 8087# _LT_LANG_RC_CONFIG([TAG]) 8088# ------------------------- 8089# Ensure that the configuration variables for the Windows resource compiler 8090# are suitably defined. These variables are subsequently used by _LT_CONFIG 8091# to write the compiler configuration to 'libtool'. 8092m4_defun([_LT_LANG_RC_CONFIG], 8093[AC_REQUIRE([LT_PROG_RC])dnl 8094AC_LANG_SAVE 8095 8096# Source file extension for RC test sources. 8097ac_ext=rc 8098 8099# Object file extension for compiled RC test sources. 8100objext=o 8101_LT_TAGVAR(objext, $1)=$objext 8102 8103# Code to be used in simple compile tests 8104lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8105 8106# Code to be used in simple link tests 8107lt_simple_link_test_code=$lt_simple_compile_test_code 8108 8109# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8110_LT_TAG_COMPILER 8111 8112# save warnings/boilerplate of simple test code 8113_LT_COMPILER_BOILERPLATE 8114_LT_LINKER_BOILERPLATE 8115 8116# Allow CC to be a program name with arguments. 8117lt_save_CC=$CC 8118lt_save_CFLAGS=$CFLAGS 8119lt_save_GCC=$GCC 8120GCC= 8121CC=${RC-"windres"} 8122CFLAGS= 8123compiler=$CC 8124_LT_TAGVAR(compiler, $1)=$CC 8125_LT_CC_BASENAME([$compiler]) 8126_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8127 8128if test -n "$compiler"; then 8129 : 8130 _LT_CONFIG($1) 8131fi 8132 8133GCC=$lt_save_GCC 8134AC_LANG_RESTORE 8135CC=$lt_save_CC 8136CFLAGS=$lt_save_CFLAGS 8137])# _LT_LANG_RC_CONFIG 8138 8139 8140# LT_PROG_GCJ 8141# ----------- 8142AC_DEFUN([LT_PROG_GCJ], 8143[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8144 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8145 [AC_CHECK_TOOL(GCJ, gcj,) 8146 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8147 AC_SUBST(GCJFLAGS)])])[]dnl 8148]) 8149 8150# Old name: 8151AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8152dnl aclocal-1.4 backwards compatibility: 8153dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8154 8155 8156# LT_PROG_GO 8157# ---------- 8158AC_DEFUN([LT_PROG_GO], 8159[AC_CHECK_TOOL(GOC, gccgo,) 8160]) 8161 8162 8163# LT_PROG_RC 8164# ---------- 8165AC_DEFUN([LT_PROG_RC], 8166[AC_CHECK_TOOL(RC, windres,) 8167]) 8168 8169# Old name: 8170AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8171dnl aclocal-1.4 backwards compatibility: 8172dnl AC_DEFUN([LT_AC_PROG_RC], []) 8173 8174 8175# _LT_DECL_EGREP 8176# -------------- 8177# If we don't have a new enough Autoconf to choose the best grep 8178# available, choose the one first in the user's PATH. 8179m4_defun([_LT_DECL_EGREP], 8180[AC_REQUIRE([AC_PROG_EGREP])dnl 8181AC_REQUIRE([AC_PROG_FGREP])dnl 8182test -z "$GREP" && GREP=grep 8183_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8184_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8185_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8186dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8187AC_SUBST([GREP]) 8188]) 8189 8190 8191# _LT_DECL_OBJDUMP 8192# -------------- 8193# If we don't have a new enough Autoconf to choose the best objdump 8194# available, choose the one first in the user's PATH. 8195m4_defun([_LT_DECL_OBJDUMP], 8196[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8197test -z "$OBJDUMP" && OBJDUMP=objdump 8198_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8199AC_SUBST([OBJDUMP]) 8200]) 8201 8202# _LT_DECL_DLLTOOL 8203# ---------------- 8204# Ensure DLLTOOL variable is set. 8205m4_defun([_LT_DECL_DLLTOOL], 8206[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8207test -z "$DLLTOOL" && DLLTOOL=dlltool 8208_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8209AC_SUBST([DLLTOOL]) 8210]) 8211 8212# _LT_DECL_SED 8213# ------------ 8214# Check for a fully-functional sed program, that truncates 8215# as few characters as possible. Prefer GNU sed if found. 8216m4_defun([_LT_DECL_SED], 8217[AC_PROG_SED 8218test -z "$SED" && SED=sed 8219Xsed="$SED -e 1s/^X//" 8220_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8221_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8222 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8223])# _LT_DECL_SED 8224 8225m4_ifndef([AC_PROG_SED], [ 8226# NOTE: This macro has been submitted for inclusion into # 8227# GNU Autoconf as AC_PROG_SED. When it is available in # 8228# a released version of Autoconf we should remove this # 8229# macro and use it instead. # 8230 8231m4_defun([AC_PROG_SED], 8232[AC_MSG_CHECKING([for a sed that does not truncate output]) 8233AC_CACHE_VAL(lt_cv_path_SED, 8234[# Loop through the user's path and test for sed and gsed. 8235# Then use that list of sed's as ones to test for truncation. 8236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8237for as_dir in $PATH 8238do 8239 IFS=$as_save_IFS 8240 test -z "$as_dir" && as_dir=. 8241 for lt_ac_prog in sed gsed; do 8242 for ac_exec_ext in '' $ac_executable_extensions; do 8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8245 fi 8246 done 8247 done 8248done 8249IFS=$as_save_IFS 8250lt_ac_max=0 8251lt_ac_count=0 8252# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8253# along with /bin/sed that truncates output. 8254for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8255 test ! -f "$lt_ac_sed" && continue 8256 cat /dev/null > conftest.in 8257 lt_ac_count=0 8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8259 # Check for GNU sed and select it if it is found. 8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8261 lt_cv_path_SED=$lt_ac_sed 8262 break 8263 fi 8264 while true; do 8265 cat conftest.in conftest.in >conftest.tmp 8266 mv conftest.tmp conftest.in 8267 cp conftest.in conftest.nl 8268 echo >>conftest.nl 8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8270 cmp -s conftest.out conftest.nl || break 8271 # 10000 chars as input seems more than enough 8272 test 10 -lt "$lt_ac_count" && break 8273 lt_ac_count=`expr $lt_ac_count + 1` 8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8275 lt_ac_max=$lt_ac_count 8276 lt_cv_path_SED=$lt_ac_sed 8277 fi 8278 done 8279done 8280]) 8281SED=$lt_cv_path_SED 8282AC_SUBST([SED]) 8283AC_MSG_RESULT([$SED]) 8284])#AC_PROG_SED 8285])#m4_ifndef 8286 8287# Old name: 8288AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8289dnl aclocal-1.4 backwards compatibility: 8290dnl AC_DEFUN([LT_AC_PROG_SED], []) 8291 8292 8293# _LT_CHECK_SHELL_FEATURES 8294# ------------------------ 8295# Find out whether the shell is Bourne or XSI compatible, 8296# or has some other useful features. 8297m4_defun([_LT_CHECK_SHELL_FEATURES], 8298[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8299 lt_unset=unset 8300else 8301 lt_unset=false 8302fi 8303_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8304 8305# test EBCDIC or ASCII 8306case `echo X|tr X '\101'` in 8307 A) # ASCII based system 8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8309 lt_SP2NL='tr \040 \012' 8310 lt_NL2SP='tr \015\012 \040\040' 8311 ;; 8312 *) # EBCDIC based system 8313 lt_SP2NL='tr \100 \n' 8314 lt_NL2SP='tr \r\n \100\100' 8315 ;; 8316esac 8317_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8318_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8319])# _LT_CHECK_SHELL_FEATURES 8320 8321 8322# _LT_PATH_CONVERSION_FUNCTIONS 8323# ----------------------------- 8324# Determine what file name conversion functions should be used by 8325# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8326# for certain cross-compile configurations and native mingw. 8327m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8328[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8329AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8330AC_MSG_CHECKING([how to convert $build file names to $host format]) 8331AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8332[case $host in 8333 *-*-mingw* ) 8334 case $build in 8335 *-*-mingw* ) # actually msys 8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8337 ;; 8338 *-*-cygwin* ) 8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8340 ;; 8341 * ) # otherwise, assume *nix 8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8343 ;; 8344 esac 8345 ;; 8346 *-*-cygwin* ) 8347 case $build in 8348 *-*-mingw* ) # actually msys 8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8350 ;; 8351 *-*-cygwin* ) 8352 lt_cv_to_host_file_cmd=func_convert_file_noop 8353 ;; 8354 * ) # otherwise, assume *nix 8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8356 ;; 8357 esac 8358 ;; 8359 * ) # unhandled hosts (and "normal" native builds) 8360 lt_cv_to_host_file_cmd=func_convert_file_noop 8361 ;; 8362esac 8363]) 8364to_host_file_cmd=$lt_cv_to_host_file_cmd 8365AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8366_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8367 [0], [convert $build file names to $host format])dnl 8368 8369AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8370AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8371[#assume ordinary cross tools, or native build. 8372lt_cv_to_tool_file_cmd=func_convert_file_noop 8373case $host in 8374 *-*-mingw* ) 8375 case $build in 8376 *-*-mingw* ) # actually msys 8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8378 ;; 8379 esac 8380 ;; 8381esac 8382]) 8383to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8384AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8385_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8386 [0], [convert $build files to toolchain format])dnl 8387])# _LT_PATH_CONVERSION_FUNCTIONS 8388 8389# Helper functions for option handling. -*- Autoconf -*- 8390# 8391# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8392# Foundation, Inc. 8393# Written by Gary V. Vaughan, 2004 8394# 8395# This file is free software; the Free Software Foundation gives 8396# unlimited permission to copy and/or distribute it, with or without 8397# modifications, as long as this notice is preserved. 8398 8399# serial 8 ltoptions.m4 8400 8401# This is to help aclocal find these macros, as it can't see m4_define. 8402AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8403 8404 8405# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8406# ------------------------------------------ 8407m4_define([_LT_MANGLE_OPTION], 8408[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8409 8410 8411# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8412# --------------------------------------- 8413# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8414# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8415# saved as a flag. 8416m4_define([_LT_SET_OPTION], 8417[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8418m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8419 _LT_MANGLE_DEFUN([$1], [$2]), 8420 [m4_warning([Unknown $1 option '$2'])])[]dnl 8421]) 8422 8423 8424# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8425# ------------------------------------------------------------ 8426# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8427m4_define([_LT_IF_OPTION], 8428[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8429 8430 8431# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8432# ------------------------------------------------------- 8433# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8434# are set. 8435m4_define([_LT_UNLESS_OPTIONS], 8436[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8437 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8438 [m4_define([$0_found])])])[]dnl 8439m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8440])[]dnl 8441]) 8442 8443 8444# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8445# ---------------------------------------- 8446# OPTION-LIST is a space-separated list of Libtool options associated 8447# with MACRO-NAME. If any OPTION has a matching handler declared with 8448# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8449# the unknown option and exit. 8450m4_defun([_LT_SET_OPTIONS], 8451[# Set options 8452m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8453 [_LT_SET_OPTION([$1], _LT_Option)]) 8454 8455m4_if([$1],[LT_INIT],[ 8456 dnl 8457 dnl Simply set some default values (i.e off) if boolean options were not 8458 dnl specified: 8459 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8460 ]) 8461 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8462 ]) 8463 dnl 8464 dnl If no reference was made to various pairs of opposing options, then 8465 dnl we run the default mode handler for the pair. For example, if neither 8466 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8467 dnl archives by default: 8468 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8469 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8470 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8471 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8472 [_LT_ENABLE_FAST_INSTALL]) 8473 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8474 [_LT_WITH_AIX_SONAME([aix])]) 8475 ]) 8476])# _LT_SET_OPTIONS 8477 8478 8479 8480# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8481# ----------------------------------------- 8482m4_define([_LT_MANGLE_DEFUN], 8483[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8484 8485 8486# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8487# ----------------------------------------------- 8488m4_define([LT_OPTION_DEFINE], 8489[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8490])# LT_OPTION_DEFINE 8491 8492 8493# dlopen 8494# ------ 8495LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8496]) 8497 8498AU_DEFUN([AC_LIBTOOL_DLOPEN], 8499[_LT_SET_OPTION([LT_INIT], [dlopen]) 8500AC_DIAGNOSE([obsolete], 8501[$0: Remove this warning and the call to _LT_SET_OPTION when you 8502put the 'dlopen' option into LT_INIT's first parameter.]) 8503]) 8504 8505dnl aclocal-1.4 backwards compatibility: 8506dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8507 8508 8509# win32-dll 8510# --------- 8511# Declare package support for building win32 dll's. 8512LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8513[enable_win32_dll=yes 8514 8515case $host in 8516*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8517 AC_CHECK_TOOL(AS, as, false) 8518 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8519 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8520 ;; 8521esac 8522 8523test -z "$AS" && AS=as 8524_LT_DECL([], [AS], [1], [Assembler program])dnl 8525 8526test -z "$DLLTOOL" && DLLTOOL=dlltool 8527_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8528 8529test -z "$OBJDUMP" && OBJDUMP=objdump 8530_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8531])# win32-dll 8532 8533AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8534[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8535_LT_SET_OPTION([LT_INIT], [win32-dll]) 8536AC_DIAGNOSE([obsolete], 8537[$0: Remove this warning and the call to _LT_SET_OPTION when you 8538put the 'win32-dll' option into LT_INIT's first parameter.]) 8539]) 8540 8541dnl aclocal-1.4 backwards compatibility: 8542dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8543 8544 8545# _LT_ENABLE_SHARED([DEFAULT]) 8546# ---------------------------- 8547# implement the --enable-shared flag, and supports the 'shared' and 8548# 'disable-shared' LT_INIT options. 8549# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8550m4_define([_LT_ENABLE_SHARED], 8551[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8552AC_ARG_ENABLE([shared], 8553 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8554 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8555 [p=${PACKAGE-default} 8556 case $enableval in 8557 yes) enable_shared=yes ;; 8558 no) enable_shared=no ;; 8559 *) 8560 enable_shared=no 8561 # Look at the argument we got. We use all the common list separators. 8562 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8563 for pkg in $enableval; do 8564 IFS=$lt_save_ifs 8565 if test "X$pkg" = "X$p"; then 8566 enable_shared=yes 8567 fi 8568 done 8569 IFS=$lt_save_ifs 8570 ;; 8571 esac], 8572 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8573 8574 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8575 [Whether or not to build shared libraries]) 8576])# _LT_ENABLE_SHARED 8577 8578LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8579LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8580 8581# Old names: 8582AC_DEFUN([AC_ENABLE_SHARED], 8583[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8584]) 8585 8586AC_DEFUN([AC_DISABLE_SHARED], 8587[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8588]) 8589 8590AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8591AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8592 8593dnl aclocal-1.4 backwards compatibility: 8594dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8595dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8596 8597 8598 8599# _LT_ENABLE_STATIC([DEFAULT]) 8600# ---------------------------- 8601# implement the --enable-static flag, and support the 'static' and 8602# 'disable-static' LT_INIT options. 8603# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8604m4_define([_LT_ENABLE_STATIC], 8605[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8606AC_ARG_ENABLE([static], 8607 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8608 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8609 [p=${PACKAGE-default} 8610 case $enableval in 8611 yes) enable_static=yes ;; 8612 no) enable_static=no ;; 8613 *) 8614 enable_static=no 8615 # Look at the argument we got. We use all the common list separators. 8616 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8617 for pkg in $enableval; do 8618 IFS=$lt_save_ifs 8619 if test "X$pkg" = "X$p"; then 8620 enable_static=yes 8621 fi 8622 done 8623 IFS=$lt_save_ifs 8624 ;; 8625 esac], 8626 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8627 8628 _LT_DECL([build_old_libs], [enable_static], [0], 8629 [Whether or not to build static libraries]) 8630])# _LT_ENABLE_STATIC 8631 8632LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8633LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8634 8635# Old names: 8636AC_DEFUN([AC_ENABLE_STATIC], 8637[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8638]) 8639 8640AC_DEFUN([AC_DISABLE_STATIC], 8641[_LT_SET_OPTION([LT_INIT], [disable-static]) 8642]) 8643 8644AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8645AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8646 8647dnl aclocal-1.4 backwards compatibility: 8648dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8649dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8650 8651 8652 8653# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8654# ---------------------------------- 8655# implement the --enable-fast-install flag, and support the 'fast-install' 8656# and 'disable-fast-install' LT_INIT options. 8657# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8658m4_define([_LT_ENABLE_FAST_INSTALL], 8659[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8660AC_ARG_ENABLE([fast-install], 8661 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8662 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8663 [p=${PACKAGE-default} 8664 case $enableval in 8665 yes) enable_fast_install=yes ;; 8666 no) enable_fast_install=no ;; 8667 *) 8668 enable_fast_install=no 8669 # Look at the argument we got. We use all the common list separators. 8670 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8671 for pkg in $enableval; do 8672 IFS=$lt_save_ifs 8673 if test "X$pkg" = "X$p"; then 8674 enable_fast_install=yes 8675 fi 8676 done 8677 IFS=$lt_save_ifs 8678 ;; 8679 esac], 8680 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8681 8682_LT_DECL([fast_install], [enable_fast_install], [0], 8683 [Whether or not to optimize for fast installation])dnl 8684])# _LT_ENABLE_FAST_INSTALL 8685 8686LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8687LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8688 8689# Old names: 8690AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8691[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8692AC_DIAGNOSE([obsolete], 8693[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8694the 'fast-install' option into LT_INIT's first parameter.]) 8695]) 8696 8697AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8698[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8699AC_DIAGNOSE([obsolete], 8700[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8701the 'disable-fast-install' option into LT_INIT's first parameter.]) 8702]) 8703 8704dnl aclocal-1.4 backwards compatibility: 8705dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8706dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8707 8708 8709# _LT_WITH_AIX_SONAME([DEFAULT]) 8710# ---------------------------------- 8711# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8712# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8713# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8714m4_define([_LT_WITH_AIX_SONAME], 8715[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8716shared_archive_member_spec= 8717case $host,$enable_shared in 8718power*-*-aix[[5-9]]*,yes) 8719 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8720 AC_ARG_WITH([aix-soname], 8721 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8722 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8723 [case $withval in 8724 aix|svr4|both) 8725 ;; 8726 *) 8727 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8728 ;; 8729 esac 8730 lt_cv_with_aix_soname=$with_aix_soname], 8731 [AC_CACHE_VAL([lt_cv_with_aix_soname], 8732 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8733 with_aix_soname=$lt_cv_with_aix_soname]) 8734 AC_MSG_RESULT([$with_aix_soname]) 8735 if test aix != "$with_aix_soname"; then 8736 # For the AIX way of multilib, we name the shared archive member 8737 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8738 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8739 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8740 # the AIX toolchain works better with OBJECT_MODE set (default 32). 8741 if test 64 = "${OBJECT_MODE-32}"; then 8742 shared_archive_member_spec=shr_64 8743 else 8744 shared_archive_member_spec=shr 8745 fi 8746 fi 8747 ;; 8748*) 8749 with_aix_soname=aix 8750 ;; 8751esac 8752 8753_LT_DECL([], [shared_archive_member_spec], [0], 8754 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8755])# _LT_WITH_AIX_SONAME 8756 8757LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8758LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8759LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8760 8761 8762# _LT_WITH_PIC([MODE]) 8763# -------------------- 8764# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8765# LT_INIT options. 8766# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8767m4_define([_LT_WITH_PIC], 8768[AC_ARG_WITH([pic], 8769 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8770 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8771 [lt_p=${PACKAGE-default} 8772 case $withval in 8773 yes|no) pic_mode=$withval ;; 8774 *) 8775 pic_mode=default 8776 # Look at the argument we got. We use all the common list separators. 8777 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8778 for lt_pkg in $withval; do 8779 IFS=$lt_save_ifs 8780 if test "X$lt_pkg" = "X$lt_p"; then 8781 pic_mode=yes 8782 fi 8783 done 8784 IFS=$lt_save_ifs 8785 ;; 8786 esac], 8787 [pic_mode=m4_default([$1], [default])]) 8788 8789_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8790])# _LT_WITH_PIC 8791 8792LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8793LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8794 8795# Old name: 8796AU_DEFUN([AC_LIBTOOL_PICMODE], 8797[_LT_SET_OPTION([LT_INIT], [pic-only]) 8798AC_DIAGNOSE([obsolete], 8799[$0: Remove this warning and the call to _LT_SET_OPTION when you 8800put the 'pic-only' option into LT_INIT's first parameter.]) 8801]) 8802 8803dnl aclocal-1.4 backwards compatibility: 8804dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8805 8806 8807m4_define([_LTDL_MODE], []) 8808LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8809 [m4_define([_LTDL_MODE], [nonrecursive])]) 8810LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8811 [m4_define([_LTDL_MODE], [recursive])]) 8812LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8813 [m4_define([_LTDL_MODE], [subproject])]) 8814 8815m4_define([_LTDL_TYPE], []) 8816LT_OPTION_DEFINE([LTDL_INIT], [installable], 8817 [m4_define([_LTDL_TYPE], [installable])]) 8818LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8819 [m4_define([_LTDL_TYPE], [convenience])]) 8820 8821# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8822# 8823# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8824# Foundation, Inc. 8825# Written by Gary V. Vaughan, 2004 8826# 8827# This file is free software; the Free Software Foundation gives 8828# unlimited permission to copy and/or distribute it, with or without 8829# modifications, as long as this notice is preserved. 8830 8831# serial 6 ltsugar.m4 8832 8833# This is to help aclocal find these macros, as it can't see m4_define. 8834AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8835 8836 8837# lt_join(SEP, ARG1, [ARG2...]) 8838# ----------------------------- 8839# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8840# associated separator. 8841# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8842# versions in m4sugar had bugs. 8843m4_define([lt_join], 8844[m4_if([$#], [1], [], 8845 [$#], [2], [[$2]], 8846 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8847m4_define([_lt_join], 8848[m4_if([$#$2], [2], [], 8849 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8850 8851 8852# lt_car(LIST) 8853# lt_cdr(LIST) 8854# ------------ 8855# Manipulate m4 lists. 8856# These macros are necessary as long as will still need to support 8857# Autoconf-2.59, which quotes differently. 8858m4_define([lt_car], [[$1]]) 8859m4_define([lt_cdr], 8860[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8861 [$#], 1, [], 8862 [m4_dquote(m4_shift($@))])]) 8863m4_define([lt_unquote], $1) 8864 8865 8866# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8867# ------------------------------------------ 8868# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8869# Note that neither SEPARATOR nor STRING are expanded; they are appended 8870# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8871# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8872# than defined and empty). 8873# 8874# This macro is needed until we can rely on Autoconf 2.62, since earlier 8875# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8876m4_define([lt_append], 8877[m4_define([$1], 8878 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8879 8880 8881 8882# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8883# ---------------------------------------------------------- 8884# Produce a SEP delimited list of all paired combinations of elements of 8885# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8886# has the form PREFIXmINFIXSUFFIXn. 8887# Needed until we can rely on m4_combine added in Autoconf 2.62. 8888m4_define([lt_combine], 8889[m4_if(m4_eval([$# > 3]), [1], 8890 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8891[[m4_foreach([_Lt_prefix], [$2], 8892 [m4_foreach([_Lt_suffix], 8893 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8894 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8895 8896 8897# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8898# ----------------------------------------------------------------------- 8899# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8900# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8901m4_define([lt_if_append_uniq], 8902[m4_ifdef([$1], 8903 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8904 [lt_append([$1], [$2], [$3])$4], 8905 [$5])], 8906 [lt_append([$1], [$2], [$3])$4])]) 8907 8908 8909# lt_dict_add(DICT, KEY, VALUE) 8910# ----------------------------- 8911m4_define([lt_dict_add], 8912[m4_define([$1($2)], [$3])]) 8913 8914 8915# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8916# -------------------------------------------- 8917m4_define([lt_dict_add_subkey], 8918[m4_define([$1($2:$3)], [$4])]) 8919 8920 8921# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8922# ---------------------------------- 8923m4_define([lt_dict_fetch], 8924[m4_ifval([$3], 8925 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8926 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8927 8928 8929# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8930# ----------------------------------------------------------------- 8931m4_define([lt_if_dict_fetch], 8932[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8933 [$5], 8934 [$6])]) 8935 8936 8937# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8938# -------------------------------------------------------------- 8939m4_define([lt_dict_filter], 8940[m4_if([$5], [], [], 8941 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8942 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8943 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8944]) 8945 8946# ltversion.m4 -- version numbers -*- Autoconf -*- 8947# 8948# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8949# Written by Scott James Remnant, 2004 8950# 8951# This file is free software; the Free Software Foundation gives 8952# unlimited permission to copy and/or distribute it, with or without 8953# modifications, as long as this notice is preserved. 8954 8955# @configure_input@ 8956 8957# serial 4179 ltversion.m4 8958# This file is part of GNU Libtool 8959 8960m4_define([LT_PACKAGE_VERSION], [2.4.6]) 8961m4_define([LT_PACKAGE_REVISION], [2.4.6]) 8962 8963AC_DEFUN([LTVERSION_VERSION], 8964[macro_version='2.4.6' 8965macro_revision='2.4.6' 8966_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8967_LT_DECL(, macro_revision, 0) 8968]) 8969 8970# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8971# 8972# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8973# Foundation, Inc. 8974# Written by Scott James Remnant, 2004. 8975# 8976# This file is free software; the Free Software Foundation gives 8977# unlimited permission to copy and/or distribute it, with or without 8978# modifications, as long as this notice is preserved. 8979 8980# serial 5 lt~obsolete.m4 8981 8982# These exist entirely to fool aclocal when bootstrapping libtool. 8983# 8984# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8985# which have later been changed to m4_define as they aren't part of the 8986# exported API, or moved to Autoconf or Automake where they belong. 8987# 8988# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8989# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8990# using a macro with the same name in our local m4/libtool.m4 it'll 8991# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8992# and doesn't know about Autoconf macros at all.) 8993# 8994# So we provide this file, which has a silly filename so it's always 8995# included after everything else. This provides aclocal with the 8996# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8997# because those macros already exist, or will be overwritten later. 8998# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8999# 9000# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9001# Yes, that means every name once taken will need to remain here until 9002# we give up compatibility with versions before 1.7, at which point 9003# we need to keep only those names which we still refer to. 9004 9005# This is to help aclocal find these macros, as it can't see m4_define. 9006AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9007 9008m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9009m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9010m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9011m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9012m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9013m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9014m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9015m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9016m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9017m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9018m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9019m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9020m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9021m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9022m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9023m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9024m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9025m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9026m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9027m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9028m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9029m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9030m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9031m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9032m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9033m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9034m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9035m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9036m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9037m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9038m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9039m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9040m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9041m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9042m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9043m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9044m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9045m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9046m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9047m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9048m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9049m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9050m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9051m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9052m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9053m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9054m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9055m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9056m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9057m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9058m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9059m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9060m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9061m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9062m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9063m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9064m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9065m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9066m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9067m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9068m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9069 9070# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9071# serial 11 (pkg-config-0.29.1) 9072 9073dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9074dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9075dnl 9076dnl This program is free software; you can redistribute it and/or modify 9077dnl it under the terms of the GNU General Public License as published by 9078dnl the Free Software Foundation; either version 2 of the License, or 9079dnl (at your option) any later version. 9080dnl 9081dnl This program is distributed in the hope that it will be useful, but 9082dnl WITHOUT ANY WARRANTY; without even the implied warranty of 9083dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9084dnl General Public License for more details. 9085dnl 9086dnl You should have received a copy of the GNU General Public License 9087dnl along with this program; if not, write to the Free Software 9088dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9089dnl 02111-1307, USA. 9090dnl 9091dnl As a special exception to the GNU General Public License, if you 9092dnl distribute this file as part of a program that contains a 9093dnl configuration script generated by Autoconf, you may include it under 9094dnl the same distribution terms that you use for the rest of that 9095dnl program. 9096 9097dnl PKG_PREREQ(MIN-VERSION) 9098dnl ----------------------- 9099dnl Since: 0.29 9100dnl 9101dnl Verify that the version of the pkg-config macros are at least 9102dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9103dnl installed version of pkg-config, this checks the developer's version 9104dnl of pkg.m4 when generating configure. 9105dnl 9106dnl To ensure that this macro is defined, also add: 9107dnl m4_ifndef([PKG_PREREQ], 9108dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9109dnl 9110dnl See the "Since" comment for each macro you use to see what version 9111dnl of the macros you require. 9112m4_defun([PKG_PREREQ], 9113[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9114m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9115 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9116])dnl PKG_PREREQ 9117 9118dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9119dnl ---------------------------------- 9120dnl Since: 0.16 9121dnl 9122dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9123dnl first found in the path. Checks that the version of pkg-config found 9124dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9125dnl used since that's the first version where most current features of 9126dnl pkg-config existed. 9127AC_DEFUN([PKG_PROG_PKG_CONFIG], 9128[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9129m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9130m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9131AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9132AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9133AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9134 9135if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9136 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9137fi 9138if test -n "$PKG_CONFIG"; then 9139 _pkg_min_version=m4_default([$1], [0.9.0]) 9140 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9141 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9142 AC_MSG_RESULT([yes]) 9143 else 9144 AC_MSG_RESULT([no]) 9145 PKG_CONFIG="" 9146 fi 9147fi[]dnl 9148])dnl PKG_PROG_PKG_CONFIG 9149 9150dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9151dnl ------------------------------------------------------------------- 9152dnl Since: 0.18 9153dnl 9154dnl Check to see whether a particular set of modules exists. Similar to 9155dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9156dnl 9157dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9158dnl only at the first occurence in configure.ac, so if the first place 9159dnl it's called might be skipped (such as if it is within an "if", you 9160dnl have to call PKG_CHECK_EXISTS manually 9161AC_DEFUN([PKG_CHECK_EXISTS], 9162[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9163if test -n "$PKG_CONFIG" && \ 9164 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9165 m4_default([$2], [:]) 9166m4_ifvaln([$3], [else 9167 $3])dnl 9168fi]) 9169 9170dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9171dnl --------------------------------------------- 9172dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9173dnl pkg_failed based on the result. 9174m4_define([_PKG_CONFIG], 9175[if test -n "$$1"; then 9176 pkg_cv_[]$1="$$1" 9177 elif test -n "$PKG_CONFIG"; then 9178 PKG_CHECK_EXISTS([$3], 9179 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9180 test "x$?" != "x0" && pkg_failed=yes ], 9181 [pkg_failed=yes]) 9182 else 9183 pkg_failed=untried 9184fi[]dnl 9185])dnl _PKG_CONFIG 9186 9187dnl _PKG_SHORT_ERRORS_SUPPORTED 9188dnl --------------------------- 9189dnl Internal check to see if pkg-config supports short errors. 9190AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9191[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9192if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9193 _pkg_short_errors_supported=yes 9194else 9195 _pkg_short_errors_supported=no 9196fi[]dnl 9197])dnl _PKG_SHORT_ERRORS_SUPPORTED 9198 9199 9200dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9201dnl [ACTION-IF-NOT-FOUND]) 9202dnl -------------------------------------------------------------- 9203dnl Since: 0.4.0 9204dnl 9205dnl Note that if there is a possibility the first call to 9206dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9207dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9208AC_DEFUN([PKG_CHECK_MODULES], 9209[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9210AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9211AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9212 9213pkg_failed=no 9214AC_MSG_CHECKING([for $1]) 9215 9216_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9217_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9218 9219m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9220and $1[]_LIBS to avoid the need to call pkg-config. 9221See the pkg-config man page for more details.]) 9222 9223if test $pkg_failed = yes; then 9224 AC_MSG_RESULT([no]) 9225 _PKG_SHORT_ERRORS_SUPPORTED 9226 if test $_pkg_short_errors_supported = yes; then 9227 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9228 else 9229 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9230 fi 9231 # Put the nasty error message in config.log where it belongs 9232 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9233 9234 m4_default([$4], [AC_MSG_ERROR( 9235[Package requirements ($2) were not met: 9236 9237$$1_PKG_ERRORS 9238 9239Consider adjusting the PKG_CONFIG_PATH environment variable if you 9240installed software in a non-standard prefix. 9241 9242_PKG_TEXT])[]dnl 9243 ]) 9244elif test $pkg_failed = untried; then 9245 AC_MSG_RESULT([no]) 9246 m4_default([$4], [AC_MSG_FAILURE( 9247[The pkg-config script could not be found or is too old. Make sure it 9248is in your PATH or set the PKG_CONFIG environment variable to the full 9249path to pkg-config. 9250 9251_PKG_TEXT 9252 9253To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9254 ]) 9255else 9256 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9257 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9258 AC_MSG_RESULT([yes]) 9259 $3 9260fi[]dnl 9261])dnl PKG_CHECK_MODULES 9262 9263 9264dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9265dnl [ACTION-IF-NOT-FOUND]) 9266dnl --------------------------------------------------------------------- 9267dnl Since: 0.29 9268dnl 9269dnl Checks for existence of MODULES and gathers its build flags with 9270dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9271dnl and VARIABLE-PREFIX_LIBS from --libs. 9272dnl 9273dnl Note that if there is a possibility the first call to 9274dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9275dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9276dnl configure.ac. 9277AC_DEFUN([PKG_CHECK_MODULES_STATIC], 9278[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9279_save_PKG_CONFIG=$PKG_CONFIG 9280PKG_CONFIG="$PKG_CONFIG --static" 9281PKG_CHECK_MODULES($@) 9282PKG_CONFIG=$_save_PKG_CONFIG[]dnl 9283])dnl PKG_CHECK_MODULES_STATIC 9284 9285 9286dnl PKG_INSTALLDIR([DIRECTORY]) 9287dnl ------------------------- 9288dnl Since: 0.27 9289dnl 9290dnl Substitutes the variable pkgconfigdir as the location where a module 9291dnl should install pkg-config .pc files. By default the directory is 9292dnl $libdir/pkgconfig, but the default can be changed by passing 9293dnl DIRECTORY. The user can override through the --with-pkgconfigdir 9294dnl parameter. 9295AC_DEFUN([PKG_INSTALLDIR], 9296[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9297m4_pushdef([pkg_description], 9298 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9299AC_ARG_WITH([pkgconfigdir], 9300 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9301 [with_pkgconfigdir=]pkg_default) 9302AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9303m4_popdef([pkg_default]) 9304m4_popdef([pkg_description]) 9305])dnl PKG_INSTALLDIR 9306 9307 9308dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9309dnl -------------------------------- 9310dnl Since: 0.27 9311dnl 9312dnl Substitutes the variable noarch_pkgconfigdir as the location where a 9313dnl module should install arch-independent pkg-config .pc files. By 9314dnl default the directory is $datadir/pkgconfig, but the default can be 9315dnl changed by passing DIRECTORY. The user can override through the 9316dnl --with-noarch-pkgconfigdir parameter. 9317AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9318[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9319m4_pushdef([pkg_description], 9320 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9321AC_ARG_WITH([noarch-pkgconfigdir], 9322 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9323 [with_noarch_pkgconfigdir=]pkg_default) 9324AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9325m4_popdef([pkg_default]) 9326m4_popdef([pkg_description]) 9327])dnl PKG_NOARCH_INSTALLDIR 9328 9329 9330dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9331dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9332dnl ------------------------------------------- 9333dnl Since: 0.28 9334dnl 9335dnl Retrieves the value of the pkg-config variable for the given module. 9336AC_DEFUN([PKG_CHECK_VAR], 9337[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9338AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9339 9340_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9341AS_VAR_COPY([$1], [pkg_cv_][$1]) 9342 9343AS_VAR_IF([$1], [""], [$5], [$4])dnl 9344])dnl PKG_CHECK_VAR 9345 9346dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9347dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9348dnl [DESCRIPTION], [DEFAULT]) 9349dnl ------------------------------------------ 9350dnl 9351dnl Prepare a "--with-" configure option using the lowercase 9352dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9353dnl PKG_CHECK_MODULES in a single macro. 9354AC_DEFUN([PKG_WITH_MODULES], 9355[ 9356m4_pushdef([with_arg], m4_tolower([$1])) 9357 9358m4_pushdef([description], 9359 [m4_default([$5], [build with ]with_arg[ support])]) 9360 9361m4_pushdef([def_arg], [m4_default([$6], [auto])]) 9362m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9363m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9364 9365m4_case(def_arg, 9366 [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9367 [m4_pushdef([with_without],[--with-]with_arg)]) 9368 9369AC_ARG_WITH(with_arg, 9370 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9371 [AS_TR_SH([with_]with_arg)=def_arg]) 9372 9373AS_CASE([$AS_TR_SH([with_]with_arg)], 9374 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9375 [auto],[PKG_CHECK_MODULES([$1],[$2], 9376 [m4_n([def_action_if_found]) $3], 9377 [m4_n([def_action_if_not_found]) $4])]) 9378 9379m4_popdef([with_arg]) 9380m4_popdef([description]) 9381m4_popdef([def_arg]) 9382 9383])dnl PKG_WITH_MODULES 9384 9385dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9386dnl [DESCRIPTION], [DEFAULT]) 9387dnl ----------------------------------------------- 9388dnl 9389dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9390dnl check._[VARIABLE-PREFIX] is exported as make variable. 9391AC_DEFUN([PKG_HAVE_WITH_MODULES], 9392[ 9393PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9394 9395AM_CONDITIONAL([HAVE_][$1], 9396 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9397])dnl PKG_HAVE_WITH_MODULES 9398 9399dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9400dnl [DESCRIPTION], [DEFAULT]) 9401dnl ------------------------------------------------------ 9402dnl 9403dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9404dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9405dnl and preprocessor variable. 9406AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9407[ 9408PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9409 9410AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9411 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9412])dnl PKG_HAVE_DEFINE_WITH_MODULES 9413 9414dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9415dnl 9416dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9417dnl 9418dnl Permission is hereby granted, free of charge, to any person obtaining a 9419dnl copy of this software and associated documentation files (the "Software"), 9420dnl to deal in the Software without restriction, including without limitation 9421dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9422dnl and/or sell copies of the Software, and to permit persons to whom the 9423dnl Software is furnished to do so, subject to the following conditions: 9424dnl 9425dnl The above copyright notice and this permission notice (including the next 9426dnl paragraph) shall be included in all copies or substantial portions of the 9427dnl Software. 9428dnl 9429dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9430dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9431dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9432dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9433dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9434dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9435dnl DEALINGS IN THE SOFTWARE. 9436 9437# XORG_MACROS_VERSION(required-version) 9438# ------------------------------------- 9439# Minimum version: 1.1.0 9440# 9441# If you're using a macro added in Version 1.1 or newer, include this in 9442# your configure.ac with the minimum required version, such as: 9443# XORG_MACROS_VERSION(1.1) 9444# 9445# To ensure that this macro is defined, also add: 9446# m4_ifndef([XORG_MACROS_VERSION], 9447# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9448# 9449# 9450# See the "minimum version" comment for each macro you use to see what 9451# version you require. 9452m4_defun([XORG_MACROS_VERSION],[ 9453m4_define([vers_have], [1.19.3]) 9454m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9455m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9456m4_if(m4_cmp(maj_have, maj_needed), 0,, 9457 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9458m4_if(m4_version_compare(vers_have, [$1]), -1, 9459 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9460m4_undefine([vers_have]) 9461m4_undefine([maj_have]) 9462m4_undefine([maj_needed]) 9463]) # XORG_MACROS_VERSION 9464 9465# XORG_PROG_RAWCPP() 9466# ------------------ 9467# Minimum version: 1.0.0 9468# 9469# Find cpp program and necessary flags for use in pre-processing text files 9470# such as man pages and config files 9471AC_DEFUN([XORG_PROG_RAWCPP],[ 9472AC_REQUIRE([AC_PROG_CPP]) 9473AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 9474 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9475 9476# Check for flag to avoid builtin definitions - assumes unix is predefined, 9477# which is not the best choice for supporting other OS'es, but covers most 9478# of the ones we need for now. 9479AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9480AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9481if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9482 AC_MSG_RESULT([no]) 9483else 9484 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9485 RAWCPPFLAGS=-undef 9486 AC_MSG_RESULT([yes]) 9487 # under Cygwin unix is still defined even with -undef 9488 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9489 RAWCPPFLAGS="-undef -ansi" 9490 AC_MSG_RESULT([yes, with -ansi]) 9491 else 9492 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9493 fi 9494fi 9495rm -f conftest.$ac_ext 9496 9497AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9498AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9499if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9500 AC_MSG_RESULT([no]) 9501else 9502 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9503 TRADITIONALCPPFLAGS="-traditional" 9504 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9505 AC_MSG_RESULT([yes]) 9506 else 9507 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9508 fi 9509fi 9510rm -f conftest.$ac_ext 9511AC_SUBST(RAWCPPFLAGS) 9512AC_SUBST(TRADITIONALCPPFLAGS) 9513]) # XORG_PROG_RAWCPP 9514 9515# XORG_MANPAGE_SECTIONS() 9516# ----------------------- 9517# Minimum version: 1.0.0 9518# 9519# Determine which sections man pages go in for the different man page types 9520# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9521# Not sure if there's any better way than just hardcoding by OS name. 9522# Override default settings by setting environment variables 9523# Added MAN_SUBSTS in version 1.8 9524# Added AC_PROG_SED in version 1.8 9525 9526AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9527AC_REQUIRE([AC_CANONICAL_HOST]) 9528AC_REQUIRE([AC_PROG_SED]) 9529 9530case $host_os in 9531 solaris*) 9532 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 9533 # check for a man page file found in later versions that use 9534 # traditional section numbers instead 9535 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 9536 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 9537 ;; 9538 *) SYSV_MAN_SECTIONS=false ;; 9539esac 9540 9541if test x$APP_MAN_SUFFIX = x ; then 9542 APP_MAN_SUFFIX=1 9543fi 9544if test x$APP_MAN_DIR = x ; then 9545 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9546fi 9547 9548if test x$LIB_MAN_SUFFIX = x ; then 9549 LIB_MAN_SUFFIX=3 9550fi 9551if test x$LIB_MAN_DIR = x ; then 9552 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9553fi 9554 9555if test x$FILE_MAN_SUFFIX = x ; then 9556 case $SYSV_MAN_SECTIONS in 9557 true) FILE_MAN_SUFFIX=4 ;; 9558 *) FILE_MAN_SUFFIX=5 ;; 9559 esac 9560fi 9561if test x$FILE_MAN_DIR = x ; then 9562 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9563fi 9564 9565if test x$MISC_MAN_SUFFIX = x ; then 9566 case $SYSV_MAN_SECTIONS in 9567 true) MISC_MAN_SUFFIX=5 ;; 9568 *) MISC_MAN_SUFFIX=7 ;; 9569 esac 9570fi 9571if test x$MISC_MAN_DIR = x ; then 9572 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9573fi 9574 9575if test x$DRIVER_MAN_SUFFIX = x ; then 9576 case $SYSV_MAN_SECTIONS in 9577 true) DRIVER_MAN_SUFFIX=7 ;; 9578 *) DRIVER_MAN_SUFFIX=4 ;; 9579 esac 9580fi 9581if test x$DRIVER_MAN_DIR = x ; then 9582 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9583fi 9584 9585if test x$ADMIN_MAN_SUFFIX = x ; then 9586 case $SYSV_MAN_SECTIONS in 9587 true) ADMIN_MAN_SUFFIX=1m ;; 9588 *) ADMIN_MAN_SUFFIX=8 ;; 9589 esac 9590fi 9591if test x$ADMIN_MAN_DIR = x ; then 9592 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9593fi 9594 9595 9596AC_SUBST([APP_MAN_SUFFIX]) 9597AC_SUBST([LIB_MAN_SUFFIX]) 9598AC_SUBST([FILE_MAN_SUFFIX]) 9599AC_SUBST([MISC_MAN_SUFFIX]) 9600AC_SUBST([DRIVER_MAN_SUFFIX]) 9601AC_SUBST([ADMIN_MAN_SUFFIX]) 9602AC_SUBST([APP_MAN_DIR]) 9603AC_SUBST([LIB_MAN_DIR]) 9604AC_SUBST([FILE_MAN_DIR]) 9605AC_SUBST([MISC_MAN_DIR]) 9606AC_SUBST([DRIVER_MAN_DIR]) 9607AC_SUBST([ADMIN_MAN_DIR]) 9608 9609XORG_MAN_PAGE="X Version 11" 9610AC_SUBST([XORG_MAN_PAGE]) 9611MAN_SUBSTS="\ 9612 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9613 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9614 -e 's|__xservername__|Xorg|g' \ 9615 -e 's|__xconfigfile__|xorg.conf|g' \ 9616 -e 's|__projectroot__|\$(prefix)|g' \ 9617 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9618 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9619 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9620 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9621 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9622 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9623 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9624AC_SUBST([MAN_SUBSTS]) 9625 9626]) # XORG_MANPAGE_SECTIONS 9627 9628# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9629# ------------------------ 9630# Minimum version: 1.7.0 9631# 9632# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9633# provided by xorg-sgml-doctools, if installed. 9634AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9635AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9636XORG_SGML_PATH= 9637PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9638 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9639 [m4_ifval([$1],[:], 9640 [if test x"$cross_compiling" != x"yes" ; then 9641 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9642 [XORG_SGML_PATH=$prefix/share/sgml]) 9643 fi]) 9644 ]) 9645 9646# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9647# the path and the name of the doc stylesheet 9648if test "x$XORG_SGML_PATH" != "x" ; then 9649 AC_MSG_RESULT([$XORG_SGML_PATH]) 9650 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9651 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9652else 9653 AC_MSG_RESULT([no]) 9654fi 9655 9656AC_SUBST(XORG_SGML_PATH) 9657AC_SUBST(STYLESHEET_SRCDIR) 9658AC_SUBST(XSL_STYLESHEET) 9659AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9660]) # XORG_CHECK_SGML_DOCTOOLS 9661 9662# XORG_CHECK_LINUXDOC 9663# ------------------- 9664# Minimum version: 1.0.0 9665# 9666# Defines the variable MAKE_TEXT if the necessary tools and 9667# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9668# Whether or not the necessary tools and files are found can be checked 9669# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9670AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9671AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9672AC_REQUIRE([XORG_WITH_PS2PDF]) 9673 9674AC_PATH_PROG(LINUXDOC, linuxdoc) 9675 9676AC_MSG_CHECKING([whether to build documentation]) 9677 9678if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9679 BUILDDOC=yes 9680else 9681 BUILDDOC=no 9682fi 9683 9684AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9685 9686AC_MSG_RESULT([$BUILDDOC]) 9687 9688AC_MSG_CHECKING([whether to build pdf documentation]) 9689 9690if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9691 BUILDPDFDOC=yes 9692else 9693 BUILDPDFDOC=no 9694fi 9695 9696AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9697 9698AC_MSG_RESULT([$BUILDPDFDOC]) 9699 9700MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9701MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9702MAKE_PDF="$PS2PDF" 9703MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9704 9705AC_SUBST(MAKE_TEXT) 9706AC_SUBST(MAKE_PS) 9707AC_SUBST(MAKE_PDF) 9708AC_SUBST(MAKE_HTML) 9709]) # XORG_CHECK_LINUXDOC 9710 9711# XORG_CHECK_DOCBOOK 9712# ------------------- 9713# Minimum version: 1.0.0 9714# 9715# Checks for the ability to build output formats from SGML DocBook source. 9716# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9717# indicates whether the necessary tools and files are found and, if set, 9718# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9719AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9720AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9721 9722BUILDTXTDOC=no 9723BUILDPDFDOC=no 9724BUILDPSDOC=no 9725BUILDHTMLDOC=no 9726 9727AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9728AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9729AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9730AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9731 9732AC_MSG_CHECKING([whether to build text documentation]) 9733if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9734 test x$BUILD_TXTDOC != xno; then 9735 BUILDTXTDOC=yes 9736fi 9737AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9738AC_MSG_RESULT([$BUILDTXTDOC]) 9739 9740AC_MSG_CHECKING([whether to build PDF documentation]) 9741if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9742 test x$BUILD_PDFDOC != xno; then 9743 BUILDPDFDOC=yes 9744fi 9745AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9746AC_MSG_RESULT([$BUILDPDFDOC]) 9747 9748AC_MSG_CHECKING([whether to build PostScript documentation]) 9749if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9750 test x$BUILD_PSDOC != xno; then 9751 BUILDPSDOC=yes 9752fi 9753AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9754AC_MSG_RESULT([$BUILDPSDOC]) 9755 9756AC_MSG_CHECKING([whether to build HTML documentation]) 9757if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9758 test x$BUILD_HTMLDOC != xno; then 9759 BUILDHTMLDOC=yes 9760fi 9761AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9762AC_MSG_RESULT([$BUILDHTMLDOC]) 9763 9764MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9765MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9766MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9767MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9768 9769AC_SUBST(MAKE_TEXT) 9770AC_SUBST(MAKE_PS) 9771AC_SUBST(MAKE_PDF) 9772AC_SUBST(MAKE_HTML) 9773]) # XORG_CHECK_DOCBOOK 9774 9775# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9776# ---------------- 9777# Minimum version: 1.5.0 9778# Minimum version for optional DEFAULT argument: 1.11.0 9779# 9780# Documentation tools are not always available on all platforms and sometimes 9781# not at the appropriate level. This macro enables a module to test for the 9782# presence of the tool and obtain it's path in separate variables. Coupled with 9783# the --with-xmlto option, it allows maximum flexibilty in making decisions 9784# as whether or not to use the xmlto package. When DEFAULT is not specified, 9785# --with-xmlto assumes 'auto'. 9786# 9787# Interface to module: 9788# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9789# XMLTO: returns the path of the xmlto program found 9790# returns the path set by the user in the environment 9791# --with-xmlto: 'yes' user instructs the module to use xmlto 9792# 'no' user instructs the module not to use xmlto 9793# 9794# Added in version 1.10.0 9795# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9796# xmlto for text output requires either lynx, links, or w3m browsers 9797# 9798# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9799# 9800AC_DEFUN([XORG_WITH_XMLTO],[ 9801AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9802m4_define([_defopt], m4_default([$2], [auto])) 9803AC_ARG_WITH(xmlto, 9804 AS_HELP_STRING([--with-xmlto], 9805 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9806 [use_xmlto=$withval], [use_xmlto=]_defopt) 9807m4_undefine([_defopt]) 9808 9809if test "x$use_xmlto" = x"auto"; then 9810 AC_PATH_PROG([XMLTO], [xmlto]) 9811 if test "x$XMLTO" = "x"; then 9812 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9813 have_xmlto=no 9814 else 9815 have_xmlto=yes 9816 fi 9817elif test "x$use_xmlto" = x"yes" ; then 9818 AC_PATH_PROG([XMLTO], [xmlto]) 9819 if test "x$XMLTO" = "x"; then 9820 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9821 fi 9822 have_xmlto=yes 9823elif test "x$use_xmlto" = x"no" ; then 9824 if test "x$XMLTO" != "x"; then 9825 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9826 fi 9827 have_xmlto=no 9828else 9829 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9830fi 9831 9832# Test for a minimum version of xmlto, if provided. 9833m4_ifval([$1], 9834[if test "$have_xmlto" = yes; then 9835 # scrape the xmlto version 9836 AC_MSG_CHECKING([the xmlto version]) 9837 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9838 AC_MSG_RESULT([$xmlto_version]) 9839 AS_VERSION_COMPARE([$xmlto_version], [$1], 9840 [if test "x$use_xmlto" = xauto; then 9841 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9842 have_xmlto=no 9843 else 9844 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9845 fi]) 9846fi]) 9847 9848# Test for the ability of xmlto to generate a text target 9849# 9850# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9851# following test for empty XML docbook files. 9852# For compatibility reasons use the following empty XML docbook file and if 9853# it fails try it again with a non-empty XML file. 9854have_xmlto_text=no 9855cat > conftest.xml << "EOF" 9856EOF 9857AS_IF([test "$have_xmlto" = yes], 9858 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9859 [have_xmlto_text=yes], 9860 [# Try it again with a non-empty XML file. 9861 cat > conftest.xml << "EOF" 9862<x></x> 9863EOF 9864 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9865 [have_xmlto_text=yes], 9866 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 9867rm -f conftest.xml 9868AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9869AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9870]) # XORG_WITH_XMLTO 9871 9872# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9873# -------------------------------------------- 9874# Minimum version: 1.12.0 9875# Minimum version for optional DEFAULT argument: 1.12.0 9876# 9877# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9878# XML-based language used for the transformation of XML documents. 9879# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9880# It is used under the cover by xmlto to generate html files from DocBook/XML. 9881# The XSLT processor is often used as a standalone tool for transformations. 9882# It should not be assumed that this tool is used only to work with documnetation. 9883# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9884# 9885# Interface to module: 9886# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9887# XSLTPROC: returns the path of the xsltproc program found 9888# returns the path set by the user in the environment 9889# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9890# 'no' user instructs the module not to use xsltproc 9891# have_xsltproc: returns yes if xsltproc found in PATH or no 9892# 9893# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9894# 9895AC_DEFUN([XORG_WITH_XSLTPROC],[ 9896AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9897# Preserves the interface, should it be implemented later 9898m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9899m4_define([_defopt], m4_default([$2], [auto])) 9900AC_ARG_WITH(xsltproc, 9901 AS_HELP_STRING([--with-xsltproc], 9902 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9903 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9904m4_undefine([_defopt]) 9905 9906if test "x$use_xsltproc" = x"auto"; then 9907 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9908 if test "x$XSLTPROC" = "x"; then 9909 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9910 have_xsltproc=no 9911 else 9912 have_xsltproc=yes 9913 fi 9914elif test "x$use_xsltproc" = x"yes" ; then 9915 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9916 if test "x$XSLTPROC" = "x"; then 9917 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9918 fi 9919 have_xsltproc=yes 9920elif test "x$use_xsltproc" = x"no" ; then 9921 if test "x$XSLTPROC" != "x"; then 9922 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9923 fi 9924 have_xsltproc=no 9925else 9926 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9927fi 9928 9929AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9930]) # XORG_WITH_XSLTPROC 9931 9932# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9933# ---------------------------------------- 9934# Minimum version: 1.15.0 9935# 9936# PERL (Practical Extraction and Report Language) is a language optimized for 9937# scanning arbitrary text files, extracting information from those text files, 9938# and printing reports based on that information. 9939# 9940# When DEFAULT is not specified, --with-perl assumes 'auto'. 9941# 9942# Interface to module: 9943# HAVE_PERL: used in makefiles to conditionally scan text files 9944# PERL: returns the path of the perl program found 9945# returns the path set by the user in the environment 9946# --with-perl: 'yes' user instructs the module to use perl 9947# 'no' user instructs the module not to use perl 9948# have_perl: returns yes if perl found in PATH or no 9949# 9950# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9951# 9952AC_DEFUN([XORG_WITH_PERL],[ 9953AC_ARG_VAR([PERL], [Path to perl command]) 9954# Preserves the interface, should it be implemented later 9955m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9956m4_define([_defopt], m4_default([$2], [auto])) 9957AC_ARG_WITH(perl, 9958 AS_HELP_STRING([--with-perl], 9959 [Use perl for extracting information from files (default: ]_defopt[)]), 9960 [use_perl=$withval], [use_perl=]_defopt) 9961m4_undefine([_defopt]) 9962 9963if test "x$use_perl" = x"auto"; then 9964 AC_PATH_PROG([PERL], [perl]) 9965 if test "x$PERL" = "x"; then 9966 AC_MSG_WARN([perl not found - cannot extract information and report]) 9967 have_perl=no 9968 else 9969 have_perl=yes 9970 fi 9971elif test "x$use_perl" = x"yes" ; then 9972 AC_PATH_PROG([PERL], [perl]) 9973 if test "x$PERL" = "x"; then 9974 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9975 fi 9976 have_perl=yes 9977elif test "x$use_perl" = x"no" ; then 9978 if test "x$PERL" != "x"; then 9979 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9980 fi 9981 have_perl=no 9982else 9983 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9984fi 9985 9986AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9987]) # XORG_WITH_PERL 9988 9989# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9990# ---------------- 9991# Minimum version: 1.5.0 9992# Minimum version for optional DEFAULT argument: 1.11.0 9993# 9994# Documentation tools are not always available on all platforms and sometimes 9995# not at the appropriate level. This macro enables a module to test for the 9996# presence of the tool and obtain it's path in separate variables. Coupled with 9997# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9998# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9999# --with-asciidoc assumes 'auto'. 10000# 10001# Interface to module: 10002# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10003# ASCIIDOC: returns the path of the asciidoc program found 10004# returns the path set by the user in the environment 10005# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10006# 'no' user instructs the module not to use asciidoc 10007# 10008# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10009# 10010AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10011AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10012m4_define([_defopt], m4_default([$2], [auto])) 10013AC_ARG_WITH(asciidoc, 10014 AS_HELP_STRING([--with-asciidoc], 10015 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10016 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10017m4_undefine([_defopt]) 10018 10019if test "x$use_asciidoc" = x"auto"; then 10020 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10021 if test "x$ASCIIDOC" = "x"; then 10022 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10023 have_asciidoc=no 10024 else 10025 have_asciidoc=yes 10026 fi 10027elif test "x$use_asciidoc" = x"yes" ; then 10028 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10029 if test "x$ASCIIDOC" = "x"; then 10030 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10031 fi 10032 have_asciidoc=yes 10033elif test "x$use_asciidoc" = x"no" ; then 10034 if test "x$ASCIIDOC" != "x"; then 10035 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10036 fi 10037 have_asciidoc=no 10038else 10039 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10040fi 10041m4_ifval([$1], 10042[if test "$have_asciidoc" = yes; then 10043 # scrape the asciidoc version 10044 AC_MSG_CHECKING([the asciidoc version]) 10045 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10046 AC_MSG_RESULT([$asciidoc_version]) 10047 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10048 [if test "x$use_asciidoc" = xauto; then 10049 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10050 have_asciidoc=no 10051 else 10052 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10053 fi]) 10054fi]) 10055AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10056]) # XORG_WITH_ASCIIDOC 10057 10058# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10059# ------------------------------------------- 10060# Minimum version: 1.5.0 10061# Minimum version for optional DEFAULT argument: 1.11.0 10062# Minimum version for optional DOT checking: 1.18.0 10063# 10064# Documentation tools are not always available on all platforms and sometimes 10065# not at the appropriate level. This macro enables a module to test for the 10066# presence of the tool and obtain it's path in separate variables. Coupled with 10067# the --with-doxygen option, it allows maximum flexibilty in making decisions 10068# as whether or not to use the doxygen package. When DEFAULT is not specified, 10069# --with-doxygen assumes 'auto'. 10070# 10071# Interface to module: 10072# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10073# DOXYGEN: returns the path of the doxygen program found 10074# returns the path set by the user in the environment 10075# --with-doxygen: 'yes' user instructs the module to use doxygen 10076# 'no' user instructs the module not to use doxygen 10077# 10078# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10079# 10080AC_DEFUN([XORG_WITH_DOXYGEN],[ 10081AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10082AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10083m4_define([_defopt], m4_default([$2], [auto])) 10084AC_ARG_WITH(doxygen, 10085 AS_HELP_STRING([--with-doxygen], 10086 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10087 [use_doxygen=$withval], [use_doxygen=]_defopt) 10088m4_undefine([_defopt]) 10089 10090if test "x$use_doxygen" = x"auto"; then 10091 AC_PATH_PROG([DOXYGEN], [doxygen]) 10092 if test "x$DOXYGEN" = "x"; then 10093 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10094 have_doxygen=no 10095 else 10096 have_doxygen=yes 10097 fi 10098elif test "x$use_doxygen" = x"yes" ; then 10099 AC_PATH_PROG([DOXYGEN], [doxygen]) 10100 if test "x$DOXYGEN" = "x"; then 10101 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10102 fi 10103 have_doxygen=yes 10104elif test "x$use_doxygen" = x"no" ; then 10105 if test "x$DOXYGEN" != "x"; then 10106 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10107 fi 10108 have_doxygen=no 10109else 10110 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10111fi 10112m4_ifval([$1], 10113[if test "$have_doxygen" = yes; then 10114 # scrape the doxygen version 10115 AC_MSG_CHECKING([the doxygen version]) 10116 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10117 AC_MSG_RESULT([$doxygen_version]) 10118 AS_VERSION_COMPARE([$doxygen_version], [$1], 10119 [if test "x$use_doxygen" = xauto; then 10120 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10121 have_doxygen=no 10122 else 10123 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10124 fi]) 10125fi]) 10126 10127dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10128dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10129dnl HAVE_DOT = @HAVE_DOT@ 10130HAVE_DOT=no 10131if test "x$have_doxygen" = "xyes"; then 10132 AC_PATH_PROG([DOT], [dot]) 10133 if test "x$DOT" != "x"; then 10134 HAVE_DOT=yes 10135 fi 10136fi 10137 10138AC_SUBST([HAVE_DOT]) 10139AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10140AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10141]) # XORG_WITH_DOXYGEN 10142 10143# XORG_WITH_GROFF([DEFAULT]) 10144# ---------------- 10145# Minimum version: 1.6.0 10146# Minimum version for optional DEFAULT argument: 1.11.0 10147# 10148# Documentation tools are not always available on all platforms and sometimes 10149# not at the appropriate level. This macro enables a module to test for the 10150# presence of the tool and obtain it's path in separate variables. Coupled with 10151# the --with-groff option, it allows maximum flexibilty in making decisions 10152# as whether or not to use the groff package. When DEFAULT is not specified, 10153# --with-groff assumes 'auto'. 10154# 10155# Interface to module: 10156# HAVE_GROFF: used in makefiles to conditionally generate documentation 10157# HAVE_GROFF_MM: the memorandum macros (-mm) package 10158# HAVE_GROFF_MS: the -ms macros package 10159# GROFF: returns the path of the groff program found 10160# returns the path set by the user in the environment 10161# --with-groff: 'yes' user instructs the module to use groff 10162# 'no' user instructs the module not to use groff 10163# 10164# Added in version 1.9.0: 10165# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10166# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10167# psselect from the psutils package. 10168# the ghostcript package. Refer to the grohtml man pages 10169# 10170# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10171# 10172# OS and distros often splits groff in a basic and full package, the former 10173# having the groff program and the later having devices, fonts and macros 10174# Checking for the groff executable is not enough. 10175# 10176# If macros are missing, we cannot assume that groff is useless, so we don't 10177# unset HAVE_GROFF or GROFF env variables. 10178# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10179# 10180AC_DEFUN([XORG_WITH_GROFF],[ 10181AC_ARG_VAR([GROFF], [Path to groff command]) 10182m4_define([_defopt], m4_default([$1], [auto])) 10183AC_ARG_WITH(groff, 10184 AS_HELP_STRING([--with-groff], 10185 [Use groff to regenerate documentation (default: ]_defopt[)]), 10186 [use_groff=$withval], [use_groff=]_defopt) 10187m4_undefine([_defopt]) 10188 10189if test "x$use_groff" = x"auto"; then 10190 AC_PATH_PROG([GROFF], [groff]) 10191 if test "x$GROFF" = "x"; then 10192 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10193 have_groff=no 10194 else 10195 have_groff=yes 10196 fi 10197elif test "x$use_groff" = x"yes" ; then 10198 AC_PATH_PROG([GROFF], [groff]) 10199 if test "x$GROFF" = "x"; then 10200 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10201 fi 10202 have_groff=yes 10203elif test "x$use_groff" = x"no" ; then 10204 if test "x$GROFF" != "x"; then 10205 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10206 fi 10207 have_groff=no 10208else 10209 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10210fi 10211 10212# We have groff, test for the presence of the macro packages 10213if test "x$have_groff" = x"yes"; then 10214 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10215 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10216 groff_ms_works=yes 10217 else 10218 groff_ms_works=no 10219 fi 10220 AC_MSG_RESULT([$groff_ms_works]) 10221 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10222 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10223 groff_mm_works=yes 10224 else 10225 groff_mm_works=no 10226 fi 10227 AC_MSG_RESULT([$groff_mm_works]) 10228fi 10229 10230# We have groff, test for HTML dependencies, one command per package 10231if test "x$have_groff" = x"yes"; then 10232 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10233 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10234 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10235 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10236 have_groff_html=yes 10237 else 10238 have_groff_html=no 10239 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10240 fi 10241fi 10242 10243# Set Automake conditionals for Makefiles 10244AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10245AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10246AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10247AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10248]) # XORG_WITH_GROFF 10249 10250# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10251# --------------------------------------- 10252# Minimum version: 1.6.0 10253# Minimum version for optional DEFAULT argument: 1.11.0 10254# Minimum version for optional MIN-VERSION argument: 1.15.0 10255# 10256# Documentation tools are not always available on all platforms and sometimes 10257# not at the appropriate level. This macro enables a module to test for the 10258# presence of the tool and obtain it's path in separate variables. Coupled with 10259# the --with-fop option, it allows maximum flexibilty in making decisions 10260# as whether or not to use the fop package. When DEFAULT is not specified, 10261# --with-fop assumes 'auto'. 10262# 10263# Interface to module: 10264# HAVE_FOP: used in makefiles to conditionally generate documentation 10265# FOP: returns the path of the fop program found 10266# returns the path set by the user in the environment 10267# --with-fop: 'yes' user instructs the module to use fop 10268# 'no' user instructs the module not to use fop 10269# 10270# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10271# 10272AC_DEFUN([XORG_WITH_FOP],[ 10273AC_ARG_VAR([FOP], [Path to fop command]) 10274m4_define([_defopt], m4_default([$2], [auto])) 10275AC_ARG_WITH(fop, 10276 AS_HELP_STRING([--with-fop], 10277 [Use fop to regenerate documentation (default: ]_defopt[)]), 10278 [use_fop=$withval], [use_fop=]_defopt) 10279m4_undefine([_defopt]) 10280 10281if test "x$use_fop" = x"auto"; then 10282 AC_PATH_PROG([FOP], [fop]) 10283 if test "x$FOP" = "x"; then 10284 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10285 have_fop=no 10286 else 10287 have_fop=yes 10288 fi 10289elif test "x$use_fop" = x"yes" ; then 10290 AC_PATH_PROG([FOP], [fop]) 10291 if test "x$FOP" = "x"; then 10292 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10293 fi 10294 have_fop=yes 10295elif test "x$use_fop" = x"no" ; then 10296 if test "x$FOP" != "x"; then 10297 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10298 fi 10299 have_fop=no 10300else 10301 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10302fi 10303 10304# Test for a minimum version of fop, if provided. 10305m4_ifval([$1], 10306[if test "$have_fop" = yes; then 10307 # scrape the fop version 10308 AC_MSG_CHECKING([for fop minimum version]) 10309 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10310 AC_MSG_RESULT([$fop_version]) 10311 AS_VERSION_COMPARE([$fop_version], [$1], 10312 [if test "x$use_fop" = xauto; then 10313 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10314 have_fop=no 10315 else 10316 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10317 fi]) 10318fi]) 10319AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10320]) # XORG_WITH_FOP 10321 10322# XORG_WITH_M4([MIN-VERSION]) 10323# --------------------------- 10324# Minimum version: 1.19.0 10325# 10326# This macro attempts to locate an m4 macro processor which supports 10327# -I option and is only useful for modules relying on M4 in order to 10328# expand macros in source code files. 10329# 10330# Interface to module: 10331# M4: returns the path of the m4 program found 10332# returns the path set by the user in the environment 10333# 10334AC_DEFUN([XORG_WITH_M4], [ 10335AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10336 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10337 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10338 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10339 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10340 [$PATH:/usr/gnu/bin])]) 10341 10342AC_SUBST([M4], [$ac_cv_path_M4]) 10343]) # XORG_WITH_M4 10344 10345# XORG_WITH_PS2PDF([DEFAULT]) 10346# ---------------- 10347# Minimum version: 1.6.0 10348# Minimum version for optional DEFAULT argument: 1.11.0 10349# 10350# Documentation tools are not always available on all platforms and sometimes 10351# not at the appropriate level. This macro enables a module to test for the 10352# presence of the tool and obtain it's path in separate variables. Coupled with 10353# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10354# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10355# --with-ps2pdf assumes 'auto'. 10356# 10357# Interface to module: 10358# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10359# PS2PDF: returns the path of the ps2pdf program found 10360# returns the path set by the user in the environment 10361# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10362# 'no' user instructs the module not to use ps2pdf 10363# 10364# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10365# 10366AC_DEFUN([XORG_WITH_PS2PDF],[ 10367AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10368m4_define([_defopt], m4_default([$1], [auto])) 10369AC_ARG_WITH(ps2pdf, 10370 AS_HELP_STRING([--with-ps2pdf], 10371 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10372 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10373m4_undefine([_defopt]) 10374 10375if test "x$use_ps2pdf" = x"auto"; then 10376 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10377 if test "x$PS2PDF" = "x"; then 10378 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10379 have_ps2pdf=no 10380 else 10381 have_ps2pdf=yes 10382 fi 10383elif test "x$use_ps2pdf" = x"yes" ; then 10384 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10385 if test "x$PS2PDF" = "x"; then 10386 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10387 fi 10388 have_ps2pdf=yes 10389elif test "x$use_ps2pdf" = x"no" ; then 10390 if test "x$PS2PDF" != "x"; then 10391 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10392 fi 10393 have_ps2pdf=no 10394else 10395 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10396fi 10397AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10398]) # XORG_WITH_PS2PDF 10399 10400# XORG_ENABLE_DOCS (enable_docs=yes) 10401# ---------------- 10402# Minimum version: 1.6.0 10403# 10404# Documentation tools are not always available on all platforms and sometimes 10405# not at the appropriate level. This macro enables a builder to skip all 10406# documentation targets except traditional man pages. 10407# Combined with the specific tool checking macros XORG_WITH_*, it provides 10408# maximum flexibilty in controlling documentation building. 10409# Refer to: 10410# XORG_WITH_XMLTO --with-xmlto 10411# XORG_WITH_ASCIIDOC --with-asciidoc 10412# XORG_WITH_DOXYGEN --with-doxygen 10413# XORG_WITH_FOP --with-fop 10414# XORG_WITH_GROFF --with-groff 10415# XORG_WITH_PS2PDF --with-ps2pdf 10416# 10417# Interface to module: 10418# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10419# --enable-docs: 'yes' user instructs the module to generate docs 10420# 'no' user instructs the module not to generate docs 10421# parm1: specify the default value, yes or no. 10422# 10423AC_DEFUN([XORG_ENABLE_DOCS],[ 10424m4_define([docs_default], m4_default([$1], [yes])) 10425AC_ARG_ENABLE(docs, 10426 AS_HELP_STRING([--enable-docs], 10427 [Enable building the documentation (default: ]docs_default[)]), 10428 [build_docs=$enableval], [build_docs=]docs_default) 10429m4_undefine([docs_default]) 10430AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10431AC_MSG_CHECKING([whether to build documentation]) 10432AC_MSG_RESULT([$build_docs]) 10433]) # XORG_ENABLE_DOCS 10434 10435# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10436# ---------------- 10437# Minimum version: 1.6.0 10438# 10439# This macro enables a builder to skip all developer documentation. 10440# Combined with the specific tool checking macros XORG_WITH_*, it provides 10441# maximum flexibilty in controlling documentation building. 10442# Refer to: 10443# XORG_WITH_XMLTO --with-xmlto 10444# XORG_WITH_ASCIIDOC --with-asciidoc 10445# XORG_WITH_DOXYGEN --with-doxygen 10446# XORG_WITH_FOP --with-fop 10447# XORG_WITH_GROFF --with-groff 10448# XORG_WITH_PS2PDF --with-ps2pdf 10449# 10450# Interface to module: 10451# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10452# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10453# 'no' user instructs the module not to generate developer docs 10454# parm1: specify the default value, yes or no. 10455# 10456AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10457m4_define([devel_default], m4_default([$1], [yes])) 10458AC_ARG_ENABLE(devel-docs, 10459 AS_HELP_STRING([--enable-devel-docs], 10460 [Enable building the developer documentation (default: ]devel_default[)]), 10461 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10462m4_undefine([devel_default]) 10463AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10464AC_MSG_CHECKING([whether to build developer documentation]) 10465AC_MSG_RESULT([$build_devel_docs]) 10466]) # XORG_ENABLE_DEVEL_DOCS 10467 10468# XORG_ENABLE_SPECS (enable_specs=yes) 10469# ---------------- 10470# Minimum version: 1.6.0 10471# 10472# This macro enables a builder to skip all functional specification targets. 10473# Combined with the specific tool checking macros XORG_WITH_*, it provides 10474# maximum flexibilty in controlling documentation building. 10475# Refer to: 10476# XORG_WITH_XMLTO --with-xmlto 10477# XORG_WITH_ASCIIDOC --with-asciidoc 10478# XORG_WITH_DOXYGEN --with-doxygen 10479# XORG_WITH_FOP --with-fop 10480# XORG_WITH_GROFF --with-groff 10481# XORG_WITH_PS2PDF --with-ps2pdf 10482# 10483# Interface to module: 10484# ENABLE_SPECS: used in makefiles to conditionally generate specs 10485# --enable-specs: 'yes' user instructs the module to generate specs 10486# 'no' user instructs the module not to generate specs 10487# parm1: specify the default value, yes or no. 10488# 10489AC_DEFUN([XORG_ENABLE_SPECS],[ 10490m4_define([spec_default], m4_default([$1], [yes])) 10491AC_ARG_ENABLE(specs, 10492 AS_HELP_STRING([--enable-specs], 10493 [Enable building the specs (default: ]spec_default[)]), 10494 [build_specs=$enableval], [build_specs=]spec_default) 10495m4_undefine([spec_default]) 10496AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10497AC_MSG_CHECKING([whether to build functional specifications]) 10498AC_MSG_RESULT([$build_specs]) 10499]) # XORG_ENABLE_SPECS 10500 10501# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10502# ---------------------------------------------- 10503# Minimum version: 1.13.0 10504# 10505# This macro enables a builder to enable/disable unit testing 10506# It makes no assumption about the test cases implementation 10507# Test cases may or may not use Automake "Support for test suites" 10508# They may or may not use the software utility library GLib 10509# 10510# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10511# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10512# The variable enable_unit_tests is used by other macros in this file. 10513# 10514# Interface to module: 10515# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10516# enable_unit_tests: used in configure.ac for additional configuration 10517# --enable-unit-tests: 'yes' user instructs the module to build tests 10518# 'no' user instructs the module not to build tests 10519# parm1: specify the default value, yes or no. 10520# 10521AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10522AC_BEFORE([$0], [XORG_WITH_GLIB]) 10523AC_BEFORE([$0], [XORG_LD_WRAP]) 10524AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10525m4_define([_defopt], m4_default([$1], [auto])) 10526AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10527 [Enable building unit test cases (default: ]_defopt[)]), 10528 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10529m4_undefine([_defopt]) 10530AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10531AC_MSG_CHECKING([whether to build unit test cases]) 10532AC_MSG_RESULT([$enable_unit_tests]) 10533]) # XORG_ENABLE_UNIT_TESTS 10534 10535# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10536# ------------------------------------------------------ 10537# Minimum version: 1.17.0 10538# 10539# This macro enables a builder to enable/disable integration testing 10540# It makes no assumption about the test cases' implementation 10541# Test cases may or may not use Automake "Support for test suites" 10542# 10543# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10544# usually requires less dependencies and may be built and run under less 10545# stringent environments than integration tests. 10546# 10547# Interface to module: 10548# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10549# enable_integration_tests: used in configure.ac for additional configuration 10550# --enable-integration-tests: 'yes' user instructs the module to build tests 10551# 'no' user instructs the module not to build tests 10552# parm1: specify the default value, yes or no. 10553# 10554AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10555AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10556m4_define([_defopt], m4_default([$1], [auto])) 10557AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10558 [Enable building integration test cases (default: ]_defopt[)]), 10559 [enable_integration_tests=$enableval], 10560 [enable_integration_tests=]_defopt) 10561m4_undefine([_defopt]) 10562AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10563 [test "x$enable_integration_tests" != xno]) 10564AC_MSG_CHECKING([whether to build unit test cases]) 10565AC_MSG_RESULT([$enable_integration_tests]) 10566]) # XORG_ENABLE_INTEGRATION_TESTS 10567 10568# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10569# ---------------------------------------- 10570# Minimum version: 1.13.0 10571# 10572# GLib is a library which provides advanced data structures and functions. 10573# This macro enables a module to test for the presence of Glib. 10574# 10575# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10576# Otherwise the value of $enable_unit_tests is blank. 10577# 10578# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10579# test support usually requires less dependencies and may be built and run under 10580# less stringent environments than integration tests. 10581# 10582# Interface to module: 10583# HAVE_GLIB: used in makefiles to conditionally build targets 10584# with_glib: used in configure.ac to know if GLib has been found 10585# --with-glib: 'yes' user instructs the module to use glib 10586# 'no' user instructs the module not to use glib 10587# 10588AC_DEFUN([XORG_WITH_GLIB],[ 10589AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10590m4_define([_defopt], m4_default([$2], [auto])) 10591AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10592 [Use GLib library for unit testing (default: ]_defopt[)]), 10593 [with_glib=$withval], [with_glib=]_defopt) 10594m4_undefine([_defopt]) 10595 10596have_glib=no 10597# Do not probe GLib if user explicitly disabled unit testing 10598if test "x$enable_unit_tests" != x"no"; then 10599 # Do not probe GLib if user explicitly disabled it 10600 if test "x$with_glib" != x"no"; then 10601 m4_ifval( 10602 [$1], 10603 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10604 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10605 ) 10606 fi 10607fi 10608 10609# Not having GLib when unit testing has been explicitly requested is an error 10610if test "x$enable_unit_tests" = x"yes"; then 10611 if test "x$have_glib" = x"no"; then 10612 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10613 fi 10614fi 10615 10616# Having unit testing disabled when GLib has been explicitly requested is an error 10617if test "x$enable_unit_tests" = x"no"; then 10618 if test "x$with_glib" = x"yes"; then 10619 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10620 fi 10621fi 10622 10623# Not having GLib when it has been explicitly requested is an error 10624if test "x$with_glib" = x"yes"; then 10625 if test "x$have_glib" = x"no"; then 10626 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10627 fi 10628fi 10629 10630AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10631]) # XORG_WITH_GLIB 10632 10633# XORG_LD_WRAP([required|optional]) 10634# --------------------------------- 10635# Minimum version: 1.13.0 10636# 10637# Check if linker supports -wrap, passed via compiler flags 10638# 10639# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10640# Otherwise the value of $enable_unit_tests is blank. 10641# 10642# Argument added in 1.16.0 - default is "required", to match existing behavior 10643# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10644# available, an argument of "optional" allows use when some unit tests require 10645# ld -wrap and others do not. 10646# 10647AC_DEFUN([XORG_LD_WRAP],[ 10648XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10649 [AC_LANG_PROGRAM([#include <stdlib.h> 10650 void __wrap_exit(int status) { return; }], 10651 [exit(0);])]) 10652# Not having ld wrap when unit testing has been explicitly requested is an error 10653if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10654 if test "x$have_ld_wrap" = x"no"; then 10655 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10656 fi 10657fi 10658AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10659# 10660]) # XORG_LD_WRAP 10661 10662# XORG_CHECK_LINKER_FLAGS 10663# ----------------------- 10664# SYNOPSIS 10665# 10666# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10667# 10668# DESCRIPTION 10669# 10670# Check whether the given linker FLAGS work with the current language's 10671# linker, or whether they give an error. 10672# 10673# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10674# success/failure. 10675# 10676# PROGRAM-SOURCE is the program source to link with, if needed 10677# 10678# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10679# 10680# LICENSE 10681# 10682# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10683# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10684# Copyright (c) 2009 Matteo Frigo 10685# 10686# This program is free software: you can redistribute it and/or modify it 10687# under the terms of the GNU General Public License as published by the 10688# Free Software Foundation, either version 3 of the License, or (at your 10689# option) any later version. 10690# 10691# This program is distributed in the hope that it will be useful, but 10692# WITHOUT ANY WARRANTY; without even the implied warranty of 10693# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10694# Public License for more details. 10695# 10696# You should have received a copy of the GNU General Public License along 10697# with this program. If not, see <http://www.gnu.org/licenses/>. 10698# 10699# As a special exception, the respective Autoconf Macro's copyright owner 10700# gives unlimited permission to copy, distribute and modify the configure 10701# scripts that are the output of Autoconf when processing the Macro. You 10702# need not follow the terms of the GNU General Public License when using 10703# or distributing such scripts, even though portions of the text of the 10704# Macro appear in them. The GNU General Public License (GPL) does govern 10705# all other use of the material that constitutes the Autoconf Macro. 10706# 10707# This special exception to the GPL applies to versions of the Autoconf 10708# Macro released by the Autoconf Archive. When you make and distribute a 10709# modified version of the Autoconf Macro, you may extend this special 10710# exception to the GPL to apply to your modified version as well.# 10711AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10712[AC_MSG_CHECKING([whether the linker accepts $1]) 10713dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10714AS_LITERAL_IF([$1], 10715 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10716 ax_save_FLAGS=$LDFLAGS 10717 LDFLAGS="$1" 10718 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10719 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10720 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10721 LDFLAGS=$ax_save_FLAGS])], 10722 [ax_save_FLAGS=$LDFLAGS 10723 LDFLAGS="$1" 10724 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10725 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10726 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10727 LDFLAGS=$ax_save_FLAGS]) 10728eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10729AC_MSG_RESULT($xorg_check_linker_flags) 10730if test "x$xorg_check_linker_flags" = xyes; then 10731 m4_default([$2], :) 10732else 10733 m4_default([$3], :) 10734fi 10735]) # XORG_CHECK_LINKER_FLAGS 10736 10737# XORG_MEMORY_CHECK_FLAGS 10738# ----------------------- 10739# Minimum version: 1.16.0 10740# 10741# This macro attempts to find appropriate memory checking functionality 10742# for various platforms which unit testing code may use to catch various 10743# forms of memory allocation and access errors in testing. 10744# 10745# Interface to module: 10746# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10747# Usually added to TESTS_ENVIRONMENT in Makefile.am 10748# 10749# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10750# 10751AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10752 10753AC_REQUIRE([AC_CANONICAL_HOST]) 10754AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10755 [Environment variables to enable memory checking in tests]) 10756 10757# Check for different types of support on different platforms 10758case $host_os in 10759 solaris*) 10760 AC_CHECK_LIB([umem], [umem_alloc], 10761 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10762 ;; 10763 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10764 # both directly and inverted, so should not be 0 or 255. 10765 malloc_debug_env='MALLOC_PERTURB_=15' 10766 ;; 10767 darwin*) 10768 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10769 ;; 10770 *bsd*) 10771 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10772 ;; 10773esac 10774 10775# User supplied flags override default flags 10776if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10777 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10778fi 10779 10780AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10781]) # XORG_WITH_LINT 10782 10783# XORG_CHECK_MALLOC_ZERO 10784# ---------------------- 10785# Minimum version: 1.0.0 10786# 10787# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10788# malloc(0) returns NULL. Packages should add one of these cflags to 10789# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10790AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10791AC_ARG_ENABLE(malloc0returnsnull, 10792 AS_HELP_STRING([--enable-malloc0returnsnull], 10793 [malloc(0) returns NULL (default: auto)]), 10794 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10795 [MALLOC_ZERO_RETURNS_NULL=auto]) 10796 10797AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10798if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10799AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10800 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10801#include <stdlib.h> 10802],[ 10803 char *m0, *r0, *c0, *p; 10804 m0 = malloc(0); 10805 p = malloc(10); 10806 r0 = realloc(p,0); 10807 c0 = calloc(0,10); 10808 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10809])], 10810 [xorg_cv_malloc0_returns_null=yes], 10811 [xorg_cv_malloc0_returns_null=no])]) 10812MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10813fi 10814AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10815 10816if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10817 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10818 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10819 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10820else 10821 MALLOC_ZERO_CFLAGS="" 10822 XMALLOC_ZERO_CFLAGS="" 10823 XTMALLOC_ZERO_CFLAGS="" 10824fi 10825 10826AC_SUBST([MALLOC_ZERO_CFLAGS]) 10827AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10828AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10829]) # XORG_CHECK_MALLOC_ZERO 10830 10831# XORG_WITH_LINT() 10832# ---------------- 10833# Minimum version: 1.1.0 10834# 10835# This macro enables the use of a tool that flags some suspicious and 10836# non-portable constructs (likely to be bugs) in C language source code. 10837# It will attempt to locate the tool and use appropriate options. 10838# There are various lint type tools on different platforms. 10839# 10840# Interface to module: 10841# LINT: returns the path to the tool found on the platform 10842# or the value set to LINT on the configure cmd line 10843# also an Automake conditional 10844# LINT_FLAGS: an Automake variable with appropriate flags 10845# 10846# --with-lint: 'yes' user instructs the module to use lint 10847# 'no' user instructs the module not to use lint (default) 10848# 10849# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10850# If the user sets the value of LINT_FLAGS, they are used verbatim. 10851# 10852AC_DEFUN([XORG_WITH_LINT],[ 10853 10854AC_ARG_VAR([LINT], [Path to a lint-style command]) 10855AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10856AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10857 [Use a lint-style source code checker (default: disabled)])], 10858 [use_lint=$withval], [use_lint=no]) 10859 10860# Obtain platform specific info like program name and options 10861# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10862case $host_os in 10863 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10864 lint_name=splint 10865 lint_options="-badflag" 10866 ;; 10867 *freebsd* | *netbsd*) 10868 lint_name=lint 10869 lint_options="-u -b" 10870 ;; 10871 *solaris*) 10872 lint_name=lint 10873 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10874 ;; 10875esac 10876 10877# Test for the presence of the program (either guessed by the code or spelled out by the user) 10878if test "x$use_lint" = x"yes" ; then 10879 AC_PATH_PROG([LINT], [$lint_name]) 10880 if test "x$LINT" = "x"; then 10881 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10882 fi 10883elif test "x$use_lint" = x"no" ; then 10884 if test "x$LINT" != "x"; then 10885 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10886 fi 10887else 10888 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10889fi 10890 10891# User supplied flags override default flags 10892if test "x$LINT_FLAGS" != "x"; then 10893 lint_options=$LINT_FLAGS 10894fi 10895 10896AC_SUBST([LINT_FLAGS],[$lint_options]) 10897AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10898 10899]) # XORG_WITH_LINT 10900 10901# XORG_LINT_LIBRARY(LIBNAME) 10902# -------------------------- 10903# Minimum version: 1.1.0 10904# 10905# Sets up flags for building lint libraries for checking programs that call 10906# functions in the library. 10907# 10908# Interface to module: 10909# LINTLIB - Automake variable with the name of lint library file to make 10910# MAKE_LINT_LIB - Automake conditional 10911# 10912# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10913# - 'no' user instructs the module not to create a lint library (default) 10914 10915AC_DEFUN([XORG_LINT_LIBRARY],[ 10916AC_REQUIRE([XORG_WITH_LINT]) 10917AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10918 [Create lint library (default: disabled)])], 10919 [make_lint_lib=$enableval], [make_lint_lib=no]) 10920 10921if test "x$make_lint_lib" = x"yes" ; then 10922 LINTLIB=llib-l$1.ln 10923 if test "x$LINT" = "x"; then 10924 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10925 fi 10926elif test "x$make_lint_lib" != x"no" ; then 10927 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10928fi 10929 10930AC_SUBST(LINTLIB) 10931AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10932 10933]) # XORG_LINT_LIBRARY 10934 10935# XORG_COMPILER_BRAND 10936# ------------------- 10937# Minimum version: 1.14.0 10938# 10939# Checks for various brands of compilers and sets flags as appropriate: 10940# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10941# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10942# clang compiler - sets CLANGCC to "yes" 10943# Intel compiler - sets INTELCC to "yes" 10944# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10945# 10946AC_DEFUN([XORG_COMPILER_BRAND], [ 10947AC_LANG_CASE( 10948 [C], [ 10949 AC_REQUIRE([AC_PROG_CC_C99]) 10950 ], 10951 [C++], [ 10952 AC_REQUIRE([AC_PROG_CXX]) 10953 ] 10954) 10955AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10956AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10957AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10958]) # XORG_COMPILER_BRAND 10959 10960# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10961# --------------- 10962# Minimum version: 1.16.0 10963# 10964# Test if the compiler works when passed the given flag as a command line argument. 10965# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10966# next flag in the list until there are no more options. 10967# 10968# Note that this does not guarantee that the compiler supports the flag as some 10969# compilers will simply ignore arguments that they do not understand, but we do 10970# attempt to weed out false positives by using -Werror=unknown-warning-option and 10971# -Werror=unused-command-line-argument 10972# 10973AC_DEFUN([XORG_TESTSET_CFLAG], [ 10974m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10975m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10976 10977AC_LANG_COMPILER_REQUIRE 10978 10979AC_LANG_CASE( 10980 [C], [ 10981 AC_REQUIRE([AC_PROG_CC_C99]) 10982 define([PREFIX], [C]) 10983 define([CACHE_PREFIX], [cc]) 10984 define([COMPILER], [$CC]) 10985 ], 10986 [C++], [ 10987 define([PREFIX], [CXX]) 10988 define([CACHE_PREFIX], [cxx]) 10989 define([COMPILER], [$CXX]) 10990 ] 10991) 10992 10993[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10994 10995if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10996 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10997 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10998 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10999 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11000 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11001 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11002 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11003 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11004fi 11005 11006if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11007 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11008 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11009 fi 11010 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11011 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11012 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11013 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11014 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11015 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11016 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11017 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11018fi 11019 11020found="no" 11021m4_foreach([flag], m4_cdr($@), [ 11022 if test $found = "no" ; then 11023 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11024 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11025 fi 11026 11027 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11028 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11029 fi 11030 11031 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11032 11033dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11034 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11035 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11036 AC_CACHE_VAL($cacheid, 11037 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11038 [eval $cacheid=yes], 11039 [eval $cacheid=no])]) 11040 11041 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11042 11043 eval supported=\$$cacheid 11044 AC_MSG_RESULT([$supported]) 11045 if test "$supported" = "yes" ; then 11046 $1="$$1 ]flag[" 11047 found="yes" 11048 fi 11049 fi 11050]) 11051]) # XORG_TESTSET_CFLAG 11052 11053# XORG_COMPILER_FLAGS 11054# --------------- 11055# Minimum version: 1.16.0 11056# 11057# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11058# arguments supported by the selected compiler which do NOT alter the generated 11059# code. These arguments will cause the compiler to print various warnings 11060# during compilation AND turn a conservative set of warnings into errors. 11061# 11062# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11063# future versions of util-macros as options are added to new compilers. 11064# 11065AC_DEFUN([XORG_COMPILER_FLAGS], [ 11066AC_REQUIRE([XORG_COMPILER_BRAND]) 11067 11068AC_ARG_ENABLE(selective-werror, 11069 AS_HELP_STRING([--disable-selective-werror], 11070 [Turn off selective compiler errors. (default: enabled)]), 11071 [SELECTIVE_WERROR=$enableval], 11072 [SELECTIVE_WERROR=yes]) 11073 11074AC_LANG_CASE( 11075 [C], [ 11076 define([PREFIX], [C]) 11077 ], 11078 [C++], [ 11079 define([PREFIX], [CXX]) 11080 ] 11081) 11082# -v is too short to test reliably with XORG_TESTSET_CFLAG 11083if test "x$SUNCC" = "xyes"; then 11084 [BASE_]PREFIX[FLAGS]="-v" 11085else 11086 [BASE_]PREFIX[FLAGS]="" 11087fi 11088 11089# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11090XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11091XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11092XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11093XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11094 11095AC_LANG_CASE( 11096 [C], [ 11097 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11098 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11099 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11100 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11101 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11102 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11103 ] 11104) 11105 11106# This chunk adds additional warnings that could catch undesired effects. 11107XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11108XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11109XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11110XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11111XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11112XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11113XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11114 11115# These are currently disabled because they are noisy. They will be enabled 11116# in the future once the codebase is sufficiently modernized to silence 11117# them. For now, I don't want them to drown out the other warnings. 11118# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11119# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11120# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11121 11122# Turn some warnings into errors, so we don't accidently get successful builds 11123# when there are problems that should be fixed. 11124 11125if test "x$SELECTIVE_WERROR" = "xyes" ; then 11126XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11127XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11128XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11129XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11130XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11131XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11132XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11133XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11134XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11135XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11136XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11137XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11138XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11139else 11140AC_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]) 11141XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11142XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11143XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11144XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11145XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11146XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11147XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11148XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11149XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11150XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11151XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11152XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11153XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11154fi 11155 11156AC_SUBST([BASE_]PREFIX[FLAGS]) 11157]) # XORG_COMPILER_FLAGS 11158 11159# XORG_CWARNFLAGS 11160# --------------- 11161# Minimum version: 1.2.0 11162# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11163# 11164# Defines CWARNFLAGS to enable C compiler warnings. 11165# 11166# This function is deprecated because it defines -fno-strict-aliasing 11167# which alters the code generated by the compiler. If -fno-strict-aliasing 11168# is needed, then it should be added explicitly in the module when 11169# it is updated to use BASE_CFLAGS. 11170# 11171AC_DEFUN([XORG_CWARNFLAGS], [ 11172AC_REQUIRE([XORG_COMPILER_FLAGS]) 11173AC_REQUIRE([XORG_COMPILER_BRAND]) 11174AC_LANG_CASE( 11175 [C], [ 11176 CWARNFLAGS="$BASE_CFLAGS" 11177 if test "x$GCC" = xyes ; then 11178 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11179 fi 11180 AC_SUBST(CWARNFLAGS) 11181 ] 11182) 11183]) # XORG_CWARNFLAGS 11184 11185# XORG_STRICT_OPTION 11186# ----------------------- 11187# Minimum version: 1.3.0 11188# 11189# Add configure option to enable strict compilation flags, such as treating 11190# warnings as fatal errors. 11191# If --enable-strict-compilation is passed to configure, adds strict flags to 11192# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11193# 11194# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11195# when strict compilation is unconditionally desired. 11196AC_DEFUN([XORG_STRICT_OPTION], [ 11197AC_REQUIRE([XORG_CWARNFLAGS]) 11198AC_REQUIRE([XORG_COMPILER_FLAGS]) 11199 11200AC_ARG_ENABLE(strict-compilation, 11201 AS_HELP_STRING([--enable-strict-compilation], 11202 [Enable all warnings from compiler and make them errors (default: disabled)]), 11203 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11204 11205AC_LANG_CASE( 11206 [C], [ 11207 define([PREFIX], [C]) 11208 ], 11209 [C++], [ 11210 define([PREFIX], [CXX]) 11211 ] 11212) 11213 11214[STRICT_]PREFIX[FLAGS]="" 11215XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11216XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11217 11218# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11219# activate it with -Werror, so we add it here explicitly. 11220XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11221 11222if test "x$STRICT_COMPILE" = "xyes"; then 11223 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11224 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11225fi 11226AC_SUBST([STRICT_]PREFIX[FLAGS]) 11227AC_SUBST([BASE_]PREFIX[FLAGS]) 11228AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11229]) # XORG_STRICT_OPTION 11230 11231# XORG_DEFAULT_OPTIONS 11232# -------------------- 11233# Minimum version: 1.3.0 11234# 11235# Defines default options for X.Org modules. 11236# 11237AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11238AC_REQUIRE([AC_PROG_INSTALL]) 11239XORG_COMPILER_FLAGS 11240XORG_CWARNFLAGS 11241XORG_STRICT_OPTION 11242XORG_RELEASE_VERSION 11243XORG_CHANGELOG 11244XORG_INSTALL 11245XORG_MANPAGE_SECTIONS 11246m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11247 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11248]) # XORG_DEFAULT_OPTIONS 11249 11250# XORG_INSTALL() 11251# ---------------- 11252# Minimum version: 1.4.0 11253# 11254# Defines the variable INSTALL_CMD as the command to copy 11255# INSTALL from $prefix/share/util-macros. 11256# 11257AC_DEFUN([XORG_INSTALL], [ 11258AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11259macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11260INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11261mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11262|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 11263touch \$(top_srcdir)/INSTALL; \ 11264echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 11265AC_SUBST([INSTALL_CMD]) 11266]) # XORG_INSTALL 11267dnl Copyright 2005 Red Hat, Inc 11268dnl 11269dnl Permission to use, copy, modify, distribute, and sell this software and its 11270dnl documentation for any purpose is hereby granted without fee, provided that 11271dnl the above copyright notice appear in all copies and that both that 11272dnl copyright notice and this permission notice appear in supporting 11273dnl documentation. 11274dnl 11275dnl The above copyright notice and this permission notice shall be included 11276dnl in all copies or substantial portions of the Software. 11277dnl 11278dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11279dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11280dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11281dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11282dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11283dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11284dnl OTHER DEALINGS IN THE SOFTWARE. 11285dnl 11286dnl Except as contained in this notice, the name of the copyright holders shall 11287dnl not be used in advertising or otherwise to promote the sale, use or 11288dnl other dealings in this Software without prior written authorization 11289dnl from the copyright holders. 11290dnl 11291 11292# XORG_RELEASE_VERSION 11293# -------------------- 11294# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11295 11296AC_DEFUN([XORG_RELEASE_VERSION],[ 11297 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11298 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11299 [Major version of this package]) 11300 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11301 if test "x$PVM" = "x"; then 11302 PVM="0" 11303 fi 11304 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11305 [$PVM], 11306 [Minor version of this package]) 11307 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11308 if test "x$PVP" = "x"; then 11309 PVP="0" 11310 fi 11311 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11312 [$PVP], 11313 [Patch version of this package]) 11314]) 11315 11316# XORG_CHANGELOG() 11317# ---------------- 11318# Minimum version: 1.2.0 11319# 11320# Defines the variable CHANGELOG_CMD as the command to generate 11321# ChangeLog from git. 11322# 11323# 11324AC_DEFUN([XORG_CHANGELOG], [ 11325CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 11326mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11327|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 11328touch \$(top_srcdir)/ChangeLog; \ 11329echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 11330AC_SUBST([CHANGELOG_CMD]) 11331]) # XORG_CHANGELOG 11332 11333# Copyright (C) 2002-2020 Free Software Foundation, Inc. 11334# 11335# This file is free software; the Free Software Foundation 11336# gives unlimited permission to copy and/or distribute it, 11337# with or without modifications, as long as this notice is preserved. 11338 11339# AM_AUTOMAKE_VERSION(VERSION) 11340# ---------------------------- 11341# Automake X.Y traces this macro to ensure aclocal.m4 has been 11342# generated from the m4 files accompanying Automake X.Y. 11343# (This private macro should not be called outside this file.) 11344AC_DEFUN([AM_AUTOMAKE_VERSION], 11345[am__api_version='1.16' 11346dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11347dnl require some minimum version. Point them to the right macro. 11348m4_if([$1], [1.16.2], [], 11349 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11350]) 11351 11352# _AM_AUTOCONF_VERSION(VERSION) 11353# ----------------------------- 11354# aclocal traces this macro to find the Autoconf version. 11355# This is a private macro too. Using m4_define simplifies 11356# the logic in aclocal, which can simply ignore this definition. 11357m4_define([_AM_AUTOCONF_VERSION], []) 11358 11359# AM_SET_CURRENT_AUTOMAKE_VERSION 11360# ------------------------------- 11361# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11362# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11363AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11364[AM_AUTOMAKE_VERSION([1.16.2])dnl 11365m4_ifndef([AC_AUTOCONF_VERSION], 11366 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11367_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11368 11369# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11370 11371# Copyright (C) 2001-2020 Free Software Foundation, Inc. 11372# 11373# This file is free software; the Free Software Foundation 11374# gives unlimited permission to copy and/or distribute it, 11375# with or without modifications, as long as this notice is preserved. 11376 11377# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11378# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11379# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11380# 11381# Of course, Automake must honor this variable whenever it calls a 11382# tool from the auxiliary directory. The problem is that $srcdir (and 11383# therefore $ac_aux_dir as well) can be either absolute or relative, 11384# depending on how configure is run. This is pretty annoying, since 11385# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11386# source directory, any form will work fine, but in subdirectories a 11387# relative path needs to be adjusted first. 11388# 11389# $ac_aux_dir/missing 11390# fails when called from a subdirectory if $ac_aux_dir is relative 11391# $top_srcdir/$ac_aux_dir/missing 11392# fails if $ac_aux_dir is absolute, 11393# fails when called from a subdirectory in a VPATH build with 11394# a relative $ac_aux_dir 11395# 11396# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11397# are both prefixed by $srcdir. In an in-source build this is usually 11398# harmless because $srcdir is '.', but things will broke when you 11399# start a VPATH build or use an absolute $srcdir. 11400# 11401# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11402# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11403# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11404# and then we would define $MISSING as 11405# MISSING="\${SHELL} $am_aux_dir/missing" 11406# This will work as long as MISSING is not called from configure, because 11407# unfortunately $(top_srcdir) has no meaning in configure. 11408# However there are other variables, like CC, which are often used in 11409# configure, and could therefore not use this "fixed" $ac_aux_dir. 11410# 11411# Another solution, used here, is to always expand $ac_aux_dir to an 11412# absolute PATH. The drawback is that using absolute paths prevent a 11413# configured tree to be moved without reconfiguration. 11414 11415AC_DEFUN([AM_AUX_DIR_EXPAND], 11416[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11417# Expand $ac_aux_dir to an absolute path. 11418am_aux_dir=`cd "$ac_aux_dir" && pwd` 11419]) 11420 11421# AM_CONDITIONAL -*- Autoconf -*- 11422 11423# Copyright (C) 1997-2020 Free Software Foundation, Inc. 11424# 11425# This file is free software; the Free Software Foundation 11426# gives unlimited permission to copy and/or distribute it, 11427# with or without modifications, as long as this notice is preserved. 11428 11429# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11430# ------------------------------------- 11431# Define a conditional. 11432AC_DEFUN([AM_CONDITIONAL], 11433[AC_PREREQ([2.52])dnl 11434 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11435 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11436AC_SUBST([$1_TRUE])dnl 11437AC_SUBST([$1_FALSE])dnl 11438_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11439_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11440m4_define([_AM_COND_VALUE_$1], [$2])dnl 11441if $2; then 11442 $1_TRUE= 11443 $1_FALSE='#' 11444else 11445 $1_TRUE='#' 11446 $1_FALSE= 11447fi 11448AC_CONFIG_COMMANDS_PRE( 11449[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11450 AC_MSG_ERROR([[conditional "$1" was never defined. 11451Usually this means the macro was only invoked conditionally.]]) 11452fi])]) 11453 11454# Copyright (C) 1999-2020 Free Software Foundation, Inc. 11455# 11456# This file is free software; the Free Software Foundation 11457# gives unlimited permission to copy and/or distribute it, 11458# with or without modifications, as long as this notice is preserved. 11459 11460 11461# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11462# written in clear, in which case automake, when reading aclocal.m4, 11463# will think it sees a *use*, and therefore will trigger all it's 11464# C support machinery. Also note that it means that autoscan, seeing 11465# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11466 11467 11468# _AM_DEPENDENCIES(NAME) 11469# ---------------------- 11470# See how the compiler implements dependency checking. 11471# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11472# We try a few techniques and use that to set a single cache variable. 11473# 11474# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11475# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11476# dependency, and given that the user is not expected to run this macro, 11477# just rely on AC_PROG_CC. 11478AC_DEFUN([_AM_DEPENDENCIES], 11479[AC_REQUIRE([AM_SET_DEPDIR])dnl 11480AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11481AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11482AC_REQUIRE([AM_DEP_TRACK])dnl 11483 11484m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11485 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11486 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11487 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11488 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11489 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11490 [depcc="$$1" am_compiler_list=]) 11491 11492AC_CACHE_CHECK([dependency style of $depcc], 11493 [am_cv_$1_dependencies_compiler_type], 11494[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11495 # We make a subdir and do the tests there. Otherwise we can end up 11496 # making bogus files that we don't know about and never remove. For 11497 # instance it was reported that on HP-UX the gcc test will end up 11498 # making a dummy file named 'D' -- because '-MD' means "put the output 11499 # in D". 11500 rm -rf conftest.dir 11501 mkdir conftest.dir 11502 # Copy depcomp to subdir because otherwise we won't find it if we're 11503 # using a relative directory. 11504 cp "$am_depcomp" conftest.dir 11505 cd conftest.dir 11506 # We will build objects and dependencies in a subdirectory because 11507 # it helps to detect inapplicable dependency modes. For instance 11508 # both Tru64's cc and ICC support -MD to output dependencies as a 11509 # side effect of compilation, but ICC will put the dependencies in 11510 # the current directory while Tru64 will put them in the object 11511 # directory. 11512 mkdir sub 11513 11514 am_cv_$1_dependencies_compiler_type=none 11515 if test "$am_compiler_list" = ""; then 11516 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11517 fi 11518 am__universal=false 11519 m4_case([$1], [CC], 11520 [case " $depcc " in #( 11521 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11522 esac], 11523 [CXX], 11524 [case " $depcc " in #( 11525 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11526 esac]) 11527 11528 for depmode in $am_compiler_list; do 11529 # Setup a source with many dependencies, because some compilers 11530 # like to wrap large dependency lists on column 80 (with \), and 11531 # we should not choose a depcomp mode which is confused by this. 11532 # 11533 # We need to recreate these files for each test, as the compiler may 11534 # overwrite some of them when testing with obscure command lines. 11535 # This happens at least with the AIX C compiler. 11536 : > sub/conftest.c 11537 for i in 1 2 3 4 5 6; do 11538 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11539 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11540 # Solaris 10 /bin/sh. 11541 echo '/* dummy */' > sub/conftst$i.h 11542 done 11543 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11544 11545 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11546 # mode. It turns out that the SunPro C++ compiler does not properly 11547 # handle '-M -o', and we need to detect this. Also, some Intel 11548 # versions had trouble with output in subdirs. 11549 am__obj=sub/conftest.${OBJEXT-o} 11550 am__minus_obj="-o $am__obj" 11551 case $depmode in 11552 gcc) 11553 # This depmode causes a compiler race in universal mode. 11554 test "$am__universal" = false || continue 11555 ;; 11556 nosideeffect) 11557 # After this tag, mechanisms are not by side-effect, so they'll 11558 # only be used when explicitly requested. 11559 if test "x$enable_dependency_tracking" = xyes; then 11560 continue 11561 else 11562 break 11563 fi 11564 ;; 11565 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11566 # This compiler won't grok '-c -o', but also, the minuso test has 11567 # not run yet. These depmodes are late enough in the game, and 11568 # so weak that their functioning should not be impacted. 11569 am__obj=conftest.${OBJEXT-o} 11570 am__minus_obj= 11571 ;; 11572 none) break ;; 11573 esac 11574 if depmode=$depmode \ 11575 source=sub/conftest.c object=$am__obj \ 11576 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11577 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11578 >/dev/null 2>conftest.err && 11579 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11580 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11581 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11582 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11583 # icc doesn't choke on unknown options, it will just issue warnings 11584 # or remarks (even with -Werror). So we grep stderr for any message 11585 # that says an option was ignored or not supported. 11586 # When given -MP, icc 7.0 and 7.1 complain thusly: 11587 # icc: Command line warning: ignoring option '-M'; no argument required 11588 # The diagnosis changed in icc 8.0: 11589 # icc: Command line remark: option '-MP' not supported 11590 if (grep 'ignoring option' conftest.err || 11591 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11592 am_cv_$1_dependencies_compiler_type=$depmode 11593 break 11594 fi 11595 fi 11596 done 11597 11598 cd .. 11599 rm -rf conftest.dir 11600else 11601 am_cv_$1_dependencies_compiler_type=none 11602fi 11603]) 11604AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11605AM_CONDITIONAL([am__fastdep$1], [ 11606 test "x$enable_dependency_tracking" != xno \ 11607 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11608]) 11609 11610 11611# AM_SET_DEPDIR 11612# ------------- 11613# Choose a directory name for dependency files. 11614# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11615AC_DEFUN([AM_SET_DEPDIR], 11616[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11617AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11618]) 11619 11620 11621# AM_DEP_TRACK 11622# ------------ 11623AC_DEFUN([AM_DEP_TRACK], 11624[AC_ARG_ENABLE([dependency-tracking], [dnl 11625AS_HELP_STRING( 11626 [--enable-dependency-tracking], 11627 [do not reject slow dependency extractors]) 11628AS_HELP_STRING( 11629 [--disable-dependency-tracking], 11630 [speeds up one-time build])]) 11631if test "x$enable_dependency_tracking" != xno; then 11632 am_depcomp="$ac_aux_dir/depcomp" 11633 AMDEPBACKSLASH='\' 11634 am__nodep='_no' 11635fi 11636AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11637AC_SUBST([AMDEPBACKSLASH])dnl 11638_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11639AC_SUBST([am__nodep])dnl 11640_AM_SUBST_NOTMAKE([am__nodep])dnl 11641]) 11642 11643# Generate code to set up dependency tracking. -*- Autoconf -*- 11644 11645# Copyright (C) 1999-2020 Free Software Foundation, Inc. 11646# 11647# This file is free software; the Free Software Foundation 11648# gives unlimited permission to copy and/or distribute it, 11649# with or without modifications, as long as this notice is preserved. 11650 11651# _AM_OUTPUT_DEPENDENCY_COMMANDS 11652# ------------------------------ 11653AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11654[{ 11655 # Older Autoconf quotes --file arguments for eval, but not when files 11656 # are listed without --file. Let's play safe and only enable the eval 11657 # if we detect the quoting. 11658 # TODO: see whether this extra hack can be removed once we start 11659 # requiring Autoconf 2.70 or later. 11660 AS_CASE([$CONFIG_FILES], 11661 [*\'*], [eval set x "$CONFIG_FILES"], 11662 [*], [set x $CONFIG_FILES]) 11663 shift 11664 # Used to flag and report bootstrapping failures. 11665 am_rc=0 11666 for am_mf 11667 do 11668 # Strip MF so we end up with the name of the file. 11669 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 11670 # Check whether this is an Automake generated Makefile which includes 11671 # dependency-tracking related rules and includes. 11672 # Grep'ing the whole file directly is not great: AIX grep has a line 11673 # limit of 2048, but all sed's we know have understand at least 4000. 11674 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 11675 || continue 11676 am_dirpart=`AS_DIRNAME(["$am_mf"])` 11677 am_filepart=`AS_BASENAME(["$am_mf"])` 11678 AM_RUN_LOG([cd "$am_dirpart" \ 11679 && sed -e '/# am--include-marker/d' "$am_filepart" \ 11680 | $MAKE -f - am--depfiles]) || am_rc=$? 11681 done 11682 if test $am_rc -ne 0; then 11683 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 11684 for automatic dependency tracking. If GNU make was not used, consider 11685 re-running the configure script with MAKE="gmake" (or whatever is 11686 necessary). You can also try re-running configure with the 11687 '--disable-dependency-tracking' option to at least be able to build 11688 the package (albeit without support for automatic dependency tracking).]) 11689 fi 11690 AS_UNSET([am_dirpart]) 11691 AS_UNSET([am_filepart]) 11692 AS_UNSET([am_mf]) 11693 AS_UNSET([am_rc]) 11694 rm -f conftest-deps.mk 11695} 11696])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11697 11698 11699# AM_OUTPUT_DEPENDENCY_COMMANDS 11700# ----------------------------- 11701# This macro should only be invoked once -- use via AC_REQUIRE. 11702# 11703# This code is only required when automatic dependency tracking is enabled. 11704# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 11705# order to bootstrap the dependency handling code. 11706AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11707[AC_CONFIG_COMMANDS([depfiles], 11708 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11709 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 11710 11711# Do all the work for Automake. -*- Autoconf -*- 11712 11713# Copyright (C) 1996-2020 Free Software Foundation, Inc. 11714# 11715# This file is free software; the Free Software Foundation 11716# gives unlimited permission to copy and/or distribute it, 11717# with or without modifications, as long as this notice is preserved. 11718 11719# This macro actually does too much. Some checks are only needed if 11720# your package does certain things. But this isn't really a big deal. 11721 11722dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11723m4_define([AC_PROG_CC], 11724m4_defn([AC_PROG_CC]) 11725[_AM_PROG_CC_C_O 11726]) 11727 11728# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11729# AM_INIT_AUTOMAKE([OPTIONS]) 11730# ----------------------------------------------- 11731# The call with PACKAGE and VERSION arguments is the old style 11732# call (pre autoconf-2.50), which is being phased out. PACKAGE 11733# and VERSION should now be passed to AC_INIT and removed from 11734# the call to AM_INIT_AUTOMAKE. 11735# We support both call styles for the transition. After 11736# the next Automake release, Autoconf can make the AC_INIT 11737# arguments mandatory, and then we can depend on a new Autoconf 11738# release and drop the old call support. 11739AC_DEFUN([AM_INIT_AUTOMAKE], 11740[AC_PREREQ([2.65])dnl 11741dnl Autoconf wants to disallow AM_ names. We explicitly allow 11742dnl the ones we care about. 11743m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11744AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11745AC_REQUIRE([AC_PROG_INSTALL])dnl 11746if test "`cd $srcdir && pwd`" != "`pwd`"; then 11747 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11748 # is not polluted with repeated "-I." 11749 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11750 # test to see if srcdir already configured 11751 if test -f $srcdir/config.status; then 11752 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11753 fi 11754fi 11755 11756# test whether we have cygpath 11757if test -z "$CYGPATH_W"; then 11758 if (cygpath --version) >/dev/null 2>/dev/null; then 11759 CYGPATH_W='cygpath -w' 11760 else 11761 CYGPATH_W=echo 11762 fi 11763fi 11764AC_SUBST([CYGPATH_W]) 11765 11766# Define the identity of the package. 11767dnl Distinguish between old-style and new-style calls. 11768m4_ifval([$2], 11769[AC_DIAGNOSE([obsolete], 11770 [$0: two- and three-arguments forms are deprecated.]) 11771m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11772 AC_SUBST([PACKAGE], [$1])dnl 11773 AC_SUBST([VERSION], [$2])], 11774[_AM_SET_OPTIONS([$1])dnl 11775dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11776m4_if( 11777 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11778 [ok:ok],, 11779 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11780 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11781 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11782 11783_AM_IF_OPTION([no-define],, 11784[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11785 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11786 11787# Some tools Automake needs. 11788AC_REQUIRE([AM_SANITY_CHECK])dnl 11789AC_REQUIRE([AC_ARG_PROGRAM])dnl 11790AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11791AM_MISSING_PROG([AUTOCONF], [autoconf]) 11792AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11793AM_MISSING_PROG([AUTOHEADER], [autoheader]) 11794AM_MISSING_PROG([MAKEINFO], [makeinfo]) 11795AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11796AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11797AC_REQUIRE([AC_PROG_MKDIR_P])dnl 11798# For better backward compatibility. To be removed once Automake 1.9.x 11799# dies out for good. For more background, see: 11800# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11801# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11802AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11803# We need awk for the "check" target (and possibly the TAP driver). The 11804# system "awk" is bad on some platforms. 11805AC_REQUIRE([AC_PROG_AWK])dnl 11806AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11807AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11808_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11809 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11810 [_AM_PROG_TAR([v7])])]) 11811_AM_IF_OPTION([no-dependencies],, 11812[AC_PROVIDE_IFELSE([AC_PROG_CC], 11813 [_AM_DEPENDENCIES([CC])], 11814 [m4_define([AC_PROG_CC], 11815 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11816AC_PROVIDE_IFELSE([AC_PROG_CXX], 11817 [_AM_DEPENDENCIES([CXX])], 11818 [m4_define([AC_PROG_CXX], 11819 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11820AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11821 [_AM_DEPENDENCIES([OBJC])], 11822 [m4_define([AC_PROG_OBJC], 11823 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11824AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11825 [_AM_DEPENDENCIES([OBJCXX])], 11826 [m4_define([AC_PROG_OBJCXX], 11827 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11828]) 11829AC_REQUIRE([AM_SILENT_RULES])dnl 11830dnl The testsuite driver may need to know about EXEEXT, so add the 11831dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11832dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11833AC_CONFIG_COMMANDS_PRE(dnl 11834[m4_provide_if([_AM_COMPILER_EXEEXT], 11835 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11836 11837# POSIX will say in a future version that running "rm -f" with no argument 11838# is OK; and we want to be able to make that assumption in our Makefile 11839# recipes. So use an aggressive probe to check that the usage we want is 11840# actually supported "in the wild" to an acceptable degree. 11841# See automake bug#10828. 11842# To make any issue more visible, cause the running configure to be aborted 11843# by default if the 'rm' program in use doesn't match our expectations; the 11844# user can still override this though. 11845if rm -f && rm -fr && rm -rf; then : OK; else 11846 cat >&2 <<'END' 11847Oops! 11848 11849Your 'rm' program seems unable to run without file operands specified 11850on the command line, even when the '-f' option is present. This is contrary 11851to the behaviour of most rm programs out there, and not conforming with 11852the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11853 11854Please tell bug-automake@gnu.org about your system, including the value 11855of your $PATH and any error possibly output before this message. This 11856can help us improve future automake versions. 11857 11858END 11859 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11860 echo 'Configuration will proceed anyway, since you have set the' >&2 11861 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11862 echo >&2 11863 else 11864 cat >&2 <<'END' 11865Aborting the configuration process, to ensure you take notice of the issue. 11866 11867You can download and install GNU coreutils to get an 'rm' implementation 11868that behaves properly: <https://www.gnu.org/software/coreutils/>. 11869 11870If you want to complete the configuration process using your problematic 11871'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11872to "yes", and re-run configure. 11873 11874END 11875 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11876 fi 11877fi 11878dnl The trailing newline in this macro's definition is deliberate, for 11879dnl backward compatibility and to allow trailing 'dnl'-style comments 11880dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11881]) 11882 11883dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11884dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11885dnl mangled by Autoconf and run in a shell conditional statement. 11886m4_define([_AC_COMPILER_EXEEXT], 11887m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11888 11889# When config.status generates a header, we must update the stamp-h file. 11890# This file resides in the same directory as the config header 11891# that is generated. The stamp files are numbered to have different names. 11892 11893# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11894# loop where config.status creates the headers, so we can generate 11895# our stamp files there. 11896AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11897[# Compute $1's index in $config_headers. 11898_am_arg=$1 11899_am_stamp_count=1 11900for _am_header in $config_headers :; do 11901 case $_am_header in 11902 $_am_arg | $_am_arg:* ) 11903 break ;; 11904 * ) 11905 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11906 esac 11907done 11908echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11909 11910# Copyright (C) 2001-2020 Free Software Foundation, Inc. 11911# 11912# This file is free software; the Free Software Foundation 11913# gives unlimited permission to copy and/or distribute it, 11914# with or without modifications, as long as this notice is preserved. 11915 11916# AM_PROG_INSTALL_SH 11917# ------------------ 11918# Define $install_sh. 11919AC_DEFUN([AM_PROG_INSTALL_SH], 11920[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11921if test x"${install_sh+set}" != xset; then 11922 case $am_aux_dir in 11923 *\ * | *\ *) 11924 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11925 *) 11926 install_sh="\${SHELL} $am_aux_dir/install-sh" 11927 esac 11928fi 11929AC_SUBST([install_sh])]) 11930 11931# Copyright (C) 2003-2020 Free Software Foundation, Inc. 11932# 11933# This file is free software; the Free Software Foundation 11934# gives unlimited permission to copy and/or distribute it, 11935# with or without modifications, as long as this notice is preserved. 11936 11937# Check whether the underlying file-system supports filenames 11938# with a leading dot. For instance MS-DOS doesn't. 11939AC_DEFUN([AM_SET_LEADING_DOT], 11940[rm -rf .tst 2>/dev/null 11941mkdir .tst 2>/dev/null 11942if test -d .tst; then 11943 am__leading_dot=. 11944else 11945 am__leading_dot=_ 11946fi 11947rmdir .tst 2>/dev/null 11948AC_SUBST([am__leading_dot])]) 11949 11950# Check to see how 'make' treats includes. -*- Autoconf -*- 11951 11952# Copyright (C) 2001-2020 Free Software Foundation, Inc. 11953# 11954# This file is free software; the Free Software Foundation 11955# gives unlimited permission to copy and/or distribute it, 11956# with or without modifications, as long as this notice is preserved. 11957 11958# AM_MAKE_INCLUDE() 11959# ----------------- 11960# Check whether make has an 'include' directive that can support all 11961# the idioms we need for our automatic dependency tracking code. 11962AC_DEFUN([AM_MAKE_INCLUDE], 11963[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 11964cat > confinc.mk << 'END' 11965am__doit: 11966 @echo this is the am__doit target >confinc.out 11967.PHONY: am__doit 11968END 11969am__include="#" 11970am__quote= 11971# BSD make does it like this. 11972echo '.include "confinc.mk" # ignored' > confmf.BSD 11973# Other make implementations (GNU, Solaris 10, AIX) do it like this. 11974echo 'include confinc.mk # ignored' > confmf.GNU 11975_am_result=no 11976for s in GNU BSD; do 11977 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 11978 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 11979 ['0:this is the am__doit target'], 11980 [AS_CASE([$s], 11981 [BSD], [am__include='.include' am__quote='"'], 11982 [am__include='include' am__quote=''])]) 11983 if test "$am__include" != "#"; then 11984 _am_result="yes ($s style)" 11985 break 11986 fi 11987done 11988rm -f confinc.* confmf.* 11989AC_MSG_RESULT([${_am_result}]) 11990AC_SUBST([am__include])]) 11991AC_SUBST([am__quote])]) 11992 11993# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11994 11995# Copyright (C) 1997-2020 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_MISSING_PROG(NAME, PROGRAM) 12002# ------------------------------ 12003AC_DEFUN([AM_MISSING_PROG], 12004[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12005$1=${$1-"${am_missing_run}$2"} 12006AC_SUBST($1)]) 12007 12008# AM_MISSING_HAS_RUN 12009# ------------------ 12010# Define MISSING if not defined so far and test if it is modern enough. 12011# If it is, set am_missing_run to use it, otherwise, to nothing. 12012AC_DEFUN([AM_MISSING_HAS_RUN], 12013[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12014AC_REQUIRE_AUX_FILE([missing])dnl 12015if test x"${MISSING+set}" != xset; then 12016 case $am_aux_dir in 12017 *\ * | *\ *) 12018 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12019 *) 12020 MISSING="\${SHELL} $am_aux_dir/missing" ;; 12021 esac 12022fi 12023# Use eval to expand $SHELL 12024if eval "$MISSING --is-lightweight"; then 12025 am_missing_run="$MISSING " 12026else 12027 am_missing_run= 12028 AC_MSG_WARN(['missing' script is too old or missing]) 12029fi 12030]) 12031 12032# Helper functions for option handling. -*- Autoconf -*- 12033 12034# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12035# 12036# This file is free software; the Free Software Foundation 12037# gives unlimited permission to copy and/or distribute it, 12038# with or without modifications, as long as this notice is preserved. 12039 12040# _AM_MANGLE_OPTION(NAME) 12041# ----------------------- 12042AC_DEFUN([_AM_MANGLE_OPTION], 12043[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12044 12045# _AM_SET_OPTION(NAME) 12046# -------------------- 12047# Set option NAME. Presently that only means defining a flag for this option. 12048AC_DEFUN([_AM_SET_OPTION], 12049[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12050 12051# _AM_SET_OPTIONS(OPTIONS) 12052# ------------------------ 12053# OPTIONS is a space-separated list of Automake options. 12054AC_DEFUN([_AM_SET_OPTIONS], 12055[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12056 12057# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12058# ------------------------------------------- 12059# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12060AC_DEFUN([_AM_IF_OPTION], 12061[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12062 12063# Copyright (C) 1999-2020 Free Software Foundation, Inc. 12064# 12065# This file is free software; the Free Software Foundation 12066# gives unlimited permission to copy and/or distribute it, 12067# with or without modifications, as long as this notice is preserved. 12068 12069# _AM_PROG_CC_C_O 12070# --------------- 12071# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12072# to automatically call this. 12073AC_DEFUN([_AM_PROG_CC_C_O], 12074[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12075AC_REQUIRE_AUX_FILE([compile])dnl 12076AC_LANG_PUSH([C])dnl 12077AC_CACHE_CHECK( 12078 [whether $CC understands -c and -o together], 12079 [am_cv_prog_cc_c_o], 12080 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12081 # Make sure it works both with $CC and with simple cc. 12082 # Following AC_PROG_CC_C_O, we do the test twice because some 12083 # compilers refuse to overwrite an existing .o file with -o, 12084 # though they will create one. 12085 am_cv_prog_cc_c_o=yes 12086 for am_i in 1 2; do 12087 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12088 && test -f conftest2.$ac_objext; then 12089 : OK 12090 else 12091 am_cv_prog_cc_c_o=no 12092 break 12093 fi 12094 done 12095 rm -f core conftest* 12096 unset am_i]) 12097if test "$am_cv_prog_cc_c_o" != yes; then 12098 # Losing compiler, so override with the script. 12099 # FIXME: It is wrong to rewrite CC. 12100 # But if we don't then we get into trouble of one sort or another. 12101 # A longer-term fix would be to have automake use am__CC in this case, 12102 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12103 CC="$am_aux_dir/compile $CC" 12104fi 12105AC_LANG_POP([C])]) 12106 12107# For backward compatibility. 12108AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12109 12110# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12111# 12112# This file is free software; the Free Software Foundation 12113# gives unlimited permission to copy and/or distribute it, 12114# with or without modifications, as long as this notice is preserved. 12115 12116# AM_RUN_LOG(COMMAND) 12117# ------------------- 12118# Run COMMAND, save the exit status in ac_status, and log it. 12119# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12120AC_DEFUN([AM_RUN_LOG], 12121[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12122 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12123 ac_status=$? 12124 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12125 (exit $ac_status); }]) 12126 12127# Check to make sure that the build environment is sane. -*- Autoconf -*- 12128 12129# Copyright (C) 1996-2020 Free Software Foundation, Inc. 12130# 12131# This file is free software; the Free Software Foundation 12132# gives unlimited permission to copy and/or distribute it, 12133# with or without modifications, as long as this notice is preserved. 12134 12135# AM_SANITY_CHECK 12136# --------------- 12137AC_DEFUN([AM_SANITY_CHECK], 12138[AC_MSG_CHECKING([whether build environment is sane]) 12139# Reject unsafe characters in $srcdir or the absolute working directory 12140# name. Accept space and tab only in the latter. 12141am_lf=' 12142' 12143case `pwd` in 12144 *[[\\\"\#\$\&\'\`$am_lf]]*) 12145 AC_MSG_ERROR([unsafe absolute working directory name]);; 12146esac 12147case $srcdir in 12148 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12149 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12150esac 12151 12152# Do 'set' in a subshell so we don't clobber the current shell's 12153# arguments. Must try -L first in case configure is actually a 12154# symlink; some systems play weird games with the mod time of symlinks 12155# (eg FreeBSD returns the mod time of the symlink's containing 12156# directory). 12157if ( 12158 am_has_slept=no 12159 for am_try in 1 2; do 12160 echo "timestamp, slept: $am_has_slept" > conftest.file 12161 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12162 if test "$[*]" = "X"; then 12163 # -L didn't work. 12164 set X `ls -t "$srcdir/configure" conftest.file` 12165 fi 12166 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12167 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12168 12169 # If neither matched, then we have a broken ls. This can happen 12170 # if, for instance, CONFIG_SHELL is bash and it inherits a 12171 # broken ls alias from the environment. This has actually 12172 # happened. Such a system could not be considered "sane". 12173 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12174 alias in your environment]) 12175 fi 12176 if test "$[2]" = conftest.file || test $am_try -eq 2; then 12177 break 12178 fi 12179 # Just in case. 12180 sleep 1 12181 am_has_slept=yes 12182 done 12183 test "$[2]" = conftest.file 12184 ) 12185then 12186 # Ok. 12187 : 12188else 12189 AC_MSG_ERROR([newly created file is older than distributed files! 12190Check your system clock]) 12191fi 12192AC_MSG_RESULT([yes]) 12193# If we didn't sleep, we still need to ensure time stamps of config.status and 12194# generated files are strictly newer. 12195am_sleep_pid= 12196if grep 'slept: no' conftest.file >/dev/null 2>&1; then 12197 ( sleep 1 ) & 12198 am_sleep_pid=$! 12199fi 12200AC_CONFIG_COMMANDS_PRE( 12201 [AC_MSG_CHECKING([that generated files are newer than configure]) 12202 if test -n "$am_sleep_pid"; then 12203 # Hide warnings about reused PIDs. 12204 wait $am_sleep_pid 2>/dev/null 12205 fi 12206 AC_MSG_RESULT([done])]) 12207rm -f conftest.file 12208]) 12209 12210# Copyright (C) 2009-2020 Free Software Foundation, Inc. 12211# 12212# This file is free software; the Free Software Foundation 12213# gives unlimited permission to copy and/or distribute it, 12214# with or without modifications, as long as this notice is preserved. 12215 12216# AM_SILENT_RULES([DEFAULT]) 12217# -------------------------- 12218# Enable less verbose build rules; with the default set to DEFAULT 12219# ("yes" being less verbose, "no" or empty being verbose). 12220AC_DEFUN([AM_SILENT_RULES], 12221[AC_ARG_ENABLE([silent-rules], [dnl 12222AS_HELP_STRING( 12223 [--enable-silent-rules], 12224 [less verbose build output (undo: "make V=1")]) 12225AS_HELP_STRING( 12226 [--disable-silent-rules], 12227 [verbose build output (undo: "make V=0")])dnl 12228]) 12229case $enable_silent_rules in @%:@ ((( 12230 yes) AM_DEFAULT_VERBOSITY=0;; 12231 no) AM_DEFAULT_VERBOSITY=1;; 12232 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12233esac 12234dnl 12235dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12236dnl do not support nested variable expansions. 12237dnl See automake bug#9928 and bug#10237. 12238am_make=${MAKE-make} 12239AC_CACHE_CHECK([whether $am_make supports nested variables], 12240 [am_cv_make_support_nested_variables], 12241 [if AS_ECHO([['TRUE=$(BAR$(V)) 12242BAR0=false 12243BAR1=true 12244V=1 12245am__doit: 12246 @$(TRUE) 12247.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12248 am_cv_make_support_nested_variables=yes 12249else 12250 am_cv_make_support_nested_variables=no 12251fi]) 12252if test $am_cv_make_support_nested_variables = yes; then 12253 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12254 AM_V='$(V)' 12255 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12256else 12257 AM_V=$AM_DEFAULT_VERBOSITY 12258 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12259fi 12260AC_SUBST([AM_V])dnl 12261AM_SUBST_NOTMAKE([AM_V])dnl 12262AC_SUBST([AM_DEFAULT_V])dnl 12263AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12264AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12265AM_BACKSLASH='\' 12266AC_SUBST([AM_BACKSLASH])dnl 12267_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12268]) 12269 12270# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12271# 12272# This file is free software; the Free Software Foundation 12273# gives unlimited permission to copy and/or distribute it, 12274# with or without modifications, as long as this notice is preserved. 12275 12276# AM_PROG_INSTALL_STRIP 12277# --------------------- 12278# One issue with vendor 'install' (even GNU) is that you can't 12279# specify the program used to strip binaries. This is especially 12280# annoying in cross-compiling environments, where the build's strip 12281# is unlikely to handle the host's binaries. 12282# Fortunately install-sh will honor a STRIPPROG variable, so we 12283# always use install-sh in "make install-strip", and initialize 12284# STRIPPROG with the value of the STRIP variable (set by the user). 12285AC_DEFUN([AM_PROG_INSTALL_STRIP], 12286[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12287# Installed binaries are usually stripped using 'strip' when the user 12288# run "make install-strip". However 'strip' might not be the right 12289# tool to use in cross-compilation environments, therefore Automake 12290# will honor the 'STRIP' environment variable to overrule this program. 12291dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12292if test "$cross_compiling" != no; then 12293 AC_CHECK_TOOL([STRIP], [strip], :) 12294fi 12295INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12296AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12297 12298# Copyright (C) 2006-2020 Free Software Foundation, Inc. 12299# 12300# This file is free software; the Free Software Foundation 12301# gives unlimited permission to copy and/or distribute it, 12302# with or without modifications, as long as this notice is preserved. 12303 12304# _AM_SUBST_NOTMAKE(VARIABLE) 12305# --------------------------- 12306# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12307# This macro is traced by Automake. 12308AC_DEFUN([_AM_SUBST_NOTMAKE]) 12309 12310# AM_SUBST_NOTMAKE(VARIABLE) 12311# -------------------------- 12312# Public sister of _AM_SUBST_NOTMAKE. 12313AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12314 12315# Check how to create a tarball. -*- Autoconf -*- 12316 12317# Copyright (C) 2004-2020 Free Software Foundation, Inc. 12318# 12319# This file is free software; the Free Software Foundation 12320# gives unlimited permission to copy and/or distribute it, 12321# with or without modifications, as long as this notice is preserved. 12322 12323# _AM_PROG_TAR(FORMAT) 12324# -------------------- 12325# Check how to create a tarball in format FORMAT. 12326# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12327# 12328# Substitute a variable $(am__tar) that is a command 12329# writing to stdout a FORMAT-tarball containing the directory 12330# $tardir. 12331# tardir=directory && $(am__tar) > result.tar 12332# 12333# Substitute a variable $(am__untar) that extract such 12334# a tarball read from stdin. 12335# $(am__untar) < result.tar 12336# 12337AC_DEFUN([_AM_PROG_TAR], 12338[# Always define AMTAR for backward compatibility. Yes, it's still used 12339# in the wild :-( We should find a proper way to deprecate it ... 12340AC_SUBST([AMTAR], ['$${TAR-tar}']) 12341 12342# We'll loop over all known methods to create a tar archive until one works. 12343_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12344 12345m4_if([$1], [v7], 12346 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12347 12348 [m4_case([$1], 12349 [ustar], 12350 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12351 # There is notably a 21 bits limit for the UID and the GID. In fact, 12352 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12353 # and bug#13588). 12354 am_max_uid=2097151 # 2^21 - 1 12355 am_max_gid=$am_max_uid 12356 # The $UID and $GID variables are not portable, so we need to resort 12357 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12358 # below are definitely unexpected, so allow the users to see them 12359 # (that is, avoid stderr redirection). 12360 am_uid=`id -u || echo unknown` 12361 am_gid=`id -g || echo unknown` 12362 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12363 if test $am_uid -le $am_max_uid; then 12364 AC_MSG_RESULT([yes]) 12365 else 12366 AC_MSG_RESULT([no]) 12367 _am_tools=none 12368 fi 12369 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12370 if test $am_gid -le $am_max_gid; then 12371 AC_MSG_RESULT([yes]) 12372 else 12373 AC_MSG_RESULT([no]) 12374 _am_tools=none 12375 fi], 12376 12377 [pax], 12378 [], 12379 12380 [m4_fatal([Unknown tar format])]) 12381 12382 AC_MSG_CHECKING([how to create a $1 tar archive]) 12383 12384 # Go ahead even if we have the value already cached. We do so because we 12385 # need to set the values for the 'am__tar' and 'am__untar' variables. 12386 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12387 12388 for _am_tool in $_am_tools; do 12389 case $_am_tool in 12390 gnutar) 12391 for _am_tar in tar gnutar gtar; do 12392 AM_RUN_LOG([$_am_tar --version]) && break 12393 done 12394 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12395 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12396 am__untar="$_am_tar -xf -" 12397 ;; 12398 plaintar) 12399 # Must skip GNU tar: if it does not support --format= it doesn't create 12400 # ustar tarball either. 12401 (tar --version) >/dev/null 2>&1 && continue 12402 am__tar='tar chf - "$$tardir"' 12403 am__tar_='tar chf - "$tardir"' 12404 am__untar='tar xf -' 12405 ;; 12406 pax) 12407 am__tar='pax -L -x $1 -w "$$tardir"' 12408 am__tar_='pax -L -x $1 -w "$tardir"' 12409 am__untar='pax -r' 12410 ;; 12411 cpio) 12412 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12413 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12414 am__untar='cpio -i -H $1 -d' 12415 ;; 12416 none) 12417 am__tar=false 12418 am__tar_=false 12419 am__untar=false 12420 ;; 12421 esac 12422 12423 # If the value was cached, stop now. We just wanted to have am__tar 12424 # and am__untar set. 12425 test -n "${am_cv_prog_tar_$1}" && break 12426 12427 # tar/untar a dummy directory, and stop if the command works. 12428 rm -rf conftest.dir 12429 mkdir conftest.dir 12430 echo GrepMe > conftest.dir/file 12431 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12432 rm -rf conftest.dir 12433 if test -s conftest.tar; then 12434 AM_RUN_LOG([$am__untar <conftest.tar]) 12435 AM_RUN_LOG([cat conftest.dir/file]) 12436 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12437 fi 12438 done 12439 rm -rf conftest.dir 12440 12441 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12442 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12443 12444AC_SUBST([am__tar]) 12445AC_SUBST([am__untar]) 12446]) # _AM_PROG_TAR 12447 12448