aclocal.m4 revision 4940c694
1# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2018 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 amigaos*) 1726 # On AmigaOS with pdksh, this test takes hours, literally. 1727 # So we just punt and use a minimum line length of 8192. 1728 lt_cv_sys_max_cmd_len=8192; 1729 ;; 1730 1731 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732 # This has been around since 386BSD, at least. Likely further. 1733 if test -x /sbin/sysctl; then 1734 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735 elif test -x /usr/sbin/sysctl; then 1736 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737 else 1738 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739 fi 1740 # And add a safety zone 1741 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743 ;; 1744 1745 interix*) 1746 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747 lt_cv_sys_max_cmd_len=196608 1748 ;; 1749 1750 os2*) 1751 # The test takes a long time on OS/2. 1752 lt_cv_sys_max_cmd_len=8192 1753 ;; 1754 1755 osf*) 1756 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758 # nice to cause kernel panics so lets avoid the loop below. 1759 # First set a reasonable default. 1760 lt_cv_sys_max_cmd_len=16384 1761 # 1762 if test -x /sbin/sysconfig; then 1763 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765 esac 1766 fi 1767 ;; 1768 sco3.2v5*) 1769 lt_cv_sys_max_cmd_len=102400 1770 ;; 1771 sysv5* | sco5v6* | sysv4.2uw2*) 1772 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773 if test -n "$kargmax"; then 1774 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775 else 1776 lt_cv_sys_max_cmd_len=32768 1777 fi 1778 ;; 1779 *) 1780 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781 if test -n "$lt_cv_sys_max_cmd_len" && \ 1782 test undefined != "$lt_cv_sys_max_cmd_len"; then 1783 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785 else 1786 # Make teststring a little bigger before we do anything with it. 1787 # a 1K string should be a reasonable start. 1788 for i in 1 2 3 4 5 6 7 8; do 1789 teststring=$teststring$teststring 1790 done 1791 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792 # If test is not a shell built-in, we'll probably end up computing a 1793 # maximum length that is only half of the actual maximum length, but 1794 # we can't tell. 1795 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797 test 17 != "$i" # 1/2 MB should be enough 1798 do 1799 i=`expr $i + 1` 1800 teststring=$teststring$teststring 1801 done 1802 # Only check the string length outside the loop. 1803 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804 teststring= 1805 # Add a significant safety factor because C++ compilers can tack on 1806 # massive amounts of additional arguments before passing them to the 1807 # linker. It appears as though 1/2 is a usable value. 1808 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809 fi 1810 ;; 1811 esac 1812]) 1813if test -n "$lt_cv_sys_max_cmd_len"; then 1814 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815else 1816 AC_MSG_RESULT(none) 1817fi 1818max_cmd_len=$lt_cv_sys_max_cmd_len 1819_LT_DECL([], [max_cmd_len], [0], 1820 [What is the maximum length of a command?]) 1821])# LT_CMD_MAX_LEN 1822 1823# Old name: 1824AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825dnl aclocal-1.4 backwards compatibility: 1826dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827 1828 1829# _LT_HEADER_DLFCN 1830# ---------------- 1831m4_defun([_LT_HEADER_DLFCN], 1832[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833])# _LT_HEADER_DLFCN 1834 1835 1836# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838# ---------------------------------------------------------------- 1839m4_defun([_LT_TRY_DLOPEN_SELF], 1840[m4_require([_LT_HEADER_DLFCN])dnl 1841if test yes = "$cross_compiling"; then : 1842 [$4] 1843else 1844 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845 lt_status=$lt_dlunknown 1846 cat > conftest.$ac_ext <<_LT_EOF 1847[#line $LINENO "configure" 1848#include "confdefs.h" 1849 1850#if HAVE_DLFCN_H 1851#include <dlfcn.h> 1852#endif 1853 1854#include <stdio.h> 1855 1856#ifdef RTLD_GLOBAL 1857# define LT_DLGLOBAL RTLD_GLOBAL 1858#else 1859# ifdef DL_GLOBAL 1860# define LT_DLGLOBAL DL_GLOBAL 1861# else 1862# define LT_DLGLOBAL 0 1863# endif 1864#endif 1865 1866/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867 find out it does not work in some platform. */ 1868#ifndef LT_DLLAZY_OR_NOW 1869# ifdef RTLD_LAZY 1870# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871# else 1872# ifdef DL_LAZY 1873# define LT_DLLAZY_OR_NOW DL_LAZY 1874# else 1875# ifdef RTLD_NOW 1876# define LT_DLLAZY_OR_NOW RTLD_NOW 1877# else 1878# ifdef DL_NOW 1879# define LT_DLLAZY_OR_NOW DL_NOW 1880# else 1881# define LT_DLLAZY_OR_NOW 0 1882# endif 1883# endif 1884# endif 1885# endif 1886#endif 1887 1888/* When -fvisibility=hidden is used, assume the code has been annotated 1889 correspondingly for the symbols needed. */ 1890#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891int fnord () __attribute__((visibility("default"))); 1892#endif 1893 1894int fnord () { return 42; } 1895int main () 1896{ 1897 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898 int status = $lt_dlunknown; 1899 1900 if (self) 1901 { 1902 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903 else 1904 { 1905 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906 else puts (dlerror ()); 1907 } 1908 /* dlclose (self); */ 1909 } 1910 else 1911 puts (dlerror ()); 1912 1913 return status; 1914}] 1915_LT_EOF 1916 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918 lt_status=$? 1919 case x$lt_status in 1920 x$lt_dlno_uscore) $1 ;; 1921 x$lt_dlneed_uscore) $2 ;; 1922 x$lt_dlunknown|x*) $3 ;; 1923 esac 1924 else : 1925 # compilation failed 1926 $3 1927 fi 1928fi 1929rm -fr conftest* 1930])# _LT_TRY_DLOPEN_SELF 1931 1932 1933# LT_SYS_DLOPEN_SELF 1934# ------------------ 1935AC_DEFUN([LT_SYS_DLOPEN_SELF], 1936[m4_require([_LT_HEADER_DLFCN])dnl 1937if test yes != "$enable_dlopen"; then 1938 enable_dlopen=unknown 1939 enable_dlopen_self=unknown 1940 enable_dlopen_self_static=unknown 1941else 1942 lt_cv_dlopen=no 1943 lt_cv_dlopen_libs= 1944 1945 case $host_os in 1946 beos*) 1947 lt_cv_dlopen=load_add_on 1948 lt_cv_dlopen_libs= 1949 lt_cv_dlopen_self=yes 1950 ;; 1951 1952 mingw* | pw32* | cegcc*) 1953 lt_cv_dlopen=LoadLibrary 1954 lt_cv_dlopen_libs= 1955 ;; 1956 1957 cygwin*) 1958 lt_cv_dlopen=dlopen 1959 lt_cv_dlopen_libs= 1960 ;; 1961 1962 darwin*) 1963 # if libdl is installed we need to link against it 1964 AC_CHECK_LIB([dl], [dlopen], 1965 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966 lt_cv_dlopen=dyld 1967 lt_cv_dlopen_libs= 1968 lt_cv_dlopen_self=yes 1969 ]) 1970 ;; 1971 1972 tpf*) 1973 # Don't try to run any link tests for TPF. We know it's impossible 1974 # because TPF is a cross-compiler, and we know how we open DSOs. 1975 lt_cv_dlopen=dlopen 1976 lt_cv_dlopen_libs= 1977 lt_cv_dlopen_self=no 1978 ;; 1979 1980 *) 1981 AC_CHECK_FUNC([shl_load], 1982 [lt_cv_dlopen=shl_load], 1983 [AC_CHECK_LIB([dld], [shl_load], 1984 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985 [AC_CHECK_FUNC([dlopen], 1986 [lt_cv_dlopen=dlopen], 1987 [AC_CHECK_LIB([dl], [dlopen], 1988 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989 [AC_CHECK_LIB([svld], [dlopen], 1990 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991 [AC_CHECK_LIB([dld], [dld_link], 1992 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993 ]) 1994 ]) 1995 ]) 1996 ]) 1997 ]) 1998 ;; 1999 esac 2000 2001 if test no = "$lt_cv_dlopen"; then 2002 enable_dlopen=no 2003 else 2004 enable_dlopen=yes 2005 fi 2006 2007 case $lt_cv_dlopen in 2008 dlopen) 2009 save_CPPFLAGS=$CPPFLAGS 2010 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011 2012 save_LDFLAGS=$LDFLAGS 2013 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014 2015 save_LIBS=$LIBS 2016 LIBS="$lt_cv_dlopen_libs $LIBS" 2017 2018 AC_CACHE_CHECK([whether a program can dlopen itself], 2019 lt_cv_dlopen_self, [dnl 2020 _LT_TRY_DLOPEN_SELF( 2021 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023 ]) 2024 2025 if test yes = "$lt_cv_dlopen_self"; then 2026 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028 lt_cv_dlopen_self_static, [dnl 2029 _LT_TRY_DLOPEN_SELF( 2030 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032 ]) 2033 fi 2034 2035 CPPFLAGS=$save_CPPFLAGS 2036 LDFLAGS=$save_LDFLAGS 2037 LIBS=$save_LIBS 2038 ;; 2039 esac 2040 2041 case $lt_cv_dlopen_self in 2042 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043 *) enable_dlopen_self=unknown ;; 2044 esac 2045 2046 case $lt_cv_dlopen_self_static in 2047 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048 *) enable_dlopen_self_static=unknown ;; 2049 esac 2050fi 2051_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052 [Whether dlopen is supported]) 2053_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054 [Whether dlopen of programs is supported]) 2055_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056 [Whether dlopen of statically linked programs is supported]) 2057])# LT_SYS_DLOPEN_SELF 2058 2059# Old name: 2060AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061dnl aclocal-1.4 backwards compatibility: 2062dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063 2064 2065# _LT_COMPILER_C_O([TAGNAME]) 2066# --------------------------- 2067# Check to see if options -c and -o are simultaneously supported by compiler. 2068# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069m4_defun([_LT_COMPILER_C_O], 2070[m4_require([_LT_DECL_SED])dnl 2071m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072m4_require([_LT_TAG_COMPILER])dnl 2073AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076 $RM -r conftest 2>/dev/null 2077 mkdir conftest 2078 cd conftest 2079 mkdir out 2080 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081 2082 lt_compiler_flag="-o out/conftest2.$ac_objext" 2083 # Insert the option either (1) after the last *FLAGS variable, or 2084 # (2) before a word containing "conftest.", or (3) at the end. 2085 # Note that $ac_compile itself does not contain backslashes and begins 2086 # with a dollar sign (not a hyphen), so the echo should work correctly. 2087 lt_compile=`echo "$ac_compile" | $SED \ 2088 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090 -e 's:$: $lt_compiler_flag:'` 2091 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092 (eval "$lt_compile" 2>out/conftest.err) 2093 ac_status=$? 2094 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097 then 2098 # The compiler can only warn and ignore the option if not recognized 2099 # So say no if there are warnings 2100 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104 fi 2105 fi 2106 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107 $RM conftest* 2108 # SGI C++ compiler will create directory out/ii_files/ for 2109 # template instantiation 2110 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111 $RM out/* && rmdir out 2112 cd .. 2113 $RM -r conftest 2114 $RM conftest* 2115]) 2116_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117 [Does compiler simultaneously support -c and -o options?]) 2118])# _LT_COMPILER_C_O 2119 2120 2121# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122# ---------------------------------- 2123# Check to see if we can do hard links to lock some files if needed 2124m4_defun([_LT_COMPILER_FILE_LOCKS], 2125[m4_require([_LT_ENABLE_LOCK])dnl 2126m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127_LT_COMPILER_C_O([$1]) 2128 2129hard_links=nottested 2130if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131 # do not overwrite the value of need_locks provided by the user 2132 AC_MSG_CHECKING([if we can lock with hard links]) 2133 hard_links=yes 2134 $RM conftest* 2135 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136 touch conftest.a 2137 ln conftest.a conftest.b 2>&5 || hard_links=no 2138 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139 AC_MSG_RESULT([$hard_links]) 2140 if test no = "$hard_links"; then 2141 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142 need_locks=warn 2143 fi 2144else 2145 need_locks=no 2146fi 2147_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148])# _LT_COMPILER_FILE_LOCKS 2149 2150 2151# _LT_CHECK_OBJDIR 2152# ---------------- 2153m4_defun([_LT_CHECK_OBJDIR], 2154[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155[rm -f .libs 2>/dev/null 2156mkdir .libs 2>/dev/null 2157if test -d .libs; then 2158 lt_cv_objdir=.libs 2159else 2160 # MS-DOS does not allow filenames that begin with a dot. 2161 lt_cv_objdir=_libs 2162fi 2163rmdir .libs 2>/dev/null]) 2164objdir=$lt_cv_objdir 2165_LT_DECL([], [objdir], [0], 2166 [The name of the directory that contains temporary libtool files])dnl 2167m4_pattern_allow([LT_OBJDIR])dnl 2168AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170])# _LT_CHECK_OBJDIR 2171 2172 2173# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174# -------------------------------------- 2175# Check hardcoding attributes. 2176m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178_LT_TAGVAR(hardcode_action, $1)= 2179if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182 2183 # We can hardcode non-existent directories. 2184 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186 # have to relink, otherwise we might link with an installed library 2187 # when we should be linking with a yet-to-be-installed one 2188 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190 # Linking always hardcodes the temporary library directory. 2191 _LT_TAGVAR(hardcode_action, $1)=relink 2192 else 2193 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194 _LT_TAGVAR(hardcode_action, $1)=immediate 2195 fi 2196else 2197 # We cannot hardcode anything, or else we can only hardcode existing 2198 # directories. 2199 _LT_TAGVAR(hardcode_action, $1)=unsupported 2200fi 2201AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202 2203if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205 # Fast installation is not supported 2206 enable_fast_install=no 2207elif test yes = "$shlibpath_overrides_runpath" || 2208 test no = "$enable_shared"; then 2209 # Fast installation is not necessary 2210 enable_fast_install=needless 2211fi 2212_LT_TAGDECL([], [hardcode_action], [0], 2213 [How to hardcode a shared library path into an executable]) 2214])# _LT_LINKER_HARDCODE_LIBPATH 2215 2216 2217# _LT_CMD_STRIPLIB 2218# ---------------- 2219m4_defun([_LT_CMD_STRIPLIB], 2220[m4_require([_LT_DECL_EGREP]) 2221striplib= 2222old_striplib= 2223AC_MSG_CHECKING([whether stripping libraries is possible]) 2224if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227 AC_MSG_RESULT([yes]) 2228else 2229# FIXME - insert some real tests, host_os isn't really good enough 2230 case $host_os in 2231 darwin*) 2232 if test -n "$STRIP"; then 2233 striplib="$STRIP -x" 2234 old_striplib="$STRIP -S" 2235 AC_MSG_RESULT([yes]) 2236 else 2237 AC_MSG_RESULT([no]) 2238 fi 2239 ;; 2240 *) 2241 AC_MSG_RESULT([no]) 2242 ;; 2243 esac 2244fi 2245_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246_LT_DECL([], [striplib], [1]) 2247])# _LT_CMD_STRIPLIB 2248 2249 2250# _LT_PREPARE_MUNGE_PATH_LIST 2251# --------------------------- 2252# Make sure func_munge_path_list() is defined correctly. 2253m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254[[# func_munge_path_list VARIABLE PATH 2255# ----------------------------------- 2256# VARIABLE is name of variable containing _space_ separated list of 2257# directories to be munged by the contents of PATH, which is string 2258# having a format: 2259# "DIR[:DIR]:" 2260# string "DIR[ DIR]" will be prepended to VARIABLE 2261# ":DIR[:DIR]" 2262# string "DIR[ DIR]" will be appended to VARIABLE 2263# "DIRP[:DIRP]::[DIRA:]DIRA" 2264# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265# "DIRA[ DIRA]" will be appended to VARIABLE 2266# "DIR[:DIR]" 2267# VARIABLE will be replaced by "DIR[ DIR]" 2268func_munge_path_list () 2269{ 2270 case x@S|@2 in 2271 x) 2272 ;; 2273 *:) 2274 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275 ;; 2276 x:*) 2277 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278 ;; 2279 *::*) 2280 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282 ;; 2283 *) 2284 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285 ;; 2286 esac 2287} 2288]])# _LT_PREPARE_PATH_LIST 2289 2290 2291# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292# ----------------------------- 2293# PORTME Fill in your ld.so characteristics 2294m4_defun([_LT_SYS_DYNAMIC_LINKER], 2295[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296m4_require([_LT_DECL_EGREP])dnl 2297m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298m4_require([_LT_DECL_OBJDUMP])dnl 2299m4_require([_LT_DECL_SED])dnl 2300m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302AC_MSG_CHECKING([dynamic linker characteristics]) 2303m4_if([$1], 2304 [], [ 2305if test yes = "$GCC"; then 2306 case $host_os in 2307 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308 *) lt_awk_arg='/^libraries:/' ;; 2309 esac 2310 case $host_os in 2311 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312 *) lt_sed_strip_eq='s|=/|/|g' ;; 2313 esac 2314 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315 case $lt_search_path_spec in 2316 *\;*) 2317 # if the path contains ";" then we assume it to be the separator 2318 # otherwise default to the standard path separator (i.e. ":") - it is 2319 # assumed that no part of a normal pathname contains ";" but that should 2320 # okay in the real world where ";" in dirpaths is itself problematic. 2321 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322 ;; 2323 *) 2324 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325 ;; 2326 esac 2327 # Ok, now we have the path, separated by spaces, we can step through it 2328 # and add multilib dir if necessary... 2329 lt_tmp_lt_search_path_spec= 2330 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331 # ...but if some path component already ends with the multilib dir we assume 2332 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333 case "$lt_multi_os_dir; $lt_search_path_spec " in 2334 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335 lt_multi_os_dir= 2336 ;; 2337 esac 2338 for lt_sys_path in $lt_search_path_spec; do 2339 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341 elif test -n "$lt_multi_os_dir"; then 2342 test -d "$lt_sys_path" && \ 2343 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344 fi 2345 done 2346 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347BEGIN {RS = " "; FS = "/|\n";} { 2348 lt_foo = ""; 2349 lt_count = 0; 2350 for (lt_i = NF; lt_i > 0; lt_i--) { 2351 if ($lt_i != "" && $lt_i != ".") { 2352 if ($lt_i == "..") { 2353 lt_count++; 2354 } else { 2355 if (lt_count == 0) { 2356 lt_foo = "/" $lt_i lt_foo; 2357 } else { 2358 lt_count--; 2359 } 2360 } 2361 } 2362 } 2363 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365}'` 2366 # AWK program above erroneously prepends '/' to C:/dos/paths 2367 # for these hosts. 2368 case $host_os in 2369 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371 esac 2372 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373else 2374 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375fi]) 2376library_names_spec= 2377libname_spec='lib$name' 2378soname_spec= 2379shrext_cmds=.so 2380postinstall_cmds= 2381postuninstall_cmds= 2382finish_cmds= 2383finish_eval= 2384shlibpath_var= 2385shlibpath_overrides_runpath=unknown 2386version_type=none 2387dynamic_linker="$host_os ld.so" 2388sys_lib_dlsearch_path_spec="/lib /usr/lib" 2389need_lib_prefix=unknown 2390hardcode_into_libs=no 2391 2392# when you set need_version to no, make sure it does not cause -set_version 2393# flags to be left without arguments 2394need_version=unknown 2395 2396AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397[User-defined run-time library search path.]) 2398 2399case $host_os in 2400aix3*) 2401 version_type=linux # correct to gnu/linux during the next big refactor 2402 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403 shlibpath_var=LIBPATH 2404 2405 # AIX 3 has no versioning support, so we append a major version to the name. 2406 soname_spec='$libname$release$shared_ext$major' 2407 ;; 2408 2409aix[[4-9]]*) 2410 version_type=linux # correct to gnu/linux during the next big refactor 2411 need_lib_prefix=no 2412 need_version=no 2413 hardcode_into_libs=yes 2414 if test ia64 = "$host_cpu"; then 2415 # AIX 5 supports IA64 2416 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417 shlibpath_var=LD_LIBRARY_PATH 2418 else 2419 # With GCC up to 2.95.x, collect2 would create an import file 2420 # for dependence libraries. The import file would start with 2421 # the line '#! .'. This would cause the generated library to 2422 # depend on '.', always an invalid library. This was fixed in 2423 # development snapshots of GCC prior to 3.0. 2424 case $host_os in 2425 aix4 | aix4.[[01]] | aix4.[[01]].*) 2426 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427 echo ' yes ' 2428 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429 : 2430 else 2431 can_build_shared=no 2432 fi 2433 ;; 2434 esac 2435 # Using Import Files as archive members, it is possible to support 2436 # filename-based versioning of shared library archives on AIX. While 2437 # this would work for both with and without runtime linking, it will 2438 # prevent static linking of such archives. So we do filename-based 2439 # shared library versioning with .so extension only, which is used 2440 # when both runtime linking and shared linking is enabled. 2441 # Unfortunately, runtime linking may impact performance, so we do 2442 # not want this to be the default eventually. Also, we use the 2443 # versioned .so libs for executables only if there is the -brtl 2444 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445 # To allow for filename-based versioning support, we need to create 2446 # libNAME.so.V as an archive file, containing: 2447 # *) an Import File, referring to the versioned filename of the 2448 # archive as well as the shared archive member, telling the 2449 # bitwidth (32 or 64) of that shared object, and providing the 2450 # list of exported symbols of that shared object, eventually 2451 # decorated with the 'weak' keyword 2452 # *) the shared object with the F_LOADONLY flag set, to really avoid 2453 # it being seen by the linker. 2454 # At run time we better use the real file rather than another symlink, 2455 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456 2457 case $with_aix_soname,$aix_use_runtimelinking in 2458 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459 # soname into executable. Probably we can add versioning support to 2460 # collect2, so additional links can be useful in future. 2461 aix,yes) # traditional libtool 2462 dynamic_linker='AIX unversionable lib.so' 2463 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464 # instead of lib<name>.a to let people know that these are not 2465 # typical AIX shared libraries. 2466 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467 ;; 2468 aix,no) # traditional AIX only 2469 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470 # We preserve .a as extension for shared libraries through AIX4.2 2471 # and later when we are not doing run time linking. 2472 library_names_spec='$libname$release.a $libname.a' 2473 soname_spec='$libname$release$shared_ext$major' 2474 ;; 2475 svr4,*) # full svr4 only 2476 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478 # We do not specify a path in Import Files, so LIBPATH fires. 2479 shlibpath_overrides_runpath=yes 2480 ;; 2481 *,yes) # both, prefer svr4 2482 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484 # unpreferred sharedlib libNAME.a needs extra handling 2485 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"' 2486 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"' 2487 # We do not specify a path in Import Files, so LIBPATH fires. 2488 shlibpath_overrides_runpath=yes 2489 ;; 2490 *,no) # both, prefer aix 2491 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492 library_names_spec='$libname$release.a $libname.a' 2493 soname_spec='$libname$release$shared_ext$major' 2494 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495 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)' 2496 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"' 2497 ;; 2498 esac 2499 shlibpath_var=LIBPATH 2500 fi 2501 ;; 2502 2503amigaos*) 2504 case $host_cpu in 2505 powerpc) 2506 # Since July 2007 AmigaOS4 officially supports .so libraries. 2507 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509 ;; 2510 m68k) 2511 library_names_spec='$libname.ixlibrary $libname.a' 2512 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513 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' 2514 ;; 2515 esac 2516 ;; 2517 2518beos*) 2519 library_names_spec='$libname$shared_ext' 2520 dynamic_linker="$host_os ld.so" 2521 shlibpath_var=LIBRARY_PATH 2522 ;; 2523 2524bsdi[[45]]*) 2525 version_type=linux # correct to gnu/linux during the next big refactor 2526 need_version=no 2527 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528 soname_spec='$libname$release$shared_ext$major' 2529 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530 shlibpath_var=LD_LIBRARY_PATH 2531 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533 # the default ld.so.conf also contains /usr/contrib/lib and 2534 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535 # libtool to hard-code these into programs 2536 ;; 2537 2538cygwin* | mingw* | pw32* | cegcc*) 2539 version_type=windows 2540 shrext_cmds=.dll 2541 need_version=no 2542 need_lib_prefix=no 2543 2544 case $GCC,$cc_basename in 2545 yes,*) 2546 # gcc 2547 library_names_spec='$libname.dll.a' 2548 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549 postinstall_cmds='base_file=`basename \$file`~ 2550 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551 dldir=$destdir/`dirname \$dlpath`~ 2552 test -d \$dldir || mkdir -p \$dldir~ 2553 $install_prog $dir/$dlname \$dldir/$dlname~ 2554 chmod a+x \$dldir/$dlname~ 2555 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557 fi' 2558 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559 dlpath=$dir/\$dldll~ 2560 $RM \$dlpath' 2561 shlibpath_overrides_runpath=yes 2562 2563 case $host_os in 2564 cygwin*) 2565 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567m4_if([$1], [],[ 2568 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569 ;; 2570 mingw* | cegcc*) 2571 # MinGW DLLs use traditional 'lib' prefix 2572 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573 ;; 2574 pw32*) 2575 # pw32 DLLs use 'pw' prefix rather than 'lib' 2576 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577 ;; 2578 esac 2579 dynamic_linker='Win32 ld.exe' 2580 ;; 2581 2582 *,cl*) 2583 # Native MSVC 2584 libname_spec='$name' 2585 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586 library_names_spec='$libname.dll.lib' 2587 2588 case $build_os in 2589 mingw*) 2590 sys_lib_search_path_spec= 2591 lt_save_ifs=$IFS 2592 IFS=';' 2593 for lt_path in $LIB 2594 do 2595 IFS=$lt_save_ifs 2596 # Let DOS variable expansion print the short 8.3 style file name. 2597 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599 done 2600 IFS=$lt_save_ifs 2601 # Convert to MSYS style. 2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603 ;; 2604 cygwin*) 2605 # Convert to unix form, then to dos form, then back to unix form 2606 # but this time dos style (no spaces!) so that the unix form looks 2607 # like /cygdrive/c/PROGRA~1:/cygdr... 2608 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611 ;; 2612 *) 2613 sys_lib_search_path_spec=$LIB 2614 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615 # It is most probably a Windows format PATH. 2616 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617 else 2618 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619 fi 2620 # FIXME: find the short name or the path components, as spaces are 2621 # common. (e.g. "Program Files" -> "PROGRA~1") 2622 ;; 2623 esac 2624 2625 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626 postinstall_cmds='base_file=`basename \$file`~ 2627 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628 dldir=$destdir/`dirname \$dlpath`~ 2629 test -d \$dldir || mkdir -p \$dldir~ 2630 $install_prog $dir/$dlname \$dldir/$dlname' 2631 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632 dlpath=$dir/\$dldll~ 2633 $RM \$dlpath' 2634 shlibpath_overrides_runpath=yes 2635 dynamic_linker='Win32 link.exe' 2636 ;; 2637 2638 *) 2639 # Assume MSVC wrapper 2640 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641 dynamic_linker='Win32 ld.exe' 2642 ;; 2643 esac 2644 # FIXME: first we should search . and the directory the executable is in 2645 shlibpath_var=PATH 2646 ;; 2647 2648darwin* | rhapsody*) 2649 dynamic_linker="$host_os dyld" 2650 version_type=darwin 2651 need_lib_prefix=no 2652 need_version=no 2653 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654 soname_spec='$libname$release$major$shared_ext' 2655 shlibpath_overrides_runpath=yes 2656 shlibpath_var=DYLD_LIBRARY_PATH 2657 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658m4_if([$1], [],[ 2659 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661 ;; 2662 2663dgux*) 2664 version_type=linux # correct to gnu/linux during the next big refactor 2665 need_lib_prefix=no 2666 need_version=no 2667 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668 soname_spec='$libname$release$shared_ext$major' 2669 shlibpath_var=LD_LIBRARY_PATH 2670 ;; 2671 2672freebsd* | dragonfly*) 2673 # DragonFly does not have aout. When/if they implement a new 2674 # versioning mechanism, adjust this. 2675 if test -x /usr/bin/objformat; then 2676 objformat=`/usr/bin/objformat` 2677 else 2678 case $host_os in 2679 freebsd[[23]].*) objformat=aout ;; 2680 *) objformat=elf ;; 2681 esac 2682 fi 2683 # Handle Gentoo/FreeBSD as it was Linux 2684 case $host_vendor in 2685 gentoo) 2686 version_type=linux ;; 2687 *) 2688 version_type=freebsd-$objformat ;; 2689 esac 2690 2691 case $version_type in 2692 freebsd-elf*) 2693 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2694 soname_spec='$libname$release$shared_ext$major' 2695 need_version=no 2696 need_lib_prefix=no 2697 ;; 2698 freebsd-*) 2699 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2700 need_version=yes 2701 ;; 2702 linux) 2703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2704 soname_spec='${libname}${release}${shared_ext}$major' 2705 need_lib_prefix=no 2706 need_version=no 2707 ;; 2708 esac 2709 shlibpath_var=LD_LIBRARY_PATH 2710 case $host_os in 2711 freebsd2.*) 2712 shlibpath_overrides_runpath=yes 2713 ;; 2714 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2715 shlibpath_overrides_runpath=yes 2716 hardcode_into_libs=yes 2717 ;; 2718 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2719 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2720 shlibpath_overrides_runpath=no 2721 hardcode_into_libs=yes 2722 ;; 2723 *) # from 4.6 on, and DragonFly 2724 shlibpath_overrides_runpath=yes 2725 hardcode_into_libs=yes 2726 ;; 2727 esac 2728 ;; 2729 2730haiku*) 2731 version_type=linux # correct to gnu/linux during the next big refactor 2732 need_lib_prefix=no 2733 need_version=no 2734 dynamic_linker="$host_os runtime_loader" 2735 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2736 soname_spec='$libname$release$shared_ext$major' 2737 shlibpath_var=LIBRARY_PATH 2738 shlibpath_overrides_runpath=no 2739 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2740 hardcode_into_libs=yes 2741 ;; 2742 2743hpux9* | hpux10* | hpux11*) 2744 # Give a soname corresponding to the major version so that dld.sl refuses to 2745 # link against other versions. 2746 version_type=sunos 2747 need_lib_prefix=no 2748 need_version=no 2749 case $host_cpu in 2750 ia64*) 2751 shrext_cmds='.so' 2752 hardcode_into_libs=yes 2753 dynamic_linker="$host_os dld.so" 2754 shlibpath_var=LD_LIBRARY_PATH 2755 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2756 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2757 soname_spec='$libname$release$shared_ext$major' 2758 if test 32 = "$HPUX_IA64_MODE"; then 2759 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2760 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2761 else 2762 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2763 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2764 fi 2765 ;; 2766 hppa*64*) 2767 shrext_cmds='.sl' 2768 hardcode_into_libs=yes 2769 dynamic_linker="$host_os dld.sl" 2770 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2771 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2772 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2773 soname_spec='$libname$release$shared_ext$major' 2774 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2775 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2776 ;; 2777 *) 2778 shrext_cmds='.sl' 2779 dynamic_linker="$host_os dld.sl" 2780 shlibpath_var=SHLIB_PATH 2781 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2782 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2783 soname_spec='$libname$release$shared_ext$major' 2784 ;; 2785 esac 2786 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2787 postinstall_cmds='chmod 555 $lib' 2788 # or fails outright, so override atomically: 2789 install_override_mode=555 2790 ;; 2791 2792interix[[3-9]]*) 2793 version_type=linux # correct to gnu/linux during the next big refactor 2794 need_lib_prefix=no 2795 need_version=no 2796 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2797 soname_spec='$libname$release$shared_ext$major' 2798 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2799 shlibpath_var=LD_LIBRARY_PATH 2800 shlibpath_overrides_runpath=no 2801 hardcode_into_libs=yes 2802 ;; 2803 2804irix5* | irix6* | nonstopux*) 2805 case $host_os in 2806 nonstopux*) version_type=nonstopux ;; 2807 *) 2808 if test yes = "$lt_cv_prog_gnu_ld"; then 2809 version_type=linux # correct to gnu/linux during the next big refactor 2810 else 2811 version_type=irix 2812 fi ;; 2813 esac 2814 need_lib_prefix=no 2815 need_version=no 2816 soname_spec='$libname$release$shared_ext$major' 2817 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2818 case $host_os in 2819 irix5* | nonstopux*) 2820 libsuff= shlibsuff= 2821 ;; 2822 *) 2823 case $LD in # libtool.m4 will add one of these switches to LD 2824 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2825 libsuff= shlibsuff= libmagic=32-bit;; 2826 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2827 libsuff=32 shlibsuff=N32 libmagic=N32;; 2828 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2829 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2830 *) libsuff= shlibsuff= libmagic=never-match;; 2831 esac 2832 ;; 2833 esac 2834 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2835 shlibpath_overrides_runpath=no 2836 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2837 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2838 hardcode_into_libs=yes 2839 ;; 2840 2841# No shared lib support for Linux oldld, aout, or coff. 2842linux*oldld* | linux*aout* | linux*coff*) 2843 dynamic_linker=no 2844 ;; 2845 2846linux*android*) 2847 version_type=none # Android doesn't support versioned libraries. 2848 need_lib_prefix=no 2849 need_version=no 2850 library_names_spec='$libname$release$shared_ext' 2851 soname_spec='$libname$release$shared_ext' 2852 finish_cmds= 2853 shlibpath_var=LD_LIBRARY_PATH 2854 shlibpath_overrides_runpath=yes 2855 2856 # This implies no fast_install, which is unacceptable. 2857 # Some rework will be needed to allow for fast_install 2858 # before this can be enabled. 2859 hardcode_into_libs=yes 2860 2861 dynamic_linker='Android linker' 2862 # Don't embed -rpath directories since the linker doesn't support them. 2863 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2864 ;; 2865 2866# This must be glibc/ELF. 2867linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2868 version_type=linux # correct to gnu/linux during the next big refactor 2869 need_lib_prefix=no 2870 need_version=no 2871 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2872 soname_spec='$libname$release$shared_ext$major' 2873 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2874 shlibpath_var=LD_LIBRARY_PATH 2875 shlibpath_overrides_runpath=no 2876 2877 # Some binutils ld are patched to set DT_RUNPATH 2878 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2879 [lt_cv_shlibpath_overrides_runpath=no 2880 save_LDFLAGS=$LDFLAGS 2881 save_libdir=$libdir 2882 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2883 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2884 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2885 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2886 [lt_cv_shlibpath_overrides_runpath=yes])]) 2887 LDFLAGS=$save_LDFLAGS 2888 libdir=$save_libdir 2889 ]) 2890 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2891 2892 # This implies no fast_install, which is unacceptable. 2893 # Some rework will be needed to allow for fast_install 2894 # before this can be enabled. 2895 hardcode_into_libs=yes 2896 2897 # Ideally, we could use ldconfig to report *all* directores which are 2898 # searched for libraries, however this is still not possible. Aside from not 2899 # being certain /sbin/ldconfig is available, command 2900 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2901 # even though it is searched at run-time. Try to do the best guess by 2902 # appending ld.so.conf contents (and includes) to the search path. 2903 if test -f /etc/ld.so.conf; then 2904 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' ' '` 2905 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2906 fi 2907 2908 # We used to test for /lib/ld.so.1 and disable shared libraries on 2909 # powerpc, because MkLinux only supported shared libraries with the 2910 # GNU dynamic linker. Since this was broken with cross compilers, 2911 # most powerpc-linux boxes support dynamic linking these days and 2912 # people can always --disable-shared, the test was removed, and we 2913 # assume the GNU/Linux dynamic linker is in use. 2914 dynamic_linker='GNU/Linux ld.so' 2915 ;; 2916 2917netbsd*) 2918 version_type=sunos 2919 need_lib_prefix=no 2920 need_version=no 2921 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2922 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2923 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2924 dynamic_linker='NetBSD (a.out) ld.so' 2925 else 2926 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2927 soname_spec='$libname$release$shared_ext$major' 2928 dynamic_linker='NetBSD ld.elf_so' 2929 fi 2930 shlibpath_var=LD_LIBRARY_PATH 2931 shlibpath_overrides_runpath=yes 2932 hardcode_into_libs=yes 2933 ;; 2934 2935newsos6) 2936 version_type=linux # correct to gnu/linux during the next big refactor 2937 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2938 shlibpath_var=LD_LIBRARY_PATH 2939 shlibpath_overrides_runpath=yes 2940 ;; 2941 2942*nto* | *qnx*) 2943 version_type=qnx 2944 need_lib_prefix=no 2945 need_version=no 2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2947 soname_spec='$libname$release$shared_ext$major' 2948 shlibpath_var=LD_LIBRARY_PATH 2949 shlibpath_overrides_runpath=no 2950 hardcode_into_libs=yes 2951 dynamic_linker='ldqnx.so' 2952 ;; 2953 2954openbsd* | bitrig*) 2955 version_type=sunos 2956 sys_lib_dlsearch_path_spec=/usr/lib 2957 need_lib_prefix=no 2958 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2959 need_version=no 2960 else 2961 need_version=yes 2962 fi 2963 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2964 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2965 shlibpath_var=LD_LIBRARY_PATH 2966 shlibpath_overrides_runpath=yes 2967 ;; 2968 2969os2*) 2970 libname_spec='$name' 2971 version_type=windows 2972 shrext_cmds=.dll 2973 need_version=no 2974 need_lib_prefix=no 2975 # OS/2 can only load a DLL with a base name of 8 characters or less. 2976 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2977 v=$($ECHO $release$versuffix | tr -d .-); 2978 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2979 $ECHO $n$v`$shared_ext' 2980 library_names_spec='${libname}_dll.$libext' 2981 dynamic_linker='OS/2 ld.exe' 2982 shlibpath_var=BEGINLIBPATH 2983 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2984 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2985 postinstall_cmds='base_file=`basename \$file`~ 2986 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2987 dldir=$destdir/`dirname \$dlpath`~ 2988 test -d \$dldir || mkdir -p \$dldir~ 2989 $install_prog $dir/$dlname \$dldir/$dlname~ 2990 chmod a+x \$dldir/$dlname~ 2991 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2992 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2993 fi' 2994 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2995 dlpath=$dir/\$dldll~ 2996 $RM \$dlpath' 2997 ;; 2998 2999osf3* | osf4* | osf5*) 3000 version_type=osf 3001 need_lib_prefix=no 3002 need_version=no 3003 soname_spec='$libname$release$shared_ext$major' 3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3005 shlibpath_var=LD_LIBRARY_PATH 3006 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3007 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3008 ;; 3009 3010rdos*) 3011 dynamic_linker=no 3012 ;; 3013 3014solaris*) 3015 version_type=linux # correct to gnu/linux during the next big refactor 3016 need_lib_prefix=no 3017 need_version=no 3018 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3019 soname_spec='$libname$release$shared_ext$major' 3020 shlibpath_var=LD_LIBRARY_PATH 3021 shlibpath_overrides_runpath=yes 3022 hardcode_into_libs=yes 3023 # ldd complains unless libraries are executable 3024 postinstall_cmds='chmod +x $lib' 3025 ;; 3026 3027sunos4*) 3028 version_type=sunos 3029 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3030 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3031 shlibpath_var=LD_LIBRARY_PATH 3032 shlibpath_overrides_runpath=yes 3033 if test yes = "$with_gnu_ld"; then 3034 need_lib_prefix=no 3035 fi 3036 need_version=yes 3037 ;; 3038 3039sysv4 | sysv4.3*) 3040 version_type=linux # correct to gnu/linux during the next big refactor 3041 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3042 soname_spec='$libname$release$shared_ext$major' 3043 shlibpath_var=LD_LIBRARY_PATH 3044 case $host_vendor in 3045 sni) 3046 shlibpath_overrides_runpath=no 3047 need_lib_prefix=no 3048 runpath_var=LD_RUN_PATH 3049 ;; 3050 siemens) 3051 need_lib_prefix=no 3052 ;; 3053 motorola) 3054 need_lib_prefix=no 3055 need_version=no 3056 shlibpath_overrides_runpath=no 3057 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3058 ;; 3059 esac 3060 ;; 3061 3062sysv4*MP*) 3063 if test -d /usr/nec; then 3064 version_type=linux # correct to gnu/linux during the next big refactor 3065 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3066 soname_spec='$libname$shared_ext.$major' 3067 shlibpath_var=LD_LIBRARY_PATH 3068 fi 3069 ;; 3070 3071sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3072 version_type=sco 3073 need_lib_prefix=no 3074 need_version=no 3075 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3076 soname_spec='$libname$release$shared_ext$major' 3077 shlibpath_var=LD_LIBRARY_PATH 3078 shlibpath_overrides_runpath=yes 3079 hardcode_into_libs=yes 3080 if test yes = "$with_gnu_ld"; then 3081 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3082 else 3083 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3084 case $host_os in 3085 sco3.2v5*) 3086 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3087 ;; 3088 esac 3089 fi 3090 sys_lib_dlsearch_path_spec='/usr/lib' 3091 ;; 3092 3093tpf*) 3094 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3095 version_type=linux # correct to gnu/linux during the next big refactor 3096 need_lib_prefix=no 3097 need_version=no 3098 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3099 shlibpath_var=LD_LIBRARY_PATH 3100 shlibpath_overrides_runpath=no 3101 hardcode_into_libs=yes 3102 ;; 3103 3104uts4*) 3105 version_type=linux # correct to gnu/linux during the next big refactor 3106 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3107 soname_spec='$libname$release$shared_ext$major' 3108 shlibpath_var=LD_LIBRARY_PATH 3109 ;; 3110 3111*) 3112 dynamic_linker=no 3113 ;; 3114esac 3115AC_MSG_RESULT([$dynamic_linker]) 3116test no = "$dynamic_linker" && can_build_shared=no 3117 3118variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3119if test yes = "$GCC"; then 3120 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3121fi 3122 3123if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3124 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3125fi 3126 3127if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3128 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129fi 3130 3131# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3132configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3133 3134# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3135func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3136 3137# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3138configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3139 3140_LT_DECL([], [variables_saved_for_relink], [1], 3141 [Variables whose values should be saved in libtool wrapper scripts and 3142 restored at link time]) 3143_LT_DECL([], [need_lib_prefix], [0], 3144 [Do we need the "lib" prefix for modules?]) 3145_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3146_LT_DECL([], [version_type], [0], [Library versioning type]) 3147_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3148_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3149_LT_DECL([], [shlibpath_overrides_runpath], [0], 3150 [Is shlibpath searched before the hard-coded library search path?]) 3151_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3152_LT_DECL([], [library_names_spec], [1], 3153 [[List of archive names. First name is the real one, the rest are links. 3154 The last name is the one that the linker finds with -lNAME]]) 3155_LT_DECL([], [soname_spec], [1], 3156 [[The coded name of the library, if different from the real name]]) 3157_LT_DECL([], [install_override_mode], [1], 3158 [Permission mode override for installation of shared libraries]) 3159_LT_DECL([], [postinstall_cmds], [2], 3160 [Command to use after installation of a shared archive]) 3161_LT_DECL([], [postuninstall_cmds], [2], 3162 [Command to use after uninstallation of a shared archive]) 3163_LT_DECL([], [finish_cmds], [2], 3164 [Commands used to finish a libtool library installation in a directory]) 3165_LT_DECL([], [finish_eval], [1], 3166 [[As "finish_cmds", except a single script fragment to be evaled but 3167 not shown]]) 3168_LT_DECL([], [hardcode_into_libs], [0], 3169 [Whether we should hardcode library paths into libraries]) 3170_LT_DECL([], [sys_lib_search_path_spec], [2], 3171 [Compile-time system search path for libraries]) 3172_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3173 [Detected run-time system search path for libraries]) 3174_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3175 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3176])# _LT_SYS_DYNAMIC_LINKER 3177 3178 3179# _LT_PATH_TOOL_PREFIX(TOOL) 3180# -------------------------- 3181# find a file program that can recognize shared library 3182AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3183[m4_require([_LT_DECL_EGREP])dnl 3184AC_MSG_CHECKING([for $1]) 3185AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3186[case $MAGIC_CMD in 3187[[\\/*] | ?:[\\/]*]) 3188 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3189 ;; 3190*) 3191 lt_save_MAGIC_CMD=$MAGIC_CMD 3192 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3193dnl $ac_dummy forces splitting on constant user-supplied paths. 3194dnl POSIX.2 word splitting is done only on the output of word expansions, 3195dnl not every word. This closes a longstanding sh security hole. 3196 ac_dummy="m4_if([$2], , $PATH, [$2])" 3197 for ac_dir in $ac_dummy; do 3198 IFS=$lt_save_ifs 3199 test -z "$ac_dir" && ac_dir=. 3200 if test -f "$ac_dir/$1"; then 3201 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3202 if test -n "$file_magic_test_file"; then 3203 case $deplibs_check_method in 3204 "file_magic "*) 3205 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3206 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3208 $EGREP "$file_magic_regex" > /dev/null; then 3209 : 3210 else 3211 cat <<_LT_EOF 1>&2 3212 3213*** Warning: the command libtool uses to detect shared libraries, 3214*** $file_magic_cmd, produces output that libtool cannot recognize. 3215*** The result is that libtool may fail to recognize shared libraries 3216*** as such. This will affect the creation of libtool libraries that 3217*** depend on shared libraries, but programs linked with such libtool 3218*** libraries will work regardless of this problem. Nevertheless, you 3219*** may want to report the problem to your system manager and/or to 3220*** bug-libtool@gnu.org 3221 3222_LT_EOF 3223 fi ;; 3224 esac 3225 fi 3226 break 3227 fi 3228 done 3229 IFS=$lt_save_ifs 3230 MAGIC_CMD=$lt_save_MAGIC_CMD 3231 ;; 3232esac]) 3233MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3234if test -n "$MAGIC_CMD"; then 3235 AC_MSG_RESULT($MAGIC_CMD) 3236else 3237 AC_MSG_RESULT(no) 3238fi 3239_LT_DECL([], [MAGIC_CMD], [0], 3240 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3241])# _LT_PATH_TOOL_PREFIX 3242 3243# Old name: 3244AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3245dnl aclocal-1.4 backwards compatibility: 3246dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3247 3248 3249# _LT_PATH_MAGIC 3250# -------------- 3251# find a file program that can recognize a shared library 3252m4_defun([_LT_PATH_MAGIC], 3253[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3254if test -z "$lt_cv_path_MAGIC_CMD"; then 3255 if test -n "$ac_tool_prefix"; then 3256 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3257 else 3258 MAGIC_CMD=: 3259 fi 3260fi 3261])# _LT_PATH_MAGIC 3262 3263 3264# LT_PATH_LD 3265# ---------- 3266# find the pathname to the GNU or non-GNU linker 3267AC_DEFUN([LT_PATH_LD], 3268[AC_REQUIRE([AC_PROG_CC])dnl 3269AC_REQUIRE([AC_CANONICAL_HOST])dnl 3270AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3271m4_require([_LT_DECL_SED])dnl 3272m4_require([_LT_DECL_EGREP])dnl 3273m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3274 3275AC_ARG_WITH([gnu-ld], 3276 [AS_HELP_STRING([--with-gnu-ld], 3277 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3278 [test no = "$withval" || with_gnu_ld=yes], 3279 [with_gnu_ld=no])dnl 3280 3281ac_prog=ld 3282if test yes = "$GCC"; then 3283 # Check if gcc -print-prog-name=ld gives a path. 3284 AC_MSG_CHECKING([for ld used by $CC]) 3285 case $host in 3286 *-*-mingw*) 3287 # gcc leaves a trailing carriage return, which upsets mingw 3288 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3289 *) 3290 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3291 esac 3292 case $ac_prog in 3293 # Accept absolute paths. 3294 [[\\/]]* | ?:[[\\/]]*) 3295 re_direlt='/[[^/]][[^/]]*/\.\./' 3296 # Canonicalize the pathname of ld 3297 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3298 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3299 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3300 done 3301 test -z "$LD" && LD=$ac_prog 3302 ;; 3303 "") 3304 # If it fails, then pretend we aren't using GCC. 3305 ac_prog=ld 3306 ;; 3307 *) 3308 # If it is relative, then search for the first ld in PATH. 3309 with_gnu_ld=unknown 3310 ;; 3311 esac 3312elif test yes = "$with_gnu_ld"; then 3313 AC_MSG_CHECKING([for GNU ld]) 3314else 3315 AC_MSG_CHECKING([for non-GNU ld]) 3316fi 3317AC_CACHE_VAL(lt_cv_path_LD, 3318[if test -z "$LD"; then 3319 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3320 for ac_dir in $PATH; do 3321 IFS=$lt_save_ifs 3322 test -z "$ac_dir" && ac_dir=. 3323 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3324 lt_cv_path_LD=$ac_dir/$ac_prog 3325 # Check to see if the program is GNU ld. I'd rather use --version, 3326 # but apparently some variants of GNU ld only accept -v. 3327 # Break only if it was the GNU/non-GNU ld that we prefer. 3328 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3329 *GNU* | *'with BFD'*) 3330 test no != "$with_gnu_ld" && break 3331 ;; 3332 *) 3333 test yes != "$with_gnu_ld" && break 3334 ;; 3335 esac 3336 fi 3337 done 3338 IFS=$lt_save_ifs 3339else 3340 lt_cv_path_LD=$LD # Let the user override the test with a path. 3341fi]) 3342LD=$lt_cv_path_LD 3343if test -n "$LD"; then 3344 AC_MSG_RESULT($LD) 3345else 3346 AC_MSG_RESULT(no) 3347fi 3348test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3349_LT_PATH_LD_GNU 3350AC_SUBST([LD]) 3351 3352_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3353])# LT_PATH_LD 3354 3355# Old names: 3356AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3357AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3358dnl aclocal-1.4 backwards compatibility: 3359dnl AC_DEFUN([AM_PROG_LD], []) 3360dnl AC_DEFUN([AC_PROG_LD], []) 3361 3362 3363# _LT_PATH_LD_GNU 3364#- -------------- 3365m4_defun([_LT_PATH_LD_GNU], 3366[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3367[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3368case `$LD -v 2>&1 </dev/null` in 3369*GNU* | *'with BFD'*) 3370 lt_cv_prog_gnu_ld=yes 3371 ;; 3372*) 3373 lt_cv_prog_gnu_ld=no 3374 ;; 3375esac]) 3376with_gnu_ld=$lt_cv_prog_gnu_ld 3377])# _LT_PATH_LD_GNU 3378 3379 3380# _LT_CMD_RELOAD 3381# -------------- 3382# find reload flag for linker 3383# -- PORTME Some linkers may need a different reload flag. 3384m4_defun([_LT_CMD_RELOAD], 3385[AC_CACHE_CHECK([for $LD option to reload object files], 3386 lt_cv_ld_reload_flag, 3387 [lt_cv_ld_reload_flag='-r']) 3388reload_flag=$lt_cv_ld_reload_flag 3389case $reload_flag in 3390"" | " "*) ;; 3391*) reload_flag=" $reload_flag" ;; 3392esac 3393reload_cmds='$LD$reload_flag -o $output$reload_objs' 3394case $host_os in 3395 cygwin* | mingw* | pw32* | cegcc*) 3396 if test yes != "$GCC"; then 3397 reload_cmds=false 3398 fi 3399 ;; 3400 darwin*) 3401 if test yes = "$GCC"; then 3402 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3403 else 3404 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3405 fi 3406 ;; 3407esac 3408_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3409_LT_TAGDECL([], [reload_cmds], [2])dnl 3410])# _LT_CMD_RELOAD 3411 3412 3413# _LT_PATH_DD 3414# ----------- 3415# find a working dd 3416m4_defun([_LT_PATH_DD], 3417[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3418[printf 0123456789abcdef0123456789abcdef >conftest.i 3419cat conftest.i conftest.i >conftest2.i 3420: ${lt_DD:=$DD} 3421AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3422[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3423 cmp -s conftest.i conftest.out \ 3424 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3425fi]) 3426rm -f conftest.i conftest2.i conftest.out]) 3427])# _LT_PATH_DD 3428 3429 3430# _LT_CMD_TRUNCATE 3431# ---------------- 3432# find command to truncate a binary pipe 3433m4_defun([_LT_CMD_TRUNCATE], 3434[m4_require([_LT_PATH_DD]) 3435AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3436[printf 0123456789abcdef0123456789abcdef >conftest.i 3437cat conftest.i conftest.i >conftest2.i 3438lt_cv_truncate_bin= 3439if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3440 cmp -s conftest.i conftest.out \ 3441 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3442fi 3443rm -f conftest.i conftest2.i conftest.out 3444test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3445_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3446 [Command to truncate a binary pipe]) 3447])# _LT_CMD_TRUNCATE 3448 3449 3450# _LT_CHECK_MAGIC_METHOD 3451# ---------------------- 3452# how to check for library dependencies 3453# -- PORTME fill in with the dynamic library characteristics 3454m4_defun([_LT_CHECK_MAGIC_METHOD], 3455[m4_require([_LT_DECL_EGREP]) 3456m4_require([_LT_DECL_OBJDUMP]) 3457AC_CACHE_CHECK([how to recognize dependent libraries], 3458lt_cv_deplibs_check_method, 3459[lt_cv_file_magic_cmd='$MAGIC_CMD' 3460lt_cv_file_magic_test_file= 3461lt_cv_deplibs_check_method='unknown' 3462# Need to set the preceding variable on all platforms that support 3463# interlibrary dependencies. 3464# 'none' -- dependencies not supported. 3465# 'unknown' -- same as none, but documents that we really don't know. 3466# 'pass_all' -- all dependencies passed with no checks. 3467# 'test_compile' -- check by making test program. 3468# 'file_magic [[regex]]' -- check by looking for files in library path 3469# that responds to the $file_magic_cmd with a given extended regex. 3470# If you have 'file' or equivalent on your system and you're not sure 3471# whether 'pass_all' will *always* work, you probably want this one. 3472 3473case $host_os in 3474aix[[4-9]]*) 3475 lt_cv_deplibs_check_method=pass_all 3476 ;; 3477 3478beos*) 3479 lt_cv_deplibs_check_method=pass_all 3480 ;; 3481 3482bsdi[[45]]*) 3483 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3484 lt_cv_file_magic_cmd='/usr/bin/file -L' 3485 lt_cv_file_magic_test_file=/shlib/libc.so 3486 ;; 3487 3488cygwin*) 3489 # func_win32_libid is a shell function defined in ltmain.sh 3490 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3491 lt_cv_file_magic_cmd='func_win32_libid' 3492 ;; 3493 3494mingw* | pw32*) 3495 # Base MSYS/MinGW do not provide the 'file' command needed by 3496 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3497 # unless we find 'file', for example because we are cross-compiling. 3498 if ( file / ) >/dev/null 2>&1; then 3499 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3500 lt_cv_file_magic_cmd='func_win32_libid' 3501 else 3502 # Keep this pattern in sync with the one in func_win32_libid. 3503 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3504 lt_cv_file_magic_cmd='$OBJDUMP -f' 3505 fi 3506 ;; 3507 3508cegcc*) 3509 # use the weaker test based on 'objdump'. See mingw*. 3510 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3511 lt_cv_file_magic_cmd='$OBJDUMP -f' 3512 ;; 3513 3514darwin* | rhapsody*) 3515 lt_cv_deplibs_check_method=pass_all 3516 ;; 3517 3518freebsd* | dragonfly*) 3519 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3520 case $host_cpu in 3521 i*86 ) 3522 # Not sure whether the presence of OpenBSD here was a mistake. 3523 # Let's accept both of them until this is cleared up. 3524 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3525 lt_cv_file_magic_cmd=/usr/bin/file 3526 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3527 ;; 3528 esac 3529 else 3530 lt_cv_deplibs_check_method=pass_all 3531 fi 3532 ;; 3533 3534haiku*) 3535 lt_cv_deplibs_check_method=pass_all 3536 ;; 3537 3538hpux10.20* | hpux11*) 3539 lt_cv_file_magic_cmd=/usr/bin/file 3540 case $host_cpu in 3541 ia64*) 3542 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3543 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3544 ;; 3545 hppa*64*) 3546 [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]'] 3547 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3548 ;; 3549 *) 3550 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3551 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3552 ;; 3553 esac 3554 ;; 3555 3556interix[[3-9]]*) 3557 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3558 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3559 ;; 3560 3561irix5* | irix6* | nonstopux*) 3562 case $LD in 3563 *-32|*"-32 ") libmagic=32-bit;; 3564 *-n32|*"-n32 ") libmagic=N32;; 3565 *-64|*"-64 ") libmagic=64-bit;; 3566 *) libmagic=never-match;; 3567 esac 3568 lt_cv_deplibs_check_method=pass_all 3569 ;; 3570 3571# This must be glibc/ELF. 3572linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3573 lt_cv_deplibs_check_method=pass_all 3574 ;; 3575 3576netbsd*) 3577 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3578 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3579 else 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3581 fi 3582 ;; 3583 3584newos6*) 3585 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3586 lt_cv_file_magic_cmd=/usr/bin/file 3587 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3588 ;; 3589 3590*nto* | *qnx*) 3591 lt_cv_deplibs_check_method=pass_all 3592 ;; 3593 3594openbsd* | bitrig*) 3595 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3596 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3597 else 3598 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3599 fi 3600 ;; 3601 3602osf3* | osf4* | osf5*) 3603 lt_cv_deplibs_check_method=pass_all 3604 ;; 3605 3606rdos*) 3607 lt_cv_deplibs_check_method=pass_all 3608 ;; 3609 3610solaris*) 3611 lt_cv_deplibs_check_method=pass_all 3612 ;; 3613 3614sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3615 lt_cv_deplibs_check_method=pass_all 3616 ;; 3617 3618sysv4 | sysv4.3*) 3619 case $host_vendor in 3620 motorola) 3621 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]]' 3622 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3623 ;; 3624 ncr) 3625 lt_cv_deplibs_check_method=pass_all 3626 ;; 3627 sequent) 3628 lt_cv_file_magic_cmd='/bin/file' 3629 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3630 ;; 3631 sni) 3632 lt_cv_file_magic_cmd='/bin/file' 3633 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3634 lt_cv_file_magic_test_file=/lib/libc.so 3635 ;; 3636 siemens) 3637 lt_cv_deplibs_check_method=pass_all 3638 ;; 3639 pc) 3640 lt_cv_deplibs_check_method=pass_all 3641 ;; 3642 esac 3643 ;; 3644 3645tpf*) 3646 lt_cv_deplibs_check_method=pass_all 3647 ;; 3648os2*) 3649 lt_cv_deplibs_check_method=pass_all 3650 ;; 3651esac 3652]) 3653 3654file_magic_glob= 3655want_nocaseglob=no 3656if test "$build" = "$host"; then 3657 case $host_os in 3658 mingw* | pw32*) 3659 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3660 want_nocaseglob=yes 3661 else 3662 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3663 fi 3664 ;; 3665 esac 3666fi 3667 3668file_magic_cmd=$lt_cv_file_magic_cmd 3669deplibs_check_method=$lt_cv_deplibs_check_method 3670test -z "$deplibs_check_method" && deplibs_check_method=unknown 3671 3672_LT_DECL([], [deplibs_check_method], [1], 3673 [Method to check whether dependent libraries are shared objects]) 3674_LT_DECL([], [file_magic_cmd], [1], 3675 [Command to use when deplibs_check_method = "file_magic"]) 3676_LT_DECL([], [file_magic_glob], [1], 3677 [How to find potential files when deplibs_check_method = "file_magic"]) 3678_LT_DECL([], [want_nocaseglob], [1], 3679 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3680])# _LT_CHECK_MAGIC_METHOD 3681 3682 3683# LT_PATH_NM 3684# ---------- 3685# find the pathname to a BSD- or MS-compatible name lister 3686AC_DEFUN([LT_PATH_NM], 3687[AC_REQUIRE([AC_PROG_CC])dnl 3688AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3689[if test -n "$NM"; then 3690 # Let the user override the test. 3691 lt_cv_path_NM=$NM 3692else 3693 lt_nm_to_check=${ac_tool_prefix}nm 3694 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3695 lt_nm_to_check="$lt_nm_to_check nm" 3696 fi 3697 for lt_tmp_nm in $lt_nm_to_check; do 3698 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3699 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3700 IFS=$lt_save_ifs 3701 test -z "$ac_dir" && ac_dir=. 3702 tmp_nm=$ac_dir/$lt_tmp_nm 3703 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3704 # Check to see if the nm accepts a BSD-compat flag. 3705 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3706 # nm: unknown option "B" ignored 3707 # Tru64's nm complains that /dev/null is an invalid object file 3708 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3709 case $build_os in 3710 mingw*) lt_bad_file=conftest.nm/nofile ;; 3711 *) lt_bad_file=/dev/null ;; 3712 esac 3713 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3714 *$lt_bad_file* | *'Invalid file or object type'*) 3715 lt_cv_path_NM="$tmp_nm -B" 3716 break 2 3717 ;; 3718 *) 3719 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3720 */dev/null*) 3721 lt_cv_path_NM="$tmp_nm -p" 3722 break 2 3723 ;; 3724 *) 3725 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3726 continue # so that we can try to find one that supports BSD flags 3727 ;; 3728 esac 3729 ;; 3730 esac 3731 fi 3732 done 3733 IFS=$lt_save_ifs 3734 done 3735 : ${lt_cv_path_NM=no} 3736fi]) 3737if test no != "$lt_cv_path_NM"; then 3738 NM=$lt_cv_path_NM 3739else 3740 # Didn't find any BSD compatible name lister, look for dumpbin. 3741 if test -n "$DUMPBIN"; then : 3742 # Let the user override the test. 3743 else 3744 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3745 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3746 *COFF*) 3747 DUMPBIN="$DUMPBIN -symbols -headers" 3748 ;; 3749 *) 3750 DUMPBIN=: 3751 ;; 3752 esac 3753 fi 3754 AC_SUBST([DUMPBIN]) 3755 if test : != "$DUMPBIN"; then 3756 NM=$DUMPBIN 3757 fi 3758fi 3759test -z "$NM" && NM=nm 3760AC_SUBST([NM]) 3761_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3762 3763AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3764 [lt_cv_nm_interface="BSD nm" 3765 echo "int some_variable = 0;" > conftest.$ac_ext 3766 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3767 (eval "$ac_compile" 2>conftest.err) 3768 cat conftest.err >&AS_MESSAGE_LOG_FD 3769 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3770 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3771 cat conftest.err >&AS_MESSAGE_LOG_FD 3772 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3773 cat conftest.out >&AS_MESSAGE_LOG_FD 3774 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3775 lt_cv_nm_interface="MS dumpbin" 3776 fi 3777 rm -f conftest*]) 3778])# LT_PATH_NM 3779 3780# Old names: 3781AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3782AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3783dnl aclocal-1.4 backwards compatibility: 3784dnl AC_DEFUN([AM_PROG_NM], []) 3785dnl AC_DEFUN([AC_PROG_NM], []) 3786 3787# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3788# -------------------------------- 3789# how to determine the name of the shared library 3790# associated with a specific link library. 3791# -- PORTME fill in with the dynamic library characteristics 3792m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3793[m4_require([_LT_DECL_EGREP]) 3794m4_require([_LT_DECL_OBJDUMP]) 3795m4_require([_LT_DECL_DLLTOOL]) 3796AC_CACHE_CHECK([how to associate runtime and link libraries], 3797lt_cv_sharedlib_from_linklib_cmd, 3798[lt_cv_sharedlib_from_linklib_cmd='unknown' 3799 3800case $host_os in 3801cygwin* | mingw* | pw32* | cegcc*) 3802 # two different shell functions defined in ltmain.sh; 3803 # decide which one to use based on capabilities of $DLLTOOL 3804 case `$DLLTOOL --help 2>&1` in 3805 *--identify-strict*) 3806 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3807 ;; 3808 *) 3809 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3810 ;; 3811 esac 3812 ;; 3813*) 3814 # fallback: assume linklib IS sharedlib 3815 lt_cv_sharedlib_from_linklib_cmd=$ECHO 3816 ;; 3817esac 3818]) 3819sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3820test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821 3822_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3823 [Command to associate shared and link libraries]) 3824])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3825 3826 3827# _LT_PATH_MANIFEST_TOOL 3828# ---------------------- 3829# locate the manifest tool 3830m4_defun([_LT_PATH_MANIFEST_TOOL], 3831[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3832test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3833AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3834 [lt_cv_path_mainfest_tool=no 3835 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3836 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3837 cat conftest.err >&AS_MESSAGE_LOG_FD 3838 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3839 lt_cv_path_mainfest_tool=yes 3840 fi 3841 rm -f conftest*]) 3842if test yes != "$lt_cv_path_mainfest_tool"; then 3843 MANIFEST_TOOL=: 3844fi 3845_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3846])# _LT_PATH_MANIFEST_TOOL 3847 3848 3849# _LT_DLL_DEF_P([FILE]) 3850# --------------------- 3851# True iff FILE is a Windows DLL '.def' file. 3852# Keep in sync with func_dll_def_p in the libtool script 3853AC_DEFUN([_LT_DLL_DEF_P], 3854[dnl 3855 test DEF = "`$SED -n dnl 3856 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3857 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3858 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3859 -e q dnl Only consider the first "real" line 3860 $1`" dnl 3861])# _LT_DLL_DEF_P 3862 3863 3864# LT_LIB_M 3865# -------- 3866# check for math library 3867AC_DEFUN([LT_LIB_M], 3868[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3869LIBM= 3870case $host in 3871*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3872 # These system don't have libm, or don't need it 3873 ;; 3874*-ncr-sysv4.3*) 3875 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3876 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3877 ;; 3878*) 3879 AC_CHECK_LIB(m, cos, LIBM=-lm) 3880 ;; 3881esac 3882AC_SUBST([LIBM]) 3883])# LT_LIB_M 3884 3885# Old name: 3886AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3887dnl aclocal-1.4 backwards compatibility: 3888dnl AC_DEFUN([AC_CHECK_LIBM], []) 3889 3890 3891# _LT_COMPILER_NO_RTTI([TAGNAME]) 3892# ------------------------------- 3893m4_defun([_LT_COMPILER_NO_RTTI], 3894[m4_require([_LT_TAG_COMPILER])dnl 3895 3896_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3897 3898if test yes = "$GCC"; then 3899 case $cc_basename in 3900 nvcc*) 3901 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3902 *) 3903 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3904 esac 3905 3906 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3907 lt_cv_prog_compiler_rtti_exceptions, 3908 [-fno-rtti -fno-exceptions], [], 3909 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3910fi 3911_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3912 [Compiler flag to turn off builtin functions]) 3913])# _LT_COMPILER_NO_RTTI 3914 3915 3916# _LT_CMD_GLOBAL_SYMBOLS 3917# ---------------------- 3918m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3919[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3920AC_REQUIRE([AC_PROG_CC])dnl 3921AC_REQUIRE([AC_PROG_AWK])dnl 3922AC_REQUIRE([LT_PATH_NM])dnl 3923AC_REQUIRE([LT_PATH_LD])dnl 3924m4_require([_LT_DECL_SED])dnl 3925m4_require([_LT_DECL_EGREP])dnl 3926m4_require([_LT_TAG_COMPILER])dnl 3927 3928# Check for command to grab the raw symbol name followed by C symbol from nm. 3929AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3930AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3931[ 3932# These are sane defaults that work on at least a few old systems. 3933# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3934 3935# Character class describing NM global symbol codes. 3936symcode='[[BCDEGRST]]' 3937 3938# Regexp to match symbols that can be accessed directly from C. 3939sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3940 3941# Define system-specific variables. 3942case $host_os in 3943aix*) 3944 symcode='[[BCDT]]' 3945 ;; 3946cygwin* | mingw* | pw32* | cegcc*) 3947 symcode='[[ABCDGISTW]]' 3948 ;; 3949hpux*) 3950 if test ia64 = "$host_cpu"; then 3951 symcode='[[ABCDEGRST]]' 3952 fi 3953 ;; 3954irix* | nonstopux*) 3955 symcode='[[BCDEGRST]]' 3956 ;; 3957osf*) 3958 symcode='[[BCDEGQRST]]' 3959 ;; 3960solaris*) 3961 symcode='[[BDRT]]' 3962 ;; 3963sco3.2v5*) 3964 symcode='[[DT]]' 3965 ;; 3966sysv4.2uw2*) 3967 symcode='[[DT]]' 3968 ;; 3969sysv5* | sco5v6* | unixware* | OpenUNIX*) 3970 symcode='[[ABDT]]' 3971 ;; 3972sysv4) 3973 symcode='[[DFNSTU]]' 3974 ;; 3975esac 3976 3977# If we're using GNU nm, then use its standard symbol codes. 3978case `$NM -V 2>&1` in 3979*GNU* | *'with BFD'*) 3980 symcode='[[ABCDGIRSTW]]' ;; 3981esac 3982 3983if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3984 # Gets list of data symbols to import. 3985 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3986 # Adjust the below global symbol transforms to fixup imported variables. 3987 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3988 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3989 lt_c_name_lib_hook="\ 3990 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3991 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3992else 3993 # Disable hooks by default. 3994 lt_cv_sys_global_symbol_to_import= 3995 lt_cdecl_hook= 3996 lt_c_name_hook= 3997 lt_c_name_lib_hook= 3998fi 3999 4000# Transform an extracted symbol line into a proper C declaration. 4001# Some systems (esp. on ia64) link data and code symbols differently, 4002# so use this general approach. 4003lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4004$lt_cdecl_hook\ 4005" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4006" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007 4008# Transform an extracted symbol line into symbol name and symbol address 4009lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4010$lt_c_name_hook\ 4011" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4013 4014# Transform an extracted symbol line into symbol name with lib prefix and 4015# symbol address. 4016lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4017$lt_c_name_lib_hook\ 4018" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4019" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4020" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021 4022# Handle CRLF in mingw tool chain 4023opt_cr= 4024case $build_os in 4025mingw*) 4026 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4027 ;; 4028esac 4029 4030# Try without a prefix underscore, then with it. 4031for ac_symprfx in "" "_"; do 4032 4033 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4034 symxfrm="\\1 $ac_symprfx\\2 \\2" 4035 4036 # Write the raw and C identifiers. 4037 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4038 # Fake it for dumpbin and say T for any non-static function, 4039 # D for any global variable and I for any imported variable. 4040 # Also find C++ and __fastcall symbols from MSVC++, 4041 # which start with @ or ?. 4042 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4043" {last_section=section; section=\$ 3};"\ 4044" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4045" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4046" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4047" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4048" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4049" \$ 0!~/External *\|/{next};"\ 4050" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4051" {if(hide[section]) next};"\ 4052" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4053" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4054" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4055" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4056" ' prfx=^$ac_symprfx]" 4057 else 4058 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4059 fi 4060 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4061 4062 # Check to see that the pipe works correctly. 4063 pipe_works=no 4064 4065 rm -f conftest* 4066 cat > conftest.$ac_ext <<_LT_EOF 4067#ifdef __cplusplus 4068extern "C" { 4069#endif 4070char nm_test_var; 4071void nm_test_func(void); 4072void nm_test_func(void){} 4073#ifdef __cplusplus 4074} 4075#endif 4076int main(){nm_test_var='a';nm_test_func();return(0);} 4077_LT_EOF 4078 4079 if AC_TRY_EVAL(ac_compile); then 4080 # Now try to grab the symbols. 4081 nlist=conftest.nm 4082 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4083 # Try sorting and uniquifying the output. 4084 if sort "$nlist" | uniq > "$nlist"T; then 4085 mv -f "$nlist"T "$nlist" 4086 else 4087 rm -f "$nlist"T 4088 fi 4089 4090 # Make sure that we snagged all the symbols we need. 4091 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4092 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4093 cat <<_LT_EOF > conftest.$ac_ext 4094/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4095#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4096/* DATA imports from DLLs on WIN32 can't be const, because runtime 4097 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4098# define LT@&t@_DLSYM_CONST 4099#elif defined __osf__ 4100/* This system does not cope well with relocations in const data. */ 4101# define LT@&t@_DLSYM_CONST 4102#else 4103# define LT@&t@_DLSYM_CONST const 4104#endif 4105 4106#ifdef __cplusplus 4107extern "C" { 4108#endif 4109 4110_LT_EOF 4111 # Now generate the symbol file. 4112 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4113 4114 cat <<_LT_EOF >> conftest.$ac_ext 4115 4116/* The mapping between symbol names and symbols. */ 4117LT@&t@_DLSYM_CONST struct { 4118 const char *name; 4119 void *address; 4120} 4121lt__PROGRAM__LTX_preloaded_symbols[[]] = 4122{ 4123 { "@PROGRAM@", (void *) 0 }, 4124_LT_EOF 4125 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4126 cat <<\_LT_EOF >> conftest.$ac_ext 4127 {0, (void *) 0} 4128}; 4129 4130/* This works around a problem in FreeBSD linker */ 4131#ifdef FREEBSD_WORKAROUND 4132static const void *lt_preloaded_setup() { 4133 return lt__PROGRAM__LTX_preloaded_symbols; 4134} 4135#endif 4136 4137#ifdef __cplusplus 4138} 4139#endif 4140_LT_EOF 4141 # Now try linking the two files. 4142 mv conftest.$ac_objext conftstm.$ac_objext 4143 lt_globsym_save_LIBS=$LIBS 4144 lt_globsym_save_CFLAGS=$CFLAGS 4145 LIBS=conftstm.$ac_objext 4146 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4147 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4148 pipe_works=yes 4149 fi 4150 LIBS=$lt_globsym_save_LIBS 4151 CFLAGS=$lt_globsym_save_CFLAGS 4152 else 4153 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4154 fi 4155 else 4156 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4157 fi 4158 else 4159 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160 fi 4161 else 4162 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4163 cat conftest.$ac_ext >&5 4164 fi 4165 rm -rf conftest* conftst* 4166 4167 # Do not use the global_symbol_pipe unless it works. 4168 if test yes = "$pipe_works"; then 4169 break 4170 else 4171 lt_cv_sys_global_symbol_pipe= 4172 fi 4173done 4174]) 4175if test -z "$lt_cv_sys_global_symbol_pipe"; then 4176 lt_cv_sys_global_symbol_to_cdecl= 4177fi 4178if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4179 AC_MSG_RESULT(failed) 4180else 4181 AC_MSG_RESULT(ok) 4182fi 4183 4184# Response file support. 4185if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4186 nm_file_list_spec='@' 4187elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4188 nm_file_list_spec='@' 4189fi 4190 4191_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4192 [Take the output of nm and produce a listing of raw symbols and C names]) 4193_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4194 [Transform the output of nm in a proper C declaration]) 4195_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4196 [Transform the output of nm into a list of symbols to manually relocate]) 4197_LT_DECL([global_symbol_to_c_name_address], 4198 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4199 [Transform the output of nm in a C name address pair]) 4200_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4201 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4202 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4203_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4204 [The name lister interface]) 4205_LT_DECL([], [nm_file_list_spec], [1], 4206 [Specify filename containing input files for $NM]) 4207]) # _LT_CMD_GLOBAL_SYMBOLS 4208 4209 4210# _LT_COMPILER_PIC([TAGNAME]) 4211# --------------------------- 4212m4_defun([_LT_COMPILER_PIC], 4213[m4_require([_LT_TAG_COMPILER])dnl 4214_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4215_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4216_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217 4218m4_if([$1], [CXX], [ 4219 # C++ specific cases for pic, static, wl, etc. 4220 if test yes = "$GXX"; then 4221 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4223 4224 case $host_os in 4225 aix*) 4226 # All AIX code is PIC. 4227 if test ia64 = "$host_cpu"; then 4228 # AIX 5 now supports IA64 processor 4229 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4230 fi 4231 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232 ;; 4233 4234 amigaos*) 4235 case $host_cpu in 4236 powerpc) 4237 # see comment about AmigaOS4 .so support 4238 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4239 ;; 4240 m68k) 4241 # FIXME: we need at least 68020 code to build shared libraries, but 4242 # adding the '-m68020' flag to GCC prevents building anything better, 4243 # like '-m68040'. 4244 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4245 ;; 4246 esac 4247 ;; 4248 4249 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4250 # PIC is the default for these OSes. 4251 ;; 4252 mingw* | cygwin* | os2* | pw32* | cegcc*) 4253 # This hack is so that the source file can tell whether it is being 4254 # built for inclusion in a dll (and should export symbols for example). 4255 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4256 # (--disable-auto-import) libraries 4257 m4_if([$1], [GCJ], [], 4258 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4259 case $host_os in 4260 os2*) 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4262 ;; 4263 esac 4264 ;; 4265 darwin* | rhapsody*) 4266 # PIC is the default on this platform 4267 # Common symbols not allowed in MH_DYLIB files 4268 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4269 ;; 4270 *djgpp*) 4271 # DJGPP does not support shared libraries at all 4272 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4273 ;; 4274 haiku*) 4275 # PIC is the default for Haiku. 4276 # The "-static" flag exists, but is broken. 4277 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4278 ;; 4279 interix[[3-9]]*) 4280 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4281 # Instead, we relocate shared libraries at runtime. 4282 ;; 4283 sysv4*MP*) 4284 if test -d /usr/nec; then 4285 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4286 fi 4287 ;; 4288 hpux*) 4289 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4290 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4291 # sets the default TLS model and affects inlining. 4292 case $host_cpu in 4293 hppa*64*) 4294 ;; 4295 *) 4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4297 ;; 4298 esac 4299 ;; 4300 *qnx* | *nto*) 4301 # QNX uses GNU C++, but need to define -shared option too, otherwise 4302 # it will coredump. 4303 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4304 ;; 4305 *) 4306 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307 ;; 4308 esac 4309 else 4310 case $host_os in 4311 aix[[4-9]]*) 4312 # All AIX code is PIC. 4313 if test ia64 = "$host_cpu"; then 4314 # AIX 5 now supports IA64 processor 4315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4316 else 4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4318 fi 4319 ;; 4320 chorus*) 4321 case $cc_basename in 4322 cxch68*) 4323 # Green Hills C++ Compiler 4324 # _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" 4325 ;; 4326 esac 4327 ;; 4328 mingw* | cygwin* | os2* | pw32* | cegcc*) 4329 # This hack is so that the source file can tell whether it is being 4330 # built for inclusion in a dll (and should export symbols for example). 4331 m4_if([$1], [GCJ], [], 4332 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333 ;; 4334 dgux*) 4335 case $cc_basename in 4336 ec++*) 4337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4338 ;; 4339 ghcx*) 4340 # Green Hills C++ Compiler 4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4342 ;; 4343 *) 4344 ;; 4345 esac 4346 ;; 4347 freebsd* | dragonfly*) 4348 # FreeBSD uses GNU C++ 4349 ;; 4350 hpux9* | hpux10* | hpux11*) 4351 case $cc_basename in 4352 CC*) 4353 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4355 if test ia64 != "$host_cpu"; then 4356 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4357 fi 4358 ;; 4359 aCC*) 4360 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4361 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4362 case $host_cpu in 4363 hppa*64*|ia64*) 4364 # +Z the default 4365 ;; 4366 *) 4367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4368 ;; 4369 esac 4370 ;; 4371 *) 4372 ;; 4373 esac 4374 ;; 4375 interix*) 4376 # This is c89, which is MS Visual C++ (no shared libs) 4377 # Anyone wants to do a port? 4378 ;; 4379 irix5* | irix6* | nonstopux*) 4380 case $cc_basename in 4381 CC*) 4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4384 # CC pic flag -KPIC is the default. 4385 ;; 4386 *) 4387 ;; 4388 esac 4389 ;; 4390 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4391 case $cc_basename in 4392 KCC*) 4393 # KAI C++ Compiler 4394 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4395 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4396 ;; 4397 ecpc* ) 4398 # old Intel C++ for x86_64, which still supported -KPIC. 4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402 ;; 4403 icpc* ) 4404 # Intel C++, used to be incompatible with GCC. 4405 # ICC 10 doesn't accept -KPIC any more. 4406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4409 ;; 4410 pgCC* | pgcpp*) 4411 # Portland Group C++ compiler 4412 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4414 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415 ;; 4416 cxx*) 4417 # Compaq C++ 4418 # Make sure the PIC flag is empty. It appears that all Alpha 4419 # Linux and Compaq Tru64 Unix objects are PIC. 4420 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4421 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4422 ;; 4423 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4424 # IBM XL 8.0, 9.0 on PPC and BlueGene 4425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4427 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4428 ;; 4429 *) 4430 case `$CC -V 2>&1 | sed 5q` in 4431 *Sun\ C*) 4432 # Sun C++ 5.9 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4436 ;; 4437 esac 4438 ;; 4439 esac 4440 ;; 4441 lynxos*) 4442 ;; 4443 m88k*) 4444 ;; 4445 mvs*) 4446 case $cc_basename in 4447 cxx*) 4448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4449 ;; 4450 *) 4451 ;; 4452 esac 4453 ;; 4454 netbsd*) 4455 ;; 4456 *qnx* | *nto*) 4457 # QNX uses GNU C++, but need to define -shared option too, otherwise 4458 # it will coredump. 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4460 ;; 4461 osf3* | osf4* | osf5*) 4462 case $cc_basename in 4463 KCC*) 4464 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4465 ;; 4466 RCC*) 4467 # Rational C++ 2.4.1 4468 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4469 ;; 4470 cxx*) 4471 # Digital/Compaq C++ 4472 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4473 # Make sure the PIC flag is empty. It appears that all Alpha 4474 # Linux and Compaq Tru64 Unix objects are PIC. 4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4477 ;; 4478 *) 4479 ;; 4480 esac 4481 ;; 4482 psos*) 4483 ;; 4484 solaris*) 4485 case $cc_basename in 4486 CC* | sunCC*) 4487 # Sun C++ 4.2, 5.x and Centerline C++ 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4490 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4491 ;; 4492 gcx*) 4493 # Green Hills C++ Compiler 4494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4495 ;; 4496 *) 4497 ;; 4498 esac 4499 ;; 4500 sunos4*) 4501 case $cc_basename in 4502 CC*) 4503 # Sun C++ 4.x 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4506 ;; 4507 lcc*) 4508 # Lucid 4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4510 ;; 4511 *) 4512 ;; 4513 esac 4514 ;; 4515 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4516 case $cc_basename in 4517 CC*) 4518 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4519 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4520 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4521 ;; 4522 esac 4523 ;; 4524 tandem*) 4525 case $cc_basename in 4526 NCC*) 4527 # NonStop-UX NCC 3.20 4528 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4529 ;; 4530 *) 4531 ;; 4532 esac 4533 ;; 4534 vxworks*) 4535 ;; 4536 *) 4537 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4538 ;; 4539 esac 4540 fi 4541], 4542[ 4543 if test yes = "$GCC"; then 4544 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4546 4547 case $host_os in 4548 aix*) 4549 # All AIX code is PIC. 4550 if test ia64 = "$host_cpu"; then 4551 # AIX 5 now supports IA64 processor 4552 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4553 fi 4554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555 ;; 4556 4557 amigaos*) 4558 case $host_cpu in 4559 powerpc) 4560 # see comment about AmigaOS4 .so support 4561 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4562 ;; 4563 m68k) 4564 # FIXME: we need at least 68020 code to build shared libraries, but 4565 # adding the '-m68020' flag to GCC prevents building anything better, 4566 # like '-m68040'. 4567 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4568 ;; 4569 esac 4570 ;; 4571 4572 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4573 # PIC is the default for these OSes. 4574 ;; 4575 4576 mingw* | cygwin* | pw32* | os2* | cegcc*) 4577 # This hack is so that the source file can tell whether it is being 4578 # built for inclusion in a dll (and should export symbols for example). 4579 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4580 # (--disable-auto-import) libraries 4581 m4_if([$1], [GCJ], [], 4582 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4583 case $host_os in 4584 os2*) 4585 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4586 ;; 4587 esac 4588 ;; 4589 4590 darwin* | rhapsody*) 4591 # PIC is the default on this platform 4592 # Common symbols not allowed in MH_DYLIB files 4593 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4594 ;; 4595 4596 haiku*) 4597 # PIC is the default for Haiku. 4598 # The "-static" flag exists, but is broken. 4599 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4600 ;; 4601 4602 hpux*) 4603 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4604 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4605 # sets the default TLS model and affects inlining. 4606 case $host_cpu in 4607 hppa*64*) 4608 # +Z the default 4609 ;; 4610 *) 4611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4612 ;; 4613 esac 4614 ;; 4615 4616 interix[[3-9]]*) 4617 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4618 # Instead, we relocate shared libraries at runtime. 4619 ;; 4620 4621 msdosdjgpp*) 4622 # Just because we use GCC doesn't mean we suddenly get shared libraries 4623 # on systems that don't support them. 4624 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4625 enable_shared=no 4626 ;; 4627 4628 *nto* | *qnx*) 4629 # QNX uses GNU C++, but need to define -shared option too, otherwise 4630 # it will coredump. 4631 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4632 ;; 4633 4634 sysv4*MP*) 4635 if test -d /usr/nec; then 4636 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4637 fi 4638 ;; 4639 4640 *) 4641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4642 ;; 4643 esac 4644 4645 case $cc_basename in 4646 nvcc*) # Cuda Compiler Driver 2.2 4647 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4648 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4649 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4650 fi 4651 ;; 4652 esac 4653 else 4654 # PORTME Check for flag to pass linker flags through the system compiler. 4655 case $host_os in 4656 aix*) 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4658 if test ia64 = "$host_cpu"; then 4659 # AIX 5 now supports IA64 processor 4660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4661 else 4662 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4663 fi 4664 ;; 4665 4666 darwin* | rhapsody*) 4667 # PIC is the default on this platform 4668 # Common symbols not allowed in MH_DYLIB files 4669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4670 case $cc_basename in 4671 nagfor*) 4672 # NAG Fortran compiler 4673 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4675 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4676 ;; 4677 esac 4678 ;; 4679 4680 mingw* | cygwin* | pw32* | os2* | cegcc*) 4681 # This hack is so that the source file can tell whether it is being 4682 # built for inclusion in a dll (and should export symbols for example). 4683 m4_if([$1], [GCJ], [], 4684 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4685 case $host_os in 4686 os2*) 4687 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4688 ;; 4689 esac 4690 ;; 4691 4692 hpux9* | hpux10* | hpux11*) 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4694 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4695 # not for PA HP-UX. 4696 case $host_cpu in 4697 hppa*64*|ia64*) 4698 # +Z the default 4699 ;; 4700 *) 4701 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4702 ;; 4703 esac 4704 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4705 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4706 ;; 4707 4708 irix5* | irix6* | nonstopux*) 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4710 # PIC (with -KPIC) is the default. 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4712 ;; 4713 4714 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4715 case $cc_basename in 4716 # old Intel for x86_64, which still supported -KPIC. 4717 ecc*) 4718 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4720 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721 ;; 4722 # icc used to be incompatible with GCC. 4723 # ICC 10 doesn't accept -KPIC any more. 4724 icc* | ifort*) 4725 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4726 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4727 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4728 ;; 4729 # Lahey Fortran 8.1. 4730 lf95*) 4731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4733 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4734 ;; 4735 nagfor*) 4736 # NAG Fortran compiler 4737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4740 ;; 4741 tcc*) 4742 # Fabrice Bellard et al's Tiny C Compiler 4743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4746 ;; 4747 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4748 # Portland Group compilers (*not* the Pentium gcc compiler, 4749 # which looks to be a dead project) 4750 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4751 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4752 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4753 ;; 4754 ccc*) 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756 # All Alpha code is PIC. 4757 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4758 ;; 4759 xl* | bgxl* | bgf* | mpixl*) 4760 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4762 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4764 ;; 4765 *) 4766 case `$CC -V 2>&1 | sed 5q` in 4767 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4768 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4769 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4770 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4772 ;; 4773 *Sun\ F* | *Sun*Fortran*) 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)='-Qoption ld ' 4777 ;; 4778 *Sun\ C*) 4779 # Sun C 5.9 4780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4781 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4782 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4783 ;; 4784 *Intel*\ [[CF]]*Compiler*) 4785 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4788 ;; 4789 *Portland\ Group*) 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)='-Bstatic' 4793 ;; 4794 esac 4795 ;; 4796 esac 4797 ;; 4798 4799 newsos6) 4800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4802 ;; 4803 4804 *nto* | *qnx*) 4805 # QNX uses GNU C++, but need to define -shared option too, otherwise 4806 # it will coredump. 4807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4808 ;; 4809 4810 osf3* | osf4* | osf5*) 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812 # All OSF/1 code is PIC. 4813 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4814 ;; 4815 4816 rdos*) 4817 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4818 ;; 4819 4820 solaris*) 4821 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4823 case $cc_basename in 4824 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4825 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4826 *) 4827 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4828 esac 4829 ;; 4830 4831 sunos4*) 4832 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4833 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4834 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4835 ;; 4836 4837 sysv4 | sysv4.2uw2* | sysv4.3*) 4838 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4840 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4841 ;; 4842 4843 sysv4*MP*) 4844 if test -d /usr/nec; then 4845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4846 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847 fi 4848 ;; 4849 4850 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4851 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4854 ;; 4855 4856 unicos*) 4857 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4858 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4859 ;; 4860 4861 uts4*) 4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864 ;; 4865 4866 *) 4867 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868 ;; 4869 esac 4870 fi 4871]) 4872case $host_os in 4873 # For platforms that do not support PIC, -DPIC is meaningless: 4874 *djgpp*) 4875 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4876 ;; 4877 *) 4878 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4879 ;; 4880esac 4881 4882AC_CACHE_CHECK([for $compiler option to produce PIC], 4883 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4884 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4885_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4886 4887# 4888# Check to make sure the PIC flag actually works. 4889# 4890if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4891 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4892 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4893 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4894 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4895 "" | " "*) ;; 4896 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4897 esac], 4898 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4899 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4900fi 4901_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4902 [Additional compiler flags for building library objects]) 4903 4904_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4905 [How to pass a linker flag through the compiler]) 4906# 4907# Check to make sure the static flag actually works. 4908# 4909wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4910_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4911 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4912 $lt_tmp_static_flag, 4913 [], 4914 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4915_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4916 [Compiler flag to prevent dynamic linking]) 4917])# _LT_COMPILER_PIC 4918 4919 4920# _LT_LINKER_SHLIBS([TAGNAME]) 4921# ---------------------------- 4922# See if the linker supports building shared libraries. 4923m4_defun([_LT_LINKER_SHLIBS], 4924[AC_REQUIRE([LT_PATH_LD])dnl 4925AC_REQUIRE([LT_PATH_NM])dnl 4926m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4927m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928m4_require([_LT_DECL_EGREP])dnl 4929m4_require([_LT_DECL_SED])dnl 4930m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4931m4_require([_LT_TAG_COMPILER])dnl 4932AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4933m4_if([$1], [CXX], [ 4934 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4935 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4936 case $host_os in 4937 aix[[4-9]]*) 4938 # If we're using GNU nm, then we don't want the "-C" option. 4939 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4940 # Without the "-l" option, or with the "-B" option, AIX nm treats 4941 # weak defined symbols like other global defined symbols, whereas 4942 # GNU nm marks them as "W". 4943 # While the 'weak' keyword is ignored in the Export File, we need 4944 # it in the Import File for the 'aix-soname' feature, so we have 4945 # to replace the "-B" option with "-P" for AIX nm. 4946 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4947 _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' 4948 else 4949 _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' 4950 fi 4951 ;; 4952 pw32*) 4953 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4954 ;; 4955 cygwin* | mingw* | cegcc*) 4956 case $cc_basename in 4957 cl*) 4958 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4959 ;; 4960 *) 4961 _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' 4962 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4963 ;; 4964 esac 4965 ;; 4966 *) 4967 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4968 ;; 4969 esac 4970], [ 4971 runpath_var= 4972 _LT_TAGVAR(allow_undefined_flag, $1)= 4973 _LT_TAGVAR(always_export_symbols, $1)=no 4974 _LT_TAGVAR(archive_cmds, $1)= 4975 _LT_TAGVAR(archive_expsym_cmds, $1)= 4976 _LT_TAGVAR(compiler_needs_object, $1)=no 4977 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4978 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4979 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4980 _LT_TAGVAR(hardcode_automatic, $1)=no 4981 _LT_TAGVAR(hardcode_direct, $1)=no 4982 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4983 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4984 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4985 _LT_TAGVAR(hardcode_minus_L, $1)=no 4986 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4987 _LT_TAGVAR(inherit_rpath, $1)=no 4988 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4989 _LT_TAGVAR(module_cmds, $1)= 4990 _LT_TAGVAR(module_expsym_cmds, $1)= 4991 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4992 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4993 _LT_TAGVAR(thread_safe_flag_spec, $1)= 4994 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4995 # include_expsyms should be a list of space-separated symbols to be *always* 4996 # included in the symbol list 4997 _LT_TAGVAR(include_expsyms, $1)= 4998 # exclude_expsyms can be an extended regexp of symbols to exclude 4999 # it will be wrapped by ' (' and ')$', so one must not match beginning or 5000 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5001 # as well as any symbol that contains 'd'. 5002 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5003 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5004 # platforms (ab)use it in PIC code, but their linkers get confused if 5005 # the symbol is explicitly referenced. Since portable code cannot 5006 # rely on this symbol name, it's probably fine to never include it in 5007 # preloaded symbol tables. 5008 # Exclude shared library initialization/finalization symbols. 5009dnl Note also adjust exclude_expsyms for C++ above. 5010 extract_expsyms_cmds= 5011 5012 case $host_os in 5013 cygwin* | mingw* | pw32* | cegcc*) 5014 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5015 # When not using gcc, we currently assume that we are using 5016 # Microsoft Visual C++. 5017 if test yes != "$GCC"; then 5018 with_gnu_ld=no 5019 fi 5020 ;; 5021 interix*) 5022 # we just hope/assume this is gcc and not c89 (= MSVC++) 5023 with_gnu_ld=yes 5024 ;; 5025 openbsd* | bitrig*) 5026 with_gnu_ld=no 5027 ;; 5028 esac 5029 5030 _LT_TAGVAR(ld_shlibs, $1)=yes 5031 5032 # On some targets, GNU ld is compatible enough with the native linker 5033 # that we're better off using the native interface for both. 5034 lt_use_gnu_ld_interface=no 5035 if test yes = "$with_gnu_ld"; then 5036 case $host_os in 5037 aix*) 5038 # The AIX port of GNU ld has always aspired to compatibility 5039 # with the native linker. However, as the warning in the GNU ld 5040 # block says, versions before 2.19.5* couldn't really create working 5041 # shared libraries, regardless of the interface used. 5042 case `$LD -v 2>&1` in 5043 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5044 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5045 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5046 *) 5047 lt_use_gnu_ld_interface=yes 5048 ;; 5049 esac 5050 ;; 5051 *) 5052 lt_use_gnu_ld_interface=yes 5053 ;; 5054 esac 5055 fi 5056 5057 if test yes = "$lt_use_gnu_ld_interface"; then 5058 # If archive_cmds runs LD, not CC, wlarc should be empty 5059 wlarc='$wl' 5060 5061 # Set some defaults for GNU ld with shared library support. These 5062 # are reset later if shared libraries are not supported. Putting them 5063 # here allows them to be overridden if necessary. 5064 runpath_var=LD_RUN_PATH 5065 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5066 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5067 # ancient GNU ld didn't support --whole-archive et. al. 5068 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5069 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5070 else 5071 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5072 fi 5073 supports_anon_versioning=no 5074 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5075 *GNU\ gold*) supports_anon_versioning=yes ;; 5076 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5077 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5078 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5079 *\ 2.11.*) ;; # other 2.11 versions 5080 *) supports_anon_versioning=yes ;; 5081 esac 5082 5083 # See if GNU ld supports shared libraries. 5084 case $host_os in 5085 aix[[3-9]]*) 5086 # On AIX/PPC, the GNU linker is very broken 5087 if test ia64 != "$host_cpu"; then 5088 _LT_TAGVAR(ld_shlibs, $1)=no 5089 cat <<_LT_EOF 1>&2 5090 5091*** Warning: the GNU linker, at least up to release 2.19, is reported 5092*** to be unable to reliably create shared libraries on AIX. 5093*** Therefore, libtool is disabling shared libraries support. If you 5094*** really care for shared libraries, you may want to install binutils 5095*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5096*** You will then need to restart the configuration process. 5097 5098_LT_EOF 5099 fi 5100 ;; 5101 5102 amigaos*) 5103 case $host_cpu in 5104 powerpc) 5105 # see comment about AmigaOS4 .so support 5106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5107 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5108 ;; 5109 m68k) 5110 _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)' 5111 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5112 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5113 ;; 5114 esac 5115 ;; 5116 5117 beos*) 5118 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5119 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5120 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5121 # support --undefined. This deserves some investigation. FIXME 5122 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5123 else 5124 _LT_TAGVAR(ld_shlibs, $1)=no 5125 fi 5126 ;; 5127 5128 cygwin* | mingw* | pw32* | cegcc*) 5129 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5130 # as there is no search path for DLLs. 5131 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5132 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5133 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5134 _LT_TAGVAR(always_export_symbols, $1)=no 5135 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5136 _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' 5137 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5138 5139 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5140 _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' 5141 # If the export-symbols file already is a .def file, use it as 5142 # is; otherwise, prepend EXPORTS... 5143 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5144 cp $export_symbols $output_objdir/$soname.def; 5145 else 5146 echo EXPORTS > $output_objdir/$soname.def; 5147 cat $export_symbols >> $output_objdir/$soname.def; 5148 fi~ 5149 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5150 else 5151 _LT_TAGVAR(ld_shlibs, $1)=no 5152 fi 5153 ;; 5154 5155 haiku*) 5156 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5157 _LT_TAGVAR(link_all_deplibs, $1)=yes 5158 ;; 5159 5160 os2*) 5161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5162 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5163 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5164 shrext_cmds=.dll 5165 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5170 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5171 emximp -o $lib $output_objdir/$libname.def' 5172 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5173 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5174 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5175 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5176 prefix_cmds="$SED"~ 5177 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5178 prefix_cmds="$prefix_cmds -e 1d"; 5179 fi~ 5180 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5181 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5182 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5183 emximp -o $lib $output_objdir/$libname.def' 5184 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5185 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5186 ;; 5187 5188 interix[[3-9]]*) 5189 _LT_TAGVAR(hardcode_direct, $1)=no 5190 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5193 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5194 # Instead, shared libraries are loaded at an image base (0x10000000 by 5195 # default) and relocated if they conflict, which is a slow very memory 5196 # consuming and fragmenting process. To avoid this, we pick a random, 5197 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5198 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5199 _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' 5200 _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' 5201 ;; 5202 5203 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5204 tmp_diet=no 5205 if test linux-dietlibc = "$host_os"; then 5206 case $cc_basename in 5207 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5208 esac 5209 fi 5210 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5211 && test no = "$tmp_diet" 5212 then 5213 tmp_addflag=' $pic_flag' 5214 tmp_sharedflag='-shared' 5215 case $cc_basename,$host_cpu in 5216 pgcc*) # Portland Group C compiler 5217 _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' 5218 tmp_addflag=' $pic_flag' 5219 ;; 5220 pgf77* | pgf90* | pgf95* | pgfortran*) 5221 # Portland Group f77 and f90 compilers 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 -Mnomain' ;; 5224 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5225 tmp_addflag=' -i_dynamic' ;; 5226 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5227 tmp_addflag=' -i_dynamic -nofor_main' ;; 5228 ifc* | ifort*) # Intel Fortran compiler 5229 tmp_addflag=' -nofor_main' ;; 5230 lf95*) # Lahey Fortran 8.1 5231 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5232 tmp_sharedflag='--shared' ;; 5233 nagfor*) # NAGFOR 5.3 5234 tmp_sharedflag='-Wl,-shared' ;; 5235 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5236 tmp_sharedflag='-qmkshrobj' 5237 tmp_addflag= ;; 5238 nvcc*) # Cuda Compiler Driver 2.2 5239 _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' 5240 _LT_TAGVAR(compiler_needs_object, $1)=yes 5241 ;; 5242 esac 5243 case `$CC -V 2>&1 | sed 5q` in 5244 *Sun\ C*) # Sun C 5.9 5245 _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' 5246 _LT_TAGVAR(compiler_needs_object, $1)=yes 5247 tmp_sharedflag='-G' ;; 5248 *Sun\ F*) # Sun Fortran 8.3 5249 tmp_sharedflag='-G' ;; 5250 esac 5251 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5252 5253 if test yes = "$supports_anon_versioning"; then 5254 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5255 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5256 echo "local: *; };" >> $output_objdir/$libname.ver~ 5257 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5258 fi 5259 5260 case $cc_basename in 5261 tcc*) 5262 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5263 ;; 5264 xlf* | bgf* | bgxlf* | mpixlf*) 5265 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5266 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5268 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5269 if test yes = "$supports_anon_versioning"; then 5270 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5271 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5272 echo "local: *; };" >> $output_objdir/$libname.ver~ 5273 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5274 fi 5275 ;; 5276 esac 5277 else 5278 _LT_TAGVAR(ld_shlibs, $1)=no 5279 fi 5280 ;; 5281 5282 netbsd*) 5283 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5284 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5285 wlarc= 5286 else 5287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5288 _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' 5289 fi 5290 ;; 5291 5292 solaris*) 5293 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5294 _LT_TAGVAR(ld_shlibs, $1)=no 5295 cat <<_LT_EOF 1>&2 5296 5297*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5298*** create shared libraries on Solaris systems. Therefore, libtool 5299*** is disabling shared libraries support. We urge you to upgrade GNU 5300*** binutils to release 2.9.1 or newer. Another option is to modify 5301*** your PATH or compiler configuration so that the native linker is 5302*** used, and then restart. 5303 5304_LT_EOF 5305 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5306 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5307 _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' 5308 else 5309 _LT_TAGVAR(ld_shlibs, $1)=no 5310 fi 5311 ;; 5312 5313 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5314 case `$LD -v 2>&1` in 5315 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5316 _LT_TAGVAR(ld_shlibs, $1)=no 5317 cat <<_LT_EOF 1>&2 5318 5319*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5320*** reliably create shared libraries on SCO systems. Therefore, libtool 5321*** is disabling shared libraries support. We urge you to upgrade GNU 5322*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5323*** your PATH or compiler configuration so that the native linker is 5324*** used, and then restart. 5325 5326_LT_EOF 5327 ;; 5328 *) 5329 # For security reasons, it is highly recommended that you always 5330 # use absolute paths for naming shared libraries, and exclude the 5331 # DT_RUNPATH tag from executables and libraries. But doing so 5332 # requires that you compile everything twice, which is a pain. 5333 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5336 _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' 5337 else 5338 _LT_TAGVAR(ld_shlibs, $1)=no 5339 fi 5340 ;; 5341 esac 5342 ;; 5343 5344 sunos4*) 5345 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5346 wlarc= 5347 _LT_TAGVAR(hardcode_direct, $1)=yes 5348 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5349 ;; 5350 5351 *) 5352 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5354 _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' 5355 else 5356 _LT_TAGVAR(ld_shlibs, $1)=no 5357 fi 5358 ;; 5359 esac 5360 5361 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5362 runpath_var= 5363 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5364 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5365 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5366 fi 5367 else 5368 # PORTME fill in a description of your system's linker (not GNU ld) 5369 case $host_os in 5370 aix3*) 5371 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5372 _LT_TAGVAR(always_export_symbols, $1)=yes 5373 _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' 5374 # Note: this linker hardcodes the directories in LIBPATH if there 5375 # are no directories specified by -L. 5376 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5377 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5378 # Neither direct hardcoding nor static linking is supported with a 5379 # broken collect2. 5380 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5381 fi 5382 ;; 5383 5384 aix[[4-9]]*) 5385 if test ia64 = "$host_cpu"; then 5386 # On IA64, the linker does run time linking by default, so we don't 5387 # have to do anything special. 5388 aix_use_runtimelinking=no 5389 exp_sym_flag='-Bexport' 5390 no_entry_flag= 5391 else 5392 # If we're using GNU nm, then we don't want the "-C" option. 5393 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5394 # Without the "-l" option, or with the "-B" option, AIX nm treats 5395 # weak defined symbols like other global defined symbols, whereas 5396 # GNU nm marks them as "W". 5397 # While the 'weak' keyword is ignored in the Export File, we need 5398 # it in the Import File for the 'aix-soname' feature, so we have 5399 # to replace the "-B" option with "-P" for AIX nm. 5400 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5401 _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' 5402 else 5403 _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' 5404 fi 5405 aix_use_runtimelinking=no 5406 5407 # Test if we are trying to use run time linking or normal 5408 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5409 # have runtime linking enabled, and use it for executables. 5410 # For shared libraries, we enable/disable runtime linking 5411 # depending on the kind of the shared library created - 5412 # when "with_aix_soname,aix_use_runtimelinking" is: 5413 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5414 # "aix,yes" lib.so shared, rtl:yes, for executables 5415 # lib.a static archive 5416 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5417 # lib.a(lib.so.V) shared, rtl:no, for executables 5418 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5419 # lib.a(lib.so.V) shared, rtl:no 5420 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5421 # lib.a static archive 5422 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5423 for ld_flag in $LDFLAGS; do 5424 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5425 aix_use_runtimelinking=yes 5426 break 5427 fi 5428 done 5429 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5430 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5431 # so we don't have lib.a shared libs to link our executables. 5432 # We have to force runtime linking in this case. 5433 aix_use_runtimelinking=yes 5434 LDFLAGS="$LDFLAGS -Wl,-brtl" 5435 fi 5436 ;; 5437 esac 5438 5439 exp_sym_flag='-bexport' 5440 no_entry_flag='-bnoentry' 5441 fi 5442 5443 # When large executables or shared objects are built, AIX ld can 5444 # have problems creating the table of contents. If linking a library 5445 # or program results in "error TOC overflow" add -mminimal-toc to 5446 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5447 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5448 5449 _LT_TAGVAR(archive_cmds, $1)='' 5450 _LT_TAGVAR(hardcode_direct, $1)=yes 5451 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5452 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5453 _LT_TAGVAR(link_all_deplibs, $1)=yes 5454 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5455 case $with_aix_soname,$aix_use_runtimelinking in 5456 aix,*) ;; # traditional, no import file 5457 svr4,* | *,yes) # use import file 5458 # The Import File defines what to hardcode. 5459 _LT_TAGVAR(hardcode_direct, $1)=no 5460 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5461 ;; 5462 esac 5463 5464 if test yes = "$GCC"; then 5465 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5466 # We only want to do this on AIX 4.2 and lower, the check 5467 # below for broken collect2 doesn't work under 4.3+ 5468 collect2name=`$CC -print-prog-name=collect2` 5469 if test -f "$collect2name" && 5470 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5471 then 5472 # We have reworked collect2 5473 : 5474 else 5475 # We have old collect2 5476 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5477 # It fails to find uninstalled libraries when the uninstalled 5478 # path is not listed in the libpath. Setting hardcode_minus_L 5479 # to unsupported forces relinking 5480 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5482 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5483 fi 5484 ;; 5485 esac 5486 shared_flag='-shared' 5487 if test yes = "$aix_use_runtimelinking"; then 5488 shared_flag="$shared_flag "'$wl-G' 5489 fi 5490 # Need to ensure runtime linking is disabled for the traditional 5491 # shared library, or the linker may eventually find shared libraries 5492 # /with/ Import File - we do not want to mix them. 5493 shared_flag_aix='-shared' 5494 shared_flag_svr4='-shared $wl-G' 5495 else 5496 # not using gcc 5497 if test ia64 = "$host_cpu"; then 5498 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5499 # chokes on -Wl,-G. The following line is correct: 5500 shared_flag='-G' 5501 else 5502 if test yes = "$aix_use_runtimelinking"; then 5503 shared_flag='$wl-G' 5504 else 5505 shared_flag='$wl-bM:SRE' 5506 fi 5507 shared_flag_aix='$wl-bM:SRE' 5508 shared_flag_svr4='$wl-G' 5509 fi 5510 fi 5511 5512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5513 # It seems that -bexpall does not export symbols beginning with 5514 # underscore (_), so it is better to generate a list of symbols to export. 5515 _LT_TAGVAR(always_export_symbols, $1)=yes 5516 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5517 # Warning - without using the other runtime loading flags (-brtl), 5518 # -berok will link without error, but may produce a broken library. 5519 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5520 # Determine the default libpath from the value encoded in an 5521 # empty executable. 5522 _LT_SYS_MODULE_PATH_AIX([$1]) 5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5524 _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 5525 else 5526 if test ia64 = "$host_cpu"; then 5527 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5528 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5529 _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" 5530 else 5531 # Determine the default libpath from the value encoded in an 5532 # empty executable. 5533 _LT_SYS_MODULE_PATH_AIX([$1]) 5534 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5535 # Warning - without using the other run time loading flags, 5536 # -berok will link without error, but may produce a broken library. 5537 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5538 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5539 if test yes = "$with_gnu_ld"; then 5540 # We only use this code for GNU lds that support --whole-archive. 5541 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5542 else 5543 # Exported symbols can be pulled into shared objects from archives 5544 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5545 fi 5546 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5547 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5548 # -brtl affects multiple linker settings, -berok does not and is overridden later 5549 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5550 if test svr4 != "$with_aix_soname"; then 5551 # This is similar to how AIX traditionally builds its shared libraries. 5552 _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' 5553 fi 5554 if test aix != "$with_aix_soname"; then 5555 _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' 5556 else 5557 # used by -dlpreopen to get the symbols 5558 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5559 fi 5560 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5561 fi 5562 fi 5563 ;; 5564 5565 amigaos*) 5566 case $host_cpu in 5567 powerpc) 5568 # see comment about AmigaOS4 .so support 5569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5570 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5571 ;; 5572 m68k) 5573 _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)' 5574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5575 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5576 ;; 5577 esac 5578 ;; 5579 5580 bsdi[[45]]*) 5581 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5582 ;; 5583 5584 cygwin* | mingw* | pw32* | cegcc*) 5585 # When not using gcc, we currently assume that we are using 5586 # Microsoft Visual C++. 5587 # hardcode_libdir_flag_spec is actually meaningless, as there is 5588 # no search path for DLLs. 5589 case $cc_basename in 5590 cl*) 5591 # Native MSVC 5592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5593 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5594 _LT_TAGVAR(always_export_symbols, $1)=yes 5595 _LT_TAGVAR(file_list_spec, $1)='@' 5596 # Tell ltmain to make .lib files, not .a files. 5597 libext=lib 5598 # Tell ltmain to make .dll files, not .so files. 5599 shrext_cmds=.dll 5600 # FIXME: Setting linknames here is a bad hack. 5601 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5602 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5603 cp "$export_symbols" "$output_objdir/$soname.def"; 5604 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5605 else 5606 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5607 fi~ 5608 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5609 linknames=' 5610 # The linker will not automatically build a static lib if we build a DLL. 5611 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5612 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5613 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5614 _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' 5615 # Don't use ranlib 5616 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5617 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5618 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5619 case $lt_outputfile in 5620 *.exe|*.EXE) ;; 5621 *) 5622 lt_outputfile=$lt_outputfile.exe 5623 lt_tool_outputfile=$lt_tool_outputfile.exe 5624 ;; 5625 esac~ 5626 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5627 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5628 $RM "$lt_outputfile.manifest"; 5629 fi' 5630 ;; 5631 *) 5632 # Assume MSVC wrapper 5633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5634 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5635 # Tell ltmain to make .lib files, not .a files. 5636 libext=lib 5637 # Tell ltmain to make .dll files, not .so files. 5638 shrext_cmds=.dll 5639 # FIXME: Setting linknames here is a bad hack. 5640 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5641 # The linker will automatically build a .lib file if we build a DLL. 5642 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5643 # FIXME: Should let the user specify the lib program. 5644 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5645 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5646 ;; 5647 esac 5648 ;; 5649 5650 darwin* | rhapsody*) 5651 _LT_DARWIN_LINKER_FEATURES($1) 5652 ;; 5653 5654 dgux*) 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5657 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658 ;; 5659 5660 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5661 # support. Future versions do this automatically, but an explicit c++rt0.o 5662 # does not break anything, and helps significantly (at the cost of a little 5663 # extra space). 5664 freebsd2.2*) 5665 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5667 _LT_TAGVAR(hardcode_direct, $1)=yes 5668 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5669 ;; 5670 5671 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5672 freebsd2.*) 5673 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5674 _LT_TAGVAR(hardcode_direct, $1)=yes 5675 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5676 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5677 ;; 5678 5679 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5680 freebsd* | dragonfly*) 5681 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5683 _LT_TAGVAR(hardcode_direct, $1)=yes 5684 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5685 ;; 5686 5687 hpux9*) 5688 if test yes = "$GCC"; then 5689 _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' 5690 else 5691 _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' 5692 fi 5693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5694 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5695 _LT_TAGVAR(hardcode_direct, $1)=yes 5696 5697 # hardcode_minus_L: Not really in the search PATH, 5698 # but as the default location of the library. 5699 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5701 ;; 5702 5703 hpux10*) 5704 if test yes,no = "$GCC,$with_gnu_ld"; then 5705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5706 else 5707 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5708 fi 5709 if test no = "$with_gnu_ld"; then 5710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5711 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5712 _LT_TAGVAR(hardcode_direct, $1)=yes 5713 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5714 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5715 # hardcode_minus_L: Not really in the search PATH, 5716 # but as the default location of the library. 5717 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5718 fi 5719 ;; 5720 5721 hpux11*) 5722 if test yes,no = "$GCC,$with_gnu_ld"; then 5723 case $host_cpu in 5724 hppa*64*) 5725 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5726 ;; 5727 ia64*) 5728 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5729 ;; 5730 *) 5731 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5732 ;; 5733 esac 5734 else 5735 case $host_cpu in 5736 hppa*64*) 5737 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5738 ;; 5739 ia64*) 5740 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5741 ;; 5742 *) 5743 m4_if($1, [], [ 5744 # Older versions of the 11.00 compiler do not understand -b yet 5745 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5746 _LT_LINKER_OPTION([if $CC understands -b], 5747 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5748 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5749 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5750 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5751 ;; 5752 esac 5753 fi 5754 if test no = "$with_gnu_ld"; then 5755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5756 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757 5758 case $host_cpu in 5759 hppa*64*|ia64*) 5760 _LT_TAGVAR(hardcode_direct, $1)=no 5761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5762 ;; 5763 *) 5764 _LT_TAGVAR(hardcode_direct, $1)=yes 5765 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5766 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5767 5768 # hardcode_minus_L: Not really in the search PATH, 5769 # but as the default location of the library. 5770 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5771 ;; 5772 esac 5773 fi 5774 ;; 5775 5776 irix5* | irix6* | nonstopux*) 5777 if test yes = "$GCC"; then 5778 _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' 5779 # Try to use the -exported_symbol ld option, if it does not 5780 # work, assume that -exports_file does not work either and 5781 # implicitly export all symbols. 5782 # This should be the same for all languages, so no per-tag cache variable. 5783 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5784 [lt_cv_irix_exported_symbol], 5785 [save_LDFLAGS=$LDFLAGS 5786 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5787 AC_LINK_IFELSE( 5788 [AC_LANG_SOURCE( 5789 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5790 [C++], [[int foo (void) { return 0; }]], 5791 [Fortran 77], [[ 5792 subroutine foo 5793 end]], 5794 [Fortran], [[ 5795 subroutine foo 5796 end]])])], 5797 [lt_cv_irix_exported_symbol=yes], 5798 [lt_cv_irix_exported_symbol=no]) 5799 LDFLAGS=$save_LDFLAGS]) 5800 if test yes = "$lt_cv_irix_exported_symbol"; then 5801 _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' 5802 fi 5803 else 5804 _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' 5805 _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' 5806 fi 5807 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5808 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5809 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5810 _LT_TAGVAR(inherit_rpath, $1)=yes 5811 _LT_TAGVAR(link_all_deplibs, $1)=yes 5812 ;; 5813 5814 linux*) 5815 case $cc_basename in 5816 tcc*) 5817 # Fabrice Bellard et al's Tiny C Compiler 5818 _LT_TAGVAR(ld_shlibs, $1)=yes 5819 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5820 ;; 5821 esac 5822 ;; 5823 5824 netbsd*) 5825 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5826 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5827 else 5828 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5829 fi 5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5831 _LT_TAGVAR(hardcode_direct, $1)=yes 5832 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5833 ;; 5834 5835 newsos6) 5836 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5837 _LT_TAGVAR(hardcode_direct, $1)=yes 5838 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5839 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5841 ;; 5842 5843 *nto* | *qnx*) 5844 ;; 5845 5846 openbsd* | bitrig*) 5847 if test -f /usr/libexec/ld.so; then 5848 _LT_TAGVAR(hardcode_direct, $1)=yes 5849 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5850 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5851 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5852 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5854 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5855 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5856 else 5857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5859 fi 5860 else 5861 _LT_TAGVAR(ld_shlibs, $1)=no 5862 fi 5863 ;; 5864 5865 os2*) 5866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5867 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5868 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5869 shrext_cmds=.dll 5870 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5871 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5872 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5873 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5874 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5875 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5876 emximp -o $lib $output_objdir/$libname.def' 5877 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5878 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5879 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5880 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5881 prefix_cmds="$SED"~ 5882 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5883 prefix_cmds="$prefix_cmds -e 1d"; 5884 fi~ 5885 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5886 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5887 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5888 emximp -o $lib $output_objdir/$libname.def' 5889 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5890 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5891 ;; 5892 5893 osf3*) 5894 if test yes = "$GCC"; then 5895 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5896 _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' 5897 else 5898 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5899 _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' 5900 fi 5901 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5903 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5904 ;; 5905 5906 osf4* | osf5*) # as osf3* with the addition of -msym flag 5907 if test yes = "$GCC"; then 5908 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5909 _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' 5910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5911 else 5912 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5913 _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' 5914 _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~ 5915 $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' 5916 5917 # Both c and cxx compiler support -rpath directly 5918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5919 fi 5920 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5921 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5922 ;; 5923 5924 solaris*) 5925 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5926 if test yes = "$GCC"; then 5927 wlarc='$wl' 5928 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5929 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5930 $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' 5931 else 5932 case `$CC -V 2>&1` in 5933 *"Compilers 5.0"*) 5934 wlarc='' 5935 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5936 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5937 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5938 ;; 5939 *) 5940 wlarc='$wl' 5941 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5942 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5943 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5944 ;; 5945 esac 5946 fi 5947 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5948 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949 case $host_os in 5950 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5951 *) 5952 # The compiler driver will combine and reorder linker options, 5953 # but understands '-z linker_flag'. GCC discards it without '$wl', 5954 # but is careful enough not to reorder. 5955 # Supported since Solaris 2.6 (maybe 2.5.1?) 5956 if test yes = "$GCC"; then 5957 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5958 else 5959 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5960 fi 5961 ;; 5962 esac 5963 _LT_TAGVAR(link_all_deplibs, $1)=yes 5964 ;; 5965 5966 sunos4*) 5967 if test sequent = "$host_vendor"; then 5968 # Use $CC to link under sequent, because it throws in some extra .o 5969 # files that make .init and .fini sections work. 5970 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5971 else 5972 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5973 fi 5974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5975 _LT_TAGVAR(hardcode_direct, $1)=yes 5976 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5977 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978 ;; 5979 5980 sysv4) 5981 case $host_vendor in 5982 sni) 5983 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5985 ;; 5986 siemens) 5987 ## LD is ld it makes a PLAMLIB 5988 ## CC just makes a GrossModule. 5989 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5990 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5991 _LT_TAGVAR(hardcode_direct, $1)=no 5992 ;; 5993 motorola) 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5995 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5996 ;; 5997 esac 5998 runpath_var='LD_RUN_PATH' 5999 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000 ;; 6001 6002 sysv4.3*) 6003 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6006 ;; 6007 6008 sysv4*MP*) 6009 if test -d /usr/nec; then 6010 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6011 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012 runpath_var=LD_RUN_PATH 6013 hardcode_runpath_var=yes 6014 _LT_TAGVAR(ld_shlibs, $1)=yes 6015 fi 6016 ;; 6017 6018 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6019 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6020 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6021 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6022 runpath_var='LD_RUN_PATH' 6023 6024 if test yes = "$GCC"; then 6025 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6027 else 6028 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6029 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6030 fi 6031 ;; 6032 6033 sysv5* | sco3.2v5* | sco5v6*) 6034 # Note: We CANNOT use -z defs as we might desire, because we do not 6035 # link with -lc, and that would cause any symbols used from libc to 6036 # always be unresolved, which means just about no library would 6037 # ever link correctly. If we're not using GNU ld we use -z text 6038 # though, which does catch some bad symbols but isn't as heavy-handed 6039 # as -z defs. 6040 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6041 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6042 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6043 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6045 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6046 _LT_TAGVAR(link_all_deplibs, $1)=yes 6047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6048 runpath_var='LD_RUN_PATH' 6049 6050 if test yes = "$GCC"; then 6051 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6052 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6053 else 6054 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6055 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6056 fi 6057 ;; 6058 6059 uts4*) 6060 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6062 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6063 ;; 6064 6065 *) 6066 _LT_TAGVAR(ld_shlibs, $1)=no 6067 ;; 6068 esac 6069 6070 if test sni = "$host_vendor"; then 6071 case $host in 6072 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6073 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6074 ;; 6075 esac 6076 fi 6077 fi 6078]) 6079AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6080test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6081 6082_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6083 6084_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6085_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6086_LT_DECL([], [extract_expsyms_cmds], [2], 6087 [The commands to extract the exported symbol list from a shared archive]) 6088 6089# 6090# Do we need to explicitly link libc? 6091# 6092case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6093x|xyes) 6094 # Assume -lc should be added 6095 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6096 6097 if test yes,yes = "$GCC,$enable_shared"; then 6098 case $_LT_TAGVAR(archive_cmds, $1) in 6099 *'~'*) 6100 # FIXME: we may have to deal with multi-command sequences. 6101 ;; 6102 '$CC '*) 6103 # Test whether the compiler implicitly links with -lc since on some 6104 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6105 # to ld, don't add -lc before -lgcc. 6106 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6107 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6108 [$RM conftest* 6109 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6110 6111 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6112 soname=conftest 6113 lib=conftest 6114 libobjs=conftest.$ac_objext 6115 deplibs= 6116 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6117 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6118 compiler_flags=-v 6119 linker_flags=-v 6120 verstring= 6121 output_objdir=. 6122 libname=conftest 6123 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6124 _LT_TAGVAR(allow_undefined_flag, $1)= 6125 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6126 then 6127 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6128 else 6129 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6130 fi 6131 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6132 else 6133 cat conftest.err 1>&5 6134 fi 6135 $RM conftest* 6136 ]) 6137 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6138 ;; 6139 esac 6140 fi 6141 ;; 6142esac 6143 6144_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6145 [Whether or not to add -lc for building shared libraries]) 6146_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6147 [enable_shared_with_static_runtimes], [0], 6148 [Whether or not to disallow shared libs when runtime libs are static]) 6149_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6150 [Compiler flag to allow reflexive dlopens]) 6151_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6152 [Compiler flag to generate shared objects directly from archives]) 6153_LT_TAGDECL([], [compiler_needs_object], [1], 6154 [Whether the compiler copes with passing no objects directly]) 6155_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6156 [Create an old-style archive from a shared archive]) 6157_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6158 [Create a temporary old-style archive to link instead of a shared archive]) 6159_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6160_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6161_LT_TAGDECL([], [module_cmds], [2], 6162 [Commands used to build a loadable module if different from building 6163 a shared archive.]) 6164_LT_TAGDECL([], [module_expsym_cmds], [2]) 6165_LT_TAGDECL([], [with_gnu_ld], [1], 6166 [Whether we are building with GNU ld or not]) 6167_LT_TAGDECL([], [allow_undefined_flag], [1], 6168 [Flag that allows shared libraries with undefined symbols to be built]) 6169_LT_TAGDECL([], [no_undefined_flag], [1], 6170 [Flag that enforces no undefined symbols]) 6171_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6172 [Flag to hardcode $libdir into a binary during linking. 6173 This must work even if $libdir does not exist]) 6174_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6175 [Whether we need a single "-rpath" flag with a separated argument]) 6176_LT_TAGDECL([], [hardcode_direct], [0], 6177 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6178 DIR into the resulting binary]) 6179_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6180 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6181 DIR into the resulting binary and the resulting library dependency is 6182 "absolute", i.e impossible to change by setting $shlibpath_var if the 6183 library is relocated]) 6184_LT_TAGDECL([], [hardcode_minus_L], [0], 6185 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6186 into the resulting binary]) 6187_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6188 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6189 into the resulting binary]) 6190_LT_TAGDECL([], [hardcode_automatic], [0], 6191 [Set to "yes" if building a shared library automatically hardcodes DIR 6192 into the library and all subsequent libraries and executables linked 6193 against it]) 6194_LT_TAGDECL([], [inherit_rpath], [0], 6195 [Set to yes if linker adds runtime paths of dependent libraries 6196 to runtime path list]) 6197_LT_TAGDECL([], [link_all_deplibs], [0], 6198 [Whether libtool must link a program against all its dependency libraries]) 6199_LT_TAGDECL([], [always_export_symbols], [0], 6200 [Set to "yes" if exported symbols are required]) 6201_LT_TAGDECL([], [export_symbols_cmds], [2], 6202 [The commands to list exported symbols]) 6203_LT_TAGDECL([], [exclude_expsyms], [1], 6204 [Symbols that should not be listed in the preloaded symbols]) 6205_LT_TAGDECL([], [include_expsyms], [1], 6206 [Symbols that must always be exported]) 6207_LT_TAGDECL([], [prelink_cmds], [2], 6208 [Commands necessary for linking programs (against libraries) with templates]) 6209_LT_TAGDECL([], [postlink_cmds], [2], 6210 [Commands necessary for finishing linking programs]) 6211_LT_TAGDECL([], [file_list_spec], [1], 6212 [Specify filename containing input files]) 6213dnl FIXME: Not yet implemented 6214dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6215dnl [Compiler flag to generate thread safe objects]) 6216])# _LT_LINKER_SHLIBS 6217 6218 6219# _LT_LANG_C_CONFIG([TAG]) 6220# ------------------------ 6221# Ensure that the configuration variables for a C compiler are suitably 6222# defined. These variables are subsequently used by _LT_CONFIG to write 6223# the compiler configuration to 'libtool'. 6224m4_defun([_LT_LANG_C_CONFIG], 6225[m4_require([_LT_DECL_EGREP])dnl 6226lt_save_CC=$CC 6227AC_LANG_PUSH(C) 6228 6229# Source file extension for C test sources. 6230ac_ext=c 6231 6232# Object file extension for compiled C test sources. 6233objext=o 6234_LT_TAGVAR(objext, $1)=$objext 6235 6236# Code to be used in simple compile tests 6237lt_simple_compile_test_code="int some_variable = 0;" 6238 6239# Code to be used in simple link tests 6240lt_simple_link_test_code='int main(){return(0);}' 6241 6242_LT_TAG_COMPILER 6243# Save the default compiler, since it gets overwritten when the other 6244# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6245compiler_DEFAULT=$CC 6246 6247# save warnings/boilerplate of simple test code 6248_LT_COMPILER_BOILERPLATE 6249_LT_LINKER_BOILERPLATE 6250 6251if test -n "$compiler"; then 6252 _LT_COMPILER_NO_RTTI($1) 6253 _LT_COMPILER_PIC($1) 6254 _LT_COMPILER_C_O($1) 6255 _LT_COMPILER_FILE_LOCKS($1) 6256 _LT_LINKER_SHLIBS($1) 6257 _LT_SYS_DYNAMIC_LINKER($1) 6258 _LT_LINKER_HARDCODE_LIBPATH($1) 6259 LT_SYS_DLOPEN_SELF 6260 _LT_CMD_STRIPLIB 6261 6262 # Report what library types will actually be built 6263 AC_MSG_CHECKING([if libtool supports shared libraries]) 6264 AC_MSG_RESULT([$can_build_shared]) 6265 6266 AC_MSG_CHECKING([whether to build shared libraries]) 6267 test no = "$can_build_shared" && enable_shared=no 6268 6269 # On AIX, shared libraries and static libraries use the same namespace, and 6270 # are all built from PIC. 6271 case $host_os in 6272 aix3*) 6273 test yes = "$enable_shared" && enable_static=no 6274 if test -n "$RANLIB"; then 6275 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6276 postinstall_cmds='$RANLIB $lib' 6277 fi 6278 ;; 6279 6280 aix[[4-9]]*) 6281 if test ia64 != "$host_cpu"; then 6282 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6283 yes,aix,yes) ;; # shared object as lib.so file only 6284 yes,svr4,*) ;; # shared object as lib.so archive member only 6285 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6286 esac 6287 fi 6288 ;; 6289 esac 6290 AC_MSG_RESULT([$enable_shared]) 6291 6292 AC_MSG_CHECKING([whether to build static libraries]) 6293 # Make sure either enable_shared or enable_static is yes. 6294 test yes = "$enable_shared" || enable_static=yes 6295 AC_MSG_RESULT([$enable_static]) 6296 6297 _LT_CONFIG($1) 6298fi 6299AC_LANG_POP 6300CC=$lt_save_CC 6301])# _LT_LANG_C_CONFIG 6302 6303 6304# _LT_LANG_CXX_CONFIG([TAG]) 6305# -------------------------- 6306# Ensure that the configuration variables for a C++ compiler are suitably 6307# defined. These variables are subsequently used by _LT_CONFIG to write 6308# the compiler configuration to 'libtool'. 6309m4_defun([_LT_LANG_CXX_CONFIG], 6310[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6311m4_require([_LT_DECL_EGREP])dnl 6312m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6313if test -n "$CXX" && ( test no != "$CXX" && 6314 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6315 (test g++ != "$CXX"))); then 6316 AC_PROG_CXXCPP 6317else 6318 _lt_caught_CXX_error=yes 6319fi 6320 6321AC_LANG_PUSH(C++) 6322_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323_LT_TAGVAR(allow_undefined_flag, $1)= 6324_LT_TAGVAR(always_export_symbols, $1)=no 6325_LT_TAGVAR(archive_expsym_cmds, $1)= 6326_LT_TAGVAR(compiler_needs_object, $1)=no 6327_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328_LT_TAGVAR(hardcode_direct, $1)=no 6329_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332_LT_TAGVAR(hardcode_minus_L, $1)=no 6333_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334_LT_TAGVAR(hardcode_automatic, $1)=no 6335_LT_TAGVAR(inherit_rpath, $1)=no 6336_LT_TAGVAR(module_cmds, $1)= 6337_LT_TAGVAR(module_expsym_cmds, $1)= 6338_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6340_LT_TAGVAR(reload_flag, $1)=$reload_flag 6341_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342_LT_TAGVAR(no_undefined_flag, $1)= 6343_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345 6346# Source file extension for C++ test sources. 6347ac_ext=cpp 6348 6349# Object file extension for compiled C++ test sources. 6350objext=o 6351_LT_TAGVAR(objext, $1)=$objext 6352 6353# No sense in running all these tests if we already determined that 6354# the CXX compiler isn't working. Some variables (like enable_shared) 6355# are currently assumed to apply to all compilers on this platform, 6356# and will be corrupted by setting them based on a non-working compiler. 6357if test yes != "$_lt_caught_CXX_error"; then 6358 # Code to be used in simple compile tests 6359 lt_simple_compile_test_code="int some_variable = 0;" 6360 6361 # Code to be used in simple link tests 6362 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363 6364 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365 _LT_TAG_COMPILER 6366 6367 # save warnings/boilerplate of simple test code 6368 _LT_COMPILER_BOILERPLATE 6369 _LT_LINKER_BOILERPLATE 6370 6371 # Allow CC to be a program name with arguments. 6372 lt_save_CC=$CC 6373 lt_save_CFLAGS=$CFLAGS 6374 lt_save_LD=$LD 6375 lt_save_GCC=$GCC 6376 GCC=$GXX 6377 lt_save_with_gnu_ld=$with_gnu_ld 6378 lt_save_path_LD=$lt_cv_path_LD 6379 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6380 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6381 else 6382 $as_unset lt_cv_prog_gnu_ld 6383 fi 6384 if test -n "${lt_cv_path_LDCXX+set}"; then 6385 lt_cv_path_LD=$lt_cv_path_LDCXX 6386 else 6387 $as_unset lt_cv_path_LD 6388 fi 6389 test -z "${LDCXX+set}" || LD=$LDCXX 6390 CC=${CXX-"c++"} 6391 CFLAGS=$CXXFLAGS 6392 compiler=$CC 6393 _LT_TAGVAR(compiler, $1)=$CC 6394 _LT_CC_BASENAME([$compiler]) 6395 6396 if test -n "$compiler"; then 6397 # We don't want -fno-exception when compiling C++ code, so set the 6398 # no_builtin_flag separately 6399 if test yes = "$GXX"; then 6400 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6401 else 6402 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6403 fi 6404 6405 if test yes = "$GXX"; then 6406 # Set up default GNU C++ configuration 6407 6408 LT_PATH_LD 6409 6410 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6411 # archiving commands below assume that GNU ld is being used. 6412 if test yes = "$with_gnu_ld"; then 6413 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6414 _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' 6415 6416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6417 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418 6419 # If archive_cmds runs LD, not CC, wlarc should be empty 6420 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6421 # investigate it a little bit more. (MM) 6422 wlarc='$wl' 6423 6424 # ancient GNU ld didn't support --whole-archive et. al. 6425 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6426 $GREP 'no-whole-archive' > /dev/null; then 6427 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6428 else 6429 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6430 fi 6431 else 6432 with_gnu_ld=no 6433 wlarc= 6434 6435 # A generic and very simple default shared library creation 6436 # command for GNU C++ for the case where it uses the native 6437 # linker, instead of GNU ld. If possible, this setting should 6438 # overridden to take advantage of the native linker features on 6439 # the platform it is being used on. 6440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441 fi 6442 6443 # Commands to make compiler produce verbose output that lists 6444 # what "hidden" libraries, object files and flags are used when 6445 # linking a shared library. 6446 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6447 6448 else 6449 GXX=no 6450 with_gnu_ld=no 6451 wlarc= 6452 fi 6453 6454 # PORTME: fill in a description of your system's C++ link characteristics 6455 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456 _LT_TAGVAR(ld_shlibs, $1)=yes 6457 case $host_os in 6458 aix3*) 6459 # FIXME: insert proper C++ library support 6460 _LT_TAGVAR(ld_shlibs, $1)=no 6461 ;; 6462 aix[[4-9]]*) 6463 if test ia64 = "$host_cpu"; then 6464 # On IA64, the linker does run time linking by default, so we don't 6465 # have to do anything special. 6466 aix_use_runtimelinking=no 6467 exp_sym_flag='-Bexport' 6468 no_entry_flag= 6469 else 6470 aix_use_runtimelinking=no 6471 6472 # Test if we are trying to use run time linking or normal 6473 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6474 # have runtime linking enabled, and use it for executables. 6475 # For shared libraries, we enable/disable runtime linking 6476 # depending on the kind of the shared library created - 6477 # when "with_aix_soname,aix_use_runtimelinking" is: 6478 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6479 # "aix,yes" lib.so shared, rtl:yes, for executables 6480 # lib.a static archive 6481 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6482 # lib.a(lib.so.V) shared, rtl:no, for executables 6483 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6484 # lib.a(lib.so.V) shared, rtl:no 6485 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6486 # lib.a static archive 6487 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6488 for ld_flag in $LDFLAGS; do 6489 case $ld_flag in 6490 *-brtl*) 6491 aix_use_runtimelinking=yes 6492 break 6493 ;; 6494 esac 6495 done 6496 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6497 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6498 # so we don't have lib.a shared libs to link our executables. 6499 # We have to force runtime linking in this case. 6500 aix_use_runtimelinking=yes 6501 LDFLAGS="$LDFLAGS -Wl,-brtl" 6502 fi 6503 ;; 6504 esac 6505 6506 exp_sym_flag='-bexport' 6507 no_entry_flag='-bnoentry' 6508 fi 6509 6510 # When large executables or shared objects are built, AIX ld can 6511 # have problems creating the table of contents. If linking a library 6512 # or program results in "error TOC overflow" add -mminimal-toc to 6513 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6514 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515 6516 _LT_TAGVAR(archive_cmds, $1)='' 6517 _LT_TAGVAR(hardcode_direct, $1)=yes 6518 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6519 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6520 _LT_TAGVAR(link_all_deplibs, $1)=yes 6521 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6522 case $with_aix_soname,$aix_use_runtimelinking in 6523 aix,*) ;; # no import file 6524 svr4,* | *,yes) # use import file 6525 # The Import File defines what to hardcode. 6526 _LT_TAGVAR(hardcode_direct, $1)=no 6527 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6528 ;; 6529 esac 6530 6531 if test yes = "$GXX"; then 6532 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6533 # We only want to do this on AIX 4.2 and lower, the check 6534 # below for broken collect2 doesn't work under 4.3+ 6535 collect2name=`$CC -print-prog-name=collect2` 6536 if test -f "$collect2name" && 6537 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6538 then 6539 # We have reworked collect2 6540 : 6541 else 6542 # We have old collect2 6543 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6544 # It fails to find uninstalled libraries when the uninstalled 6545 # path is not listed in the libpath. Setting hardcode_minus_L 6546 # to unsupported forces relinking 6547 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6548 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6549 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6550 fi 6551 esac 6552 shared_flag='-shared' 6553 if test yes = "$aix_use_runtimelinking"; then 6554 shared_flag=$shared_flag' $wl-G' 6555 fi 6556 # Need to ensure runtime linking is disabled for the traditional 6557 # shared library, or the linker may eventually find shared libraries 6558 # /with/ Import File - we do not want to mix them. 6559 shared_flag_aix='-shared' 6560 shared_flag_svr4='-shared $wl-G' 6561 else 6562 # not using gcc 6563 if test ia64 = "$host_cpu"; then 6564 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6565 # chokes on -Wl,-G. The following line is correct: 6566 shared_flag='-G' 6567 else 6568 if test yes = "$aix_use_runtimelinking"; then 6569 shared_flag='$wl-G' 6570 else 6571 shared_flag='$wl-bM:SRE' 6572 fi 6573 shared_flag_aix='$wl-bM:SRE' 6574 shared_flag_svr4='$wl-G' 6575 fi 6576 fi 6577 6578 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6579 # It seems that -bexpall does not export symbols beginning with 6580 # underscore (_), so it is better to generate a list of symbols to 6581 # export. 6582 _LT_TAGVAR(always_export_symbols, $1)=yes 6583 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6584 # Warning - without using the other runtime loading flags (-brtl), 6585 # -berok will link without error, but may produce a broken library. 6586 # The "-G" linker flag allows undefined symbols. 6587 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6588 # Determine the default libpath from the value encoded in an empty 6589 # executable. 6590 _LT_SYS_MODULE_PATH_AIX([$1]) 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6592 6593 _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 6594 else 6595 if test ia64 = "$host_cpu"; then 6596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6597 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6598 _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" 6599 else 6600 # Determine the default libpath from the value encoded in an 6601 # empty executable. 6602 _LT_SYS_MODULE_PATH_AIX([$1]) 6603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604 # Warning - without using the other run time loading flags, 6605 # -berok will link without error, but may produce a broken library. 6606 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6607 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6608 if test yes = "$with_gnu_ld"; then 6609 # We only use this code for GNU lds that support --whole-archive. 6610 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6611 else 6612 # Exported symbols can be pulled into shared objects from archives 6613 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6614 fi 6615 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6616 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6617 # -brtl affects multiple linker settings, -berok does not and is overridden later 6618 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6619 if test svr4 != "$with_aix_soname"; then 6620 # This is similar to how AIX traditionally builds its shared 6621 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6622 _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' 6623 fi 6624 if test aix != "$with_aix_soname"; then 6625 _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' 6626 else 6627 # used by -dlpreopen to get the symbols 6628 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6629 fi 6630 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6631 fi 6632 fi 6633 ;; 6634 6635 beos*) 6636 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6637 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6638 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6639 # support --undefined. This deserves some investigation. FIXME 6640 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641 else 6642 _LT_TAGVAR(ld_shlibs, $1)=no 6643 fi 6644 ;; 6645 6646 chorus*) 6647 case $cc_basename in 6648 *) 6649 # FIXME: insert proper C++ library support 6650 _LT_TAGVAR(ld_shlibs, $1)=no 6651 ;; 6652 esac 6653 ;; 6654 6655 cygwin* | mingw* | pw32* | cegcc*) 6656 case $GXX,$cc_basename in 6657 ,cl* | no,cl*) 6658 # Native MSVC 6659 # hardcode_libdir_flag_spec is actually meaningless, as there is 6660 # no search path for DLLs. 6661 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6662 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6663 _LT_TAGVAR(always_export_symbols, $1)=yes 6664 _LT_TAGVAR(file_list_spec, $1)='@' 6665 # Tell ltmain to make .lib files, not .a files. 6666 libext=lib 6667 # Tell ltmain to make .dll files, not .so files. 6668 shrext_cmds=.dll 6669 # FIXME: Setting linknames here is a bad hack. 6670 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6671 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6672 cp "$export_symbols" "$output_objdir/$soname.def"; 6673 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6674 else 6675 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6676 fi~ 6677 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6678 linknames=' 6679 # The linker will not automatically build a static lib if we build a DLL. 6680 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6681 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6682 # Don't use ranlib 6683 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6684 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6685 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6686 case $lt_outputfile in 6687 *.exe|*.EXE) ;; 6688 *) 6689 lt_outputfile=$lt_outputfile.exe 6690 lt_tool_outputfile=$lt_tool_outputfile.exe 6691 ;; 6692 esac~ 6693 func_to_tool_file "$lt_outputfile"~ 6694 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6695 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6696 $RM "$lt_outputfile.manifest"; 6697 fi' 6698 ;; 6699 *) 6700 # g++ 6701 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6702 # as there is no search path for DLLs. 6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6705 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6706 _LT_TAGVAR(always_export_symbols, $1)=no 6707 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708 6709 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6710 _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' 6711 # If the export-symbols file already is a .def file, use it as 6712 # is; otherwise, prepend EXPORTS... 6713 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6714 cp $export_symbols $output_objdir/$soname.def; 6715 else 6716 echo EXPORTS > $output_objdir/$soname.def; 6717 cat $export_symbols >> $output_objdir/$soname.def; 6718 fi~ 6719 $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' 6720 else 6721 _LT_TAGVAR(ld_shlibs, $1)=no 6722 fi 6723 ;; 6724 esac 6725 ;; 6726 darwin* | rhapsody*) 6727 _LT_DARWIN_LINKER_FEATURES($1) 6728 ;; 6729 6730 os2*) 6731 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6732 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6733 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6734 shrext_cmds=.dll 6735 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6736 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6737 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6738 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6739 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6740 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6741 emximp -o $lib $output_objdir/$libname.def' 6742 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6743 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6744 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6745 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6746 prefix_cmds="$SED"~ 6747 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6748 prefix_cmds="$prefix_cmds -e 1d"; 6749 fi~ 6750 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6751 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6752 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6753 emximp -o $lib $output_objdir/$libname.def' 6754 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6755 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6756 ;; 6757 6758 dgux*) 6759 case $cc_basename in 6760 ec++*) 6761 # FIXME: insert proper C++ library support 6762 _LT_TAGVAR(ld_shlibs, $1)=no 6763 ;; 6764 ghcx*) 6765 # Green Hills C++ Compiler 6766 # FIXME: insert proper C++ library support 6767 _LT_TAGVAR(ld_shlibs, $1)=no 6768 ;; 6769 *) 6770 # FIXME: insert proper C++ library support 6771 _LT_TAGVAR(ld_shlibs, $1)=no 6772 ;; 6773 esac 6774 ;; 6775 6776 freebsd2.*) 6777 # C++ shared libraries reported to be fairly broken before 6778 # switch to ELF 6779 _LT_TAGVAR(ld_shlibs, $1)=no 6780 ;; 6781 6782 freebsd-elf*) 6783 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784 ;; 6785 6786 freebsd* | dragonfly*) 6787 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788 # conventions 6789 _LT_TAGVAR(ld_shlibs, $1)=yes 6790 ;; 6791 6792 haiku*) 6793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6794 _LT_TAGVAR(link_all_deplibs, $1)=yes 6795 ;; 6796 6797 hpux9*) 6798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801 _LT_TAGVAR(hardcode_direct, $1)=yes 6802 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803 # but as the default 6804 # location of the library. 6805 6806 case $cc_basename in 6807 CC*) 6808 # FIXME: insert proper C++ library support 6809 _LT_TAGVAR(ld_shlibs, $1)=no 6810 ;; 6811 aCC*) 6812 _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' 6813 # Commands to make compiler produce verbose output that lists 6814 # what "hidden" libraries, object files and flags are used when 6815 # linking a shared library. 6816 # 6817 # There doesn't appear to be a way to prevent this compiler from 6818 # explicitly linking system object files so we need to strip them 6819 # from the output so that they don't get included in the library 6820 # dependencies. 6821 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"' 6822 ;; 6823 *) 6824 if test yes = "$GXX"; then 6825 _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' 6826 else 6827 # FIXME: insert proper C++ library support 6828 _LT_TAGVAR(ld_shlibs, $1)=no 6829 fi 6830 ;; 6831 esac 6832 ;; 6833 6834 hpux10*|hpux11*) 6835 if test no = "$with_gnu_ld"; then 6836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838 6839 case $host_cpu in 6840 hppa*64*|ia64*) 6841 ;; 6842 *) 6843 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844 ;; 6845 esac 6846 fi 6847 case $host_cpu in 6848 hppa*64*|ia64*) 6849 _LT_TAGVAR(hardcode_direct, $1)=no 6850 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851 ;; 6852 *) 6853 _LT_TAGVAR(hardcode_direct, $1)=yes 6854 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856 # but as the default 6857 # location of the library. 6858 ;; 6859 esac 6860 6861 case $cc_basename in 6862 CC*) 6863 # FIXME: insert proper C++ library support 6864 _LT_TAGVAR(ld_shlibs, $1)=no 6865 ;; 6866 aCC*) 6867 case $host_cpu in 6868 hppa*64*) 6869 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870 ;; 6871 ia64*) 6872 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873 ;; 6874 *) 6875 _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' 6876 ;; 6877 esac 6878 # Commands to make compiler produce verbose output that lists 6879 # what "hidden" libraries, object files and flags are used when 6880 # linking a shared library. 6881 # 6882 # There doesn't appear to be a way to prevent this compiler from 6883 # explicitly linking system object files so we need to strip them 6884 # from the output so that they don't get included in the library 6885 # dependencies. 6886 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"' 6887 ;; 6888 *) 6889 if test yes = "$GXX"; then 6890 if test no = "$with_gnu_ld"; then 6891 case $host_cpu in 6892 hppa*64*) 6893 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894 ;; 6895 ia64*) 6896 _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' 6897 ;; 6898 *) 6899 _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' 6900 ;; 6901 esac 6902 fi 6903 else 6904 # FIXME: insert proper C++ library support 6905 _LT_TAGVAR(ld_shlibs, $1)=no 6906 fi 6907 ;; 6908 esac 6909 ;; 6910 6911 interix[[3-9]]*) 6912 _LT_TAGVAR(hardcode_direct, $1)=no 6913 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917 # Instead, shared libraries are loaded at an image base (0x10000000 by 6918 # default) and relocated if they conflict, which is a slow very memory 6919 # consuming and fragmenting process. To avoid this, we pick a random, 6920 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922 _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' 6923 _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' 6924 ;; 6925 irix5* | irix6*) 6926 case $cc_basename in 6927 CC*) 6928 # SGI C++ 6929 _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' 6930 6931 # Archives containing C++ object files must be created using 6932 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933 # necessary to make sure instantiated templates are included 6934 # in the archive. 6935 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936 ;; 6937 *) 6938 if test yes = "$GXX"; then 6939 if test no = "$with_gnu_ld"; then 6940 _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' 6941 else 6942 _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' 6943 fi 6944 fi 6945 _LT_TAGVAR(link_all_deplibs, $1)=yes 6946 ;; 6947 esac 6948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950 _LT_TAGVAR(inherit_rpath, $1)=yes 6951 ;; 6952 6953 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954 case $cc_basename in 6955 KCC*) 6956 # Kuck and Associates, Inc. (KAI) C++ Compiler 6957 6958 # KCC will only create a shared library if the output file 6959 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960 # to its proper name (with version) after linking. 6961 _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' 6962 _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' 6963 # Commands to make compiler produce verbose output that lists 6964 # what "hidden" libraries, object files and flags are used when 6965 # linking a shared library. 6966 # 6967 # There doesn't appear to be a way to prevent this compiler from 6968 # explicitly linking system object files so we need to strip them 6969 # from the output so that they don't get included in the library 6970 # dependencies. 6971 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"' 6972 6973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975 6976 # Archives containing C++ object files must be created using 6977 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979 ;; 6980 icpc* | ecpc* ) 6981 # Intel C++ 6982 with_gnu_ld=yes 6983 # version 8.0 and above of icpc choke on multiply defined symbols 6984 # if we add $predep_objects and $postdep_objects, however 7.1 and 6985 # earlier do not add the objects themselves. 6986 case `$CC -V 2>&1` in 6987 *"Version 7."*) 6988 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989 _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' 6990 ;; 6991 *) # Version 8.0 or newer 6992 tmp_idyn= 6993 case $host_cpu in 6994 ia64*) tmp_idyn=' -i_dynamic';; 6995 esac 6996 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997 _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' 6998 ;; 6999 esac 7000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004 ;; 7005 pgCC* | pgcpp*) 7006 # Portland Group C++ compiler 7007 case `$CC -V` in 7008 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010 rm -rf $tpldir~ 7011 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014 rm -rf $tpldir~ 7015 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017 $RANLIB $oldlib' 7018 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019 rm -rf $tpldir~ 7020 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7022 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023 rm -rf $tpldir~ 7024 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025 $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' 7026 ;; 7027 *) # Version 6 and above use weak symbols 7028 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029 _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' 7030 ;; 7031 esac 7032 7033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035 _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' 7036 ;; 7037 cxx*) 7038 # Compaq C++ 7039 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040 _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' 7041 7042 runpath_var=LD_RUN_PATH 7043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045 7046 # Commands to make compiler produce verbose output that lists 7047 # what "hidden" libraries, object files and flags are used when 7048 # linking a shared library. 7049 # 7050 # There doesn't appear to be a way to prevent this compiler from 7051 # explicitly linking system object files so we need to strip them 7052 # from the output so that they don't get included in the library 7053 # dependencies. 7054 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' 7055 ;; 7056 xl* | mpixl* | bgxl*) 7057 # IBM XL 8.0 on PPC, with GNU ld 7058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061 if test yes = "$supports_anon_versioning"; then 7062 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7063 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064 echo "local: *; };" >> $output_objdir/$libname.ver~ 7065 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066 fi 7067 ;; 7068 *) 7069 case `$CC -V 2>&1 | sed 5q` in 7070 *Sun\ C*) 7071 # Sun C++ 5.9 7072 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074 _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' 7075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076 _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' 7077 _LT_TAGVAR(compiler_needs_object, $1)=yes 7078 7079 # Not sure whether something based on 7080 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081 # would be better. 7082 output_verbose_link_cmd='func_echo_all' 7083 7084 # Archives containing C++ object files must be created using 7085 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086 # necessary to make sure instantiated templates are included 7087 # in the archive. 7088 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089 ;; 7090 esac 7091 ;; 7092 esac 7093 ;; 7094 7095 lynxos*) 7096 # FIXME: insert proper C++ library support 7097 _LT_TAGVAR(ld_shlibs, $1)=no 7098 ;; 7099 7100 m88k*) 7101 # FIXME: insert proper C++ library support 7102 _LT_TAGVAR(ld_shlibs, $1)=no 7103 ;; 7104 7105 mvs*) 7106 case $cc_basename in 7107 cxx*) 7108 # FIXME: insert proper C++ library support 7109 _LT_TAGVAR(ld_shlibs, $1)=no 7110 ;; 7111 *) 7112 # FIXME: insert proper C++ library support 7113 _LT_TAGVAR(ld_shlibs, $1)=no 7114 ;; 7115 esac 7116 ;; 7117 7118 netbsd*) 7119 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121 wlarc= 7122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123 _LT_TAGVAR(hardcode_direct, $1)=yes 7124 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125 fi 7126 # Workaround some broken pre-1.5 toolchains 7127 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128 ;; 7129 7130 *nto* | *qnx*) 7131 _LT_TAGVAR(ld_shlibs, $1)=yes 7132 ;; 7133 7134 openbsd* | bitrig*) 7135 if test -f /usr/libexec/ld.so; then 7136 _LT_TAGVAR(hardcode_direct, $1)=yes 7137 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142 _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' 7143 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145 fi 7146 output_verbose_link_cmd=func_echo_all 7147 else 7148 _LT_TAGVAR(ld_shlibs, $1)=no 7149 fi 7150 ;; 7151 7152 osf3* | osf4* | osf5*) 7153 case $cc_basename in 7154 KCC*) 7155 # Kuck and Associates, Inc. (KAI) C++ Compiler 7156 7157 # KCC will only create a shared library if the output file 7158 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159 # to its proper name (with version) after linking. 7160 _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' 7161 7162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164 7165 # Archives containing C++ object files must be created using 7166 # the KAI C++ compiler. 7167 case $host in 7168 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170 esac 7171 ;; 7172 RCC*) 7173 # Rational C++ 2.4.1 7174 # FIXME: insert proper C++ library support 7175 _LT_TAGVAR(ld_shlibs, $1)=no 7176 ;; 7177 cxx*) 7178 case $host in 7179 osf3*) 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181 _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' 7182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183 ;; 7184 *) 7185 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186 _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' 7187 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188 echo "-hidden">> $lib.exp~ 7189 $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~ 7190 $RM $lib.exp' 7191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192 ;; 7193 esac 7194 7195 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196 7197 # Commands to make compiler produce verbose output that lists 7198 # what "hidden" libraries, object files and flags are used when 7199 # linking a shared library. 7200 # 7201 # There doesn't appear to be a way to prevent this compiler from 7202 # explicitly linking system object files so we need to strip them 7203 # from the output so that they don't get included in the library 7204 # dependencies. 7205 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"' 7206 ;; 7207 *) 7208 if test yes,no = "$GXX,$with_gnu_ld"; then 7209 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210 case $host in 7211 osf3*) 7212 _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' 7213 ;; 7214 *) 7215 _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' 7216 ;; 7217 esac 7218 7219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221 7222 # Commands to make compiler produce verbose output that lists 7223 # what "hidden" libraries, object files and flags are used when 7224 # linking a shared library. 7225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226 7227 else 7228 # FIXME: insert proper C++ library support 7229 _LT_TAGVAR(ld_shlibs, $1)=no 7230 fi 7231 ;; 7232 esac 7233 ;; 7234 7235 psos*) 7236 # FIXME: insert proper C++ library support 7237 _LT_TAGVAR(ld_shlibs, $1)=no 7238 ;; 7239 7240 sunos4*) 7241 case $cc_basename in 7242 CC*) 7243 # Sun C++ 4.x 7244 # FIXME: insert proper C++ library support 7245 _LT_TAGVAR(ld_shlibs, $1)=no 7246 ;; 7247 lcc*) 7248 # Lucid 7249 # FIXME: insert proper C++ library support 7250 _LT_TAGVAR(ld_shlibs, $1)=no 7251 ;; 7252 *) 7253 # FIXME: insert proper C++ library support 7254 _LT_TAGVAR(ld_shlibs, $1)=no 7255 ;; 7256 esac 7257 ;; 7258 7259 solaris*) 7260 case $cc_basename in 7261 CC* | sunCC*) 7262 # Sun C++ 4.2, 5.x and Centerline C++ 7263 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267 $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' 7268 7269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271 case $host_os in 7272 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273 *) 7274 # The compiler driver will combine and reorder linker options, 7275 # but understands '-z linker_flag'. 7276 # Supported since Solaris 2.6 (maybe 2.5.1?) 7277 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278 ;; 7279 esac 7280 _LT_TAGVAR(link_all_deplibs, $1)=yes 7281 7282 output_verbose_link_cmd='func_echo_all' 7283 7284 # Archives containing C++ object files must be created using 7285 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286 # necessary to make sure instantiated templates are included 7287 # in the archive. 7288 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289 ;; 7290 gcx*) 7291 # Green Hills C++ Compiler 7292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293 7294 # The C++ compiler must be used to create the archive. 7295 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296 ;; 7297 *) 7298 # GNU C++ compiler with Solaris linker 7299 if test yes,no = "$GXX,$with_gnu_ld"; then 7300 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7303 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304 $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' 7305 7306 # Commands to make compiler produce verbose output that lists 7307 # what "hidden" libraries, object files and flags are used when 7308 # linking a shared library. 7309 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310 else 7311 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312 # platform. 7313 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315 $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' 7316 7317 # Commands to make compiler produce verbose output that lists 7318 # what "hidden" libraries, object files and flags are used when 7319 # linking a shared library. 7320 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321 fi 7322 7323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324 case $host_os in 7325 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326 *) 7327 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328 ;; 7329 esac 7330 fi 7331 ;; 7332 esac 7333 ;; 7334 7335 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339 runpath_var='LD_RUN_PATH' 7340 7341 case $cc_basename in 7342 CC*) 7343 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345 ;; 7346 *) 7347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349 ;; 7350 esac 7351 ;; 7352 7353 sysv5* | sco3.2v5* | sco5v6*) 7354 # Note: We CANNOT use -z defs as we might desire, because we do not 7355 # link with -lc, and that would cause any symbols used from libc to 7356 # always be unresolved, which means just about no library would 7357 # ever link correctly. If we're not using GNU ld we use -z text 7358 # though, which does catch some bad symbols but isn't as heavy-handed 7359 # as -z defs. 7360 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366 _LT_TAGVAR(link_all_deplibs, $1)=yes 7367 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368 runpath_var='LD_RUN_PATH' 7369 7370 case $cc_basename in 7371 CC*) 7372 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7376 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377 '"$_LT_TAGVAR(reload_cmds, $1)" 7378 ;; 7379 *) 7380 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382 ;; 7383 esac 7384 ;; 7385 7386 tandem*) 7387 case $cc_basename in 7388 NCC*) 7389 # NonStop-UX NCC 3.20 7390 # FIXME: insert proper C++ library support 7391 _LT_TAGVAR(ld_shlibs, $1)=no 7392 ;; 7393 *) 7394 # FIXME: insert proper C++ library support 7395 _LT_TAGVAR(ld_shlibs, $1)=no 7396 ;; 7397 esac 7398 ;; 7399 7400 vxworks*) 7401 # FIXME: insert proper C++ library support 7402 _LT_TAGVAR(ld_shlibs, $1)=no 7403 ;; 7404 7405 *) 7406 # FIXME: insert proper C++ library support 7407 _LT_TAGVAR(ld_shlibs, $1)=no 7408 ;; 7409 esac 7410 7411 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413 7414 _LT_TAGVAR(GCC, $1)=$GXX 7415 _LT_TAGVAR(LD, $1)=$LD 7416 7417 ## CAVEAT EMPTOR: 7418 ## There is no encapsulation within the following macros, do not change 7419 ## the running order or otherwise move them around unless you know exactly 7420 ## what you are doing... 7421 _LT_SYS_HIDDEN_LIBDEPS($1) 7422 _LT_COMPILER_PIC($1) 7423 _LT_COMPILER_C_O($1) 7424 _LT_COMPILER_FILE_LOCKS($1) 7425 _LT_LINKER_SHLIBS($1) 7426 _LT_SYS_DYNAMIC_LINKER($1) 7427 _LT_LINKER_HARDCODE_LIBPATH($1) 7428 7429 _LT_CONFIG($1) 7430 fi # test -n "$compiler" 7431 7432 CC=$lt_save_CC 7433 CFLAGS=$lt_save_CFLAGS 7434 LDCXX=$LD 7435 LD=$lt_save_LD 7436 GCC=$lt_save_GCC 7437 with_gnu_ld=$lt_save_with_gnu_ld 7438 lt_cv_path_LDCXX=$lt_cv_path_LD 7439 lt_cv_path_LD=$lt_save_path_LD 7440 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442fi # test yes != "$_lt_caught_CXX_error" 7443 7444AC_LANG_POP 7445])# _LT_LANG_CXX_CONFIG 7446 7447 7448# _LT_FUNC_STRIPNAME_CNF 7449# ---------------------- 7450# func_stripname_cnf prefix suffix name 7451# strip PREFIX and SUFFIX off of NAME. 7452# PREFIX and SUFFIX must not contain globbing or regex special 7453# characters, hashes, percent signs, but SUFFIX may contain a leading 7454# dot (in which case that matches only a dot). 7455# 7456# This function is identical to the (non-XSI) version of func_stripname, 7457# except this one can be used by m4 code that may be executed by configure, 7458# rather than the libtool script. 7459m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460AC_REQUIRE([_LT_DECL_SED]) 7461AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462func_stripname_cnf () 7463{ 7464 case @S|@2 in 7465 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467 esac 7468} # func_stripname_cnf 7469])# _LT_FUNC_STRIPNAME_CNF 7470 7471 7472# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473# --------------------------------- 7474# Figure out "hidden" library dependencies from verbose 7475# compiler output when linking a shared library. 7476# Parse the compiler output and extract the necessary 7477# objects, libraries and library flags. 7478m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481# Dependencies to place before and after the object being linked: 7482_LT_TAGVAR(predep_objects, $1)= 7483_LT_TAGVAR(postdep_objects, $1)= 7484_LT_TAGVAR(predeps, $1)= 7485_LT_TAGVAR(postdeps, $1)= 7486_LT_TAGVAR(compiler_lib_search_path, $1)= 7487 7488dnl we can't use the lt_simple_compile_test_code here, 7489dnl because it contains code intended for an executable, 7490dnl not a library. It's possible we should let each 7491dnl tag define a new lt_????_link_test_code variable, 7492dnl but it's only used here... 7493m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494int a; 7495void foo (void) { a = 0; } 7496_LT_EOF 7497], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498class Foo 7499{ 7500public: 7501 Foo (void) { a = 0; } 7502private: 7503 int a; 7504}; 7505_LT_EOF 7506], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507 subroutine foo 7508 implicit none 7509 integer*4 a 7510 a=0 7511 return 7512 end 7513_LT_EOF 7514], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515 subroutine foo 7516 implicit none 7517 integer a 7518 a=0 7519 return 7520 end 7521_LT_EOF 7522], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523public class foo { 7524 private int a; 7525 public void bar (void) { 7526 a = 0; 7527 } 7528}; 7529_LT_EOF 7530], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531package foo 7532func foo() { 7533} 7534_LT_EOF 7535]) 7536 7537_lt_libdeps_save_CFLAGS=$CFLAGS 7538case "$CC $CFLAGS " in #( 7539*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542esac 7543 7544dnl Parse the compiler output and extract the necessary 7545dnl objects, libraries and library flags. 7546if AC_TRY_EVAL(ac_compile); then 7547 # Parse the compiler output and extract the necessary 7548 # objects, libraries and library flags. 7549 7550 # Sentinel used to keep track of whether or not we are before 7551 # the conftest object file. 7552 pre_test_object_deps_done=no 7553 7554 for p in `eval "$output_verbose_link_cmd"`; do 7555 case $prev$p in 7556 7557 -L* | -R* | -l*) 7558 # Some compilers place space between "-{L,R}" and the path. 7559 # Remove the space. 7560 if test x-L = "$p" || 7561 test x-R = "$p"; then 7562 prev=$p 7563 continue 7564 fi 7565 7566 # Expand the sysroot to ease extracting the directories later. 7567 if test -z "$prev"; then 7568 case $p in 7569 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572 esac 7573 fi 7574 case $p in 7575 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576 esac 7577 if test no = "$pre_test_object_deps_done"; then 7578 case $prev in 7579 -L | -R) 7580 # Internal compiler library paths should come after those 7581 # provided the user. The postdeps already come after the 7582 # user supplied libs so there is no need to process them. 7583 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585 else 7586 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587 fi 7588 ;; 7589 # The "-l" case would never come before the object being 7590 # linked, so don't bother handling this case. 7591 esac 7592 else 7593 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594 _LT_TAGVAR(postdeps, $1)=$prev$p 7595 else 7596 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597 fi 7598 fi 7599 prev= 7600 ;; 7601 7602 *.lto.$objext) ;; # Ignore GCC LTO objects 7603 *.$objext) 7604 # This assumes that the test object file only shows up 7605 # once in the compiler output. 7606 if test "$p" = "conftest.$objext"; then 7607 pre_test_object_deps_done=yes 7608 continue 7609 fi 7610 7611 if test no = "$pre_test_object_deps_done"; then 7612 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613 _LT_TAGVAR(predep_objects, $1)=$p 7614 else 7615 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616 fi 7617 else 7618 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619 _LT_TAGVAR(postdep_objects, $1)=$p 7620 else 7621 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622 fi 7623 fi 7624 ;; 7625 7626 *) ;; # Ignore the rest. 7627 7628 esac 7629 done 7630 7631 # Clean up. 7632 rm -f a.out a.exe 7633else 7634 echo "libtool.m4: error: problem compiling $1 test program" 7635fi 7636 7637$RM -f confest.$objext 7638CFLAGS=$_lt_libdeps_save_CFLAGS 7639 7640# PORTME: override above test on systems where it is broken 7641m4_if([$1], [CXX], 7642[case $host_os in 7643interix[[3-9]]*) 7644 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645 # hack all around it, let's just trust "g++" to DTRT. 7646 _LT_TAGVAR(predep_objects,$1)= 7647 _LT_TAGVAR(postdep_objects,$1)= 7648 _LT_TAGVAR(postdeps,$1)= 7649 ;; 7650esac 7651]) 7652 7653case " $_LT_TAGVAR(postdeps, $1) " in 7654*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7655esac 7656 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659fi 7660_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661 [The directories searched by this compiler when creating a shared library]) 7662_LT_TAGDECL([], [predep_objects], [1], 7663 [Dependencies to place before and after the objects being linked to 7664 create a shared library]) 7665_LT_TAGDECL([], [postdep_objects], [1]) 7666_LT_TAGDECL([], [predeps], [1]) 7667_LT_TAGDECL([], [postdeps], [1]) 7668_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669 [The library search path used internally by the compiler when linking 7670 a shared library]) 7671])# _LT_SYS_HIDDEN_LIBDEPS 7672 7673 7674# _LT_LANG_F77_CONFIG([TAG]) 7675# -------------------------- 7676# Ensure that the configuration variables for a Fortran 77 compiler are 7677# suitably defined. These variables are subsequently used by _LT_CONFIG 7678# to write the compiler configuration to 'libtool'. 7679m4_defun([_LT_LANG_F77_CONFIG], 7680[AC_LANG_PUSH(Fortran 77) 7681if test -z "$F77" || test no = "$F77"; then 7682 _lt_disable_F77=yes 7683fi 7684 7685_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686_LT_TAGVAR(allow_undefined_flag, $1)= 7687_LT_TAGVAR(always_export_symbols, $1)=no 7688_LT_TAGVAR(archive_expsym_cmds, $1)= 7689_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690_LT_TAGVAR(hardcode_direct, $1)=no 7691_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694_LT_TAGVAR(hardcode_minus_L, $1)=no 7695_LT_TAGVAR(hardcode_automatic, $1)=no 7696_LT_TAGVAR(inherit_rpath, $1)=no 7697_LT_TAGVAR(module_cmds, $1)= 7698_LT_TAGVAR(module_expsym_cmds, $1)= 7699_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7701_LT_TAGVAR(reload_flag, $1)=$reload_flag 7702_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703_LT_TAGVAR(no_undefined_flag, $1)= 7704_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706 7707# Source file extension for f77 test sources. 7708ac_ext=f 7709 7710# Object file extension for compiled f77 test sources. 7711objext=o 7712_LT_TAGVAR(objext, $1)=$objext 7713 7714# No sense in running all these tests if we already determined that 7715# the F77 compiler isn't working. Some variables (like enable_shared) 7716# are currently assumed to apply to all compilers on this platform, 7717# and will be corrupted by setting them based on a non-working compiler. 7718if test yes != "$_lt_disable_F77"; then 7719 # Code to be used in simple compile tests 7720 lt_simple_compile_test_code="\ 7721 subroutine t 7722 return 7723 end 7724" 7725 7726 # Code to be used in simple link tests 7727 lt_simple_link_test_code="\ 7728 program t 7729 end 7730" 7731 7732 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733 _LT_TAG_COMPILER 7734 7735 # save warnings/boilerplate of simple test code 7736 _LT_COMPILER_BOILERPLATE 7737 _LT_LINKER_BOILERPLATE 7738 7739 # Allow CC to be a program name with arguments. 7740 lt_save_CC=$CC 7741 lt_save_GCC=$GCC 7742 lt_save_CFLAGS=$CFLAGS 7743 CC=${F77-"f77"} 7744 CFLAGS=$FFLAGS 7745 compiler=$CC 7746 _LT_TAGVAR(compiler, $1)=$CC 7747 _LT_CC_BASENAME([$compiler]) 7748 GCC=$G77 7749 if test -n "$compiler"; then 7750 AC_MSG_CHECKING([if libtool supports shared libraries]) 7751 AC_MSG_RESULT([$can_build_shared]) 7752 7753 AC_MSG_CHECKING([whether to build shared libraries]) 7754 test no = "$can_build_shared" && enable_shared=no 7755 7756 # On AIX, shared libraries and static libraries use the same namespace, and 7757 # are all built from PIC. 7758 case $host_os in 7759 aix3*) 7760 test yes = "$enable_shared" && enable_static=no 7761 if test -n "$RANLIB"; then 7762 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763 postinstall_cmds='$RANLIB $lib' 7764 fi 7765 ;; 7766 aix[[4-9]]*) 7767 if test ia64 != "$host_cpu"; then 7768 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769 yes,aix,yes) ;; # shared object as lib.so file only 7770 yes,svr4,*) ;; # shared object as lib.so archive member only 7771 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772 esac 7773 fi 7774 ;; 7775 esac 7776 AC_MSG_RESULT([$enable_shared]) 7777 7778 AC_MSG_CHECKING([whether to build static libraries]) 7779 # Make sure either enable_shared or enable_static is yes. 7780 test yes = "$enable_shared" || enable_static=yes 7781 AC_MSG_RESULT([$enable_static]) 7782 7783 _LT_TAGVAR(GCC, $1)=$G77 7784 _LT_TAGVAR(LD, $1)=$LD 7785 7786 ## CAVEAT EMPTOR: 7787 ## There is no encapsulation within the following macros, do not change 7788 ## the running order or otherwise move them around unless you know exactly 7789 ## what you are doing... 7790 _LT_COMPILER_PIC($1) 7791 _LT_COMPILER_C_O($1) 7792 _LT_COMPILER_FILE_LOCKS($1) 7793 _LT_LINKER_SHLIBS($1) 7794 _LT_SYS_DYNAMIC_LINKER($1) 7795 _LT_LINKER_HARDCODE_LIBPATH($1) 7796 7797 _LT_CONFIG($1) 7798 fi # test -n "$compiler" 7799 7800 GCC=$lt_save_GCC 7801 CC=$lt_save_CC 7802 CFLAGS=$lt_save_CFLAGS 7803fi # test yes != "$_lt_disable_F77" 7804 7805AC_LANG_POP 7806])# _LT_LANG_F77_CONFIG 7807 7808 7809# _LT_LANG_FC_CONFIG([TAG]) 7810# ------------------------- 7811# Ensure that the configuration variables for a Fortran compiler are 7812# suitably defined. These variables are subsequently used by _LT_CONFIG 7813# to write the compiler configuration to 'libtool'. 7814m4_defun([_LT_LANG_FC_CONFIG], 7815[AC_LANG_PUSH(Fortran) 7816 7817if test -z "$FC" || test no = "$FC"; then 7818 _lt_disable_FC=yes 7819fi 7820 7821_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822_LT_TAGVAR(allow_undefined_flag, $1)= 7823_LT_TAGVAR(always_export_symbols, $1)=no 7824_LT_TAGVAR(archive_expsym_cmds, $1)= 7825_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826_LT_TAGVAR(hardcode_direct, $1)=no 7827_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830_LT_TAGVAR(hardcode_minus_L, $1)=no 7831_LT_TAGVAR(hardcode_automatic, $1)=no 7832_LT_TAGVAR(inherit_rpath, $1)=no 7833_LT_TAGVAR(module_cmds, $1)= 7834_LT_TAGVAR(module_expsym_cmds, $1)= 7835_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7837_LT_TAGVAR(reload_flag, $1)=$reload_flag 7838_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839_LT_TAGVAR(no_undefined_flag, $1)= 7840_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842 7843# Source file extension for fc test sources. 7844ac_ext=${ac_fc_srcext-f} 7845 7846# Object file extension for compiled fc test sources. 7847objext=o 7848_LT_TAGVAR(objext, $1)=$objext 7849 7850# No sense in running all these tests if we already determined that 7851# the FC compiler isn't working. Some variables (like enable_shared) 7852# are currently assumed to apply to all compilers on this platform, 7853# and will be corrupted by setting them based on a non-working compiler. 7854if test yes != "$_lt_disable_FC"; then 7855 # Code to be used in simple compile tests 7856 lt_simple_compile_test_code="\ 7857 subroutine t 7858 return 7859 end 7860" 7861 7862 # Code to be used in simple link tests 7863 lt_simple_link_test_code="\ 7864 program t 7865 end 7866" 7867 7868 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869 _LT_TAG_COMPILER 7870 7871 # save warnings/boilerplate of simple test code 7872 _LT_COMPILER_BOILERPLATE 7873 _LT_LINKER_BOILERPLATE 7874 7875 # Allow CC to be a program name with arguments. 7876 lt_save_CC=$CC 7877 lt_save_GCC=$GCC 7878 lt_save_CFLAGS=$CFLAGS 7879 CC=${FC-"f95"} 7880 CFLAGS=$FCFLAGS 7881 compiler=$CC 7882 GCC=$ac_cv_fc_compiler_gnu 7883 7884 _LT_TAGVAR(compiler, $1)=$CC 7885 _LT_CC_BASENAME([$compiler]) 7886 7887 if test -n "$compiler"; then 7888 AC_MSG_CHECKING([if libtool supports shared libraries]) 7889 AC_MSG_RESULT([$can_build_shared]) 7890 7891 AC_MSG_CHECKING([whether to build shared libraries]) 7892 test no = "$can_build_shared" && enable_shared=no 7893 7894 # On AIX, shared libraries and static libraries use the same namespace, and 7895 # are all built from PIC. 7896 case $host_os in 7897 aix3*) 7898 test yes = "$enable_shared" && enable_static=no 7899 if test -n "$RANLIB"; then 7900 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901 postinstall_cmds='$RANLIB $lib' 7902 fi 7903 ;; 7904 aix[[4-9]]*) 7905 if test ia64 != "$host_cpu"; then 7906 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907 yes,aix,yes) ;; # shared object as lib.so file only 7908 yes,svr4,*) ;; # shared object as lib.so archive member only 7909 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910 esac 7911 fi 7912 ;; 7913 esac 7914 AC_MSG_RESULT([$enable_shared]) 7915 7916 AC_MSG_CHECKING([whether to build static libraries]) 7917 # Make sure either enable_shared or enable_static is yes. 7918 test yes = "$enable_shared" || enable_static=yes 7919 AC_MSG_RESULT([$enable_static]) 7920 7921 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922 _LT_TAGVAR(LD, $1)=$LD 7923 7924 ## CAVEAT EMPTOR: 7925 ## There is no encapsulation within the following macros, do not change 7926 ## the running order or otherwise move them around unless you know exactly 7927 ## what you are doing... 7928 _LT_SYS_HIDDEN_LIBDEPS($1) 7929 _LT_COMPILER_PIC($1) 7930 _LT_COMPILER_C_O($1) 7931 _LT_COMPILER_FILE_LOCKS($1) 7932 _LT_LINKER_SHLIBS($1) 7933 _LT_SYS_DYNAMIC_LINKER($1) 7934 _LT_LINKER_HARDCODE_LIBPATH($1) 7935 7936 _LT_CONFIG($1) 7937 fi # test -n "$compiler" 7938 7939 GCC=$lt_save_GCC 7940 CC=$lt_save_CC 7941 CFLAGS=$lt_save_CFLAGS 7942fi # test yes != "$_lt_disable_FC" 7943 7944AC_LANG_POP 7945])# _LT_LANG_FC_CONFIG 7946 7947 7948# _LT_LANG_GCJ_CONFIG([TAG]) 7949# -------------------------- 7950# Ensure that the configuration variables for the GNU Java Compiler compiler 7951# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952# to write the compiler configuration to 'libtool'. 7953m4_defun([_LT_LANG_GCJ_CONFIG], 7954[AC_REQUIRE([LT_PROG_GCJ])dnl 7955AC_LANG_SAVE 7956 7957# Source file extension for Java test sources. 7958ac_ext=java 7959 7960# Object file extension for compiled Java test sources. 7961objext=o 7962_LT_TAGVAR(objext, $1)=$objext 7963 7964# Code to be used in simple compile tests 7965lt_simple_compile_test_code="class foo {}" 7966 7967# Code to be used in simple link tests 7968lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7969 7970# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971_LT_TAG_COMPILER 7972 7973# save warnings/boilerplate of simple test code 7974_LT_COMPILER_BOILERPLATE 7975_LT_LINKER_BOILERPLATE 7976 7977# Allow CC to be a program name with arguments. 7978lt_save_CC=$CC 7979lt_save_CFLAGS=$CFLAGS 7980lt_save_GCC=$GCC 7981GCC=yes 7982CC=${GCJ-"gcj"} 7983CFLAGS=$GCJFLAGS 7984compiler=$CC 7985_LT_TAGVAR(compiler, $1)=$CC 7986_LT_TAGVAR(LD, $1)=$LD 7987_LT_CC_BASENAME([$compiler]) 7988 7989# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7991 7992_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7993_LT_TAGVAR(reload_flag, $1)=$reload_flag 7994_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7995 7996if test -n "$compiler"; then 7997 _LT_COMPILER_NO_RTTI($1) 7998 _LT_COMPILER_PIC($1) 7999 _LT_COMPILER_C_O($1) 8000 _LT_COMPILER_FILE_LOCKS($1) 8001 _LT_LINKER_SHLIBS($1) 8002 _LT_LINKER_HARDCODE_LIBPATH($1) 8003 8004 _LT_CONFIG($1) 8005fi 8006 8007AC_LANG_RESTORE 8008 8009GCC=$lt_save_GCC 8010CC=$lt_save_CC 8011CFLAGS=$lt_save_CFLAGS 8012])# _LT_LANG_GCJ_CONFIG 8013 8014 8015# _LT_LANG_GO_CONFIG([TAG]) 8016# -------------------------- 8017# Ensure that the configuration variables for the GNU Go compiler 8018# are suitably defined. These variables are subsequently used by _LT_CONFIG 8019# to write the compiler configuration to 'libtool'. 8020m4_defun([_LT_LANG_GO_CONFIG], 8021[AC_REQUIRE([LT_PROG_GO])dnl 8022AC_LANG_SAVE 8023 8024# Source file extension for Go test sources. 8025ac_ext=go 8026 8027# Object file extension for compiled Go test sources. 8028objext=o 8029_LT_TAGVAR(objext, $1)=$objext 8030 8031# Code to be used in simple compile tests 8032lt_simple_compile_test_code="package main; func main() { }" 8033 8034# Code to be used in simple link tests 8035lt_simple_link_test_code='package main; func main() { }' 8036 8037# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8038_LT_TAG_COMPILER 8039 8040# save warnings/boilerplate of simple test code 8041_LT_COMPILER_BOILERPLATE 8042_LT_LINKER_BOILERPLATE 8043 8044# Allow CC to be a program name with arguments. 8045lt_save_CC=$CC 8046lt_save_CFLAGS=$CFLAGS 8047lt_save_GCC=$GCC 8048GCC=yes 8049CC=${GOC-"gccgo"} 8050CFLAGS=$GOFLAGS 8051compiler=$CC 8052_LT_TAGVAR(compiler, $1)=$CC 8053_LT_TAGVAR(LD, $1)=$LD 8054_LT_CC_BASENAME([$compiler]) 8055 8056# Go did not exist at the time GCC didn't implicitly link libc in. 8057_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8058 8059_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8060_LT_TAGVAR(reload_flag, $1)=$reload_flag 8061_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8062 8063if test -n "$compiler"; then 8064 _LT_COMPILER_NO_RTTI($1) 8065 _LT_COMPILER_PIC($1) 8066 _LT_COMPILER_C_O($1) 8067 _LT_COMPILER_FILE_LOCKS($1) 8068 _LT_LINKER_SHLIBS($1) 8069 _LT_LINKER_HARDCODE_LIBPATH($1) 8070 8071 _LT_CONFIG($1) 8072fi 8073 8074AC_LANG_RESTORE 8075 8076GCC=$lt_save_GCC 8077CC=$lt_save_CC 8078CFLAGS=$lt_save_CFLAGS 8079])# _LT_LANG_GO_CONFIG 8080 8081 8082# _LT_LANG_RC_CONFIG([TAG]) 8083# ------------------------- 8084# Ensure that the configuration variables for the Windows resource compiler 8085# are suitably defined. These variables are subsequently used by _LT_CONFIG 8086# to write the compiler configuration to 'libtool'. 8087m4_defun([_LT_LANG_RC_CONFIG], 8088[AC_REQUIRE([LT_PROG_RC])dnl 8089AC_LANG_SAVE 8090 8091# Source file extension for RC test sources. 8092ac_ext=rc 8093 8094# Object file extension for compiled RC test sources. 8095objext=o 8096_LT_TAGVAR(objext, $1)=$objext 8097 8098# Code to be used in simple compile tests 8099lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8100 8101# Code to be used in simple link tests 8102lt_simple_link_test_code=$lt_simple_compile_test_code 8103 8104# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8105_LT_TAG_COMPILER 8106 8107# save warnings/boilerplate of simple test code 8108_LT_COMPILER_BOILERPLATE 8109_LT_LINKER_BOILERPLATE 8110 8111# Allow CC to be a program name with arguments. 8112lt_save_CC=$CC 8113lt_save_CFLAGS=$CFLAGS 8114lt_save_GCC=$GCC 8115GCC= 8116CC=${RC-"windres"} 8117CFLAGS= 8118compiler=$CC 8119_LT_TAGVAR(compiler, $1)=$CC 8120_LT_CC_BASENAME([$compiler]) 8121_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8122 8123if test -n "$compiler"; then 8124 : 8125 _LT_CONFIG($1) 8126fi 8127 8128GCC=$lt_save_GCC 8129AC_LANG_RESTORE 8130CC=$lt_save_CC 8131CFLAGS=$lt_save_CFLAGS 8132])# _LT_LANG_RC_CONFIG 8133 8134 8135# LT_PROG_GCJ 8136# ----------- 8137AC_DEFUN([LT_PROG_GCJ], 8138[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8139 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8140 [AC_CHECK_TOOL(GCJ, gcj,) 8141 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8142 AC_SUBST(GCJFLAGS)])])[]dnl 8143]) 8144 8145# Old name: 8146AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8147dnl aclocal-1.4 backwards compatibility: 8148dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8149 8150 8151# LT_PROG_GO 8152# ---------- 8153AC_DEFUN([LT_PROG_GO], 8154[AC_CHECK_TOOL(GOC, gccgo,) 8155]) 8156 8157 8158# LT_PROG_RC 8159# ---------- 8160AC_DEFUN([LT_PROG_RC], 8161[AC_CHECK_TOOL(RC, windres,) 8162]) 8163 8164# Old name: 8165AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8166dnl aclocal-1.4 backwards compatibility: 8167dnl AC_DEFUN([LT_AC_PROG_RC], []) 8168 8169 8170# _LT_DECL_EGREP 8171# -------------- 8172# If we don't have a new enough Autoconf to choose the best grep 8173# available, choose the one first in the user's PATH. 8174m4_defun([_LT_DECL_EGREP], 8175[AC_REQUIRE([AC_PROG_EGREP])dnl 8176AC_REQUIRE([AC_PROG_FGREP])dnl 8177test -z "$GREP" && GREP=grep 8178_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8179_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8180_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8181dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8182AC_SUBST([GREP]) 8183]) 8184 8185 8186# _LT_DECL_OBJDUMP 8187# -------------- 8188# If we don't have a new enough Autoconf to choose the best objdump 8189# available, choose the one first in the user's PATH. 8190m4_defun([_LT_DECL_OBJDUMP], 8191[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8192test -z "$OBJDUMP" && OBJDUMP=objdump 8193_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8194AC_SUBST([OBJDUMP]) 8195]) 8196 8197# _LT_DECL_DLLTOOL 8198# ---------------- 8199# Ensure DLLTOOL variable is set. 8200m4_defun([_LT_DECL_DLLTOOL], 8201[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8202test -z "$DLLTOOL" && DLLTOOL=dlltool 8203_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8204AC_SUBST([DLLTOOL]) 8205]) 8206 8207# _LT_DECL_SED 8208# ------------ 8209# Check for a fully-functional sed program, that truncates 8210# as few characters as possible. Prefer GNU sed if found. 8211m4_defun([_LT_DECL_SED], 8212[AC_PROG_SED 8213test -z "$SED" && SED=sed 8214Xsed="$SED -e 1s/^X//" 8215_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8216_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8217 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8218])# _LT_DECL_SED 8219 8220m4_ifndef([AC_PROG_SED], [ 8221# NOTE: This macro has been submitted for inclusion into # 8222# GNU Autoconf as AC_PROG_SED. When it is available in # 8223# a released version of Autoconf we should remove this # 8224# macro and use it instead. # 8225 8226m4_defun([AC_PROG_SED], 8227[AC_MSG_CHECKING([for a sed that does not truncate output]) 8228AC_CACHE_VAL(lt_cv_path_SED, 8229[# Loop through the user's path and test for sed and gsed. 8230# Then use that list of sed's as ones to test for truncation. 8231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8232for as_dir in $PATH 8233do 8234 IFS=$as_save_IFS 8235 test -z "$as_dir" && as_dir=. 8236 for lt_ac_prog in sed gsed; do 8237 for ac_exec_ext in '' $ac_executable_extensions; do 8238 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8239 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8240 fi 8241 done 8242 done 8243done 8244IFS=$as_save_IFS 8245lt_ac_max=0 8246lt_ac_count=0 8247# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8248# along with /bin/sed that truncates output. 8249for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8250 test ! -f "$lt_ac_sed" && continue 8251 cat /dev/null > conftest.in 8252 lt_ac_count=0 8253 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8254 # Check for GNU sed and select it if it is found. 8255 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8256 lt_cv_path_SED=$lt_ac_sed 8257 break 8258 fi 8259 while true; do 8260 cat conftest.in conftest.in >conftest.tmp 8261 mv conftest.tmp conftest.in 8262 cp conftest.in conftest.nl 8263 echo >>conftest.nl 8264 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8265 cmp -s conftest.out conftest.nl || break 8266 # 10000 chars as input seems more than enough 8267 test 10 -lt "$lt_ac_count" && break 8268 lt_ac_count=`expr $lt_ac_count + 1` 8269 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8270 lt_ac_max=$lt_ac_count 8271 lt_cv_path_SED=$lt_ac_sed 8272 fi 8273 done 8274done 8275]) 8276SED=$lt_cv_path_SED 8277AC_SUBST([SED]) 8278AC_MSG_RESULT([$SED]) 8279])#AC_PROG_SED 8280])#m4_ifndef 8281 8282# Old name: 8283AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8284dnl aclocal-1.4 backwards compatibility: 8285dnl AC_DEFUN([LT_AC_PROG_SED], []) 8286 8287 8288# _LT_CHECK_SHELL_FEATURES 8289# ------------------------ 8290# Find out whether the shell is Bourne or XSI compatible, 8291# or has some other useful features. 8292m4_defun([_LT_CHECK_SHELL_FEATURES], 8293[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8294 lt_unset=unset 8295else 8296 lt_unset=false 8297fi 8298_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8299 8300# test EBCDIC or ASCII 8301case `echo X|tr X '\101'` in 8302 A) # ASCII based system 8303 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8304 lt_SP2NL='tr \040 \012' 8305 lt_NL2SP='tr \015\012 \040\040' 8306 ;; 8307 *) # EBCDIC based system 8308 lt_SP2NL='tr \100 \n' 8309 lt_NL2SP='tr \r\n \100\100' 8310 ;; 8311esac 8312_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8313_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8314])# _LT_CHECK_SHELL_FEATURES 8315 8316 8317# _LT_PATH_CONVERSION_FUNCTIONS 8318# ----------------------------- 8319# Determine what file name conversion functions should be used by 8320# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8321# for certain cross-compile configurations and native mingw. 8322m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8323[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8324AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8325AC_MSG_CHECKING([how to convert $build file names to $host format]) 8326AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8327[case $host in 8328 *-*-mingw* ) 8329 case $build in 8330 *-*-mingw* ) # actually msys 8331 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8332 ;; 8333 *-*-cygwin* ) 8334 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8335 ;; 8336 * ) # otherwise, assume *nix 8337 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8338 ;; 8339 esac 8340 ;; 8341 *-*-cygwin* ) 8342 case $build in 8343 *-*-mingw* ) # actually msys 8344 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8345 ;; 8346 *-*-cygwin* ) 8347 lt_cv_to_host_file_cmd=func_convert_file_noop 8348 ;; 8349 * ) # otherwise, assume *nix 8350 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8351 ;; 8352 esac 8353 ;; 8354 * ) # unhandled hosts (and "normal" native builds) 8355 lt_cv_to_host_file_cmd=func_convert_file_noop 8356 ;; 8357esac 8358]) 8359to_host_file_cmd=$lt_cv_to_host_file_cmd 8360AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8361_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8362 [0], [convert $build file names to $host format])dnl 8363 8364AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8365AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8366[#assume ordinary cross tools, or native build. 8367lt_cv_to_tool_file_cmd=func_convert_file_noop 8368case $host in 8369 *-*-mingw* ) 8370 case $build in 8371 *-*-mingw* ) # actually msys 8372 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8373 ;; 8374 esac 8375 ;; 8376esac 8377]) 8378to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8379AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8380_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8381 [0], [convert $build files to toolchain format])dnl 8382])# _LT_PATH_CONVERSION_FUNCTIONS 8383 8384# Helper functions for option handling. -*- Autoconf -*- 8385# 8386# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8387# Foundation, Inc. 8388# Written by Gary V. Vaughan, 2004 8389# 8390# This file is free software; the Free Software Foundation gives 8391# unlimited permission to copy and/or distribute it, with or without 8392# modifications, as long as this notice is preserved. 8393 8394# serial 8 ltoptions.m4 8395 8396# This is to help aclocal find these macros, as it can't see m4_define. 8397AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8398 8399 8400# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8401# ------------------------------------------ 8402m4_define([_LT_MANGLE_OPTION], 8403[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8404 8405 8406# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8407# --------------------------------------- 8408# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8409# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8410# saved as a flag. 8411m4_define([_LT_SET_OPTION], 8412[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8413m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8414 _LT_MANGLE_DEFUN([$1], [$2]), 8415 [m4_warning([Unknown $1 option '$2'])])[]dnl 8416]) 8417 8418 8419# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8420# ------------------------------------------------------------ 8421# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8422m4_define([_LT_IF_OPTION], 8423[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8424 8425 8426# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8427# ------------------------------------------------------- 8428# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8429# are set. 8430m4_define([_LT_UNLESS_OPTIONS], 8431[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8432 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8433 [m4_define([$0_found])])])[]dnl 8434m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8435])[]dnl 8436]) 8437 8438 8439# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8440# ---------------------------------------- 8441# OPTION-LIST is a space-separated list of Libtool options associated 8442# with MACRO-NAME. If any OPTION has a matching handler declared with 8443# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8444# the unknown option and exit. 8445m4_defun([_LT_SET_OPTIONS], 8446[# Set options 8447m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8448 [_LT_SET_OPTION([$1], _LT_Option)]) 8449 8450m4_if([$1],[LT_INIT],[ 8451 dnl 8452 dnl Simply set some default values (i.e off) if boolean options were not 8453 dnl specified: 8454 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8455 ]) 8456 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8457 ]) 8458 dnl 8459 dnl If no reference was made to various pairs of opposing options, then 8460 dnl we run the default mode handler for the pair. For example, if neither 8461 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8462 dnl archives by default: 8463 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8464 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8465 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8466 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8467 [_LT_ENABLE_FAST_INSTALL]) 8468 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8469 [_LT_WITH_AIX_SONAME([aix])]) 8470 ]) 8471])# _LT_SET_OPTIONS 8472 8473 8474 8475# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8476# ----------------------------------------- 8477m4_define([_LT_MANGLE_DEFUN], 8478[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8479 8480 8481# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8482# ----------------------------------------------- 8483m4_define([LT_OPTION_DEFINE], 8484[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8485])# LT_OPTION_DEFINE 8486 8487 8488# dlopen 8489# ------ 8490LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8491]) 8492 8493AU_DEFUN([AC_LIBTOOL_DLOPEN], 8494[_LT_SET_OPTION([LT_INIT], [dlopen]) 8495AC_DIAGNOSE([obsolete], 8496[$0: Remove this warning and the call to _LT_SET_OPTION when you 8497put the 'dlopen' option into LT_INIT's first parameter.]) 8498]) 8499 8500dnl aclocal-1.4 backwards compatibility: 8501dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8502 8503 8504# win32-dll 8505# --------- 8506# Declare package support for building win32 dll's. 8507LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8508[enable_win32_dll=yes 8509 8510case $host in 8511*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8512 AC_CHECK_TOOL(AS, as, false) 8513 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8514 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8515 ;; 8516esac 8517 8518test -z "$AS" && AS=as 8519_LT_DECL([], [AS], [1], [Assembler program])dnl 8520 8521test -z "$DLLTOOL" && DLLTOOL=dlltool 8522_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8523 8524test -z "$OBJDUMP" && OBJDUMP=objdump 8525_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8526])# win32-dll 8527 8528AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8529[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8530_LT_SET_OPTION([LT_INIT], [win32-dll]) 8531AC_DIAGNOSE([obsolete], 8532[$0: Remove this warning and the call to _LT_SET_OPTION when you 8533put the 'win32-dll' option into LT_INIT's first parameter.]) 8534]) 8535 8536dnl aclocal-1.4 backwards compatibility: 8537dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8538 8539 8540# _LT_ENABLE_SHARED([DEFAULT]) 8541# ---------------------------- 8542# implement the --enable-shared flag, and supports the 'shared' and 8543# 'disable-shared' LT_INIT options. 8544# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8545m4_define([_LT_ENABLE_SHARED], 8546[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8547AC_ARG_ENABLE([shared], 8548 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8549 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8550 [p=${PACKAGE-default} 8551 case $enableval in 8552 yes) enable_shared=yes ;; 8553 no) enable_shared=no ;; 8554 *) 8555 enable_shared=no 8556 # Look at the argument we got. We use all the common list separators. 8557 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8558 for pkg in $enableval; do 8559 IFS=$lt_save_ifs 8560 if test "X$pkg" = "X$p"; then 8561 enable_shared=yes 8562 fi 8563 done 8564 IFS=$lt_save_ifs 8565 ;; 8566 esac], 8567 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8568 8569 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8570 [Whether or not to build shared libraries]) 8571])# _LT_ENABLE_SHARED 8572 8573LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8574LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8575 8576# Old names: 8577AC_DEFUN([AC_ENABLE_SHARED], 8578[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8579]) 8580 8581AC_DEFUN([AC_DISABLE_SHARED], 8582[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8583]) 8584 8585AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8586AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8587 8588dnl aclocal-1.4 backwards compatibility: 8589dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8590dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8591 8592 8593 8594# _LT_ENABLE_STATIC([DEFAULT]) 8595# ---------------------------- 8596# implement the --enable-static flag, and support the 'static' and 8597# 'disable-static' LT_INIT options. 8598# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8599m4_define([_LT_ENABLE_STATIC], 8600[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8601AC_ARG_ENABLE([static], 8602 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8603 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8604 [p=${PACKAGE-default} 8605 case $enableval in 8606 yes) enable_static=yes ;; 8607 no) enable_static=no ;; 8608 *) 8609 enable_static=no 8610 # Look at the argument we got. We use all the common list separators. 8611 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8612 for pkg in $enableval; do 8613 IFS=$lt_save_ifs 8614 if test "X$pkg" = "X$p"; then 8615 enable_static=yes 8616 fi 8617 done 8618 IFS=$lt_save_ifs 8619 ;; 8620 esac], 8621 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8622 8623 _LT_DECL([build_old_libs], [enable_static], [0], 8624 [Whether or not to build static libraries]) 8625])# _LT_ENABLE_STATIC 8626 8627LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8628LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8629 8630# Old names: 8631AC_DEFUN([AC_ENABLE_STATIC], 8632[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8633]) 8634 8635AC_DEFUN([AC_DISABLE_STATIC], 8636[_LT_SET_OPTION([LT_INIT], [disable-static]) 8637]) 8638 8639AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8640AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8641 8642dnl aclocal-1.4 backwards compatibility: 8643dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8644dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8645 8646 8647 8648# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8649# ---------------------------------- 8650# implement the --enable-fast-install flag, and support the 'fast-install' 8651# and 'disable-fast-install' LT_INIT options. 8652# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8653m4_define([_LT_ENABLE_FAST_INSTALL], 8654[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8655AC_ARG_ENABLE([fast-install], 8656 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8657 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8658 [p=${PACKAGE-default} 8659 case $enableval in 8660 yes) enable_fast_install=yes ;; 8661 no) enable_fast_install=no ;; 8662 *) 8663 enable_fast_install=no 8664 # Look at the argument we got. We use all the common list separators. 8665 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8666 for pkg in $enableval; do 8667 IFS=$lt_save_ifs 8668 if test "X$pkg" = "X$p"; then 8669 enable_fast_install=yes 8670 fi 8671 done 8672 IFS=$lt_save_ifs 8673 ;; 8674 esac], 8675 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8676 8677_LT_DECL([fast_install], [enable_fast_install], [0], 8678 [Whether or not to optimize for fast installation])dnl 8679])# _LT_ENABLE_FAST_INSTALL 8680 8681LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8682LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8683 8684# Old names: 8685AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8686[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8687AC_DIAGNOSE([obsolete], 8688[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8689the 'fast-install' option into LT_INIT's first parameter.]) 8690]) 8691 8692AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8693[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8694AC_DIAGNOSE([obsolete], 8695[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8696the 'disable-fast-install' option into LT_INIT's first parameter.]) 8697]) 8698 8699dnl aclocal-1.4 backwards compatibility: 8700dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8701dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8702 8703 8704# _LT_WITH_AIX_SONAME([DEFAULT]) 8705# ---------------------------------- 8706# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8707# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8708# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8709m4_define([_LT_WITH_AIX_SONAME], 8710[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8711shared_archive_member_spec= 8712case $host,$enable_shared in 8713power*-*-aix[[5-9]]*,yes) 8714 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8715 AC_ARG_WITH([aix-soname], 8716 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8717 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8718 [case $withval in 8719 aix|svr4|both) 8720 ;; 8721 *) 8722 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8723 ;; 8724 esac 8725 lt_cv_with_aix_soname=$with_aix_soname], 8726 [AC_CACHE_VAL([lt_cv_with_aix_soname], 8727 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8728 with_aix_soname=$lt_cv_with_aix_soname]) 8729 AC_MSG_RESULT([$with_aix_soname]) 8730 if test aix != "$with_aix_soname"; then 8731 # For the AIX way of multilib, we name the shared archive member 8732 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8733 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8734 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8735 # the AIX toolchain works better with OBJECT_MODE set (default 32). 8736 if test 64 = "${OBJECT_MODE-32}"; then 8737 shared_archive_member_spec=shr_64 8738 else 8739 shared_archive_member_spec=shr 8740 fi 8741 fi 8742 ;; 8743*) 8744 with_aix_soname=aix 8745 ;; 8746esac 8747 8748_LT_DECL([], [shared_archive_member_spec], [0], 8749 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8750])# _LT_WITH_AIX_SONAME 8751 8752LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8753LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8754LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8755 8756 8757# _LT_WITH_PIC([MODE]) 8758# -------------------- 8759# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8760# LT_INIT options. 8761# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8762m4_define([_LT_WITH_PIC], 8763[AC_ARG_WITH([pic], 8764 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8765 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8766 [lt_p=${PACKAGE-default} 8767 case $withval in 8768 yes|no) pic_mode=$withval ;; 8769 *) 8770 pic_mode=default 8771 # Look at the argument we got. We use all the common list separators. 8772 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8773 for lt_pkg in $withval; do 8774 IFS=$lt_save_ifs 8775 if test "X$lt_pkg" = "X$lt_p"; then 8776 pic_mode=yes 8777 fi 8778 done 8779 IFS=$lt_save_ifs 8780 ;; 8781 esac], 8782 [pic_mode=m4_default([$1], [default])]) 8783 8784_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8785])# _LT_WITH_PIC 8786 8787LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8788LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8789 8790# Old name: 8791AU_DEFUN([AC_LIBTOOL_PICMODE], 8792[_LT_SET_OPTION([LT_INIT], [pic-only]) 8793AC_DIAGNOSE([obsolete], 8794[$0: Remove this warning and the call to _LT_SET_OPTION when you 8795put the 'pic-only' option into LT_INIT's first parameter.]) 8796]) 8797 8798dnl aclocal-1.4 backwards compatibility: 8799dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8800 8801 8802m4_define([_LTDL_MODE], []) 8803LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8804 [m4_define([_LTDL_MODE], [nonrecursive])]) 8805LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8806 [m4_define([_LTDL_MODE], [recursive])]) 8807LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8808 [m4_define([_LTDL_MODE], [subproject])]) 8809 8810m4_define([_LTDL_TYPE], []) 8811LT_OPTION_DEFINE([LTDL_INIT], [installable], 8812 [m4_define([_LTDL_TYPE], [installable])]) 8813LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8814 [m4_define([_LTDL_TYPE], [convenience])]) 8815 8816# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8817# 8818# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8819# Foundation, Inc. 8820# Written by Gary V. Vaughan, 2004 8821# 8822# This file is free software; the Free Software Foundation gives 8823# unlimited permission to copy and/or distribute it, with or without 8824# modifications, as long as this notice is preserved. 8825 8826# serial 6 ltsugar.m4 8827 8828# This is to help aclocal find these macros, as it can't see m4_define. 8829AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8830 8831 8832# lt_join(SEP, ARG1, [ARG2...]) 8833# ----------------------------- 8834# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8835# associated separator. 8836# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8837# versions in m4sugar had bugs. 8838m4_define([lt_join], 8839[m4_if([$#], [1], [], 8840 [$#], [2], [[$2]], 8841 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8842m4_define([_lt_join], 8843[m4_if([$#$2], [2], [], 8844 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8845 8846 8847# lt_car(LIST) 8848# lt_cdr(LIST) 8849# ------------ 8850# Manipulate m4 lists. 8851# These macros are necessary as long as will still need to support 8852# Autoconf-2.59, which quotes differently. 8853m4_define([lt_car], [[$1]]) 8854m4_define([lt_cdr], 8855[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8856 [$#], 1, [], 8857 [m4_dquote(m4_shift($@))])]) 8858m4_define([lt_unquote], $1) 8859 8860 8861# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8862# ------------------------------------------ 8863# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8864# Note that neither SEPARATOR nor STRING are expanded; they are appended 8865# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8866# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8867# than defined and empty). 8868# 8869# This macro is needed until we can rely on Autoconf 2.62, since earlier 8870# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8871m4_define([lt_append], 8872[m4_define([$1], 8873 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8874 8875 8876 8877# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8878# ---------------------------------------------------------- 8879# Produce a SEP delimited list of all paired combinations of elements of 8880# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8881# has the form PREFIXmINFIXSUFFIXn. 8882# Needed until we can rely on m4_combine added in Autoconf 2.62. 8883m4_define([lt_combine], 8884[m4_if(m4_eval([$# > 3]), [1], 8885 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8886[[m4_foreach([_Lt_prefix], [$2], 8887 [m4_foreach([_Lt_suffix], 8888 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8889 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8890 8891 8892# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8893# ----------------------------------------------------------------------- 8894# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8895# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8896m4_define([lt_if_append_uniq], 8897[m4_ifdef([$1], 8898 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8899 [lt_append([$1], [$2], [$3])$4], 8900 [$5])], 8901 [lt_append([$1], [$2], [$3])$4])]) 8902 8903 8904# lt_dict_add(DICT, KEY, VALUE) 8905# ----------------------------- 8906m4_define([lt_dict_add], 8907[m4_define([$1($2)], [$3])]) 8908 8909 8910# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8911# -------------------------------------------- 8912m4_define([lt_dict_add_subkey], 8913[m4_define([$1($2:$3)], [$4])]) 8914 8915 8916# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8917# ---------------------------------- 8918m4_define([lt_dict_fetch], 8919[m4_ifval([$3], 8920 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8921 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922 8923 8924# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8925# ----------------------------------------------------------------- 8926m4_define([lt_if_dict_fetch], 8927[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8928 [$5], 8929 [$6])]) 8930 8931 8932# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8933# -------------------------------------------------------------- 8934m4_define([lt_dict_filter], 8935[m4_if([$5], [], [], 8936 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8937 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8938 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8939]) 8940 8941# ltversion.m4 -- version numbers -*- Autoconf -*- 8942# 8943# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8944# Written by Scott James Remnant, 2004 8945# 8946# This file is free software; the Free Software Foundation gives 8947# unlimited permission to copy and/or distribute it, with or without 8948# modifications, as long as this notice is preserved. 8949 8950# @configure_input@ 8951 8952# serial 4179 ltversion.m4 8953# This file is part of GNU Libtool 8954 8955m4_define([LT_PACKAGE_VERSION], [2.4.6]) 8956m4_define([LT_PACKAGE_REVISION], [2.4.6]) 8957 8958AC_DEFUN([LTVERSION_VERSION], 8959[macro_version='2.4.6' 8960macro_revision='2.4.6' 8961_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8962_LT_DECL(, macro_revision, 0) 8963]) 8964 8965# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8966# 8967# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8968# Foundation, Inc. 8969# Written by Scott James Remnant, 2004. 8970# 8971# This file is free software; the Free Software Foundation gives 8972# unlimited permission to copy and/or distribute it, with or without 8973# modifications, as long as this notice is preserved. 8974 8975# serial 5 lt~obsolete.m4 8976 8977# These exist entirely to fool aclocal when bootstrapping libtool. 8978# 8979# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8980# which have later been changed to m4_define as they aren't part of the 8981# exported API, or moved to Autoconf or Automake where they belong. 8982# 8983# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8984# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8985# using a macro with the same name in our local m4/libtool.m4 it'll 8986# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8987# and doesn't know about Autoconf macros at all.) 8988# 8989# So we provide this file, which has a silly filename so it's always 8990# included after everything else. This provides aclocal with the 8991# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8992# because those macros already exist, or will be overwritten later. 8993# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8994# 8995# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8996# Yes, that means every name once taken will need to remain here until 8997# we give up compatibility with versions before 1.7, at which point 8998# we need to keep only those names which we still refer to. 8999 9000# This is to help aclocal find these macros, as it can't see m4_define. 9001AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9002 9003m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9004m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9005m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9006m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9007m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9008m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9009m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9010m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9011m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9012m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9013m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9014m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9015m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9016m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9017m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9018m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9019m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9020m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9021m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9022m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9023m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9024m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9025m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9026m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9027m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9028m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9029m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9030m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9031m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9032m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9033m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9034m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9035m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9036m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9037m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9038m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9039m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9040m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9041m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9042m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9043m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9044m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9045m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9046m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9047m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9048m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9049m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9050m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9051m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9052m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9053m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9054m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9055m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9056m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9057m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9058m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9059m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9060m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9061m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9062m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9063m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9064 9065# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9066# serial 11 (pkg-config-0.29.1) 9067 9068dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9069dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9070dnl 9071dnl This program is free software; you can redistribute it and/or modify 9072dnl it under the terms of the GNU General Public License as published by 9073dnl the Free Software Foundation; either version 2 of the License, or 9074dnl (at your option) any later version. 9075dnl 9076dnl This program is distributed in the hope that it will be useful, but 9077dnl WITHOUT ANY WARRANTY; without even the implied warranty of 9078dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9079dnl General Public License for more details. 9080dnl 9081dnl You should have received a copy of the GNU General Public License 9082dnl along with this program; if not, write to the Free Software 9083dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9084dnl 02111-1307, USA. 9085dnl 9086dnl As a special exception to the GNU General Public License, if you 9087dnl distribute this file as part of a program that contains a 9088dnl configuration script generated by Autoconf, you may include it under 9089dnl the same distribution terms that you use for the rest of that 9090dnl program. 9091 9092dnl PKG_PREREQ(MIN-VERSION) 9093dnl ----------------------- 9094dnl Since: 0.29 9095dnl 9096dnl Verify that the version of the pkg-config macros are at least 9097dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9098dnl installed version of pkg-config, this checks the developer's version 9099dnl of pkg.m4 when generating configure. 9100dnl 9101dnl To ensure that this macro is defined, also add: 9102dnl m4_ifndef([PKG_PREREQ], 9103dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9104dnl 9105dnl See the "Since" comment for each macro you use to see what version 9106dnl of the macros you require. 9107m4_defun([PKG_PREREQ], 9108[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9109m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9110 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9111])dnl PKG_PREREQ 9112 9113dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9114dnl ---------------------------------- 9115dnl Since: 0.16 9116dnl 9117dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9118dnl first found in the path. Checks that the version of pkg-config found 9119dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9120dnl used since that's the first version where most current features of 9121dnl pkg-config existed. 9122AC_DEFUN([PKG_PROG_PKG_CONFIG], 9123[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9124m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9125m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9126AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9127AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9128AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9129 9130if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9131 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9132fi 9133if test -n "$PKG_CONFIG"; then 9134 _pkg_min_version=m4_default([$1], [0.9.0]) 9135 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9136 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9137 AC_MSG_RESULT([yes]) 9138 else 9139 AC_MSG_RESULT([no]) 9140 PKG_CONFIG="" 9141 fi 9142fi[]dnl 9143])dnl PKG_PROG_PKG_CONFIG 9144 9145dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9146dnl ------------------------------------------------------------------- 9147dnl Since: 0.18 9148dnl 9149dnl Check to see whether a particular set of modules exists. Similar to 9150dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9151dnl 9152dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9153dnl only at the first occurence in configure.ac, so if the first place 9154dnl it's called might be skipped (such as if it is within an "if", you 9155dnl have to call PKG_CHECK_EXISTS manually 9156AC_DEFUN([PKG_CHECK_EXISTS], 9157[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9158if test -n "$PKG_CONFIG" && \ 9159 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9160 m4_default([$2], [:]) 9161m4_ifvaln([$3], [else 9162 $3])dnl 9163fi]) 9164 9165dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9166dnl --------------------------------------------- 9167dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9168dnl pkg_failed based on the result. 9169m4_define([_PKG_CONFIG], 9170[if test -n "$$1"; then 9171 pkg_cv_[]$1="$$1" 9172 elif test -n "$PKG_CONFIG"; then 9173 PKG_CHECK_EXISTS([$3], 9174 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9175 test "x$?" != "x0" && pkg_failed=yes ], 9176 [pkg_failed=yes]) 9177 else 9178 pkg_failed=untried 9179fi[]dnl 9180])dnl _PKG_CONFIG 9181 9182dnl _PKG_SHORT_ERRORS_SUPPORTED 9183dnl --------------------------- 9184dnl Internal check to see if pkg-config supports short errors. 9185AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9186[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9187if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9188 _pkg_short_errors_supported=yes 9189else 9190 _pkg_short_errors_supported=no 9191fi[]dnl 9192])dnl _PKG_SHORT_ERRORS_SUPPORTED 9193 9194 9195dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9196dnl [ACTION-IF-NOT-FOUND]) 9197dnl -------------------------------------------------------------- 9198dnl Since: 0.4.0 9199dnl 9200dnl Note that if there is a possibility the first call to 9201dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9202dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9203AC_DEFUN([PKG_CHECK_MODULES], 9204[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9205AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9206AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9207 9208pkg_failed=no 9209AC_MSG_CHECKING([for $1]) 9210 9211_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9212_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9213 9214m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9215and $1[]_LIBS to avoid the need to call pkg-config. 9216See the pkg-config man page for more details.]) 9217 9218if test $pkg_failed = yes; then 9219 AC_MSG_RESULT([no]) 9220 _PKG_SHORT_ERRORS_SUPPORTED 9221 if test $_pkg_short_errors_supported = yes; then 9222 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9223 else 9224 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9225 fi 9226 # Put the nasty error message in config.log where it belongs 9227 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9228 9229 m4_default([$4], [AC_MSG_ERROR( 9230[Package requirements ($2) were not met: 9231 9232$$1_PKG_ERRORS 9233 9234Consider adjusting the PKG_CONFIG_PATH environment variable if you 9235installed software in a non-standard prefix. 9236 9237_PKG_TEXT])[]dnl 9238 ]) 9239elif test $pkg_failed = untried; then 9240 AC_MSG_RESULT([no]) 9241 m4_default([$4], [AC_MSG_FAILURE( 9242[The pkg-config script could not be found or is too old. Make sure it 9243is in your PATH or set the PKG_CONFIG environment variable to the full 9244path to pkg-config. 9245 9246_PKG_TEXT 9247 9248To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9249 ]) 9250else 9251 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9252 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9253 AC_MSG_RESULT([yes]) 9254 $3 9255fi[]dnl 9256])dnl PKG_CHECK_MODULES 9257 9258 9259dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9260dnl [ACTION-IF-NOT-FOUND]) 9261dnl --------------------------------------------------------------------- 9262dnl Since: 0.29 9263dnl 9264dnl Checks for existence of MODULES and gathers its build flags with 9265dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9266dnl and VARIABLE-PREFIX_LIBS from --libs. 9267dnl 9268dnl Note that if there is a possibility the first call to 9269dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9270dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9271dnl configure.ac. 9272AC_DEFUN([PKG_CHECK_MODULES_STATIC], 9273[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9274_save_PKG_CONFIG=$PKG_CONFIG 9275PKG_CONFIG="$PKG_CONFIG --static" 9276PKG_CHECK_MODULES($@) 9277PKG_CONFIG=$_save_PKG_CONFIG[]dnl 9278])dnl PKG_CHECK_MODULES_STATIC 9279 9280 9281dnl PKG_INSTALLDIR([DIRECTORY]) 9282dnl ------------------------- 9283dnl Since: 0.27 9284dnl 9285dnl Substitutes the variable pkgconfigdir as the location where a module 9286dnl should install pkg-config .pc files. By default the directory is 9287dnl $libdir/pkgconfig, but the default can be changed by passing 9288dnl DIRECTORY. The user can override through the --with-pkgconfigdir 9289dnl parameter. 9290AC_DEFUN([PKG_INSTALLDIR], 9291[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9292m4_pushdef([pkg_description], 9293 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9294AC_ARG_WITH([pkgconfigdir], 9295 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9296 [with_pkgconfigdir=]pkg_default) 9297AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9298m4_popdef([pkg_default]) 9299m4_popdef([pkg_description]) 9300])dnl PKG_INSTALLDIR 9301 9302 9303dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9304dnl -------------------------------- 9305dnl Since: 0.27 9306dnl 9307dnl Substitutes the variable noarch_pkgconfigdir as the location where a 9308dnl module should install arch-independent pkg-config .pc files. By 9309dnl default the directory is $datadir/pkgconfig, but the default can be 9310dnl changed by passing DIRECTORY. The user can override through the 9311dnl --with-noarch-pkgconfigdir parameter. 9312AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9313[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9314m4_pushdef([pkg_description], 9315 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9316AC_ARG_WITH([noarch-pkgconfigdir], 9317 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9318 [with_noarch_pkgconfigdir=]pkg_default) 9319AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9320m4_popdef([pkg_default]) 9321m4_popdef([pkg_description]) 9322])dnl PKG_NOARCH_INSTALLDIR 9323 9324 9325dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9326dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9327dnl ------------------------------------------- 9328dnl Since: 0.28 9329dnl 9330dnl Retrieves the value of the pkg-config variable for the given module. 9331AC_DEFUN([PKG_CHECK_VAR], 9332[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9333AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9334 9335_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9336AS_VAR_COPY([$1], [pkg_cv_][$1]) 9337 9338AS_VAR_IF([$1], [""], [$5], [$4])dnl 9339])dnl PKG_CHECK_VAR 9340 9341dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9342dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9343dnl [DESCRIPTION], [DEFAULT]) 9344dnl ------------------------------------------ 9345dnl 9346dnl Prepare a "--with-" configure option using the lowercase 9347dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9348dnl PKG_CHECK_MODULES in a single macro. 9349AC_DEFUN([PKG_WITH_MODULES], 9350[ 9351m4_pushdef([with_arg], m4_tolower([$1])) 9352 9353m4_pushdef([description], 9354 [m4_default([$5], [build with ]with_arg[ support])]) 9355 9356m4_pushdef([def_arg], [m4_default([$6], [auto])]) 9357m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9358m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9359 9360m4_case(def_arg, 9361 [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9362 [m4_pushdef([with_without],[--with-]with_arg)]) 9363 9364AC_ARG_WITH(with_arg, 9365 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9366 [AS_TR_SH([with_]with_arg)=def_arg]) 9367 9368AS_CASE([$AS_TR_SH([with_]with_arg)], 9369 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9370 [auto],[PKG_CHECK_MODULES([$1],[$2], 9371 [m4_n([def_action_if_found]) $3], 9372 [m4_n([def_action_if_not_found]) $4])]) 9373 9374m4_popdef([with_arg]) 9375m4_popdef([description]) 9376m4_popdef([def_arg]) 9377 9378])dnl PKG_WITH_MODULES 9379 9380dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9381dnl [DESCRIPTION], [DEFAULT]) 9382dnl ----------------------------------------------- 9383dnl 9384dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9385dnl check._[VARIABLE-PREFIX] is exported as make variable. 9386AC_DEFUN([PKG_HAVE_WITH_MODULES], 9387[ 9388PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9389 9390AM_CONDITIONAL([HAVE_][$1], 9391 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9392])dnl PKG_HAVE_WITH_MODULES 9393 9394dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9395dnl [DESCRIPTION], [DEFAULT]) 9396dnl ------------------------------------------------------ 9397dnl 9398dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9399dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9400dnl and preprocessor variable. 9401AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9402[ 9403PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9404 9405AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9406 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9407])dnl PKG_HAVE_DEFINE_WITH_MODULES 9408 9409dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9410dnl 9411dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9412dnl 9413dnl Permission is hereby granted, free of charge, to any person obtaining a 9414dnl copy of this software and associated documentation files (the "Software"), 9415dnl to deal in the Software without restriction, including without limitation 9416dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9417dnl and/or sell copies of the Software, and to permit persons to whom the 9418dnl Software is furnished to do so, subject to the following conditions: 9419dnl 9420dnl The above copyright notice and this permission notice (including the next 9421dnl paragraph) shall be included in all copies or substantial portions of the 9422dnl Software. 9423dnl 9424dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9425dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9426dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9427dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9428dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9429dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9430dnl DEALINGS IN THE SOFTWARE. 9431 9432# XORG_MACROS_VERSION(required-version) 9433# ------------------------------------- 9434# Minimum version: 1.1.0 9435# 9436# If you're using a macro added in Version 1.1 or newer, include this in 9437# your configure.ac with the minimum required version, such as: 9438# XORG_MACROS_VERSION(1.1) 9439# 9440# To ensure that this macro is defined, also add: 9441# m4_ifndef([XORG_MACROS_VERSION], 9442# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9443# 9444# 9445# See the "minimum version" comment for each macro you use to see what 9446# version you require. 9447m4_defun([XORG_MACROS_VERSION],[ 9448m4_define([vers_have], [1.19.2]) 9449m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9450m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9451m4_if(m4_cmp(maj_have, maj_needed), 0,, 9452 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9453m4_if(m4_version_compare(vers_have, [$1]), -1, 9454 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9455m4_undefine([vers_have]) 9456m4_undefine([maj_have]) 9457m4_undefine([maj_needed]) 9458]) # XORG_MACROS_VERSION 9459 9460# XORG_PROG_RAWCPP() 9461# ------------------ 9462# Minimum version: 1.0.0 9463# 9464# Find cpp program and necessary flags for use in pre-processing text files 9465# such as man pages and config files 9466AC_DEFUN([XORG_PROG_RAWCPP],[ 9467AC_REQUIRE([AC_PROG_CPP]) 9468AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9469 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9470 9471# Check for flag to avoid builtin definitions - assumes unix is predefined, 9472# which is not the best choice for supporting other OS'es, but covers most 9473# of the ones we need for now. 9474AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9475AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9476if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9477 AC_MSG_RESULT([no]) 9478else 9479 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9480 RAWCPPFLAGS=-undef 9481 AC_MSG_RESULT([yes]) 9482 # under Cygwin unix is still defined even with -undef 9483 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9484 RAWCPPFLAGS="-undef -ansi" 9485 AC_MSG_RESULT([yes, with -ansi]) 9486 else 9487 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9488 fi 9489fi 9490rm -f conftest.$ac_ext 9491 9492AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9493AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9494if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9495 AC_MSG_RESULT([no]) 9496else 9497 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9498 TRADITIONALCPPFLAGS="-traditional" 9499 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9500 AC_MSG_RESULT([yes]) 9501 else 9502 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9503 fi 9504fi 9505rm -f conftest.$ac_ext 9506AC_SUBST(RAWCPPFLAGS) 9507AC_SUBST(TRADITIONALCPPFLAGS) 9508]) # XORG_PROG_RAWCPP 9509 9510# XORG_MANPAGE_SECTIONS() 9511# ----------------------- 9512# Minimum version: 1.0.0 9513# 9514# Determine which sections man pages go in for the different man page types 9515# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9516# Not sure if there's any better way than just hardcoding by OS name. 9517# Override default settings by setting environment variables 9518# Added MAN_SUBSTS in version 1.8 9519# Added AC_PROG_SED in version 1.8 9520 9521AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9522AC_REQUIRE([AC_CANONICAL_HOST]) 9523AC_REQUIRE([AC_PROG_SED]) 9524 9525case $host_os in 9526 solaris*) 9527 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 9528 # check for a man page file found in later versions that use 9529 # traditional section numbers instead 9530 AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 9531 [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 9532 ;; 9533 *) SYSV_MAN_SECTIONS=false ;; 9534esac 9535 9536if test x$APP_MAN_SUFFIX = x ; then 9537 APP_MAN_SUFFIX=1 9538fi 9539if test x$APP_MAN_DIR = x ; then 9540 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9541fi 9542 9543if test x$LIB_MAN_SUFFIX = x ; then 9544 LIB_MAN_SUFFIX=3 9545fi 9546if test x$LIB_MAN_DIR = x ; then 9547 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9548fi 9549 9550if test x$FILE_MAN_SUFFIX = x ; then 9551 case $SYSV_MAN_SECTIONS in 9552 true) FILE_MAN_SUFFIX=4 ;; 9553 *) FILE_MAN_SUFFIX=5 ;; 9554 esac 9555fi 9556if test x$FILE_MAN_DIR = x ; then 9557 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9558fi 9559 9560if test x$MISC_MAN_SUFFIX = x ; then 9561 case $SYSV_MAN_SECTIONS in 9562 true) MISC_MAN_SUFFIX=5 ;; 9563 *) MISC_MAN_SUFFIX=7 ;; 9564 esac 9565fi 9566if test x$MISC_MAN_DIR = x ; then 9567 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9568fi 9569 9570if test x$DRIVER_MAN_SUFFIX = x ; then 9571 case $SYSV_MAN_SECTIONS in 9572 true) DRIVER_MAN_SUFFIX=7 ;; 9573 *) DRIVER_MAN_SUFFIX=4 ;; 9574 esac 9575fi 9576if test x$DRIVER_MAN_DIR = x ; then 9577 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9578fi 9579 9580if test x$ADMIN_MAN_SUFFIX = x ; then 9581 case $SYSV_MAN_SECTIONS in 9582 true) ADMIN_MAN_SUFFIX=1m ;; 9583 *) ADMIN_MAN_SUFFIX=8 ;; 9584 esac 9585fi 9586if test x$ADMIN_MAN_DIR = x ; then 9587 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9588fi 9589 9590 9591AC_SUBST([APP_MAN_SUFFIX]) 9592AC_SUBST([LIB_MAN_SUFFIX]) 9593AC_SUBST([FILE_MAN_SUFFIX]) 9594AC_SUBST([MISC_MAN_SUFFIX]) 9595AC_SUBST([DRIVER_MAN_SUFFIX]) 9596AC_SUBST([ADMIN_MAN_SUFFIX]) 9597AC_SUBST([APP_MAN_DIR]) 9598AC_SUBST([LIB_MAN_DIR]) 9599AC_SUBST([FILE_MAN_DIR]) 9600AC_SUBST([MISC_MAN_DIR]) 9601AC_SUBST([DRIVER_MAN_DIR]) 9602AC_SUBST([ADMIN_MAN_DIR]) 9603 9604XORG_MAN_PAGE="X Version 11" 9605AC_SUBST([XORG_MAN_PAGE]) 9606MAN_SUBSTS="\ 9607 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9608 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9609 -e 's|__xservername__|Xorg|g' \ 9610 -e 's|__xconfigfile__|xorg.conf|g' \ 9611 -e 's|__projectroot__|\$(prefix)|g' \ 9612 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9613 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9614 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9615 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9616 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9617 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9618 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9619AC_SUBST([MAN_SUBSTS]) 9620 9621]) # XORG_MANPAGE_SECTIONS 9622 9623# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9624# ------------------------ 9625# Minimum version: 1.7.0 9626# 9627# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9628# provided by xorg-sgml-doctools, if installed. 9629AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9630AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9631XORG_SGML_PATH= 9632PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9633 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9634 [m4_ifval([$1],[:], 9635 [if test x"$cross_compiling" != x"yes" ; then 9636 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9637 [XORG_SGML_PATH=$prefix/share/sgml]) 9638 fi]) 9639 ]) 9640 9641# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9642# the path and the name of the doc stylesheet 9643if test "x$XORG_SGML_PATH" != "x" ; then 9644 AC_MSG_RESULT([$XORG_SGML_PATH]) 9645 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9646 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9647else 9648 AC_MSG_RESULT([no]) 9649fi 9650 9651AC_SUBST(XORG_SGML_PATH) 9652AC_SUBST(STYLESHEET_SRCDIR) 9653AC_SUBST(XSL_STYLESHEET) 9654AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9655]) # XORG_CHECK_SGML_DOCTOOLS 9656 9657# XORG_CHECK_LINUXDOC 9658# ------------------- 9659# Minimum version: 1.0.0 9660# 9661# Defines the variable MAKE_TEXT if the necessary tools and 9662# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9663# Whether or not the necessary tools and files are found can be checked 9664# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9665AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9666AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9667AC_REQUIRE([XORG_WITH_PS2PDF]) 9668 9669AC_PATH_PROG(LINUXDOC, linuxdoc) 9670 9671AC_MSG_CHECKING([whether to build documentation]) 9672 9673if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9674 BUILDDOC=yes 9675else 9676 BUILDDOC=no 9677fi 9678 9679AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9680 9681AC_MSG_RESULT([$BUILDDOC]) 9682 9683AC_MSG_CHECKING([whether to build pdf documentation]) 9684 9685if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9686 BUILDPDFDOC=yes 9687else 9688 BUILDPDFDOC=no 9689fi 9690 9691AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9692 9693AC_MSG_RESULT([$BUILDPDFDOC]) 9694 9695MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9696MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9697MAKE_PDF="$PS2PDF" 9698MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9699 9700AC_SUBST(MAKE_TEXT) 9701AC_SUBST(MAKE_PS) 9702AC_SUBST(MAKE_PDF) 9703AC_SUBST(MAKE_HTML) 9704]) # XORG_CHECK_LINUXDOC 9705 9706# XORG_CHECK_DOCBOOK 9707# ------------------- 9708# Minimum version: 1.0.0 9709# 9710# Checks for the ability to build output formats from SGML DocBook source. 9711# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9712# indicates whether the necessary tools and files are found and, if set, 9713# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9714AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9715AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9716 9717BUILDTXTDOC=no 9718BUILDPDFDOC=no 9719BUILDPSDOC=no 9720BUILDHTMLDOC=no 9721 9722AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9723AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9724AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9725AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9726 9727AC_MSG_CHECKING([whether to build text documentation]) 9728if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9729 test x$BUILD_TXTDOC != xno; then 9730 BUILDTXTDOC=yes 9731fi 9732AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9733AC_MSG_RESULT([$BUILDTXTDOC]) 9734 9735AC_MSG_CHECKING([whether to build PDF documentation]) 9736if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9737 test x$BUILD_PDFDOC != xno; then 9738 BUILDPDFDOC=yes 9739fi 9740AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9741AC_MSG_RESULT([$BUILDPDFDOC]) 9742 9743AC_MSG_CHECKING([whether to build PostScript documentation]) 9744if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9745 test x$BUILD_PSDOC != xno; then 9746 BUILDPSDOC=yes 9747fi 9748AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9749AC_MSG_RESULT([$BUILDPSDOC]) 9750 9751AC_MSG_CHECKING([whether to build HTML documentation]) 9752if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9753 test x$BUILD_HTMLDOC != xno; then 9754 BUILDHTMLDOC=yes 9755fi 9756AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9757AC_MSG_RESULT([$BUILDHTMLDOC]) 9758 9759MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9760MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9761MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9762MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9763 9764AC_SUBST(MAKE_TEXT) 9765AC_SUBST(MAKE_PS) 9766AC_SUBST(MAKE_PDF) 9767AC_SUBST(MAKE_HTML) 9768]) # XORG_CHECK_DOCBOOK 9769 9770# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9771# ---------------- 9772# Minimum version: 1.5.0 9773# Minimum version for optional DEFAULT argument: 1.11.0 9774# 9775# Documentation tools are not always available on all platforms and sometimes 9776# not at the appropriate level. This macro enables a module to test for the 9777# presence of the tool and obtain it's path in separate variables. Coupled with 9778# the --with-xmlto option, it allows maximum flexibilty in making decisions 9779# as whether or not to use the xmlto package. When DEFAULT is not specified, 9780# --with-xmlto assumes 'auto'. 9781# 9782# Interface to module: 9783# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9784# XMLTO: returns the path of the xmlto program found 9785# returns the path set by the user in the environment 9786# --with-xmlto: 'yes' user instructs the module to use xmlto 9787# 'no' user instructs the module not to use xmlto 9788# 9789# Added in version 1.10.0 9790# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9791# xmlto for text output requires either lynx, links, or w3m browsers 9792# 9793# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9794# 9795AC_DEFUN([XORG_WITH_XMLTO],[ 9796AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9797m4_define([_defopt], m4_default([$2], [auto])) 9798AC_ARG_WITH(xmlto, 9799 AS_HELP_STRING([--with-xmlto], 9800 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9801 [use_xmlto=$withval], [use_xmlto=]_defopt) 9802m4_undefine([_defopt]) 9803 9804if test "x$use_xmlto" = x"auto"; then 9805 AC_PATH_PROG([XMLTO], [xmlto]) 9806 if test "x$XMLTO" = "x"; then 9807 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9808 have_xmlto=no 9809 else 9810 have_xmlto=yes 9811 fi 9812elif test "x$use_xmlto" = x"yes" ; then 9813 AC_PATH_PROG([XMLTO], [xmlto]) 9814 if test "x$XMLTO" = "x"; then 9815 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9816 fi 9817 have_xmlto=yes 9818elif test "x$use_xmlto" = x"no" ; then 9819 if test "x$XMLTO" != "x"; then 9820 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9821 fi 9822 have_xmlto=no 9823else 9824 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9825fi 9826 9827# Test for a minimum version of xmlto, if provided. 9828m4_ifval([$1], 9829[if test "$have_xmlto" = yes; then 9830 # scrape the xmlto version 9831 AC_MSG_CHECKING([the xmlto version]) 9832 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9833 AC_MSG_RESULT([$xmlto_version]) 9834 AS_VERSION_COMPARE([$xmlto_version], [$1], 9835 [if test "x$use_xmlto" = xauto; then 9836 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9837 have_xmlto=no 9838 else 9839 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9840 fi]) 9841fi]) 9842 9843# Test for the ability of xmlto to generate a text target 9844# 9845# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9846# following test for empty XML docbook files. 9847# For compatibility reasons use the following empty XML docbook file and if 9848# it fails try it again with a non-empty XML file. 9849have_xmlto_text=no 9850cat > conftest.xml << "EOF" 9851EOF 9852AS_IF([test "$have_xmlto" = yes], 9853 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9854 [have_xmlto_text=yes], 9855 [# Try it again with a non-empty XML file. 9856 cat > conftest.xml << "EOF" 9857<x></x> 9858EOF 9859 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9860 [have_xmlto_text=yes], 9861 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 9862rm -f conftest.xml 9863AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9864AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9865]) # XORG_WITH_XMLTO 9866 9867# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9868# -------------------------------------------- 9869# Minimum version: 1.12.0 9870# Minimum version for optional DEFAULT argument: 1.12.0 9871# 9872# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9873# XML-based language used for the transformation of XML documents. 9874# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9875# It is used under the cover by xmlto to generate html files from DocBook/XML. 9876# The XSLT processor is often used as a standalone tool for transformations. 9877# It should not be assumed that this tool is used only to work with documnetation. 9878# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9879# 9880# Interface to module: 9881# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9882# XSLTPROC: returns the path of the xsltproc program found 9883# returns the path set by the user in the environment 9884# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9885# 'no' user instructs the module not to use xsltproc 9886# have_xsltproc: returns yes if xsltproc found in PATH or no 9887# 9888# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9889# 9890AC_DEFUN([XORG_WITH_XSLTPROC],[ 9891AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9892# Preserves the interface, should it be implemented later 9893m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9894m4_define([_defopt], m4_default([$2], [auto])) 9895AC_ARG_WITH(xsltproc, 9896 AS_HELP_STRING([--with-xsltproc], 9897 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9898 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9899m4_undefine([_defopt]) 9900 9901if test "x$use_xsltproc" = x"auto"; then 9902 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9903 if test "x$XSLTPROC" = "x"; then 9904 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9905 have_xsltproc=no 9906 else 9907 have_xsltproc=yes 9908 fi 9909elif test "x$use_xsltproc" = x"yes" ; then 9910 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9911 if test "x$XSLTPROC" = "x"; then 9912 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9913 fi 9914 have_xsltproc=yes 9915elif test "x$use_xsltproc" = x"no" ; then 9916 if test "x$XSLTPROC" != "x"; then 9917 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9918 fi 9919 have_xsltproc=no 9920else 9921 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9922fi 9923 9924AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9925]) # XORG_WITH_XSLTPROC 9926 9927# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9928# ---------------------------------------- 9929# Minimum version: 1.15.0 9930# 9931# PERL (Practical Extraction and Report Language) is a language optimized for 9932# scanning arbitrary text files, extracting information from those text files, 9933# and printing reports based on that information. 9934# 9935# When DEFAULT is not specified, --with-perl assumes 'auto'. 9936# 9937# Interface to module: 9938# HAVE_PERL: used in makefiles to conditionally scan text files 9939# PERL: returns the path of the perl program found 9940# returns the path set by the user in the environment 9941# --with-perl: 'yes' user instructs the module to use perl 9942# 'no' user instructs the module not to use perl 9943# have_perl: returns yes if perl found in PATH or no 9944# 9945# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9946# 9947AC_DEFUN([XORG_WITH_PERL],[ 9948AC_ARG_VAR([PERL], [Path to perl command]) 9949# Preserves the interface, should it be implemented later 9950m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9951m4_define([_defopt], m4_default([$2], [auto])) 9952AC_ARG_WITH(perl, 9953 AS_HELP_STRING([--with-perl], 9954 [Use perl for extracting information from files (default: ]_defopt[)]), 9955 [use_perl=$withval], [use_perl=]_defopt) 9956m4_undefine([_defopt]) 9957 9958if test "x$use_perl" = x"auto"; then 9959 AC_PATH_PROG([PERL], [perl]) 9960 if test "x$PERL" = "x"; then 9961 AC_MSG_WARN([perl not found - cannot extract information and report]) 9962 have_perl=no 9963 else 9964 have_perl=yes 9965 fi 9966elif test "x$use_perl" = x"yes" ; then 9967 AC_PATH_PROG([PERL], [perl]) 9968 if test "x$PERL" = "x"; then 9969 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9970 fi 9971 have_perl=yes 9972elif test "x$use_perl" = x"no" ; then 9973 if test "x$PERL" != "x"; then 9974 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9975 fi 9976 have_perl=no 9977else 9978 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9979fi 9980 9981AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9982]) # XORG_WITH_PERL 9983 9984# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9985# ---------------- 9986# Minimum version: 1.5.0 9987# Minimum version for optional DEFAULT argument: 1.11.0 9988# 9989# Documentation tools are not always available on all platforms and sometimes 9990# not at the appropriate level. This macro enables a module to test for the 9991# presence of the tool and obtain it's path in separate variables. Coupled with 9992# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9993# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9994# --with-asciidoc assumes 'auto'. 9995# 9996# Interface to module: 9997# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9998# ASCIIDOC: returns the path of the asciidoc program found 9999# returns the path set by the user in the environment 10000# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10001# 'no' user instructs the module not to use asciidoc 10002# 10003# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10004# 10005AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10006AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10007m4_define([_defopt], m4_default([$2], [auto])) 10008AC_ARG_WITH(asciidoc, 10009 AS_HELP_STRING([--with-asciidoc], 10010 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10011 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10012m4_undefine([_defopt]) 10013 10014if test "x$use_asciidoc" = x"auto"; then 10015 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10016 if test "x$ASCIIDOC" = "x"; then 10017 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10018 have_asciidoc=no 10019 else 10020 have_asciidoc=yes 10021 fi 10022elif test "x$use_asciidoc" = x"yes" ; then 10023 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10024 if test "x$ASCIIDOC" = "x"; then 10025 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10026 fi 10027 have_asciidoc=yes 10028elif test "x$use_asciidoc" = x"no" ; then 10029 if test "x$ASCIIDOC" != "x"; then 10030 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10031 fi 10032 have_asciidoc=no 10033else 10034 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10035fi 10036m4_ifval([$1], 10037[if test "$have_asciidoc" = yes; then 10038 # scrape the asciidoc version 10039 AC_MSG_CHECKING([the asciidoc version]) 10040 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10041 AC_MSG_RESULT([$asciidoc_version]) 10042 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10043 [if test "x$use_asciidoc" = xauto; then 10044 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10045 have_asciidoc=no 10046 else 10047 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10048 fi]) 10049fi]) 10050AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10051]) # XORG_WITH_ASCIIDOC 10052 10053# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10054# ------------------------------------------- 10055# Minimum version: 1.5.0 10056# Minimum version for optional DEFAULT argument: 1.11.0 10057# Minimum version for optional DOT checking: 1.18.0 10058# 10059# Documentation tools are not always available on all platforms and sometimes 10060# not at the appropriate level. This macro enables a module to test for the 10061# presence of the tool and obtain it's path in separate variables. Coupled with 10062# the --with-doxygen option, it allows maximum flexibilty in making decisions 10063# as whether or not to use the doxygen package. When DEFAULT is not specified, 10064# --with-doxygen assumes 'auto'. 10065# 10066# Interface to module: 10067# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10068# DOXYGEN: returns the path of the doxygen program found 10069# returns the path set by the user in the environment 10070# --with-doxygen: 'yes' user instructs the module to use doxygen 10071# 'no' user instructs the module not to use doxygen 10072# 10073# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10074# 10075AC_DEFUN([XORG_WITH_DOXYGEN],[ 10076AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10077AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10078m4_define([_defopt], m4_default([$2], [auto])) 10079AC_ARG_WITH(doxygen, 10080 AS_HELP_STRING([--with-doxygen], 10081 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10082 [use_doxygen=$withval], [use_doxygen=]_defopt) 10083m4_undefine([_defopt]) 10084 10085if test "x$use_doxygen" = x"auto"; then 10086 AC_PATH_PROG([DOXYGEN], [doxygen]) 10087 if test "x$DOXYGEN" = "x"; then 10088 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10089 have_doxygen=no 10090 else 10091 have_doxygen=yes 10092 fi 10093elif test "x$use_doxygen" = x"yes" ; then 10094 AC_PATH_PROG([DOXYGEN], [doxygen]) 10095 if test "x$DOXYGEN" = "x"; then 10096 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10097 fi 10098 have_doxygen=yes 10099elif test "x$use_doxygen" = x"no" ; then 10100 if test "x$DOXYGEN" != "x"; then 10101 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10102 fi 10103 have_doxygen=no 10104else 10105 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10106fi 10107m4_ifval([$1], 10108[if test "$have_doxygen" = yes; then 10109 # scrape the doxygen version 10110 AC_MSG_CHECKING([the doxygen version]) 10111 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10112 AC_MSG_RESULT([$doxygen_version]) 10113 AS_VERSION_COMPARE([$doxygen_version], [$1], 10114 [if test "x$use_doxygen" = xauto; then 10115 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10116 have_doxygen=no 10117 else 10118 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10119 fi]) 10120fi]) 10121 10122dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10123dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10124dnl HAVE_DOT = @HAVE_DOT@ 10125HAVE_DOT=no 10126if test "x$have_doxygen" = "xyes"; then 10127 AC_PATH_PROG([DOT], [dot]) 10128 if test "x$DOT" != "x"; then 10129 HAVE_DOT=yes 10130 fi 10131fi 10132 10133AC_SUBST([HAVE_DOT]) 10134AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10135AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10136]) # XORG_WITH_DOXYGEN 10137 10138# XORG_WITH_GROFF([DEFAULT]) 10139# ---------------- 10140# Minimum version: 1.6.0 10141# Minimum version for optional DEFAULT argument: 1.11.0 10142# 10143# Documentation tools are not always available on all platforms and sometimes 10144# not at the appropriate level. This macro enables a module to test for the 10145# presence of the tool and obtain it's path in separate variables. Coupled with 10146# the --with-groff option, it allows maximum flexibilty in making decisions 10147# as whether or not to use the groff package. When DEFAULT is not specified, 10148# --with-groff assumes 'auto'. 10149# 10150# Interface to module: 10151# HAVE_GROFF: used in makefiles to conditionally generate documentation 10152# HAVE_GROFF_MM: the memorandum macros (-mm) package 10153# HAVE_GROFF_MS: the -ms macros package 10154# GROFF: returns the path of the groff program found 10155# returns the path set by the user in the environment 10156# --with-groff: 'yes' user instructs the module to use groff 10157# 'no' user instructs the module not to use groff 10158# 10159# Added in version 1.9.0: 10160# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10161# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10162# psselect from the psutils package. 10163# the ghostcript package. Refer to the grohtml man pages 10164# 10165# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10166# 10167# OS and distros often splits groff in a basic and full package, the former 10168# having the groff program and the later having devices, fonts and macros 10169# Checking for the groff executable is not enough. 10170# 10171# If macros are missing, we cannot assume that groff is useless, so we don't 10172# unset HAVE_GROFF or GROFF env variables. 10173# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10174# 10175AC_DEFUN([XORG_WITH_GROFF],[ 10176AC_ARG_VAR([GROFF], [Path to groff command]) 10177m4_define([_defopt], m4_default([$1], [auto])) 10178AC_ARG_WITH(groff, 10179 AS_HELP_STRING([--with-groff], 10180 [Use groff to regenerate documentation (default: ]_defopt[)]), 10181 [use_groff=$withval], [use_groff=]_defopt) 10182m4_undefine([_defopt]) 10183 10184if test "x$use_groff" = x"auto"; then 10185 AC_PATH_PROG([GROFF], [groff]) 10186 if test "x$GROFF" = "x"; then 10187 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10188 have_groff=no 10189 else 10190 have_groff=yes 10191 fi 10192elif test "x$use_groff" = x"yes" ; then 10193 AC_PATH_PROG([GROFF], [groff]) 10194 if test "x$GROFF" = "x"; then 10195 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10196 fi 10197 have_groff=yes 10198elif test "x$use_groff" = x"no" ; then 10199 if test "x$GROFF" != "x"; then 10200 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10201 fi 10202 have_groff=no 10203else 10204 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10205fi 10206 10207# We have groff, test for the presence of the macro packages 10208if test "x$have_groff" = x"yes"; then 10209 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10210 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10211 groff_ms_works=yes 10212 else 10213 groff_ms_works=no 10214 fi 10215 AC_MSG_RESULT([$groff_ms_works]) 10216 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10217 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10218 groff_mm_works=yes 10219 else 10220 groff_mm_works=no 10221 fi 10222 AC_MSG_RESULT([$groff_mm_works]) 10223fi 10224 10225# We have groff, test for HTML dependencies, one command per package 10226if test "x$have_groff" = x"yes"; then 10227 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10228 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10229 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10230 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10231 have_groff_html=yes 10232 else 10233 have_groff_html=no 10234 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10235 fi 10236fi 10237 10238# Set Automake conditionals for Makefiles 10239AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10240AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10241AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10242AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10243]) # XORG_WITH_GROFF 10244 10245# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10246# --------------------------------------- 10247# Minimum version: 1.6.0 10248# Minimum version for optional DEFAULT argument: 1.11.0 10249# Minimum version for optional MIN-VERSION argument: 1.15.0 10250# 10251# Documentation tools are not always available on all platforms and sometimes 10252# not at the appropriate level. This macro enables a module to test for the 10253# presence of the tool and obtain it's path in separate variables. Coupled with 10254# the --with-fop option, it allows maximum flexibilty in making decisions 10255# as whether or not to use the fop package. When DEFAULT is not specified, 10256# --with-fop assumes 'auto'. 10257# 10258# Interface to module: 10259# HAVE_FOP: used in makefiles to conditionally generate documentation 10260# FOP: returns the path of the fop program found 10261# returns the path set by the user in the environment 10262# --with-fop: 'yes' user instructs the module to use fop 10263# 'no' user instructs the module not to use fop 10264# 10265# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10266# 10267AC_DEFUN([XORG_WITH_FOP],[ 10268AC_ARG_VAR([FOP], [Path to fop command]) 10269m4_define([_defopt], m4_default([$2], [auto])) 10270AC_ARG_WITH(fop, 10271 AS_HELP_STRING([--with-fop], 10272 [Use fop to regenerate documentation (default: ]_defopt[)]), 10273 [use_fop=$withval], [use_fop=]_defopt) 10274m4_undefine([_defopt]) 10275 10276if test "x$use_fop" = x"auto"; then 10277 AC_PATH_PROG([FOP], [fop]) 10278 if test "x$FOP" = "x"; then 10279 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10280 have_fop=no 10281 else 10282 have_fop=yes 10283 fi 10284elif test "x$use_fop" = x"yes" ; then 10285 AC_PATH_PROG([FOP], [fop]) 10286 if test "x$FOP" = "x"; then 10287 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10288 fi 10289 have_fop=yes 10290elif test "x$use_fop" = x"no" ; then 10291 if test "x$FOP" != "x"; then 10292 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10293 fi 10294 have_fop=no 10295else 10296 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10297fi 10298 10299# Test for a minimum version of fop, if provided. 10300m4_ifval([$1], 10301[if test "$have_fop" = yes; then 10302 # scrape the fop version 10303 AC_MSG_CHECKING([for fop minimum version]) 10304 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10305 AC_MSG_RESULT([$fop_version]) 10306 AS_VERSION_COMPARE([$fop_version], [$1], 10307 [if test "x$use_fop" = xauto; then 10308 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10309 have_fop=no 10310 else 10311 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10312 fi]) 10313fi]) 10314AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10315]) # XORG_WITH_FOP 10316 10317# XORG_WITH_M4([MIN-VERSION]) 10318# --------------------------- 10319# Minimum version: 1.19.0 10320# 10321# This macro attempts to locate an m4 macro processor which supports 10322# -I option and is only useful for modules relying on M4 in order to 10323# expand macros in source code files. 10324# 10325# Interface to module: 10326# M4: returns the path of the m4 program found 10327# returns the path set by the user in the environment 10328# 10329AC_DEFUN([XORG_WITH_M4], [ 10330AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10331 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10332 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10333 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10334 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10335 [$PATH:/usr/gnu/bin])]) 10336 10337AC_SUBST([M4], [$ac_cv_path_M4]) 10338]) # XORG_WITH_M4 10339 10340# XORG_WITH_PS2PDF([DEFAULT]) 10341# ---------------- 10342# Minimum version: 1.6.0 10343# Minimum version for optional DEFAULT argument: 1.11.0 10344# 10345# Documentation tools are not always available on all platforms and sometimes 10346# not at the appropriate level. This macro enables a module to test for the 10347# presence of the tool and obtain it's path in separate variables. Coupled with 10348# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10349# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10350# --with-ps2pdf assumes 'auto'. 10351# 10352# Interface to module: 10353# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10354# PS2PDF: returns the path of the ps2pdf program found 10355# returns the path set by the user in the environment 10356# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10357# 'no' user instructs the module not to use ps2pdf 10358# 10359# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10360# 10361AC_DEFUN([XORG_WITH_PS2PDF],[ 10362AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10363m4_define([_defopt], m4_default([$1], [auto])) 10364AC_ARG_WITH(ps2pdf, 10365 AS_HELP_STRING([--with-ps2pdf], 10366 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10367 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10368m4_undefine([_defopt]) 10369 10370if test "x$use_ps2pdf" = x"auto"; then 10371 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10372 if test "x$PS2PDF" = "x"; then 10373 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10374 have_ps2pdf=no 10375 else 10376 have_ps2pdf=yes 10377 fi 10378elif test "x$use_ps2pdf" = x"yes" ; then 10379 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10380 if test "x$PS2PDF" = "x"; then 10381 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10382 fi 10383 have_ps2pdf=yes 10384elif test "x$use_ps2pdf" = x"no" ; then 10385 if test "x$PS2PDF" != "x"; then 10386 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10387 fi 10388 have_ps2pdf=no 10389else 10390 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10391fi 10392AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10393]) # XORG_WITH_PS2PDF 10394 10395# XORG_ENABLE_DOCS (enable_docs=yes) 10396# ---------------- 10397# Minimum version: 1.6.0 10398# 10399# Documentation tools are not always available on all platforms and sometimes 10400# not at the appropriate level. This macro enables a builder to skip all 10401# documentation targets except traditional man pages. 10402# Combined with the specific tool checking macros XORG_WITH_*, it provides 10403# maximum flexibilty in controlling documentation building. 10404# Refer to: 10405# XORG_WITH_XMLTO --with-xmlto 10406# XORG_WITH_ASCIIDOC --with-asciidoc 10407# XORG_WITH_DOXYGEN --with-doxygen 10408# XORG_WITH_FOP --with-fop 10409# XORG_WITH_GROFF --with-groff 10410# XORG_WITH_PS2PDF --with-ps2pdf 10411# 10412# Interface to module: 10413# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10414# --enable-docs: 'yes' user instructs the module to generate docs 10415# 'no' user instructs the module not to generate docs 10416# parm1: specify the default value, yes or no. 10417# 10418AC_DEFUN([XORG_ENABLE_DOCS],[ 10419m4_define([docs_default], m4_default([$1], [yes])) 10420AC_ARG_ENABLE(docs, 10421 AS_HELP_STRING([--enable-docs], 10422 [Enable building the documentation (default: ]docs_default[)]), 10423 [build_docs=$enableval], [build_docs=]docs_default) 10424m4_undefine([docs_default]) 10425AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10426AC_MSG_CHECKING([whether to build documentation]) 10427AC_MSG_RESULT([$build_docs]) 10428]) # XORG_ENABLE_DOCS 10429 10430# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10431# ---------------- 10432# Minimum version: 1.6.0 10433# 10434# This macro enables a builder to skip all developer documentation. 10435# Combined with the specific tool checking macros XORG_WITH_*, it provides 10436# maximum flexibilty in controlling documentation building. 10437# Refer to: 10438# XORG_WITH_XMLTO --with-xmlto 10439# XORG_WITH_ASCIIDOC --with-asciidoc 10440# XORG_WITH_DOXYGEN --with-doxygen 10441# XORG_WITH_FOP --with-fop 10442# XORG_WITH_GROFF --with-groff 10443# XORG_WITH_PS2PDF --with-ps2pdf 10444# 10445# Interface to module: 10446# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10447# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10448# 'no' user instructs the module not to generate developer docs 10449# parm1: specify the default value, yes or no. 10450# 10451AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10452m4_define([devel_default], m4_default([$1], [yes])) 10453AC_ARG_ENABLE(devel-docs, 10454 AS_HELP_STRING([--enable-devel-docs], 10455 [Enable building the developer documentation (default: ]devel_default[)]), 10456 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10457m4_undefine([devel_default]) 10458AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10459AC_MSG_CHECKING([whether to build developer documentation]) 10460AC_MSG_RESULT([$build_devel_docs]) 10461]) # XORG_ENABLE_DEVEL_DOCS 10462 10463# XORG_ENABLE_SPECS (enable_specs=yes) 10464# ---------------- 10465# Minimum version: 1.6.0 10466# 10467# This macro enables a builder to skip all functional specification targets. 10468# Combined with the specific tool checking macros XORG_WITH_*, it provides 10469# maximum flexibilty in controlling documentation building. 10470# Refer to: 10471# XORG_WITH_XMLTO --with-xmlto 10472# XORG_WITH_ASCIIDOC --with-asciidoc 10473# XORG_WITH_DOXYGEN --with-doxygen 10474# XORG_WITH_FOP --with-fop 10475# XORG_WITH_GROFF --with-groff 10476# XORG_WITH_PS2PDF --with-ps2pdf 10477# 10478# Interface to module: 10479# ENABLE_SPECS: used in makefiles to conditionally generate specs 10480# --enable-specs: 'yes' user instructs the module to generate specs 10481# 'no' user instructs the module not to generate specs 10482# parm1: specify the default value, yes or no. 10483# 10484AC_DEFUN([XORG_ENABLE_SPECS],[ 10485m4_define([spec_default], m4_default([$1], [yes])) 10486AC_ARG_ENABLE(specs, 10487 AS_HELP_STRING([--enable-specs], 10488 [Enable building the specs (default: ]spec_default[)]), 10489 [build_specs=$enableval], [build_specs=]spec_default) 10490m4_undefine([spec_default]) 10491AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10492AC_MSG_CHECKING([whether to build functional specifications]) 10493AC_MSG_RESULT([$build_specs]) 10494]) # XORG_ENABLE_SPECS 10495 10496# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10497# ---------------------------------------------- 10498# Minimum version: 1.13.0 10499# 10500# This macro enables a builder to enable/disable unit testing 10501# It makes no assumption about the test cases implementation 10502# Test cases may or may not use Automake "Support for test suites" 10503# They may or may not use the software utility library GLib 10504# 10505# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10506# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10507# The variable enable_unit_tests is used by other macros in this file. 10508# 10509# Interface to module: 10510# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10511# enable_unit_tests: used in configure.ac for additional configuration 10512# --enable-unit-tests: 'yes' user instructs the module to build tests 10513# 'no' user instructs the module not to build tests 10514# parm1: specify the default value, yes or no. 10515# 10516AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10517AC_BEFORE([$0], [XORG_WITH_GLIB]) 10518AC_BEFORE([$0], [XORG_LD_WRAP]) 10519AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10520m4_define([_defopt], m4_default([$1], [auto])) 10521AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10522 [Enable building unit test cases (default: ]_defopt[)]), 10523 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10524m4_undefine([_defopt]) 10525AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10526AC_MSG_CHECKING([whether to build unit test cases]) 10527AC_MSG_RESULT([$enable_unit_tests]) 10528]) # XORG_ENABLE_UNIT_TESTS 10529 10530# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10531# ------------------------------------------------------ 10532# Minimum version: 1.17.0 10533# 10534# This macro enables a builder to enable/disable integration testing 10535# It makes no assumption about the test cases' implementation 10536# Test cases may or may not use Automake "Support for test suites" 10537# 10538# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10539# usually requires less dependencies and may be built and run under less 10540# stringent environments than integration tests. 10541# 10542# Interface to module: 10543# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10544# enable_integration_tests: used in configure.ac for additional configuration 10545# --enable-integration-tests: 'yes' user instructs the module to build tests 10546# 'no' user instructs the module not to build tests 10547# parm1: specify the default value, yes or no. 10548# 10549AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10550AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10551m4_define([_defopt], m4_default([$1], [auto])) 10552AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10553 [Enable building integration test cases (default: ]_defopt[)]), 10554 [enable_integration_tests=$enableval], 10555 [enable_integration_tests=]_defopt) 10556m4_undefine([_defopt]) 10557AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10558 [test "x$enable_integration_tests" != xno]) 10559AC_MSG_CHECKING([whether to build unit test cases]) 10560AC_MSG_RESULT([$enable_integration_tests]) 10561]) # XORG_ENABLE_INTEGRATION_TESTS 10562 10563# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10564# ---------------------------------------- 10565# Minimum version: 1.13.0 10566# 10567# GLib is a library which provides advanced data structures and functions. 10568# This macro enables a module to test for the presence of Glib. 10569# 10570# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10571# Otherwise the value of $enable_unit_tests is blank. 10572# 10573# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10574# test support usually requires less dependencies and may be built and run under 10575# less stringent environments than integration tests. 10576# 10577# Interface to module: 10578# HAVE_GLIB: used in makefiles to conditionally build targets 10579# with_glib: used in configure.ac to know if GLib has been found 10580# --with-glib: 'yes' user instructs the module to use glib 10581# 'no' user instructs the module not to use glib 10582# 10583AC_DEFUN([XORG_WITH_GLIB],[ 10584AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10585m4_define([_defopt], m4_default([$2], [auto])) 10586AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10587 [Use GLib library for unit testing (default: ]_defopt[)]), 10588 [with_glib=$withval], [with_glib=]_defopt) 10589m4_undefine([_defopt]) 10590 10591have_glib=no 10592# Do not probe GLib if user explicitly disabled unit testing 10593if test "x$enable_unit_tests" != x"no"; then 10594 # Do not probe GLib if user explicitly disabled it 10595 if test "x$with_glib" != x"no"; then 10596 m4_ifval( 10597 [$1], 10598 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10599 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10600 ) 10601 fi 10602fi 10603 10604# Not having GLib when unit testing has been explicitly requested is an error 10605if test "x$enable_unit_tests" = x"yes"; then 10606 if test "x$have_glib" = x"no"; then 10607 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10608 fi 10609fi 10610 10611# Having unit testing disabled when GLib has been explicitly requested is an error 10612if test "x$enable_unit_tests" = x"no"; then 10613 if test "x$with_glib" = x"yes"; then 10614 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10615 fi 10616fi 10617 10618# Not having GLib when it has been explicitly requested is an error 10619if test "x$with_glib" = x"yes"; then 10620 if test "x$have_glib" = x"no"; then 10621 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10622 fi 10623fi 10624 10625AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10626]) # XORG_WITH_GLIB 10627 10628# XORG_LD_WRAP([required|optional]) 10629# --------------------------------- 10630# Minimum version: 1.13.0 10631# 10632# Check if linker supports -wrap, passed via compiler flags 10633# 10634# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10635# Otherwise the value of $enable_unit_tests is blank. 10636# 10637# Argument added in 1.16.0 - default is "required", to match existing behavior 10638# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10639# available, an argument of "optional" allows use when some unit tests require 10640# ld -wrap and others do not. 10641# 10642AC_DEFUN([XORG_LD_WRAP],[ 10643XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10644 [AC_LANG_PROGRAM([#include <stdlib.h> 10645 void __wrap_exit(int status) { return; }], 10646 [exit(0);])]) 10647# Not having ld wrap when unit testing has been explicitly requested is an error 10648if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10649 if test "x$have_ld_wrap" = x"no"; then 10650 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10651 fi 10652fi 10653AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10654# 10655]) # XORG_LD_WRAP 10656 10657# XORG_CHECK_LINKER_FLAGS 10658# ----------------------- 10659# SYNOPSIS 10660# 10661# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10662# 10663# DESCRIPTION 10664# 10665# Check whether the given linker FLAGS work with the current language's 10666# linker, or whether they give an error. 10667# 10668# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10669# success/failure. 10670# 10671# PROGRAM-SOURCE is the program source to link with, if needed 10672# 10673# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10674# 10675# LICENSE 10676# 10677# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10678# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10679# Copyright (c) 2009 Matteo Frigo 10680# 10681# This program is free software: you can redistribute it and/or modify it 10682# under the terms of the GNU General Public License as published by the 10683# Free Software Foundation, either version 3 of the License, or (at your 10684# option) any later version. 10685# 10686# This program is distributed in the hope that it will be useful, but 10687# WITHOUT ANY WARRANTY; without even the implied warranty of 10688# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10689# Public License for more details. 10690# 10691# You should have received a copy of the GNU General Public License along 10692# with this program. If not, see <http://www.gnu.org/licenses/>. 10693# 10694# As a special exception, the respective Autoconf Macro's copyright owner 10695# gives unlimited permission to copy, distribute and modify the configure 10696# scripts that are the output of Autoconf when processing the Macro. You 10697# need not follow the terms of the GNU General Public License when using 10698# or distributing such scripts, even though portions of the text of the 10699# Macro appear in them. The GNU General Public License (GPL) does govern 10700# all other use of the material that constitutes the Autoconf Macro. 10701# 10702# This special exception to the GPL applies to versions of the Autoconf 10703# Macro released by the Autoconf Archive. When you make and distribute a 10704# modified version of the Autoconf Macro, you may extend this special 10705# exception to the GPL to apply to your modified version as well.# 10706AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10707[AC_MSG_CHECKING([whether the linker accepts $1]) 10708dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10709AS_LITERAL_IF([$1], 10710 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10711 ax_save_FLAGS=$LDFLAGS 10712 LDFLAGS="$1" 10713 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10714 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10715 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10716 LDFLAGS=$ax_save_FLAGS])], 10717 [ax_save_FLAGS=$LDFLAGS 10718 LDFLAGS="$1" 10719 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10720 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10721 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10722 LDFLAGS=$ax_save_FLAGS]) 10723eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10724AC_MSG_RESULT($xorg_check_linker_flags) 10725if test "x$xorg_check_linker_flags" = xyes; then 10726 m4_default([$2], :) 10727else 10728 m4_default([$3], :) 10729fi 10730]) # XORG_CHECK_LINKER_FLAGS 10731 10732# XORG_MEMORY_CHECK_FLAGS 10733# ----------------------- 10734# Minimum version: 1.16.0 10735# 10736# This macro attempts to find appropriate memory checking functionality 10737# for various platforms which unit testing code may use to catch various 10738# forms of memory allocation and access errors in testing. 10739# 10740# Interface to module: 10741# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10742# Usually added to TESTS_ENVIRONMENT in Makefile.am 10743# 10744# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10745# 10746AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10747 10748AC_REQUIRE([AC_CANONICAL_HOST]) 10749AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10750 [Environment variables to enable memory checking in tests]) 10751 10752# Check for different types of support on different platforms 10753case $host_os in 10754 solaris*) 10755 AC_CHECK_LIB([umem], [umem_alloc], 10756 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10757 ;; 10758 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10759 # both directly and inverted, so should not be 0 or 255. 10760 malloc_debug_env='MALLOC_PERTURB_=15' 10761 ;; 10762 darwin*) 10763 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10764 ;; 10765 *bsd*) 10766 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10767 ;; 10768esac 10769 10770# User supplied flags override default flags 10771if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10772 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10773fi 10774 10775AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10776]) # XORG_WITH_LINT 10777 10778# XORG_CHECK_MALLOC_ZERO 10779# ---------------------- 10780# Minimum version: 1.0.0 10781# 10782# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10783# malloc(0) returns NULL. Packages should add one of these cflags to 10784# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10785AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10786AC_ARG_ENABLE(malloc0returnsnull, 10787 AS_HELP_STRING([--enable-malloc0returnsnull], 10788 [malloc(0) returns NULL (default: auto)]), 10789 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10790 [MALLOC_ZERO_RETURNS_NULL=auto]) 10791 10792AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10793if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10794AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10795 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10796#include <stdlib.h> 10797],[ 10798 char *m0, *r0, *c0, *p; 10799 m0 = malloc(0); 10800 p = malloc(10); 10801 r0 = realloc(p,0); 10802 c0 = calloc(0,10); 10803 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10804])], 10805 [xorg_cv_malloc0_returns_null=yes], 10806 [xorg_cv_malloc0_returns_null=no])]) 10807MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10808fi 10809AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10810 10811if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10812 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10813 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10814 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10815else 10816 MALLOC_ZERO_CFLAGS="" 10817 XMALLOC_ZERO_CFLAGS="" 10818 XTMALLOC_ZERO_CFLAGS="" 10819fi 10820 10821AC_SUBST([MALLOC_ZERO_CFLAGS]) 10822AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10823AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10824]) # XORG_CHECK_MALLOC_ZERO 10825 10826# XORG_WITH_LINT() 10827# ---------------- 10828# Minimum version: 1.1.0 10829# 10830# This macro enables the use of a tool that flags some suspicious and 10831# non-portable constructs (likely to be bugs) in C language source code. 10832# It will attempt to locate the tool and use appropriate options. 10833# There are various lint type tools on different platforms. 10834# 10835# Interface to module: 10836# LINT: returns the path to the tool found on the platform 10837# or the value set to LINT on the configure cmd line 10838# also an Automake conditional 10839# LINT_FLAGS: an Automake variable with appropriate flags 10840# 10841# --with-lint: 'yes' user instructs the module to use lint 10842# 'no' user instructs the module not to use lint (default) 10843# 10844# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10845# If the user sets the value of LINT_FLAGS, they are used verbatim. 10846# 10847AC_DEFUN([XORG_WITH_LINT],[ 10848 10849AC_ARG_VAR([LINT], [Path to a lint-style command]) 10850AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10851AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10852 [Use a lint-style source code checker (default: disabled)])], 10853 [use_lint=$withval], [use_lint=no]) 10854 10855# Obtain platform specific info like program name and options 10856# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10857case $host_os in 10858 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10859 lint_name=splint 10860 lint_options="-badflag" 10861 ;; 10862 *freebsd* | *netbsd*) 10863 lint_name=lint 10864 lint_options="-u -b" 10865 ;; 10866 *solaris*) 10867 lint_name=lint 10868 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10869 ;; 10870esac 10871 10872# Test for the presence of the program (either guessed by the code or spelled out by the user) 10873if test "x$use_lint" = x"yes" ; then 10874 AC_PATH_PROG([LINT], [$lint_name]) 10875 if test "x$LINT" = "x"; then 10876 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10877 fi 10878elif test "x$use_lint" = x"no" ; then 10879 if test "x$LINT" != "x"; then 10880 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10881 fi 10882else 10883 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10884fi 10885 10886# User supplied flags override default flags 10887if test "x$LINT_FLAGS" != "x"; then 10888 lint_options=$LINT_FLAGS 10889fi 10890 10891AC_SUBST([LINT_FLAGS],[$lint_options]) 10892AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10893 10894]) # XORG_WITH_LINT 10895 10896# XORG_LINT_LIBRARY(LIBNAME) 10897# -------------------------- 10898# Minimum version: 1.1.0 10899# 10900# Sets up flags for building lint libraries for checking programs that call 10901# functions in the library. 10902# 10903# Interface to module: 10904# LINTLIB - Automake variable with the name of lint library file to make 10905# MAKE_LINT_LIB - Automake conditional 10906# 10907# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10908# - 'no' user instructs the module not to create a lint library (default) 10909 10910AC_DEFUN([XORG_LINT_LIBRARY],[ 10911AC_REQUIRE([XORG_WITH_LINT]) 10912AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10913 [Create lint library (default: disabled)])], 10914 [make_lint_lib=$enableval], [make_lint_lib=no]) 10915 10916if test "x$make_lint_lib" = x"yes" ; then 10917 LINTLIB=llib-l$1.ln 10918 if test "x$LINT" = "x"; then 10919 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10920 fi 10921elif test "x$make_lint_lib" != x"no" ; then 10922 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10923fi 10924 10925AC_SUBST(LINTLIB) 10926AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10927 10928]) # XORG_LINT_LIBRARY 10929 10930# XORG_COMPILER_BRAND 10931# ------------------- 10932# Minimum version: 1.14.0 10933# 10934# Checks for various brands of compilers and sets flags as appropriate: 10935# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10936# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10937# clang compiler - sets CLANGCC to "yes" 10938# Intel compiler - sets INTELCC to "yes" 10939# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10940# 10941AC_DEFUN([XORG_COMPILER_BRAND], [ 10942AC_LANG_CASE( 10943 [C], [ 10944 AC_REQUIRE([AC_PROG_CC_C99]) 10945 ], 10946 [C++], [ 10947 AC_REQUIRE([AC_PROG_CXX]) 10948 ] 10949) 10950AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10951AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10952AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10953]) # XORG_COMPILER_BRAND 10954 10955# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10956# --------------- 10957# Minimum version: 1.16.0 10958# 10959# Test if the compiler works when passed the given flag as a command line argument. 10960# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10961# next flag in the list until there are no more options. 10962# 10963# Note that this does not guarantee that the compiler supports the flag as some 10964# compilers will simply ignore arguments that they do not understand, but we do 10965# attempt to weed out false positives by using -Werror=unknown-warning-option and 10966# -Werror=unused-command-line-argument 10967# 10968AC_DEFUN([XORG_TESTSET_CFLAG], [ 10969m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10970m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10971 10972AC_LANG_COMPILER_REQUIRE 10973 10974AC_LANG_CASE( 10975 [C], [ 10976 AC_REQUIRE([AC_PROG_CC_C99]) 10977 define([PREFIX], [C]) 10978 define([CACHE_PREFIX], [cc]) 10979 define([COMPILER], [$CC]) 10980 ], 10981 [C++], [ 10982 define([PREFIX], [CXX]) 10983 define([CACHE_PREFIX], [cxx]) 10984 define([COMPILER], [$CXX]) 10985 ] 10986) 10987 10988[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10989 10990if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10991 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10992 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10993 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10994 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10995 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10996 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10997 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10998 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10999fi 11000 11001if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11002 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11003 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11004 fi 11005 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11006 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11007 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11008 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11009 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11010 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11011 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11012 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11013fi 11014 11015found="no" 11016m4_foreach([flag], m4_cdr($@), [ 11017 if test $found = "no" ; then 11018 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11019 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11020 fi 11021 11022 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11023 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11024 fi 11025 11026 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11027 11028dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11029 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11030 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11031 AC_CACHE_VAL($cacheid, 11032 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11033 [eval $cacheid=yes], 11034 [eval $cacheid=no])]) 11035 11036 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11037 11038 eval supported=\$$cacheid 11039 AC_MSG_RESULT([$supported]) 11040 if test "$supported" = "yes" ; then 11041 $1="$$1 ]flag[" 11042 found="yes" 11043 fi 11044 fi 11045]) 11046]) # XORG_TESTSET_CFLAG 11047 11048# XORG_COMPILER_FLAGS 11049# --------------- 11050# Minimum version: 1.16.0 11051# 11052# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11053# arguments supported by the selected compiler which do NOT alter the generated 11054# code. These arguments will cause the compiler to print various warnings 11055# during compilation AND turn a conservative set of warnings into errors. 11056# 11057# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11058# future versions of util-macros as options are added to new compilers. 11059# 11060AC_DEFUN([XORG_COMPILER_FLAGS], [ 11061AC_REQUIRE([XORG_COMPILER_BRAND]) 11062 11063AC_ARG_ENABLE(selective-werror, 11064 AS_HELP_STRING([--disable-selective-werror], 11065 [Turn off selective compiler errors. (default: enabled)]), 11066 [SELECTIVE_WERROR=$enableval], 11067 [SELECTIVE_WERROR=yes]) 11068 11069AC_LANG_CASE( 11070 [C], [ 11071 define([PREFIX], [C]) 11072 ], 11073 [C++], [ 11074 define([PREFIX], [CXX]) 11075 ] 11076) 11077# -v is too short to test reliably with XORG_TESTSET_CFLAG 11078if test "x$SUNCC" = "xyes"; then 11079 [BASE_]PREFIX[FLAGS]="-v" 11080else 11081 [BASE_]PREFIX[FLAGS]="" 11082fi 11083 11084# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11085XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11086XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11087XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11088XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11089 11090AC_LANG_CASE( 11091 [C], [ 11092 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11093 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11094 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11095 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11096 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11097 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11098 ] 11099) 11100 11101# This chunk adds additional warnings that could catch undesired effects. 11102XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11103XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11104XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11105XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11106XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11107XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11108XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11109 11110# These are currently disabled because they are noisy. They will be enabled 11111# in the future once the codebase is sufficiently modernized to silence 11112# them. For now, I don't want them to drown out the other warnings. 11113# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11114# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11115# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11116 11117# Turn some warnings into errors, so we don't accidently get successful builds 11118# when there are problems that should be fixed. 11119 11120if test "x$SELECTIVE_WERROR" = "xyes" ; then 11121XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11122XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11123XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11124XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11125XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11126XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11127XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11128XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11129XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11130XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11131XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11132XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11133XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11134else 11135AC_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]) 11136XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11137XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11138XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11139XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11140XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11141XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11142XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11143XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11144XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11145XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11146XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11147XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11148XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11149fi 11150 11151AC_SUBST([BASE_]PREFIX[FLAGS]) 11152]) # XORG_COMPILER_FLAGS 11153 11154# XORG_CWARNFLAGS 11155# --------------- 11156# Minimum version: 1.2.0 11157# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11158# 11159# Defines CWARNFLAGS to enable C compiler warnings. 11160# 11161# This function is deprecated because it defines -fno-strict-aliasing 11162# which alters the code generated by the compiler. If -fno-strict-aliasing 11163# is needed, then it should be added explicitly in the module when 11164# it is updated to use BASE_CFLAGS. 11165# 11166AC_DEFUN([XORG_CWARNFLAGS], [ 11167AC_REQUIRE([XORG_COMPILER_FLAGS]) 11168AC_REQUIRE([XORG_COMPILER_BRAND]) 11169AC_LANG_CASE( 11170 [C], [ 11171 CWARNFLAGS="$BASE_CFLAGS" 11172 if test "x$GCC" = xyes ; then 11173 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11174 fi 11175 AC_SUBST(CWARNFLAGS) 11176 ] 11177) 11178]) # XORG_CWARNFLAGS 11179 11180# XORG_STRICT_OPTION 11181# ----------------------- 11182# Minimum version: 1.3.0 11183# 11184# Add configure option to enable strict compilation flags, such as treating 11185# warnings as fatal errors. 11186# If --enable-strict-compilation is passed to configure, adds strict flags to 11187# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11188# 11189# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11190# when strict compilation is unconditionally desired. 11191AC_DEFUN([XORG_STRICT_OPTION], [ 11192AC_REQUIRE([XORG_CWARNFLAGS]) 11193AC_REQUIRE([XORG_COMPILER_FLAGS]) 11194 11195AC_ARG_ENABLE(strict-compilation, 11196 AS_HELP_STRING([--enable-strict-compilation], 11197 [Enable all warnings from compiler and make them errors (default: disabled)]), 11198 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11199 11200AC_LANG_CASE( 11201 [C], [ 11202 define([PREFIX], [C]) 11203 ], 11204 [C++], [ 11205 define([PREFIX], [CXX]) 11206 ] 11207) 11208 11209[STRICT_]PREFIX[FLAGS]="" 11210XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11211XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11212 11213# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11214# activate it with -Werror, so we add it here explicitly. 11215XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11216 11217if test "x$STRICT_COMPILE" = "xyes"; then 11218 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11219 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11220fi 11221AC_SUBST([STRICT_]PREFIX[FLAGS]) 11222AC_SUBST([BASE_]PREFIX[FLAGS]) 11223AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11224]) # XORG_STRICT_OPTION 11225 11226# XORG_DEFAULT_OPTIONS 11227# -------------------- 11228# Minimum version: 1.3.0 11229# 11230# Defines default options for X.Org modules. 11231# 11232AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11233AC_REQUIRE([AC_PROG_INSTALL]) 11234XORG_COMPILER_FLAGS 11235XORG_CWARNFLAGS 11236XORG_STRICT_OPTION 11237XORG_RELEASE_VERSION 11238XORG_CHANGELOG 11239XORG_INSTALL 11240XORG_MANPAGE_SECTIONS 11241m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11242 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11243]) # XORG_DEFAULT_OPTIONS 11244 11245# XORG_INSTALL() 11246# ---------------- 11247# Minimum version: 1.4.0 11248# 11249# Defines the variable INSTALL_CMD as the command to copy 11250# INSTALL from $prefix/share/util-macros. 11251# 11252AC_DEFUN([XORG_INSTALL], [ 11253AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11254macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11255INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11256mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11257|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 11258touch \$(top_srcdir)/INSTALL; \ 11259echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 11260AC_SUBST([INSTALL_CMD]) 11261]) # XORG_INSTALL 11262dnl Copyright 2005 Red Hat, Inc 11263dnl 11264dnl Permission to use, copy, modify, distribute, and sell this software and its 11265dnl documentation for any purpose is hereby granted without fee, provided that 11266dnl the above copyright notice appear in all copies and that both that 11267dnl copyright notice and this permission notice appear in supporting 11268dnl documentation. 11269dnl 11270dnl The above copyright notice and this permission notice shall be included 11271dnl in all copies or substantial portions of the Software. 11272dnl 11273dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11274dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11275dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11276dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11277dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11278dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11279dnl OTHER DEALINGS IN THE SOFTWARE. 11280dnl 11281dnl Except as contained in this notice, the name of the copyright holders shall 11282dnl not be used in advertising or otherwise to promote the sale, use or 11283dnl other dealings in this Software without prior written authorization 11284dnl from the copyright holders. 11285dnl 11286 11287# XORG_RELEASE_VERSION 11288# -------------------- 11289# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11290 11291AC_DEFUN([XORG_RELEASE_VERSION],[ 11292 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11293 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11294 [Major version of this package]) 11295 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11296 if test "x$PVM" = "x"; then 11297 PVM="0" 11298 fi 11299 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11300 [$PVM], 11301 [Minor version of this package]) 11302 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11303 if test "x$PVP" = "x"; then 11304 PVP="0" 11305 fi 11306 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11307 [$PVP], 11308 [Patch version of this package]) 11309]) 11310 11311# XORG_CHANGELOG() 11312# ---------------- 11313# Minimum version: 1.2.0 11314# 11315# Defines the variable CHANGELOG_CMD as the command to generate 11316# ChangeLog from git. 11317# 11318# 11319AC_DEFUN([XORG_CHANGELOG], [ 11320CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 11321mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11322|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 11323touch \$(top_srcdir)/ChangeLog; \ 11324echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 11325AC_SUBST([CHANGELOG_CMD]) 11326]) # XORG_CHANGELOG 11327 11328# Copyright (C) 2002-2018 Free Software Foundation, Inc. 11329# 11330# This file is free software; the Free Software Foundation 11331# gives unlimited permission to copy and/or distribute it, 11332# with or without modifications, as long as this notice is preserved. 11333 11334# AM_AUTOMAKE_VERSION(VERSION) 11335# ---------------------------- 11336# Automake X.Y traces this macro to ensure aclocal.m4 has been 11337# generated from the m4 files accompanying Automake X.Y. 11338# (This private macro should not be called outside this file.) 11339AC_DEFUN([AM_AUTOMAKE_VERSION], 11340[am__api_version='1.16' 11341dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11342dnl require some minimum version. Point them to the right macro. 11343m4_if([$1], [1.16.1], [], 11344 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11345]) 11346 11347# _AM_AUTOCONF_VERSION(VERSION) 11348# ----------------------------- 11349# aclocal traces this macro to find the Autoconf version. 11350# This is a private macro too. Using m4_define simplifies 11351# the logic in aclocal, which can simply ignore this definition. 11352m4_define([_AM_AUTOCONF_VERSION], []) 11353 11354# AM_SET_CURRENT_AUTOMAKE_VERSION 11355# ------------------------------- 11356# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11357# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11358AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11359[AM_AUTOMAKE_VERSION([1.16.1])dnl 11360m4_ifndef([AC_AUTOCONF_VERSION], 11361 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11362_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11363 11364# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11365 11366# Copyright (C) 2001-2018 Free Software Foundation, Inc. 11367# 11368# This file is free software; the Free Software Foundation 11369# gives unlimited permission to copy and/or distribute it, 11370# with or without modifications, as long as this notice is preserved. 11371 11372# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11373# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11374# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11375# 11376# Of course, Automake must honor this variable whenever it calls a 11377# tool from the auxiliary directory. The problem is that $srcdir (and 11378# therefore $ac_aux_dir as well) can be either absolute or relative, 11379# depending on how configure is run. This is pretty annoying, since 11380# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11381# source directory, any form will work fine, but in subdirectories a 11382# relative path needs to be adjusted first. 11383# 11384# $ac_aux_dir/missing 11385# fails when called from a subdirectory if $ac_aux_dir is relative 11386# $top_srcdir/$ac_aux_dir/missing 11387# fails if $ac_aux_dir is absolute, 11388# fails when called from a subdirectory in a VPATH build with 11389# a relative $ac_aux_dir 11390# 11391# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11392# are both prefixed by $srcdir. In an in-source build this is usually 11393# harmless because $srcdir is '.', but things will broke when you 11394# start a VPATH build or use an absolute $srcdir. 11395# 11396# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11397# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11398# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11399# and then we would define $MISSING as 11400# MISSING="\${SHELL} $am_aux_dir/missing" 11401# This will work as long as MISSING is not called from configure, because 11402# unfortunately $(top_srcdir) has no meaning in configure. 11403# However there are other variables, like CC, which are often used in 11404# configure, and could therefore not use this "fixed" $ac_aux_dir. 11405# 11406# Another solution, used here, is to always expand $ac_aux_dir to an 11407# absolute PATH. The drawback is that using absolute paths prevent a 11408# configured tree to be moved without reconfiguration. 11409 11410AC_DEFUN([AM_AUX_DIR_EXPAND], 11411[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11412# Expand $ac_aux_dir to an absolute path. 11413am_aux_dir=`cd "$ac_aux_dir" && pwd` 11414]) 11415 11416# AM_CONDITIONAL -*- Autoconf -*- 11417 11418# Copyright (C) 1997-2018 Free Software Foundation, Inc. 11419# 11420# This file is free software; the Free Software Foundation 11421# gives unlimited permission to copy and/or distribute it, 11422# with or without modifications, as long as this notice is preserved. 11423 11424# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11425# ------------------------------------- 11426# Define a conditional. 11427AC_DEFUN([AM_CONDITIONAL], 11428[AC_PREREQ([2.52])dnl 11429 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11430 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11431AC_SUBST([$1_TRUE])dnl 11432AC_SUBST([$1_FALSE])dnl 11433_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11434_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11435m4_define([_AM_COND_VALUE_$1], [$2])dnl 11436if $2; then 11437 $1_TRUE= 11438 $1_FALSE='#' 11439else 11440 $1_TRUE='#' 11441 $1_FALSE= 11442fi 11443AC_CONFIG_COMMANDS_PRE( 11444[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11445 AC_MSG_ERROR([[conditional "$1" was never defined. 11446Usually this means the macro was only invoked conditionally.]]) 11447fi])]) 11448 11449# Copyright (C) 1999-2018 Free Software Foundation, Inc. 11450# 11451# This file is free software; the Free Software Foundation 11452# gives unlimited permission to copy and/or distribute it, 11453# with or without modifications, as long as this notice is preserved. 11454 11455 11456# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11457# written in clear, in which case automake, when reading aclocal.m4, 11458# will think it sees a *use*, and therefore will trigger all it's 11459# C support machinery. Also note that it means that autoscan, seeing 11460# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11461 11462 11463# _AM_DEPENDENCIES(NAME) 11464# ---------------------- 11465# See how the compiler implements dependency checking. 11466# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11467# We try a few techniques and use that to set a single cache variable. 11468# 11469# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11470# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11471# dependency, and given that the user is not expected to run this macro, 11472# just rely on AC_PROG_CC. 11473AC_DEFUN([_AM_DEPENDENCIES], 11474[AC_REQUIRE([AM_SET_DEPDIR])dnl 11475AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11476AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11477AC_REQUIRE([AM_DEP_TRACK])dnl 11478 11479m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11480 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11481 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11482 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11483 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11484 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11485 [depcc="$$1" am_compiler_list=]) 11486 11487AC_CACHE_CHECK([dependency style of $depcc], 11488 [am_cv_$1_dependencies_compiler_type], 11489[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11490 # We make a subdir and do the tests there. Otherwise we can end up 11491 # making bogus files that we don't know about and never remove. For 11492 # instance it was reported that on HP-UX the gcc test will end up 11493 # making a dummy file named 'D' -- because '-MD' means "put the output 11494 # in D". 11495 rm -rf conftest.dir 11496 mkdir conftest.dir 11497 # Copy depcomp to subdir because otherwise we won't find it if we're 11498 # using a relative directory. 11499 cp "$am_depcomp" conftest.dir 11500 cd conftest.dir 11501 # We will build objects and dependencies in a subdirectory because 11502 # it helps to detect inapplicable dependency modes. For instance 11503 # both Tru64's cc and ICC support -MD to output dependencies as a 11504 # side effect of compilation, but ICC will put the dependencies in 11505 # the current directory while Tru64 will put them in the object 11506 # directory. 11507 mkdir sub 11508 11509 am_cv_$1_dependencies_compiler_type=none 11510 if test "$am_compiler_list" = ""; then 11511 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11512 fi 11513 am__universal=false 11514 m4_case([$1], [CC], 11515 [case " $depcc " in #( 11516 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11517 esac], 11518 [CXX], 11519 [case " $depcc " in #( 11520 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11521 esac]) 11522 11523 for depmode in $am_compiler_list; do 11524 # Setup a source with many dependencies, because some compilers 11525 # like to wrap large dependency lists on column 80 (with \), and 11526 # we should not choose a depcomp mode which is confused by this. 11527 # 11528 # We need to recreate these files for each test, as the compiler may 11529 # overwrite some of them when testing with obscure command lines. 11530 # This happens at least with the AIX C compiler. 11531 : > sub/conftest.c 11532 for i in 1 2 3 4 5 6; do 11533 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11534 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11535 # Solaris 10 /bin/sh. 11536 echo '/* dummy */' > sub/conftst$i.h 11537 done 11538 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11539 11540 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11541 # mode. It turns out that the SunPro C++ compiler does not properly 11542 # handle '-M -o', and we need to detect this. Also, some Intel 11543 # versions had trouble with output in subdirs. 11544 am__obj=sub/conftest.${OBJEXT-o} 11545 am__minus_obj="-o $am__obj" 11546 case $depmode in 11547 gcc) 11548 # This depmode causes a compiler race in universal mode. 11549 test "$am__universal" = false || continue 11550 ;; 11551 nosideeffect) 11552 # After this tag, mechanisms are not by side-effect, so they'll 11553 # only be used when explicitly requested. 11554 if test "x$enable_dependency_tracking" = xyes; then 11555 continue 11556 else 11557 break 11558 fi 11559 ;; 11560 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11561 # This compiler won't grok '-c -o', but also, the minuso test has 11562 # not run yet. These depmodes are late enough in the game, and 11563 # so weak that their functioning should not be impacted. 11564 am__obj=conftest.${OBJEXT-o} 11565 am__minus_obj= 11566 ;; 11567 none) break ;; 11568 esac 11569 if depmode=$depmode \ 11570 source=sub/conftest.c object=$am__obj \ 11571 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11572 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11573 >/dev/null 2>conftest.err && 11574 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11575 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11576 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11577 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11578 # icc doesn't choke on unknown options, it will just issue warnings 11579 # or remarks (even with -Werror). So we grep stderr for any message 11580 # that says an option was ignored or not supported. 11581 # When given -MP, icc 7.0 and 7.1 complain thusly: 11582 # icc: Command line warning: ignoring option '-M'; no argument required 11583 # The diagnosis changed in icc 8.0: 11584 # icc: Command line remark: option '-MP' not supported 11585 if (grep 'ignoring option' conftest.err || 11586 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11587 am_cv_$1_dependencies_compiler_type=$depmode 11588 break 11589 fi 11590 fi 11591 done 11592 11593 cd .. 11594 rm -rf conftest.dir 11595else 11596 am_cv_$1_dependencies_compiler_type=none 11597fi 11598]) 11599AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11600AM_CONDITIONAL([am__fastdep$1], [ 11601 test "x$enable_dependency_tracking" != xno \ 11602 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11603]) 11604 11605 11606# AM_SET_DEPDIR 11607# ------------- 11608# Choose a directory name for dependency files. 11609# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11610AC_DEFUN([AM_SET_DEPDIR], 11611[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11612AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11613]) 11614 11615 11616# AM_DEP_TRACK 11617# ------------ 11618AC_DEFUN([AM_DEP_TRACK], 11619[AC_ARG_ENABLE([dependency-tracking], [dnl 11620AS_HELP_STRING( 11621 [--enable-dependency-tracking], 11622 [do not reject slow dependency extractors]) 11623AS_HELP_STRING( 11624 [--disable-dependency-tracking], 11625 [speeds up one-time build])]) 11626if test "x$enable_dependency_tracking" != xno; then 11627 am_depcomp="$ac_aux_dir/depcomp" 11628 AMDEPBACKSLASH='\' 11629 am__nodep='_no' 11630fi 11631AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11632AC_SUBST([AMDEPBACKSLASH])dnl 11633_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11634AC_SUBST([am__nodep])dnl 11635_AM_SUBST_NOTMAKE([am__nodep])dnl 11636]) 11637 11638# Generate code to set up dependency tracking. -*- Autoconf -*- 11639 11640# Copyright (C) 1999-2018 Free Software Foundation, Inc. 11641# 11642# This file is free software; the Free Software Foundation 11643# gives unlimited permission to copy and/or distribute it, 11644# with or without modifications, as long as this notice is preserved. 11645 11646# _AM_OUTPUT_DEPENDENCY_COMMANDS 11647# ------------------------------ 11648AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11649[{ 11650 # Older Autoconf quotes --file arguments for eval, but not when files 11651 # are listed without --file. Let's play safe and only enable the eval 11652 # if we detect the quoting. 11653 # TODO: see whether this extra hack can be removed once we start 11654 # requiring Autoconf 2.70 or later. 11655 AS_CASE([$CONFIG_FILES], 11656 [*\'*], [eval set x "$CONFIG_FILES"], 11657 [*], [set x $CONFIG_FILES]) 11658 shift 11659 # Used to flag and report bootstrapping failures. 11660 am_rc=0 11661 for am_mf 11662 do 11663 # Strip MF so we end up with the name of the file. 11664 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 11665 # Check whether this is an Automake generated Makefile which includes 11666 # dependency-tracking related rules and includes. 11667 # Grep'ing the whole file directly is not great: AIX grep has a line 11668 # limit of 2048, but all sed's we know have understand at least 4000. 11669 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 11670 || continue 11671 am_dirpart=`AS_DIRNAME(["$am_mf"])` 11672 am_filepart=`AS_BASENAME(["$am_mf"])` 11673 AM_RUN_LOG([cd "$am_dirpart" \ 11674 && sed -e '/# am--include-marker/d' "$am_filepart" \ 11675 | $MAKE -f - am--depfiles]) || am_rc=$? 11676 done 11677 if test $am_rc -ne 0; then 11678 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 11679 for automatic dependency tracking. Try re-running configure with the 11680 '--disable-dependency-tracking' option to at least be able to build 11681 the package (albeit without support for automatic dependency tracking).]) 11682 fi 11683 AS_UNSET([am_dirpart]) 11684 AS_UNSET([am_filepart]) 11685 AS_UNSET([am_mf]) 11686 AS_UNSET([am_rc]) 11687 rm -f conftest-deps.mk 11688} 11689])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11690 11691 11692# AM_OUTPUT_DEPENDENCY_COMMANDS 11693# ----------------------------- 11694# This macro should only be invoked once -- use via AC_REQUIRE. 11695# 11696# This code is only required when automatic dependency tracking is enabled. 11697# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 11698# order to bootstrap the dependency handling code. 11699AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11700[AC_CONFIG_COMMANDS([depfiles], 11701 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11702 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 11703 11704# Do all the work for Automake. -*- Autoconf -*- 11705 11706# Copyright (C) 1996-2018 Free Software Foundation, Inc. 11707# 11708# This file is free software; the Free Software Foundation 11709# gives unlimited permission to copy and/or distribute it, 11710# with or without modifications, as long as this notice is preserved. 11711 11712# This macro actually does too much. Some checks are only needed if 11713# your package does certain things. But this isn't really a big deal. 11714 11715dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11716m4_define([AC_PROG_CC], 11717m4_defn([AC_PROG_CC]) 11718[_AM_PROG_CC_C_O 11719]) 11720 11721# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11722# AM_INIT_AUTOMAKE([OPTIONS]) 11723# ----------------------------------------------- 11724# The call with PACKAGE and VERSION arguments is the old style 11725# call (pre autoconf-2.50), which is being phased out. PACKAGE 11726# and VERSION should now be passed to AC_INIT and removed from 11727# the call to AM_INIT_AUTOMAKE. 11728# We support both call styles for the transition. After 11729# the next Automake release, Autoconf can make the AC_INIT 11730# arguments mandatory, and then we can depend on a new Autoconf 11731# release and drop the old call support. 11732AC_DEFUN([AM_INIT_AUTOMAKE], 11733[AC_PREREQ([2.65])dnl 11734dnl Autoconf wants to disallow AM_ names. We explicitly allow 11735dnl the ones we care about. 11736m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11737AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11738AC_REQUIRE([AC_PROG_INSTALL])dnl 11739if test "`cd $srcdir && pwd`" != "`pwd`"; then 11740 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11741 # is not polluted with repeated "-I." 11742 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11743 # test to see if srcdir already configured 11744 if test -f $srcdir/config.status; then 11745 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11746 fi 11747fi 11748 11749# test whether we have cygpath 11750if test -z "$CYGPATH_W"; then 11751 if (cygpath --version) >/dev/null 2>/dev/null; then 11752 CYGPATH_W='cygpath -w' 11753 else 11754 CYGPATH_W=echo 11755 fi 11756fi 11757AC_SUBST([CYGPATH_W]) 11758 11759# Define the identity of the package. 11760dnl Distinguish between old-style and new-style calls. 11761m4_ifval([$2], 11762[AC_DIAGNOSE([obsolete], 11763 [$0: two- and three-arguments forms are deprecated.]) 11764m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11765 AC_SUBST([PACKAGE], [$1])dnl 11766 AC_SUBST([VERSION], [$2])], 11767[_AM_SET_OPTIONS([$1])dnl 11768dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11769m4_if( 11770 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11771 [ok:ok],, 11772 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11773 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11774 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11775 11776_AM_IF_OPTION([no-define],, 11777[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11778 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11779 11780# Some tools Automake needs. 11781AC_REQUIRE([AM_SANITY_CHECK])dnl 11782AC_REQUIRE([AC_ARG_PROGRAM])dnl 11783AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11784AM_MISSING_PROG([AUTOCONF], [autoconf]) 11785AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11786AM_MISSING_PROG([AUTOHEADER], [autoheader]) 11787AM_MISSING_PROG([MAKEINFO], [makeinfo]) 11788AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11789AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11790AC_REQUIRE([AC_PROG_MKDIR_P])dnl 11791# For better backward compatibility. To be removed once Automake 1.9.x 11792# dies out for good. For more background, see: 11793# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11794# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11795AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11796# We need awk for the "check" target (and possibly the TAP driver). The 11797# system "awk" is bad on some platforms. 11798AC_REQUIRE([AC_PROG_AWK])dnl 11799AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11800AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11801_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11802 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11803 [_AM_PROG_TAR([v7])])]) 11804_AM_IF_OPTION([no-dependencies],, 11805[AC_PROVIDE_IFELSE([AC_PROG_CC], 11806 [_AM_DEPENDENCIES([CC])], 11807 [m4_define([AC_PROG_CC], 11808 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11809AC_PROVIDE_IFELSE([AC_PROG_CXX], 11810 [_AM_DEPENDENCIES([CXX])], 11811 [m4_define([AC_PROG_CXX], 11812 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11813AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11814 [_AM_DEPENDENCIES([OBJC])], 11815 [m4_define([AC_PROG_OBJC], 11816 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11817AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11818 [_AM_DEPENDENCIES([OBJCXX])], 11819 [m4_define([AC_PROG_OBJCXX], 11820 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11821]) 11822AC_REQUIRE([AM_SILENT_RULES])dnl 11823dnl The testsuite driver may need to know about EXEEXT, so add the 11824dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11825dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11826AC_CONFIG_COMMANDS_PRE(dnl 11827[m4_provide_if([_AM_COMPILER_EXEEXT], 11828 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11829 11830# POSIX will say in a future version that running "rm -f" with no argument 11831# is OK; and we want to be able to make that assumption in our Makefile 11832# recipes. So use an aggressive probe to check that the usage we want is 11833# actually supported "in the wild" to an acceptable degree. 11834# See automake bug#10828. 11835# To make any issue more visible, cause the running configure to be aborted 11836# by default if the 'rm' program in use doesn't match our expectations; the 11837# user can still override this though. 11838if rm -f && rm -fr && rm -rf; then : OK; else 11839 cat >&2 <<'END' 11840Oops! 11841 11842Your 'rm' program seems unable to run without file operands specified 11843on the command line, even when the '-f' option is present. This is contrary 11844to the behaviour of most rm programs out there, and not conforming with 11845the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11846 11847Please tell bug-automake@gnu.org about your system, including the value 11848of your $PATH and any error possibly output before this message. This 11849can help us improve future automake versions. 11850 11851END 11852 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11853 echo 'Configuration will proceed anyway, since you have set the' >&2 11854 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11855 echo >&2 11856 else 11857 cat >&2 <<'END' 11858Aborting the configuration process, to ensure you take notice of the issue. 11859 11860You can download and install GNU coreutils to get an 'rm' implementation 11861that behaves properly: <https://www.gnu.org/software/coreutils/>. 11862 11863If you want to complete the configuration process using your problematic 11864'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11865to "yes", and re-run configure. 11866 11867END 11868 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11869 fi 11870fi 11871dnl The trailing newline in this macro's definition is deliberate, for 11872dnl backward compatibility and to allow trailing 'dnl'-style comments 11873dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11874]) 11875 11876dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11877dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11878dnl mangled by Autoconf and run in a shell conditional statement. 11879m4_define([_AC_COMPILER_EXEEXT], 11880m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11881 11882# When config.status generates a header, we must update the stamp-h file. 11883# This file resides in the same directory as the config header 11884# that is generated. The stamp files are numbered to have different names. 11885 11886# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11887# loop where config.status creates the headers, so we can generate 11888# our stamp files there. 11889AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11890[# Compute $1's index in $config_headers. 11891_am_arg=$1 11892_am_stamp_count=1 11893for _am_header in $config_headers :; do 11894 case $_am_header in 11895 $_am_arg | $_am_arg:* ) 11896 break ;; 11897 * ) 11898 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11899 esac 11900done 11901echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11902 11903# Copyright (C) 2001-2018 Free Software Foundation, Inc. 11904# 11905# This file is free software; the Free Software Foundation 11906# gives unlimited permission to copy and/or distribute it, 11907# with or without modifications, as long as this notice is preserved. 11908 11909# AM_PROG_INSTALL_SH 11910# ------------------ 11911# Define $install_sh. 11912AC_DEFUN([AM_PROG_INSTALL_SH], 11913[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11914if test x"${install_sh+set}" != xset; then 11915 case $am_aux_dir in 11916 *\ * | *\ *) 11917 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11918 *) 11919 install_sh="\${SHELL} $am_aux_dir/install-sh" 11920 esac 11921fi 11922AC_SUBST([install_sh])]) 11923 11924# Copyright (C) 2003-2018 Free Software Foundation, Inc. 11925# 11926# This file is free software; the Free Software Foundation 11927# gives unlimited permission to copy and/or distribute it, 11928# with or without modifications, as long as this notice is preserved. 11929 11930# Check whether the underlying file-system supports filenames 11931# with a leading dot. For instance MS-DOS doesn't. 11932AC_DEFUN([AM_SET_LEADING_DOT], 11933[rm -rf .tst 2>/dev/null 11934mkdir .tst 2>/dev/null 11935if test -d .tst; then 11936 am__leading_dot=. 11937else 11938 am__leading_dot=_ 11939fi 11940rmdir .tst 2>/dev/null 11941AC_SUBST([am__leading_dot])]) 11942 11943# Check to see how 'make' treats includes. -*- Autoconf -*- 11944 11945# Copyright (C) 2001-2018 Free Software Foundation, Inc. 11946# 11947# This file is free software; the Free Software Foundation 11948# gives unlimited permission to copy and/or distribute it, 11949# with or without modifications, as long as this notice is preserved. 11950 11951# AM_MAKE_INCLUDE() 11952# ----------------- 11953# Check whether make has an 'include' directive that can support all 11954# the idioms we need for our automatic dependency tracking code. 11955AC_DEFUN([AM_MAKE_INCLUDE], 11956[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 11957cat > confinc.mk << 'END' 11958am__doit: 11959 @echo this is the am__doit target >confinc.out 11960.PHONY: am__doit 11961END 11962am__include="#" 11963am__quote= 11964# BSD make does it like this. 11965echo '.include "confinc.mk" # ignored' > confmf.BSD 11966# Other make implementations (GNU, Solaris 10, AIX) do it like this. 11967echo 'include confinc.mk # ignored' > confmf.GNU 11968_am_result=no 11969for s in GNU BSD; do 11970 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 11971 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 11972 ['0:this is the am__doit target'], 11973 [AS_CASE([$s], 11974 [BSD], [am__include='.include' am__quote='"'], 11975 [am__include='include' am__quote=''])]) 11976 if test "$am__include" != "#"; then 11977 _am_result="yes ($s style)" 11978 break 11979 fi 11980done 11981rm -f confinc.* confmf.* 11982AC_MSG_RESULT([${_am_result}]) 11983AC_SUBST([am__include])]) 11984AC_SUBST([am__quote])]) 11985 11986# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11987 11988# Copyright (C) 1997-2018 Free Software Foundation, Inc. 11989# 11990# This file is free software; the Free Software Foundation 11991# gives unlimited permission to copy and/or distribute it, 11992# with or without modifications, as long as this notice is preserved. 11993 11994# AM_MISSING_PROG(NAME, PROGRAM) 11995# ------------------------------ 11996AC_DEFUN([AM_MISSING_PROG], 11997[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11998$1=${$1-"${am_missing_run}$2"} 11999AC_SUBST($1)]) 12000 12001# AM_MISSING_HAS_RUN 12002# ------------------ 12003# Define MISSING if not defined so far and test if it is modern enough. 12004# If it is, set am_missing_run to use it, otherwise, to nothing. 12005AC_DEFUN([AM_MISSING_HAS_RUN], 12006[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12007AC_REQUIRE_AUX_FILE([missing])dnl 12008if test x"${MISSING+set}" != xset; then 12009 case $am_aux_dir in 12010 *\ * | *\ *) 12011 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12012 *) 12013 MISSING="\${SHELL} $am_aux_dir/missing" ;; 12014 esac 12015fi 12016# Use eval to expand $SHELL 12017if eval "$MISSING --is-lightweight"; then 12018 am_missing_run="$MISSING " 12019else 12020 am_missing_run= 12021 AC_MSG_WARN(['missing' script is too old or missing]) 12022fi 12023]) 12024 12025# Helper functions for option handling. -*- Autoconf -*- 12026 12027# Copyright (C) 2001-2018 Free Software Foundation, Inc. 12028# 12029# This file is free software; the Free Software Foundation 12030# gives unlimited permission to copy and/or distribute it, 12031# with or without modifications, as long as this notice is preserved. 12032 12033# _AM_MANGLE_OPTION(NAME) 12034# ----------------------- 12035AC_DEFUN([_AM_MANGLE_OPTION], 12036[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12037 12038# _AM_SET_OPTION(NAME) 12039# -------------------- 12040# Set option NAME. Presently that only means defining a flag for this option. 12041AC_DEFUN([_AM_SET_OPTION], 12042[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12043 12044# _AM_SET_OPTIONS(OPTIONS) 12045# ------------------------ 12046# OPTIONS is a space-separated list of Automake options. 12047AC_DEFUN([_AM_SET_OPTIONS], 12048[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12049 12050# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12051# ------------------------------------------- 12052# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12053AC_DEFUN([_AM_IF_OPTION], 12054[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12055 12056# Copyright (C) 1999-2018 Free Software Foundation, Inc. 12057# 12058# This file is free software; the Free Software Foundation 12059# gives unlimited permission to copy and/or distribute it, 12060# with or without modifications, as long as this notice is preserved. 12061 12062# _AM_PROG_CC_C_O 12063# --------------- 12064# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12065# to automatically call this. 12066AC_DEFUN([_AM_PROG_CC_C_O], 12067[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12068AC_REQUIRE_AUX_FILE([compile])dnl 12069AC_LANG_PUSH([C])dnl 12070AC_CACHE_CHECK( 12071 [whether $CC understands -c and -o together], 12072 [am_cv_prog_cc_c_o], 12073 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12074 # Make sure it works both with $CC and with simple cc. 12075 # Following AC_PROG_CC_C_O, we do the test twice because some 12076 # compilers refuse to overwrite an existing .o file with -o, 12077 # though they will create one. 12078 am_cv_prog_cc_c_o=yes 12079 for am_i in 1 2; do 12080 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12081 && test -f conftest2.$ac_objext; then 12082 : OK 12083 else 12084 am_cv_prog_cc_c_o=no 12085 break 12086 fi 12087 done 12088 rm -f core conftest* 12089 unset am_i]) 12090if test "$am_cv_prog_cc_c_o" != yes; then 12091 # Losing compiler, so override with the script. 12092 # FIXME: It is wrong to rewrite CC. 12093 # But if we don't then we get into trouble of one sort or another. 12094 # A longer-term fix would be to have automake use am__CC in this case, 12095 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12096 CC="$am_aux_dir/compile $CC" 12097fi 12098AC_LANG_POP([C])]) 12099 12100# For backward compatibility. 12101AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12102 12103# Copyright (C) 2001-2018 Free Software Foundation, Inc. 12104# 12105# This file is free software; the Free Software Foundation 12106# gives unlimited permission to copy and/or distribute it, 12107# with or without modifications, as long as this notice is preserved. 12108 12109# AM_RUN_LOG(COMMAND) 12110# ------------------- 12111# Run COMMAND, save the exit status in ac_status, and log it. 12112# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12113AC_DEFUN([AM_RUN_LOG], 12114[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12115 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12116 ac_status=$? 12117 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12118 (exit $ac_status); }]) 12119 12120# Check to make sure that the build environment is sane. -*- Autoconf -*- 12121 12122# Copyright (C) 1996-2018 Free Software Foundation, Inc. 12123# 12124# This file is free software; the Free Software Foundation 12125# gives unlimited permission to copy and/or distribute it, 12126# with or without modifications, as long as this notice is preserved. 12127 12128# AM_SANITY_CHECK 12129# --------------- 12130AC_DEFUN([AM_SANITY_CHECK], 12131[AC_MSG_CHECKING([whether build environment is sane]) 12132# Reject unsafe characters in $srcdir or the absolute working directory 12133# name. Accept space and tab only in the latter. 12134am_lf=' 12135' 12136case `pwd` in 12137 *[[\\\"\#\$\&\'\`$am_lf]]*) 12138 AC_MSG_ERROR([unsafe absolute working directory name]);; 12139esac 12140case $srcdir in 12141 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12142 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12143esac 12144 12145# Do 'set' in a subshell so we don't clobber the current shell's 12146# arguments. Must try -L first in case configure is actually a 12147# symlink; some systems play weird games with the mod time of symlinks 12148# (eg FreeBSD returns the mod time of the symlink's containing 12149# directory). 12150if ( 12151 am_has_slept=no 12152 for am_try in 1 2; do 12153 echo "timestamp, slept: $am_has_slept" > conftest.file 12154 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12155 if test "$[*]" = "X"; then 12156 # -L didn't work. 12157 set X `ls -t "$srcdir/configure" conftest.file` 12158 fi 12159 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12160 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12161 12162 # If neither matched, then we have a broken ls. This can happen 12163 # if, for instance, CONFIG_SHELL is bash and it inherits a 12164 # broken ls alias from the environment. This has actually 12165 # happened. Such a system could not be considered "sane". 12166 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12167 alias in your environment]) 12168 fi 12169 if test "$[2]" = conftest.file || test $am_try -eq 2; then 12170 break 12171 fi 12172 # Just in case. 12173 sleep 1 12174 am_has_slept=yes 12175 done 12176 test "$[2]" = conftest.file 12177 ) 12178then 12179 # Ok. 12180 : 12181else 12182 AC_MSG_ERROR([newly created file is older than distributed files! 12183Check your system clock]) 12184fi 12185AC_MSG_RESULT([yes]) 12186# If we didn't sleep, we still need to ensure time stamps of config.status and 12187# generated files are strictly newer. 12188am_sleep_pid= 12189if grep 'slept: no' conftest.file >/dev/null 2>&1; then 12190 ( sleep 1 ) & 12191 am_sleep_pid=$! 12192fi 12193AC_CONFIG_COMMANDS_PRE( 12194 [AC_MSG_CHECKING([that generated files are newer than configure]) 12195 if test -n "$am_sleep_pid"; then 12196 # Hide warnings about reused PIDs. 12197 wait $am_sleep_pid 2>/dev/null 12198 fi 12199 AC_MSG_RESULT([done])]) 12200rm -f conftest.file 12201]) 12202 12203# Copyright (C) 2009-2018 Free Software Foundation, Inc. 12204# 12205# This file is free software; the Free Software Foundation 12206# gives unlimited permission to copy and/or distribute it, 12207# with or without modifications, as long as this notice is preserved. 12208 12209# AM_SILENT_RULES([DEFAULT]) 12210# -------------------------- 12211# Enable less verbose build rules; with the default set to DEFAULT 12212# ("yes" being less verbose, "no" or empty being verbose). 12213AC_DEFUN([AM_SILENT_RULES], 12214[AC_ARG_ENABLE([silent-rules], [dnl 12215AS_HELP_STRING( 12216 [--enable-silent-rules], 12217 [less verbose build output (undo: "make V=1")]) 12218AS_HELP_STRING( 12219 [--disable-silent-rules], 12220 [verbose build output (undo: "make V=0")])dnl 12221]) 12222case $enable_silent_rules in @%:@ ((( 12223 yes) AM_DEFAULT_VERBOSITY=0;; 12224 no) AM_DEFAULT_VERBOSITY=1;; 12225 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12226esac 12227dnl 12228dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12229dnl do not support nested variable expansions. 12230dnl See automake bug#9928 and bug#10237. 12231am_make=${MAKE-make} 12232AC_CACHE_CHECK([whether $am_make supports nested variables], 12233 [am_cv_make_support_nested_variables], 12234 [if AS_ECHO([['TRUE=$(BAR$(V)) 12235BAR0=false 12236BAR1=true 12237V=1 12238am__doit: 12239 @$(TRUE) 12240.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12241 am_cv_make_support_nested_variables=yes 12242else 12243 am_cv_make_support_nested_variables=no 12244fi]) 12245if test $am_cv_make_support_nested_variables = yes; then 12246 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12247 AM_V='$(V)' 12248 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12249else 12250 AM_V=$AM_DEFAULT_VERBOSITY 12251 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12252fi 12253AC_SUBST([AM_V])dnl 12254AM_SUBST_NOTMAKE([AM_V])dnl 12255AC_SUBST([AM_DEFAULT_V])dnl 12256AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12257AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12258AM_BACKSLASH='\' 12259AC_SUBST([AM_BACKSLASH])dnl 12260_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12261]) 12262 12263# Copyright (C) 2001-2018 Free Software Foundation, Inc. 12264# 12265# This file is free software; the Free Software Foundation 12266# gives unlimited permission to copy and/or distribute it, 12267# with or without modifications, as long as this notice is preserved. 12268 12269# AM_PROG_INSTALL_STRIP 12270# --------------------- 12271# One issue with vendor 'install' (even GNU) is that you can't 12272# specify the program used to strip binaries. This is especially 12273# annoying in cross-compiling environments, where the build's strip 12274# is unlikely to handle the host's binaries. 12275# Fortunately install-sh will honor a STRIPPROG variable, so we 12276# always use install-sh in "make install-strip", and initialize 12277# STRIPPROG with the value of the STRIP variable (set by the user). 12278AC_DEFUN([AM_PROG_INSTALL_STRIP], 12279[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12280# Installed binaries are usually stripped using 'strip' when the user 12281# run "make install-strip". However 'strip' might not be the right 12282# tool to use in cross-compilation environments, therefore Automake 12283# will honor the 'STRIP' environment variable to overrule this program. 12284dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12285if test "$cross_compiling" != no; then 12286 AC_CHECK_TOOL([STRIP], [strip], :) 12287fi 12288INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12289AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12290 12291# Copyright (C) 2006-2018 Free Software Foundation, Inc. 12292# 12293# This file is free software; the Free Software Foundation 12294# gives unlimited permission to copy and/or distribute it, 12295# with or without modifications, as long as this notice is preserved. 12296 12297# _AM_SUBST_NOTMAKE(VARIABLE) 12298# --------------------------- 12299# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12300# This macro is traced by Automake. 12301AC_DEFUN([_AM_SUBST_NOTMAKE]) 12302 12303# AM_SUBST_NOTMAKE(VARIABLE) 12304# -------------------------- 12305# Public sister of _AM_SUBST_NOTMAKE. 12306AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12307 12308# Check how to create a tarball. -*- Autoconf -*- 12309 12310# Copyright (C) 2004-2018 Free Software Foundation, Inc. 12311# 12312# This file is free software; the Free Software Foundation 12313# gives unlimited permission to copy and/or distribute it, 12314# with or without modifications, as long as this notice is preserved. 12315 12316# _AM_PROG_TAR(FORMAT) 12317# -------------------- 12318# Check how to create a tarball in format FORMAT. 12319# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12320# 12321# Substitute a variable $(am__tar) that is a command 12322# writing to stdout a FORMAT-tarball containing the directory 12323# $tardir. 12324# tardir=directory && $(am__tar) > result.tar 12325# 12326# Substitute a variable $(am__untar) that extract such 12327# a tarball read from stdin. 12328# $(am__untar) < result.tar 12329# 12330AC_DEFUN([_AM_PROG_TAR], 12331[# Always define AMTAR for backward compatibility. Yes, it's still used 12332# in the wild :-( We should find a proper way to deprecate it ... 12333AC_SUBST([AMTAR], ['$${TAR-tar}']) 12334 12335# We'll loop over all known methods to create a tar archive until one works. 12336_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12337 12338m4_if([$1], [v7], 12339 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12340 12341 [m4_case([$1], 12342 [ustar], 12343 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12344 # There is notably a 21 bits limit for the UID and the GID. In fact, 12345 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12346 # and bug#13588). 12347 am_max_uid=2097151 # 2^21 - 1 12348 am_max_gid=$am_max_uid 12349 # The $UID and $GID variables are not portable, so we need to resort 12350 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12351 # below are definitely unexpected, so allow the users to see them 12352 # (that is, avoid stderr redirection). 12353 am_uid=`id -u || echo unknown` 12354 am_gid=`id -g || echo unknown` 12355 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12356 if test $am_uid -le $am_max_uid; then 12357 AC_MSG_RESULT([yes]) 12358 else 12359 AC_MSG_RESULT([no]) 12360 _am_tools=none 12361 fi 12362 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12363 if test $am_gid -le $am_max_gid; then 12364 AC_MSG_RESULT([yes]) 12365 else 12366 AC_MSG_RESULT([no]) 12367 _am_tools=none 12368 fi], 12369 12370 [pax], 12371 [], 12372 12373 [m4_fatal([Unknown tar format])]) 12374 12375 AC_MSG_CHECKING([how to create a $1 tar archive]) 12376 12377 # Go ahead even if we have the value already cached. We do so because we 12378 # need to set the values for the 'am__tar' and 'am__untar' variables. 12379 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12380 12381 for _am_tool in $_am_tools; do 12382 case $_am_tool in 12383 gnutar) 12384 for _am_tar in tar gnutar gtar; do 12385 AM_RUN_LOG([$_am_tar --version]) && break 12386 done 12387 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12388 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12389 am__untar="$_am_tar -xf -" 12390 ;; 12391 plaintar) 12392 # Must skip GNU tar: if it does not support --format= it doesn't create 12393 # ustar tarball either. 12394 (tar --version) >/dev/null 2>&1 && continue 12395 am__tar='tar chf - "$$tardir"' 12396 am__tar_='tar chf - "$tardir"' 12397 am__untar='tar xf -' 12398 ;; 12399 pax) 12400 am__tar='pax -L -x $1 -w "$$tardir"' 12401 am__tar_='pax -L -x $1 -w "$tardir"' 12402 am__untar='pax -r' 12403 ;; 12404 cpio) 12405 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12406 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12407 am__untar='cpio -i -H $1 -d' 12408 ;; 12409 none) 12410 am__tar=false 12411 am__tar_=false 12412 am__untar=false 12413 ;; 12414 esac 12415 12416 # If the value was cached, stop now. We just wanted to have am__tar 12417 # and am__untar set. 12418 test -n "${am_cv_prog_tar_$1}" && break 12419 12420 # tar/untar a dummy directory, and stop if the command works. 12421 rm -rf conftest.dir 12422 mkdir conftest.dir 12423 echo GrepMe > conftest.dir/file 12424 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12425 rm -rf conftest.dir 12426 if test -s conftest.tar; then 12427 AM_RUN_LOG([$am__untar <conftest.tar]) 12428 AM_RUN_LOG([cat conftest.dir/file]) 12429 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12430 fi 12431 done 12432 rm -rf conftest.dir 12433 12434 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12435 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12436 12437AC_SUBST([am__tar]) 12438AC_SUBST([am__untar]) 12439]) # _AM_PROG_TAR 12440 12441