aclocal.m4 revision e2463426
1# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 2 3# Copyright (C) 1996-2013 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-2014 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_CC_BASENAME(CC) 129# ------------------- 130# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 131m4_defun([_LT_CC_BASENAME], 132[for cc_temp in $1""; do 133 case $cc_temp in 134 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 135 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 136 \-*) ;; 137 *) break;; 138 esac 139done 140cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 141]) 142 143 144# _LT_FILEUTILS_DEFAULTS 145# ---------------------- 146# It is okay to use these file commands and assume they have been set 147# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 148m4_defun([_LT_FILEUTILS_DEFAULTS], 149[: ${CP="cp -f"} 150: ${MV="mv -f"} 151: ${RM="rm -f"} 152])# _LT_FILEUTILS_DEFAULTS 153 154 155# _LT_SETUP 156# --------- 157m4_defun([_LT_SETUP], 158[AC_REQUIRE([AC_CANONICAL_HOST])dnl 159AC_REQUIRE([AC_CANONICAL_BUILD])dnl 160AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 161AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 162 163_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 164dnl 165_LT_DECL([], [host_alias], [0], [The host system])dnl 166_LT_DECL([], [host], [0])dnl 167_LT_DECL([], [host_os], [0])dnl 168dnl 169_LT_DECL([], [build_alias], [0], [The build system])dnl 170_LT_DECL([], [build], [0])dnl 171_LT_DECL([], [build_os], [0])dnl 172dnl 173AC_REQUIRE([AC_PROG_CC])dnl 174AC_REQUIRE([LT_PATH_LD])dnl 175AC_REQUIRE([LT_PATH_NM])dnl 176dnl 177AC_REQUIRE([AC_PROG_LN_S])dnl 178test -z "$LN_S" && LN_S="ln -s" 179_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 180dnl 181AC_REQUIRE([LT_CMD_MAX_LEN])dnl 182_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 183_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 184dnl 185m4_require([_LT_FILEUTILS_DEFAULTS])dnl 186m4_require([_LT_CHECK_SHELL_FEATURES])dnl 187m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 188m4_require([_LT_CMD_RELOAD])dnl 189m4_require([_LT_CHECK_MAGIC_METHOD])dnl 190m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 191m4_require([_LT_CMD_OLD_ARCHIVE])dnl 192m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 193m4_require([_LT_WITH_SYSROOT])dnl 194m4_require([_LT_CMD_TRUNCATE])dnl 195 196_LT_CONFIG_LIBTOOL_INIT([ 197# See if we are running on zsh, and set the options that allow our 198# commands through without removal of \ escapes INIT. 199if test -n "\${ZSH_VERSION+set}"; then 200 setopt NO_GLOB_SUBST 201fi 202]) 203if test -n "${ZSH_VERSION+set}"; then 204 setopt NO_GLOB_SUBST 205fi 206 207_LT_CHECK_OBJDIR 208 209m4_require([_LT_TAG_COMPILER])dnl 210 211case $host_os in 212aix3*) 213 # AIX sometimes has problems with the GCC collect2 program. For some 214 # reason, if we set the COLLECT_NAMES environment variable, the problems 215 # vanish in a puff of smoke. 216 if test set != "${COLLECT_NAMES+set}"; then 217 COLLECT_NAMES= 218 export COLLECT_NAMES 219 fi 220 ;; 221esac 222 223# Global variables: 224ofile=libtool 225can_build_shared=yes 226 227# All known linkers require a '.a' archive for static linking (except MSVC, 228# which needs '.lib'). 229libext=a 230 231with_gnu_ld=$lt_cv_prog_gnu_ld 232 233old_CC=$CC 234old_CFLAGS=$CFLAGS 235 236# Set sane defaults for various variables 237test -z "$CC" && CC=cc 238test -z "$LTCC" && LTCC=$CC 239test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 240test -z "$LD" && LD=ld 241test -z "$ac_objext" && ac_objext=o 242 243_LT_CC_BASENAME([$compiler]) 244 245# Only perform the check for file, if the check method requires it 246test -z "$MAGIC_CMD" && MAGIC_CMD=file 247case $deplibs_check_method in 248file_magic*) 249 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 250 _LT_PATH_MAGIC 251 fi 252 ;; 253esac 254 255# Use C for the default configuration in the libtool script 256LT_SUPPORTED_TAG([CC]) 257_LT_LANG_C_CONFIG 258_LT_LANG_DEFAULT_CONFIG 259_LT_CONFIG_COMMANDS 260])# _LT_SETUP 261 262 263# _LT_PREPARE_SED_QUOTE_VARS 264# -------------------------- 265# Define a few sed substitution that help us do robust quoting. 266m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 267[# Backslashify metacharacters that are still active within 268# double-quoted strings. 269sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 270 271# Same as above, but do not quote variable references. 272double_quote_subst='s/\([["`\\]]\)/\\\1/g' 273 274# Sed substitution to delay expansion of an escaped shell variable in a 275# double_quote_subst'ed string. 276delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 277 278# Sed substitution to delay expansion of an escaped single quote. 279delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 280 281# Sed substitution to avoid accidental globbing in evaled expressions 282no_glob_subst='s/\*/\\\*/g' 283]) 284 285# _LT_PROG_LTMAIN 286# --------------- 287# Note that this code is called both from 'configure', and 'config.status' 288# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 289# 'config.status' has no value for ac_aux_dir unless we are using Automake, 290# so we pass a copy along to make sure it has a sensible value anyway. 291m4_defun([_LT_PROG_LTMAIN], 292[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 293_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 294ltmain=$ac_aux_dir/ltmain.sh 295])# _LT_PROG_LTMAIN 296 297 298 299# So that we can recreate a full libtool script including additional 300# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301# in macros and then make a single call at the end using the 'libtool' 302# label. 303 304 305# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306# ---------------------------------------- 307# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308m4_define([_LT_CONFIG_LIBTOOL_INIT], 309[m4_ifval([$1], 310 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311 [$1 312])])]) 313 314# Initialize. 315m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 316 317 318# _LT_CONFIG_LIBTOOL([COMMANDS]) 319# ------------------------------ 320# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321m4_define([_LT_CONFIG_LIBTOOL], 322[m4_ifval([$1], 323 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324 [$1 325])])]) 326 327# Initialize. 328m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 329 330 331# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332# ----------------------------------------------------- 333m4_defun([_LT_CONFIG_SAVE_COMMANDS], 334[_LT_CONFIG_LIBTOOL([$1]) 335_LT_CONFIG_LIBTOOL_INIT([$2]) 336]) 337 338 339# _LT_FORMAT_COMMENT([COMMENT]) 340# ----------------------------- 341# Add leading comment marks to the start of each line, and a trailing 342# full-stop to the whole comment if one is not present already. 343m4_define([_LT_FORMAT_COMMENT], 344[m4_ifval([$1], [ 345m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347)]) 348 349 350 351 352 353# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 354# ------------------------------------------------------------------- 355# CONFIGNAME is the name given to the value in the libtool script. 356# VARNAME is the (base) name used in the configure script. 357# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 358# VARNAME. Any other value will be used directly. 359m4_define([_LT_DECL], 360[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 361 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 362 [m4_ifval([$1], [$1], [$2])]) 363 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 364 m4_ifval([$4], 365 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 366 lt_dict_add_subkey([lt_decl_dict], [$2], 367 [tagged?], [m4_ifval([$5], [yes], [no])])]) 368]) 369 370 371# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 372# -------------------------------------------------------- 373m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 374 375 376# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 377# ------------------------------------------------ 378m4_define([lt_decl_tag_varnames], 379[_lt_decl_filter([tagged?], [yes], $@)]) 380 381 382# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 383# --------------------------------------------------------- 384m4_define([_lt_decl_filter], 385[m4_case([$#], 386 [0], [m4_fatal([$0: too few arguments: $#])], 387 [1], [m4_fatal([$0: too few arguments: $#: $1])], 388 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 389 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 390 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 391]) 392 393 394# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 395# -------------------------------------------------- 396m4_define([lt_decl_quote_varnames], 397[_lt_decl_filter([value], [1], $@)]) 398 399 400# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 401# --------------------------------------------------- 402m4_define([lt_decl_dquote_varnames], 403[_lt_decl_filter([value], [2], $@)]) 404 405 406# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 407# --------------------------------------------------- 408m4_define([lt_decl_varnames_tagged], 409[m4_assert([$# <= 2])dnl 410_$0(m4_quote(m4_default([$1], [[, ]])), 411 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 412 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 413m4_define([_lt_decl_varnames_tagged], 414[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 415 416 417# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 418# ------------------------------------------------ 419m4_define([lt_decl_all_varnames], 420[_$0(m4_quote(m4_default([$1], [[, ]])), 421 m4_if([$2], [], 422 m4_quote(lt_decl_varnames), 423 m4_quote(m4_shift($@))))[]dnl 424]) 425m4_define([_lt_decl_all_varnames], 426[lt_join($@, lt_decl_varnames_tagged([$1], 427 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 428]) 429 430 431# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 432# ------------------------------------ 433# Quote a variable value, and forward it to 'config.status' so that its 434# declaration there will have the same value as in 'configure'. VARNAME 435# must have a single quote delimited value for this to work. 436m4_define([_LT_CONFIG_STATUS_DECLARE], 437[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 438 439 440# _LT_CONFIG_STATUS_DECLARATIONS 441# ------------------------------ 442# We delimit libtool config variables with single quotes, so when 443# we write them to config.status, we have to be sure to quote all 444# embedded single quotes properly. In configure, this macro expands 445# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 446# 447# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 448m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 449[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 450 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 451 452 453# _LT_LIBTOOL_TAGS 454# ---------------- 455# Output comment and list of tags supported by the script 456m4_defun([_LT_LIBTOOL_TAGS], 457[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 458available_tags='_LT_TAGS'dnl 459]) 460 461 462# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 463# ----------------------------------- 464# Extract the dictionary values for VARNAME (optionally with TAG) and 465# expand to a commented shell variable setting: 466# 467# # Some comment about what VAR is for. 468# visible_name=$lt_internal_name 469m4_define([_LT_LIBTOOL_DECLARE], 470[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 471 [description])))[]dnl 472m4_pushdef([_libtool_name], 473 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 474m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 475 [0], [_libtool_name=[$]$1], 476 [1], [_libtool_name=$lt_[]$1], 477 [2], [_libtool_name=$lt_[]$1], 478 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 479m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 480]) 481 482 483# _LT_LIBTOOL_CONFIG_VARS 484# ----------------------- 485# Produce commented declarations of non-tagged libtool config variables 486# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 487# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 488# section) are produced by _LT_LIBTOOL_TAG_VARS. 489m4_defun([_LT_LIBTOOL_CONFIG_VARS], 490[m4_foreach([_lt_var], 491 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 492 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 493 494 495# _LT_LIBTOOL_TAG_VARS(TAG) 496# ------------------------- 497m4_define([_LT_LIBTOOL_TAG_VARS], 498[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 499 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 500 501 502# _LT_TAGVAR(VARNAME, [TAGNAME]) 503# ------------------------------ 504m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 505 506 507# _LT_CONFIG_COMMANDS 508# ------------------- 509# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 510# variables for single and double quote escaping we saved from calls 511# to _LT_DECL, we can put quote escaped variables declarations 512# into 'config.status', and then the shell code to quote escape them in 513# for loops in 'config.status'. Finally, any additional code accumulated 514# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 515m4_defun([_LT_CONFIG_COMMANDS], 516[AC_PROVIDE_IFELSE([LT_OUTPUT], 517 dnl If the libtool generation code has been placed in $CONFIG_LT, 518 dnl instead of duplicating it all over again into config.status, 519 dnl then we will have config.status run $CONFIG_LT later, so it 520 dnl needs to know what name is stored there: 521 [AC_CONFIG_COMMANDS([libtool], 522 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 523 dnl If the libtool generation code is destined for config.status, 524 dnl expand the accumulated commands and init code now: 525 [AC_CONFIG_COMMANDS([libtool], 526 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 527])#_LT_CONFIG_COMMANDS 528 529 530# Initialize. 531m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 532[ 533 534# The HP-UX ksh and POSIX shell print the target directory to stdout 535# if CDPATH is set. 536(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 537 538sed_quote_subst='$sed_quote_subst' 539double_quote_subst='$double_quote_subst' 540delay_variable_subst='$delay_variable_subst' 541_LT_CONFIG_STATUS_DECLARATIONS 542LTCC='$LTCC' 543LTCFLAGS='$LTCFLAGS' 544compiler='$compiler_DEFAULT' 545 546# A function that is used when there is no print builtin or printf. 547func_fallback_echo () 548{ 549 eval 'cat <<_LTECHO_EOF 550\$[]1 551_LTECHO_EOF' 552} 553 554# Quote evaled strings. 555for var in lt_decl_all_varnames([[ \ 556]], lt_decl_quote_varnames); do 557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 558 *[[\\\\\\\`\\"\\\$]]*) 559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 560 ;; 561 *) 562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 563 ;; 564 esac 565done 566 567# Double-quote double-evaled strings. 568for var in lt_decl_all_varnames([[ \ 569]], lt_decl_dquote_varnames); do 570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 571 *[[\\\\\\\`\\"\\\$]]*) 572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 573 ;; 574 *) 575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 576 ;; 577 esac 578done 579 580_LT_OUTPUT_LIBTOOL_INIT 581]) 582 583# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 584# ------------------------------------ 585# Generate a child script FILE with all initialization necessary to 586# reuse the environment learned by the parent script, and make the 587# file executable. If COMMENT is supplied, it is inserted after the 588# '#!' sequence but before initialization text begins. After this 589# macro, additional text can be appended to FILE to form the body of 590# the child script. The macro ends with non-zero status if the 591# file could not be fully written (such as if the disk is full). 592m4_ifdef([AS_INIT_GENERATED], 593[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 594[m4_defun([_LT_GENERATED_FILE_INIT], 595[m4_require([AS_PREPARE])]dnl 596[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 597[lt_write_fail=0 598cat >$1 <<_ASEOF || lt_write_fail=1 599#! $SHELL 600# Generated by $as_me. 601$2 602SHELL=\${CONFIG_SHELL-$SHELL} 603export SHELL 604_ASEOF 605cat >>$1 <<\_ASEOF || lt_write_fail=1 606AS_SHELL_SANITIZE 607_AS_PREPARE 608exec AS_MESSAGE_FD>&1 609_ASEOF 610test 0 = "$lt_write_fail" && chmod +x $1[]dnl 611m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 612 613# LT_OUTPUT 614# --------- 615# This macro allows early generation of the libtool script (before 616# AC_OUTPUT is called), incase it is used in configure for compilation 617# tests. 618AC_DEFUN([LT_OUTPUT], 619[: ${CONFIG_LT=./config.lt} 620AC_MSG_NOTICE([creating $CONFIG_LT]) 621_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 622[# Run this file to recreate a libtool stub with the current configuration.]) 623 624cat >>"$CONFIG_LT" <<\_LTEOF 625lt_cl_silent=false 626exec AS_MESSAGE_LOG_FD>>config.log 627{ 628 echo 629 AS_BOX([Running $as_me.]) 630} >&AS_MESSAGE_LOG_FD 631 632lt_cl_help="\ 633'$as_me' creates a local libtool stub from the current configuration, 634for use in further configure time tests before the real libtool is 635generated. 636 637Usage: $[0] [[OPTIONS]] 638 639 -h, --help print this help, then exit 640 -V, --version print version number, then exit 641 -q, --quiet do not print progress messages 642 -d, --debug don't remove temporary files 643 644Report bugs to <bug-libtool@gnu.org>." 645 646lt_cl_version="\ 647m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 648m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 649configured by $[0], generated by m4_PACKAGE_STRING. 650 651Copyright (C) 2011 Free Software Foundation, Inc. 652This config.lt script is free software; the Free Software Foundation 653gives unlimited permision to copy, distribute and modify it." 654 655while test 0 != $[#] 656do 657 case $[1] in 658 --version | --v* | -V ) 659 echo "$lt_cl_version"; exit 0 ;; 660 --help | --h* | -h ) 661 echo "$lt_cl_help"; exit 0 ;; 662 --debug | --d* | -d ) 663 debug=: ;; 664 --quiet | --q* | --silent | --s* | -q ) 665 lt_cl_silent=: ;; 666 667 -*) AC_MSG_ERROR([unrecognized option: $[1] 668Try '$[0] --help' for more information.]) ;; 669 670 *) AC_MSG_ERROR([unrecognized argument: $[1] 671Try '$[0] --help' for more information.]) ;; 672 esac 673 shift 674done 675 676if $lt_cl_silent; then 677 exec AS_MESSAGE_FD>/dev/null 678fi 679_LTEOF 680 681cat >>"$CONFIG_LT" <<_LTEOF 682_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 683_LTEOF 684 685cat >>"$CONFIG_LT" <<\_LTEOF 686AC_MSG_NOTICE([creating $ofile]) 687_LT_OUTPUT_LIBTOOL_COMMANDS 688AS_EXIT(0) 689_LTEOF 690chmod +x "$CONFIG_LT" 691 692# configure is writing to config.log, but config.lt does its own redirection, 693# appending to config.log, which fails on DOS, as config.log is still kept 694# open by configure. Here we exec the FD to /dev/null, effectively closing 695# config.log, so it can be properly (re)opened and appended to by config.lt. 696lt_cl_success=: 697test yes = "$silent" && 698 lt_config_lt_args="$lt_config_lt_args --quiet" 699exec AS_MESSAGE_LOG_FD>/dev/null 700$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 701exec AS_MESSAGE_LOG_FD>>config.log 702$lt_cl_success || AS_EXIT(1) 703])# LT_OUTPUT 704 705 706# _LT_CONFIG(TAG) 707# --------------- 708# If TAG is the built-in tag, create an initial libtool script with a 709# default configuration from the untagged config vars. Otherwise add code 710# to config.status for appending the configuration named by TAG from the 711# matching tagged config vars. 712m4_defun([_LT_CONFIG], 713[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 714_LT_CONFIG_SAVE_COMMANDS([ 715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 716 m4_if(_LT_TAG, [C], [ 717 # See if we are running on zsh, and set the options that allow our 718 # commands through without removal of \ escapes. 719 if test -n "${ZSH_VERSION+set}"; then 720 setopt NO_GLOB_SUBST 721 fi 722 723 cfgfile=${ofile}T 724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 725 $RM "$cfgfile" 726 727 cat <<_LT_EOF >> "$cfgfile" 728#! $SHELL 729# Generated automatically by $as_me ($PACKAGE) $VERSION 730# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 731# NOTE: Changes made to this file will be lost: look at ltmain.sh. 732 733# Provide generalized library-building support services. 734# Written by Gordon Matzigkeit, 1996 735 736_LT_COPYING 737_LT_LIBTOOL_TAGS 738 739# ### BEGIN LIBTOOL CONFIG 740_LT_LIBTOOL_CONFIG_VARS 741_LT_LIBTOOL_TAG_VARS 742# ### END LIBTOOL CONFIG 743 744_LT_EOF 745 746 case $host_os in 747 aix3*) 748 cat <<\_LT_EOF >> "$cfgfile" 749# AIX sometimes has problems with the GCC collect2 program. For some 750# reason, if we set the COLLECT_NAMES environment variable, the problems 751# vanish in a puff of smoke. 752if test set != "${COLLECT_NAMES+set}"; then 753 COLLECT_NAMES= 754 export COLLECT_NAMES 755fi 756_LT_EOF 757 ;; 758 esac 759 760 _LT_PROG_LTMAIN 761 762 # We use sed instead of cat because bash on DJGPP gets confused if 763 # if finds mixed CR/LF and LF-only lines. Since sed operates in 764 # text mode, it properly converts lines to CR/LF. This bash problem 765 # is reportedly fixed, but why not run on old versions too? 766 sed '$q' "$ltmain" >> "$cfgfile" \ 767 || (rm -f "$cfgfile"; exit 1) 768 769 mv -f "$cfgfile" "$ofile" || 770 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 771 chmod +x "$ofile" 772], 773[cat <<_LT_EOF >> "$ofile" 774 775dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 776dnl in a comment (ie after a #). 777# ### BEGIN LIBTOOL TAG CONFIG: $1 778_LT_LIBTOOL_TAG_VARS(_LT_TAG) 779# ### END LIBTOOL TAG CONFIG: $1 780_LT_EOF 781])dnl /m4_if 782], 783[m4_if([$1], [], [ 784 PACKAGE='$PACKAGE' 785 VERSION='$VERSION' 786 RM='$RM' 787 ofile='$ofile'], []) 788])dnl /_LT_CONFIG_SAVE_COMMANDS 789])# _LT_CONFIG 790 791 792# LT_SUPPORTED_TAG(TAG) 793# --------------------- 794# Trace this macro to discover what tags are supported by the libtool 795# --tag option, using: 796# autoconf --trace 'LT_SUPPORTED_TAG:$1' 797AC_DEFUN([LT_SUPPORTED_TAG], []) 798 799 800# C support is built-in for now 801m4_define([_LT_LANG_C_enabled], []) 802m4_define([_LT_TAGS], []) 803 804 805# LT_LANG(LANG) 806# ------------- 807# Enable libtool support for the given language if not already enabled. 808AC_DEFUN([LT_LANG], 809[AC_BEFORE([$0], [LT_OUTPUT])dnl 810m4_case([$1], 811 [C], [_LT_LANG(C)], 812 [C++], [_LT_LANG(CXX)], 813 [Go], [_LT_LANG(GO)], 814 [Java], [_LT_LANG(GCJ)], 815 [Fortran 77], [_LT_LANG(F77)], 816 [Fortran], [_LT_LANG(FC)], 817 [Windows Resource], [_LT_LANG(RC)], 818 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 819 [_LT_LANG($1)], 820 [m4_fatal([$0: unsupported language: "$1"])])])dnl 821])# LT_LANG 822 823 824# _LT_LANG(LANGNAME) 825# ------------------ 826m4_defun([_LT_LANG], 827[m4_ifdef([_LT_LANG_]$1[_enabled], [], 828 [LT_SUPPORTED_TAG([$1])dnl 829 m4_append([_LT_TAGS], [$1 ])dnl 830 m4_define([_LT_LANG_]$1[_enabled], [])dnl 831 _LT_LANG_$1_CONFIG($1)])dnl 832])# _LT_LANG 833 834 835m4_ifndef([AC_PROG_GO], [ 836# NOTE: This macro has been submitted for inclusion into # 837# GNU Autoconf as AC_PROG_GO. When it is available in # 838# a released version of Autoconf we should remove this # 839# macro and use it instead. # 840m4_defun([AC_PROG_GO], 841[AC_LANG_PUSH(Go)dnl 842AC_ARG_VAR([GOC], [Go compiler command])dnl 843AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 844_AC_ARG_VAR_LDFLAGS()dnl 845AC_CHECK_TOOL(GOC, gccgo) 846if test -z "$GOC"; then 847 if test -n "$ac_tool_prefix"; then 848 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 849 fi 850fi 851if test -z "$GOC"; then 852 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 853fi 854])#m4_defun 855])#m4_ifndef 856 857 858# _LT_LANG_DEFAULT_CONFIG 859# ----------------------- 860m4_defun([_LT_LANG_DEFAULT_CONFIG], 861[AC_PROVIDE_IFELSE([AC_PROG_CXX], 862 [LT_LANG(CXX)], 863 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 864 865AC_PROVIDE_IFELSE([AC_PROG_F77], 866 [LT_LANG(F77)], 867 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 868 869AC_PROVIDE_IFELSE([AC_PROG_FC], 870 [LT_LANG(FC)], 871 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 872 873dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 874dnl pulling things in needlessly. 875AC_PROVIDE_IFELSE([AC_PROG_GCJ], 876 [LT_LANG(GCJ)], 877 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 878 [LT_LANG(GCJ)], 879 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 880 [LT_LANG(GCJ)], 881 [m4_ifdef([AC_PROG_GCJ], 882 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 883 m4_ifdef([A][M_PROG_GCJ], 884 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 885 m4_ifdef([LT_PROG_GCJ], 886 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 887 888AC_PROVIDE_IFELSE([AC_PROG_GO], 889 [LT_LANG(GO)], 890 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 891 892AC_PROVIDE_IFELSE([LT_PROG_RC], 893 [LT_LANG(RC)], 894 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 895])# _LT_LANG_DEFAULT_CONFIG 896 897# Obsolete macros: 898AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 899AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 900AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 901AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 902AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 903dnl aclocal-1.4 backwards compatibility: 904dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 905dnl AC_DEFUN([AC_LIBTOOL_F77], []) 906dnl AC_DEFUN([AC_LIBTOOL_FC], []) 907dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 908dnl AC_DEFUN([AC_LIBTOOL_RC], []) 909 910 911# _LT_TAG_COMPILER 912# ---------------- 913m4_defun([_LT_TAG_COMPILER], 914[AC_REQUIRE([AC_PROG_CC])dnl 915 916_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 917_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 918_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 919_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 920 921# If no C compiler was specified, use CC. 922LTCC=${LTCC-"$CC"} 923 924# If no C compiler flags were specified, use CFLAGS. 925LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 926 927# Allow CC to be a program name with arguments. 928compiler=$CC 929])# _LT_TAG_COMPILER 930 931 932# _LT_COMPILER_BOILERPLATE 933# ------------------------ 934# Check for compiler boilerplate output or warnings with 935# the simple compiler test code. 936m4_defun([_LT_COMPILER_BOILERPLATE], 937[m4_require([_LT_DECL_SED])dnl 938ac_outfile=conftest.$ac_objext 939echo "$lt_simple_compile_test_code" >conftest.$ac_ext 940eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 941_lt_compiler_boilerplate=`cat conftest.err` 942$RM conftest* 943])# _LT_COMPILER_BOILERPLATE 944 945 946# _LT_LINKER_BOILERPLATE 947# ---------------------- 948# Check for linker boilerplate output or warnings with 949# the simple link test code. 950m4_defun([_LT_LINKER_BOILERPLATE], 951[m4_require([_LT_DECL_SED])dnl 952ac_outfile=conftest.$ac_objext 953echo "$lt_simple_link_test_code" >conftest.$ac_ext 954eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 955_lt_linker_boilerplate=`cat conftest.err` 956$RM -r conftest* 957])# _LT_LINKER_BOILERPLATE 958 959# _LT_REQUIRED_DARWIN_CHECKS 960# ------------------------- 961m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 962 case $host_os in 963 rhapsody* | darwin*) 964 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 965 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 966 AC_CHECK_TOOL([LIPO], [lipo], [:]) 967 AC_CHECK_TOOL([OTOOL], [otool], [:]) 968 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 969 _LT_DECL([], [DSYMUTIL], [1], 970 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 971 _LT_DECL([], [NMEDIT], [1], 972 [Tool to change global to local symbols on Mac OS X]) 973 _LT_DECL([], [LIPO], [1], 974 [Tool to manipulate fat objects and archives on Mac OS X]) 975 _LT_DECL([], [OTOOL], [1], 976 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 977 _LT_DECL([], [OTOOL64], [1], 978 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 979 980 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 981 [lt_cv_apple_cc_single_mod=no 982 if test -z "$LT_MULTI_MODULE"; then 983 # By default we will add the -single_module flag. You can override 984 # by either setting the environment variable LT_MULTI_MODULE 985 # non-empty at configure time, or by adding -multi_module to the 986 # link flags. 987 rm -rf libconftest.dylib* 988 echo "int foo(void){return 1;}" > conftest.c 989 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 990-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 991 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 992 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 993 _lt_result=$? 994 # If there is a non-empty error log, and "single_module" 995 # appears in it, assume the flag caused a linker warning 996 if test -s conftest.err && $GREP single_module conftest.err; then 997 cat conftest.err >&AS_MESSAGE_LOG_FD 998 # Otherwise, if the output was created with a 0 exit code from 999 # the compiler, it worked. 1000 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1001 lt_cv_apple_cc_single_mod=yes 1002 else 1003 cat conftest.err >&AS_MESSAGE_LOG_FD 1004 fi 1005 rm -rf libconftest.dylib* 1006 rm -f conftest.* 1007 fi]) 1008 1009 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1010 [lt_cv_ld_exported_symbols_list], 1011 [lt_cv_ld_exported_symbols_list=no 1012 save_LDFLAGS=$LDFLAGS 1013 echo "_main" > conftest.sym 1014 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1015 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1016 [lt_cv_ld_exported_symbols_list=yes], 1017 [lt_cv_ld_exported_symbols_list=no]) 1018 LDFLAGS=$save_LDFLAGS 1019 ]) 1020 1021 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1022 [lt_cv_ld_force_load=no 1023 cat > conftest.c << _LT_EOF 1024int forced_loaded() { return 2;} 1025_LT_EOF 1026 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1027 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1028 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1029 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1030 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1031 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1032 cat > conftest.c << _LT_EOF 1033int main() { return 0;} 1034_LT_EOF 1035 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1036 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1037 _lt_result=$? 1038 if test -s conftest.err && $GREP force_load conftest.err; then 1039 cat conftest.err >&AS_MESSAGE_LOG_FD 1040 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1041 lt_cv_ld_force_load=yes 1042 else 1043 cat conftest.err >&AS_MESSAGE_LOG_FD 1044 fi 1045 rm -f conftest.err libconftest.a conftest conftest.c 1046 rm -rf conftest.dSYM 1047 ]) 1048 case $host_os in 1049 rhapsody* | darwin1.[[012]]) 1050 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1051 darwin1.*) 1052 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1053 darwin*) # darwin 5.x on 1054 # if running on 10.5 or later, the deployment target defaults 1055 # to the OS version, if on x86, and 10.4, the deployment 1056 # target defaults to 10.4. Don't you love it? 1057 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1058 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1059 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1060 10.[[012]][[,.]]*) 1061 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1062 10.*) 1063 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1064 esac 1065 ;; 1066 esac 1067 if test yes = "$lt_cv_apple_cc_single_mod"; then 1068 _lt_dar_single_mod='$single_module' 1069 fi 1070 if test yes = "$lt_cv_ld_exported_symbols_list"; then 1071 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1072 else 1073 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1074 fi 1075 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1076 _lt_dsymutil='~$DSYMUTIL $lib || :' 1077 else 1078 _lt_dsymutil= 1079 fi 1080 ;; 1081 esac 1082]) 1083 1084 1085# _LT_DARWIN_LINKER_FEATURES([TAG]) 1086# --------------------------------- 1087# Checks for linker and compiler features on darwin 1088m4_defun([_LT_DARWIN_LINKER_FEATURES], 1089[ 1090 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1091 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1092 _LT_TAGVAR(hardcode_direct, $1)=no 1093 _LT_TAGVAR(hardcode_automatic, $1)=yes 1094 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1095 if test yes = "$lt_cv_ld_force_load"; then 1096 _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\"`' 1097 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1098 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1099 else 1100 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1101 fi 1102 _LT_TAGVAR(link_all_deplibs, $1)=yes 1103 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1104 case $cc_basename in 1105 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1106 *) _lt_dar_can_shared=$GCC ;; 1107 esac 1108 if test yes = "$_lt_dar_can_shared"; then 1109 output_verbose_link_cmd=func_echo_all 1110 _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" 1111 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1112 _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" 1113 _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" 1114 m4_if([$1], [CXX], 1115[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1116 _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" 1117 _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" 1118 fi 1119],[]) 1120 else 1121 _LT_TAGVAR(ld_shlibs, $1)=no 1122 fi 1123]) 1124 1125# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1126# ---------------------------------- 1127# Links a minimal program and checks the executable 1128# for the system default hardcoded library path. In most cases, 1129# this is /usr/lib:/lib, but when the MPI compilers are used 1130# the location of the communication and MPI libs are included too. 1131# If we don't find anything, use the default library path according 1132# to the aix ld manual. 1133# Store the results from the different compilers for each TAGNAME. 1134# Allow to override them for all tags through lt_cv_aix_libpath. 1135m4_defun([_LT_SYS_MODULE_PATH_AIX], 1136[m4_require([_LT_DECL_SED])dnl 1137if test set = "${lt_cv_aix_libpath+set}"; then 1138 aix_libpath=$lt_cv_aix_libpath 1139else 1140 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1141 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1142 lt_aix_libpath_sed='[ 1143 /Import File Strings/,/^$/ { 1144 /^0/ { 1145 s/^0 *\([^ ]*\) *$/\1/ 1146 p 1147 } 1148 }]' 1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1150 # Check for a 64-bit object if we didn't find anything. 1151 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1152 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1153 fi],[]) 1154 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1155 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1156 fi 1157 ]) 1158 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1159fi 1160])# _LT_SYS_MODULE_PATH_AIX 1161 1162 1163# _LT_SHELL_INIT(ARG) 1164# ------------------- 1165m4_define([_LT_SHELL_INIT], 1166[m4_divert_text([M4SH-INIT], [$1 1167])])# _LT_SHELL_INIT 1168 1169 1170 1171# _LT_PROG_ECHO_BACKSLASH 1172# ----------------------- 1173# Find how we can fake an echo command that does not interpret backslash. 1174# In particular, with Autoconf 2.60 or later we add some code to the start 1175# of the generated configure script that will find a shell with a builtin 1176# printf (that we can use as an echo command). 1177m4_defun([_LT_PROG_ECHO_BACKSLASH], 1178[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1179ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1180ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1181 1182AC_MSG_CHECKING([how to print strings]) 1183# Test print first, because it will be a builtin if present. 1184if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1185 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1186 ECHO='print -r --' 1187elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1188 ECHO='printf %s\n' 1189else 1190 # Use this function as a fallback that always works. 1191 func_fallback_echo () 1192 { 1193 eval 'cat <<_LTECHO_EOF 1194$[]1 1195_LTECHO_EOF' 1196 } 1197 ECHO='func_fallback_echo' 1198fi 1199 1200# func_echo_all arg... 1201# Invoke $ECHO with all args, space-separated. 1202func_echo_all () 1203{ 1204 $ECHO "$*" 1205} 1206 1207case $ECHO in 1208 printf*) AC_MSG_RESULT([printf]) ;; 1209 print*) AC_MSG_RESULT([print -r]) ;; 1210 *) AC_MSG_RESULT([cat]) ;; 1211esac 1212 1213m4_ifdef([_AS_DETECT_SUGGESTED], 1214[_AS_DETECT_SUGGESTED([ 1215 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1216 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1217 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1218 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1219 PATH=/empty FPATH=/empty; export PATH FPATH 1220 test "X`printf %s $ECHO`" = "X$ECHO" \ 1221 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1222 1223_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1224_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1225])# _LT_PROG_ECHO_BACKSLASH 1226 1227 1228# _LT_WITH_SYSROOT 1229# ---------------- 1230AC_DEFUN([_LT_WITH_SYSROOT], 1231[AC_MSG_CHECKING([for sysroot]) 1232AC_ARG_WITH([sysroot], 1233[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1234 [Search for dependent libraries within DIR (or the compiler's sysroot 1235 if not specified).])], 1236[], [with_sysroot=no]) 1237 1238dnl lt_sysroot will always be passed unquoted. We quote it here 1239dnl in case the user passed a directory name. 1240lt_sysroot= 1241case $with_sysroot in #( 1242 yes) 1243 if test yes = "$GCC"; then 1244 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1245 fi 1246 ;; #( 1247 /*) 1248 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1249 ;; #( 1250 no|'') 1251 ;; #( 1252 *) 1253 AC_MSG_RESULT([$with_sysroot]) 1254 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1255 ;; 1256esac 1257 1258 AC_MSG_RESULT([${lt_sysroot:-no}]) 1259_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1260[dependent libraries, and where our libraries should be installed.])]) 1261 1262# _LT_ENABLE_LOCK 1263# --------------- 1264m4_defun([_LT_ENABLE_LOCK], 1265[AC_ARG_ENABLE([libtool-lock], 1266 [AS_HELP_STRING([--disable-libtool-lock], 1267 [avoid locking (might break parallel builds)])]) 1268test no = "$enable_libtool_lock" || enable_libtool_lock=yes 1269 1270# Some flags need to be propagated to the compiler or linker for good 1271# libtool support. 1272case $host in 1273ia64-*-hpux*) 1274 # Find out what ABI is being produced by ac_compile, and set mode 1275 # options accordingly. 1276 echo 'int i;' > conftest.$ac_ext 1277 if AC_TRY_EVAL(ac_compile); then 1278 case `/usr/bin/file conftest.$ac_objext` in 1279 *ELF-32*) 1280 HPUX_IA64_MODE=32 1281 ;; 1282 *ELF-64*) 1283 HPUX_IA64_MODE=64 1284 ;; 1285 esac 1286 fi 1287 rm -rf conftest* 1288 ;; 1289*-*-irix6*) 1290 # Find out what ABI is being produced by ac_compile, and set linker 1291 # options accordingly. 1292 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1293 if AC_TRY_EVAL(ac_compile); then 1294 if test yes = "$lt_cv_prog_gnu_ld"; then 1295 case `/usr/bin/file conftest.$ac_objext` in 1296 *32-bit*) 1297 LD="${LD-ld} -melf32bsmip" 1298 ;; 1299 *N32*) 1300 LD="${LD-ld} -melf32bmipn32" 1301 ;; 1302 *64-bit*) 1303 LD="${LD-ld} -melf64bmip" 1304 ;; 1305 esac 1306 else 1307 case `/usr/bin/file conftest.$ac_objext` in 1308 *32-bit*) 1309 LD="${LD-ld} -32" 1310 ;; 1311 *N32*) 1312 LD="${LD-ld} -n32" 1313 ;; 1314 *64-bit*) 1315 LD="${LD-ld} -64" 1316 ;; 1317 esac 1318 fi 1319 fi 1320 rm -rf conftest* 1321 ;; 1322 1323mips64*-*linux*) 1324 # Find out what ABI is being produced by ac_compile, and set linker 1325 # options accordingly. 1326 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1327 if AC_TRY_EVAL(ac_compile); then 1328 emul=elf 1329 case `/usr/bin/file conftest.$ac_objext` in 1330 *32-bit*) 1331 emul="${emul}32" 1332 ;; 1333 *64-bit*) 1334 emul="${emul}64" 1335 ;; 1336 esac 1337 case `/usr/bin/file conftest.$ac_objext` in 1338 *MSB*) 1339 emul="${emul}btsmip" 1340 ;; 1341 *LSB*) 1342 emul="${emul}ltsmip" 1343 ;; 1344 esac 1345 case `/usr/bin/file conftest.$ac_objext` in 1346 *N32*) 1347 emul="${emul}n32" 1348 ;; 1349 esac 1350 LD="${LD-ld} -m $emul" 1351 fi 1352 rm -rf conftest* 1353 ;; 1354 1355x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1356s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1357 # Find out what ABI is being produced by ac_compile, and set linker 1358 # options accordingly. Note that the listed cases only cover the 1359 # situations where additional linker options are needed (such as when 1360 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1361 # vice versa); the common cases where no linker options are needed do 1362 # not appear in the list. 1363 echo 'int i;' > conftest.$ac_ext 1364 if AC_TRY_EVAL(ac_compile); then 1365 case `/usr/bin/file conftest.o` in 1366 *32-bit*) 1367 case $host in 1368 x86_64-*kfreebsd*-gnu) 1369 LD="${LD-ld} -m elf_i386_fbsd" 1370 ;; 1371 x86_64-*linux*) 1372 case `/usr/bin/file conftest.o` in 1373 *x86-64*) 1374 LD="${LD-ld} -m elf32_x86_64" 1375 ;; 1376 *) 1377 LD="${LD-ld} -m elf_i386" 1378 ;; 1379 esac 1380 ;; 1381 powerpc64le-*linux*) 1382 LD="${LD-ld} -m elf32lppclinux" 1383 ;; 1384 powerpc64-*linux*) 1385 LD="${LD-ld} -m elf32ppclinux" 1386 ;; 1387 s390x-*linux*) 1388 LD="${LD-ld} -m elf_s390" 1389 ;; 1390 sparc64-*linux*) 1391 LD="${LD-ld} -m elf32_sparc" 1392 ;; 1393 esac 1394 ;; 1395 *64-bit*) 1396 case $host in 1397 x86_64-*kfreebsd*-gnu) 1398 LD="${LD-ld} -m elf_x86_64_fbsd" 1399 ;; 1400 x86_64-*linux*) 1401 LD="${LD-ld} -m elf_x86_64" 1402 ;; 1403 powerpcle-*linux*) 1404 LD="${LD-ld} -m elf64lppc" 1405 ;; 1406 powerpc-*linux*) 1407 LD="${LD-ld} -m elf64ppc" 1408 ;; 1409 s390*-*linux*|s390*-*tpf*) 1410 LD="${LD-ld} -m elf64_s390" 1411 ;; 1412 sparc*-*linux*) 1413 LD="${LD-ld} -m elf64_sparc" 1414 ;; 1415 esac 1416 ;; 1417 esac 1418 fi 1419 rm -rf conftest* 1420 ;; 1421 1422*-*-sco3.2v5*) 1423 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1424 SAVE_CFLAGS=$CFLAGS 1425 CFLAGS="$CFLAGS -belf" 1426 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1427 [AC_LANG_PUSH(C) 1428 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1429 AC_LANG_POP]) 1430 if test yes != "$lt_cv_cc_needs_belf"; then 1431 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1432 CFLAGS=$SAVE_CFLAGS 1433 fi 1434 ;; 1435*-*solaris*) 1436 # Find out what ABI is being produced by ac_compile, and set linker 1437 # options accordingly. 1438 echo 'int i;' > conftest.$ac_ext 1439 if AC_TRY_EVAL(ac_compile); then 1440 case `/usr/bin/file conftest.o` in 1441 *64-bit*) 1442 case $lt_cv_prog_gnu_ld in 1443 yes*) 1444 case $host in 1445 i?86-*-solaris*|x86_64-*-solaris*) 1446 LD="${LD-ld} -m elf_x86_64" 1447 ;; 1448 sparc*-*-solaris*) 1449 LD="${LD-ld} -m elf64_sparc" 1450 ;; 1451 esac 1452 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1453 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1454 LD=${LD-ld}_sol2 1455 fi 1456 ;; 1457 *) 1458 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1459 LD="${LD-ld} -64" 1460 fi 1461 ;; 1462 esac 1463 ;; 1464 esac 1465 fi 1466 rm -rf conftest* 1467 ;; 1468esac 1469 1470need_locks=$enable_libtool_lock 1471])# _LT_ENABLE_LOCK 1472 1473 1474# _LT_PROG_AR 1475# ----------- 1476m4_defun([_LT_PROG_AR], 1477[AC_CHECK_TOOLS(AR, [ar], false) 1478: ${AR=ar} 1479: ${AR_FLAGS=cru} 1480_LT_DECL([], [AR], [1], [The archiver]) 1481_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1482 1483AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1484 [lt_cv_ar_at_file=no 1485 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1486 [echo conftest.$ac_objext > conftest.lst 1487 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1488 AC_TRY_EVAL([lt_ar_try]) 1489 if test 0 -eq "$ac_status"; then 1490 # Ensure the archiver fails upon bogus file names. 1491 rm -f conftest.$ac_objext libconftest.a 1492 AC_TRY_EVAL([lt_ar_try]) 1493 if test 0 -ne "$ac_status"; then 1494 lt_cv_ar_at_file=@ 1495 fi 1496 fi 1497 rm -f conftest.* libconftest.a 1498 ]) 1499 ]) 1500 1501if test no = "$lt_cv_ar_at_file"; then 1502 archiver_list_spec= 1503else 1504 archiver_list_spec=$lt_cv_ar_at_file 1505fi 1506_LT_DECL([], [archiver_list_spec], [1], 1507 [How to feed a file listing to the archiver]) 1508])# _LT_PROG_AR 1509 1510 1511# _LT_CMD_OLD_ARCHIVE 1512# ------------------- 1513m4_defun([_LT_CMD_OLD_ARCHIVE], 1514[_LT_PROG_AR 1515 1516AC_CHECK_TOOL(STRIP, strip, :) 1517test -z "$STRIP" && STRIP=: 1518_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1519 1520AC_CHECK_TOOL(RANLIB, ranlib, :) 1521test -z "$RANLIB" && RANLIB=: 1522_LT_DECL([], [RANLIB], [1], 1523 [Commands used to install an old-style archive]) 1524 1525# Determine commands to create old-style static archives. 1526old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1527old_postinstall_cmds='chmod 644 $oldlib' 1528old_postuninstall_cmds= 1529 1530if test -n "$RANLIB"; then 1531 case $host_os in 1532 bitrig* | openbsd*) 1533 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1534 ;; 1535 *) 1536 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1537 ;; 1538 esac 1539 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1540fi 1541 1542case $host_os in 1543 darwin*) 1544 lock_old_archive_extraction=yes ;; 1545 *) 1546 lock_old_archive_extraction=no ;; 1547esac 1548_LT_DECL([], [old_postinstall_cmds], [2]) 1549_LT_DECL([], [old_postuninstall_cmds], [2]) 1550_LT_TAGDECL([], [old_archive_cmds], [2], 1551 [Commands used to build an old-style archive]) 1552_LT_DECL([], [lock_old_archive_extraction], [0], 1553 [Whether to use a lock for old archive extraction]) 1554])# _LT_CMD_OLD_ARCHIVE 1555 1556 1557# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1558# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1559# ---------------------------------------------------------------- 1560# Check whether the given compiler option works 1561AC_DEFUN([_LT_COMPILER_OPTION], 1562[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1563m4_require([_LT_DECL_SED])dnl 1564AC_CACHE_CHECK([$1], [$2], 1565 [$2=no 1566 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1567 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1568 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1569 # Insert the option either (1) after the last *FLAGS variable, or 1570 # (2) before a word containing "conftest.", or (3) at the end. 1571 # Note that $ac_compile itself does not contain backslashes and begins 1572 # with a dollar sign (not a hyphen), so the echo should work correctly. 1573 # The option is referenced via a variable to avoid confusing sed. 1574 lt_compile=`echo "$ac_compile" | $SED \ 1575 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1576 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1577 -e 's:$: $lt_compiler_flag:'` 1578 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1579 (eval "$lt_compile" 2>conftest.err) 1580 ac_status=$? 1581 cat conftest.err >&AS_MESSAGE_LOG_FD 1582 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1583 if (exit $ac_status) && test -s "$ac_outfile"; then 1584 # The compiler can only warn and ignore the option if not recognized 1585 # So say no if there are warnings other than the usual output. 1586 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1587 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1588 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1589 $2=yes 1590 fi 1591 fi 1592 $RM conftest* 1593]) 1594 1595if test yes = "[$]$2"; then 1596 m4_if([$5], , :, [$5]) 1597else 1598 m4_if([$6], , :, [$6]) 1599fi 1600])# _LT_COMPILER_OPTION 1601 1602# Old name: 1603AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1604dnl aclocal-1.4 backwards compatibility: 1605dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1606 1607 1608# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1609# [ACTION-SUCCESS], [ACTION-FAILURE]) 1610# ---------------------------------------------------- 1611# Check whether the given linker option works 1612AC_DEFUN([_LT_LINKER_OPTION], 1613[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1614m4_require([_LT_DECL_SED])dnl 1615AC_CACHE_CHECK([$1], [$2], 1616 [$2=no 1617 save_LDFLAGS=$LDFLAGS 1618 LDFLAGS="$LDFLAGS $3" 1619 echo "$lt_simple_link_test_code" > conftest.$ac_ext 1620 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1621 # The linker can only warn and ignore the option if not recognized 1622 # So say no if there are warnings 1623 if test -s conftest.err; then 1624 # Append any errors to the config.log. 1625 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1626 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1627 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1628 if diff conftest.exp conftest.er2 >/dev/null; then 1629 $2=yes 1630 fi 1631 else 1632 $2=yes 1633 fi 1634 fi 1635 $RM -r conftest* 1636 LDFLAGS=$save_LDFLAGS 1637]) 1638 1639if test yes = "[$]$2"; then 1640 m4_if([$4], , :, [$4]) 1641else 1642 m4_if([$5], , :, [$5]) 1643fi 1644])# _LT_LINKER_OPTION 1645 1646# Old name: 1647AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1648dnl aclocal-1.4 backwards compatibility: 1649dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1650 1651 1652# LT_CMD_MAX_LEN 1653#--------------- 1654AC_DEFUN([LT_CMD_MAX_LEN], 1655[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1656# find the maximum length of command line arguments 1657AC_MSG_CHECKING([the maximum length of command line arguments]) 1658AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1659 i=0 1660 teststring=ABCD 1661 1662 case $build_os in 1663 msdosdjgpp*) 1664 # On DJGPP, this test can blow up pretty badly due to problems in libc 1665 # (any single argument exceeding 2000 bytes causes a buffer overrun 1666 # during glob expansion). Even if it were fixed, the result of this 1667 # check would be larger than it should be. 1668 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1669 ;; 1670 1671 gnu*) 1672 # Under GNU Hurd, this test is not required because there is 1673 # no limit to the length of command line arguments. 1674 # Libtool will interpret -1 as no limit whatsoever 1675 lt_cv_sys_max_cmd_len=-1; 1676 ;; 1677 1678 cygwin* | mingw* | cegcc*) 1679 # On Win9x/ME, this test blows up -- it succeeds, but takes 1680 # about 5 minutes as the teststring grows exponentially. 1681 # Worse, since 9x/ME are not pre-emptively multitasking, 1682 # you end up with a "frozen" computer, even though with patience 1683 # the test eventually succeeds (with a max line length of 256k). 1684 # Instead, let's just punt: use the minimum linelength reported by 1685 # all of the supported platforms: 8192 (on NT/2K/XP). 1686 lt_cv_sys_max_cmd_len=8192; 1687 ;; 1688 1689 mint*) 1690 # On MiNT this can take a long time and run out of memory. 1691 lt_cv_sys_max_cmd_len=8192; 1692 ;; 1693 1694 amigaos*) 1695 # On AmigaOS with pdksh, this test takes hours, literally. 1696 # So we just punt and use a minimum line length of 8192. 1697 lt_cv_sys_max_cmd_len=8192; 1698 ;; 1699 1700 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1701 # This has been around since 386BSD, at least. Likely further. 1702 if test -x /sbin/sysctl; then 1703 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1704 elif test -x /usr/sbin/sysctl; then 1705 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1706 else 1707 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1708 fi 1709 # And add a safety zone 1710 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1711 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1712 ;; 1713 1714 interix*) 1715 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1716 lt_cv_sys_max_cmd_len=196608 1717 ;; 1718 1719 os2*) 1720 # The test takes a long time on OS/2. 1721 lt_cv_sys_max_cmd_len=8192 1722 ;; 1723 1724 osf*) 1725 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1726 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1727 # nice to cause kernel panics so lets avoid the loop below. 1728 # First set a reasonable default. 1729 lt_cv_sys_max_cmd_len=16384 1730 # 1731 if test -x /sbin/sysconfig; then 1732 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1733 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1734 esac 1735 fi 1736 ;; 1737 sco3.2v5*) 1738 lt_cv_sys_max_cmd_len=102400 1739 ;; 1740 sysv5* | sco5v6* | sysv4.2uw2*) 1741 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1742 if test -n "$kargmax"; then 1743 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1744 else 1745 lt_cv_sys_max_cmd_len=32768 1746 fi 1747 ;; 1748 *) 1749 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1750 if test -n "$lt_cv_sys_max_cmd_len" && \ 1751 test undefined != "$lt_cv_sys_max_cmd_len"; then 1752 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1753 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1754 else 1755 # Make teststring a little bigger before we do anything with it. 1756 # a 1K string should be a reasonable start. 1757 for i in 1 2 3 4 5 6 7 8; do 1758 teststring=$teststring$teststring 1759 done 1760 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1761 # If test is not a shell built-in, we'll probably end up computing a 1762 # maximum length that is only half of the actual maximum length, but 1763 # we can't tell. 1764 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1765 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1766 test 17 != "$i" # 1/2 MB should be enough 1767 do 1768 i=`expr $i + 1` 1769 teststring=$teststring$teststring 1770 done 1771 # Only check the string length outside the loop. 1772 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1773 teststring= 1774 # Add a significant safety factor because C++ compilers can tack on 1775 # massive amounts of additional arguments before passing them to the 1776 # linker. It appears as though 1/2 is a usable value. 1777 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1778 fi 1779 ;; 1780 esac 1781]) 1782if test -n "$lt_cv_sys_max_cmd_len"; then 1783 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1784else 1785 AC_MSG_RESULT(none) 1786fi 1787max_cmd_len=$lt_cv_sys_max_cmd_len 1788_LT_DECL([], [max_cmd_len], [0], 1789 [What is the maximum length of a command?]) 1790])# LT_CMD_MAX_LEN 1791 1792# Old name: 1793AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1794dnl aclocal-1.4 backwards compatibility: 1795dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1796 1797 1798# _LT_HEADER_DLFCN 1799# ---------------- 1800m4_defun([_LT_HEADER_DLFCN], 1801[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1802])# _LT_HEADER_DLFCN 1803 1804 1805# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1806# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1807# ---------------------------------------------------------------- 1808m4_defun([_LT_TRY_DLOPEN_SELF], 1809[m4_require([_LT_HEADER_DLFCN])dnl 1810if test yes = "$cross_compiling"; then : 1811 [$4] 1812else 1813 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1814 lt_status=$lt_dlunknown 1815 cat > conftest.$ac_ext <<_LT_EOF 1816[#line $LINENO "configure" 1817#include "confdefs.h" 1818 1819#if HAVE_DLFCN_H 1820#include <dlfcn.h> 1821#endif 1822 1823#include <stdio.h> 1824 1825#ifdef RTLD_GLOBAL 1826# define LT_DLGLOBAL RTLD_GLOBAL 1827#else 1828# ifdef DL_GLOBAL 1829# define LT_DLGLOBAL DL_GLOBAL 1830# else 1831# define LT_DLGLOBAL 0 1832# endif 1833#endif 1834 1835/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1836 find out it does not work in some platform. */ 1837#ifndef LT_DLLAZY_OR_NOW 1838# ifdef RTLD_LAZY 1839# define LT_DLLAZY_OR_NOW RTLD_LAZY 1840# else 1841# ifdef DL_LAZY 1842# define LT_DLLAZY_OR_NOW DL_LAZY 1843# else 1844# ifdef RTLD_NOW 1845# define LT_DLLAZY_OR_NOW RTLD_NOW 1846# else 1847# ifdef DL_NOW 1848# define LT_DLLAZY_OR_NOW DL_NOW 1849# else 1850# define LT_DLLAZY_OR_NOW 0 1851# endif 1852# endif 1853# endif 1854# endif 1855#endif 1856 1857/* When -fvisibility=hidden is used, assume the code has been annotated 1858 correspondingly for the symbols needed. */ 1859#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1860int fnord () __attribute__((visibility("default"))); 1861#endif 1862 1863int fnord () { return 42; } 1864int main () 1865{ 1866 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1867 int status = $lt_dlunknown; 1868 1869 if (self) 1870 { 1871 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1872 else 1873 { 1874 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1875 else puts (dlerror ()); 1876 } 1877 /* dlclose (self); */ 1878 } 1879 else 1880 puts (dlerror ()); 1881 1882 return status; 1883}] 1884_LT_EOF 1885 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1886 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1887 lt_status=$? 1888 case x$lt_status in 1889 x$lt_dlno_uscore) $1 ;; 1890 x$lt_dlneed_uscore) $2 ;; 1891 x$lt_dlunknown|x*) $3 ;; 1892 esac 1893 else : 1894 # compilation failed 1895 $3 1896 fi 1897fi 1898rm -fr conftest* 1899])# _LT_TRY_DLOPEN_SELF 1900 1901 1902# LT_SYS_DLOPEN_SELF 1903# ------------------ 1904AC_DEFUN([LT_SYS_DLOPEN_SELF], 1905[m4_require([_LT_HEADER_DLFCN])dnl 1906if test yes != "$enable_dlopen"; then 1907 enable_dlopen=unknown 1908 enable_dlopen_self=unknown 1909 enable_dlopen_self_static=unknown 1910else 1911 lt_cv_dlopen=no 1912 lt_cv_dlopen_libs= 1913 1914 case $host_os in 1915 beos*) 1916 lt_cv_dlopen=load_add_on 1917 lt_cv_dlopen_libs= 1918 lt_cv_dlopen_self=yes 1919 ;; 1920 1921 mingw* | pw32* | cegcc*) 1922 lt_cv_dlopen=LoadLibrary 1923 lt_cv_dlopen_libs= 1924 ;; 1925 1926 cygwin*) 1927 lt_cv_dlopen=dlopen 1928 lt_cv_dlopen_libs= 1929 ;; 1930 1931 darwin*) 1932 # if libdl is installed we need to link against it 1933 AC_CHECK_LIB([dl], [dlopen], 1934 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1935 lt_cv_dlopen=dyld 1936 lt_cv_dlopen_libs= 1937 lt_cv_dlopen_self=yes 1938 ]) 1939 ;; 1940 1941 tpf*) 1942 # Don't try to run any link tests for TPF. We know it's impossible 1943 # because TPF is a cross-compiler, and we know how we open DSOs. 1944 lt_cv_dlopen=dlopen 1945 lt_cv_dlopen_libs= 1946 lt_cv_dlopen_self=no 1947 ;; 1948 1949 *) 1950 AC_CHECK_FUNC([shl_load], 1951 [lt_cv_dlopen=shl_load], 1952 [AC_CHECK_LIB([dld], [shl_load], 1953 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1954 [AC_CHECK_FUNC([dlopen], 1955 [lt_cv_dlopen=dlopen], 1956 [AC_CHECK_LIB([dl], [dlopen], 1957 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1958 [AC_CHECK_LIB([svld], [dlopen], 1959 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1960 [AC_CHECK_LIB([dld], [dld_link], 1961 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1962 ]) 1963 ]) 1964 ]) 1965 ]) 1966 ]) 1967 ;; 1968 esac 1969 1970 if test no = "$lt_cv_dlopen"; then 1971 enable_dlopen=no 1972 else 1973 enable_dlopen=yes 1974 fi 1975 1976 case $lt_cv_dlopen in 1977 dlopen) 1978 save_CPPFLAGS=$CPPFLAGS 1979 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1980 1981 save_LDFLAGS=$LDFLAGS 1982 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1983 1984 save_LIBS=$LIBS 1985 LIBS="$lt_cv_dlopen_libs $LIBS" 1986 1987 AC_CACHE_CHECK([whether a program can dlopen itself], 1988 lt_cv_dlopen_self, [dnl 1989 _LT_TRY_DLOPEN_SELF( 1990 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1991 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1992 ]) 1993 1994 if test yes = "$lt_cv_dlopen_self"; then 1995 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1996 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1997 lt_cv_dlopen_self_static, [dnl 1998 _LT_TRY_DLOPEN_SELF( 1999 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2000 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2001 ]) 2002 fi 2003 2004 CPPFLAGS=$save_CPPFLAGS 2005 LDFLAGS=$save_LDFLAGS 2006 LIBS=$save_LIBS 2007 ;; 2008 esac 2009 2010 case $lt_cv_dlopen_self in 2011 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2012 *) enable_dlopen_self=unknown ;; 2013 esac 2014 2015 case $lt_cv_dlopen_self_static in 2016 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2017 *) enable_dlopen_self_static=unknown ;; 2018 esac 2019fi 2020_LT_DECL([dlopen_support], [enable_dlopen], [0], 2021 [Whether dlopen is supported]) 2022_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2023 [Whether dlopen of programs is supported]) 2024_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2025 [Whether dlopen of statically linked programs is supported]) 2026])# LT_SYS_DLOPEN_SELF 2027 2028# Old name: 2029AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2030dnl aclocal-1.4 backwards compatibility: 2031dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2032 2033 2034# _LT_COMPILER_C_O([TAGNAME]) 2035# --------------------------- 2036# Check to see if options -c and -o are simultaneously supported by compiler. 2037# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2038m4_defun([_LT_COMPILER_C_O], 2039[m4_require([_LT_DECL_SED])dnl 2040m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2041m4_require([_LT_TAG_COMPILER])dnl 2042AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2043 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2044 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2045 $RM -r conftest 2>/dev/null 2046 mkdir conftest 2047 cd conftest 2048 mkdir out 2049 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2050 2051 lt_compiler_flag="-o out/conftest2.$ac_objext" 2052 # Insert the option either (1) after the last *FLAGS variable, or 2053 # (2) before a word containing "conftest.", or (3) at the end. 2054 # Note that $ac_compile itself does not contain backslashes and begins 2055 # with a dollar sign (not a hyphen), so the echo should work correctly. 2056 lt_compile=`echo "$ac_compile" | $SED \ 2057 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2058 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2059 -e 's:$: $lt_compiler_flag:'` 2060 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2061 (eval "$lt_compile" 2>out/conftest.err) 2062 ac_status=$? 2063 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2064 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2065 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2066 then 2067 # The compiler can only warn and ignore the option if not recognized 2068 # So say no if there are warnings 2069 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2070 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2071 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2072 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2073 fi 2074 fi 2075 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2076 $RM conftest* 2077 # SGI C++ compiler will create directory out/ii_files/ for 2078 # template instantiation 2079 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2080 $RM out/* && rmdir out 2081 cd .. 2082 $RM -r conftest 2083 $RM conftest* 2084]) 2085_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2086 [Does compiler simultaneously support -c and -o options?]) 2087])# _LT_COMPILER_C_O 2088 2089 2090# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2091# ---------------------------------- 2092# Check to see if we can do hard links to lock some files if needed 2093m4_defun([_LT_COMPILER_FILE_LOCKS], 2094[m4_require([_LT_ENABLE_LOCK])dnl 2095m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2096_LT_COMPILER_C_O([$1]) 2097 2098hard_links=nottested 2099if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2100 # do not overwrite the value of need_locks provided by the user 2101 AC_MSG_CHECKING([if we can lock with hard links]) 2102 hard_links=yes 2103 $RM conftest* 2104 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2105 touch conftest.a 2106 ln conftest.a conftest.b 2>&5 || hard_links=no 2107 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2108 AC_MSG_RESULT([$hard_links]) 2109 if test no = "$hard_links"; then 2110 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2111 need_locks=warn 2112 fi 2113else 2114 need_locks=no 2115fi 2116_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2117])# _LT_COMPILER_FILE_LOCKS 2118 2119 2120# _LT_CHECK_OBJDIR 2121# ---------------- 2122m4_defun([_LT_CHECK_OBJDIR], 2123[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2124[rm -f .libs 2>/dev/null 2125mkdir .libs 2>/dev/null 2126if test -d .libs; then 2127 lt_cv_objdir=.libs 2128else 2129 # MS-DOS does not allow filenames that begin with a dot. 2130 lt_cv_objdir=_libs 2131fi 2132rmdir .libs 2>/dev/null]) 2133objdir=$lt_cv_objdir 2134_LT_DECL([], [objdir], [0], 2135 [The name of the directory that contains temporary libtool files])dnl 2136m4_pattern_allow([LT_OBJDIR])dnl 2137AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2138 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2139])# _LT_CHECK_OBJDIR 2140 2141 2142# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2143# -------------------------------------- 2144# Check hardcoding attributes. 2145m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2146[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2147_LT_TAGVAR(hardcode_action, $1)= 2148if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2149 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2150 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2151 2152 # We can hardcode non-existent directories. 2153 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2154 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2155 # have to relink, otherwise we might link with an installed library 2156 # when we should be linking with a yet-to-be-installed one 2157 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2158 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2159 # Linking always hardcodes the temporary library directory. 2160 _LT_TAGVAR(hardcode_action, $1)=relink 2161 else 2162 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2163 _LT_TAGVAR(hardcode_action, $1)=immediate 2164 fi 2165else 2166 # We cannot hardcode anything, or else we can only hardcode existing 2167 # directories. 2168 _LT_TAGVAR(hardcode_action, $1)=unsupported 2169fi 2170AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2171 2172if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2173 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2174 # Fast installation is not supported 2175 enable_fast_install=no 2176elif test yes = "$shlibpath_overrides_runpath" || 2177 test no = "$enable_shared"; then 2178 # Fast installation is not necessary 2179 enable_fast_install=needless 2180fi 2181_LT_TAGDECL([], [hardcode_action], [0], 2182 [How to hardcode a shared library path into an executable]) 2183])# _LT_LINKER_HARDCODE_LIBPATH 2184 2185 2186# _LT_CMD_STRIPLIB 2187# ---------------- 2188m4_defun([_LT_CMD_STRIPLIB], 2189[m4_require([_LT_DECL_EGREP]) 2190striplib= 2191old_striplib= 2192AC_MSG_CHECKING([whether stripping libraries is possible]) 2193if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2194 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2195 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2196 AC_MSG_RESULT([yes]) 2197else 2198# FIXME - insert some real tests, host_os isn't really good enough 2199 case $host_os in 2200 darwin*) 2201 if test -n "$STRIP"; then 2202 striplib="$STRIP -x" 2203 old_striplib="$STRIP -S" 2204 AC_MSG_RESULT([yes]) 2205 else 2206 AC_MSG_RESULT([no]) 2207 fi 2208 ;; 2209 *) 2210 AC_MSG_RESULT([no]) 2211 ;; 2212 esac 2213fi 2214_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2215_LT_DECL([], [striplib], [1]) 2216])# _LT_CMD_STRIPLIB 2217 2218 2219# _LT_SYS_DYNAMIC_LINKER([TAG]) 2220# ----------------------------- 2221# PORTME Fill in your ld.so characteristics 2222m4_defun([_LT_SYS_DYNAMIC_LINKER], 2223[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2224m4_require([_LT_DECL_EGREP])dnl 2225m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2226m4_require([_LT_DECL_OBJDUMP])dnl 2227m4_require([_LT_DECL_SED])dnl 2228m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2229AC_MSG_CHECKING([dynamic linker characteristics]) 2230m4_if([$1], 2231 [], [ 2232if test yes = "$GCC"; then 2233 case $host_os in 2234 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2235 *) lt_awk_arg='/^libraries:/' ;; 2236 esac 2237 case $host_os in 2238 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2239 *) lt_sed_strip_eq='s|=/|/|g' ;; 2240 esac 2241 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2242 case $lt_search_path_spec in 2243 *\;*) 2244 # if the path contains ";" then we assume it to be the separator 2245 # otherwise default to the standard path separator (i.e. ":") - it is 2246 # assumed that no part of a normal pathname contains ";" but that should 2247 # okay in the real world where ";" in dirpaths is itself problematic. 2248 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2249 ;; 2250 *) 2251 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2252 ;; 2253 esac 2254 # Ok, now we have the path, separated by spaces, we can step through it 2255 # and add multilib dir if necessary... 2256 lt_tmp_lt_search_path_spec= 2257 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2258 # ...but if some path component already ends with the multilib dir we assume 2259 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2260 case "$lt_multi_os_dir; $lt_search_path_spec " in 2261 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2262 lt_multi_os_dir= 2263 ;; 2264 esac 2265 for lt_sys_path in $lt_search_path_spec; do 2266 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2267 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2268 elif test -n "$lt_multi_os_dir"; then 2269 test -d "$lt_sys_path" && \ 2270 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2271 fi 2272 done 2273 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2274BEGIN {RS = " "; FS = "/|\n";} { 2275 lt_foo = ""; 2276 lt_count = 0; 2277 for (lt_i = NF; lt_i > 0; lt_i--) { 2278 if ($lt_i != "" && $lt_i != ".") { 2279 if ($lt_i == "..") { 2280 lt_count++; 2281 } else { 2282 if (lt_count == 0) { 2283 lt_foo = "/" $lt_i lt_foo; 2284 } else { 2285 lt_count--; 2286 } 2287 } 2288 } 2289 } 2290 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2291 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2292}'` 2293 # AWK program above erroneously prepends '/' to C:/dos/paths 2294 # for these hosts. 2295 case $host_os in 2296 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2297 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2298 esac 2299 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2300else 2301 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2302fi]) 2303library_names_spec= 2304libname_spec='lib$name' 2305soname_spec= 2306shrext_cmds=.so 2307postinstall_cmds= 2308postuninstall_cmds= 2309finish_cmds= 2310finish_eval= 2311shlibpath_var= 2312shlibpath_overrides_runpath=unknown 2313version_type=none 2314dynamic_linker="$host_os ld.so" 2315sys_lib_dlsearch_path_spec="/lib /usr/lib" 2316need_lib_prefix=unknown 2317hardcode_into_libs=no 2318 2319# when you set need_version to no, make sure it does not cause -set_version 2320# flags to be left without arguments 2321need_version=unknown 2322 2323case $host_os in 2324aix3*) 2325 version_type=linux # correct to gnu/linux during the next big refactor 2326 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2327 shlibpath_var=LIBPATH 2328 2329 # AIX 3 has no versioning support, so we append a major version to the name. 2330 soname_spec='$libname$release$shared_ext$major' 2331 ;; 2332 2333aix[[4-9]]*) 2334 version_type=linux # correct to gnu/linux during the next big refactor 2335 need_lib_prefix=no 2336 need_version=no 2337 hardcode_into_libs=yes 2338 if test ia64 = "$host_cpu"; then 2339 # AIX 5 supports IA64 2340 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2341 shlibpath_var=LD_LIBRARY_PATH 2342 else 2343 # With GCC up to 2.95.x, collect2 would create an import file 2344 # for dependence libraries. The import file would start with 2345 # the line '#! .'. This would cause the generated library to 2346 # depend on '.', always an invalid library. This was fixed in 2347 # development snapshots of GCC prior to 3.0. 2348 case $host_os in 2349 aix4 | aix4.[[01]] | aix4.[[01]].*) 2350 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2351 echo ' yes ' 2352 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2353 : 2354 else 2355 can_build_shared=no 2356 fi 2357 ;; 2358 esac 2359 # Using Import Files as archive members, it is possible to support 2360 # filename-based versioning of shared library archives on AIX. While 2361 # this would work for both with and without runtime linking, it will 2362 # prevent static linking of such archives. So we do filename-based 2363 # shared library versioning with .so extension only, which is used 2364 # when both runtime linking and shared linking is enabled. 2365 # Unfortunately, runtime linking may impact performance, so we do 2366 # not want this to be the default eventually. Also, we use the 2367 # versioned .so libs for executables only if there is the -brtl 2368 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2369 # To allow for filename-based versioning support, we need to create 2370 # libNAME.so.V as an archive file, containing: 2371 # *) an Import File, referring to the versioned filename of the 2372 # archive as well as the shared archive member, telling the 2373 # bitwidth (32 or 64) of that shared object, and providing the 2374 # list of exported symbols of that shared object, eventually 2375 # decorated with the 'weak' keyword 2376 # *) the shared object with the F_LOADONLY flag set, to really avoid 2377 # it being seen by the linker. 2378 # At run time we better use the real file rather than another symlink, 2379 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2380 2381 case $with_aix_soname,$aix_use_runtimelinking in 2382 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2383 # soname into executable. Probably we can add versioning support to 2384 # collect2, so additional links can be useful in future. 2385 aix,yes) # traditional libtool 2386 dynamic_linker='AIX unversionable lib.so' 2387 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2388 # instead of lib<name>.a to let people know that these are not 2389 # typical AIX shared libraries. 2390 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2391 ;; 2392 aix,no) # traditional AIX only 2393 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2394 # We preserve .a as extension for shared libraries through AIX4.2 2395 # and later when we are not doing run time linking. 2396 library_names_spec='$libname$release.a $libname.a' 2397 soname_spec='$libname$release$shared_ext$major' 2398 ;; 2399 svr4,*) # full svr4 only 2400 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2401 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2402 # We do not specify a path in Import Files, so LIBPATH fires. 2403 shlibpath_overrides_runpath=yes 2404 ;; 2405 *,yes) # both, prefer svr4 2406 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2407 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2408 # unpreferred sharedlib libNAME.a needs extra handling 2409 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"' 2410 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"' 2411 # We do not specify a path in Import Files, so LIBPATH fires. 2412 shlibpath_overrides_runpath=yes 2413 ;; 2414 *,no) # both, prefer aix 2415 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2416 library_names_spec='$libname$release.a $libname.a' 2417 soname_spec='$libname$release$shared_ext$major' 2418 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2419 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)' 2420 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"' 2421 ;; 2422 esac 2423 shlibpath_var=LIBPATH 2424 fi 2425 ;; 2426 2427amigaos*) 2428 case $host_cpu in 2429 powerpc) 2430 # Since July 2007 AmigaOS4 officially supports .so libraries. 2431 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2432 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2433 ;; 2434 m68k) 2435 library_names_spec='$libname.ixlibrary $libname.a' 2436 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2437 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' 2438 ;; 2439 esac 2440 ;; 2441 2442beos*) 2443 library_names_spec='$libname$shared_ext' 2444 dynamic_linker="$host_os ld.so" 2445 shlibpath_var=LIBRARY_PATH 2446 ;; 2447 2448bsdi[[45]]*) 2449 version_type=linux # correct to gnu/linux during the next big refactor 2450 need_version=no 2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2452 soname_spec='$libname$release$shared_ext$major' 2453 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2454 shlibpath_var=LD_LIBRARY_PATH 2455 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2456 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2457 # the default ld.so.conf also contains /usr/contrib/lib and 2458 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2459 # libtool to hard-code these into programs 2460 ;; 2461 2462cygwin* | mingw* | pw32* | cegcc*) 2463 version_type=windows 2464 shrext_cmds=.dll 2465 need_version=no 2466 need_lib_prefix=no 2467 2468 case $GCC,$cc_basename in 2469 yes,*) 2470 # gcc 2471 library_names_spec='$libname.dll.a' 2472 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2473 postinstall_cmds='base_file=`basename \$file`~ 2474 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2475 dldir=$destdir/`dirname \$dlpath`~ 2476 test -d \$dldir || mkdir -p \$dldir~ 2477 $install_prog $dir/$dlname \$dldir/$dlname~ 2478 chmod a+x \$dldir/$dlname~ 2479 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2480 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2481 fi' 2482 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2483 dlpath=$dir/\$dldll~ 2484 $RM \$dlpath' 2485 shlibpath_overrides_runpath=yes 2486 2487 case $host_os in 2488 cygwin*) 2489 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2490 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2491m4_if([$1], [],[ 2492 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2493 ;; 2494 mingw* | cegcc*) 2495 # MinGW DLLs use traditional 'lib' prefix 2496 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2497 ;; 2498 pw32*) 2499 # pw32 DLLs use 'pw' prefix rather than 'lib' 2500 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2501 ;; 2502 esac 2503 dynamic_linker='Win32 ld.exe' 2504 ;; 2505 2506 *,cl*) 2507 # Native MSVC 2508 libname_spec='$name' 2509 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2510 library_names_spec='$libname.dll.lib' 2511 2512 case $build_os in 2513 mingw*) 2514 sys_lib_search_path_spec= 2515 lt_save_ifs=$IFS 2516 IFS=';' 2517 for lt_path in $LIB 2518 do 2519 IFS=$lt_save_ifs 2520 # Let DOS variable expansion print the short 8.3 style file name. 2521 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2522 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2523 done 2524 IFS=$lt_save_ifs 2525 # Convert to MSYS style. 2526 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2527 ;; 2528 cygwin*) 2529 # Convert to unix form, then to dos form, then back to unix form 2530 # but this time dos style (no spaces!) so that the unix form looks 2531 # like /cygdrive/c/PROGRA~1:/cygdr... 2532 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2533 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2534 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2535 ;; 2536 *) 2537 sys_lib_search_path_spec=$LIB 2538 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2539 # It is most probably a Windows format PATH. 2540 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2541 else 2542 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2543 fi 2544 # FIXME: find the short name or the path components, as spaces are 2545 # common. (e.g. "Program Files" -> "PROGRA~1") 2546 ;; 2547 esac 2548 2549 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2550 postinstall_cmds='base_file=`basename \$file`~ 2551 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2552 dldir=$destdir/`dirname \$dlpath`~ 2553 test -d \$dldir || mkdir -p \$dldir~ 2554 $install_prog $dir/$dlname \$dldir/$dlname' 2555 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2556 dlpath=$dir/\$dldll~ 2557 $RM \$dlpath' 2558 shlibpath_overrides_runpath=yes 2559 dynamic_linker='Win32 link.exe' 2560 ;; 2561 2562 *) 2563 # Assume MSVC wrapper 2564 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2565 dynamic_linker='Win32 ld.exe' 2566 ;; 2567 esac 2568 # FIXME: first we should search . and the directory the executable is in 2569 shlibpath_var=PATH 2570 ;; 2571 2572darwin* | rhapsody*) 2573 dynamic_linker="$host_os dyld" 2574 version_type=darwin 2575 need_lib_prefix=no 2576 need_version=no 2577 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2578 soname_spec='$libname$release$major$shared_ext' 2579 shlibpath_overrides_runpath=yes 2580 shlibpath_var=DYLD_LIBRARY_PATH 2581 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2582m4_if([$1], [],[ 2583 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2584 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2585 ;; 2586 2587dgux*) 2588 version_type=linux # correct to gnu/linux during the next big refactor 2589 need_lib_prefix=no 2590 need_version=no 2591 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2592 soname_spec='$libname$release$shared_ext$major' 2593 shlibpath_var=LD_LIBRARY_PATH 2594 ;; 2595 2596freebsd* | dragonfly*) 2597 # DragonFly does not have aout. When/if they implement a new 2598 # versioning mechanism, adjust this. 2599 if test -x /usr/bin/objformat; then 2600 objformat=`/usr/bin/objformat` 2601 else 2602 case $host_os in 2603 freebsd[[23]].*) objformat=aout ;; 2604 *) objformat=elf ;; 2605 esac 2606 fi 2607 # Handle Gentoo/FreeBSD as it was Linux 2608 case $host_vendor in 2609 gentoo) 2610 version_type=linux ;; 2611 *) 2612 version_type=freebsd-$objformat ;; 2613 esac 2614 2615 case $version_type in 2616 freebsd-elf*) 2617 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2618 need_version=no 2619 need_lib_prefix=no 2620 ;; 2621 freebsd-*) 2622 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2623 need_version=yes 2624 ;; 2625 linux) 2626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2627 soname_spec='${libname}${release}${shared_ext}$major' 2628 need_lib_prefix=no 2629 need_version=no 2630 ;; 2631 esac 2632 shlibpath_var=LD_LIBRARY_PATH 2633 case $host_os in 2634 freebsd2.*) 2635 shlibpath_overrides_runpath=yes 2636 ;; 2637 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2638 shlibpath_overrides_runpath=yes 2639 hardcode_into_libs=yes 2640 ;; 2641 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2642 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2643 shlibpath_overrides_runpath=no 2644 hardcode_into_libs=yes 2645 ;; 2646 *) # from 4.6 on, and DragonFly 2647 shlibpath_overrides_runpath=yes 2648 hardcode_into_libs=yes 2649 ;; 2650 esac 2651 ;; 2652 2653haiku*) 2654 version_type=linux # correct to gnu/linux during the next big refactor 2655 need_lib_prefix=no 2656 need_version=no 2657 dynamic_linker="$host_os runtime_loader" 2658 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2659 soname_spec='$libname$release$shared_ext$major' 2660 shlibpath_var=LIBRARY_PATH 2661 shlibpath_overrides_runpath=no 2662 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2663 hardcode_into_libs=yes 2664 ;; 2665 2666hpux9* | hpux10* | hpux11*) 2667 # Give a soname corresponding to the major version so that dld.sl refuses to 2668 # link against other versions. 2669 version_type=sunos 2670 need_lib_prefix=no 2671 need_version=no 2672 case $host_cpu in 2673 ia64*) 2674 shrext_cmds='.so' 2675 hardcode_into_libs=yes 2676 dynamic_linker="$host_os dld.so" 2677 shlibpath_var=LD_LIBRARY_PATH 2678 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2679 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2680 soname_spec='$libname$release$shared_ext$major' 2681 if test 32 = "$HPUX_IA64_MODE"; then 2682 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2683 else 2684 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2685 fi 2686 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2687 ;; 2688 hppa*64*) 2689 shrext_cmds='.sl' 2690 hardcode_into_libs=yes 2691 dynamic_linker="$host_os dld.sl" 2692 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2693 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2694 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2695 soname_spec='$libname$release$shared_ext$major' 2696 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2697 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2698 ;; 2699 *) 2700 shrext_cmds='.sl' 2701 dynamic_linker="$host_os dld.sl" 2702 shlibpath_var=SHLIB_PATH 2703 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2704 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2705 soname_spec='$libname$release$shared_ext$major' 2706 ;; 2707 esac 2708 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2709 postinstall_cmds='chmod 555 $lib' 2710 # or fails outright, so override atomically: 2711 install_override_mode=555 2712 ;; 2713 2714interix[[3-9]]*) 2715 version_type=linux # correct to gnu/linux during the next big refactor 2716 need_lib_prefix=no 2717 need_version=no 2718 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2719 soname_spec='$libname$release$shared_ext$major' 2720 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2721 shlibpath_var=LD_LIBRARY_PATH 2722 shlibpath_overrides_runpath=no 2723 hardcode_into_libs=yes 2724 ;; 2725 2726irix5* | irix6* | nonstopux*) 2727 case $host_os in 2728 nonstopux*) version_type=nonstopux ;; 2729 *) 2730 if test yes = "$lt_cv_prog_gnu_ld"; then 2731 version_type=linux # correct to gnu/linux during the next big refactor 2732 else 2733 version_type=irix 2734 fi ;; 2735 esac 2736 need_lib_prefix=no 2737 need_version=no 2738 soname_spec='$libname$release$shared_ext$major' 2739 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2740 case $host_os in 2741 irix5* | nonstopux*) 2742 libsuff= shlibsuff= 2743 ;; 2744 *) 2745 case $LD in # libtool.m4 will add one of these switches to LD 2746 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2747 libsuff= shlibsuff= libmagic=32-bit;; 2748 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2749 libsuff=32 shlibsuff=N32 libmagic=N32;; 2750 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2751 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2752 *) libsuff= shlibsuff= libmagic=never-match;; 2753 esac 2754 ;; 2755 esac 2756 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2757 shlibpath_overrides_runpath=no 2758 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2759 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2760 hardcode_into_libs=yes 2761 ;; 2762 2763# No shared lib support for Linux oldld, aout, or coff. 2764linux*oldld* | linux*aout* | linux*coff*) 2765 dynamic_linker=no 2766 ;; 2767 2768linux*android*) 2769 version_type=none # Android doesn't support versioned libraries. 2770 need_lib_prefix=no 2771 need_version=no 2772 library_names_spec='$libname$release$shared_ext' 2773 soname_spec='$libname$release$shared_ext' 2774 finish_cmds= 2775 shlibpath_var=LD_LIBRARY_PATH 2776 shlibpath_overrides_runpath=yes 2777 2778 # This implies no fast_install, which is unacceptable. 2779 # Some rework will be needed to allow for fast_install 2780 # before this can be enabled. 2781 hardcode_into_libs=yes 2782 2783 dynamic_linker='Android linker' 2784 # Don't embed -rpath directories since the linker doesn't support them. 2785 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2786 ;; 2787 2788# This must be glibc/ELF. 2789linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2790 version_type=linux # correct to gnu/linux during the next big refactor 2791 need_lib_prefix=no 2792 need_version=no 2793 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2794 soname_spec='$libname$release$shared_ext$major' 2795 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2796 shlibpath_var=LD_LIBRARY_PATH 2797 shlibpath_overrides_runpath=no 2798 2799 # Some binutils ld are patched to set DT_RUNPATH 2800 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2801 [lt_cv_shlibpath_overrides_runpath=no 2802 save_LDFLAGS=$LDFLAGS 2803 save_libdir=$libdir 2804 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2805 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2806 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2807 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2808 [lt_cv_shlibpath_overrides_runpath=yes])]) 2809 LDFLAGS=$save_LDFLAGS 2810 libdir=$save_libdir 2811 ]) 2812 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2813 2814 # This implies no fast_install, which is unacceptable. 2815 # Some rework will be needed to allow for fast_install 2816 # before this can be enabled. 2817 hardcode_into_libs=yes 2818 2819 # Append ld.so.conf contents to the search path 2820 if test -f /etc/ld.so.conf; then 2821 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' ' '` 2822 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2823 fi 2824 2825 # We used to test for /lib/ld.so.1 and disable shared libraries on 2826 # powerpc, because MkLinux only supported shared libraries with the 2827 # GNU dynamic linker. Since this was broken with cross compilers, 2828 # most powerpc-linux boxes support dynamic linking these days and 2829 # people can always --disable-shared, the test was removed, and we 2830 # assume the GNU/Linux dynamic linker is in use. 2831 dynamic_linker='GNU/Linux ld.so' 2832 ;; 2833 2834netbsd*) 2835 version_type=sunos 2836 need_lib_prefix=no 2837 need_version=no 2838 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2839 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2840 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2841 dynamic_linker='NetBSD (a.out) ld.so' 2842 else 2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2844 soname_spec='$libname$release$shared_ext$major' 2845 dynamic_linker='NetBSD ld.elf_so' 2846 fi 2847 shlibpath_var=LD_LIBRARY_PATH 2848 shlibpath_overrides_runpath=yes 2849 hardcode_into_libs=yes 2850 ;; 2851 2852newsos6) 2853 version_type=linux # correct to gnu/linux during the next big refactor 2854 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2855 shlibpath_var=LD_LIBRARY_PATH 2856 shlibpath_overrides_runpath=yes 2857 ;; 2858 2859*nto* | *qnx*) 2860 version_type=qnx 2861 need_lib_prefix=no 2862 need_version=no 2863 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2864 soname_spec='$libname$release$shared_ext$major' 2865 shlibpath_var=LD_LIBRARY_PATH 2866 shlibpath_overrides_runpath=no 2867 hardcode_into_libs=yes 2868 dynamic_linker='ldqnx.so' 2869 ;; 2870 2871openbsd* | bitrig*) 2872 version_type=sunos 2873 sys_lib_dlsearch_path_spec=/usr/lib 2874 need_lib_prefix=no 2875 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2876 need_version=no 2877 else 2878 need_version=yes 2879 fi 2880 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2881 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2882 shlibpath_var=LD_LIBRARY_PATH 2883 shlibpath_overrides_runpath=yes 2884 ;; 2885 2886os2*) 2887 libname_spec='$name' 2888 version_type=windows 2889 shrext_cmds=.dll 2890 need_version=no 2891 need_lib_prefix=no 2892 # OS/2 can only load a DLL with a base name of 8 characters or less. 2893 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2894 v=$($ECHO $release$versuffix | tr -d .-); 2895 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2896 $ECHO $n$v`$shared_ext' 2897 library_names_spec='${libname}_dll.$libext' 2898 dynamic_linker='OS/2 ld.exe' 2899 shlibpath_var=BEGINLIBPATH 2900 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2901 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2902 postinstall_cmds='base_file=`basename \$file`~ 2903 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2904 dldir=$destdir/`dirname \$dlpath`~ 2905 test -d \$dldir || mkdir -p \$dldir~ 2906 $install_prog $dir/$dlname \$dldir/$dlname~ 2907 chmod a+x \$dldir/$dlname~ 2908 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2909 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2910 fi' 2911 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2912 dlpath=$dir/\$dldll~ 2913 $RM \$dlpath' 2914 ;; 2915 2916osf3* | osf4* | osf5*) 2917 version_type=osf 2918 need_lib_prefix=no 2919 need_version=no 2920 soname_spec='$libname$release$shared_ext$major' 2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2922 shlibpath_var=LD_LIBRARY_PATH 2923 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2924 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2925 ;; 2926 2927rdos*) 2928 dynamic_linker=no 2929 ;; 2930 2931solaris*) 2932 version_type=linux # correct to gnu/linux during the next big refactor 2933 need_lib_prefix=no 2934 need_version=no 2935 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2936 soname_spec='$libname$release$shared_ext$major' 2937 shlibpath_var=LD_LIBRARY_PATH 2938 shlibpath_overrides_runpath=yes 2939 hardcode_into_libs=yes 2940 # ldd complains unless libraries are executable 2941 postinstall_cmds='chmod +x $lib' 2942 ;; 2943 2944sunos4*) 2945 version_type=sunos 2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2947 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2948 shlibpath_var=LD_LIBRARY_PATH 2949 shlibpath_overrides_runpath=yes 2950 if test yes = "$with_gnu_ld"; then 2951 need_lib_prefix=no 2952 fi 2953 need_version=yes 2954 ;; 2955 2956sysv4 | sysv4.3*) 2957 version_type=linux # correct to gnu/linux during the next big refactor 2958 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2959 soname_spec='$libname$release$shared_ext$major' 2960 shlibpath_var=LD_LIBRARY_PATH 2961 case $host_vendor in 2962 sni) 2963 shlibpath_overrides_runpath=no 2964 need_lib_prefix=no 2965 runpath_var=LD_RUN_PATH 2966 ;; 2967 siemens) 2968 need_lib_prefix=no 2969 ;; 2970 motorola) 2971 need_lib_prefix=no 2972 need_version=no 2973 shlibpath_overrides_runpath=no 2974 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2975 ;; 2976 esac 2977 ;; 2978 2979sysv4*MP*) 2980 if test -d /usr/nec; then 2981 version_type=linux # correct to gnu/linux during the next big refactor 2982 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 2983 soname_spec='$libname$shared_ext.$major' 2984 shlibpath_var=LD_LIBRARY_PATH 2985 fi 2986 ;; 2987 2988sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2989 version_type=sco 2990 need_lib_prefix=no 2991 need_version=no 2992 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 2993 soname_spec='$libname$release$shared_ext$major' 2994 shlibpath_var=LD_LIBRARY_PATH 2995 shlibpath_overrides_runpath=yes 2996 hardcode_into_libs=yes 2997 if test yes = "$with_gnu_ld"; then 2998 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2999 else 3000 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3001 case $host_os in 3002 sco3.2v5*) 3003 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3004 ;; 3005 esac 3006 fi 3007 sys_lib_dlsearch_path_spec='/usr/lib' 3008 ;; 3009 3010tpf*) 3011 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3012 version_type=linux # correct to gnu/linux during the next big refactor 3013 need_lib_prefix=no 3014 need_version=no 3015 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3016 shlibpath_var=LD_LIBRARY_PATH 3017 shlibpath_overrides_runpath=no 3018 hardcode_into_libs=yes 3019 ;; 3020 3021uts4*) 3022 version_type=linux # correct to gnu/linux during the next big refactor 3023 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3024 soname_spec='$libname$release$shared_ext$major' 3025 shlibpath_var=LD_LIBRARY_PATH 3026 ;; 3027 3028*) 3029 dynamic_linker=no 3030 ;; 3031esac 3032AC_MSG_RESULT([$dynamic_linker]) 3033test no = "$dynamic_linker" && can_build_shared=no 3034 3035variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3036if test yes = "$GCC"; then 3037 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3038fi 3039 3040if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3041 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3042fi 3043if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3044 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3045fi 3046 3047_LT_DECL([], [variables_saved_for_relink], [1], 3048 [Variables whose values should be saved in libtool wrapper scripts and 3049 restored at link time]) 3050_LT_DECL([], [need_lib_prefix], [0], 3051 [Do we need the "lib" prefix for modules?]) 3052_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3053_LT_DECL([], [version_type], [0], [Library versioning type]) 3054_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3055_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3056_LT_DECL([], [shlibpath_overrides_runpath], [0], 3057 [Is shlibpath searched before the hard-coded library search path?]) 3058_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3059_LT_DECL([], [library_names_spec], [1], 3060 [[List of archive names. First name is the real one, the rest are links. 3061 The last name is the one that the linker finds with -lNAME]]) 3062_LT_DECL([], [soname_spec], [1], 3063 [[The coded name of the library, if different from the real name]]) 3064_LT_DECL([], [install_override_mode], [1], 3065 [Permission mode override for installation of shared libraries]) 3066_LT_DECL([], [postinstall_cmds], [2], 3067 [Command to use after installation of a shared archive]) 3068_LT_DECL([], [postuninstall_cmds], [2], 3069 [Command to use after uninstallation of a shared archive]) 3070_LT_DECL([], [finish_cmds], [2], 3071 [Commands used to finish a libtool library installation in a directory]) 3072_LT_DECL([], [finish_eval], [1], 3073 [[As "finish_cmds", except a single script fragment to be evaled but 3074 not shown]]) 3075_LT_DECL([], [hardcode_into_libs], [0], 3076 [Whether we should hardcode library paths into libraries]) 3077_LT_DECL([], [sys_lib_search_path_spec], [2], 3078 [Compile-time system search path for libraries]) 3079_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3080 [Run-time system search path for libraries]) 3081])# _LT_SYS_DYNAMIC_LINKER 3082 3083 3084# _LT_PATH_TOOL_PREFIX(TOOL) 3085# -------------------------- 3086# find a file program that can recognize shared library 3087AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3088[m4_require([_LT_DECL_EGREP])dnl 3089AC_MSG_CHECKING([for $1]) 3090AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3091[case $MAGIC_CMD in 3092[[\\/*] | ?:[\\/]*]) 3093 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3094 ;; 3095*) 3096 lt_save_MAGIC_CMD=$MAGIC_CMD 3097 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3098dnl $ac_dummy forces splitting on constant user-supplied paths. 3099dnl POSIX.2 word splitting is done only on the output of word expansions, 3100dnl not every word. This closes a longstanding sh security hole. 3101 ac_dummy="m4_if([$2], , $PATH, [$2])" 3102 for ac_dir in $ac_dummy; do 3103 IFS=$lt_save_ifs 3104 test -z "$ac_dir" && ac_dir=. 3105 if test -f "$ac_dir/$1"; then 3106 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3107 if test -n "$file_magic_test_file"; then 3108 case $deplibs_check_method in 3109 "file_magic "*) 3110 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3111 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3112 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3113 $EGREP "$file_magic_regex" > /dev/null; then 3114 : 3115 else 3116 cat <<_LT_EOF 1>&2 3117 3118*** Warning: the command libtool uses to detect shared libraries, 3119*** $file_magic_cmd, produces output that libtool cannot recognize. 3120*** The result is that libtool may fail to recognize shared libraries 3121*** as such. This will affect the creation of libtool libraries that 3122*** depend on shared libraries, but programs linked with such libtool 3123*** libraries will work regardless of this problem. Nevertheless, you 3124*** may want to report the problem to your system manager and/or to 3125*** bug-libtool@gnu.org 3126 3127_LT_EOF 3128 fi ;; 3129 esac 3130 fi 3131 break 3132 fi 3133 done 3134 IFS=$lt_save_ifs 3135 MAGIC_CMD=$lt_save_MAGIC_CMD 3136 ;; 3137esac]) 3138MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3139if test -n "$MAGIC_CMD"; then 3140 AC_MSG_RESULT($MAGIC_CMD) 3141else 3142 AC_MSG_RESULT(no) 3143fi 3144_LT_DECL([], [MAGIC_CMD], [0], 3145 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3146])# _LT_PATH_TOOL_PREFIX 3147 3148# Old name: 3149AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3150dnl aclocal-1.4 backwards compatibility: 3151dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3152 3153 3154# _LT_PATH_MAGIC 3155# -------------- 3156# find a file program that can recognize a shared library 3157m4_defun([_LT_PATH_MAGIC], 3158[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3159if test -z "$lt_cv_path_MAGIC_CMD"; then 3160 if test -n "$ac_tool_prefix"; then 3161 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3162 else 3163 MAGIC_CMD=: 3164 fi 3165fi 3166])# _LT_PATH_MAGIC 3167 3168 3169# LT_PATH_LD 3170# ---------- 3171# find the pathname to the GNU or non-GNU linker 3172AC_DEFUN([LT_PATH_LD], 3173[AC_REQUIRE([AC_PROG_CC])dnl 3174AC_REQUIRE([AC_CANONICAL_HOST])dnl 3175AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3176m4_require([_LT_DECL_SED])dnl 3177m4_require([_LT_DECL_EGREP])dnl 3178m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3179 3180AC_ARG_WITH([gnu-ld], 3181 [AS_HELP_STRING([--with-gnu-ld], 3182 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3183 [test no = "$withval" || with_gnu_ld=yes], 3184 [with_gnu_ld=no])dnl 3185 3186ac_prog=ld 3187if test yes = "$GCC"; then 3188 # Check if gcc -print-prog-name=ld gives a path. 3189 AC_MSG_CHECKING([for ld used by $CC]) 3190 case $host in 3191 *-*-mingw*) 3192 # gcc leaves a trailing carriage return, which upsets mingw 3193 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3194 *) 3195 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3196 esac 3197 case $ac_prog in 3198 # Accept absolute paths. 3199 [[\\/]]* | ?:[[\\/]]*) 3200 re_direlt='/[[^/]][[^/]]*/\.\./' 3201 # Canonicalize the pathname of ld 3202 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3203 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3204 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3205 done 3206 test -z "$LD" && LD=$ac_prog 3207 ;; 3208 "") 3209 # If it fails, then pretend we aren't using GCC. 3210 ac_prog=ld 3211 ;; 3212 *) 3213 # If it is relative, then search for the first ld in PATH. 3214 with_gnu_ld=unknown 3215 ;; 3216 esac 3217elif test yes = "$with_gnu_ld"; then 3218 AC_MSG_CHECKING([for GNU ld]) 3219else 3220 AC_MSG_CHECKING([for non-GNU ld]) 3221fi 3222AC_CACHE_VAL(lt_cv_path_LD, 3223[if test -z "$LD"; then 3224 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3225 for ac_dir in $PATH; do 3226 IFS=$lt_save_ifs 3227 test -z "$ac_dir" && ac_dir=. 3228 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3229 lt_cv_path_LD=$ac_dir/$ac_prog 3230 # Check to see if the program is GNU ld. I'd rather use --version, 3231 # but apparently some variants of GNU ld only accept -v. 3232 # Break only if it was the GNU/non-GNU ld that we prefer. 3233 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3234 *GNU* | *'with BFD'*) 3235 test no != "$with_gnu_ld" && break 3236 ;; 3237 *) 3238 test yes != "$with_gnu_ld" && break 3239 ;; 3240 esac 3241 fi 3242 done 3243 IFS=$lt_save_ifs 3244else 3245 lt_cv_path_LD=$LD # Let the user override the test with a path. 3246fi]) 3247LD=$lt_cv_path_LD 3248if test -n "$LD"; then 3249 AC_MSG_RESULT($LD) 3250else 3251 AC_MSG_RESULT(no) 3252fi 3253test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3254_LT_PATH_LD_GNU 3255AC_SUBST([LD]) 3256 3257_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3258])# LT_PATH_LD 3259 3260# Old names: 3261AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3262AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3263dnl aclocal-1.4 backwards compatibility: 3264dnl AC_DEFUN([AM_PROG_LD], []) 3265dnl AC_DEFUN([AC_PROG_LD], []) 3266 3267 3268# _LT_PATH_LD_GNU 3269#- -------------- 3270m4_defun([_LT_PATH_LD_GNU], 3271[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3272[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3273case `$LD -v 2>&1 </dev/null` in 3274*GNU* | *'with BFD'*) 3275 lt_cv_prog_gnu_ld=yes 3276 ;; 3277*) 3278 lt_cv_prog_gnu_ld=no 3279 ;; 3280esac]) 3281with_gnu_ld=$lt_cv_prog_gnu_ld 3282])# _LT_PATH_LD_GNU 3283 3284 3285# _LT_CMD_RELOAD 3286# -------------- 3287# find reload flag for linker 3288# -- PORTME Some linkers may need a different reload flag. 3289m4_defun([_LT_CMD_RELOAD], 3290[AC_CACHE_CHECK([for $LD option to reload object files], 3291 lt_cv_ld_reload_flag, 3292 [lt_cv_ld_reload_flag='-r']) 3293reload_flag=$lt_cv_ld_reload_flag 3294case $reload_flag in 3295"" | " "*) ;; 3296*) reload_flag=" $reload_flag" ;; 3297esac 3298reload_cmds='$LD$reload_flag -o $output$reload_objs' 3299case $host_os in 3300 cygwin* | mingw* | pw32* | cegcc*) 3301 if test yes != "$GCC"; then 3302 reload_cmds=false 3303 fi 3304 ;; 3305 darwin*) 3306 if test yes = "$GCC"; then 3307 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3308 else 3309 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3310 fi 3311 ;; 3312esac 3313_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3314_LT_TAGDECL([], [reload_cmds], [2])dnl 3315])# _LT_CMD_RELOAD 3316 3317 3318# _LT_PATH_DD 3319# ----------- 3320# find a working dd 3321m4_defun([_LT_PATH_DD], 3322[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3323[printf 0123456789abcdef0123456789abcdef >conftest.i 3324cat conftest.i conftest.i >conftest2.i 3325: ${lt_DD:=$DD} 3326AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3327[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3328 cmp -s conftest.i conftest.out \ 3329 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3330fi]) 3331rm -f conftest.i conftest2.i conftest.out]) 3332])# _LT_PATH_DD 3333 3334 3335# _LT_CMD_TRUNCATE 3336# ---------------- 3337# find command to truncate a binary pipe 3338m4_defun([_LT_CMD_TRUNCATE], 3339[m4_require([_LT_PATH_DD]) 3340AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3341[printf 0123456789abcdef0123456789abcdef >conftest.i 3342cat conftest.i conftest.i >conftest2.i 3343lt_cv_truncate_bin= 3344if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3345 cmp -s conftest.i conftest.out \ 3346 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3347fi 3348rm -f conftest.i conftest2.i conftest.out 3349test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3350_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3351 [Command to truncate a binary pipe]) 3352])# _LT_CMD_TRUNCATE 3353 3354 3355# _LT_CHECK_MAGIC_METHOD 3356# ---------------------- 3357# how to check for library dependencies 3358# -- PORTME fill in with the dynamic library characteristics 3359m4_defun([_LT_CHECK_MAGIC_METHOD], 3360[m4_require([_LT_DECL_EGREP]) 3361m4_require([_LT_DECL_OBJDUMP]) 3362AC_CACHE_CHECK([how to recognize dependent libraries], 3363lt_cv_deplibs_check_method, 3364[lt_cv_file_magic_cmd='$MAGIC_CMD' 3365lt_cv_file_magic_test_file= 3366lt_cv_deplibs_check_method='unknown' 3367# Need to set the preceding variable on all platforms that support 3368# interlibrary dependencies. 3369# 'none' -- dependencies not supported. 3370# 'unknown' -- same as none, but documents that we really don't know. 3371# 'pass_all' -- all dependencies passed with no checks. 3372# 'test_compile' -- check by making test program. 3373# 'file_magic [[regex]]' -- check by looking for files in library path 3374# that responds to the $file_magic_cmd with a given extended regex. 3375# If you have 'file' or equivalent on your system and you're not sure 3376# whether 'pass_all' will *always* work, you probably want this one. 3377 3378case $host_os in 3379aix[[4-9]]*) 3380 lt_cv_deplibs_check_method=pass_all 3381 ;; 3382 3383beos*) 3384 lt_cv_deplibs_check_method=pass_all 3385 ;; 3386 3387bsdi[[45]]*) 3388 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3389 lt_cv_file_magic_cmd='/usr/bin/file -L' 3390 lt_cv_file_magic_test_file=/shlib/libc.so 3391 ;; 3392 3393cygwin*) 3394 # func_win32_libid is a shell function defined in ltmain.sh 3395 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3396 lt_cv_file_magic_cmd='func_win32_libid' 3397 ;; 3398 3399mingw* | pw32*) 3400 # Base MSYS/MinGW do not provide the 'file' command needed by 3401 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3402 # unless we find 'file', for example because we are cross-compiling. 3403 if ( file / ) >/dev/null 2>&1; then 3404 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3405 lt_cv_file_magic_cmd='func_win32_libid' 3406 else 3407 # Keep this pattern in sync with the one in func_win32_libid. 3408 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3409 lt_cv_file_magic_cmd='$OBJDUMP -f' 3410 fi 3411 ;; 3412 3413cegcc*) 3414 # use the weaker test based on 'objdump'. See mingw*. 3415 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3416 lt_cv_file_magic_cmd='$OBJDUMP -f' 3417 ;; 3418 3419darwin* | rhapsody*) 3420 lt_cv_deplibs_check_method=pass_all 3421 ;; 3422 3423freebsd* | dragonfly*) 3424 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3425 case $host_cpu in 3426 i*86 ) 3427 # Not sure whether the presence of OpenBSD here was a mistake. 3428 # Let's accept both of them until this is cleared up. 3429 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3430 lt_cv_file_magic_cmd=/usr/bin/file 3431 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3432 ;; 3433 esac 3434 else 3435 lt_cv_deplibs_check_method=pass_all 3436 fi 3437 ;; 3438 3439haiku*) 3440 lt_cv_deplibs_check_method=pass_all 3441 ;; 3442 3443hpux10.20* | hpux11*) 3444 lt_cv_file_magic_cmd=/usr/bin/file 3445 case $host_cpu in 3446 ia64*) 3447 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3448 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3449 ;; 3450 hppa*64*) 3451 [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]'] 3452 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3453 ;; 3454 *) 3455 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3456 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3457 ;; 3458 esac 3459 ;; 3460 3461interix[[3-9]]*) 3462 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3463 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3464 ;; 3465 3466irix5* | irix6* | nonstopux*) 3467 case $LD in 3468 *-32|*"-32 ") libmagic=32-bit;; 3469 *-n32|*"-n32 ") libmagic=N32;; 3470 *-64|*"-64 ") libmagic=64-bit;; 3471 *) libmagic=never-match;; 3472 esac 3473 lt_cv_deplibs_check_method=pass_all 3474 ;; 3475 3476# This must be glibc/ELF. 3477linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3478 lt_cv_deplibs_check_method=pass_all 3479 ;; 3480 3481netbsd*) 3482 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3483 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3484 else 3485 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3486 fi 3487 ;; 3488 3489newos6*) 3490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3491 lt_cv_file_magic_cmd=/usr/bin/file 3492 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3493 ;; 3494 3495*nto* | *qnx*) 3496 lt_cv_deplibs_check_method=pass_all 3497 ;; 3498 3499openbsd* | bitrig*) 3500 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3501 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3502 else 3503 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3504 fi 3505 ;; 3506 3507osf3* | osf4* | osf5*) 3508 lt_cv_deplibs_check_method=pass_all 3509 ;; 3510 3511rdos*) 3512 lt_cv_deplibs_check_method=pass_all 3513 ;; 3514 3515solaris*) 3516 lt_cv_deplibs_check_method=pass_all 3517 ;; 3518 3519sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3520 lt_cv_deplibs_check_method=pass_all 3521 ;; 3522 3523sysv4 | sysv4.3*) 3524 case $host_vendor in 3525 motorola) 3526 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]]' 3527 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3528 ;; 3529 ncr) 3530 lt_cv_deplibs_check_method=pass_all 3531 ;; 3532 sequent) 3533 lt_cv_file_magic_cmd='/bin/file' 3534 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3535 ;; 3536 sni) 3537 lt_cv_file_magic_cmd='/bin/file' 3538 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3539 lt_cv_file_magic_test_file=/lib/libc.so 3540 ;; 3541 siemens) 3542 lt_cv_deplibs_check_method=pass_all 3543 ;; 3544 pc) 3545 lt_cv_deplibs_check_method=pass_all 3546 ;; 3547 esac 3548 ;; 3549 3550tpf*) 3551 lt_cv_deplibs_check_method=pass_all 3552 ;; 3553os2*) 3554 lt_cv_deplibs_check_method=pass_all 3555 ;; 3556esac 3557]) 3558 3559file_magic_glob= 3560want_nocaseglob=no 3561if test "$build" = "$host"; then 3562 case $host_os in 3563 mingw* | pw32*) 3564 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3565 want_nocaseglob=yes 3566 else 3567 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3568 fi 3569 ;; 3570 esac 3571fi 3572 3573file_magic_cmd=$lt_cv_file_magic_cmd 3574deplibs_check_method=$lt_cv_deplibs_check_method 3575test -z "$deplibs_check_method" && deplibs_check_method=unknown 3576 3577_LT_DECL([], [deplibs_check_method], [1], 3578 [Method to check whether dependent libraries are shared objects]) 3579_LT_DECL([], [file_magic_cmd], [1], 3580 [Command to use when deplibs_check_method = "file_magic"]) 3581_LT_DECL([], [file_magic_glob], [1], 3582 [How to find potential files when deplibs_check_method = "file_magic"]) 3583_LT_DECL([], [want_nocaseglob], [1], 3584 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3585])# _LT_CHECK_MAGIC_METHOD 3586 3587 3588# LT_PATH_NM 3589# ---------- 3590# find the pathname to a BSD- or MS-compatible name lister 3591AC_DEFUN([LT_PATH_NM], 3592[AC_REQUIRE([AC_PROG_CC])dnl 3593AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3594[if test -n "$NM"; then 3595 # Let the user override the test. 3596 lt_cv_path_NM=$NM 3597else 3598 lt_nm_to_check=${ac_tool_prefix}nm 3599 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3600 lt_nm_to_check="$lt_nm_to_check nm" 3601 fi 3602 for lt_tmp_nm in $lt_nm_to_check; do 3603 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3604 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3605 IFS=$lt_save_ifs 3606 test -z "$ac_dir" && ac_dir=. 3607 tmp_nm=$ac_dir/$lt_tmp_nm 3608 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3609 # Check to see if the nm accepts a BSD-compat flag. 3610 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3611 # nm: unknown option "B" ignored 3612 # Tru64's nm complains that /dev/null is an invalid object file 3613 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3614 case $build_os in 3615 mingw*) lt_bad_file=conftest.nm/nofile ;; 3616 *) lt_bad_file=/dev/null ;; 3617 esac 3618 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3619 *$lt_bad_file* | *'Invalid file or object type'*) 3620 lt_cv_path_NM="$tmp_nm -B" 3621 break 2 3622 ;; 3623 *) 3624 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3625 */dev/null*) 3626 lt_cv_path_NM="$tmp_nm -p" 3627 break 2 3628 ;; 3629 *) 3630 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3631 continue # so that we can try to find one that supports BSD flags 3632 ;; 3633 esac 3634 ;; 3635 esac 3636 fi 3637 done 3638 IFS=$lt_save_ifs 3639 done 3640 : ${lt_cv_path_NM=no} 3641fi]) 3642if test no != "$lt_cv_path_NM"; then 3643 NM=$lt_cv_path_NM 3644else 3645 # Didn't find any BSD compatible name lister, look for dumpbin. 3646 if test -n "$DUMPBIN"; then : 3647 # Let the user override the test. 3648 else 3649 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3650 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3651 *COFF*) 3652 DUMPBIN="$DUMPBIN -symbols -headers" 3653 ;; 3654 *) 3655 DUMPBIN=: 3656 ;; 3657 esac 3658 fi 3659 AC_SUBST([DUMPBIN]) 3660 if test : != "$DUMPBIN"; then 3661 NM=$DUMPBIN 3662 fi 3663fi 3664test -z "$NM" && NM=nm 3665AC_SUBST([NM]) 3666_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3667 3668AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3669 [lt_cv_nm_interface="BSD nm" 3670 echo "int some_variable = 0;" > conftest.$ac_ext 3671 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3672 (eval "$ac_compile" 2>conftest.err) 3673 cat conftest.err >&AS_MESSAGE_LOG_FD 3674 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3675 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3676 cat conftest.err >&AS_MESSAGE_LOG_FD 3677 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3678 cat conftest.out >&AS_MESSAGE_LOG_FD 3679 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3680 lt_cv_nm_interface="MS dumpbin" 3681 fi 3682 rm -f conftest*]) 3683])# LT_PATH_NM 3684 3685# Old names: 3686AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3687AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3688dnl aclocal-1.4 backwards compatibility: 3689dnl AC_DEFUN([AM_PROG_NM], []) 3690dnl AC_DEFUN([AC_PROG_NM], []) 3691 3692# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3693# -------------------------------- 3694# how to determine the name of the shared library 3695# associated with a specific link library. 3696# -- PORTME fill in with the dynamic library characteristics 3697m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3698[m4_require([_LT_DECL_EGREP]) 3699m4_require([_LT_DECL_OBJDUMP]) 3700m4_require([_LT_DECL_DLLTOOL]) 3701AC_CACHE_CHECK([how to associate runtime and link libraries], 3702lt_cv_sharedlib_from_linklib_cmd, 3703[lt_cv_sharedlib_from_linklib_cmd='unknown' 3704 3705case $host_os in 3706cygwin* | mingw* | pw32* | cegcc*) 3707 # two different shell functions defined in ltmain.sh; 3708 # decide which one to use based on capabilities of $DLLTOOL 3709 case `$DLLTOOL --help 2>&1` in 3710 *--identify-strict*) 3711 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3712 ;; 3713 *) 3714 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3715 ;; 3716 esac 3717 ;; 3718*) 3719 # fallback: assume linklib IS sharedlib 3720 lt_cv_sharedlib_from_linklib_cmd=$ECHO 3721 ;; 3722esac 3723]) 3724sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3725test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3726 3727_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3728 [Command to associate shared and link libraries]) 3729])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3730 3731 3732# _LT_PATH_MANIFEST_TOOL 3733# ---------------------- 3734# locate the manifest tool 3735m4_defun([_LT_PATH_MANIFEST_TOOL], 3736[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3737test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3738AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3739 [lt_cv_path_mainfest_tool=no 3740 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3741 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3742 cat conftest.err >&AS_MESSAGE_LOG_FD 3743 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3744 lt_cv_path_mainfest_tool=yes 3745 fi 3746 rm -f conftest*]) 3747if test yes != "$lt_cv_path_mainfest_tool"; then 3748 MANIFEST_TOOL=: 3749fi 3750_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3751])# _LT_PATH_MANIFEST_TOOL 3752 3753 3754# _LT_DLL_DEF_P([FILE]) 3755# --------------------- 3756# True iff FILE is a Windows DLL '.def' file. 3757# Keep in sync with func_dll_def_p in the libtool script 3758AC_DEFUN([_LT_DLL_DEF_P], 3759[dnl 3760 test DEF = "`$SED -n dnl 3761 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3762 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3763 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3764 -e q dnl Only consider the first "real" line 3765 $1`" dnl 3766])# _LT_DLL_DEF_P 3767 3768 3769# LT_LIB_M 3770# -------- 3771# check for math library 3772AC_DEFUN([LT_LIB_M], 3773[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3774LIBM= 3775case $host in 3776*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3777 # These system don't have libm, or don't need it 3778 ;; 3779*-ncr-sysv4.3*) 3780 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3781 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3782 ;; 3783*) 3784 AC_CHECK_LIB(m, cos, LIBM=-lm) 3785 ;; 3786esac 3787AC_SUBST([LIBM]) 3788])# LT_LIB_M 3789 3790# Old name: 3791AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3792dnl aclocal-1.4 backwards compatibility: 3793dnl AC_DEFUN([AC_CHECK_LIBM], []) 3794 3795 3796# _LT_COMPILER_NO_RTTI([TAGNAME]) 3797# ------------------------------- 3798m4_defun([_LT_COMPILER_NO_RTTI], 3799[m4_require([_LT_TAG_COMPILER])dnl 3800 3801_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3802 3803if test yes = "$GCC"; then 3804 case $cc_basename in 3805 nvcc*) 3806 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3807 *) 3808 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3809 esac 3810 3811 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3812 lt_cv_prog_compiler_rtti_exceptions, 3813 [-fno-rtti -fno-exceptions], [], 3814 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3815fi 3816_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3817 [Compiler flag to turn off builtin functions]) 3818])# _LT_COMPILER_NO_RTTI 3819 3820 3821# _LT_CMD_GLOBAL_SYMBOLS 3822# ---------------------- 3823m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3824[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3825AC_REQUIRE([AC_PROG_CC])dnl 3826AC_REQUIRE([AC_PROG_AWK])dnl 3827AC_REQUIRE([LT_PATH_NM])dnl 3828AC_REQUIRE([LT_PATH_LD])dnl 3829m4_require([_LT_DECL_SED])dnl 3830m4_require([_LT_DECL_EGREP])dnl 3831m4_require([_LT_TAG_COMPILER])dnl 3832 3833# Check for command to grab the raw symbol name followed by C symbol from nm. 3834AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3835AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3836[ 3837# These are sane defaults that work on at least a few old systems. 3838# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3839 3840# Character class describing NM global symbol codes. 3841symcode='[[BCDEGRST]]' 3842 3843# Regexp to match symbols that can be accessed directly from C. 3844sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3845 3846# Define system-specific variables. 3847case $host_os in 3848aix*) 3849 symcode='[[BCDT]]' 3850 ;; 3851cygwin* | mingw* | pw32* | cegcc*) 3852 symcode='[[ABCDGISTW]]' 3853 ;; 3854hpux*) 3855 if test ia64 = "$host_cpu"; then 3856 symcode='[[ABCDEGRST]]' 3857 fi 3858 ;; 3859irix* | nonstopux*) 3860 symcode='[[BCDEGRST]]' 3861 ;; 3862osf*) 3863 symcode='[[BCDEGQRST]]' 3864 ;; 3865solaris*) 3866 symcode='[[BDRT]]' 3867 ;; 3868sco3.2v5*) 3869 symcode='[[DT]]' 3870 ;; 3871sysv4.2uw2*) 3872 symcode='[[DT]]' 3873 ;; 3874sysv5* | sco5v6* | unixware* | OpenUNIX*) 3875 symcode='[[ABDT]]' 3876 ;; 3877sysv4) 3878 symcode='[[DFNSTU]]' 3879 ;; 3880esac 3881 3882# If we're using GNU nm, then use its standard symbol codes. 3883case `$NM -V 2>&1` in 3884*GNU* | *'with BFD'*) 3885 symcode='[[ABCDGIRSTW]]' ;; 3886esac 3887 3888if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3889 # Gets list of data symbols to import. 3890 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3891 # Adjust the below global symbol transforms to fixup imported variables. 3892 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3893 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3894 lt_c_name_lib_hook="\ 3895 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3896 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3897else 3898 # Disable hooks by default. 3899 lt_cv_sys_global_symbol_to_import= 3900 lt_cdecl_hook= 3901 lt_c_name_hook= 3902 lt_c_name_lib_hook= 3903fi 3904 3905# Transform an extracted symbol line into a proper C declaration. 3906# Some systems (esp. on ia64) link data and code symbols differently, 3907# so use this general approach. 3908lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3909$lt_cdecl_hook\ 3910" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3911" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3912 3913# Transform an extracted symbol line into symbol name and symbol address 3914lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3915$lt_c_name_hook\ 3916" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3917" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 3918 3919# Transform an extracted symbol line into symbol name with lib prefix and 3920# symbol address. 3921lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 3922$lt_c_name_lib_hook\ 3923" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3924" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 3925" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 3926 3927# Handle CRLF in mingw tool chain 3928opt_cr= 3929case $build_os in 3930mingw*) 3931 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3932 ;; 3933esac 3934 3935# Try without a prefix underscore, then with it. 3936for ac_symprfx in "" "_"; do 3937 3938 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3939 symxfrm="\\1 $ac_symprfx\\2 \\2" 3940 3941 # Write the raw and C identifiers. 3942 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3943 # Fake it for dumpbin and say T for any non-static function, 3944 # D for any global variable and I for any imported variable. 3945 # Also find C++ and __fastcall symbols from MSVC++, 3946 # which start with @ or ?. 3947 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3948" {last_section=section; section=\$ 3};"\ 3949" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3950" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3951" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 3952" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 3953" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 3954" \$ 0!~/External *\|/{next};"\ 3955" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3956" {if(hide[section]) next};"\ 3957" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 3958" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 3959" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 3960" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 3961" ' prfx=^$ac_symprfx]" 3962 else 3963 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3964 fi 3965 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3966 3967 # Check to see that the pipe works correctly. 3968 pipe_works=no 3969 3970 rm -f conftest* 3971 cat > conftest.$ac_ext <<_LT_EOF 3972#ifdef __cplusplus 3973extern "C" { 3974#endif 3975char nm_test_var; 3976void nm_test_func(void); 3977void nm_test_func(void){} 3978#ifdef __cplusplus 3979} 3980#endif 3981int main(){nm_test_var='a';nm_test_func();return(0);} 3982_LT_EOF 3983 3984 if AC_TRY_EVAL(ac_compile); then 3985 # Now try to grab the symbols. 3986 nlist=conftest.nm 3987 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3988 # Try sorting and uniquifying the output. 3989 if sort "$nlist" | uniq > "$nlist"T; then 3990 mv -f "$nlist"T "$nlist" 3991 else 3992 rm -f "$nlist"T 3993 fi 3994 3995 # Make sure that we snagged all the symbols we need. 3996 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3997 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3998 cat <<_LT_EOF > conftest.$ac_ext 3999/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4000#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4001/* DATA imports from DLLs on WIN32 can't be const, because runtime 4002 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4003# define LT@&t@_DLSYM_CONST 4004#elif defined __osf__ 4005/* This system does not cope well with relocations in const data. */ 4006# define LT@&t@_DLSYM_CONST 4007#else 4008# define LT@&t@_DLSYM_CONST const 4009#endif 4010 4011#ifdef __cplusplus 4012extern "C" { 4013#endif 4014 4015_LT_EOF 4016 # Now generate the symbol file. 4017 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4018 4019 cat <<_LT_EOF >> conftest.$ac_ext 4020 4021/* The mapping between symbol names and symbols. */ 4022LT@&t@_DLSYM_CONST struct { 4023 const char *name; 4024 void *address; 4025} 4026lt__PROGRAM__LTX_preloaded_symbols[[]] = 4027{ 4028 { "@PROGRAM@", (void *) 0 }, 4029_LT_EOF 4030 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4031 cat <<\_LT_EOF >> conftest.$ac_ext 4032 {0, (void *) 0} 4033}; 4034 4035/* This works around a problem in FreeBSD linker */ 4036#ifdef FREEBSD_WORKAROUND 4037static const void *lt_preloaded_setup() { 4038 return lt__PROGRAM__LTX_preloaded_symbols; 4039} 4040#endif 4041 4042#ifdef __cplusplus 4043} 4044#endif 4045_LT_EOF 4046 # Now try linking the two files. 4047 mv conftest.$ac_objext conftstm.$ac_objext 4048 lt_globsym_save_LIBS=$LIBS 4049 lt_globsym_save_CFLAGS=$CFLAGS 4050 LIBS=conftstm.$ac_objext 4051 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4052 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4053 pipe_works=yes 4054 fi 4055 LIBS=$lt_globsym_save_LIBS 4056 CFLAGS=$lt_globsym_save_CFLAGS 4057 else 4058 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4059 fi 4060 else 4061 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4062 fi 4063 else 4064 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4065 fi 4066 else 4067 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4068 cat conftest.$ac_ext >&5 4069 fi 4070 rm -rf conftest* conftst* 4071 4072 # Do not use the global_symbol_pipe unless it works. 4073 if test yes = "$pipe_works"; then 4074 break 4075 else 4076 lt_cv_sys_global_symbol_pipe= 4077 fi 4078done 4079]) 4080if test -z "$lt_cv_sys_global_symbol_pipe"; then 4081 lt_cv_sys_global_symbol_to_cdecl= 4082fi 4083if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4084 AC_MSG_RESULT(failed) 4085else 4086 AC_MSG_RESULT(ok) 4087fi 4088 4089# Response file support. 4090if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4091 nm_file_list_spec='@' 4092elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4093 nm_file_list_spec='@' 4094fi 4095 4096_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4097 [Take the output of nm and produce a listing of raw symbols and C names]) 4098_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4099 [Transform the output of nm in a proper C declaration]) 4100_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4101 [Transform the output of nm into a list of symbols to manually relocate]) 4102_LT_DECL([global_symbol_to_c_name_address], 4103 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4104 [Transform the output of nm in a C name address pair]) 4105_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4106 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4107 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4108_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4109 [The name lister interface]) 4110_LT_DECL([], [nm_file_list_spec], [1], 4111 [Specify filename containing input files for $NM]) 4112]) # _LT_CMD_GLOBAL_SYMBOLS 4113 4114 4115# _LT_COMPILER_PIC([TAGNAME]) 4116# --------------------------- 4117m4_defun([_LT_COMPILER_PIC], 4118[m4_require([_LT_TAG_COMPILER])dnl 4119_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4120_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4121_LT_TAGVAR(lt_prog_compiler_static, $1)= 4122 4123m4_if([$1], [CXX], [ 4124 # C++ specific cases for pic, static, wl, etc. 4125 if test yes = "$GXX"; then 4126 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4127 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4128 4129 case $host_os in 4130 aix*) 4131 # All AIX code is PIC. 4132 if test ia64 = "$host_cpu"; then 4133 # AIX 5 now supports IA64 processor 4134 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4135 fi 4136 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4137 ;; 4138 4139 amigaos*) 4140 case $host_cpu in 4141 powerpc) 4142 # see comment about AmigaOS4 .so support 4143 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4144 ;; 4145 m68k) 4146 # FIXME: we need at least 68020 code to build shared libraries, but 4147 # adding the '-m68020' flag to GCC prevents building anything better, 4148 # like '-m68040'. 4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4150 ;; 4151 esac 4152 ;; 4153 4154 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4155 # PIC is the default for these OSes. 4156 ;; 4157 mingw* | cygwin* | os2* | pw32* | cegcc*) 4158 # This hack is so that the source file can tell whether it is being 4159 # built for inclusion in a dll (and should export symbols for example). 4160 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4161 # (--disable-auto-import) libraries 4162 m4_if([$1], [GCJ], [], 4163 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4164 case $host_os in 4165 os2*) 4166 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4167 ;; 4168 esac 4169 ;; 4170 darwin* | rhapsody*) 4171 # PIC is the default on this platform 4172 # Common symbols not allowed in MH_DYLIB files 4173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4174 ;; 4175 *djgpp*) 4176 # DJGPP does not support shared libraries at all 4177 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4178 ;; 4179 haiku*) 4180 # PIC is the default for Haiku. 4181 # The "-static" flag exists, but is broken. 4182 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4183 ;; 4184 interix[[3-9]]*) 4185 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4186 # Instead, we relocate shared libraries at runtime. 4187 ;; 4188 sysv4*MP*) 4189 if test -d /usr/nec; then 4190 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4191 fi 4192 ;; 4193 hpux*) 4194 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4195 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4196 # sets the default TLS model and affects inlining. 4197 case $host_cpu in 4198 hppa*64*) 4199 ;; 4200 *) 4201 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4202 ;; 4203 esac 4204 ;; 4205 *qnx* | *nto*) 4206 # QNX uses GNU C++, but need to define -shared option too, otherwise 4207 # it will coredump. 4208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4209 ;; 4210 *) 4211 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4212 ;; 4213 esac 4214 else 4215 case $host_os in 4216 aix[[4-9]]*) 4217 # All AIX code is PIC. 4218 if test ia64 = "$host_cpu"; then 4219 # AIX 5 now supports IA64 processor 4220 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221 else 4222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4223 fi 4224 ;; 4225 chorus*) 4226 case $cc_basename in 4227 cxch68*) 4228 # Green Hills C++ Compiler 4229 # _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" 4230 ;; 4231 esac 4232 ;; 4233 mingw* | cygwin* | os2* | pw32* | cegcc*) 4234 # This hack is so that the source file can tell whether it is being 4235 # built for inclusion in a dll (and should export symbols for example). 4236 m4_if([$1], [GCJ], [], 4237 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4238 ;; 4239 dgux*) 4240 case $cc_basename in 4241 ec++*) 4242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4243 ;; 4244 ghcx*) 4245 # Green Hills C++ Compiler 4246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4247 ;; 4248 *) 4249 ;; 4250 esac 4251 ;; 4252 freebsd* | dragonfly*) 4253 # FreeBSD uses GNU C++ 4254 ;; 4255 hpux9* | hpux10* | hpux11*) 4256 case $cc_basename in 4257 CC*) 4258 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4259 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4260 if test ia64 != "$host_cpu"; then 4261 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4262 fi 4263 ;; 4264 aCC*) 4265 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4266 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4267 case $host_cpu in 4268 hppa*64*|ia64*) 4269 # +Z the default 4270 ;; 4271 *) 4272 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4273 ;; 4274 esac 4275 ;; 4276 *) 4277 ;; 4278 esac 4279 ;; 4280 interix*) 4281 # This is c89, which is MS Visual C++ (no shared libs) 4282 # Anyone wants to do a port? 4283 ;; 4284 irix5* | irix6* | nonstopux*) 4285 case $cc_basename in 4286 CC*) 4287 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4288 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4289 # CC pic flag -KPIC is the default. 4290 ;; 4291 *) 4292 ;; 4293 esac 4294 ;; 4295 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4296 case $cc_basename in 4297 KCC*) 4298 # KAI C++ Compiler 4299 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4300 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4301 ;; 4302 ecpc* ) 4303 # old Intel C++ for x86_64, which still supported -KPIC. 4304 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4305 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4306 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4307 ;; 4308 icpc* ) 4309 # Intel C++, used to be incompatible with GCC. 4310 # ICC 10 doesn't accept -KPIC any more. 4311 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4312 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4313 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4314 ;; 4315 pgCC* | pgcpp*) 4316 # Portland Group C++ compiler 4317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4318 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4319 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4320 ;; 4321 cxx*) 4322 # Compaq C++ 4323 # Make sure the PIC flag is empty. It appears that all Alpha 4324 # Linux and Compaq Tru64 Unix objects are PIC. 4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4326 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4327 ;; 4328 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4329 # IBM XL 8.0, 9.0 on PPC and BlueGene 4330 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4332 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4333 ;; 4334 *) 4335 case `$CC -V 2>&1 | sed 5q` in 4336 *Sun\ C*) 4337 # Sun C++ 5.9 4338 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4340 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4341 ;; 4342 esac 4343 ;; 4344 esac 4345 ;; 4346 lynxos*) 4347 ;; 4348 m88k*) 4349 ;; 4350 mvs*) 4351 case $cc_basename in 4352 cxx*) 4353 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4354 ;; 4355 *) 4356 ;; 4357 esac 4358 ;; 4359 netbsd*) 4360 ;; 4361 *qnx* | *nto*) 4362 # QNX uses GNU C++, but need to define -shared option too, otherwise 4363 # it will coredump. 4364 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4365 ;; 4366 osf3* | osf4* | osf5*) 4367 case $cc_basename in 4368 KCC*) 4369 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4370 ;; 4371 RCC*) 4372 # Rational C++ 2.4.1 4373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4374 ;; 4375 cxx*) 4376 # Digital/Compaq C++ 4377 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4378 # Make sure the PIC flag is empty. It appears that all Alpha 4379 # Linux and Compaq Tru64 Unix objects are PIC. 4380 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4381 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4382 ;; 4383 *) 4384 ;; 4385 esac 4386 ;; 4387 psos*) 4388 ;; 4389 solaris*) 4390 case $cc_basename in 4391 CC* | sunCC*) 4392 # Sun C++ 4.2, 5.x and Centerline C++ 4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4396 ;; 4397 gcx*) 4398 # Green Hills C++ Compiler 4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4400 ;; 4401 *) 4402 ;; 4403 esac 4404 ;; 4405 sunos4*) 4406 case $cc_basename in 4407 CC*) 4408 # Sun C++ 4.x 4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4411 ;; 4412 lcc*) 4413 # Lucid 4414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4415 ;; 4416 *) 4417 ;; 4418 esac 4419 ;; 4420 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4421 case $cc_basename in 4422 CC*) 4423 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4424 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4425 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4426 ;; 4427 esac 4428 ;; 4429 tandem*) 4430 case $cc_basename in 4431 NCC*) 4432 # NonStop-UX NCC 3.20 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434 ;; 4435 *) 4436 ;; 4437 esac 4438 ;; 4439 vxworks*) 4440 ;; 4441 *) 4442 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4443 ;; 4444 esac 4445 fi 4446], 4447[ 4448 if test yes = "$GCC"; then 4449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4451 4452 case $host_os in 4453 aix*) 4454 # All AIX code is PIC. 4455 if test ia64 = "$host_cpu"; then 4456 # AIX 5 now supports IA64 processor 4457 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4458 fi 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4460 ;; 4461 4462 amigaos*) 4463 case $host_cpu in 4464 powerpc) 4465 # see comment about AmigaOS4 .so support 4466 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4467 ;; 4468 m68k) 4469 # FIXME: we need at least 68020 code to build shared libraries, but 4470 # adding the '-m68020' flag to GCC prevents building anything better, 4471 # like '-m68040'. 4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4473 ;; 4474 esac 4475 ;; 4476 4477 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4478 # PIC is the default for these OSes. 4479 ;; 4480 4481 mingw* | cygwin* | pw32* | os2* | cegcc*) 4482 # This hack is so that the source file can tell whether it is being 4483 # built for inclusion in a dll (and should export symbols for example). 4484 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4485 # (--disable-auto-import) libraries 4486 m4_if([$1], [GCJ], [], 4487 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4488 case $host_os in 4489 os2*) 4490 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4491 ;; 4492 esac 4493 ;; 4494 4495 darwin* | rhapsody*) 4496 # PIC is the default on this platform 4497 # Common symbols not allowed in MH_DYLIB files 4498 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4499 ;; 4500 4501 haiku*) 4502 # PIC is the default for Haiku. 4503 # The "-static" flag exists, but is broken. 4504 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4505 ;; 4506 4507 hpux*) 4508 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4509 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4510 # sets the default TLS model and affects inlining. 4511 case $host_cpu in 4512 hppa*64*) 4513 # +Z the default 4514 ;; 4515 *) 4516 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4517 ;; 4518 esac 4519 ;; 4520 4521 interix[[3-9]]*) 4522 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4523 # Instead, we relocate shared libraries at runtime. 4524 ;; 4525 4526 msdosdjgpp*) 4527 # Just because we use GCC doesn't mean we suddenly get shared libraries 4528 # on systems that don't support them. 4529 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4530 enable_shared=no 4531 ;; 4532 4533 *nto* | *qnx*) 4534 # QNX uses GNU C++, but need to define -shared option too, otherwise 4535 # it will coredump. 4536 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4537 ;; 4538 4539 sysv4*MP*) 4540 if test -d /usr/nec; then 4541 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4542 fi 4543 ;; 4544 4545 *) 4546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4547 ;; 4548 esac 4549 4550 case $cc_basename in 4551 nvcc*) # Cuda Compiler Driver 2.2 4552 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4553 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4554 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4555 fi 4556 ;; 4557 esac 4558 else 4559 # PORTME Check for flag to pass linker flags through the system compiler. 4560 case $host_os in 4561 aix*) 4562 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4563 if test ia64 = "$host_cpu"; then 4564 # AIX 5 now supports IA64 processor 4565 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4566 else 4567 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4568 fi 4569 ;; 4570 4571 darwin* | rhapsody*) 4572 # PIC is the default on this platform 4573 # Common symbols not allowed in MH_DYLIB files 4574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4575 case $cc_basename in 4576 nagfor*) 4577 # NAG Fortran compiler 4578 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4579 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4580 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4581 ;; 4582 esac 4583 ;; 4584 4585 mingw* | cygwin* | pw32* | os2* | cegcc*) 4586 # This hack is so that the source file can tell whether it is being 4587 # built for inclusion in a dll (and should export symbols for example). 4588 m4_if([$1], [GCJ], [], 4589 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4590 case $host_os in 4591 os2*) 4592 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4593 ;; 4594 esac 4595 ;; 4596 4597 hpux9* | hpux10* | hpux11*) 4598 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4599 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4600 # not for PA HP-UX. 4601 case $host_cpu in 4602 hppa*64*|ia64*) 4603 # +Z the default 4604 ;; 4605 *) 4606 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4607 ;; 4608 esac 4609 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4610 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4611 ;; 4612 4613 irix5* | irix6* | nonstopux*) 4614 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4615 # PIC (with -KPIC) is the default. 4616 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4617 ;; 4618 4619 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4620 case $cc_basename in 4621 # old Intel for x86_64, which still supported -KPIC. 4622 ecc*) 4623 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4624 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4625 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4626 ;; 4627 # icc used to be incompatible with GCC. 4628 # ICC 10 doesn't accept -KPIC any more. 4629 icc* | ifort*) 4630 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4631 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4632 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4633 ;; 4634 # Lahey Fortran 8.1. 4635 lf95*) 4636 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4637 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4638 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4639 ;; 4640 nagfor*) 4641 # NAG Fortran compiler 4642 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4643 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4645 ;; 4646 tcc*) 4647 # Fabrice Bellard et al's Tiny C Compiler 4648 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4649 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4650 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4651 ;; 4652 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4653 # Portland Group compilers (*not* the Pentium gcc compiler, 4654 # which looks to be a dead project) 4655 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4656 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4657 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4658 ;; 4659 ccc*) 4660 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4661 # All Alpha code is PIC. 4662 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4663 ;; 4664 xl* | bgxl* | bgf* | mpixl*) 4665 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4666 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4667 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4668 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4669 ;; 4670 *) 4671 case `$CC -V 2>&1 | sed 5q` in 4672 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4673 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4675 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4676 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4677 ;; 4678 *Sun\ F* | *Sun*Fortran*) 4679 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4680 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4681 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4682 ;; 4683 *Sun\ C*) 4684 # Sun C 5.9 4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4686 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4687 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4688 ;; 4689 *Intel*\ [[CF]]*Compiler*) 4690 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4691 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4692 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4693 ;; 4694 *Portland\ Group*) 4695 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4696 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4697 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4698 ;; 4699 esac 4700 ;; 4701 esac 4702 ;; 4703 4704 newsos6) 4705 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4706 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4707 ;; 4708 4709 *nto* | *qnx*) 4710 # QNX uses GNU C++, but need to define -shared option too, otherwise 4711 # it will coredump. 4712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4713 ;; 4714 4715 osf3* | osf4* | osf5*) 4716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4717 # All OSF/1 code is PIC. 4718 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4719 ;; 4720 4721 rdos*) 4722 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4723 ;; 4724 4725 solaris*) 4726 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4727 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4728 case $cc_basename in 4729 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4731 *) 4732 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4733 esac 4734 ;; 4735 4736 sunos4*) 4737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4740 ;; 4741 4742 sysv4 | sysv4.2uw2* | sysv4.3*) 4743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4746 ;; 4747 4748 sysv4*MP*) 4749 if test -d /usr/nec; then 4750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4752 fi 4753 ;; 4754 4755 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4756 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4757 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4758 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4759 ;; 4760 4761 unicos*) 4762 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4763 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4764 ;; 4765 4766 uts4*) 4767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4768 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4769 ;; 4770 4771 *) 4772 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4773 ;; 4774 esac 4775 fi 4776]) 4777case $host_os in 4778 # For platforms that do not support PIC, -DPIC is meaningless: 4779 *djgpp*) 4780 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4781 ;; 4782 *) 4783 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4784 ;; 4785esac 4786 4787AC_CACHE_CHECK([for $compiler option to produce PIC], 4788 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4789 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4790_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4791 4792# 4793# Check to make sure the PIC flag actually works. 4794# 4795if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4796 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4797 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4798 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4799 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4800 "" | " "*) ;; 4801 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4802 esac], 4803 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4804 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4805fi 4806_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4807 [Additional compiler flags for building library objects]) 4808 4809_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4810 [How to pass a linker flag through the compiler]) 4811# 4812# Check to make sure the static flag actually works. 4813# 4814wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4815_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4816 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4817 $lt_tmp_static_flag, 4818 [], 4819 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4820_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4821 [Compiler flag to prevent dynamic linking]) 4822])# _LT_COMPILER_PIC 4823 4824 4825# _LT_LINKER_SHLIBS([TAGNAME]) 4826# ---------------------------- 4827# See if the linker supports building shared libraries. 4828m4_defun([_LT_LINKER_SHLIBS], 4829[AC_REQUIRE([LT_PATH_LD])dnl 4830AC_REQUIRE([LT_PATH_NM])dnl 4831m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4832m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4833m4_require([_LT_DECL_EGREP])dnl 4834m4_require([_LT_DECL_SED])dnl 4835m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4836m4_require([_LT_TAG_COMPILER])dnl 4837AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4838m4_if([$1], [CXX], [ 4839 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4840 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4841 case $host_os in 4842 aix[[4-9]]*) 4843 # If we're using GNU nm, then we don't want the "-C" option. 4844 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4845 # Without the "-l" option, or with the "-B" option, AIX nm treats 4846 # weak defined symbols like other global defined symbols, whereas 4847 # GNU nm marks them as "W". 4848 # While the 'weak' keyword is ignored in the Export File, we need 4849 # it in the Import File for the 'aix-soname' feature, so we have 4850 # to replace the "-B" option with "-P" for AIX nm. 4851 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4852 _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' 4853 else 4854 _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' 4855 fi 4856 ;; 4857 pw32*) 4858 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4859 ;; 4860 cygwin* | mingw* | cegcc*) 4861 case $cc_basename in 4862 cl*) 4863 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4864 ;; 4865 *) 4866 _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' 4867 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4868 ;; 4869 esac 4870 ;; 4871 *) 4872 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4873 ;; 4874 esac 4875], [ 4876 runpath_var= 4877 _LT_TAGVAR(allow_undefined_flag, $1)= 4878 _LT_TAGVAR(always_export_symbols, $1)=no 4879 _LT_TAGVAR(archive_cmds, $1)= 4880 _LT_TAGVAR(archive_expsym_cmds, $1)= 4881 _LT_TAGVAR(compiler_needs_object, $1)=no 4882 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4883 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4884 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4885 _LT_TAGVAR(hardcode_automatic, $1)=no 4886 _LT_TAGVAR(hardcode_direct, $1)=no 4887 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4888 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4889 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4890 _LT_TAGVAR(hardcode_minus_L, $1)=no 4891 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4892 _LT_TAGVAR(inherit_rpath, $1)=no 4893 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4894 _LT_TAGVAR(module_cmds, $1)= 4895 _LT_TAGVAR(module_expsym_cmds, $1)= 4896 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4897 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4898 _LT_TAGVAR(thread_safe_flag_spec, $1)= 4899 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4900 # include_expsyms should be a list of space-separated symbols to be *always* 4901 # included in the symbol list 4902 _LT_TAGVAR(include_expsyms, $1)= 4903 # exclude_expsyms can be an extended regexp of symbols to exclude 4904 # it will be wrapped by ' (' and ')$', so one must not match beginning or 4905 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4906 # as well as any symbol that contains 'd'. 4907 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4908 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4909 # platforms (ab)use it in PIC code, but their linkers get confused if 4910 # the symbol is explicitly referenced. Since portable code cannot 4911 # rely on this symbol name, it's probably fine to never include it in 4912 # preloaded symbol tables. 4913 # Exclude shared library initialization/finalization symbols. 4914dnl Note also adjust exclude_expsyms for C++ above. 4915 extract_expsyms_cmds= 4916 4917 case $host_os in 4918 cygwin* | mingw* | pw32* | cegcc*) 4919 # FIXME: the MSVC++ port hasn't been tested in a loooong time 4920 # When not using gcc, we currently assume that we are using 4921 # Microsoft Visual C++. 4922 if test yes != "$GCC"; then 4923 with_gnu_ld=no 4924 fi 4925 ;; 4926 interix*) 4927 # we just hope/assume this is gcc and not c89 (= MSVC++) 4928 with_gnu_ld=yes 4929 ;; 4930 openbsd* | bitrig*) 4931 with_gnu_ld=no 4932 ;; 4933 esac 4934 4935 _LT_TAGVAR(ld_shlibs, $1)=yes 4936 4937 # On some targets, GNU ld is compatible enough with the native linker 4938 # that we're better off using the native interface for both. 4939 lt_use_gnu_ld_interface=no 4940 if test yes = "$with_gnu_ld"; then 4941 case $host_os in 4942 aix*) 4943 # The AIX port of GNU ld has always aspired to compatibility 4944 # with the native linker. However, as the warning in the GNU ld 4945 # block says, versions before 2.19.5* couldn't really create working 4946 # shared libraries, regardless of the interface used. 4947 case `$LD -v 2>&1` in 4948 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4949 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4950 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4951 *) 4952 lt_use_gnu_ld_interface=yes 4953 ;; 4954 esac 4955 ;; 4956 *) 4957 lt_use_gnu_ld_interface=yes 4958 ;; 4959 esac 4960 fi 4961 4962 if test yes = "$lt_use_gnu_ld_interface"; then 4963 # If archive_cmds runs LD, not CC, wlarc should be empty 4964 wlarc='$wl' 4965 4966 # Set some defaults for GNU ld with shared library support. These 4967 # are reset later if shared libraries are not supported. Putting them 4968 # here allows them to be overridden if necessary. 4969 runpath_var=LD_RUN_PATH 4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 4971 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 4972 # ancient GNU ld didn't support --whole-archive et. al. 4973 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4974 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 4975 else 4976 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4977 fi 4978 supports_anon_versioning=no 4979 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 4980 *GNU\ gold*) supports_anon_versioning=yes ;; 4981 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4982 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4983 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4984 *\ 2.11.*) ;; # other 2.11 versions 4985 *) supports_anon_versioning=yes ;; 4986 esac 4987 4988 # See if GNU ld supports shared libraries. 4989 case $host_os in 4990 aix[[3-9]]*) 4991 # On AIX/PPC, the GNU linker is very broken 4992 if test ia64 != "$host_cpu"; then 4993 _LT_TAGVAR(ld_shlibs, $1)=no 4994 cat <<_LT_EOF 1>&2 4995 4996*** Warning: the GNU linker, at least up to release 2.19, is reported 4997*** to be unable to reliably create shared libraries on AIX. 4998*** Therefore, libtool is disabling shared libraries support. If you 4999*** really care for shared libraries, you may want to install binutils 5000*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5001*** You will then need to restart the configuration process. 5002 5003_LT_EOF 5004 fi 5005 ;; 5006 5007 amigaos*) 5008 case $host_cpu in 5009 powerpc) 5010 # see comment about AmigaOS4 .so support 5011 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5012 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5013 ;; 5014 m68k) 5015 _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)' 5016 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5017 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5018 ;; 5019 esac 5020 ;; 5021 5022 beos*) 5023 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5024 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5025 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5026 # support --undefined. This deserves some investigation. FIXME 5027 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5028 else 5029 _LT_TAGVAR(ld_shlibs, $1)=no 5030 fi 5031 ;; 5032 5033 cygwin* | mingw* | pw32* | cegcc*) 5034 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5035 # as there is no search path for DLLs. 5036 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5037 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5038 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5039 _LT_TAGVAR(always_export_symbols, $1)=no 5040 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5041 _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' 5042 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5043 5044 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5045 _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' 5046 # If the export-symbols file already is a .def file, use it as 5047 # is; otherwise, prepend EXPORTS... 5048 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5049 cp $export_symbols $output_objdir/$soname.def; 5050 else 5051 echo EXPORTS > $output_objdir/$soname.def; 5052 cat $export_symbols >> $output_objdir/$soname.def; 5053 fi~ 5054 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5055 else 5056 _LT_TAGVAR(ld_shlibs, $1)=no 5057 fi 5058 ;; 5059 5060 haiku*) 5061 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5062 _LT_TAGVAR(link_all_deplibs, $1)=yes 5063 ;; 5064 5065 os2*) 5066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5067 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5068 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5069 shrext_cmds=.dll 5070 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5071 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5072 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5073 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5074 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5075 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5076 emximp -o $lib $output_objdir/$libname.def' 5077 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5078 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5079 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5080 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5081 prefix_cmds="$SED"~ 5082 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5083 prefix_cmds="$prefix_cmds -e 1d"; 5084 fi~ 5085 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5086 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5087 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5088 emximp -o $lib $output_objdir/$libname.def' 5089 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5090 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5091 ;; 5092 5093 interix[[3-9]]*) 5094 _LT_TAGVAR(hardcode_direct, $1)=no 5095 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5097 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5098 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5099 # Instead, shared libraries are loaded at an image base (0x10000000 by 5100 # default) and relocated if they conflict, which is a slow very memory 5101 # consuming and fragmenting process. To avoid this, we pick a random, 5102 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5103 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5104 _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' 5105 _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' 5106 ;; 5107 5108 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5109 tmp_diet=no 5110 if test linux-dietlibc = "$host_os"; then 5111 case $cc_basename in 5112 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5113 esac 5114 fi 5115 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5116 && test no = "$tmp_diet" 5117 then 5118 tmp_addflag=' $pic_flag' 5119 tmp_sharedflag='-shared' 5120 case $cc_basename,$host_cpu in 5121 pgcc*) # Portland Group C compiler 5122 _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' 5123 tmp_addflag=' $pic_flag' 5124 ;; 5125 pgf77* | pgf90* | pgf95* | pgfortran*) 5126 # Portland Group f77 and f90 compilers 5127 _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' 5128 tmp_addflag=' $pic_flag -Mnomain' ;; 5129 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5130 tmp_addflag=' -i_dynamic' ;; 5131 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5132 tmp_addflag=' -i_dynamic -nofor_main' ;; 5133 ifc* | ifort*) # Intel Fortran compiler 5134 tmp_addflag=' -nofor_main' ;; 5135 lf95*) # Lahey Fortran 8.1 5136 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5137 tmp_sharedflag='--shared' ;; 5138 nagfor*) # NAGFOR 5.3 5139 tmp_sharedflag='-Wl,-shared' ;; 5140 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5141 tmp_sharedflag='-qmkshrobj' 5142 tmp_addflag= ;; 5143 nvcc*) # Cuda Compiler Driver 2.2 5144 _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' 5145 _LT_TAGVAR(compiler_needs_object, $1)=yes 5146 ;; 5147 esac 5148 case `$CC -V 2>&1 | sed 5q` in 5149 *Sun\ C*) # Sun C 5.9 5150 _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' 5151 _LT_TAGVAR(compiler_needs_object, $1)=yes 5152 tmp_sharedflag='-G' ;; 5153 *Sun\ F*) # Sun Fortran 8.3 5154 tmp_sharedflag='-G' ;; 5155 esac 5156 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5157 5158 if test yes = "$supports_anon_versioning"; then 5159 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5160 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5161 echo "local: *; };" >> $output_objdir/$libname.ver~ 5162 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5163 fi 5164 5165 case $cc_basename in 5166 tcc*) 5167 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5168 ;; 5169 xlf* | bgf* | bgxlf* | mpixlf*) 5170 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5171 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5172 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5173 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5174 if test yes = "$supports_anon_versioning"; then 5175 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5176 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5177 echo "local: *; };" >> $output_objdir/$libname.ver~ 5178 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5179 fi 5180 ;; 5181 esac 5182 else 5183 _LT_TAGVAR(ld_shlibs, $1)=no 5184 fi 5185 ;; 5186 5187 netbsd*) 5188 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5189 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5190 wlarc= 5191 else 5192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5193 _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' 5194 fi 5195 ;; 5196 5197 solaris*) 5198 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5199 _LT_TAGVAR(ld_shlibs, $1)=no 5200 cat <<_LT_EOF 1>&2 5201 5202*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5203*** create shared libraries on Solaris systems. Therefore, libtool 5204*** is disabling shared libraries support. We urge you to upgrade GNU 5205*** binutils to release 2.9.1 or newer. Another option is to modify 5206*** your PATH or compiler configuration so that the native linker is 5207*** used, and then restart. 5208 5209_LT_EOF 5210 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5211 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5212 _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' 5213 else 5214 _LT_TAGVAR(ld_shlibs, $1)=no 5215 fi 5216 ;; 5217 5218 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5219 case `$LD -v 2>&1` in 5220 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5221 _LT_TAGVAR(ld_shlibs, $1)=no 5222 cat <<_LT_EOF 1>&2 5223 5224*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5225*** reliably create shared libraries on SCO systems. Therefore, libtool 5226*** is disabling shared libraries support. We urge you to upgrade GNU 5227*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5228*** your PATH or compiler configuration so that the native linker is 5229*** used, and then restart. 5230 5231_LT_EOF 5232 ;; 5233 *) 5234 # For security reasons, it is highly recommended that you always 5235 # use absolute paths for naming shared libraries, and exclude the 5236 # DT_RUNPATH tag from executables and libraries. But doing so 5237 # requires that you compile everything twice, which is a pain. 5238 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5240 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5241 _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' 5242 else 5243 _LT_TAGVAR(ld_shlibs, $1)=no 5244 fi 5245 ;; 5246 esac 5247 ;; 5248 5249 sunos4*) 5250 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5251 wlarc= 5252 _LT_TAGVAR(hardcode_direct, $1)=yes 5253 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5254 ;; 5255 5256 *) 5257 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5258 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5259 _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' 5260 else 5261 _LT_TAGVAR(ld_shlibs, $1)=no 5262 fi 5263 ;; 5264 esac 5265 5266 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5267 runpath_var= 5268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5269 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5270 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5271 fi 5272 else 5273 # PORTME fill in a description of your system's linker (not GNU ld) 5274 case $host_os in 5275 aix3*) 5276 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5277 _LT_TAGVAR(always_export_symbols, $1)=yes 5278 _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' 5279 # Note: this linker hardcodes the directories in LIBPATH if there 5280 # are no directories specified by -L. 5281 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5282 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5283 # Neither direct hardcoding nor static linking is supported with a 5284 # broken collect2. 5285 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5286 fi 5287 ;; 5288 5289 aix[[4-9]]*) 5290 if test ia64 = "$host_cpu"; then 5291 # On IA64, the linker does run time linking by default, so we don't 5292 # have to do anything special. 5293 aix_use_runtimelinking=no 5294 exp_sym_flag='-Bexport' 5295 no_entry_flag= 5296 else 5297 # If we're using GNU nm, then we don't want the "-C" option. 5298 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5299 # Without the "-l" option, or with the "-B" option, AIX nm treats 5300 # weak defined symbols like other global defined symbols, whereas 5301 # GNU nm marks them as "W". 5302 # While the 'weak' keyword is ignored in the Export File, we need 5303 # it in the Import File for the 'aix-soname' feature, so we have 5304 # to replace the "-B" option with "-P" for AIX nm. 5305 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5306 _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' 5307 else 5308 _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' 5309 fi 5310 aix_use_runtimelinking=no 5311 5312 # Test if we are trying to use run time linking or normal 5313 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5314 # have runtime linking enabled, and use it for executables. 5315 # For shared libraries, we enable/disable runtime linking 5316 # depending on the kind of the shared library created - 5317 # when "with_aix_soname,aix_use_runtimelinking" is: 5318 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5319 # "aix,yes" lib.so shared, rtl:yes, for executables 5320 # lib.a static archive 5321 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5322 # lib.a(lib.so.V) shared, rtl:no, for executables 5323 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5324 # lib.a(lib.so.V) shared, rtl:no 5325 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5326 # lib.a static archive 5327 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5328 for ld_flag in $LDFLAGS; do 5329 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5330 aix_use_runtimelinking=yes 5331 break 5332 fi 5333 done 5334 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5335 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5336 # so we don't have lib.a shared libs to link our executables. 5337 # We have to force runtime linking in this case. 5338 aix_use_runtimelinking=yes 5339 LDFLAGS="$LDFLAGS -Wl,-brtl" 5340 fi 5341 ;; 5342 esac 5343 5344 exp_sym_flag='-bexport' 5345 no_entry_flag='-bnoentry' 5346 fi 5347 5348 # When large executables or shared objects are built, AIX ld can 5349 # have problems creating the table of contents. If linking a library 5350 # or program results in "error TOC overflow" add -mminimal-toc to 5351 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5352 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5353 5354 _LT_TAGVAR(archive_cmds, $1)='' 5355 _LT_TAGVAR(hardcode_direct, $1)=yes 5356 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5357 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5358 _LT_TAGVAR(link_all_deplibs, $1)=yes 5359 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5360 case $with_aix_soname,$aix_use_runtimelinking in 5361 aix,*) ;; # traditional, no import file 5362 svr4,* | *,yes) # use import file 5363 # The Import File defines what to hardcode. 5364 _LT_TAGVAR(hardcode_direct, $1)=no 5365 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5366 ;; 5367 esac 5368 5369 if test yes = "$GCC"; then 5370 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5371 # We only want to do this on AIX 4.2 and lower, the check 5372 # below for broken collect2 doesn't work under 4.3+ 5373 collect2name=`$CC -print-prog-name=collect2` 5374 if test -f "$collect2name" && 5375 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5376 then 5377 # We have reworked collect2 5378 : 5379 else 5380 # We have old collect2 5381 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5382 # It fails to find uninstalled libraries when the uninstalled 5383 # path is not listed in the libpath. Setting hardcode_minus_L 5384 # to unsupported forces relinking 5385 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5387 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5388 fi 5389 ;; 5390 esac 5391 shared_flag='-shared' 5392 if test yes = "$aix_use_runtimelinking"; then 5393 shared_flag="$shared_flag "'$wl-G' 5394 fi 5395 # Need to ensure runtime linking is disabled for the traditional 5396 # shared library, or the linker may eventually find shared libraries 5397 # /with/ Import File - we do not want to mix them. 5398 shared_flag_aix='-shared' 5399 shared_flag_svr4='-shared $wl-G' 5400 else 5401 # not using gcc 5402 if test ia64 = "$host_cpu"; then 5403 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5404 # chokes on -Wl,-G. The following line is correct: 5405 shared_flag='-G' 5406 else 5407 if test yes = "$aix_use_runtimelinking"; then 5408 shared_flag='$wl-G' 5409 else 5410 shared_flag='$wl-bM:SRE' 5411 fi 5412 shared_flag_aix='$wl-bM:SRE' 5413 shared_flag_svr4='$wl-G' 5414 fi 5415 fi 5416 5417 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5418 # It seems that -bexpall does not export symbols beginning with 5419 # underscore (_), so it is better to generate a list of symbols to export. 5420 _LT_TAGVAR(always_export_symbols, $1)=yes 5421 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5422 # Warning - without using the other runtime loading flags (-brtl), 5423 # -berok will link without error, but may produce a broken library. 5424 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5425 # Determine the default libpath from the value encoded in an 5426 # empty executable. 5427 _LT_SYS_MODULE_PATH_AIX([$1]) 5428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5429 _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 5430 else 5431 if test ia64 = "$host_cpu"; then 5432 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5433 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5434 _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" 5435 else 5436 # Determine the default libpath from the value encoded in an 5437 # empty executable. 5438 _LT_SYS_MODULE_PATH_AIX([$1]) 5439 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5440 # Warning - without using the other run time loading flags, 5441 # -berok will link without error, but may produce a broken library. 5442 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5443 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5444 if test yes = "$with_gnu_ld"; then 5445 # We only use this code for GNU lds that support --whole-archive. 5446 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5447 else 5448 # Exported symbols can be pulled into shared objects from archives 5449 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5450 fi 5451 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5452 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5453 # -brtl affects multiple linker settings, -berok does not and is overridden later 5454 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5455 if test svr4 != "$with_aix_soname"; then 5456 # This is similar to how AIX traditionally builds its shared libraries. 5457 _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' 5458 fi 5459 if test aix != "$with_aix_soname"; then 5460 _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' 5461 else 5462 # used by -dlpreopen to get the symbols 5463 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5464 fi 5465 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5466 fi 5467 fi 5468 ;; 5469 5470 amigaos*) 5471 case $host_cpu in 5472 powerpc) 5473 # see comment about AmigaOS4 .so support 5474 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5475 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5476 ;; 5477 m68k) 5478 _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)' 5479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5480 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5481 ;; 5482 esac 5483 ;; 5484 5485 bsdi[[45]]*) 5486 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5487 ;; 5488 5489 cygwin* | mingw* | pw32* | cegcc*) 5490 # When not using gcc, we currently assume that we are using 5491 # Microsoft Visual C++. 5492 # hardcode_libdir_flag_spec is actually meaningless, as there is 5493 # no search path for DLLs. 5494 case $cc_basename in 5495 cl*) 5496 # Native MSVC 5497 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5498 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5499 _LT_TAGVAR(always_export_symbols, $1)=yes 5500 _LT_TAGVAR(file_list_spec, $1)='@' 5501 # Tell ltmain to make .lib files, not .a files. 5502 libext=lib 5503 # Tell ltmain to make .dll files, not .so files. 5504 shrext_cmds=.dll 5505 # FIXME: Setting linknames here is a bad hack. 5506 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5507 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5508 cp "$export_symbols" "$output_objdir/$soname.def"; 5509 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5510 else 5511 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5512 fi~ 5513 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5514 linknames=' 5515 # The linker will not automatically build a static lib if we build a DLL. 5516 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5517 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5518 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5519 _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' 5520 # Don't use ranlib 5521 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5522 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5523 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5524 case $lt_outputfile in 5525 *.exe|*.EXE) ;; 5526 *) 5527 lt_outputfile=$lt_outputfile.exe 5528 lt_tool_outputfile=$lt_tool_outputfile.exe 5529 ;; 5530 esac~ 5531 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5532 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5533 $RM "$lt_outputfile.manifest"; 5534 fi' 5535 ;; 5536 *) 5537 # Assume MSVC wrapper 5538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5539 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5540 # Tell ltmain to make .lib files, not .a files. 5541 libext=lib 5542 # Tell ltmain to make .dll files, not .so files. 5543 shrext_cmds=.dll 5544 # FIXME: Setting linknames here is a bad hack. 5545 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5546 # The linker will automatically build a .lib file if we build a DLL. 5547 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5548 # FIXME: Should let the user specify the lib program. 5549 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5550 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5551 ;; 5552 esac 5553 ;; 5554 5555 darwin* | rhapsody*) 5556 _LT_DARWIN_LINKER_FEATURES($1) 5557 ;; 5558 5559 dgux*) 5560 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5561 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5562 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5563 ;; 5564 5565 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5566 # support. Future versions do this automatically, but an explicit c++rt0.o 5567 # does not break anything, and helps significantly (at the cost of a little 5568 # extra space). 5569 freebsd2.2*) 5570 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5572 _LT_TAGVAR(hardcode_direct, $1)=yes 5573 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5574 ;; 5575 5576 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5577 freebsd2.*) 5578 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5579 _LT_TAGVAR(hardcode_direct, $1)=yes 5580 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5581 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5582 ;; 5583 5584 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5585 freebsd* | dragonfly*) 5586 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5587 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5588 _LT_TAGVAR(hardcode_direct, $1)=yes 5589 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590 ;; 5591 5592 hpux9*) 5593 if test yes = "$GCC"; then 5594 _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' 5595 else 5596 _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' 5597 fi 5598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5599 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5600 _LT_TAGVAR(hardcode_direct, $1)=yes 5601 5602 # hardcode_minus_L: Not really in the search PATH, 5603 # but as the default location of the library. 5604 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5605 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5606 ;; 5607 5608 hpux10*) 5609 if test yes,no = "$GCC,$with_gnu_ld"; then 5610 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5611 else 5612 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5613 fi 5614 if test no = "$with_gnu_ld"; then 5615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5616 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5617 _LT_TAGVAR(hardcode_direct, $1)=yes 5618 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5619 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5620 # hardcode_minus_L: Not really in the search PATH, 5621 # but as the default location of the library. 5622 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5623 fi 5624 ;; 5625 5626 hpux11*) 5627 if test yes,no = "$GCC,$with_gnu_ld"; then 5628 case $host_cpu in 5629 hppa*64*) 5630 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5631 ;; 5632 ia64*) 5633 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5634 ;; 5635 *) 5636 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5637 ;; 5638 esac 5639 else 5640 case $host_cpu in 5641 hppa*64*) 5642 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5643 ;; 5644 ia64*) 5645 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5646 ;; 5647 *) 5648 m4_if($1, [], [ 5649 # Older versions of the 11.00 compiler do not understand -b yet 5650 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5651 _LT_LINKER_OPTION([if $CC understands -b], 5652 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5653 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5654 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5655 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5656 ;; 5657 esac 5658 fi 5659 if test no = "$with_gnu_ld"; then 5660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5661 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5662 5663 case $host_cpu in 5664 hppa*64*|ia64*) 5665 _LT_TAGVAR(hardcode_direct, $1)=no 5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5667 ;; 5668 *) 5669 _LT_TAGVAR(hardcode_direct, $1)=yes 5670 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5671 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5672 5673 # hardcode_minus_L: Not really in the search PATH, 5674 # but as the default location of the library. 5675 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5676 ;; 5677 esac 5678 fi 5679 ;; 5680 5681 irix5* | irix6* | nonstopux*) 5682 if test yes = "$GCC"; then 5683 _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' 5684 # Try to use the -exported_symbol ld option, if it does not 5685 # work, assume that -exports_file does not work either and 5686 # implicitly export all symbols. 5687 # This should be the same for all languages, so no per-tag cache variable. 5688 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5689 [lt_cv_irix_exported_symbol], 5690 [save_LDFLAGS=$LDFLAGS 5691 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5692 AC_LINK_IFELSE( 5693 [AC_LANG_SOURCE( 5694 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5695 [C++], [[int foo (void) { return 0; }]], 5696 [Fortran 77], [[ 5697 subroutine foo 5698 end]], 5699 [Fortran], [[ 5700 subroutine foo 5701 end]])])], 5702 [lt_cv_irix_exported_symbol=yes], 5703 [lt_cv_irix_exported_symbol=no]) 5704 LDFLAGS=$save_LDFLAGS]) 5705 if test yes = "$lt_cv_irix_exported_symbol"; then 5706 _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' 5707 fi 5708 else 5709 _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' 5710 _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' 5711 fi 5712 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5713 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5714 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5715 _LT_TAGVAR(inherit_rpath, $1)=yes 5716 _LT_TAGVAR(link_all_deplibs, $1)=yes 5717 ;; 5718 5719 linux*) 5720 case $cc_basename in 5721 tcc*) 5722 # Fabrice Bellard et al's Tiny C Compiler 5723 _LT_TAGVAR(ld_shlibs, $1)=yes 5724 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5725 ;; 5726 esac 5727 ;; 5728 5729 netbsd*) 5730 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5731 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5732 else 5733 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5734 fi 5735 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5736 _LT_TAGVAR(hardcode_direct, $1)=yes 5737 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5738 ;; 5739 5740 newsos6) 5741 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5742 _LT_TAGVAR(hardcode_direct, $1)=yes 5743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5744 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5745 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5746 ;; 5747 5748 *nto* | *qnx*) 5749 ;; 5750 5751 openbsd* | bitrig*) 5752 if test -f /usr/libexec/ld.so; then 5753 _LT_TAGVAR(hardcode_direct, $1)=yes 5754 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5756 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5758 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5759 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5760 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5761 else 5762 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5764 fi 5765 else 5766 _LT_TAGVAR(ld_shlibs, $1)=no 5767 fi 5768 ;; 5769 5770 os2*) 5771 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5772 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5773 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5774 shrext_cmds=.dll 5775 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5776 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5777 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5778 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5779 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5780 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5781 emximp -o $lib $output_objdir/$libname.def' 5782 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5783 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5784 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5785 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5786 prefix_cmds="$SED"~ 5787 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5788 prefix_cmds="$prefix_cmds -e 1d"; 5789 fi~ 5790 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5791 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5792 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5793 emximp -o $lib $output_objdir/$libname.def' 5794 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5795 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5796 ;; 5797 5798 osf3*) 5799 if test yes = "$GCC"; then 5800 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5801 _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' 5802 else 5803 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5804 _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' 5805 fi 5806 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5807 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5808 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5809 ;; 5810 5811 osf4* | osf5*) # as osf3* with the addition of -msym flag 5812 if test yes = "$GCC"; then 5813 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5814 _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' 5815 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5816 else 5817 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5818 _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' 5819 _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~ 5820 $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' 5821 5822 # Both c and cxx compiler support -rpath directly 5823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5824 fi 5825 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5826 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5827 ;; 5828 5829 solaris*) 5830 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5831 if test yes = "$GCC"; then 5832 wlarc='$wl' 5833 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5834 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5835 $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' 5836 else 5837 case `$CC -V 2>&1` in 5838 *"Compilers 5.0"*) 5839 wlarc='' 5840 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5841 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5842 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5843 ;; 5844 *) 5845 wlarc='$wl' 5846 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5847 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5848 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5849 ;; 5850 esac 5851 fi 5852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5853 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5854 case $host_os in 5855 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5856 *) 5857 # The compiler driver will combine and reorder linker options, 5858 # but understands '-z linker_flag'. GCC discards it without '$wl', 5859 # but is careful enough not to reorder. 5860 # Supported since Solaris 2.6 (maybe 2.5.1?) 5861 if test yes = "$GCC"; then 5862 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5863 else 5864 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5865 fi 5866 ;; 5867 esac 5868 _LT_TAGVAR(link_all_deplibs, $1)=yes 5869 ;; 5870 5871 sunos4*) 5872 if test sequent = "$host_vendor"; then 5873 # Use $CC to link under sequent, because it throws in some extra .o 5874 # files that make .init and .fini sections work. 5875 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5876 else 5877 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5878 fi 5879 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5880 _LT_TAGVAR(hardcode_direct, $1)=yes 5881 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5882 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5883 ;; 5884 5885 sysv4) 5886 case $host_vendor in 5887 sni) 5888 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5889 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5890 ;; 5891 siemens) 5892 ## LD is ld it makes a PLAMLIB 5893 ## CC just makes a GrossModule. 5894 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5895 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5896 _LT_TAGVAR(hardcode_direct, $1)=no 5897 ;; 5898 motorola) 5899 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5900 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5901 ;; 5902 esac 5903 runpath_var='LD_RUN_PATH' 5904 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5905 ;; 5906 5907 sysv4.3*) 5908 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5909 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5911 ;; 5912 5913 sysv4*MP*) 5914 if test -d /usr/nec; then 5915 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5916 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5917 runpath_var=LD_RUN_PATH 5918 hardcode_runpath_var=yes 5919 _LT_TAGVAR(ld_shlibs, $1)=yes 5920 fi 5921 ;; 5922 5923 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5924 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 5925 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5926 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5927 runpath_var='LD_RUN_PATH' 5928 5929 if test yes = "$GCC"; then 5930 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5931 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5932 else 5933 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5934 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5935 fi 5936 ;; 5937 5938 sysv5* | sco3.2v5* | sco5v6*) 5939 # Note: We CANNOT use -z defs as we might desire, because we do not 5940 # link with -lc, and that would cause any symbols used from libc to 5941 # always be unresolved, which means just about no library would 5942 # ever link correctly. If we're not using GNU ld we use -z text 5943 # though, which does catch some bad symbols but isn't as heavy-handed 5944 # as -z defs. 5945 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 5946 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 5947 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5948 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 5950 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5951 _LT_TAGVAR(link_all_deplibs, $1)=yes 5952 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 5953 runpath_var='LD_RUN_PATH' 5954 5955 if test yes = "$GCC"; then 5956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5957 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5958 else 5959 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5960 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5961 fi 5962 ;; 5963 5964 uts4*) 5965 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5966 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5967 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5968 ;; 5969 5970 *) 5971 _LT_TAGVAR(ld_shlibs, $1)=no 5972 ;; 5973 esac 5974 5975 if test sni = "$host_vendor"; then 5976 case $host in 5977 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5978 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 5979 ;; 5980 esac 5981 fi 5982 fi 5983]) 5984AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5985test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 5986 5987_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5988 5989_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5990_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5991_LT_DECL([], [extract_expsyms_cmds], [2], 5992 [The commands to extract the exported symbol list from a shared archive]) 5993 5994# 5995# Do we need to explicitly link libc? 5996# 5997case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5998x|xyes) 5999 # Assume -lc should be added 6000 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6001 6002 if test yes,yes = "$GCC,$enable_shared"; then 6003 case $_LT_TAGVAR(archive_cmds, $1) in 6004 *'~'*) 6005 # FIXME: we may have to deal with multi-command sequences. 6006 ;; 6007 '$CC '*) 6008 # Test whether the compiler implicitly links with -lc since on some 6009 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6010 # to ld, don't add -lc before -lgcc. 6011 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6012 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6013 [$RM conftest* 6014 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6015 6016 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6017 soname=conftest 6018 lib=conftest 6019 libobjs=conftest.$ac_objext 6020 deplibs= 6021 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6022 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6023 compiler_flags=-v 6024 linker_flags=-v 6025 verstring= 6026 output_objdir=. 6027 libname=conftest 6028 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6029 _LT_TAGVAR(allow_undefined_flag, $1)= 6030 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6031 then 6032 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6033 else 6034 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6035 fi 6036 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6037 else 6038 cat conftest.err 1>&5 6039 fi 6040 $RM conftest* 6041 ]) 6042 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6043 ;; 6044 esac 6045 fi 6046 ;; 6047esac 6048 6049_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6050 [Whether or not to add -lc for building shared libraries]) 6051_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6052 [enable_shared_with_static_runtimes], [0], 6053 [Whether or not to disallow shared libs when runtime libs are static]) 6054_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6055 [Compiler flag to allow reflexive dlopens]) 6056_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6057 [Compiler flag to generate shared objects directly from archives]) 6058_LT_TAGDECL([], [compiler_needs_object], [1], 6059 [Whether the compiler copes with passing no objects directly]) 6060_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6061 [Create an old-style archive from a shared archive]) 6062_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6063 [Create a temporary old-style archive to link instead of a shared archive]) 6064_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6065_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6066_LT_TAGDECL([], [module_cmds], [2], 6067 [Commands used to build a loadable module if different from building 6068 a shared archive.]) 6069_LT_TAGDECL([], [module_expsym_cmds], [2]) 6070_LT_TAGDECL([], [with_gnu_ld], [1], 6071 [Whether we are building with GNU ld or not]) 6072_LT_TAGDECL([], [allow_undefined_flag], [1], 6073 [Flag that allows shared libraries with undefined symbols to be built]) 6074_LT_TAGDECL([], [no_undefined_flag], [1], 6075 [Flag that enforces no undefined symbols]) 6076_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6077 [Flag to hardcode $libdir into a binary during linking. 6078 This must work even if $libdir does not exist]) 6079_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6080 [Whether we need a single "-rpath" flag with a separated argument]) 6081_LT_TAGDECL([], [hardcode_direct], [0], 6082 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6083 DIR into the resulting binary]) 6084_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6085 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6086 DIR into the resulting binary and the resulting library dependency is 6087 "absolute", i.e impossible to change by setting $shlibpath_var if the 6088 library is relocated]) 6089_LT_TAGDECL([], [hardcode_minus_L], [0], 6090 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6091 into the resulting binary]) 6092_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6093 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6094 into the resulting binary]) 6095_LT_TAGDECL([], [hardcode_automatic], [0], 6096 [Set to "yes" if building a shared library automatically hardcodes DIR 6097 into the library and all subsequent libraries and executables linked 6098 against it]) 6099_LT_TAGDECL([], [inherit_rpath], [0], 6100 [Set to yes if linker adds runtime paths of dependent libraries 6101 to runtime path list]) 6102_LT_TAGDECL([], [link_all_deplibs], [0], 6103 [Whether libtool must link a program against all its dependency libraries]) 6104_LT_TAGDECL([], [always_export_symbols], [0], 6105 [Set to "yes" if exported symbols are required]) 6106_LT_TAGDECL([], [export_symbols_cmds], [2], 6107 [The commands to list exported symbols]) 6108_LT_TAGDECL([], [exclude_expsyms], [1], 6109 [Symbols that should not be listed in the preloaded symbols]) 6110_LT_TAGDECL([], [include_expsyms], [1], 6111 [Symbols that must always be exported]) 6112_LT_TAGDECL([], [prelink_cmds], [2], 6113 [Commands necessary for linking programs (against libraries) with templates]) 6114_LT_TAGDECL([], [postlink_cmds], [2], 6115 [Commands necessary for finishing linking programs]) 6116_LT_TAGDECL([], [file_list_spec], [1], 6117 [Specify filename containing input files]) 6118dnl FIXME: Not yet implemented 6119dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6120dnl [Compiler flag to generate thread safe objects]) 6121])# _LT_LINKER_SHLIBS 6122 6123 6124# _LT_LANG_C_CONFIG([TAG]) 6125# ------------------------ 6126# Ensure that the configuration variables for a C compiler are suitably 6127# defined. These variables are subsequently used by _LT_CONFIG to write 6128# the compiler configuration to 'libtool'. 6129m4_defun([_LT_LANG_C_CONFIG], 6130[m4_require([_LT_DECL_EGREP])dnl 6131lt_save_CC=$CC 6132AC_LANG_PUSH(C) 6133 6134# Source file extension for C test sources. 6135ac_ext=c 6136 6137# Object file extension for compiled C test sources. 6138objext=o 6139_LT_TAGVAR(objext, $1)=$objext 6140 6141# Code to be used in simple compile tests 6142lt_simple_compile_test_code="int some_variable = 0;" 6143 6144# Code to be used in simple link tests 6145lt_simple_link_test_code='int main(){return(0);}' 6146 6147_LT_TAG_COMPILER 6148# Save the default compiler, since it gets overwritten when the other 6149# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6150compiler_DEFAULT=$CC 6151 6152# save warnings/boilerplate of simple test code 6153_LT_COMPILER_BOILERPLATE 6154_LT_LINKER_BOILERPLATE 6155 6156if test -n "$compiler"; then 6157 _LT_COMPILER_NO_RTTI($1) 6158 _LT_COMPILER_PIC($1) 6159 _LT_COMPILER_C_O($1) 6160 _LT_COMPILER_FILE_LOCKS($1) 6161 _LT_LINKER_SHLIBS($1) 6162 _LT_SYS_DYNAMIC_LINKER($1) 6163 _LT_LINKER_HARDCODE_LIBPATH($1) 6164 LT_SYS_DLOPEN_SELF 6165 _LT_CMD_STRIPLIB 6166 6167 # Report what library types will actually be built 6168 AC_MSG_CHECKING([if libtool supports shared libraries]) 6169 AC_MSG_RESULT([$can_build_shared]) 6170 6171 AC_MSG_CHECKING([whether to build shared libraries]) 6172 test no = "$can_build_shared" && enable_shared=no 6173 6174 # On AIX, shared libraries and static libraries use the same namespace, and 6175 # are all built from PIC. 6176 case $host_os in 6177 aix3*) 6178 test yes = "$enable_shared" && enable_static=no 6179 if test -n "$RANLIB"; then 6180 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6181 postinstall_cmds='$RANLIB $lib' 6182 fi 6183 ;; 6184 6185 aix[[4-9]]*) 6186 if test ia64 != "$host_cpu"; then 6187 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6188 yes,aix,yes) ;; # shared object as lib.so file only 6189 yes,svr4,*) ;; # shared object as lib.so archive member only 6190 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6191 esac 6192 fi 6193 ;; 6194 esac 6195 AC_MSG_RESULT([$enable_shared]) 6196 6197 AC_MSG_CHECKING([whether to build static libraries]) 6198 # Make sure either enable_shared or enable_static is yes. 6199 test yes = "$enable_shared" || enable_static=yes 6200 AC_MSG_RESULT([$enable_static]) 6201 6202 _LT_CONFIG($1) 6203fi 6204AC_LANG_POP 6205CC=$lt_save_CC 6206])# _LT_LANG_C_CONFIG 6207 6208 6209# _LT_LANG_CXX_CONFIG([TAG]) 6210# -------------------------- 6211# Ensure that the configuration variables for a C++ compiler are suitably 6212# defined. These variables are subsequently used by _LT_CONFIG to write 6213# the compiler configuration to 'libtool'. 6214m4_defun([_LT_LANG_CXX_CONFIG], 6215[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6216m4_require([_LT_DECL_EGREP])dnl 6217m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6218if test -n "$CXX" && ( test no != "$CXX" && 6219 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6220 (test g++ != "$CXX"))); then 6221 AC_PROG_CXXCPP 6222else 6223 _lt_caught_CXX_error=yes 6224fi 6225 6226AC_LANG_PUSH(C++) 6227_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6228_LT_TAGVAR(allow_undefined_flag, $1)= 6229_LT_TAGVAR(always_export_symbols, $1)=no 6230_LT_TAGVAR(archive_expsym_cmds, $1)= 6231_LT_TAGVAR(compiler_needs_object, $1)=no 6232_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6233_LT_TAGVAR(hardcode_direct, $1)=no 6234_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6235_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6236_LT_TAGVAR(hardcode_libdir_separator, $1)= 6237_LT_TAGVAR(hardcode_minus_L, $1)=no 6238_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6239_LT_TAGVAR(hardcode_automatic, $1)=no 6240_LT_TAGVAR(inherit_rpath, $1)=no 6241_LT_TAGVAR(module_cmds, $1)= 6242_LT_TAGVAR(module_expsym_cmds, $1)= 6243_LT_TAGVAR(link_all_deplibs, $1)=unknown 6244_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6245_LT_TAGVAR(reload_flag, $1)=$reload_flag 6246_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6247_LT_TAGVAR(no_undefined_flag, $1)= 6248_LT_TAGVAR(whole_archive_flag_spec, $1)= 6249_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6250 6251# Source file extension for C++ test sources. 6252ac_ext=cpp 6253 6254# Object file extension for compiled C++ test sources. 6255objext=o 6256_LT_TAGVAR(objext, $1)=$objext 6257 6258# No sense in running all these tests if we already determined that 6259# the CXX compiler isn't working. Some variables (like enable_shared) 6260# are currently assumed to apply to all compilers on this platform, 6261# and will be corrupted by setting them based on a non-working compiler. 6262if test yes != "$_lt_caught_CXX_error"; then 6263 # Code to be used in simple compile tests 6264 lt_simple_compile_test_code="int some_variable = 0;" 6265 6266 # Code to be used in simple link tests 6267 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6268 6269 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6270 _LT_TAG_COMPILER 6271 6272 # save warnings/boilerplate of simple test code 6273 _LT_COMPILER_BOILERPLATE 6274 _LT_LINKER_BOILERPLATE 6275 6276 # Allow CC to be a program name with arguments. 6277 lt_save_CC=$CC 6278 lt_save_CFLAGS=$CFLAGS 6279 lt_save_LD=$LD 6280 lt_save_GCC=$GCC 6281 GCC=$GXX 6282 lt_save_with_gnu_ld=$with_gnu_ld 6283 lt_save_path_LD=$lt_cv_path_LD 6284 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6285 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6286 else 6287 $as_unset lt_cv_prog_gnu_ld 6288 fi 6289 if test -n "${lt_cv_path_LDCXX+set}"; then 6290 lt_cv_path_LD=$lt_cv_path_LDCXX 6291 else 6292 $as_unset lt_cv_path_LD 6293 fi 6294 test -z "${LDCXX+set}" || LD=$LDCXX 6295 CC=${CXX-"c++"} 6296 CFLAGS=$CXXFLAGS 6297 compiler=$CC 6298 _LT_TAGVAR(compiler, $1)=$CC 6299 _LT_CC_BASENAME([$compiler]) 6300 6301 if test -n "$compiler"; then 6302 # We don't want -fno-exception when compiling C++ code, so set the 6303 # no_builtin_flag separately 6304 if test yes = "$GXX"; then 6305 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6306 else 6307 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6308 fi 6309 6310 if test yes = "$GXX"; then 6311 # Set up default GNU C++ configuration 6312 6313 LT_PATH_LD 6314 6315 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6316 # archiving commands below assume that GNU ld is being used. 6317 if test yes = "$with_gnu_ld"; then 6318 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6319 _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' 6320 6321 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6323 6324 # If archive_cmds runs LD, not CC, wlarc should be empty 6325 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6326 # investigate it a little bit more. (MM) 6327 wlarc='$wl' 6328 6329 # ancient GNU ld didn't support --whole-archive et. al. 6330 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6331 $GREP 'no-whole-archive' > /dev/null; then 6332 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6333 else 6334 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6335 fi 6336 else 6337 with_gnu_ld=no 6338 wlarc= 6339 6340 # A generic and very simple default shared library creation 6341 # command for GNU C++ for the case where it uses the native 6342 # linker, instead of GNU ld. If possible, this setting should 6343 # overridden to take advantage of the native linker features on 6344 # the platform it is being used on. 6345 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6346 fi 6347 6348 # Commands to make compiler produce verbose output that lists 6349 # what "hidden" libraries, object files and flags are used when 6350 # linking a shared library. 6351 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6352 6353 else 6354 GXX=no 6355 with_gnu_ld=no 6356 wlarc= 6357 fi 6358 6359 # PORTME: fill in a description of your system's C++ link characteristics 6360 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6361 _LT_TAGVAR(ld_shlibs, $1)=yes 6362 case $host_os in 6363 aix3*) 6364 # FIXME: insert proper C++ library support 6365 _LT_TAGVAR(ld_shlibs, $1)=no 6366 ;; 6367 aix[[4-9]]*) 6368 if test ia64 = "$host_cpu"; then 6369 # On IA64, the linker does run time linking by default, so we don't 6370 # have to do anything special. 6371 aix_use_runtimelinking=no 6372 exp_sym_flag='-Bexport' 6373 no_entry_flag= 6374 else 6375 aix_use_runtimelinking=no 6376 6377 # Test if we are trying to use run time linking or normal 6378 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6379 # have runtime linking enabled, and use it for executables. 6380 # For shared libraries, we enable/disable runtime linking 6381 # depending on the kind of the shared library created - 6382 # when "with_aix_soname,aix_use_runtimelinking" is: 6383 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6384 # "aix,yes" lib.so shared, rtl:yes, for executables 6385 # lib.a static archive 6386 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6387 # lib.a(lib.so.V) shared, rtl:no, for executables 6388 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6389 # lib.a(lib.so.V) shared, rtl:no 6390 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6391 # lib.a static archive 6392 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6393 for ld_flag in $LDFLAGS; do 6394 case $ld_flag in 6395 *-brtl*) 6396 aix_use_runtimelinking=yes 6397 break 6398 ;; 6399 esac 6400 done 6401 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6402 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6403 # so we don't have lib.a shared libs to link our executables. 6404 # We have to force runtime linking in this case. 6405 aix_use_runtimelinking=yes 6406 LDFLAGS="$LDFLAGS -Wl,-brtl" 6407 fi 6408 ;; 6409 esac 6410 6411 exp_sym_flag='-bexport' 6412 no_entry_flag='-bnoentry' 6413 fi 6414 6415 # When large executables or shared objects are built, AIX ld can 6416 # have problems creating the table of contents. If linking a library 6417 # or program results in "error TOC overflow" add -mminimal-toc to 6418 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6419 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6420 6421 _LT_TAGVAR(archive_cmds, $1)='' 6422 _LT_TAGVAR(hardcode_direct, $1)=yes 6423 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6424 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6425 _LT_TAGVAR(link_all_deplibs, $1)=yes 6426 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6427 case $with_aix_soname,$aix_use_runtimelinking in 6428 aix,*) ;; # no import file 6429 svr4,* | *,yes) # use import file 6430 # The Import File defines what to hardcode. 6431 _LT_TAGVAR(hardcode_direct, $1)=no 6432 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6433 ;; 6434 esac 6435 6436 if test yes = "$GXX"; then 6437 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6438 # We only want to do this on AIX 4.2 and lower, the check 6439 # below for broken collect2 doesn't work under 4.3+ 6440 collect2name=`$CC -print-prog-name=collect2` 6441 if test -f "$collect2name" && 6442 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6443 then 6444 # We have reworked collect2 6445 : 6446 else 6447 # We have old collect2 6448 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6449 # It fails to find uninstalled libraries when the uninstalled 6450 # path is not listed in the libpath. Setting hardcode_minus_L 6451 # to unsupported forces relinking 6452 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6453 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6454 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6455 fi 6456 esac 6457 shared_flag='-shared' 6458 if test yes = "$aix_use_runtimelinking"; then 6459 shared_flag=$shared_flag' $wl-G' 6460 fi 6461 # Need to ensure runtime linking is disabled for the traditional 6462 # shared library, or the linker may eventually find shared libraries 6463 # /with/ Import File - we do not want to mix them. 6464 shared_flag_aix='-shared' 6465 shared_flag_svr4='-shared $wl-G' 6466 else 6467 # not using gcc 6468 if test ia64 = "$host_cpu"; then 6469 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6470 # chokes on -Wl,-G. The following line is correct: 6471 shared_flag='-G' 6472 else 6473 if test yes = "$aix_use_runtimelinking"; then 6474 shared_flag='$wl-G' 6475 else 6476 shared_flag='$wl-bM:SRE' 6477 fi 6478 shared_flag_aix='$wl-bM:SRE' 6479 shared_flag_svr4='$wl-G' 6480 fi 6481 fi 6482 6483 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6484 # It seems that -bexpall does not export symbols beginning with 6485 # underscore (_), so it is better to generate a list of symbols to 6486 # export. 6487 _LT_TAGVAR(always_export_symbols, $1)=yes 6488 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6489 # Warning - without using the other runtime loading flags (-brtl), 6490 # -berok will link without error, but may produce a broken library. 6491 # The "-G" linker flag allows undefined symbols. 6492 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6493 # Determine the default libpath from the value encoded in an empty 6494 # executable. 6495 _LT_SYS_MODULE_PATH_AIX([$1]) 6496 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6497 6498 _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 6499 else 6500 if test ia64 = "$host_cpu"; then 6501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6502 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6503 _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" 6504 else 6505 # Determine the default libpath from the value encoded in an 6506 # empty executable. 6507 _LT_SYS_MODULE_PATH_AIX([$1]) 6508 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6509 # Warning - without using the other run time loading flags, 6510 # -berok will link without error, but may produce a broken library. 6511 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6512 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6513 if test yes = "$with_gnu_ld"; then 6514 # We only use this code for GNU lds that support --whole-archive. 6515 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6516 else 6517 # Exported symbols can be pulled into shared objects from archives 6518 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6519 fi 6520 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6521 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6522 # -brtl affects multiple linker settings, -berok does not and is overridden later 6523 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6524 if test svr4 != "$with_aix_soname"; then 6525 # This is similar to how AIX traditionally builds its shared 6526 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6527 _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' 6528 fi 6529 if test aix != "$with_aix_soname"; then 6530 _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' 6531 else 6532 # used by -dlpreopen to get the symbols 6533 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6534 fi 6535 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6536 fi 6537 fi 6538 ;; 6539 6540 beos*) 6541 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6542 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6543 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6544 # support --undefined. This deserves some investigation. FIXME 6545 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6546 else 6547 _LT_TAGVAR(ld_shlibs, $1)=no 6548 fi 6549 ;; 6550 6551 chorus*) 6552 case $cc_basename in 6553 *) 6554 # FIXME: insert proper C++ library support 6555 _LT_TAGVAR(ld_shlibs, $1)=no 6556 ;; 6557 esac 6558 ;; 6559 6560 cygwin* | mingw* | pw32* | cegcc*) 6561 case $GXX,$cc_basename in 6562 ,cl* | no,cl*) 6563 # Native MSVC 6564 # hardcode_libdir_flag_spec is actually meaningless, as there is 6565 # no search path for DLLs. 6566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6567 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6568 _LT_TAGVAR(always_export_symbols, $1)=yes 6569 _LT_TAGVAR(file_list_spec, $1)='@' 6570 # Tell ltmain to make .lib files, not .a files. 6571 libext=lib 6572 # Tell ltmain to make .dll files, not .so files. 6573 shrext_cmds=.dll 6574 # FIXME: Setting linknames here is a bad hack. 6575 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6576 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6577 cp "$export_symbols" "$output_objdir/$soname.def"; 6578 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6579 else 6580 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6581 fi~ 6582 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6583 linknames=' 6584 # The linker will not automatically build a static lib if we build a DLL. 6585 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6586 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6587 # Don't use ranlib 6588 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6589 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6590 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6591 case $lt_outputfile in 6592 *.exe|*.EXE) ;; 6593 *) 6594 lt_outputfile=$lt_outputfile.exe 6595 lt_tool_outputfile=$lt_tool_outputfile.exe 6596 ;; 6597 esac~ 6598 func_to_tool_file "$lt_outputfile"~ 6599 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6600 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6601 $RM "$lt_outputfile.manifest"; 6602 fi' 6603 ;; 6604 *) 6605 # g++ 6606 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6607 # as there is no search path for DLLs. 6608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6609 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6610 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6611 _LT_TAGVAR(always_export_symbols, $1)=no 6612 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6613 6614 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6615 _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' 6616 # If the export-symbols file already is a .def file, use it as 6617 # is; otherwise, prepend EXPORTS... 6618 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6619 cp $export_symbols $output_objdir/$soname.def; 6620 else 6621 echo EXPORTS > $output_objdir/$soname.def; 6622 cat $export_symbols >> $output_objdir/$soname.def; 6623 fi~ 6624 $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' 6625 else 6626 _LT_TAGVAR(ld_shlibs, $1)=no 6627 fi 6628 ;; 6629 esac 6630 ;; 6631 darwin* | rhapsody*) 6632 _LT_DARWIN_LINKER_FEATURES($1) 6633 ;; 6634 6635 os2*) 6636 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6637 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6638 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6639 shrext_cmds=.dll 6640 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6641 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6642 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6643 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6644 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6645 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6646 emximp -o $lib $output_objdir/$libname.def' 6647 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6648 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6649 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6650 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6651 prefix_cmds="$SED"~ 6652 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6653 prefix_cmds="$prefix_cmds -e 1d"; 6654 fi~ 6655 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6656 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6657 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6658 emximp -o $lib $output_objdir/$libname.def' 6659 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6661 ;; 6662 6663 dgux*) 6664 case $cc_basename in 6665 ec++*) 6666 # FIXME: insert proper C++ library support 6667 _LT_TAGVAR(ld_shlibs, $1)=no 6668 ;; 6669 ghcx*) 6670 # Green Hills C++ Compiler 6671 # FIXME: insert proper C++ library support 6672 _LT_TAGVAR(ld_shlibs, $1)=no 6673 ;; 6674 *) 6675 # FIXME: insert proper C++ library support 6676 _LT_TAGVAR(ld_shlibs, $1)=no 6677 ;; 6678 esac 6679 ;; 6680 6681 freebsd2.*) 6682 # C++ shared libraries reported to be fairly broken before 6683 # switch to ELF 6684 _LT_TAGVAR(ld_shlibs, $1)=no 6685 ;; 6686 6687 freebsd-elf*) 6688 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6689 ;; 6690 6691 freebsd* | dragonfly*) 6692 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6693 # conventions 6694 _LT_TAGVAR(ld_shlibs, $1)=yes 6695 ;; 6696 6697 haiku*) 6698 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6699 _LT_TAGVAR(link_all_deplibs, $1)=yes 6700 ;; 6701 6702 hpux9*) 6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6704 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6706 _LT_TAGVAR(hardcode_direct, $1)=yes 6707 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6708 # but as the default 6709 # location of the library. 6710 6711 case $cc_basename in 6712 CC*) 6713 # FIXME: insert proper C++ library support 6714 _LT_TAGVAR(ld_shlibs, $1)=no 6715 ;; 6716 aCC*) 6717 _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' 6718 # Commands to make compiler produce verbose output that lists 6719 # what "hidden" libraries, object files and flags are used when 6720 # linking a shared library. 6721 # 6722 # There doesn't appear to be a way to prevent this compiler from 6723 # explicitly linking system object files so we need to strip them 6724 # from the output so that they don't get included in the library 6725 # dependencies. 6726 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"' 6727 ;; 6728 *) 6729 if test yes = "$GXX"; then 6730 _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' 6731 else 6732 # FIXME: insert proper C++ library support 6733 _LT_TAGVAR(ld_shlibs, $1)=no 6734 fi 6735 ;; 6736 esac 6737 ;; 6738 6739 hpux10*|hpux11*) 6740 if test no = "$with_gnu_ld"; then 6741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6742 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6743 6744 case $host_cpu in 6745 hppa*64*|ia64*) 6746 ;; 6747 *) 6748 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6749 ;; 6750 esac 6751 fi 6752 case $host_cpu in 6753 hppa*64*|ia64*) 6754 _LT_TAGVAR(hardcode_direct, $1)=no 6755 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6756 ;; 6757 *) 6758 _LT_TAGVAR(hardcode_direct, $1)=yes 6759 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6760 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6761 # but as the default 6762 # location of the library. 6763 ;; 6764 esac 6765 6766 case $cc_basename in 6767 CC*) 6768 # FIXME: insert proper C++ library support 6769 _LT_TAGVAR(ld_shlibs, $1)=no 6770 ;; 6771 aCC*) 6772 case $host_cpu in 6773 hppa*64*) 6774 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6775 ;; 6776 ia64*) 6777 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6778 ;; 6779 *) 6780 _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' 6781 ;; 6782 esac 6783 # Commands to make compiler produce verbose output that lists 6784 # what "hidden" libraries, object files and flags are used when 6785 # linking a shared library. 6786 # 6787 # There doesn't appear to be a way to prevent this compiler from 6788 # explicitly linking system object files so we need to strip them 6789 # from the output so that they don't get included in the library 6790 # dependencies. 6791 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"' 6792 ;; 6793 *) 6794 if test yes = "$GXX"; then 6795 if test no = "$with_gnu_ld"; then 6796 case $host_cpu in 6797 hppa*64*) 6798 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6799 ;; 6800 ia64*) 6801 _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' 6802 ;; 6803 *) 6804 _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' 6805 ;; 6806 esac 6807 fi 6808 else 6809 # FIXME: insert proper C++ library support 6810 _LT_TAGVAR(ld_shlibs, $1)=no 6811 fi 6812 ;; 6813 esac 6814 ;; 6815 6816 interix[[3-9]]*) 6817 _LT_TAGVAR(hardcode_direct, $1)=no 6818 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6820 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6821 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6822 # Instead, shared libraries are loaded at an image base (0x10000000 by 6823 # default) and relocated if they conflict, which is a slow very memory 6824 # consuming and fragmenting process. To avoid this, we pick a random, 6825 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6826 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6827 _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' 6828 _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' 6829 ;; 6830 irix5* | irix6*) 6831 case $cc_basename in 6832 CC*) 6833 # SGI C++ 6834 _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' 6835 6836 # Archives containing C++ object files must be created using 6837 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6838 # necessary to make sure instantiated templates are included 6839 # in the archive. 6840 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6841 ;; 6842 *) 6843 if test yes = "$GXX"; then 6844 if test no = "$with_gnu_ld"; then 6845 _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' 6846 else 6847 _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' 6848 fi 6849 fi 6850 _LT_TAGVAR(link_all_deplibs, $1)=yes 6851 ;; 6852 esac 6853 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6854 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6855 _LT_TAGVAR(inherit_rpath, $1)=yes 6856 ;; 6857 6858 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6859 case $cc_basename in 6860 KCC*) 6861 # Kuck and Associates, Inc. (KAI) C++ Compiler 6862 6863 # KCC will only create a shared library if the output file 6864 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6865 # to its proper name (with version) after linking. 6866 _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' 6867 _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' 6868 # Commands to make compiler produce verbose output that lists 6869 # what "hidden" libraries, object files and flags are used when 6870 # linking a shared library. 6871 # 6872 # There doesn't appear to be a way to prevent this compiler from 6873 # explicitly linking system object files so we need to strip them 6874 # from the output so that they don't get included in the library 6875 # dependencies. 6876 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"' 6877 6878 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6879 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6880 6881 # Archives containing C++ object files must be created using 6882 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6883 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6884 ;; 6885 icpc* | ecpc* ) 6886 # Intel C++ 6887 with_gnu_ld=yes 6888 # version 8.0 and above of icpc choke on multiply defined symbols 6889 # if we add $predep_objects and $postdep_objects, however 7.1 and 6890 # earlier do not add the objects themselves. 6891 case `$CC -V 2>&1` in 6892 *"Version 7."*) 6893 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6894 _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' 6895 ;; 6896 *) # Version 8.0 or newer 6897 tmp_idyn= 6898 case $host_cpu in 6899 ia64*) tmp_idyn=' -i_dynamic';; 6900 esac 6901 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6902 _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' 6903 ;; 6904 esac 6905 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6906 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6907 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6908 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6909 ;; 6910 pgCC* | pgcpp*) 6911 # Portland Group C++ compiler 6912 case `$CC -V` in 6913 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6914 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6915 rm -rf $tpldir~ 6916 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6917 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6918 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6919 rm -rf $tpldir~ 6920 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6921 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6922 $RANLIB $oldlib' 6923 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6924 rm -rf $tpldir~ 6925 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6926 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6927 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6928 rm -rf $tpldir~ 6929 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6930 $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' 6931 ;; 6932 *) # Version 6 and above use weak symbols 6933 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6934 _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' 6935 ;; 6936 esac 6937 6938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 6939 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6940 _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' 6941 ;; 6942 cxx*) 6943 # Compaq C++ 6944 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6945 _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' 6946 6947 runpath_var=LD_RUN_PATH 6948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6949 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950 6951 # Commands to make compiler produce verbose output that lists 6952 # what "hidden" libraries, object files and flags are used when 6953 # linking a shared library. 6954 # 6955 # There doesn't appear to be a way to prevent this compiler from 6956 # explicitly linking system object files so we need to strip them 6957 # from the output so that they don't get included in the library 6958 # dependencies. 6959 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' 6960 ;; 6961 xl* | mpixl* | bgxl*) 6962 # IBM XL 8.0 on PPC, with GNU ld 6963 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6964 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6965 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6966 if test yes = "$supports_anon_versioning"; then 6967 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6968 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6969 echo "local: *; };" >> $output_objdir/$libname.ver~ 6970 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 6971 fi 6972 ;; 6973 *) 6974 case `$CC -V 2>&1 | sed 5q` in 6975 *Sun\ C*) 6976 # Sun C++ 5.9 6977 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6978 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6979 _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' 6980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6981 _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' 6982 _LT_TAGVAR(compiler_needs_object, $1)=yes 6983 6984 # Not sure whether something based on 6985 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6986 # would be better. 6987 output_verbose_link_cmd='func_echo_all' 6988 6989 # Archives containing C++ object files must be created using 6990 # "CC -xar", where "CC" is the Sun C++ compiler. This is 6991 # necessary to make sure instantiated templates are included 6992 # in the archive. 6993 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6994 ;; 6995 esac 6996 ;; 6997 esac 6998 ;; 6999 7000 lynxos*) 7001 # FIXME: insert proper C++ library support 7002 _LT_TAGVAR(ld_shlibs, $1)=no 7003 ;; 7004 7005 m88k*) 7006 # FIXME: insert proper C++ library support 7007 _LT_TAGVAR(ld_shlibs, $1)=no 7008 ;; 7009 7010 mvs*) 7011 case $cc_basename in 7012 cxx*) 7013 # FIXME: insert proper C++ library support 7014 _LT_TAGVAR(ld_shlibs, $1)=no 7015 ;; 7016 *) 7017 # FIXME: insert proper C++ library support 7018 _LT_TAGVAR(ld_shlibs, $1)=no 7019 ;; 7020 esac 7021 ;; 7022 7023 netbsd*) 7024 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7025 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7026 wlarc= 7027 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7028 _LT_TAGVAR(hardcode_direct, $1)=yes 7029 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7030 fi 7031 # Workaround some broken pre-1.5 toolchains 7032 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7033 ;; 7034 7035 *nto* | *qnx*) 7036 _LT_TAGVAR(ld_shlibs, $1)=yes 7037 ;; 7038 7039 openbsd* | bitrig*) 7040 if test -f /usr/libexec/ld.so; then 7041 _LT_TAGVAR(hardcode_direct, $1)=yes 7042 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7043 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7044 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7045 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7046 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7047 _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' 7048 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7049 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7050 fi 7051 output_verbose_link_cmd=func_echo_all 7052 else 7053 _LT_TAGVAR(ld_shlibs, $1)=no 7054 fi 7055 ;; 7056 7057 osf3* | osf4* | osf5*) 7058 case $cc_basename in 7059 KCC*) 7060 # Kuck and Associates, Inc. (KAI) C++ Compiler 7061 7062 # KCC will only create a shared library if the output file 7063 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7064 # to its proper name (with version) after linking. 7065 _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' 7066 7067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7068 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7069 7070 # Archives containing C++ object files must be created using 7071 # the KAI C++ compiler. 7072 case $host in 7073 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7074 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7075 esac 7076 ;; 7077 RCC*) 7078 # Rational C++ 2.4.1 7079 # FIXME: insert proper C++ library support 7080 _LT_TAGVAR(ld_shlibs, $1)=no 7081 ;; 7082 cxx*) 7083 case $host in 7084 osf3*) 7085 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7086 _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' 7087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7088 ;; 7089 *) 7090 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7091 _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' 7092 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7093 echo "-hidden">> $lib.exp~ 7094 $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~ 7095 $RM $lib.exp' 7096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7097 ;; 7098 esac 7099 7100 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7101 7102 # Commands to make compiler produce verbose output that lists 7103 # what "hidden" libraries, object files and flags are used when 7104 # linking a shared library. 7105 # 7106 # There doesn't appear to be a way to prevent this compiler from 7107 # explicitly linking system object files so we need to strip them 7108 # from the output so that they don't get included in the library 7109 # dependencies. 7110 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"' 7111 ;; 7112 *) 7113 if test yes,no = "$GXX,$with_gnu_ld"; then 7114 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7115 case $host in 7116 osf3*) 7117 _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' 7118 ;; 7119 *) 7120 _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' 7121 ;; 7122 esac 7123 7124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7125 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7126 7127 # Commands to make compiler produce verbose output that lists 7128 # what "hidden" libraries, object files and flags are used when 7129 # linking a shared library. 7130 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7131 7132 else 7133 # FIXME: insert proper C++ library support 7134 _LT_TAGVAR(ld_shlibs, $1)=no 7135 fi 7136 ;; 7137 esac 7138 ;; 7139 7140 psos*) 7141 # FIXME: insert proper C++ library support 7142 _LT_TAGVAR(ld_shlibs, $1)=no 7143 ;; 7144 7145 sunos4*) 7146 case $cc_basename in 7147 CC*) 7148 # Sun C++ 4.x 7149 # FIXME: insert proper C++ library support 7150 _LT_TAGVAR(ld_shlibs, $1)=no 7151 ;; 7152 lcc*) 7153 # Lucid 7154 # FIXME: insert proper C++ library support 7155 _LT_TAGVAR(ld_shlibs, $1)=no 7156 ;; 7157 *) 7158 # FIXME: insert proper C++ library support 7159 _LT_TAGVAR(ld_shlibs, $1)=no 7160 ;; 7161 esac 7162 ;; 7163 7164 solaris*) 7165 case $cc_basename in 7166 CC* | sunCC*) 7167 # Sun C++ 4.2, 5.x and Centerline C++ 7168 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7169 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7170 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7171 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7172 $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' 7173 7174 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7175 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7176 case $host_os in 7177 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7178 *) 7179 # The compiler driver will combine and reorder linker options, 7180 # but understands '-z linker_flag'. 7181 # Supported since Solaris 2.6 (maybe 2.5.1?) 7182 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7183 ;; 7184 esac 7185 _LT_TAGVAR(link_all_deplibs, $1)=yes 7186 7187 output_verbose_link_cmd='func_echo_all' 7188 7189 # Archives containing C++ object files must be created using 7190 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7191 # necessary to make sure instantiated templates are included 7192 # in the archive. 7193 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7194 ;; 7195 gcx*) 7196 # Green Hills C++ Compiler 7197 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7198 7199 # The C++ compiler must be used to create the archive. 7200 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7201 ;; 7202 *) 7203 # GNU C++ compiler with Solaris linker 7204 if test yes,no = "$GXX,$with_gnu_ld"; then 7205 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7206 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7208 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7209 $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' 7210 7211 # Commands to make compiler produce verbose output that lists 7212 # what "hidden" libraries, object files and flags are used when 7213 # linking a shared library. 7214 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7215 else 7216 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7217 # platform. 7218 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7219 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7220 $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' 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 -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226 fi 7227 7228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7229 case $host_os in 7230 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7231 *) 7232 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7233 ;; 7234 esac 7235 fi 7236 ;; 7237 esac 7238 ;; 7239 7240 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7241 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7242 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7243 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7244 runpath_var='LD_RUN_PATH' 7245 7246 case $cc_basename in 7247 CC*) 7248 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7249 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7250 ;; 7251 *) 7252 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7253 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7254 ;; 7255 esac 7256 ;; 7257 7258 sysv5* | sco3.2v5* | sco5v6*) 7259 # Note: We CANNOT use -z defs as we might desire, because we do not 7260 # link with -lc, and that would cause any symbols used from libc to 7261 # always be unresolved, which means just about no library would 7262 # ever link correctly. If we're not using GNU ld we use -z text 7263 # though, which does catch some bad symbols but isn't as heavy-handed 7264 # as -z defs. 7265 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7266 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7267 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7268 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7270 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7271 _LT_TAGVAR(link_all_deplibs, $1)=yes 7272 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7273 runpath_var='LD_RUN_PATH' 7274 7275 case $cc_basename in 7276 CC*) 7277 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7279 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7280 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7281 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7282 '"$_LT_TAGVAR(reload_cmds, $1)" 7283 ;; 7284 *) 7285 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7286 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7287 ;; 7288 esac 7289 ;; 7290 7291 tandem*) 7292 case $cc_basename in 7293 NCC*) 7294 # NonStop-UX NCC 3.20 7295 # FIXME: insert proper C++ library support 7296 _LT_TAGVAR(ld_shlibs, $1)=no 7297 ;; 7298 *) 7299 # FIXME: insert proper C++ library support 7300 _LT_TAGVAR(ld_shlibs, $1)=no 7301 ;; 7302 esac 7303 ;; 7304 7305 vxworks*) 7306 # FIXME: insert proper C++ library support 7307 _LT_TAGVAR(ld_shlibs, $1)=no 7308 ;; 7309 7310 *) 7311 # FIXME: insert proper C++ library support 7312 _LT_TAGVAR(ld_shlibs, $1)=no 7313 ;; 7314 esac 7315 7316 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7317 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7318 7319 _LT_TAGVAR(GCC, $1)=$GXX 7320 _LT_TAGVAR(LD, $1)=$LD 7321 7322 ## CAVEAT EMPTOR: 7323 ## There is no encapsulation within the following macros, do not change 7324 ## the running order or otherwise move them around unless you know exactly 7325 ## what you are doing... 7326 _LT_SYS_HIDDEN_LIBDEPS($1) 7327 _LT_COMPILER_PIC($1) 7328 _LT_COMPILER_C_O($1) 7329 _LT_COMPILER_FILE_LOCKS($1) 7330 _LT_LINKER_SHLIBS($1) 7331 _LT_SYS_DYNAMIC_LINKER($1) 7332 _LT_LINKER_HARDCODE_LIBPATH($1) 7333 7334 _LT_CONFIG($1) 7335 fi # test -n "$compiler" 7336 7337 CC=$lt_save_CC 7338 CFLAGS=$lt_save_CFLAGS 7339 LDCXX=$LD 7340 LD=$lt_save_LD 7341 GCC=$lt_save_GCC 7342 with_gnu_ld=$lt_save_with_gnu_ld 7343 lt_cv_path_LDCXX=$lt_cv_path_LD 7344 lt_cv_path_LD=$lt_save_path_LD 7345 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7346 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7347fi # test yes != "$_lt_caught_CXX_error" 7348 7349AC_LANG_POP 7350])# _LT_LANG_CXX_CONFIG 7351 7352 7353# _LT_FUNC_STRIPNAME_CNF 7354# ---------------------- 7355# func_stripname_cnf prefix suffix name 7356# strip PREFIX and SUFFIX off of NAME. 7357# PREFIX and SUFFIX must not contain globbing or regex special 7358# characters, hashes, percent signs, but SUFFIX may contain a leading 7359# dot (in which case that matches only a dot). 7360# 7361# This function is identical to the (non-XSI) version of func_stripname, 7362# except this one can be used by m4 code that may be executed by configure, 7363# rather than the libtool script. 7364m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7365AC_REQUIRE([_LT_DECL_SED]) 7366AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7367func_stripname_cnf () 7368{ 7369 case @S|@2 in 7370 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7371 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7372 esac 7373} # func_stripname_cnf 7374])# _LT_FUNC_STRIPNAME_CNF 7375 7376# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7377# --------------------------------- 7378# Figure out "hidden" library dependencies from verbose 7379# compiler output when linking a shared library. 7380# Parse the compiler output and extract the necessary 7381# objects, libraries and library flags. 7382m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7383[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7384AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7385# Dependencies to place before and after the object being linked: 7386_LT_TAGVAR(predep_objects, $1)= 7387_LT_TAGVAR(postdep_objects, $1)= 7388_LT_TAGVAR(predeps, $1)= 7389_LT_TAGVAR(postdeps, $1)= 7390_LT_TAGVAR(compiler_lib_search_path, $1)= 7391 7392dnl we can't use the lt_simple_compile_test_code here, 7393dnl because it contains code intended for an executable, 7394dnl not a library. It's possible we should let each 7395dnl tag define a new lt_????_link_test_code variable, 7396dnl but it's only used here... 7397m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7398int a; 7399void foo (void) { a = 0; } 7400_LT_EOF 7401], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7402class Foo 7403{ 7404public: 7405 Foo (void) { a = 0; } 7406private: 7407 int a; 7408}; 7409_LT_EOF 7410], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7411 subroutine foo 7412 implicit none 7413 integer*4 a 7414 a=0 7415 return 7416 end 7417_LT_EOF 7418], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7419 subroutine foo 7420 implicit none 7421 integer a 7422 a=0 7423 return 7424 end 7425_LT_EOF 7426], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7427public class foo { 7428 private int a; 7429 public void bar (void) { 7430 a = 0; 7431 } 7432}; 7433_LT_EOF 7434], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7435package foo 7436func foo() { 7437} 7438_LT_EOF 7439]) 7440 7441_lt_libdeps_save_CFLAGS=$CFLAGS 7442case "$CC $CFLAGS " in #( 7443*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7444*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7445*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7446esac 7447 7448dnl Parse the compiler output and extract the necessary 7449dnl objects, libraries and library flags. 7450if AC_TRY_EVAL(ac_compile); then 7451 # Parse the compiler output and extract the necessary 7452 # objects, libraries and library flags. 7453 7454 # Sentinel used to keep track of whether or not we are before 7455 # the conftest object file. 7456 pre_test_object_deps_done=no 7457 7458 for p in `eval "$output_verbose_link_cmd"`; do 7459 case $prev$p in 7460 7461 -L* | -R* | -l*) 7462 # Some compilers place space between "-{L,R}" and the path. 7463 # Remove the space. 7464 if test x-L = "$p" || 7465 test x-R = "$p"; then 7466 prev=$p 7467 continue 7468 fi 7469 7470 # Expand the sysroot to ease extracting the directories later. 7471 if test -z "$prev"; then 7472 case $p in 7473 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7474 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7475 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7476 esac 7477 fi 7478 case $p in 7479 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7480 esac 7481 if test no = "$pre_test_object_deps_done"; then 7482 case $prev in 7483 -L | -R) 7484 # Internal compiler library paths should come after those 7485 # provided the user. The postdeps already come after the 7486 # user supplied libs so there is no need to process them. 7487 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7488 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7489 else 7490 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7491 fi 7492 ;; 7493 # The "-l" case would never come before the object being 7494 # linked, so don't bother handling this case. 7495 esac 7496 else 7497 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7498 _LT_TAGVAR(postdeps, $1)=$prev$p 7499 else 7500 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7501 fi 7502 fi 7503 prev= 7504 ;; 7505 7506 *.lto.$objext) ;; # Ignore GCC LTO objects 7507 *.$objext) 7508 # This assumes that the test object file only shows up 7509 # once in the compiler output. 7510 if test "$p" = "conftest.$objext"; then 7511 pre_test_object_deps_done=yes 7512 continue 7513 fi 7514 7515 if test no = "$pre_test_object_deps_done"; then 7516 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7517 _LT_TAGVAR(predep_objects, $1)=$p 7518 else 7519 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7520 fi 7521 else 7522 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7523 _LT_TAGVAR(postdep_objects, $1)=$p 7524 else 7525 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7526 fi 7527 fi 7528 ;; 7529 7530 *) ;; # Ignore the rest. 7531 7532 esac 7533 done 7534 7535 # Clean up. 7536 rm -f a.out a.exe 7537else 7538 echo "libtool.m4: error: problem compiling $1 test program" 7539fi 7540 7541$RM -f confest.$objext 7542CFLAGS=$_lt_libdeps_save_CFLAGS 7543 7544# PORTME: override above test on systems where it is broken 7545m4_if([$1], [CXX], 7546[case $host_os in 7547interix[[3-9]]*) 7548 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7549 # hack all around it, let's just trust "g++" to DTRT. 7550 _LT_TAGVAR(predep_objects,$1)= 7551 _LT_TAGVAR(postdep_objects,$1)= 7552 _LT_TAGVAR(postdeps,$1)= 7553 ;; 7554 7555linux*) 7556 case `$CC -V 2>&1 | sed 5q` in 7557 *Sun\ C*) 7558 # Sun C++ 5.9 7559 7560 # The more standards-conforming stlport4 library is 7561 # incompatible with the Cstd library. Avoid specifying 7562 # it if it's in CXXFLAGS. Ignore libCrun as 7563 # -library=stlport4 depends on it. 7564 case " $CXX $CXXFLAGS " in 7565 *" -library=stlport4 "*) 7566 solaris_use_stlport4=yes 7567 ;; 7568 esac 7569 7570 if test yes != "$solaris_use_stlport4"; then 7571 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7572 fi 7573 ;; 7574 esac 7575 ;; 7576 7577solaris*) 7578 case $cc_basename in 7579 CC* | sunCC*) 7580 # The more standards-conforming stlport4 library is 7581 # incompatible with the Cstd library. Avoid specifying 7582 # it if it's in CXXFLAGS. Ignore libCrun as 7583 # -library=stlport4 depends on it. 7584 case " $CXX $CXXFLAGS " in 7585 *" -library=stlport4 "*) 7586 solaris_use_stlport4=yes 7587 ;; 7588 esac 7589 7590 # Adding this requires a known-good setup of shared libraries for 7591 # Sun compiler versions before 5.6, else PIC objects from an old 7592 # archive will be linked into the output, leading to subtle bugs. 7593 if test yes != "$solaris_use_stlport4"; then 7594 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7595 fi 7596 ;; 7597 esac 7598 ;; 7599esac 7600]) 7601 7602case " $_LT_TAGVAR(postdeps, $1) " in 7603*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7604esac 7605 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7606if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7607 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7608fi 7609_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7610 [The directories searched by this compiler when creating a shared library]) 7611_LT_TAGDECL([], [predep_objects], [1], 7612 [Dependencies to place before and after the objects being linked to 7613 create a shared library]) 7614_LT_TAGDECL([], [postdep_objects], [1]) 7615_LT_TAGDECL([], [predeps], [1]) 7616_LT_TAGDECL([], [postdeps], [1]) 7617_LT_TAGDECL([], [compiler_lib_search_path], [1], 7618 [The library search path used internally by the compiler when linking 7619 a shared library]) 7620])# _LT_SYS_HIDDEN_LIBDEPS 7621 7622 7623# _LT_LANG_F77_CONFIG([TAG]) 7624# -------------------------- 7625# Ensure that the configuration variables for a Fortran 77 compiler are 7626# suitably defined. These variables are subsequently used by _LT_CONFIG 7627# to write the compiler configuration to 'libtool'. 7628m4_defun([_LT_LANG_F77_CONFIG], 7629[AC_LANG_PUSH(Fortran 77) 7630if test -z "$F77" || test no = "$F77"; then 7631 _lt_disable_F77=yes 7632fi 7633 7634_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7635_LT_TAGVAR(allow_undefined_flag, $1)= 7636_LT_TAGVAR(always_export_symbols, $1)=no 7637_LT_TAGVAR(archive_expsym_cmds, $1)= 7638_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7639_LT_TAGVAR(hardcode_direct, $1)=no 7640_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7641_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7642_LT_TAGVAR(hardcode_libdir_separator, $1)= 7643_LT_TAGVAR(hardcode_minus_L, $1)=no 7644_LT_TAGVAR(hardcode_automatic, $1)=no 7645_LT_TAGVAR(inherit_rpath, $1)=no 7646_LT_TAGVAR(module_cmds, $1)= 7647_LT_TAGVAR(module_expsym_cmds, $1)= 7648_LT_TAGVAR(link_all_deplibs, $1)=unknown 7649_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7650_LT_TAGVAR(reload_flag, $1)=$reload_flag 7651_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7652_LT_TAGVAR(no_undefined_flag, $1)= 7653_LT_TAGVAR(whole_archive_flag_spec, $1)= 7654_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7655 7656# Source file extension for f77 test sources. 7657ac_ext=f 7658 7659# Object file extension for compiled f77 test sources. 7660objext=o 7661_LT_TAGVAR(objext, $1)=$objext 7662 7663# No sense in running all these tests if we already determined that 7664# the F77 compiler isn't working. Some variables (like enable_shared) 7665# are currently assumed to apply to all compilers on this platform, 7666# and will be corrupted by setting them based on a non-working compiler. 7667if test yes != "$_lt_disable_F77"; then 7668 # Code to be used in simple compile tests 7669 lt_simple_compile_test_code="\ 7670 subroutine t 7671 return 7672 end 7673" 7674 7675 # Code to be used in simple link tests 7676 lt_simple_link_test_code="\ 7677 program t 7678 end 7679" 7680 7681 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7682 _LT_TAG_COMPILER 7683 7684 # save warnings/boilerplate of simple test code 7685 _LT_COMPILER_BOILERPLATE 7686 _LT_LINKER_BOILERPLATE 7687 7688 # Allow CC to be a program name with arguments. 7689 lt_save_CC=$CC 7690 lt_save_GCC=$GCC 7691 lt_save_CFLAGS=$CFLAGS 7692 CC=${F77-"f77"} 7693 CFLAGS=$FFLAGS 7694 compiler=$CC 7695 _LT_TAGVAR(compiler, $1)=$CC 7696 _LT_CC_BASENAME([$compiler]) 7697 GCC=$G77 7698 if test -n "$compiler"; then 7699 AC_MSG_CHECKING([if libtool supports shared libraries]) 7700 AC_MSG_RESULT([$can_build_shared]) 7701 7702 AC_MSG_CHECKING([whether to build shared libraries]) 7703 test no = "$can_build_shared" && enable_shared=no 7704 7705 # On AIX, shared libraries and static libraries use the same namespace, and 7706 # are all built from PIC. 7707 case $host_os in 7708 aix3*) 7709 test yes = "$enable_shared" && enable_static=no 7710 if test -n "$RANLIB"; then 7711 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7712 postinstall_cmds='$RANLIB $lib' 7713 fi 7714 ;; 7715 aix[[4-9]]*) 7716 if test ia64 != "$host_cpu"; then 7717 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7718 yes,aix,yes) ;; # shared object as lib.so file only 7719 yes,svr4,*) ;; # shared object as lib.so archive member only 7720 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7721 esac 7722 fi 7723 ;; 7724 esac 7725 AC_MSG_RESULT([$enable_shared]) 7726 7727 AC_MSG_CHECKING([whether to build static libraries]) 7728 # Make sure either enable_shared or enable_static is yes. 7729 test yes = "$enable_shared" || enable_static=yes 7730 AC_MSG_RESULT([$enable_static]) 7731 7732 _LT_TAGVAR(GCC, $1)=$G77 7733 _LT_TAGVAR(LD, $1)=$LD 7734 7735 ## CAVEAT EMPTOR: 7736 ## There is no encapsulation within the following macros, do not change 7737 ## the running order or otherwise move them around unless you know exactly 7738 ## what you are doing... 7739 _LT_COMPILER_PIC($1) 7740 _LT_COMPILER_C_O($1) 7741 _LT_COMPILER_FILE_LOCKS($1) 7742 _LT_LINKER_SHLIBS($1) 7743 _LT_SYS_DYNAMIC_LINKER($1) 7744 _LT_LINKER_HARDCODE_LIBPATH($1) 7745 7746 _LT_CONFIG($1) 7747 fi # test -n "$compiler" 7748 7749 GCC=$lt_save_GCC 7750 CC=$lt_save_CC 7751 CFLAGS=$lt_save_CFLAGS 7752fi # test yes != "$_lt_disable_F77" 7753 7754AC_LANG_POP 7755])# _LT_LANG_F77_CONFIG 7756 7757 7758# _LT_LANG_FC_CONFIG([TAG]) 7759# ------------------------- 7760# Ensure that the configuration variables for a Fortran compiler are 7761# suitably defined. These variables are subsequently used by _LT_CONFIG 7762# to write the compiler configuration to 'libtool'. 7763m4_defun([_LT_LANG_FC_CONFIG], 7764[AC_LANG_PUSH(Fortran) 7765 7766if test -z "$FC" || test no = "$FC"; then 7767 _lt_disable_FC=yes 7768fi 7769 7770_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7771_LT_TAGVAR(allow_undefined_flag, $1)= 7772_LT_TAGVAR(always_export_symbols, $1)=no 7773_LT_TAGVAR(archive_expsym_cmds, $1)= 7774_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7775_LT_TAGVAR(hardcode_direct, $1)=no 7776_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7777_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7778_LT_TAGVAR(hardcode_libdir_separator, $1)= 7779_LT_TAGVAR(hardcode_minus_L, $1)=no 7780_LT_TAGVAR(hardcode_automatic, $1)=no 7781_LT_TAGVAR(inherit_rpath, $1)=no 7782_LT_TAGVAR(module_cmds, $1)= 7783_LT_TAGVAR(module_expsym_cmds, $1)= 7784_LT_TAGVAR(link_all_deplibs, $1)=unknown 7785_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7786_LT_TAGVAR(reload_flag, $1)=$reload_flag 7787_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7788_LT_TAGVAR(no_undefined_flag, $1)= 7789_LT_TAGVAR(whole_archive_flag_spec, $1)= 7790_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7791 7792# Source file extension for fc test sources. 7793ac_ext=${ac_fc_srcext-f} 7794 7795# Object file extension for compiled fc test sources. 7796objext=o 7797_LT_TAGVAR(objext, $1)=$objext 7798 7799# No sense in running all these tests if we already determined that 7800# the FC compiler isn't working. Some variables (like enable_shared) 7801# are currently assumed to apply to all compilers on this platform, 7802# and will be corrupted by setting them based on a non-working compiler. 7803if test yes != "$_lt_disable_FC"; then 7804 # Code to be used in simple compile tests 7805 lt_simple_compile_test_code="\ 7806 subroutine t 7807 return 7808 end 7809" 7810 7811 # Code to be used in simple link tests 7812 lt_simple_link_test_code="\ 7813 program t 7814 end 7815" 7816 7817 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7818 _LT_TAG_COMPILER 7819 7820 # save warnings/boilerplate of simple test code 7821 _LT_COMPILER_BOILERPLATE 7822 _LT_LINKER_BOILERPLATE 7823 7824 # Allow CC to be a program name with arguments. 7825 lt_save_CC=$CC 7826 lt_save_GCC=$GCC 7827 lt_save_CFLAGS=$CFLAGS 7828 CC=${FC-"f95"} 7829 CFLAGS=$FCFLAGS 7830 compiler=$CC 7831 GCC=$ac_cv_fc_compiler_gnu 7832 7833 _LT_TAGVAR(compiler, $1)=$CC 7834 _LT_CC_BASENAME([$compiler]) 7835 7836 if test -n "$compiler"; then 7837 AC_MSG_CHECKING([if libtool supports shared libraries]) 7838 AC_MSG_RESULT([$can_build_shared]) 7839 7840 AC_MSG_CHECKING([whether to build shared libraries]) 7841 test no = "$can_build_shared" && enable_shared=no 7842 7843 # On AIX, shared libraries and static libraries use the same namespace, and 7844 # are all built from PIC. 7845 case $host_os in 7846 aix3*) 7847 test yes = "$enable_shared" && enable_static=no 7848 if test -n "$RANLIB"; then 7849 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7850 postinstall_cmds='$RANLIB $lib' 7851 fi 7852 ;; 7853 aix[[4-9]]*) 7854 if test ia64 != "$host_cpu"; then 7855 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7856 yes,aix,yes) ;; # shared object as lib.so file only 7857 yes,svr4,*) ;; # shared object as lib.so archive member only 7858 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7859 esac 7860 fi 7861 ;; 7862 esac 7863 AC_MSG_RESULT([$enable_shared]) 7864 7865 AC_MSG_CHECKING([whether to build static libraries]) 7866 # Make sure either enable_shared or enable_static is yes. 7867 test yes = "$enable_shared" || enable_static=yes 7868 AC_MSG_RESULT([$enable_static]) 7869 7870 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7871 _LT_TAGVAR(LD, $1)=$LD 7872 7873 ## CAVEAT EMPTOR: 7874 ## There is no encapsulation within the following macros, do not change 7875 ## the running order or otherwise move them around unless you know exactly 7876 ## what you are doing... 7877 _LT_SYS_HIDDEN_LIBDEPS($1) 7878 _LT_COMPILER_PIC($1) 7879 _LT_COMPILER_C_O($1) 7880 _LT_COMPILER_FILE_LOCKS($1) 7881 _LT_LINKER_SHLIBS($1) 7882 _LT_SYS_DYNAMIC_LINKER($1) 7883 _LT_LINKER_HARDCODE_LIBPATH($1) 7884 7885 _LT_CONFIG($1) 7886 fi # test -n "$compiler" 7887 7888 GCC=$lt_save_GCC 7889 CC=$lt_save_CC 7890 CFLAGS=$lt_save_CFLAGS 7891fi # test yes != "$_lt_disable_FC" 7892 7893AC_LANG_POP 7894])# _LT_LANG_FC_CONFIG 7895 7896 7897# _LT_LANG_GCJ_CONFIG([TAG]) 7898# -------------------------- 7899# Ensure that the configuration variables for the GNU Java Compiler compiler 7900# are suitably defined. These variables are subsequently used by _LT_CONFIG 7901# to write the compiler configuration to 'libtool'. 7902m4_defun([_LT_LANG_GCJ_CONFIG], 7903[AC_REQUIRE([LT_PROG_GCJ])dnl 7904AC_LANG_SAVE 7905 7906# Source file extension for Java test sources. 7907ac_ext=java 7908 7909# Object file extension for compiled Java test sources. 7910objext=o 7911_LT_TAGVAR(objext, $1)=$objext 7912 7913# Code to be used in simple compile tests 7914lt_simple_compile_test_code="class foo {}" 7915 7916# Code to be used in simple link tests 7917lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7918 7919# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7920_LT_TAG_COMPILER 7921 7922# save warnings/boilerplate of simple test code 7923_LT_COMPILER_BOILERPLATE 7924_LT_LINKER_BOILERPLATE 7925 7926# Allow CC to be a program name with arguments. 7927lt_save_CC=$CC 7928lt_save_CFLAGS=$CFLAGS 7929lt_save_GCC=$GCC 7930GCC=yes 7931CC=${GCJ-"gcj"} 7932CFLAGS=$GCJFLAGS 7933compiler=$CC 7934_LT_TAGVAR(compiler, $1)=$CC 7935_LT_TAGVAR(LD, $1)=$LD 7936_LT_CC_BASENAME([$compiler]) 7937 7938# GCJ did not exist at the time GCC didn't implicitly link libc in. 7939_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7940 7941_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7942_LT_TAGVAR(reload_flag, $1)=$reload_flag 7943_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7944 7945if test -n "$compiler"; then 7946 _LT_COMPILER_NO_RTTI($1) 7947 _LT_COMPILER_PIC($1) 7948 _LT_COMPILER_C_O($1) 7949 _LT_COMPILER_FILE_LOCKS($1) 7950 _LT_LINKER_SHLIBS($1) 7951 _LT_LINKER_HARDCODE_LIBPATH($1) 7952 7953 _LT_CONFIG($1) 7954fi 7955 7956AC_LANG_RESTORE 7957 7958GCC=$lt_save_GCC 7959CC=$lt_save_CC 7960CFLAGS=$lt_save_CFLAGS 7961])# _LT_LANG_GCJ_CONFIG 7962 7963 7964# _LT_LANG_GO_CONFIG([TAG]) 7965# -------------------------- 7966# Ensure that the configuration variables for the GNU Go compiler 7967# are suitably defined. These variables are subsequently used by _LT_CONFIG 7968# to write the compiler configuration to 'libtool'. 7969m4_defun([_LT_LANG_GO_CONFIG], 7970[AC_REQUIRE([LT_PROG_GO])dnl 7971AC_LANG_SAVE 7972 7973# Source file extension for Go test sources. 7974ac_ext=go 7975 7976# Object file extension for compiled Go test sources. 7977objext=o 7978_LT_TAGVAR(objext, $1)=$objext 7979 7980# Code to be used in simple compile tests 7981lt_simple_compile_test_code="package main; func main() { }" 7982 7983# Code to be used in simple link tests 7984lt_simple_link_test_code='package main; func main() { }' 7985 7986# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7987_LT_TAG_COMPILER 7988 7989# save warnings/boilerplate of simple test code 7990_LT_COMPILER_BOILERPLATE 7991_LT_LINKER_BOILERPLATE 7992 7993# Allow CC to be a program name with arguments. 7994lt_save_CC=$CC 7995lt_save_CFLAGS=$CFLAGS 7996lt_save_GCC=$GCC 7997GCC=yes 7998CC=${GOC-"gccgo"} 7999CFLAGS=$GOFLAGS 8000compiler=$CC 8001_LT_TAGVAR(compiler, $1)=$CC 8002_LT_TAGVAR(LD, $1)=$LD 8003_LT_CC_BASENAME([$compiler]) 8004 8005# Go did not exist at the time GCC didn't implicitly link libc in. 8006_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8007 8008_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8009_LT_TAGVAR(reload_flag, $1)=$reload_flag 8010_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8011 8012if test -n "$compiler"; then 8013 _LT_COMPILER_NO_RTTI($1) 8014 _LT_COMPILER_PIC($1) 8015 _LT_COMPILER_C_O($1) 8016 _LT_COMPILER_FILE_LOCKS($1) 8017 _LT_LINKER_SHLIBS($1) 8018 _LT_LINKER_HARDCODE_LIBPATH($1) 8019 8020 _LT_CONFIG($1) 8021fi 8022 8023AC_LANG_RESTORE 8024 8025GCC=$lt_save_GCC 8026CC=$lt_save_CC 8027CFLAGS=$lt_save_CFLAGS 8028])# _LT_LANG_GO_CONFIG 8029 8030 8031# _LT_LANG_RC_CONFIG([TAG]) 8032# ------------------------- 8033# Ensure that the configuration variables for the Windows resource compiler 8034# are suitably defined. These variables are subsequently used by _LT_CONFIG 8035# to write the compiler configuration to 'libtool'. 8036m4_defun([_LT_LANG_RC_CONFIG], 8037[AC_REQUIRE([LT_PROG_RC])dnl 8038AC_LANG_SAVE 8039 8040# Source file extension for RC test sources. 8041ac_ext=rc 8042 8043# Object file extension for compiled RC test sources. 8044objext=o 8045_LT_TAGVAR(objext, $1)=$objext 8046 8047# Code to be used in simple compile tests 8048lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8049 8050# Code to be used in simple link tests 8051lt_simple_link_test_code=$lt_simple_compile_test_code 8052 8053# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8054_LT_TAG_COMPILER 8055 8056# save warnings/boilerplate of simple test code 8057_LT_COMPILER_BOILERPLATE 8058_LT_LINKER_BOILERPLATE 8059 8060# Allow CC to be a program name with arguments. 8061lt_save_CC=$CC 8062lt_save_CFLAGS=$CFLAGS 8063lt_save_GCC=$GCC 8064GCC= 8065CC=${RC-"windres"} 8066CFLAGS= 8067compiler=$CC 8068_LT_TAGVAR(compiler, $1)=$CC 8069_LT_CC_BASENAME([$compiler]) 8070_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8071 8072if test -n "$compiler"; then 8073 : 8074 _LT_CONFIG($1) 8075fi 8076 8077GCC=$lt_save_GCC 8078AC_LANG_RESTORE 8079CC=$lt_save_CC 8080CFLAGS=$lt_save_CFLAGS 8081])# _LT_LANG_RC_CONFIG 8082 8083 8084# LT_PROG_GCJ 8085# ----------- 8086AC_DEFUN([LT_PROG_GCJ], 8087[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8088 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8089 [AC_CHECK_TOOL(GCJ, gcj,) 8090 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8091 AC_SUBST(GCJFLAGS)])])[]dnl 8092]) 8093 8094# Old name: 8095AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8096dnl aclocal-1.4 backwards compatibility: 8097dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8098 8099 8100# LT_PROG_GO 8101# ---------- 8102AC_DEFUN([LT_PROG_GO], 8103[AC_CHECK_TOOL(GOC, gccgo,) 8104]) 8105 8106 8107# LT_PROG_RC 8108# ---------- 8109AC_DEFUN([LT_PROG_RC], 8110[AC_CHECK_TOOL(RC, windres,) 8111]) 8112 8113# Old name: 8114AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8115dnl aclocal-1.4 backwards compatibility: 8116dnl AC_DEFUN([LT_AC_PROG_RC], []) 8117 8118 8119# _LT_DECL_EGREP 8120# -------------- 8121# If we don't have a new enough Autoconf to choose the best grep 8122# available, choose the one first in the user's PATH. 8123m4_defun([_LT_DECL_EGREP], 8124[AC_REQUIRE([AC_PROG_EGREP])dnl 8125AC_REQUIRE([AC_PROG_FGREP])dnl 8126test -z "$GREP" && GREP=grep 8127_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8128_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8129_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8130dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8131AC_SUBST([GREP]) 8132]) 8133 8134 8135# _LT_DECL_OBJDUMP 8136# -------------- 8137# If we don't have a new enough Autoconf to choose the best objdump 8138# available, choose the one first in the user's PATH. 8139m4_defun([_LT_DECL_OBJDUMP], 8140[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8141test -z "$OBJDUMP" && OBJDUMP=objdump 8142_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8143AC_SUBST([OBJDUMP]) 8144]) 8145 8146# _LT_DECL_DLLTOOL 8147# ---------------- 8148# Ensure DLLTOOL variable is set. 8149m4_defun([_LT_DECL_DLLTOOL], 8150[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8151test -z "$DLLTOOL" && DLLTOOL=dlltool 8152_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8153AC_SUBST([DLLTOOL]) 8154]) 8155 8156# _LT_DECL_SED 8157# ------------ 8158# Check for a fully-functional sed program, that truncates 8159# as few characters as possible. Prefer GNU sed if found. 8160m4_defun([_LT_DECL_SED], 8161[AC_PROG_SED 8162test -z "$SED" && SED=sed 8163Xsed="$SED -e 1s/^X//" 8164_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8165_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8166 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8167])# _LT_DECL_SED 8168 8169m4_ifndef([AC_PROG_SED], [ 8170# NOTE: This macro has been submitted for inclusion into # 8171# GNU Autoconf as AC_PROG_SED. When it is available in # 8172# a released version of Autoconf we should remove this # 8173# macro and use it instead. # 8174 8175m4_defun([AC_PROG_SED], 8176[AC_MSG_CHECKING([for a sed that does not truncate output]) 8177AC_CACHE_VAL(lt_cv_path_SED, 8178[# Loop through the user's path and test for sed and gsed. 8179# Then use that list of sed's as ones to test for truncation. 8180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8181for as_dir in $PATH 8182do 8183 IFS=$as_save_IFS 8184 test -z "$as_dir" && as_dir=. 8185 for lt_ac_prog in sed gsed; do 8186 for ac_exec_ext in '' $ac_executable_extensions; do 8187 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8188 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8189 fi 8190 done 8191 done 8192done 8193IFS=$as_save_IFS 8194lt_ac_max=0 8195lt_ac_count=0 8196# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8197# along with /bin/sed that truncates output. 8198for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8199 test ! -f "$lt_ac_sed" && continue 8200 cat /dev/null > conftest.in 8201 lt_ac_count=0 8202 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8203 # Check for GNU sed and select it if it is found. 8204 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8205 lt_cv_path_SED=$lt_ac_sed 8206 break 8207 fi 8208 while true; do 8209 cat conftest.in conftest.in >conftest.tmp 8210 mv conftest.tmp conftest.in 8211 cp conftest.in conftest.nl 8212 echo >>conftest.nl 8213 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8214 cmp -s conftest.out conftest.nl || break 8215 # 10000 chars as input seems more than enough 8216 test 10 -lt "$lt_ac_count" && break 8217 lt_ac_count=`expr $lt_ac_count + 1` 8218 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8219 lt_ac_max=$lt_ac_count 8220 lt_cv_path_SED=$lt_ac_sed 8221 fi 8222 done 8223done 8224]) 8225SED=$lt_cv_path_SED 8226AC_SUBST([SED]) 8227AC_MSG_RESULT([$SED]) 8228])#AC_PROG_SED 8229])#m4_ifndef 8230 8231# Old name: 8232AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8233dnl aclocal-1.4 backwards compatibility: 8234dnl AC_DEFUN([LT_AC_PROG_SED], []) 8235 8236 8237# _LT_CHECK_SHELL_FEATURES 8238# ------------------------ 8239# Find out whether the shell is Bourne or XSI compatible, 8240# or has some other useful features. 8241m4_defun([_LT_CHECK_SHELL_FEATURES], 8242[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8243 lt_unset=unset 8244else 8245 lt_unset=false 8246fi 8247_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8248 8249# test EBCDIC or ASCII 8250case `echo X|tr X '\101'` in 8251 A) # ASCII based system 8252 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8253 lt_SP2NL='tr \040 \012' 8254 lt_NL2SP='tr \015\012 \040\040' 8255 ;; 8256 *) # EBCDIC based system 8257 lt_SP2NL='tr \100 \n' 8258 lt_NL2SP='tr \r\n \100\100' 8259 ;; 8260esac 8261_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8262_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8263])# _LT_CHECK_SHELL_FEATURES 8264 8265 8266# _LT_PATH_CONVERSION_FUNCTIONS 8267# ----------------------------- 8268# Determine what file name conversion functions should be used by 8269# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8270# for certain cross-compile configurations and native mingw. 8271m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8272[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8273AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8274AC_MSG_CHECKING([how to convert $build file names to $host format]) 8275AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8276[case $host in 8277 *-*-mingw* ) 8278 case $build in 8279 *-*-mingw* ) # actually msys 8280 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8281 ;; 8282 *-*-cygwin* ) 8283 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8284 ;; 8285 * ) # otherwise, assume *nix 8286 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8287 ;; 8288 esac 8289 ;; 8290 *-*-cygwin* ) 8291 case $build in 8292 *-*-mingw* ) # actually msys 8293 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8294 ;; 8295 *-*-cygwin* ) 8296 lt_cv_to_host_file_cmd=func_convert_file_noop 8297 ;; 8298 * ) # otherwise, assume *nix 8299 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8300 ;; 8301 esac 8302 ;; 8303 * ) # unhandled hosts (and "normal" native builds) 8304 lt_cv_to_host_file_cmd=func_convert_file_noop 8305 ;; 8306esac 8307]) 8308to_host_file_cmd=$lt_cv_to_host_file_cmd 8309AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8310_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8311 [0], [convert $build file names to $host format])dnl 8312 8313AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8314AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8315[#assume ordinary cross tools, or native build. 8316lt_cv_to_tool_file_cmd=func_convert_file_noop 8317case $host in 8318 *-*-mingw* ) 8319 case $build in 8320 *-*-mingw* ) # actually msys 8321 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8322 ;; 8323 esac 8324 ;; 8325esac 8326]) 8327to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8328AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8329_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8330 [0], [convert $build files to toolchain format])dnl 8331])# _LT_PATH_CONVERSION_FUNCTIONS 8332 8333# Helper functions for option handling. -*- Autoconf -*- 8334# 8335# Copyright (C) 2004-2005, 2007-2009, 2011-2014 Free Software 8336# Foundation, Inc. 8337# Written by Gary V. Vaughan, 2004 8338# 8339# This file is free software; the Free Software Foundation gives 8340# unlimited permission to copy and/or distribute it, with or without 8341# modifications, as long as this notice is preserved. 8342 8343# serial 8 ltoptions.m4 8344 8345# This is to help aclocal find these macros, as it can't see m4_define. 8346AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8347 8348 8349# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8350# ------------------------------------------ 8351m4_define([_LT_MANGLE_OPTION], 8352[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8353 8354 8355# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8356# --------------------------------------- 8357# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8358# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8359# saved as a flag. 8360m4_define([_LT_SET_OPTION], 8361[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8362m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8363 _LT_MANGLE_DEFUN([$1], [$2]), 8364 [m4_warning([Unknown $1 option '$2'])])[]dnl 8365]) 8366 8367 8368# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8369# ------------------------------------------------------------ 8370# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8371m4_define([_LT_IF_OPTION], 8372[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8373 8374 8375# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8376# ------------------------------------------------------- 8377# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8378# are set. 8379m4_define([_LT_UNLESS_OPTIONS], 8380[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8381 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8382 [m4_define([$0_found])])])[]dnl 8383m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8384])[]dnl 8385]) 8386 8387 8388# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8389# ---------------------------------------- 8390# OPTION-LIST is a space-separated list of Libtool options associated 8391# with MACRO-NAME. If any OPTION has a matching handler declared with 8392# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8393# the unknown option and exit. 8394m4_defun([_LT_SET_OPTIONS], 8395[# Set options 8396m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8397 [_LT_SET_OPTION([$1], _LT_Option)]) 8398 8399m4_if([$1],[LT_INIT],[ 8400 dnl 8401 dnl Simply set some default values (i.e off) if boolean options were not 8402 dnl specified: 8403 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8404 ]) 8405 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8406 ]) 8407 dnl 8408 dnl If no reference was made to various pairs of opposing options, then 8409 dnl we run the default mode handler for the pair. For example, if neither 8410 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8411 dnl archives by default: 8412 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8413 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8414 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8415 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8416 [_LT_ENABLE_FAST_INSTALL]) 8417 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8418 [_LT_WITH_AIX_SONAME([aix])]) 8419 ]) 8420])# _LT_SET_OPTIONS 8421 8422 8423 8424# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8425# ----------------------------------------- 8426m4_define([_LT_MANGLE_DEFUN], 8427[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8428 8429 8430# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8431# ----------------------------------------------- 8432m4_define([LT_OPTION_DEFINE], 8433[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8434])# LT_OPTION_DEFINE 8435 8436 8437# dlopen 8438# ------ 8439LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8440]) 8441 8442AU_DEFUN([AC_LIBTOOL_DLOPEN], 8443[_LT_SET_OPTION([LT_INIT], [dlopen]) 8444AC_DIAGNOSE([obsolete], 8445[$0: Remove this warning and the call to _LT_SET_OPTION when you 8446put the 'dlopen' option into LT_INIT's first parameter.]) 8447]) 8448 8449dnl aclocal-1.4 backwards compatibility: 8450dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8451 8452 8453# win32-dll 8454# --------- 8455# Declare package support for building win32 dll's. 8456LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8457[enable_win32_dll=yes 8458 8459case $host in 8460*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8461 AC_CHECK_TOOL(AS, as, false) 8462 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8463 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8464 ;; 8465esac 8466 8467test -z "$AS" && AS=as 8468_LT_DECL([], [AS], [1], [Assembler program])dnl 8469 8470test -z "$DLLTOOL" && DLLTOOL=dlltool 8471_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8472 8473test -z "$OBJDUMP" && OBJDUMP=objdump 8474_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8475])# win32-dll 8476 8477AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8478[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8479_LT_SET_OPTION([LT_INIT], [win32-dll]) 8480AC_DIAGNOSE([obsolete], 8481[$0: Remove this warning and the call to _LT_SET_OPTION when you 8482put the 'win32-dll' option into LT_INIT's first parameter.]) 8483]) 8484 8485dnl aclocal-1.4 backwards compatibility: 8486dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8487 8488 8489# _LT_ENABLE_SHARED([DEFAULT]) 8490# ---------------------------- 8491# implement the --enable-shared flag, and supports the 'shared' and 8492# 'disable-shared' LT_INIT options. 8493# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8494m4_define([_LT_ENABLE_SHARED], 8495[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8496AC_ARG_ENABLE([shared], 8497 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8498 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8499 [p=${PACKAGE-default} 8500 case $enableval in 8501 yes) enable_shared=yes ;; 8502 no) enable_shared=no ;; 8503 *) 8504 enable_shared=no 8505 # Look at the argument we got. We use all the common list separators. 8506 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8507 for pkg in $enableval; do 8508 IFS=$lt_save_ifs 8509 if test "X$pkg" = "X$p"; then 8510 enable_shared=yes 8511 fi 8512 done 8513 IFS=$lt_save_ifs 8514 ;; 8515 esac], 8516 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8517 8518 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8519 [Whether or not to build shared libraries]) 8520])# _LT_ENABLE_SHARED 8521 8522LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8523LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8524 8525# Old names: 8526AC_DEFUN([AC_ENABLE_SHARED], 8527[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8528]) 8529 8530AC_DEFUN([AC_DISABLE_SHARED], 8531[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8532]) 8533 8534AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8535AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8536 8537dnl aclocal-1.4 backwards compatibility: 8538dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8539dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8540 8541 8542 8543# _LT_ENABLE_STATIC([DEFAULT]) 8544# ---------------------------- 8545# implement the --enable-static flag, and support the 'static' and 8546# 'disable-static' LT_INIT options. 8547# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8548m4_define([_LT_ENABLE_STATIC], 8549[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8550AC_ARG_ENABLE([static], 8551 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8552 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8553 [p=${PACKAGE-default} 8554 case $enableval in 8555 yes) enable_static=yes ;; 8556 no) enable_static=no ;; 8557 *) 8558 enable_static=no 8559 # Look at the argument we got. We use all the common list separators. 8560 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8561 for pkg in $enableval; do 8562 IFS=$lt_save_ifs 8563 if test "X$pkg" = "X$p"; then 8564 enable_static=yes 8565 fi 8566 done 8567 IFS=$lt_save_ifs 8568 ;; 8569 esac], 8570 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8571 8572 _LT_DECL([build_old_libs], [enable_static], [0], 8573 [Whether or not to build static libraries]) 8574])# _LT_ENABLE_STATIC 8575 8576LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8577LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8578 8579# Old names: 8580AC_DEFUN([AC_ENABLE_STATIC], 8581[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8582]) 8583 8584AC_DEFUN([AC_DISABLE_STATIC], 8585[_LT_SET_OPTION([LT_INIT], [disable-static]) 8586]) 8587 8588AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8589AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8590 8591dnl aclocal-1.4 backwards compatibility: 8592dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8593dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8594 8595 8596 8597# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8598# ---------------------------------- 8599# implement the --enable-fast-install flag, and support the 'fast-install' 8600# and 'disable-fast-install' LT_INIT options. 8601# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8602m4_define([_LT_ENABLE_FAST_INSTALL], 8603[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8604AC_ARG_ENABLE([fast-install], 8605 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8606 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8607 [p=${PACKAGE-default} 8608 case $enableval in 8609 yes) enable_fast_install=yes ;; 8610 no) enable_fast_install=no ;; 8611 *) 8612 enable_fast_install=no 8613 # Look at the argument we got. We use all the common list separators. 8614 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8615 for pkg in $enableval; do 8616 IFS=$lt_save_ifs 8617 if test "X$pkg" = "X$p"; then 8618 enable_fast_install=yes 8619 fi 8620 done 8621 IFS=$lt_save_ifs 8622 ;; 8623 esac], 8624 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8625 8626_LT_DECL([fast_install], [enable_fast_install], [0], 8627 [Whether or not to optimize for fast installation])dnl 8628])# _LT_ENABLE_FAST_INSTALL 8629 8630LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8631LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8632 8633# Old names: 8634AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8635[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8636AC_DIAGNOSE([obsolete], 8637[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8638the 'fast-install' option into LT_INIT's first parameter.]) 8639]) 8640 8641AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8642[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8643AC_DIAGNOSE([obsolete], 8644[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8645the 'disable-fast-install' option into LT_INIT's first parameter.]) 8646]) 8647 8648dnl aclocal-1.4 backwards compatibility: 8649dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8650dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8651 8652 8653# _LT_WITH_AIX_SONAME([DEFAULT]) 8654# ---------------------------------- 8655# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8656# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8657# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8658m4_define([_LT_WITH_AIX_SONAME], 8659[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8660shared_archive_member_spec= 8661case $host,$enable_shared in 8662power*-*-aix[[5-9]]*,yes) 8663 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8664 AC_ARG_WITH([aix-soname], 8665 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8666 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8667 [case $withval in 8668 aix|svr4|both) 8669 ;; 8670 *) 8671 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8672 ;; 8673 esac 8674 lt_cv_with_aix_soname=$with_aix_soname], 8675 [AC_CACHE_VAL([lt_cv_with_aix_soname], 8676 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8677 with_aix_soname=$lt_cv_with_aix_soname]) 8678 AC_MSG_RESULT([$with_aix_soname]) 8679 if test aix != "$with_aix_soname"; then 8680 # For the AIX way of multilib, we name the shared archive member 8681 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8682 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8683 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8684 # the AIX toolchain works better with OBJECT_MODE set (default 32). 8685 if test 64 = "${OBJECT_MODE-32}"; then 8686 shared_archive_member_spec=shr_64 8687 else 8688 shared_archive_member_spec=shr 8689 fi 8690 fi 8691 ;; 8692*) 8693 with_aix_soname=aix 8694 ;; 8695esac 8696 8697_LT_DECL([], [shared_archive_member_spec], [0], 8698 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8699])# _LT_WITH_AIX_SONAME 8700 8701LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8702LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8703LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8704 8705 8706# _LT_WITH_PIC([MODE]) 8707# -------------------- 8708# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8709# LT_INIT options. 8710# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8711m4_define([_LT_WITH_PIC], 8712[AC_ARG_WITH([pic], 8713 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8714 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8715 [lt_p=${PACKAGE-default} 8716 case $withval in 8717 yes|no) pic_mode=$withval ;; 8718 *) 8719 pic_mode=default 8720 # Look at the argument we got. We use all the common list separators. 8721 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8722 for lt_pkg in $withval; do 8723 IFS=$lt_save_ifs 8724 if test "X$lt_pkg" = "X$lt_p"; then 8725 pic_mode=yes 8726 fi 8727 done 8728 IFS=$lt_save_ifs 8729 ;; 8730 esac], 8731 [pic_mode=m4_default([$1], [default])]) 8732 8733_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8734])# _LT_WITH_PIC 8735 8736LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8737LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8738 8739# Old name: 8740AU_DEFUN([AC_LIBTOOL_PICMODE], 8741[_LT_SET_OPTION([LT_INIT], [pic-only]) 8742AC_DIAGNOSE([obsolete], 8743[$0: Remove this warning and the call to _LT_SET_OPTION when you 8744put the 'pic-only' option into LT_INIT's first parameter.]) 8745]) 8746 8747dnl aclocal-1.4 backwards compatibility: 8748dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8749 8750 8751m4_define([_LTDL_MODE], []) 8752LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8753 [m4_define([_LTDL_MODE], [nonrecursive])]) 8754LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8755 [m4_define([_LTDL_MODE], [recursive])]) 8756LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8757 [m4_define([_LTDL_MODE], [subproject])]) 8758 8759m4_define([_LTDL_TYPE], []) 8760LT_OPTION_DEFINE([LTDL_INIT], [installable], 8761 [m4_define([_LTDL_TYPE], [installable])]) 8762LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8763 [m4_define([_LTDL_TYPE], [convenience])]) 8764 8765# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8766# 8767# Copyright (C) 2004-2005, 2007-2008, 2011-2014 Free Software 8768# Foundation, Inc. 8769# Written by Gary V. Vaughan, 2004 8770# 8771# This file is free software; the Free Software Foundation gives 8772# unlimited permission to copy and/or distribute it, with or without 8773# modifications, as long as this notice is preserved. 8774 8775# serial 6 ltsugar.m4 8776 8777# This is to help aclocal find these macros, as it can't see m4_define. 8778AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8779 8780 8781# lt_join(SEP, ARG1, [ARG2...]) 8782# ----------------------------- 8783# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8784# associated separator. 8785# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8786# versions in m4sugar had bugs. 8787m4_define([lt_join], 8788[m4_if([$#], [1], [], 8789 [$#], [2], [[$2]], 8790 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8791m4_define([_lt_join], 8792[m4_if([$#$2], [2], [], 8793 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8794 8795 8796# lt_car(LIST) 8797# lt_cdr(LIST) 8798# ------------ 8799# Manipulate m4 lists. 8800# These macros are necessary as long as will still need to support 8801# Autoconf-2.59, which quotes differently. 8802m4_define([lt_car], [[$1]]) 8803m4_define([lt_cdr], 8804[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8805 [$#], 1, [], 8806 [m4_dquote(m4_shift($@))])]) 8807m4_define([lt_unquote], $1) 8808 8809 8810# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8811# ------------------------------------------ 8812# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8813# Note that neither SEPARATOR nor STRING are expanded; they are appended 8814# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8815# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8816# than defined and empty). 8817# 8818# This macro is needed until we can rely on Autoconf 2.62, since earlier 8819# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8820m4_define([lt_append], 8821[m4_define([$1], 8822 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8823 8824 8825 8826# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8827# ---------------------------------------------------------- 8828# Produce a SEP delimited list of all paired combinations of elements of 8829# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8830# has the form PREFIXmINFIXSUFFIXn. 8831# Needed until we can rely on m4_combine added in Autoconf 2.62. 8832m4_define([lt_combine], 8833[m4_if(m4_eval([$# > 3]), [1], 8834 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8835[[m4_foreach([_Lt_prefix], [$2], 8836 [m4_foreach([_Lt_suffix], 8837 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8838 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8839 8840 8841# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8842# ----------------------------------------------------------------------- 8843# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8844# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8845m4_define([lt_if_append_uniq], 8846[m4_ifdef([$1], 8847 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8848 [lt_append([$1], [$2], [$3])$4], 8849 [$5])], 8850 [lt_append([$1], [$2], [$3])$4])]) 8851 8852 8853# lt_dict_add(DICT, KEY, VALUE) 8854# ----------------------------- 8855m4_define([lt_dict_add], 8856[m4_define([$1($2)], [$3])]) 8857 8858 8859# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8860# -------------------------------------------- 8861m4_define([lt_dict_add_subkey], 8862[m4_define([$1($2:$3)], [$4])]) 8863 8864 8865# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8866# ---------------------------------- 8867m4_define([lt_dict_fetch], 8868[m4_ifval([$3], 8869 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8870 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8871 8872 8873# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8874# ----------------------------------------------------------------- 8875m4_define([lt_if_dict_fetch], 8876[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8877 [$5], 8878 [$6])]) 8879 8880 8881# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8882# -------------------------------------------------------------- 8883m4_define([lt_dict_filter], 8884[m4_if([$5], [], [], 8885 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8886 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8887 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8888]) 8889 8890# ltversion.m4 -- version numbers -*- Autoconf -*- 8891# 8892# Copyright (C) 2004, 2011-2014 Free Software Foundation, Inc. 8893# Written by Scott James Remnant, 2004 8894# 8895# This file is free software; the Free Software Foundation gives 8896# unlimited permission to copy and/or distribute it, with or without 8897# modifications, as long as this notice is preserved. 8898 8899# @configure_input@ 8900 8901# serial 4151 ltversion.m4 8902# This file is part of GNU Libtool 8903 8904m4_define([LT_PACKAGE_VERSION], [2.4.4]) 8905m4_define([LT_PACKAGE_REVISION], [2.4.4]) 8906 8907AC_DEFUN([LTVERSION_VERSION], 8908[macro_version='2.4.4' 8909macro_revision='2.4.4' 8910_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8911_LT_DECL(, macro_revision, 0) 8912]) 8913 8914# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8915# 8916# Copyright (C) 2004-2005, 2007, 2009, 2011-2014 Free Software 8917# Foundation, Inc. 8918# Written by Scott James Remnant, 2004. 8919# 8920# This file is free software; the Free Software Foundation gives 8921# unlimited permission to copy and/or distribute it, with or without 8922# modifications, as long as this notice is preserved. 8923 8924# serial 5 lt~obsolete.m4 8925 8926# These exist entirely to fool aclocal when bootstrapping libtool. 8927# 8928# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8929# which have later been changed to m4_define as they aren't part of the 8930# exported API, or moved to Autoconf or Automake where they belong. 8931# 8932# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8933# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8934# using a macro with the same name in our local m4/libtool.m4 it'll 8935# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8936# and doesn't know about Autoconf macros at all.) 8937# 8938# So we provide this file, which has a silly filename so it's always 8939# included after everything else. This provides aclocal with the 8940# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8941# because those macros already exist, or will be overwritten later. 8942# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8943# 8944# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8945# Yes, that means every name once taken will need to remain here until 8946# we give up compatibility with versions before 1.7, at which point 8947# we need to keep only those names which we still refer to. 8948 8949# This is to help aclocal find these macros, as it can't see m4_define. 8950AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8951 8952m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8953m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8954m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8955m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8956m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8957m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8958m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8959m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8960m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8961m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8962m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8963m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8964m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8965m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8966m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8967m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8968m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8969m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8970m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8971m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8972m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8973m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8974m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8975m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8976m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8977m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8978m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8979m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8980m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8981m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8982m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8983m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8984m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8985m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8986m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8987m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8988m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8989m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8990m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8991m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8992m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8993m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8994m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8995m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8996m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8997m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8998m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8999m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9000m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9001m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9002m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9003m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9004m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9005m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9006m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9007m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9008m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9009m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9010m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9011m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9012m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9013 9014# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9015# serial 1 (pkg-config-0.24) 9016# 9017# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9018# 9019# This program is free software; you can redistribute it and/or modify 9020# it under the terms of the GNU General Public License as published by 9021# the Free Software Foundation; either version 2 of the License, or 9022# (at your option) any later version. 9023# 9024# This program is distributed in the hope that it will be useful, but 9025# WITHOUT ANY WARRANTY; without even the implied warranty of 9026# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9027# General Public License for more details. 9028# 9029# You should have received a copy of the GNU General Public License 9030# along with this program; if not, write to the Free Software 9031# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9032# 9033# As a special exception to the GNU General Public License, if you 9034# distribute this file as part of a program that contains a 9035# configuration script generated by Autoconf, you may include it under 9036# the same distribution terms that you use for the rest of that program. 9037 9038# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9039# ---------------------------------- 9040AC_DEFUN([PKG_PROG_PKG_CONFIG], 9041[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9042m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9043m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9044AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9045AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9046AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9047 9048if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9049 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9050fi 9051if test -n "$PKG_CONFIG"; then 9052 _pkg_min_version=m4_default([$1], [0.9.0]) 9053 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9054 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9055 AC_MSG_RESULT([yes]) 9056 else 9057 AC_MSG_RESULT([no]) 9058 PKG_CONFIG="" 9059 fi 9060fi[]dnl 9061])# PKG_PROG_PKG_CONFIG 9062 9063# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9064# 9065# Check to see whether a particular set of modules exists. Similar 9066# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9067# 9068# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9069# only at the first occurence in configure.ac, so if the first place 9070# it's called might be skipped (such as if it is within an "if", you 9071# have to call PKG_CHECK_EXISTS manually 9072# -------------------------------------------------------------- 9073AC_DEFUN([PKG_CHECK_EXISTS], 9074[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9075if test -n "$PKG_CONFIG" && \ 9076 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9077 m4_default([$2], [:]) 9078m4_ifvaln([$3], [else 9079 $3])dnl 9080fi]) 9081 9082# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9083# --------------------------------------------- 9084m4_define([_PKG_CONFIG], 9085[if test -n "$$1"; then 9086 pkg_cv_[]$1="$$1" 9087 elif test -n "$PKG_CONFIG"; then 9088 PKG_CHECK_EXISTS([$3], 9089 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9090 test "x$?" != "x0" && pkg_failed=yes ], 9091 [pkg_failed=yes]) 9092 else 9093 pkg_failed=untried 9094fi[]dnl 9095])# _PKG_CONFIG 9096 9097# _PKG_SHORT_ERRORS_SUPPORTED 9098# ----------------------------- 9099AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9100[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9101if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9102 _pkg_short_errors_supported=yes 9103else 9104 _pkg_short_errors_supported=no 9105fi[]dnl 9106])# _PKG_SHORT_ERRORS_SUPPORTED 9107 9108 9109# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9110# [ACTION-IF-NOT-FOUND]) 9111# 9112# 9113# Note that if there is a possibility the first call to 9114# PKG_CHECK_MODULES might not happen, you should be sure to include an 9115# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9116# 9117# 9118# -------------------------------------------------------------- 9119AC_DEFUN([PKG_CHECK_MODULES], 9120[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9121AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9122AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9123 9124pkg_failed=no 9125AC_MSG_CHECKING([for $1]) 9126 9127_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9128_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9129 9130m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9131and $1[]_LIBS to avoid the need to call pkg-config. 9132See the pkg-config man page for more details.]) 9133 9134if test $pkg_failed = yes; then 9135 AC_MSG_RESULT([no]) 9136 _PKG_SHORT_ERRORS_SUPPORTED 9137 if test $_pkg_short_errors_supported = yes; then 9138 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9139 else 9140 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9141 fi 9142 # Put the nasty error message in config.log where it belongs 9143 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9144 9145 m4_default([$4], [AC_MSG_ERROR( 9146[Package requirements ($2) were not met: 9147 9148$$1_PKG_ERRORS 9149 9150Consider adjusting the PKG_CONFIG_PATH environment variable if you 9151installed software in a non-standard prefix. 9152 9153_PKG_TEXT])[]dnl 9154 ]) 9155elif test $pkg_failed = untried; then 9156 AC_MSG_RESULT([no]) 9157 m4_default([$4], [AC_MSG_FAILURE( 9158[The pkg-config script could not be found or is too old. Make sure it 9159is in your PATH or set the PKG_CONFIG environment variable to the full 9160path to pkg-config. 9161 9162_PKG_TEXT 9163 9164To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9165 ]) 9166else 9167 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9168 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9169 AC_MSG_RESULT([yes]) 9170 $3 9171fi[]dnl 9172])# PKG_CHECK_MODULES 9173 9174 9175# PKG_INSTALLDIR(DIRECTORY) 9176# ------------------------- 9177# Substitutes the variable pkgconfigdir as the location where a module 9178# should install pkg-config .pc files. By default the directory is 9179# $libdir/pkgconfig, but the default can be changed by passing 9180# DIRECTORY. The user can override through the --with-pkgconfigdir 9181# parameter. 9182AC_DEFUN([PKG_INSTALLDIR], 9183[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9184m4_pushdef([pkg_description], 9185 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9186AC_ARG_WITH([pkgconfigdir], 9187 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9188 [with_pkgconfigdir=]pkg_default) 9189AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9190m4_popdef([pkg_default]) 9191m4_popdef([pkg_description]) 9192]) dnl PKG_INSTALLDIR 9193 9194 9195# PKG_NOARCH_INSTALLDIR(DIRECTORY) 9196# ------------------------- 9197# Substitutes the variable noarch_pkgconfigdir as the location where a 9198# module should install arch-independent pkg-config .pc files. By 9199# default the directory is $datadir/pkgconfig, but the default can be 9200# changed by passing DIRECTORY. The user can override through the 9201# --with-noarch-pkgconfigdir parameter. 9202AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9203[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9204m4_pushdef([pkg_description], 9205 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9206AC_ARG_WITH([noarch-pkgconfigdir], 9207 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9208 [with_noarch_pkgconfigdir=]pkg_default) 9209AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9210m4_popdef([pkg_default]) 9211m4_popdef([pkg_description]) 9212]) dnl PKG_NOARCH_INSTALLDIR 9213 9214 9215# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9216# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9217# ------------------------------------------- 9218# Retrieves the value of the pkg-config variable for the given module. 9219AC_DEFUN([PKG_CHECK_VAR], 9220[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9221AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9222 9223_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9224AS_VAR_COPY([$1], [pkg_cv_][$1]) 9225 9226AS_VAR_IF([$1], [""], [$5], [$4])dnl 9227])# PKG_CHECK_VAR 9228 9229dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9230dnl 9231dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9232dnl 9233dnl Permission is hereby granted, free of charge, to any person obtaining a 9234dnl copy of this software and associated documentation files (the "Software"), 9235dnl to deal in the Software without restriction, including without limitation 9236dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9237dnl and/or sell copies of the Software, and to permit persons to whom the 9238dnl Software is furnished to do so, subject to the following conditions: 9239dnl 9240dnl The above copyright notice and this permission notice (including the next 9241dnl paragraph) shall be included in all copies or substantial portions of the 9242dnl Software. 9243dnl 9244dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9245dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9246dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9247dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9248dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9249dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9250dnl DEALINGS IN THE SOFTWARE. 9251 9252# XORG_MACROS_VERSION(required-version) 9253# ------------------------------------- 9254# Minimum version: 1.1.0 9255# 9256# If you're using a macro added in Version 1.1 or newer, include this in 9257# your configure.ac with the minimum required version, such as: 9258# XORG_MACROS_VERSION(1.1) 9259# 9260# To ensure that this macro is defined, also add: 9261# m4_ifndef([XORG_MACROS_VERSION], 9262# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9263# 9264# 9265# See the "minimum version" comment for each macro you use to see what 9266# version you require. 9267m4_defun([XORG_MACROS_VERSION],[ 9268m4_define([vers_have], [1.19.0]) 9269m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9270m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9271m4_if(m4_cmp(maj_have, maj_needed), 0,, 9272 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9273m4_if(m4_version_compare(vers_have, [$1]), -1, 9274 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9275m4_undefine([vers_have]) 9276m4_undefine([maj_have]) 9277m4_undefine([maj_needed]) 9278]) # XORG_MACROS_VERSION 9279 9280# XORG_PROG_RAWCPP() 9281# ------------------ 9282# Minimum version: 1.0.0 9283# 9284# Find cpp program and necessary flags for use in pre-processing text files 9285# such as man pages and config files 9286AC_DEFUN([XORG_PROG_RAWCPP],[ 9287AC_REQUIRE([AC_PROG_CPP]) 9288AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9289 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9290 9291# Check for flag to avoid builtin definitions - assumes unix is predefined, 9292# which is not the best choice for supporting other OS'es, but covers most 9293# of the ones we need for now. 9294AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9295AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9296if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9297 AC_MSG_RESULT([no]) 9298else 9299 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9300 RAWCPPFLAGS=-undef 9301 AC_MSG_RESULT([yes]) 9302 # under Cygwin unix is still defined even with -undef 9303 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9304 RAWCPPFLAGS="-undef -ansi" 9305 AC_MSG_RESULT([yes, with -ansi]) 9306 else 9307 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9308 fi 9309fi 9310rm -f conftest.$ac_ext 9311 9312AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9313AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9314if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9315 AC_MSG_RESULT([no]) 9316else 9317 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9318 TRADITIONALCPPFLAGS="-traditional" 9319 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9320 AC_MSG_RESULT([yes]) 9321 else 9322 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9323 fi 9324fi 9325rm -f conftest.$ac_ext 9326AC_SUBST(RAWCPPFLAGS) 9327AC_SUBST(TRADITIONALCPPFLAGS) 9328]) # XORG_PROG_RAWCPP 9329 9330# XORG_MANPAGE_SECTIONS() 9331# ----------------------- 9332# Minimum version: 1.0.0 9333# 9334# Determine which sections man pages go in for the different man page types 9335# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9336# Not sure if there's any better way than just hardcoding by OS name. 9337# Override default settings by setting environment variables 9338# Added MAN_SUBSTS in version 1.8 9339# Added AC_PROG_SED in version 1.8 9340 9341AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9342AC_REQUIRE([AC_CANONICAL_HOST]) 9343AC_REQUIRE([AC_PROG_SED]) 9344 9345if test x$APP_MAN_SUFFIX = x ; then 9346 APP_MAN_SUFFIX=1 9347fi 9348if test x$APP_MAN_DIR = x ; then 9349 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9350fi 9351 9352if test x$LIB_MAN_SUFFIX = x ; then 9353 LIB_MAN_SUFFIX=3 9354fi 9355if test x$LIB_MAN_DIR = x ; then 9356 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9357fi 9358 9359if test x$FILE_MAN_SUFFIX = x ; then 9360 case $host_os in 9361 solaris*) FILE_MAN_SUFFIX=4 ;; 9362 *) FILE_MAN_SUFFIX=5 ;; 9363 esac 9364fi 9365if test x$FILE_MAN_DIR = x ; then 9366 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9367fi 9368 9369if test x$MISC_MAN_SUFFIX = x ; then 9370 case $host_os in 9371 solaris*) MISC_MAN_SUFFIX=5 ;; 9372 *) MISC_MAN_SUFFIX=7 ;; 9373 esac 9374fi 9375if test x$MISC_MAN_DIR = x ; then 9376 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9377fi 9378 9379if test x$DRIVER_MAN_SUFFIX = x ; then 9380 case $host_os in 9381 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9382 *) DRIVER_MAN_SUFFIX=4 ;; 9383 esac 9384fi 9385if test x$DRIVER_MAN_DIR = x ; then 9386 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9387fi 9388 9389if test x$ADMIN_MAN_SUFFIX = x ; then 9390 case $host_os in 9391 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9392 *) ADMIN_MAN_SUFFIX=8 ;; 9393 esac 9394fi 9395if test x$ADMIN_MAN_DIR = x ; then 9396 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9397fi 9398 9399 9400AC_SUBST([APP_MAN_SUFFIX]) 9401AC_SUBST([LIB_MAN_SUFFIX]) 9402AC_SUBST([FILE_MAN_SUFFIX]) 9403AC_SUBST([MISC_MAN_SUFFIX]) 9404AC_SUBST([DRIVER_MAN_SUFFIX]) 9405AC_SUBST([ADMIN_MAN_SUFFIX]) 9406AC_SUBST([APP_MAN_DIR]) 9407AC_SUBST([LIB_MAN_DIR]) 9408AC_SUBST([FILE_MAN_DIR]) 9409AC_SUBST([MISC_MAN_DIR]) 9410AC_SUBST([DRIVER_MAN_DIR]) 9411AC_SUBST([ADMIN_MAN_DIR]) 9412 9413XORG_MAN_PAGE="X Version 11" 9414AC_SUBST([XORG_MAN_PAGE]) 9415MAN_SUBSTS="\ 9416 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9417 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9418 -e 's|__xservername__|Xorg|g' \ 9419 -e 's|__xconfigfile__|xorg.conf|g' \ 9420 -e 's|__projectroot__|\$(prefix)|g' \ 9421 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9422 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9423 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9424 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9425 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9426 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9427 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9428AC_SUBST([MAN_SUBSTS]) 9429 9430]) # XORG_MANPAGE_SECTIONS 9431 9432# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9433# ------------------------ 9434# Minimum version: 1.7.0 9435# 9436# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9437# provided by xorg-sgml-doctools, if installed. 9438AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9439AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9440XORG_SGML_PATH= 9441PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9442 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9443 [m4_ifval([$1],[:], 9444 [if test x"$cross_compiling" != x"yes" ; then 9445 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9446 [XORG_SGML_PATH=$prefix/share/sgml]) 9447 fi]) 9448 ]) 9449 9450# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9451# the path and the name of the doc stylesheet 9452if test "x$XORG_SGML_PATH" != "x" ; then 9453 AC_MSG_RESULT([$XORG_SGML_PATH]) 9454 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9455 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9456else 9457 AC_MSG_RESULT([no]) 9458fi 9459 9460AC_SUBST(XORG_SGML_PATH) 9461AC_SUBST(STYLESHEET_SRCDIR) 9462AC_SUBST(XSL_STYLESHEET) 9463AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9464]) # XORG_CHECK_SGML_DOCTOOLS 9465 9466# XORG_CHECK_LINUXDOC 9467# ------------------- 9468# Minimum version: 1.0.0 9469# 9470# Defines the variable MAKE_TEXT if the necessary tools and 9471# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9472# Whether or not the necessary tools and files are found can be checked 9473# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9474AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9475AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9476AC_REQUIRE([XORG_WITH_PS2PDF]) 9477 9478AC_PATH_PROG(LINUXDOC, linuxdoc) 9479 9480AC_MSG_CHECKING([whether to build documentation]) 9481 9482if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9483 BUILDDOC=yes 9484else 9485 BUILDDOC=no 9486fi 9487 9488AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9489 9490AC_MSG_RESULT([$BUILDDOC]) 9491 9492AC_MSG_CHECKING([whether to build pdf documentation]) 9493 9494if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9495 BUILDPDFDOC=yes 9496else 9497 BUILDPDFDOC=no 9498fi 9499 9500AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9501 9502AC_MSG_RESULT([$BUILDPDFDOC]) 9503 9504MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9505MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9506MAKE_PDF="$PS2PDF" 9507MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9508 9509AC_SUBST(MAKE_TEXT) 9510AC_SUBST(MAKE_PS) 9511AC_SUBST(MAKE_PDF) 9512AC_SUBST(MAKE_HTML) 9513]) # XORG_CHECK_LINUXDOC 9514 9515# XORG_CHECK_DOCBOOK 9516# ------------------- 9517# Minimum version: 1.0.0 9518# 9519# Checks for the ability to build output formats from SGML DocBook source. 9520# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9521# indicates whether the necessary tools and files are found and, if set, 9522# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9523AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9524AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9525 9526BUILDTXTDOC=no 9527BUILDPDFDOC=no 9528BUILDPSDOC=no 9529BUILDHTMLDOC=no 9530 9531AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9532AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9533AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9534AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9535 9536AC_MSG_CHECKING([whether to build text documentation]) 9537if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9538 test x$BUILD_TXTDOC != xno; then 9539 BUILDTXTDOC=yes 9540fi 9541AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9542AC_MSG_RESULT([$BUILDTXTDOC]) 9543 9544AC_MSG_CHECKING([whether to build PDF documentation]) 9545if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9546 test x$BUILD_PDFDOC != xno; then 9547 BUILDPDFDOC=yes 9548fi 9549AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9550AC_MSG_RESULT([$BUILDPDFDOC]) 9551 9552AC_MSG_CHECKING([whether to build PostScript documentation]) 9553if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9554 test x$BUILD_PSDOC != xno; then 9555 BUILDPSDOC=yes 9556fi 9557AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9558AC_MSG_RESULT([$BUILDPSDOC]) 9559 9560AC_MSG_CHECKING([whether to build HTML documentation]) 9561if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9562 test x$BUILD_HTMLDOC != xno; then 9563 BUILDHTMLDOC=yes 9564fi 9565AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9566AC_MSG_RESULT([$BUILDHTMLDOC]) 9567 9568MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9569MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9570MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9571MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9572 9573AC_SUBST(MAKE_TEXT) 9574AC_SUBST(MAKE_PS) 9575AC_SUBST(MAKE_PDF) 9576AC_SUBST(MAKE_HTML) 9577]) # XORG_CHECK_DOCBOOK 9578 9579# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9580# ---------------- 9581# Minimum version: 1.5.0 9582# Minimum version for optional DEFAULT argument: 1.11.0 9583# 9584# Documentation tools are not always available on all platforms and sometimes 9585# not at the appropriate level. This macro enables a module to test for the 9586# presence of the tool and obtain it's path in separate variables. Coupled with 9587# the --with-xmlto option, it allows maximum flexibilty in making decisions 9588# as whether or not to use the xmlto package. When DEFAULT is not specified, 9589# --with-xmlto assumes 'auto'. 9590# 9591# Interface to module: 9592# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9593# XMLTO: returns the path of the xmlto program found 9594# returns the path set by the user in the environment 9595# --with-xmlto: 'yes' user instructs the module to use xmlto 9596# 'no' user instructs the module not to use xmlto 9597# 9598# Added in version 1.10.0 9599# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9600# xmlto for text output requires either lynx, links, or w3m browsers 9601# 9602# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9603# 9604AC_DEFUN([XORG_WITH_XMLTO],[ 9605AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9606m4_define([_defopt], m4_default([$2], [auto])) 9607AC_ARG_WITH(xmlto, 9608 AS_HELP_STRING([--with-xmlto], 9609 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9610 [use_xmlto=$withval], [use_xmlto=]_defopt) 9611m4_undefine([_defopt]) 9612 9613if test "x$use_xmlto" = x"auto"; then 9614 AC_PATH_PROG([XMLTO], [xmlto]) 9615 if test "x$XMLTO" = "x"; then 9616 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9617 have_xmlto=no 9618 else 9619 have_xmlto=yes 9620 fi 9621elif test "x$use_xmlto" = x"yes" ; then 9622 AC_PATH_PROG([XMLTO], [xmlto]) 9623 if test "x$XMLTO" = "x"; then 9624 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9625 fi 9626 have_xmlto=yes 9627elif test "x$use_xmlto" = x"no" ; then 9628 if test "x$XMLTO" != "x"; then 9629 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9630 fi 9631 have_xmlto=no 9632else 9633 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9634fi 9635 9636# Test for a minimum version of xmlto, if provided. 9637m4_ifval([$1], 9638[if test "$have_xmlto" = yes; then 9639 # scrape the xmlto version 9640 AC_MSG_CHECKING([the xmlto version]) 9641 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9642 AC_MSG_RESULT([$xmlto_version]) 9643 AS_VERSION_COMPARE([$xmlto_version], [$1], 9644 [if test "x$use_xmlto" = xauto; then 9645 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9646 have_xmlto=no 9647 else 9648 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9649 fi]) 9650fi]) 9651 9652# Test for the ability of xmlto to generate a text target 9653have_xmlto_text=no 9654cat > conftest.xml << "EOF" 9655EOF 9656AS_IF([test "$have_xmlto" = yes], 9657 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9658 [have_xmlto_text=yes], 9659 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9660rm -f conftest.xml 9661AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9662AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9663]) # XORG_WITH_XMLTO 9664 9665# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9666# -------------------------------------------- 9667# Minimum version: 1.12.0 9668# Minimum version for optional DEFAULT argument: 1.12.0 9669# 9670# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9671# XML-based language used for the transformation of XML documents. 9672# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9673# It is used under the cover by xmlto to generate html files from DocBook/XML. 9674# The XSLT processor is often used as a standalone tool for transformations. 9675# It should not be assumed that this tool is used only to work with documnetation. 9676# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9677# 9678# Interface to module: 9679# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9680# XSLTPROC: returns the path of the xsltproc program found 9681# returns the path set by the user in the environment 9682# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9683# 'no' user instructs the module not to use xsltproc 9684# have_xsltproc: returns yes if xsltproc found in PATH or no 9685# 9686# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9687# 9688AC_DEFUN([XORG_WITH_XSLTPROC],[ 9689AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9690# Preserves the interface, should it be implemented later 9691m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9692m4_define([_defopt], m4_default([$2], [auto])) 9693AC_ARG_WITH(xsltproc, 9694 AS_HELP_STRING([--with-xsltproc], 9695 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9696 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9697m4_undefine([_defopt]) 9698 9699if test "x$use_xsltproc" = x"auto"; then 9700 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9701 if test "x$XSLTPROC" = "x"; then 9702 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9703 have_xsltproc=no 9704 else 9705 have_xsltproc=yes 9706 fi 9707elif test "x$use_xsltproc" = x"yes" ; then 9708 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9709 if test "x$XSLTPROC" = "x"; then 9710 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9711 fi 9712 have_xsltproc=yes 9713elif test "x$use_xsltproc" = x"no" ; then 9714 if test "x$XSLTPROC" != "x"; then 9715 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9716 fi 9717 have_xsltproc=no 9718else 9719 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9720fi 9721 9722AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9723]) # XORG_WITH_XSLTPROC 9724 9725# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9726# ---------------------------------------- 9727# Minimum version: 1.15.0 9728# 9729# PERL (Practical Extraction and Report Language) is a language optimized for 9730# scanning arbitrary text files, extracting information from those text files, 9731# and printing reports based on that information. 9732# 9733# When DEFAULT is not specified, --with-perl assumes 'auto'. 9734# 9735# Interface to module: 9736# HAVE_PERL: used in makefiles to conditionally scan text files 9737# PERL: returns the path of the perl program found 9738# returns the path set by the user in the environment 9739# --with-perl: 'yes' user instructs the module to use perl 9740# 'no' user instructs the module not to use perl 9741# have_perl: returns yes if perl found in PATH or no 9742# 9743# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9744# 9745AC_DEFUN([XORG_WITH_PERL],[ 9746AC_ARG_VAR([PERL], [Path to perl command]) 9747# Preserves the interface, should it be implemented later 9748m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9749m4_define([_defopt], m4_default([$2], [auto])) 9750AC_ARG_WITH(perl, 9751 AS_HELP_STRING([--with-perl], 9752 [Use perl for extracting information from files (default: ]_defopt[)]), 9753 [use_perl=$withval], [use_perl=]_defopt) 9754m4_undefine([_defopt]) 9755 9756if test "x$use_perl" = x"auto"; then 9757 AC_PATH_PROG([PERL], [perl]) 9758 if test "x$PERL" = "x"; then 9759 AC_MSG_WARN([perl not found - cannot extract information and report]) 9760 have_perl=no 9761 else 9762 have_perl=yes 9763 fi 9764elif test "x$use_perl" = x"yes" ; then 9765 AC_PATH_PROG([PERL], [perl]) 9766 if test "x$PERL" = "x"; then 9767 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9768 fi 9769 have_perl=yes 9770elif test "x$use_perl" = x"no" ; then 9771 if test "x$PERL" != "x"; then 9772 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9773 fi 9774 have_perl=no 9775else 9776 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9777fi 9778 9779AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9780]) # XORG_WITH_PERL 9781 9782# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9783# ---------------- 9784# Minimum version: 1.5.0 9785# Minimum version for optional DEFAULT argument: 1.11.0 9786# 9787# Documentation tools are not always available on all platforms and sometimes 9788# not at the appropriate level. This macro enables a module to test for the 9789# presence of the tool and obtain it's path in separate variables. Coupled with 9790# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9791# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9792# --with-asciidoc assumes 'auto'. 9793# 9794# Interface to module: 9795# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9796# ASCIIDOC: returns the path of the asciidoc program found 9797# returns the path set by the user in the environment 9798# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9799# 'no' user instructs the module not to use asciidoc 9800# 9801# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9802# 9803AC_DEFUN([XORG_WITH_ASCIIDOC],[ 9804AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9805m4_define([_defopt], m4_default([$2], [auto])) 9806AC_ARG_WITH(asciidoc, 9807 AS_HELP_STRING([--with-asciidoc], 9808 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9809 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9810m4_undefine([_defopt]) 9811 9812if test "x$use_asciidoc" = x"auto"; then 9813 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9814 if test "x$ASCIIDOC" = "x"; then 9815 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9816 have_asciidoc=no 9817 else 9818 have_asciidoc=yes 9819 fi 9820elif test "x$use_asciidoc" = x"yes" ; then 9821 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9822 if test "x$ASCIIDOC" = "x"; then 9823 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9824 fi 9825 have_asciidoc=yes 9826elif test "x$use_asciidoc" = x"no" ; then 9827 if test "x$ASCIIDOC" != "x"; then 9828 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9829 fi 9830 have_asciidoc=no 9831else 9832 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9833fi 9834m4_ifval([$1], 9835[if test "$have_asciidoc" = yes; then 9836 # scrape the asciidoc version 9837 AC_MSG_CHECKING([the asciidoc version]) 9838 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9839 AC_MSG_RESULT([$asciidoc_version]) 9840 AS_VERSION_COMPARE([$asciidoc_version], [$1], 9841 [if test "x$use_asciidoc" = xauto; then 9842 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9843 have_asciidoc=no 9844 else 9845 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9846 fi]) 9847fi]) 9848AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9849]) # XORG_WITH_ASCIIDOC 9850 9851# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9852# ------------------------------------------- 9853# Minimum version: 1.5.0 9854# Minimum version for optional DEFAULT argument: 1.11.0 9855# Minimum version for optional DOT checking: 1.18.0 9856# 9857# Documentation tools are not always available on all platforms and sometimes 9858# not at the appropriate level. This macro enables a module to test for the 9859# presence of the tool and obtain it's path in separate variables. Coupled with 9860# the --with-doxygen option, it allows maximum flexibilty in making decisions 9861# as whether or not to use the doxygen package. When DEFAULT is not specified, 9862# --with-doxygen assumes 'auto'. 9863# 9864# Interface to module: 9865# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9866# DOXYGEN: returns the path of the doxygen program found 9867# returns the path set by the user in the environment 9868# --with-doxygen: 'yes' user instructs the module to use doxygen 9869# 'no' user instructs the module not to use doxygen 9870# 9871# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9872# 9873AC_DEFUN([XORG_WITH_DOXYGEN],[ 9874AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9875AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9876m4_define([_defopt], m4_default([$2], [auto])) 9877AC_ARG_WITH(doxygen, 9878 AS_HELP_STRING([--with-doxygen], 9879 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9880 [use_doxygen=$withval], [use_doxygen=]_defopt) 9881m4_undefine([_defopt]) 9882 9883if test "x$use_doxygen" = x"auto"; then 9884 AC_PATH_PROG([DOXYGEN], [doxygen]) 9885 if test "x$DOXYGEN" = "x"; then 9886 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9887 have_doxygen=no 9888 else 9889 have_doxygen=yes 9890 fi 9891elif test "x$use_doxygen" = x"yes" ; then 9892 AC_PATH_PROG([DOXYGEN], [doxygen]) 9893 if test "x$DOXYGEN" = "x"; then 9894 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9895 fi 9896 have_doxygen=yes 9897elif test "x$use_doxygen" = x"no" ; then 9898 if test "x$DOXYGEN" != "x"; then 9899 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9900 fi 9901 have_doxygen=no 9902else 9903 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9904fi 9905m4_ifval([$1], 9906[if test "$have_doxygen" = yes; then 9907 # scrape the doxygen version 9908 AC_MSG_CHECKING([the doxygen version]) 9909 doxygen_version=`$DOXYGEN --version 2>/dev/null` 9910 AC_MSG_RESULT([$doxygen_version]) 9911 AS_VERSION_COMPARE([$doxygen_version], [$1], 9912 [if test "x$use_doxygen" = xauto; then 9913 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9914 have_doxygen=no 9915 else 9916 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9917 fi]) 9918fi]) 9919 9920dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 9921dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 9922dnl HAVE_DOT = @HAVE_DOT@ 9923HAVE_DOT=no 9924if test "x$have_doxygen" = "xyes"; then 9925 AC_PATH_PROG([DOT], [dot]) 9926 if test "x$DOT" != "x"; then 9927 HAVE_DOT=yes 9928 fi 9929fi 9930 9931AC_SUBST([HAVE_DOT]) 9932AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9933AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9934]) # XORG_WITH_DOXYGEN 9935 9936# XORG_WITH_GROFF([DEFAULT]) 9937# ---------------- 9938# Minimum version: 1.6.0 9939# Minimum version for optional DEFAULT argument: 1.11.0 9940# 9941# Documentation tools are not always available on all platforms and sometimes 9942# not at the appropriate level. This macro enables a module to test for the 9943# presence of the tool and obtain it's path in separate variables. Coupled with 9944# the --with-groff option, it allows maximum flexibilty in making decisions 9945# as whether or not to use the groff package. When DEFAULT is not specified, 9946# --with-groff assumes 'auto'. 9947# 9948# Interface to module: 9949# HAVE_GROFF: used in makefiles to conditionally generate documentation 9950# HAVE_GROFF_MM: the memorandum macros (-mm) package 9951# HAVE_GROFF_MS: the -ms macros package 9952# GROFF: returns the path of the groff program found 9953# returns the path set by the user in the environment 9954# --with-groff: 'yes' user instructs the module to use groff 9955# 'no' user instructs the module not to use groff 9956# 9957# Added in version 1.9.0: 9958# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9959# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9960# psselect from the psutils package. 9961# the ghostcript package. Refer to the grohtml man pages 9962# 9963# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9964# 9965# OS and distros often splits groff in a basic and full package, the former 9966# having the groff program and the later having devices, fonts and macros 9967# Checking for the groff executable is not enough. 9968# 9969# If macros are missing, we cannot assume that groff is useless, so we don't 9970# unset HAVE_GROFF or GROFF env variables. 9971# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9972# 9973AC_DEFUN([XORG_WITH_GROFF],[ 9974AC_ARG_VAR([GROFF], [Path to groff command]) 9975m4_define([_defopt], m4_default([$1], [auto])) 9976AC_ARG_WITH(groff, 9977 AS_HELP_STRING([--with-groff], 9978 [Use groff to regenerate documentation (default: ]_defopt[)]), 9979 [use_groff=$withval], [use_groff=]_defopt) 9980m4_undefine([_defopt]) 9981 9982if test "x$use_groff" = x"auto"; then 9983 AC_PATH_PROG([GROFF], [groff]) 9984 if test "x$GROFF" = "x"; then 9985 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9986 have_groff=no 9987 else 9988 have_groff=yes 9989 fi 9990elif test "x$use_groff" = x"yes" ; then 9991 AC_PATH_PROG([GROFF], [groff]) 9992 if test "x$GROFF" = "x"; then 9993 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9994 fi 9995 have_groff=yes 9996elif test "x$use_groff" = x"no" ; then 9997 if test "x$GROFF" != "x"; then 9998 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9999 fi 10000 have_groff=no 10001else 10002 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10003fi 10004 10005# We have groff, test for the presence of the macro packages 10006if test "x$have_groff" = x"yes"; then 10007 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10008 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10009 groff_ms_works=yes 10010 else 10011 groff_ms_works=no 10012 fi 10013 AC_MSG_RESULT([$groff_ms_works]) 10014 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10015 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10016 groff_mm_works=yes 10017 else 10018 groff_mm_works=no 10019 fi 10020 AC_MSG_RESULT([$groff_mm_works]) 10021fi 10022 10023# We have groff, test for HTML dependencies, one command per package 10024if test "x$have_groff" = x"yes"; then 10025 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10026 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10027 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10028 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10029 have_groff_html=yes 10030 else 10031 have_groff_html=no 10032 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10033 fi 10034fi 10035 10036# Set Automake conditionals for Makefiles 10037AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10038AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10039AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10040AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10041]) # XORG_WITH_GROFF 10042 10043# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10044# --------------------------------------- 10045# Minimum version: 1.6.0 10046# Minimum version for optional DEFAULT argument: 1.11.0 10047# Minimum version for optional MIN-VERSION argument: 1.15.0 10048# 10049# Documentation tools are not always available on all platforms and sometimes 10050# not at the appropriate level. This macro enables a module to test for the 10051# presence of the tool and obtain it's path in separate variables. Coupled with 10052# the --with-fop option, it allows maximum flexibilty in making decisions 10053# as whether or not to use the fop package. When DEFAULT is not specified, 10054# --with-fop assumes 'auto'. 10055# 10056# Interface to module: 10057# HAVE_FOP: used in makefiles to conditionally generate documentation 10058# FOP: returns the path of the fop program found 10059# returns the path set by the user in the environment 10060# --with-fop: 'yes' user instructs the module to use fop 10061# 'no' user instructs the module not to use fop 10062# 10063# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10064# 10065AC_DEFUN([XORG_WITH_FOP],[ 10066AC_ARG_VAR([FOP], [Path to fop command]) 10067m4_define([_defopt], m4_default([$2], [auto])) 10068AC_ARG_WITH(fop, 10069 AS_HELP_STRING([--with-fop], 10070 [Use fop to regenerate documentation (default: ]_defopt[)]), 10071 [use_fop=$withval], [use_fop=]_defopt) 10072m4_undefine([_defopt]) 10073 10074if test "x$use_fop" = x"auto"; then 10075 AC_PATH_PROG([FOP], [fop]) 10076 if test "x$FOP" = "x"; then 10077 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10078 have_fop=no 10079 else 10080 have_fop=yes 10081 fi 10082elif test "x$use_fop" = x"yes" ; then 10083 AC_PATH_PROG([FOP], [fop]) 10084 if test "x$FOP" = "x"; then 10085 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10086 fi 10087 have_fop=yes 10088elif test "x$use_fop" = x"no" ; then 10089 if test "x$FOP" != "x"; then 10090 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10091 fi 10092 have_fop=no 10093else 10094 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10095fi 10096 10097# Test for a minimum version of fop, if provided. 10098m4_ifval([$1], 10099[if test "$have_fop" = yes; then 10100 # scrape the fop version 10101 AC_MSG_CHECKING([for fop minimum version]) 10102 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10103 AC_MSG_RESULT([$fop_version]) 10104 AS_VERSION_COMPARE([$fop_version], [$1], 10105 [if test "x$use_fop" = xauto; then 10106 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10107 have_fop=no 10108 else 10109 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10110 fi]) 10111fi]) 10112AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10113]) # XORG_WITH_FOP 10114 10115# XORG_WITH_M4([MIN-VERSION]) 10116# --------------------------- 10117# Minimum version: 1.19.0 10118# 10119# This macro attempts to locate an m4 macro processor which supports 10120# -I option and is only useful for modules relying on M4 in order to 10121# expand macros in source code files. 10122# 10123# Interface to module: 10124# M4: returns the path of the m4 program found 10125# returns the path set by the user in the environment 10126# 10127AC_DEFUN([XORG_WITH_M4], [ 10128AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10129 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10130 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10131 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10132 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10133 [$PATH:/usr/gnu/bin])]) 10134 10135AC_SUBST([M4], [$ac_cv_path_M4]) 10136]) # XORG_WITH_M4 10137 10138# XORG_WITH_PS2PDF([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-ps2pdf option, it allows maximum flexibilty in making decisions 10147# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10148# --with-ps2pdf assumes 'auto'. 10149# 10150# Interface to module: 10151# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10152# PS2PDF: returns the path of the ps2pdf program found 10153# returns the path set by the user in the environment 10154# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10155# 'no' user instructs the module not to use ps2pdf 10156# 10157# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10158# 10159AC_DEFUN([XORG_WITH_PS2PDF],[ 10160AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10161m4_define([_defopt], m4_default([$1], [auto])) 10162AC_ARG_WITH(ps2pdf, 10163 AS_HELP_STRING([--with-ps2pdf], 10164 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10165 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10166m4_undefine([_defopt]) 10167 10168if test "x$use_ps2pdf" = x"auto"; then 10169 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10170 if test "x$PS2PDF" = "x"; then 10171 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10172 have_ps2pdf=no 10173 else 10174 have_ps2pdf=yes 10175 fi 10176elif test "x$use_ps2pdf" = x"yes" ; then 10177 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10178 if test "x$PS2PDF" = "x"; then 10179 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10180 fi 10181 have_ps2pdf=yes 10182elif test "x$use_ps2pdf" = x"no" ; then 10183 if test "x$PS2PDF" != "x"; then 10184 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10185 fi 10186 have_ps2pdf=no 10187else 10188 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10189fi 10190AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10191]) # XORG_WITH_PS2PDF 10192 10193# XORG_ENABLE_DOCS (enable_docs=yes) 10194# ---------------- 10195# Minimum version: 1.6.0 10196# 10197# Documentation tools are not always available on all platforms and sometimes 10198# not at the appropriate level. This macro enables a builder to skip all 10199# documentation targets except traditional man pages. 10200# Combined with the specific tool checking macros XORG_WITH_*, it provides 10201# maximum flexibilty in controlling documentation building. 10202# Refer to: 10203# XORG_WITH_XMLTO --with-xmlto 10204# XORG_WITH_ASCIIDOC --with-asciidoc 10205# XORG_WITH_DOXYGEN --with-doxygen 10206# XORG_WITH_FOP --with-fop 10207# XORG_WITH_GROFF --with-groff 10208# XORG_WITH_PS2PDF --with-ps2pdf 10209# 10210# Interface to module: 10211# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10212# --enable-docs: 'yes' user instructs the module to generate docs 10213# 'no' user instructs the module not to generate docs 10214# parm1: specify the default value, yes or no. 10215# 10216AC_DEFUN([XORG_ENABLE_DOCS],[ 10217m4_define([docs_default], m4_default([$1], [yes])) 10218AC_ARG_ENABLE(docs, 10219 AS_HELP_STRING([--enable-docs], 10220 [Enable building the documentation (default: ]docs_default[)]), 10221 [build_docs=$enableval], [build_docs=]docs_default) 10222m4_undefine([docs_default]) 10223AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10224AC_MSG_CHECKING([whether to build documentation]) 10225AC_MSG_RESULT([$build_docs]) 10226]) # XORG_ENABLE_DOCS 10227 10228# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10229# ---------------- 10230# Minimum version: 1.6.0 10231# 10232# This macro enables a builder to skip all developer documentation. 10233# Combined with the specific tool checking macros XORG_WITH_*, it provides 10234# maximum flexibilty in controlling documentation building. 10235# Refer to: 10236# XORG_WITH_XMLTO --with-xmlto 10237# XORG_WITH_ASCIIDOC --with-asciidoc 10238# XORG_WITH_DOXYGEN --with-doxygen 10239# XORG_WITH_FOP --with-fop 10240# XORG_WITH_GROFF --with-groff 10241# XORG_WITH_PS2PDF --with-ps2pdf 10242# 10243# Interface to module: 10244# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10245# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10246# 'no' user instructs the module not to generate developer docs 10247# parm1: specify the default value, yes or no. 10248# 10249AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10250m4_define([devel_default], m4_default([$1], [yes])) 10251AC_ARG_ENABLE(devel-docs, 10252 AS_HELP_STRING([--enable-devel-docs], 10253 [Enable building the developer documentation (default: ]devel_default[)]), 10254 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10255m4_undefine([devel_default]) 10256AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10257AC_MSG_CHECKING([whether to build developer documentation]) 10258AC_MSG_RESULT([$build_devel_docs]) 10259]) # XORG_ENABLE_DEVEL_DOCS 10260 10261# XORG_ENABLE_SPECS (enable_specs=yes) 10262# ---------------- 10263# Minimum version: 1.6.0 10264# 10265# This macro enables a builder to skip all functional specification targets. 10266# Combined with the specific tool checking macros XORG_WITH_*, it provides 10267# maximum flexibilty in controlling documentation building. 10268# Refer to: 10269# XORG_WITH_XMLTO --with-xmlto 10270# XORG_WITH_ASCIIDOC --with-asciidoc 10271# XORG_WITH_DOXYGEN --with-doxygen 10272# XORG_WITH_FOP --with-fop 10273# XORG_WITH_GROFF --with-groff 10274# XORG_WITH_PS2PDF --with-ps2pdf 10275# 10276# Interface to module: 10277# ENABLE_SPECS: used in makefiles to conditionally generate specs 10278# --enable-specs: 'yes' user instructs the module to generate specs 10279# 'no' user instructs the module not to generate specs 10280# parm1: specify the default value, yes or no. 10281# 10282AC_DEFUN([XORG_ENABLE_SPECS],[ 10283m4_define([spec_default], m4_default([$1], [yes])) 10284AC_ARG_ENABLE(specs, 10285 AS_HELP_STRING([--enable-specs], 10286 [Enable building the specs (default: ]spec_default[)]), 10287 [build_specs=$enableval], [build_specs=]spec_default) 10288m4_undefine([spec_default]) 10289AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10290AC_MSG_CHECKING([whether to build functional specifications]) 10291AC_MSG_RESULT([$build_specs]) 10292]) # XORG_ENABLE_SPECS 10293 10294# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10295# ---------------------------------------------- 10296# Minimum version: 1.13.0 10297# 10298# This macro enables a builder to enable/disable unit testing 10299# It makes no assumption about the test cases implementation 10300# Test cases may or may not use Automake "Support for test suites" 10301# They may or may not use the software utility library GLib 10302# 10303# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10304# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10305# The variable enable_unit_tests is used by other macros in this file. 10306# 10307# Interface to module: 10308# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10309# enable_unit_tests: used in configure.ac for additional configuration 10310# --enable-unit-tests: 'yes' user instructs the module to build tests 10311# 'no' user instructs the module not to build tests 10312# parm1: specify the default value, yes or no. 10313# 10314AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10315AC_BEFORE([$0], [XORG_WITH_GLIB]) 10316AC_BEFORE([$0], [XORG_LD_WRAP]) 10317AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10318m4_define([_defopt], m4_default([$1], [auto])) 10319AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10320 [Enable building unit test cases (default: ]_defopt[)]), 10321 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10322m4_undefine([_defopt]) 10323AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10324AC_MSG_CHECKING([whether to build unit test cases]) 10325AC_MSG_RESULT([$enable_unit_tests]) 10326]) # XORG_ENABLE_UNIT_TESTS 10327 10328# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10329# ------------------------------------------------------ 10330# Minimum version: 1.17.0 10331# 10332# This macro enables a builder to enable/disable integration testing 10333# It makes no assumption about the test cases' implementation 10334# Test cases may or may not use Automake "Support for test suites" 10335# 10336# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10337# usually requires less dependencies and may be built and run under less 10338# stringent environments than integration tests. 10339# 10340# Interface to module: 10341# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10342# enable_integration_tests: used in configure.ac for additional configuration 10343# --enable-integration-tests: 'yes' user instructs the module to build tests 10344# 'no' user instructs the module not to build tests 10345# parm1: specify the default value, yes or no. 10346# 10347AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10348AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10349m4_define([_defopt], m4_default([$1], [auto])) 10350AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10351 [Enable building integration test cases (default: ]_defopt[)]), 10352 [enable_integration_tests=$enableval], 10353 [enable_integration_tests=]_defopt) 10354m4_undefine([_defopt]) 10355AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10356 [test "x$enable_integration_tests" != xno]) 10357AC_MSG_CHECKING([whether to build unit test cases]) 10358AC_MSG_RESULT([$enable_integration_tests]) 10359]) # XORG_ENABLE_INTEGRATION_TESTS 10360 10361# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10362# ---------------------------------------- 10363# Minimum version: 1.13.0 10364# 10365# GLib is a library which provides advanced data structures and functions. 10366# This macro enables a module to test for the presence of Glib. 10367# 10368# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10369# Otherwise the value of $enable_unit_tests is blank. 10370# 10371# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10372# test support usually requires less dependencies and may be built and run under 10373# less stringent environments than integration tests. 10374# 10375# Interface to module: 10376# HAVE_GLIB: used in makefiles to conditionally build targets 10377# with_glib: used in configure.ac to know if GLib has been found 10378# --with-glib: 'yes' user instructs the module to use glib 10379# 'no' user instructs the module not to use glib 10380# 10381AC_DEFUN([XORG_WITH_GLIB],[ 10382AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10383m4_define([_defopt], m4_default([$2], [auto])) 10384AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10385 [Use GLib library for unit testing (default: ]_defopt[)]), 10386 [with_glib=$withval], [with_glib=]_defopt) 10387m4_undefine([_defopt]) 10388 10389have_glib=no 10390# Do not probe GLib if user explicitly disabled unit testing 10391if test "x$enable_unit_tests" != x"no"; then 10392 # Do not probe GLib if user explicitly disabled it 10393 if test "x$with_glib" != x"no"; then 10394 m4_ifval( 10395 [$1], 10396 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10397 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10398 ) 10399 fi 10400fi 10401 10402# Not having GLib when unit testing has been explicitly requested is an error 10403if test "x$enable_unit_tests" = x"yes"; then 10404 if test "x$have_glib" = x"no"; then 10405 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10406 fi 10407fi 10408 10409# Having unit testing disabled when GLib has been explicitly requested is an error 10410if test "x$enable_unit_tests" = x"no"; then 10411 if test "x$with_glib" = x"yes"; then 10412 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10413 fi 10414fi 10415 10416# Not having GLib when it has been explicitly requested is an error 10417if test "x$with_glib" = x"yes"; then 10418 if test "x$have_glib" = x"no"; then 10419 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10420 fi 10421fi 10422 10423AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10424]) # XORG_WITH_GLIB 10425 10426# XORG_LD_WRAP([required|optional]) 10427# --------------------------------- 10428# Minimum version: 1.13.0 10429# 10430# Check if linker supports -wrap, passed via compiler flags 10431# 10432# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10433# Otherwise the value of $enable_unit_tests is blank. 10434# 10435# Argument added in 1.16.0 - default is "required", to match existing behavior 10436# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10437# available, an argument of "optional" allows use when some unit tests require 10438# ld -wrap and others do not. 10439# 10440AC_DEFUN([XORG_LD_WRAP],[ 10441XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10442 [AC_LANG_PROGRAM([#include <stdlib.h> 10443 void __wrap_exit(int status) { return; }], 10444 [exit(0);])]) 10445# Not having ld wrap when unit testing has been explicitly requested is an error 10446if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10447 if test "x$have_ld_wrap" = x"no"; then 10448 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10449 fi 10450fi 10451AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10452# 10453]) # XORG_LD_WRAP 10454 10455# XORG_CHECK_LINKER_FLAGS 10456# ----------------------- 10457# SYNOPSIS 10458# 10459# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10460# 10461# DESCRIPTION 10462# 10463# Check whether the given linker FLAGS work with the current language's 10464# linker, or whether they give an error. 10465# 10466# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10467# success/failure. 10468# 10469# PROGRAM-SOURCE is the program source to link with, if needed 10470# 10471# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10472# 10473# LICENSE 10474# 10475# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10476# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10477# Copyright (c) 2009 Matteo Frigo 10478# 10479# This program is free software: you can redistribute it and/or modify it 10480# under the terms of the GNU General Public License as published by the 10481# Free Software Foundation, either version 3 of the License, or (at your 10482# option) any later version. 10483# 10484# This program is distributed in the hope that it will be useful, but 10485# WITHOUT ANY WARRANTY; without even the implied warranty of 10486# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10487# Public License for more details. 10488# 10489# You should have received a copy of the GNU General Public License along 10490# with this program. If not, see <http://www.gnu.org/licenses/>. 10491# 10492# As a special exception, the respective Autoconf Macro's copyright owner 10493# gives unlimited permission to copy, distribute and modify the configure 10494# scripts that are the output of Autoconf when processing the Macro. You 10495# need not follow the terms of the GNU General Public License when using 10496# or distributing such scripts, even though portions of the text of the 10497# Macro appear in them. The GNU General Public License (GPL) does govern 10498# all other use of the material that constitutes the Autoconf Macro. 10499# 10500# This special exception to the GPL applies to versions of the Autoconf 10501# Macro released by the Autoconf Archive. When you make and distribute a 10502# modified version of the Autoconf Macro, you may extend this special 10503# exception to the GPL to apply to your modified version as well.# 10504AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10505[AC_MSG_CHECKING([whether the linker accepts $1]) 10506dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10507AS_LITERAL_IF([$1], 10508 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10509 ax_save_FLAGS=$LDFLAGS 10510 LDFLAGS="$1" 10511 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10512 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10513 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10514 LDFLAGS=$ax_save_FLAGS])], 10515 [ax_save_FLAGS=$LDFLAGS 10516 LDFLAGS="$1" 10517 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10518 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10519 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10520 LDFLAGS=$ax_save_FLAGS]) 10521eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10522AC_MSG_RESULT($xorg_check_linker_flags) 10523if test "x$xorg_check_linker_flags" = xyes; then 10524 m4_default([$2], :) 10525else 10526 m4_default([$3], :) 10527fi 10528]) # XORG_CHECK_LINKER_FLAGS 10529 10530# XORG_MEMORY_CHECK_FLAGS 10531# ----------------------- 10532# Minimum version: 1.16.0 10533# 10534# This macro attempts to find appropriate memory checking functionality 10535# for various platforms which unit testing code may use to catch various 10536# forms of memory allocation and access errors in testing. 10537# 10538# Interface to module: 10539# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10540# Usually added to TESTS_ENVIRONMENT in Makefile.am 10541# 10542# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10543# 10544AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10545 10546AC_REQUIRE([AC_CANONICAL_HOST]) 10547AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10548 [Environment variables to enable memory checking in tests]) 10549 10550# Check for different types of support on different platforms 10551case $host_os in 10552 solaris*) 10553 AC_CHECK_LIB([umem], [umem_alloc], 10554 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10555 ;; 10556 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10557 # both directly and inverted, so should not be 0 or 255. 10558 malloc_debug_env='MALLOC_PERTURB_=15' 10559 ;; 10560 darwin*) 10561 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10562 ;; 10563 *bsd*) 10564 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10565 ;; 10566esac 10567 10568# User supplied flags override default flags 10569if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10570 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10571fi 10572 10573AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10574]) # XORG_WITH_LINT 10575 10576# XORG_CHECK_MALLOC_ZERO 10577# ---------------------- 10578# Minimum version: 1.0.0 10579# 10580# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10581# malloc(0) returns NULL. Packages should add one of these cflags to 10582# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10583AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10584AC_ARG_ENABLE(malloc0returnsnull, 10585 AS_HELP_STRING([--enable-malloc0returnsnull], 10586 [malloc(0) returns NULL (default: auto)]), 10587 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10588 [MALLOC_ZERO_RETURNS_NULL=auto]) 10589 10590AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10591if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10592AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10593 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10594#include <stdlib.h> 10595],[ 10596 char *m0, *r0, *c0, *p; 10597 m0 = malloc(0); 10598 p = malloc(10); 10599 r0 = realloc(p,0); 10600 c0 = calloc(0,10); 10601 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10602])], 10603 [xorg_cv_malloc0_returns_null=yes], 10604 [xorg_cv_malloc0_returns_null=no])]) 10605MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10606fi 10607AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10608 10609if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10610 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10611 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10612 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10613else 10614 MALLOC_ZERO_CFLAGS="" 10615 XMALLOC_ZERO_CFLAGS="" 10616 XTMALLOC_ZERO_CFLAGS="" 10617fi 10618 10619AC_SUBST([MALLOC_ZERO_CFLAGS]) 10620AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10621AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10622]) # XORG_CHECK_MALLOC_ZERO 10623 10624# XORG_WITH_LINT() 10625# ---------------- 10626# Minimum version: 1.1.0 10627# 10628# This macro enables the use of a tool that flags some suspicious and 10629# non-portable constructs (likely to be bugs) in C language source code. 10630# It will attempt to locate the tool and use appropriate options. 10631# There are various lint type tools on different platforms. 10632# 10633# Interface to module: 10634# LINT: returns the path to the tool found on the platform 10635# or the value set to LINT on the configure cmd line 10636# also an Automake conditional 10637# LINT_FLAGS: an Automake variable with appropriate flags 10638# 10639# --with-lint: 'yes' user instructs the module to use lint 10640# 'no' user instructs the module not to use lint (default) 10641# 10642# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10643# If the user sets the value of LINT_FLAGS, they are used verbatim. 10644# 10645AC_DEFUN([XORG_WITH_LINT],[ 10646 10647AC_ARG_VAR([LINT], [Path to a lint-style command]) 10648AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10649AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10650 [Use a lint-style source code checker (default: disabled)])], 10651 [use_lint=$withval], [use_lint=no]) 10652 10653# Obtain platform specific info like program name and options 10654# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10655case $host_os in 10656 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10657 lint_name=splint 10658 lint_options="-badflag" 10659 ;; 10660 *freebsd* | *netbsd*) 10661 lint_name=lint 10662 lint_options="-u -b" 10663 ;; 10664 *solaris*) 10665 lint_name=lint 10666 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10667 ;; 10668esac 10669 10670# Test for the presence of the program (either guessed by the code or spelled out by the user) 10671if test "x$use_lint" = x"yes" ; then 10672 AC_PATH_PROG([LINT], [$lint_name]) 10673 if test "x$LINT" = "x"; then 10674 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10675 fi 10676elif test "x$use_lint" = x"no" ; then 10677 if test "x$LINT" != "x"; then 10678 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10679 fi 10680else 10681 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10682fi 10683 10684# User supplied flags override default flags 10685if test "x$LINT_FLAGS" != "x"; then 10686 lint_options=$LINT_FLAGS 10687fi 10688 10689AC_SUBST([LINT_FLAGS],[$lint_options]) 10690AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10691 10692]) # XORG_WITH_LINT 10693 10694# XORG_LINT_LIBRARY(LIBNAME) 10695# -------------------------- 10696# Minimum version: 1.1.0 10697# 10698# Sets up flags for building lint libraries for checking programs that call 10699# functions in the library. 10700# 10701# Interface to module: 10702# LINTLIB - Automake variable with the name of lint library file to make 10703# MAKE_LINT_LIB - Automake conditional 10704# 10705# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10706# - 'no' user instructs the module not to create a lint library (default) 10707 10708AC_DEFUN([XORG_LINT_LIBRARY],[ 10709AC_REQUIRE([XORG_WITH_LINT]) 10710AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10711 [Create lint library (default: disabled)])], 10712 [make_lint_lib=$enableval], [make_lint_lib=no]) 10713 10714if test "x$make_lint_lib" = x"yes" ; then 10715 LINTLIB=llib-l$1.ln 10716 if test "x$LINT" = "x"; then 10717 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10718 fi 10719elif test "x$make_lint_lib" != x"no" ; then 10720 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10721fi 10722 10723AC_SUBST(LINTLIB) 10724AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10725 10726]) # XORG_LINT_LIBRARY 10727 10728# XORG_COMPILER_BRAND 10729# ------------------- 10730# Minimum version: 1.14.0 10731# 10732# Checks for various brands of compilers and sets flags as appropriate: 10733# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10734# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10735# clang compiler - sets CLANGCC to "yes" 10736# Intel compiler - sets INTELCC to "yes" 10737# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10738# 10739AC_DEFUN([XORG_COMPILER_BRAND], [ 10740AC_LANG_CASE( 10741 [C], [ 10742 AC_REQUIRE([AC_PROG_CC_C99]) 10743 ], 10744 [C++], [ 10745 AC_REQUIRE([AC_PROG_CXX]) 10746 ] 10747) 10748AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10749AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10750AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10751]) # XORG_COMPILER_BRAND 10752 10753# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10754# --------------- 10755# Minimum version: 1.16.0 10756# 10757# Test if the compiler works when passed the given flag as a command line argument. 10758# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10759# next flag in the list until there are no more options. 10760# 10761# Note that this does not guarantee that the compiler supports the flag as some 10762# compilers will simply ignore arguments that they do not understand, but we do 10763# attempt to weed out false positives by using -Werror=unknown-warning-option and 10764# -Werror=unused-command-line-argument 10765# 10766AC_DEFUN([XORG_TESTSET_CFLAG], [ 10767m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10768m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10769 10770AC_LANG_COMPILER_REQUIRE 10771 10772AC_LANG_CASE( 10773 [C], [ 10774 AC_REQUIRE([AC_PROG_CC_C99]) 10775 define([PREFIX], [C]) 10776 define([CACHE_PREFIX], [cc]) 10777 define([COMPILER], [$CC]) 10778 ], 10779 [C++], [ 10780 define([PREFIX], [CXX]) 10781 define([CACHE_PREFIX], [cxx]) 10782 define([COMPILER], [$CXX]) 10783 ] 10784) 10785 10786[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10787 10788if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10789 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10790 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10791 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10792 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10793 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10794 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10795 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10796 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10797fi 10798 10799if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10800 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10801 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10802 fi 10803 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10804 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10805 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10806 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10807 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10808 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10809 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10810 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10811fi 10812 10813found="no" 10814m4_foreach([flag], m4_cdr($@), [ 10815 if test $found = "no" ; then 10816 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10817 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10818 fi 10819 10820 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10821 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10822 fi 10823 10824 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10825 10826dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10827 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10828 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10829 AC_CACHE_VAL($cacheid, 10830 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10831 [eval $cacheid=yes], 10832 [eval $cacheid=no])]) 10833 10834 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10835 10836 eval supported=\$$cacheid 10837 AC_MSG_RESULT([$supported]) 10838 if test "$supported" = "yes" ; then 10839 $1="$$1 ]flag[" 10840 found="yes" 10841 fi 10842 fi 10843]) 10844]) # XORG_TESTSET_CFLAG 10845 10846# XORG_COMPILER_FLAGS 10847# --------------- 10848# Minimum version: 1.16.0 10849# 10850# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10851# arguments supported by the selected compiler which do NOT alter the generated 10852# code. These arguments will cause the compiler to print various warnings 10853# during compilation AND turn a conservative set of warnings into errors. 10854# 10855# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10856# future versions of util-macros as options are added to new compilers. 10857# 10858AC_DEFUN([XORG_COMPILER_FLAGS], [ 10859AC_REQUIRE([XORG_COMPILER_BRAND]) 10860 10861AC_ARG_ENABLE(selective-werror, 10862 AS_HELP_STRING([--disable-selective-werror], 10863 [Turn off selective compiler errors. (default: enabled)]), 10864 [SELECTIVE_WERROR=$enableval], 10865 [SELECTIVE_WERROR=yes]) 10866 10867AC_LANG_CASE( 10868 [C], [ 10869 define([PREFIX], [C]) 10870 ], 10871 [C++], [ 10872 define([PREFIX], [CXX]) 10873 ] 10874) 10875# -v is too short to test reliably with XORG_TESTSET_CFLAG 10876if test "x$SUNCC" = "xyes"; then 10877 [BASE_]PREFIX[FLAGS]="-v" 10878else 10879 [BASE_]PREFIX[FLAGS]="" 10880fi 10881 10882# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10883XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10884XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10885XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10886XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10887 10888AC_LANG_CASE( 10889 [C], [ 10890 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10891 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10892 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10893 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10894 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10895 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10896 ] 10897) 10898 10899# This chunk adds additional warnings that could catch undesired effects. 10900XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10901XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10902XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10903XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10904XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10905XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10906XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10907 10908# These are currently disabled because they are noisy. They will be enabled 10909# in the future once the codebase is sufficiently modernized to silence 10910# them. For now, I don't want them to drown out the other warnings. 10911# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10912# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10913# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10914 10915# Turn some warnings into errors, so we don't accidently get successful builds 10916# when there are problems that should be fixed. 10917 10918if test "x$SELECTIVE_WERROR" = "xyes" ; then 10919XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10920XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10921XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10922XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10923XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10924XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10925XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10926XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10927XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10928XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10929XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10930XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10931XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10932else 10933AC_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]) 10934XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10935XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10936XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10937XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10938XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10939XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10940XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10941XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10942XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10943XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10944XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10945XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10946XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10947fi 10948 10949AC_SUBST([BASE_]PREFIX[FLAGS]) 10950]) # XORG_COMPILER_FLAGS 10951 10952# XORG_CWARNFLAGS 10953# --------------- 10954# Minimum version: 1.2.0 10955# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10956# 10957# Defines CWARNFLAGS to enable C compiler warnings. 10958# 10959# This function is deprecated because it defines -fno-strict-aliasing 10960# which alters the code generated by the compiler. If -fno-strict-aliasing 10961# is needed, then it should be added explicitly in the module when 10962# it is updated to use BASE_CFLAGS. 10963# 10964AC_DEFUN([XORG_CWARNFLAGS], [ 10965AC_REQUIRE([XORG_COMPILER_FLAGS]) 10966AC_REQUIRE([XORG_COMPILER_BRAND]) 10967AC_LANG_CASE( 10968 [C], [ 10969 CWARNFLAGS="$BASE_CFLAGS" 10970 if test "x$GCC" = xyes ; then 10971 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10972 fi 10973 AC_SUBST(CWARNFLAGS) 10974 ] 10975) 10976]) # XORG_CWARNFLAGS 10977 10978# XORG_STRICT_OPTION 10979# ----------------------- 10980# Minimum version: 1.3.0 10981# 10982# Add configure option to enable strict compilation flags, such as treating 10983# warnings as fatal errors. 10984# If --enable-strict-compilation is passed to configure, adds strict flags to 10985# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10986# 10987# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10988# when strict compilation is unconditionally desired. 10989AC_DEFUN([XORG_STRICT_OPTION], [ 10990AC_REQUIRE([XORG_CWARNFLAGS]) 10991AC_REQUIRE([XORG_COMPILER_FLAGS]) 10992 10993AC_ARG_ENABLE(strict-compilation, 10994 AS_HELP_STRING([--enable-strict-compilation], 10995 [Enable all warnings from compiler and make them errors (default: disabled)]), 10996 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10997 10998AC_LANG_CASE( 10999 [C], [ 11000 define([PREFIX], [C]) 11001 ], 11002 [C++], [ 11003 define([PREFIX], [CXX]) 11004 ] 11005) 11006 11007[STRICT_]PREFIX[FLAGS]="" 11008XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11009XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11010 11011# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11012# activate it with -Werror, so we add it here explicitly. 11013XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11014 11015if test "x$STRICT_COMPILE" = "xyes"; then 11016 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11017 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11018fi 11019AC_SUBST([STRICT_]PREFIX[FLAGS]) 11020AC_SUBST([BASE_]PREFIX[FLAGS]) 11021AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11022]) # XORG_STRICT_OPTION 11023 11024# XORG_DEFAULT_OPTIONS 11025# -------------------- 11026# Minimum version: 1.3.0 11027# 11028# Defines default options for X.Org modules. 11029# 11030AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11031AC_REQUIRE([AC_PROG_INSTALL]) 11032XORG_COMPILER_FLAGS 11033XORG_CWARNFLAGS 11034XORG_STRICT_OPTION 11035XORG_RELEASE_VERSION 11036XORG_CHANGELOG 11037XORG_INSTALL 11038XORG_MANPAGE_SECTIONS 11039m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11040 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11041]) # XORG_DEFAULT_OPTIONS 11042 11043# XORG_INSTALL() 11044# ---------------- 11045# Minimum version: 1.4.0 11046# 11047# Defines the variable INSTALL_CMD as the command to copy 11048# INSTALL from $prefix/share/util-macros. 11049# 11050AC_DEFUN([XORG_INSTALL], [ 11051AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11052macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11053INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11054mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11055|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11056echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11057AC_SUBST([INSTALL_CMD]) 11058]) # XORG_INSTALL 11059dnl Copyright 2005 Red Hat, Inc 11060dnl 11061dnl Permission to use, copy, modify, distribute, and sell this software and its 11062dnl documentation for any purpose is hereby granted without fee, provided that 11063dnl the above copyright notice appear in all copies and that both that 11064dnl copyright notice and this permission notice appear in supporting 11065dnl documentation. 11066dnl 11067dnl The above copyright notice and this permission notice shall be included 11068dnl in all copies or substantial portions of the Software. 11069dnl 11070dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11071dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11072dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11073dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11074dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11075dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11076dnl OTHER DEALINGS IN THE SOFTWARE. 11077dnl 11078dnl Except as contained in this notice, the name of the copyright holders shall 11079dnl not be used in advertising or otherwise to promote the sale, use or 11080dnl other dealings in this Software without prior written authorization 11081dnl from the copyright holders. 11082dnl 11083 11084# XORG_RELEASE_VERSION 11085# -------------------- 11086# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11087 11088AC_DEFUN([XORG_RELEASE_VERSION],[ 11089 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11090 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11091 [Major version of this package]) 11092 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11093 if test "x$PVM" = "x"; then 11094 PVM="0" 11095 fi 11096 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11097 [$PVM], 11098 [Minor version of this package]) 11099 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11100 if test "x$PVP" = "x"; then 11101 PVP="0" 11102 fi 11103 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11104 [$PVP], 11105 [Patch version of this package]) 11106]) 11107 11108# XORG_CHANGELOG() 11109# ---------------- 11110# Minimum version: 1.2.0 11111# 11112# Defines the variable CHANGELOG_CMD as the command to generate 11113# ChangeLog from git. 11114# 11115# 11116AC_DEFUN([XORG_CHANGELOG], [ 11117CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11118mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11119|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11120echo 'git directory not found: installing possibly empty changelog.' >&2)" 11121AC_SUBST([CHANGELOG_CMD]) 11122]) # XORG_CHANGELOG 11123 11124dnl Copyright 2005 Red Hat, Inc 11125dnl 11126dnl Permission to use, copy, modify, distribute, and sell this software and its 11127dnl documentation for any purpose is hereby granted without fee, provided that 11128dnl the above copyright notice appear in all copies and that both that 11129dnl copyright notice and this permission notice appear in supporting 11130dnl documentation. 11131dnl 11132dnl The above copyright notice and this permission notice shall be included 11133dnl in all copies or substantial portions of the Software. 11134dnl 11135dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11136dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11137dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11138dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11139dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11140dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11141dnl OTHER DEALINGS IN THE SOFTWARE. 11142dnl 11143dnl Except as contained in this notice, the name of the copyright holders shall 11144dnl not be used in advertising or otherwise to promote the sale, use or 11145dnl other dealings in this Software without prior written authorization 11146dnl from the copyright holders. 11147dnl 11148 11149# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11150# -------------------------- 11151# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11152# is defined, then add the given PROTO to $REQUIRED_MODULES. 11153 11154AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11155 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11156 SAVE_CFLAGS="$CFLAGS" 11157 CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11158 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11159#include "xorg-server.h" 11160#if !defined $1 11161#error $1 not defined 11162#endif 11163 ]])], 11164 [_EXT_CHECK=yes], 11165 [_EXT_CHECK=no]) 11166 CFLAGS="$SAVE_CFLAGS" 11167 AC_MSG_CHECKING([if $1 is defined]) 11168 AC_MSG_RESULT([$_EXT_CHECK]) 11169 if test "$_EXT_CHECK" != no; then 11170 REQUIRED_MODULES="$REQUIRED_MODULES $2" 11171 fi 11172]) 11173 11174# Copyright (C) 2002-2013 Free Software Foundation, Inc. 11175# 11176# This file is free software; the Free Software Foundation 11177# gives unlimited permission to copy and/or distribute it, 11178# with or without modifications, as long as this notice is preserved. 11179 11180# AM_AUTOMAKE_VERSION(VERSION) 11181# ---------------------------- 11182# Automake X.Y traces this macro to ensure aclocal.m4 has been 11183# generated from the m4 files accompanying Automake X.Y. 11184# (This private macro should not be called outside this file.) 11185AC_DEFUN([AM_AUTOMAKE_VERSION], 11186[am__api_version='1.13' 11187dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11188dnl require some minimum version. Point them to the right macro. 11189m4_if([$1], [1.13.4], [], 11190 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11191]) 11192 11193# _AM_AUTOCONF_VERSION(VERSION) 11194# ----------------------------- 11195# aclocal traces this macro to find the Autoconf version. 11196# This is a private macro too. Using m4_define simplifies 11197# the logic in aclocal, which can simply ignore this definition. 11198m4_define([_AM_AUTOCONF_VERSION], []) 11199 11200# AM_SET_CURRENT_AUTOMAKE_VERSION 11201# ------------------------------- 11202# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11203# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11204AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11205[AM_AUTOMAKE_VERSION([1.13.4])dnl 11206m4_ifndef([AC_AUTOCONF_VERSION], 11207 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11208_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11209 11210# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11211 11212# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11213# 11214# This file is free software; the Free Software Foundation 11215# gives unlimited permission to copy and/or distribute it, 11216# with or without modifications, as long as this notice is preserved. 11217 11218# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11219# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11220# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11221# 11222# Of course, Automake must honor this variable whenever it calls a 11223# tool from the auxiliary directory. The problem is that $srcdir (and 11224# therefore $ac_aux_dir as well) can be either absolute or relative, 11225# depending on how configure is run. This is pretty annoying, since 11226# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11227# source directory, any form will work fine, but in subdirectories a 11228# relative path needs to be adjusted first. 11229# 11230# $ac_aux_dir/missing 11231# fails when called from a subdirectory if $ac_aux_dir is relative 11232# $top_srcdir/$ac_aux_dir/missing 11233# fails if $ac_aux_dir is absolute, 11234# fails when called from a subdirectory in a VPATH build with 11235# a relative $ac_aux_dir 11236# 11237# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11238# are both prefixed by $srcdir. In an in-source build this is usually 11239# harmless because $srcdir is '.', but things will broke when you 11240# start a VPATH build or use an absolute $srcdir. 11241# 11242# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11243# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11244# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11245# and then we would define $MISSING as 11246# MISSING="\${SHELL} $am_aux_dir/missing" 11247# This will work as long as MISSING is not called from configure, because 11248# unfortunately $(top_srcdir) has no meaning in configure. 11249# However there are other variables, like CC, which are often used in 11250# configure, and could therefore not use this "fixed" $ac_aux_dir. 11251# 11252# Another solution, used here, is to always expand $ac_aux_dir to an 11253# absolute PATH. The drawback is that using absolute paths prevent a 11254# configured tree to be moved without reconfiguration. 11255 11256AC_DEFUN([AM_AUX_DIR_EXPAND], 11257[dnl Rely on autoconf to set up CDPATH properly. 11258AC_PREREQ([2.50])dnl 11259# expand $ac_aux_dir to an absolute path 11260am_aux_dir=`cd $ac_aux_dir && pwd` 11261]) 11262 11263# AM_CONDITIONAL -*- Autoconf -*- 11264 11265# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11266# 11267# This file is free software; the Free Software Foundation 11268# gives unlimited permission to copy and/or distribute it, 11269# with or without modifications, as long as this notice is preserved. 11270 11271# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11272# ------------------------------------- 11273# Define a conditional. 11274AC_DEFUN([AM_CONDITIONAL], 11275[AC_PREREQ([2.52])dnl 11276 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11277 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11278AC_SUBST([$1_TRUE])dnl 11279AC_SUBST([$1_FALSE])dnl 11280_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11281_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11282m4_define([_AM_COND_VALUE_$1], [$2])dnl 11283if $2; then 11284 $1_TRUE= 11285 $1_FALSE='#' 11286else 11287 $1_TRUE='#' 11288 $1_FALSE= 11289fi 11290AC_CONFIG_COMMANDS_PRE( 11291[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11292 AC_MSG_ERROR([[conditional "$1" was never defined. 11293Usually this means the macro was only invoked conditionally.]]) 11294fi])]) 11295 11296# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11297# 11298# This file is free software; the Free Software Foundation 11299# gives unlimited permission to copy and/or distribute it, 11300# with or without modifications, as long as this notice is preserved. 11301 11302 11303# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11304# written in clear, in which case automake, when reading aclocal.m4, 11305# will think it sees a *use*, and therefore will trigger all it's 11306# C support machinery. Also note that it means that autoscan, seeing 11307# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11308 11309 11310# _AM_DEPENDENCIES(NAME) 11311# ---------------------- 11312# See how the compiler implements dependency checking. 11313# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11314# We try a few techniques and use that to set a single cache variable. 11315# 11316# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11317# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11318# dependency, and given that the user is not expected to run this macro, 11319# just rely on AC_PROG_CC. 11320AC_DEFUN([_AM_DEPENDENCIES], 11321[AC_REQUIRE([AM_SET_DEPDIR])dnl 11322AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11323AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11324AC_REQUIRE([AM_DEP_TRACK])dnl 11325 11326m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11327 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11328 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11329 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11330 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11331 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11332 [depcc="$$1" am_compiler_list=]) 11333 11334AC_CACHE_CHECK([dependency style of $depcc], 11335 [am_cv_$1_dependencies_compiler_type], 11336[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11337 # We make a subdir and do the tests there. Otherwise we can end up 11338 # making bogus files that we don't know about and never remove. For 11339 # instance it was reported that on HP-UX the gcc test will end up 11340 # making a dummy file named 'D' -- because '-MD' means "put the output 11341 # in D". 11342 rm -rf conftest.dir 11343 mkdir conftest.dir 11344 # Copy depcomp to subdir because otherwise we won't find it if we're 11345 # using a relative directory. 11346 cp "$am_depcomp" conftest.dir 11347 cd conftest.dir 11348 # We will build objects and dependencies in a subdirectory because 11349 # it helps to detect inapplicable dependency modes. For instance 11350 # both Tru64's cc and ICC support -MD to output dependencies as a 11351 # side effect of compilation, but ICC will put the dependencies in 11352 # the current directory while Tru64 will put them in the object 11353 # directory. 11354 mkdir sub 11355 11356 am_cv_$1_dependencies_compiler_type=none 11357 if test "$am_compiler_list" = ""; then 11358 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11359 fi 11360 am__universal=false 11361 m4_case([$1], [CC], 11362 [case " $depcc " in #( 11363 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11364 esac], 11365 [CXX], 11366 [case " $depcc " in #( 11367 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11368 esac]) 11369 11370 for depmode in $am_compiler_list; do 11371 # Setup a source with many dependencies, because some compilers 11372 # like to wrap large dependency lists on column 80 (with \), and 11373 # we should not choose a depcomp mode which is confused by this. 11374 # 11375 # We need to recreate these files for each test, as the compiler may 11376 # overwrite some of them when testing with obscure command lines. 11377 # This happens at least with the AIX C compiler. 11378 : > sub/conftest.c 11379 for i in 1 2 3 4 5 6; do 11380 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11381 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11382 # Solaris 10 /bin/sh. 11383 echo '/* dummy */' > sub/conftst$i.h 11384 done 11385 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11386 11387 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11388 # mode. It turns out that the SunPro C++ compiler does not properly 11389 # handle '-M -o', and we need to detect this. Also, some Intel 11390 # versions had trouble with output in subdirs. 11391 am__obj=sub/conftest.${OBJEXT-o} 11392 am__minus_obj="-o $am__obj" 11393 case $depmode in 11394 gcc) 11395 # This depmode causes a compiler race in universal mode. 11396 test "$am__universal" = false || continue 11397 ;; 11398 nosideeffect) 11399 # After this tag, mechanisms are not by side-effect, so they'll 11400 # only be used when explicitly requested. 11401 if test "x$enable_dependency_tracking" = xyes; then 11402 continue 11403 else 11404 break 11405 fi 11406 ;; 11407 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11408 # This compiler won't grok '-c -o', but also, the minuso test has 11409 # not run yet. These depmodes are late enough in the game, and 11410 # so weak that their functioning should not be impacted. 11411 am__obj=conftest.${OBJEXT-o} 11412 am__minus_obj= 11413 ;; 11414 none) break ;; 11415 esac 11416 if depmode=$depmode \ 11417 source=sub/conftest.c object=$am__obj \ 11418 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11419 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11420 >/dev/null 2>conftest.err && 11421 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11422 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11423 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11424 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11425 # icc doesn't choke on unknown options, it will just issue warnings 11426 # or remarks (even with -Werror). So we grep stderr for any message 11427 # that says an option was ignored or not supported. 11428 # When given -MP, icc 7.0 and 7.1 complain thusly: 11429 # icc: Command line warning: ignoring option '-M'; no argument required 11430 # The diagnosis changed in icc 8.0: 11431 # icc: Command line remark: option '-MP' not supported 11432 if (grep 'ignoring option' conftest.err || 11433 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11434 am_cv_$1_dependencies_compiler_type=$depmode 11435 break 11436 fi 11437 fi 11438 done 11439 11440 cd .. 11441 rm -rf conftest.dir 11442else 11443 am_cv_$1_dependencies_compiler_type=none 11444fi 11445]) 11446AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11447AM_CONDITIONAL([am__fastdep$1], [ 11448 test "x$enable_dependency_tracking" != xno \ 11449 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11450]) 11451 11452 11453# AM_SET_DEPDIR 11454# ------------- 11455# Choose a directory name for dependency files. 11456# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11457AC_DEFUN([AM_SET_DEPDIR], 11458[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11459AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11460]) 11461 11462 11463# AM_DEP_TRACK 11464# ------------ 11465AC_DEFUN([AM_DEP_TRACK], 11466[AC_ARG_ENABLE([dependency-tracking], [dnl 11467AS_HELP_STRING( 11468 [--enable-dependency-tracking], 11469 [do not reject slow dependency extractors]) 11470AS_HELP_STRING( 11471 [--disable-dependency-tracking], 11472 [speeds up one-time build])]) 11473if test "x$enable_dependency_tracking" != xno; then 11474 am_depcomp="$ac_aux_dir/depcomp" 11475 AMDEPBACKSLASH='\' 11476 am__nodep='_no' 11477fi 11478AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11479AC_SUBST([AMDEPBACKSLASH])dnl 11480_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11481AC_SUBST([am__nodep])dnl 11482_AM_SUBST_NOTMAKE([am__nodep])dnl 11483]) 11484 11485# Generate code to set up dependency tracking. -*- Autoconf -*- 11486 11487# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11488# 11489# This file is free software; the Free Software Foundation 11490# gives unlimited permission to copy and/or distribute it, 11491# with or without modifications, as long as this notice is preserved. 11492 11493 11494# _AM_OUTPUT_DEPENDENCY_COMMANDS 11495# ------------------------------ 11496AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11497[{ 11498 # Older Autoconf quotes --file arguments for eval, but not when files 11499 # are listed without --file. Let's play safe and only enable the eval 11500 # if we detect the quoting. 11501 case $CONFIG_FILES in 11502 *\'*) eval set x "$CONFIG_FILES" ;; 11503 *) set x $CONFIG_FILES ;; 11504 esac 11505 shift 11506 for mf 11507 do 11508 # Strip MF so we end up with the name of the file. 11509 mf=`echo "$mf" | sed -e 's/:.*$//'` 11510 # Check whether this is an Automake generated Makefile or not. 11511 # We used to match only the files named 'Makefile.in', but 11512 # some people rename them; so instead we look at the file content. 11513 # Grep'ing the first line is not enough: some people post-process 11514 # each Makefile.in and add a new line on top of each file to say so. 11515 # Grep'ing the whole file is not good either: AIX grep has a line 11516 # limit of 2048, but all sed's we know have understand at least 4000. 11517 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11518 dirpart=`AS_DIRNAME("$mf")` 11519 else 11520 continue 11521 fi 11522 # Extract the definition of DEPDIR, am__include, and am__quote 11523 # from the Makefile without running 'make'. 11524 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11525 test -z "$DEPDIR" && continue 11526 am__include=`sed -n 's/^am__include = //p' < "$mf"` 11527 test -z "$am__include" && continue 11528 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11529 # Find all dependency output files, they are included files with 11530 # $(DEPDIR) in their names. We invoke sed twice because it is the 11531 # simplest approach to changing $(DEPDIR) to its actual value in the 11532 # expansion. 11533 for file in `sed -n " 11534 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11535 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11536 # Make sure the directory exists. 11537 test -f "$dirpart/$file" && continue 11538 fdir=`AS_DIRNAME(["$file"])` 11539 AS_MKDIR_P([$dirpart/$fdir]) 11540 # echo "creating $dirpart/$file" 11541 echo '# dummy' > "$dirpart/$file" 11542 done 11543 done 11544} 11545])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11546 11547 11548# AM_OUTPUT_DEPENDENCY_COMMANDS 11549# ----------------------------- 11550# This macro should only be invoked once -- use via AC_REQUIRE. 11551# 11552# This code is only required when automatic dependency tracking 11553# is enabled. FIXME. This creates each '.P' file that we will 11554# need in order to bootstrap the dependency handling code. 11555AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11556[AC_CONFIG_COMMANDS([depfiles], 11557 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11558 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11559]) 11560 11561# Do all the work for Automake. -*- Autoconf -*- 11562 11563# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11564# 11565# This file is free software; the Free Software Foundation 11566# gives unlimited permission to copy and/or distribute it, 11567# with or without modifications, as long as this notice is preserved. 11568 11569# This macro actually does too much. Some checks are only needed if 11570# your package does certain things. But this isn't really a big deal. 11571 11572# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11573# AM_INIT_AUTOMAKE([OPTIONS]) 11574# ----------------------------------------------- 11575# The call with PACKAGE and VERSION arguments is the old style 11576# call (pre autoconf-2.50), which is being phased out. PACKAGE 11577# and VERSION should now be passed to AC_INIT and removed from 11578# the call to AM_INIT_AUTOMAKE. 11579# We support both call styles for the transition. After 11580# the next Automake release, Autoconf can make the AC_INIT 11581# arguments mandatory, and then we can depend on a new Autoconf 11582# release and drop the old call support. 11583AC_DEFUN([AM_INIT_AUTOMAKE], 11584[AC_PREREQ([2.65])dnl 11585dnl Autoconf wants to disallow AM_ names. We explicitly allow 11586dnl the ones we care about. 11587m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11588AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11589AC_REQUIRE([AC_PROG_INSTALL])dnl 11590if test "`cd $srcdir && pwd`" != "`pwd`"; then 11591 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11592 # is not polluted with repeated "-I." 11593 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11594 # test to see if srcdir already configured 11595 if test -f $srcdir/config.status; then 11596 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11597 fi 11598fi 11599 11600# test whether we have cygpath 11601if test -z "$CYGPATH_W"; then 11602 if (cygpath --version) >/dev/null 2>/dev/null; then 11603 CYGPATH_W='cygpath -w' 11604 else 11605 CYGPATH_W=echo 11606 fi 11607fi 11608AC_SUBST([CYGPATH_W]) 11609 11610# Define the identity of the package. 11611dnl Distinguish between old-style and new-style calls. 11612m4_ifval([$2], 11613[AC_DIAGNOSE([obsolete], 11614 [$0: two- and three-arguments forms are deprecated.]) 11615m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11616 AC_SUBST([PACKAGE], [$1])dnl 11617 AC_SUBST([VERSION], [$2])], 11618[_AM_SET_OPTIONS([$1])dnl 11619dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11620m4_if( 11621 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11622 [ok:ok],, 11623 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11624 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11625 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11626 11627_AM_IF_OPTION([no-define],, 11628[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11629 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11630 11631# Some tools Automake needs. 11632AC_REQUIRE([AM_SANITY_CHECK])dnl 11633AC_REQUIRE([AC_ARG_PROGRAM])dnl 11634AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11635AM_MISSING_PROG([AUTOCONF], [autoconf]) 11636AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11637AM_MISSING_PROG([AUTOHEADER], [autoheader]) 11638AM_MISSING_PROG([MAKEINFO], [makeinfo]) 11639AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11640AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11641AC_REQUIRE([AC_PROG_MKDIR_P])dnl 11642# For better backward compatibility. To be removed once Automake 1.9.x 11643# dies out for good. For more background, see: 11644# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11645# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11646AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11647# We need awk for the "check" target. The system "awk" is bad on 11648# some platforms. 11649AC_REQUIRE([AC_PROG_AWK])dnl 11650AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11651AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11652_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11653 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11654 [_AM_PROG_TAR([v7])])]) 11655_AM_IF_OPTION([no-dependencies],, 11656[AC_PROVIDE_IFELSE([AC_PROG_CC], 11657 [_AM_DEPENDENCIES([CC])], 11658 [m4_define([AC_PROG_CC], 11659 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11660AC_PROVIDE_IFELSE([AC_PROG_CXX], 11661 [_AM_DEPENDENCIES([CXX])], 11662 [m4_define([AC_PROG_CXX], 11663 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11664AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11665 [_AM_DEPENDENCIES([OBJC])], 11666 [m4_define([AC_PROG_OBJC], 11667 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11668AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11669 [_AM_DEPENDENCIES([OBJCXX])], 11670 [m4_define([AC_PROG_OBJCXX], 11671 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11672]) 11673AC_REQUIRE([AM_SILENT_RULES])dnl 11674dnl The testsuite driver may need to know about EXEEXT, so add the 11675dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11676dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11677AC_CONFIG_COMMANDS_PRE(dnl 11678[m4_provide_if([_AM_COMPILER_EXEEXT], 11679 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11680]) 11681 11682dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11683dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11684dnl mangled by Autoconf and run in a shell conditional statement. 11685m4_define([_AC_COMPILER_EXEEXT], 11686m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11687 11688 11689# When config.status generates a header, we must update the stamp-h file. 11690# This file resides in the same directory as the config header 11691# that is generated. The stamp files are numbered to have different names. 11692 11693# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11694# loop where config.status creates the headers, so we can generate 11695# our stamp files there. 11696AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11697[# Compute $1's index in $config_headers. 11698_am_arg=$1 11699_am_stamp_count=1 11700for _am_header in $config_headers :; do 11701 case $_am_header in 11702 $_am_arg | $_am_arg:* ) 11703 break ;; 11704 * ) 11705 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11706 esac 11707done 11708echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11709 11710# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11711# 11712# This file is free software; the Free Software Foundation 11713# gives unlimited permission to copy and/or distribute it, 11714# with or without modifications, as long as this notice is preserved. 11715 11716# AM_PROG_INSTALL_SH 11717# ------------------ 11718# Define $install_sh. 11719AC_DEFUN([AM_PROG_INSTALL_SH], 11720[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11721if test x"${install_sh}" != xset; then 11722 case $am_aux_dir in 11723 *\ * | *\ *) 11724 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11725 *) 11726 install_sh="\${SHELL} $am_aux_dir/install-sh" 11727 esac 11728fi 11729AC_SUBST([install_sh])]) 11730 11731# Copyright (C) 2003-2013 Free Software Foundation, Inc. 11732# 11733# This file is free software; the Free Software Foundation 11734# gives unlimited permission to copy and/or distribute it, 11735# with or without modifications, as long as this notice is preserved. 11736 11737# Check whether the underlying file-system supports filenames 11738# with a leading dot. For instance MS-DOS doesn't. 11739AC_DEFUN([AM_SET_LEADING_DOT], 11740[rm -rf .tst 2>/dev/null 11741mkdir .tst 2>/dev/null 11742if test -d .tst; then 11743 am__leading_dot=. 11744else 11745 am__leading_dot=_ 11746fi 11747rmdir .tst 2>/dev/null 11748AC_SUBST([am__leading_dot])]) 11749 11750# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11751# From Jim Meyering 11752 11753# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11754# 11755# This file is free software; the Free Software Foundation 11756# gives unlimited permission to copy and/or distribute it, 11757# with or without modifications, as long as this notice is preserved. 11758 11759# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11760# ---------------------------------- 11761# Control maintainer-specific portions of Makefiles. 11762# Default is to disable them, unless 'enable' is passed literally. 11763# For symmetry, 'disable' may be passed as well. Anyway, the user 11764# can override the default with the --enable/--disable switch. 11765AC_DEFUN([AM_MAINTAINER_MODE], 11766[m4_case(m4_default([$1], [disable]), 11767 [enable], [m4_define([am_maintainer_other], [disable])], 11768 [disable], [m4_define([am_maintainer_other], [enable])], 11769 [m4_define([am_maintainer_other], [enable]) 11770 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11771AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11772 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11773 AC_ARG_ENABLE([maintainer-mode], 11774 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11775 am_maintainer_other[ make rules and dependencies not useful 11776 (and sometimes confusing) to the casual installer])], 11777 [USE_MAINTAINER_MODE=$enableval], 11778 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11779 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11780 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11781 MAINT=$MAINTAINER_MODE_TRUE 11782 AC_SUBST([MAINT])dnl 11783] 11784) 11785 11786# Check to see how 'make' treats includes. -*- Autoconf -*- 11787 11788# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11789# 11790# This file is free software; the Free Software Foundation 11791# gives unlimited permission to copy and/or distribute it, 11792# with or without modifications, as long as this notice is preserved. 11793 11794# AM_MAKE_INCLUDE() 11795# ----------------- 11796# Check to see how make treats includes. 11797AC_DEFUN([AM_MAKE_INCLUDE], 11798[am_make=${MAKE-make} 11799cat > confinc << 'END' 11800am__doit: 11801 @echo this is the am__doit target 11802.PHONY: am__doit 11803END 11804# If we don't find an include directive, just comment out the code. 11805AC_MSG_CHECKING([for style of include used by $am_make]) 11806am__include="#" 11807am__quote= 11808_am_result=none 11809# First try GNU make style include. 11810echo "include confinc" > confmf 11811# Ignore all kinds of additional output from 'make'. 11812case `$am_make -s -f confmf 2> /dev/null` in #( 11813*the\ am__doit\ target*) 11814 am__include=include 11815 am__quote= 11816 _am_result=GNU 11817 ;; 11818esac 11819# Now try BSD make style include. 11820if test "$am__include" = "#"; then 11821 echo '.include "confinc"' > confmf 11822 case `$am_make -s -f confmf 2> /dev/null` in #( 11823 *the\ am__doit\ target*) 11824 am__include=.include 11825 am__quote="\"" 11826 _am_result=BSD 11827 ;; 11828 esac 11829fi 11830AC_SUBST([am__include]) 11831AC_SUBST([am__quote]) 11832AC_MSG_RESULT([$_am_result]) 11833rm -f confinc confmf 11834]) 11835 11836# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11837 11838# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11839# 11840# This file is free software; the Free Software Foundation 11841# gives unlimited permission to copy and/or distribute it, 11842# with or without modifications, as long as this notice is preserved. 11843 11844# AM_MISSING_PROG(NAME, PROGRAM) 11845# ------------------------------ 11846AC_DEFUN([AM_MISSING_PROG], 11847[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11848$1=${$1-"${am_missing_run}$2"} 11849AC_SUBST($1)]) 11850 11851# AM_MISSING_HAS_RUN 11852# ------------------ 11853# Define MISSING if not defined so far and test if it is modern enough. 11854# If it is, set am_missing_run to use it, otherwise, to nothing. 11855AC_DEFUN([AM_MISSING_HAS_RUN], 11856[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11857AC_REQUIRE_AUX_FILE([missing])dnl 11858if test x"${MISSING+set}" != xset; then 11859 case $am_aux_dir in 11860 *\ * | *\ *) 11861 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11862 *) 11863 MISSING="\${SHELL} $am_aux_dir/missing" ;; 11864 esac 11865fi 11866# Use eval to expand $SHELL 11867if eval "$MISSING --is-lightweight"; then 11868 am_missing_run="$MISSING " 11869else 11870 am_missing_run= 11871 AC_MSG_WARN(['missing' script is too old or missing]) 11872fi 11873]) 11874 11875# Helper functions for option handling. -*- Autoconf -*- 11876 11877# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11878# 11879# This file is free software; the Free Software Foundation 11880# gives unlimited permission to copy and/or distribute it, 11881# with or without modifications, as long as this notice is preserved. 11882 11883# _AM_MANGLE_OPTION(NAME) 11884# ----------------------- 11885AC_DEFUN([_AM_MANGLE_OPTION], 11886[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11887 11888# _AM_SET_OPTION(NAME) 11889# -------------------- 11890# Set option NAME. Presently that only means defining a flag for this option. 11891AC_DEFUN([_AM_SET_OPTION], 11892[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11893 11894# _AM_SET_OPTIONS(OPTIONS) 11895# ------------------------ 11896# OPTIONS is a space-separated list of Automake options. 11897AC_DEFUN([_AM_SET_OPTIONS], 11898[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11899 11900# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11901# ------------------------------------------- 11902# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11903AC_DEFUN([_AM_IF_OPTION], 11904[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11905 11906# Check to make sure that the build environment is sane. -*- Autoconf -*- 11907 11908# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11909# 11910# This file is free software; the Free Software Foundation 11911# gives unlimited permission to copy and/or distribute it, 11912# with or without modifications, as long as this notice is preserved. 11913 11914# AM_SANITY_CHECK 11915# --------------- 11916AC_DEFUN([AM_SANITY_CHECK], 11917[AC_MSG_CHECKING([whether build environment is sane]) 11918# Reject unsafe characters in $srcdir or the absolute working directory 11919# name. Accept space and tab only in the latter. 11920am_lf=' 11921' 11922case `pwd` in 11923 *[[\\\"\#\$\&\'\`$am_lf]]*) 11924 AC_MSG_ERROR([unsafe absolute working directory name]);; 11925esac 11926case $srcdir in 11927 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11928 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 11929esac 11930 11931# Do 'set' in a subshell so we don't clobber the current shell's 11932# arguments. Must try -L first in case configure is actually a 11933# symlink; some systems play weird games with the mod time of symlinks 11934# (eg FreeBSD returns the mod time of the symlink's containing 11935# directory). 11936if ( 11937 am_has_slept=no 11938 for am_try in 1 2; do 11939 echo "timestamp, slept: $am_has_slept" > conftest.file 11940 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11941 if test "$[*]" = "X"; then 11942 # -L didn't work. 11943 set X `ls -t "$srcdir/configure" conftest.file` 11944 fi 11945 if test "$[*]" != "X $srcdir/configure conftest.file" \ 11946 && test "$[*]" != "X conftest.file $srcdir/configure"; then 11947 11948 # If neither matched, then we have a broken ls. This can happen 11949 # if, for instance, CONFIG_SHELL is bash and it inherits a 11950 # broken ls alias from the environment. This has actually 11951 # happened. Such a system could not be considered "sane". 11952 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11953 alias in your environment]) 11954 fi 11955 if test "$[2]" = conftest.file || test $am_try -eq 2; then 11956 break 11957 fi 11958 # Just in case. 11959 sleep 1 11960 am_has_slept=yes 11961 done 11962 test "$[2]" = conftest.file 11963 ) 11964then 11965 # Ok. 11966 : 11967else 11968 AC_MSG_ERROR([newly created file is older than distributed files! 11969Check your system clock]) 11970fi 11971AC_MSG_RESULT([yes]) 11972# If we didn't sleep, we still need to ensure time stamps of config.status and 11973# generated files are strictly newer. 11974am_sleep_pid= 11975if grep 'slept: no' conftest.file >/dev/null 2>&1; then 11976 ( sleep 1 ) & 11977 am_sleep_pid=$! 11978fi 11979AC_CONFIG_COMMANDS_PRE( 11980 [AC_MSG_CHECKING([that generated files are newer than configure]) 11981 if test -n "$am_sleep_pid"; then 11982 # Hide warnings about reused PIDs. 11983 wait $am_sleep_pid 2>/dev/null 11984 fi 11985 AC_MSG_RESULT([done])]) 11986rm -f conftest.file 11987]) 11988 11989# Copyright (C) 2009-2013 Free Software Foundation, Inc. 11990# 11991# This file is free software; the Free Software Foundation 11992# gives unlimited permission to copy and/or distribute it, 11993# with or without modifications, as long as this notice is preserved. 11994 11995# AM_SILENT_RULES([DEFAULT]) 11996# -------------------------- 11997# Enable less verbose build rules; with the default set to DEFAULT 11998# ("yes" being less verbose, "no" or empty being verbose). 11999AC_DEFUN([AM_SILENT_RULES], 12000[AC_ARG_ENABLE([silent-rules], [dnl 12001AS_HELP_STRING( 12002 [--enable-silent-rules], 12003 [less verbose build output (undo: "make V=1")]) 12004AS_HELP_STRING( 12005 [--disable-silent-rules], 12006 [verbose build output (undo: "make V=0")])dnl 12007]) 12008case $enable_silent_rules in @%:@ ((( 12009 yes) AM_DEFAULT_VERBOSITY=0;; 12010 no) AM_DEFAULT_VERBOSITY=1;; 12011 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12012esac 12013dnl 12014dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12015dnl do not support nested variable expansions. 12016dnl See automake bug#9928 and bug#10237. 12017am_make=${MAKE-make} 12018AC_CACHE_CHECK([whether $am_make supports nested variables], 12019 [am_cv_make_support_nested_variables], 12020 [if AS_ECHO([['TRUE=$(BAR$(V)) 12021BAR0=false 12022BAR1=true 12023V=1 12024am__doit: 12025 @$(TRUE) 12026.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12027 am_cv_make_support_nested_variables=yes 12028else 12029 am_cv_make_support_nested_variables=no 12030fi]) 12031if test $am_cv_make_support_nested_variables = yes; then 12032 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12033 AM_V='$(V)' 12034 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12035else 12036 AM_V=$AM_DEFAULT_VERBOSITY 12037 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12038fi 12039AC_SUBST([AM_V])dnl 12040AM_SUBST_NOTMAKE([AM_V])dnl 12041AC_SUBST([AM_DEFAULT_V])dnl 12042AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12043AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12044AM_BACKSLASH='\' 12045AC_SUBST([AM_BACKSLASH])dnl 12046_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12047]) 12048 12049# Copyright (C) 2001-2013 Free Software Foundation, Inc. 12050# 12051# This file is free software; the Free Software Foundation 12052# gives unlimited permission to copy and/or distribute it, 12053# with or without modifications, as long as this notice is preserved. 12054 12055# AM_PROG_INSTALL_STRIP 12056# --------------------- 12057# One issue with vendor 'install' (even GNU) is that you can't 12058# specify the program used to strip binaries. This is especially 12059# annoying in cross-compiling environments, where the build's strip 12060# is unlikely to handle the host's binaries. 12061# Fortunately install-sh will honor a STRIPPROG variable, so we 12062# always use install-sh in "make install-strip", and initialize 12063# STRIPPROG with the value of the STRIP variable (set by the user). 12064AC_DEFUN([AM_PROG_INSTALL_STRIP], 12065[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12066# Installed binaries are usually stripped using 'strip' when the user 12067# run "make install-strip". However 'strip' might not be the right 12068# tool to use in cross-compilation environments, therefore Automake 12069# will honor the 'STRIP' environment variable to overrule this program. 12070dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12071if test "$cross_compiling" != no; then 12072 AC_CHECK_TOOL([STRIP], [strip], :) 12073fi 12074INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12075AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12076 12077# Copyright (C) 2006-2013 Free Software Foundation, Inc. 12078# 12079# This file is free software; the Free Software Foundation 12080# gives unlimited permission to copy and/or distribute it, 12081# with or without modifications, as long as this notice is preserved. 12082 12083# _AM_SUBST_NOTMAKE(VARIABLE) 12084# --------------------------- 12085# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12086# This macro is traced by Automake. 12087AC_DEFUN([_AM_SUBST_NOTMAKE]) 12088 12089# AM_SUBST_NOTMAKE(VARIABLE) 12090# -------------------------- 12091# Public sister of _AM_SUBST_NOTMAKE. 12092AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12093 12094# Check how to create a tarball. -*- Autoconf -*- 12095 12096# Copyright (C) 2004-2013 Free Software Foundation, Inc. 12097# 12098# This file is free software; the Free Software Foundation 12099# gives unlimited permission to copy and/or distribute it, 12100# with or without modifications, as long as this notice is preserved. 12101 12102# _AM_PROG_TAR(FORMAT) 12103# -------------------- 12104# Check how to create a tarball in format FORMAT. 12105# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12106# 12107# Substitute a variable $(am__tar) that is a command 12108# writing to stdout a FORMAT-tarball containing the directory 12109# $tardir. 12110# tardir=directory && $(am__tar) > result.tar 12111# 12112# Substitute a variable $(am__untar) that extract such 12113# a tarball read from stdin. 12114# $(am__untar) < result.tar 12115# 12116AC_DEFUN([_AM_PROG_TAR], 12117[# Always define AMTAR for backward compatibility. Yes, it's still used 12118# in the wild :-( We should find a proper way to deprecate it ... 12119AC_SUBST([AMTAR], ['$${TAR-tar}']) 12120 12121# We'll loop over all known methods to create a tar archive until one works. 12122_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12123 12124m4_if([$1], [v7], 12125 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12126 12127 [m4_case([$1], 12128 [ustar], 12129 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12130 # There is notably a 21 bits limit for the UID and the GID. In fact, 12131 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12132 # and bug#13588). 12133 am_max_uid=2097151 # 2^21 - 1 12134 am_max_gid=$am_max_uid 12135 # The $UID and $GID variables are not portable, so we need to resort 12136 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12137 # below are definitely unexpected, so allow the users to see them 12138 # (that is, avoid stderr redirection). 12139 am_uid=`id -u || echo unknown` 12140 am_gid=`id -g || echo unknown` 12141 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12142 if test $am_uid -le $am_max_uid; then 12143 AC_MSG_RESULT([yes]) 12144 else 12145 AC_MSG_RESULT([no]) 12146 _am_tools=none 12147 fi 12148 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12149 if test $am_gid -le $am_max_gid; then 12150 AC_MSG_RESULT([yes]) 12151 else 12152 AC_MSG_RESULT([no]) 12153 _am_tools=none 12154 fi], 12155 12156 [pax], 12157 [], 12158 12159 [m4_fatal([Unknown tar format])]) 12160 12161 AC_MSG_CHECKING([how to create a $1 tar archive]) 12162 12163 # Go ahead even if we have the value already cached. We do so because we 12164 # need to set the values for the 'am__tar' and 'am__untar' variables. 12165 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12166 12167 for _am_tool in $_am_tools; do 12168 case $_am_tool in 12169 gnutar) 12170 for _am_tar in tar gnutar gtar; do 12171 AM_RUN_LOG([$_am_tar --version]) && break 12172 done 12173 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12174 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12175 am__untar="$_am_tar -xf -" 12176 ;; 12177 plaintar) 12178 # Must skip GNU tar: if it does not support --format= it doesn't create 12179 # ustar tarball either. 12180 (tar --version) >/dev/null 2>&1 && continue 12181 am__tar='tar chf - "$$tardir"' 12182 am__tar_='tar chf - "$tardir"' 12183 am__untar='tar xf -' 12184 ;; 12185 pax) 12186 am__tar='pax -L -x $1 -w "$$tardir"' 12187 am__tar_='pax -L -x $1 -w "$tardir"' 12188 am__untar='pax -r' 12189 ;; 12190 cpio) 12191 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12192 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12193 am__untar='cpio -i -H $1 -d' 12194 ;; 12195 none) 12196 am__tar=false 12197 am__tar_=false 12198 am__untar=false 12199 ;; 12200 esac 12201 12202 # If the value was cached, stop now. We just wanted to have am__tar 12203 # and am__untar set. 12204 test -n "${am_cv_prog_tar_$1}" && break 12205 12206 # tar/untar a dummy directory, and stop if the command works. 12207 rm -rf conftest.dir 12208 mkdir conftest.dir 12209 echo GrepMe > conftest.dir/file 12210 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12211 rm -rf conftest.dir 12212 if test -s conftest.tar; then 12213 AM_RUN_LOG([$am__untar <conftest.tar]) 12214 AM_RUN_LOG([cat conftest.dir/file]) 12215 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12216 fi 12217 done 12218 rm -rf conftest.dir 12219 12220 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12221 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12222 12223AC_SUBST([am__tar]) 12224AC_SUBST([am__untar]) 12225]) # _AM_PROG_TAR 12226 12227