aclocal.m4 revision 21525869
1# generated automatically by aclocal 1.11.6 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5# Inc. 6# This file is free software; the Free Software Foundation 7# gives unlimited permission to copy and/or distribute it, 8# with or without modifications, as long as this notice is preserved. 9 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13# PARTICULAR PURPOSE. 14 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically `autoreconf'.])]) 22 23# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24# 25# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26# Written by Gordon Matzigkeit, 1996 27# 28# This file is free software; the Free Software Foundation gives 29# unlimited permission to copy and/or distribute it, with or without 30# modifications, as long as this notice is preserved. 31 32m4_define([_LT_COPYING], [dnl 33# Copyright (C) 2014 Free Software Foundation, Inc. 34# This is free software; see the source for copying conditions. There is NO 35# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36 37# GNU Libtool is free software; you can redistribute it and/or modify 38# it under the terms of the GNU General Public License as published by 39# the Free Software Foundation; either version 2 of of the License, or 40# (at your option) any later version. 41# 42# As a special exception to the GNU General Public License, if you 43# distribute this file as part of a program or library that is built 44# using GNU Libtool, you may include this file under the same 45# distribution terms that you use for the rest of that program. 46# 47# GNU Libtool is distributed in the hope that it will be useful, but 48# WITHOUT ANY WARRANTY; without even the implied warranty of 49# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50# GNU General Public License for more details. 51# 52# You should have received a copy of the GNU General Public License 53# along with this program. If not, see <http://www.gnu.org/licenses/>. 54]) 55 56# serial 58 LT_INIT 57 58 59# LT_PREREQ(VERSION) 60# ------------------ 61# Complain and exit if this libtool version is less that VERSION. 62m4_defun([LT_PREREQ], 63[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64 [m4_default([$3], 65 [m4_fatal([Libtool version $1 or higher is required], 66 63)])], 67 [$2])]) 68 69 70# _LT_CHECK_BUILDDIR 71# ------------------ 72# Complain if the absolute build directory name contains unusual characters 73m4_defun([_LT_CHECK_BUILDDIR], 74[case `pwd` in 75 *\ * | *\ *) 76 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77esac 78]) 79 80 81# LT_INIT([OPTIONS]) 82# ------------------ 83AC_DEFUN([LT_INIT], 84[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86AC_BEFORE([$0], [LT_LANG])dnl 87AC_BEFORE([$0], [LT_OUTPUT])dnl 88AC_BEFORE([$0], [LTDL_INIT])dnl 89m4_require([_LT_CHECK_BUILDDIR])dnl 90 91dnl Autoconf doesn't catch unexpanded LT_ macros by default: 92m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95dnl unless we require an AC_DEFUNed macro: 96AC_REQUIRE([LTOPTIONS_VERSION])dnl 97AC_REQUIRE([LTSUGAR_VERSION])dnl 98AC_REQUIRE([LTVERSION_VERSION])dnl 99AC_REQUIRE([LTOBSOLETE_VERSION])dnl 100m4_require([_LT_PROG_LTMAIN])dnl 101 102_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103 104dnl Parse OPTIONS 105_LT_SET_OPTIONS([$0], [$1]) 106 107# This can be used to rebuild libtool when needed 108LIBTOOL_DEPS=$ltmain 109 110# Always use our own libtool. 111LIBTOOL='$(SHELL) $(top_builddir)/libtool' 112AC_SUBST(LIBTOOL)dnl 113 114_LT_SETUP 115 116# Only expand once: 117m4_define([LT_INIT]) 118])# LT_INIT 119 120# Old names: 121AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123dnl aclocal-1.4 backwards compatibility: 124dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126 127 128# _LT_PREPARE_CC_BASENAME 129# ----------------------- 130m4_defun([_LT_PREPARE_CC_BASENAME], [ 131# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132func_cc_basename () 133{ 134 for cc_temp in @S|@*""; do 135 case $cc_temp in 136 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138 \-*) ;; 139 *) break;; 140 esac 141 done 142 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143} 144])# _LT_PREPARE_CC_BASENAME 145 146 147# _LT_CC_BASENAME(CC) 148# ------------------- 149# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150# but that macro is also expanded into generated libtool script, which 151# arranges for $SED and $ECHO to be set by different means. 152m4_defun([_LT_CC_BASENAME], 153[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154AC_REQUIRE([_LT_DECL_SED])dnl 155AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156func_cc_basename $1 157cc_basename=$func_cc_basename_result 158]) 159 160 161# _LT_FILEUTILS_DEFAULTS 162# ---------------------- 163# It is okay to use these file commands and assume they have been set 164# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165m4_defun([_LT_FILEUTILS_DEFAULTS], 166[: ${CP="cp -f"} 167: ${MV="mv -f"} 168: ${RM="rm -f"} 169])# _LT_FILEUTILS_DEFAULTS 170 171 172# _LT_SETUP 173# --------- 174m4_defun([_LT_SETUP], 175[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176AC_REQUIRE([AC_CANONICAL_BUILD])dnl 177AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179 180_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181dnl 182_LT_DECL([], [host_alias], [0], [The host system])dnl 183_LT_DECL([], [host], [0])dnl 184_LT_DECL([], [host_os], [0])dnl 185dnl 186_LT_DECL([], [build_alias], [0], [The build system])dnl 187_LT_DECL([], [build], [0])dnl 188_LT_DECL([], [build_os], [0])dnl 189dnl 190AC_REQUIRE([AC_PROG_CC])dnl 191AC_REQUIRE([LT_PATH_LD])dnl 192AC_REQUIRE([LT_PATH_NM])dnl 193dnl 194AC_REQUIRE([AC_PROG_LN_S])dnl 195test -z "$LN_S" && LN_S="ln -s" 196_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197dnl 198AC_REQUIRE([LT_CMD_MAX_LEN])dnl 199_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201dnl 202m4_require([_LT_FILEUTILS_DEFAULTS])dnl 203m4_require([_LT_CHECK_SHELL_FEATURES])dnl 204m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205m4_require([_LT_CMD_RELOAD])dnl 206m4_require([_LT_CHECK_MAGIC_METHOD])dnl 207m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208m4_require([_LT_CMD_OLD_ARCHIVE])dnl 209m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210m4_require([_LT_WITH_SYSROOT])dnl 211m4_require([_LT_CMD_TRUNCATE])dnl 212 213_LT_CONFIG_LIBTOOL_INIT([ 214# See if we are running on zsh, and set the options that allow our 215# commands through without removal of \ escapes INIT. 216if test -n "\${ZSH_VERSION+set}"; then 217 setopt NO_GLOB_SUBST 218fi 219]) 220if test -n "${ZSH_VERSION+set}"; then 221 setopt NO_GLOB_SUBST 222fi 223 224_LT_CHECK_OBJDIR 225 226m4_require([_LT_TAG_COMPILER])dnl 227 228case $host_os in 229aix3*) 230 # AIX sometimes has problems with the GCC collect2 program. For some 231 # reason, if we set the COLLECT_NAMES environment variable, the problems 232 # vanish in a puff of smoke. 233 if test set != "${COLLECT_NAMES+set}"; then 234 COLLECT_NAMES= 235 export COLLECT_NAMES 236 fi 237 ;; 238esac 239 240# Global variables: 241ofile=libtool 242can_build_shared=yes 243 244# All known linkers require a '.a' archive for static linking (except MSVC, 245# which needs '.lib'). 246libext=a 247 248with_gnu_ld=$lt_cv_prog_gnu_ld 249 250old_CC=$CC 251old_CFLAGS=$CFLAGS 252 253# Set sane defaults for various variables 254test -z "$CC" && CC=cc 255test -z "$LTCC" && LTCC=$CC 256test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257test -z "$LD" && LD=ld 258test -z "$ac_objext" && ac_objext=o 259 260_LT_CC_BASENAME([$compiler]) 261 262# Only perform the check for file, if the check method requires it 263test -z "$MAGIC_CMD" && MAGIC_CMD=file 264case $deplibs_check_method in 265file_magic*) 266 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267 _LT_PATH_MAGIC 268 fi 269 ;; 270esac 271 272# Use C for the default configuration in the libtool script 273LT_SUPPORTED_TAG([CC]) 274_LT_LANG_C_CONFIG 275_LT_LANG_DEFAULT_CONFIG 276_LT_CONFIG_COMMANDS 277])# _LT_SETUP 278 279 280# _LT_PREPARE_SED_QUOTE_VARS 281# -------------------------- 282# Define a few sed substitution that help us do robust quoting. 283m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284[# Backslashify metacharacters that are still active within 285# double-quoted strings. 286sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287 288# Same as above, but do not quote variable references. 289double_quote_subst='s/\([["`\\]]\)/\\\1/g' 290 291# Sed substitution to delay expansion of an escaped shell variable in a 292# double_quote_subst'ed string. 293delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294 295# Sed substitution to delay expansion of an escaped single quote. 296delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297 298# Sed substitution to avoid accidental globbing in evaled expressions 299no_glob_subst='s/\*/\\\*/g' 300]) 301 302# _LT_PROG_LTMAIN 303# --------------- 304# Note that this code is called both from 'configure', and 'config.status' 305# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307# so we pass a copy along to make sure it has a sensible value anyway. 308m4_defun([_LT_PROG_LTMAIN], 309[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311ltmain=$ac_aux_dir/ltmain.sh 312])# _LT_PROG_LTMAIN 313 314 315 316# So that we can recreate a full libtool script including additional 317# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318# in macros and then make a single call at the end using the 'libtool' 319# label. 320 321 322# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323# ---------------------------------------- 324# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325m4_define([_LT_CONFIG_LIBTOOL_INIT], 326[m4_ifval([$1], 327 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328 [$1 329])])]) 330 331# Initialize. 332m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333 334 335# _LT_CONFIG_LIBTOOL([COMMANDS]) 336# ------------------------------ 337# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338m4_define([_LT_CONFIG_LIBTOOL], 339[m4_ifval([$1], 340 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341 [$1 342])])]) 343 344# Initialize. 345m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346 347 348# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349# ----------------------------------------------------- 350m4_defun([_LT_CONFIG_SAVE_COMMANDS], 351[_LT_CONFIG_LIBTOOL([$1]) 352_LT_CONFIG_LIBTOOL_INIT([$2]) 353]) 354 355 356# _LT_FORMAT_COMMENT([COMMENT]) 357# ----------------------------- 358# Add leading comment marks to the start of each line, and a trailing 359# full-stop to the whole comment if one is not present already. 360m4_define([_LT_FORMAT_COMMENT], 361[m4_ifval([$1], [ 362m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364)]) 365 366 367 368 369 370# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371# ------------------------------------------------------------------- 372# CONFIGNAME is the name given to the value in the libtool script. 373# VARNAME is the (base) name used in the configure script. 374# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375# VARNAME. Any other value will be used directly. 376m4_define([_LT_DECL], 377[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379 [m4_ifval([$1], [$1], [$2])]) 380 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381 m4_ifval([$4], 382 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383 lt_dict_add_subkey([lt_decl_dict], [$2], 384 [tagged?], [m4_ifval([$5], [yes], [no])])]) 385]) 386 387 388# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389# -------------------------------------------------------- 390m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391 392 393# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394# ------------------------------------------------ 395m4_define([lt_decl_tag_varnames], 396[_lt_decl_filter([tagged?], [yes], $@)]) 397 398 399# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400# --------------------------------------------------------- 401m4_define([_lt_decl_filter], 402[m4_case([$#], 403 [0], [m4_fatal([$0: too few arguments: $#])], 404 [1], [m4_fatal([$0: too few arguments: $#: $1])], 405 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408]) 409 410 411# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412# -------------------------------------------------- 413m4_define([lt_decl_quote_varnames], 414[_lt_decl_filter([value], [1], $@)]) 415 416 417# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418# --------------------------------------------------- 419m4_define([lt_decl_dquote_varnames], 420[_lt_decl_filter([value], [2], $@)]) 421 422 423# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424# --------------------------------------------------- 425m4_define([lt_decl_varnames_tagged], 426[m4_assert([$# <= 2])dnl 427_$0(m4_quote(m4_default([$1], [[, ]])), 428 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430m4_define([_lt_decl_varnames_tagged], 431[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432 433 434# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435# ------------------------------------------------ 436m4_define([lt_decl_all_varnames], 437[_$0(m4_quote(m4_default([$1], [[, ]])), 438 m4_if([$2], [], 439 m4_quote(lt_decl_varnames), 440 m4_quote(m4_shift($@))))[]dnl 441]) 442m4_define([_lt_decl_all_varnames], 443[lt_join($@, lt_decl_varnames_tagged([$1], 444 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445]) 446 447 448# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449# ------------------------------------ 450# Quote a variable value, and forward it to 'config.status' so that its 451# declaration there will have the same value as in 'configure'. VARNAME 452# must have a single quote delimited value for this to work. 453m4_define([_LT_CONFIG_STATUS_DECLARE], 454[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455 456 457# _LT_CONFIG_STATUS_DECLARATIONS 458# ------------------------------ 459# We delimit libtool config variables with single quotes, so when 460# we write them to config.status, we have to be sure to quote all 461# embedded single quotes properly. In configure, this macro expands 462# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463# 464# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468 469 470# _LT_LIBTOOL_TAGS 471# ---------------- 472# Output comment and list of tags supported by the script 473m4_defun([_LT_LIBTOOL_TAGS], 474[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475available_tags='_LT_TAGS'dnl 476]) 477 478 479# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480# ----------------------------------- 481# Extract the dictionary values for VARNAME (optionally with TAG) and 482# expand to a commented shell variable setting: 483# 484# # Some comment about what VAR is for. 485# visible_name=$lt_internal_name 486m4_define([_LT_LIBTOOL_DECLARE], 487[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488 [description])))[]dnl 489m4_pushdef([_libtool_name], 490 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492 [0], [_libtool_name=[$]$1], 493 [1], [_libtool_name=$lt_[]$1], 494 [2], [_libtool_name=$lt_[]$1], 495 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497]) 498 499 500# _LT_LIBTOOL_CONFIG_VARS 501# ----------------------- 502# Produce commented declarations of non-tagged libtool config variables 503# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505# section) are produced by _LT_LIBTOOL_TAG_VARS. 506m4_defun([_LT_LIBTOOL_CONFIG_VARS], 507[m4_foreach([_lt_var], 508 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510 511 512# _LT_LIBTOOL_TAG_VARS(TAG) 513# ------------------------- 514m4_define([_LT_LIBTOOL_TAG_VARS], 515[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517 518 519# _LT_TAGVAR(VARNAME, [TAGNAME]) 520# ------------------------------ 521m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522 523 524# _LT_CONFIG_COMMANDS 525# ------------------- 526# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527# variables for single and double quote escaping we saved from calls 528# to _LT_DECL, we can put quote escaped variables declarations 529# into 'config.status', and then the shell code to quote escape them in 530# for loops in 'config.status'. Finally, any additional code accumulated 531# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532m4_defun([_LT_CONFIG_COMMANDS], 533[AC_PROVIDE_IFELSE([LT_OUTPUT], 534 dnl If the libtool generation code has been placed in $CONFIG_LT, 535 dnl instead of duplicating it all over again into config.status, 536 dnl then we will have config.status run $CONFIG_LT later, so it 537 dnl needs to know what name is stored there: 538 [AC_CONFIG_COMMANDS([libtool], 539 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540 dnl If the libtool generation code is destined for config.status, 541 dnl expand the accumulated commands and init code now: 542 [AC_CONFIG_COMMANDS([libtool], 543 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544])#_LT_CONFIG_COMMANDS 545 546 547# Initialize. 548m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549[ 550 551# The HP-UX ksh and POSIX shell print the target directory to stdout 552# if CDPATH is set. 553(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554 555sed_quote_subst='$sed_quote_subst' 556double_quote_subst='$double_quote_subst' 557delay_variable_subst='$delay_variable_subst' 558_LT_CONFIG_STATUS_DECLARATIONS 559LTCC='$LTCC' 560LTCFLAGS='$LTCFLAGS' 561compiler='$compiler_DEFAULT' 562 563# A function that is used when there is no print builtin or printf. 564func_fallback_echo () 565{ 566 eval 'cat <<_LTECHO_EOF 567\$[]1 568_LTECHO_EOF' 569} 570 571# Quote evaled strings. 572for var in lt_decl_all_varnames([[ \ 573]], lt_decl_quote_varnames); do 574 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575 *[[\\\\\\\`\\"\\\$]]*) 576 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577 ;; 578 *) 579 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580 ;; 581 esac 582done 583 584# Double-quote double-evaled strings. 585for var in lt_decl_all_varnames([[ \ 586]], lt_decl_dquote_varnames); do 587 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588 *[[\\\\\\\`\\"\\\$]]*) 589 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590 ;; 591 *) 592 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593 ;; 594 esac 595done 596 597_LT_OUTPUT_LIBTOOL_INIT 598]) 599 600# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601# ------------------------------------ 602# Generate a child script FILE with all initialization necessary to 603# reuse the environment learned by the parent script, and make the 604# file executable. If COMMENT is supplied, it is inserted after the 605# '#!' sequence but before initialization text begins. After this 606# macro, additional text can be appended to FILE to form the body of 607# the child script. The macro ends with non-zero status if the 608# file could not be fully written (such as if the disk is full). 609m4_ifdef([AS_INIT_GENERATED], 610[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611[m4_defun([_LT_GENERATED_FILE_INIT], 612[m4_require([AS_PREPARE])]dnl 613[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614[lt_write_fail=0 615cat >$1 <<_ASEOF || lt_write_fail=1 616#! $SHELL 617# Generated by $as_me. 618$2 619SHELL=\${CONFIG_SHELL-$SHELL} 620export SHELL 621_ASEOF 622cat >>$1 <<\_ASEOF || lt_write_fail=1 623AS_SHELL_SANITIZE 624_AS_PREPARE 625exec AS_MESSAGE_FD>&1 626_ASEOF 627test 0 = "$lt_write_fail" && chmod +x $1[]dnl 628m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629 630# LT_OUTPUT 631# --------- 632# This macro allows early generation of the libtool script (before 633# AC_OUTPUT is called), incase it is used in configure for compilation 634# tests. 635AC_DEFUN([LT_OUTPUT], 636[: ${CONFIG_LT=./config.lt} 637AC_MSG_NOTICE([creating $CONFIG_LT]) 638_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639[# Run this file to recreate a libtool stub with the current configuration.]) 640 641cat >>"$CONFIG_LT" <<\_LTEOF 642lt_cl_silent=false 643exec AS_MESSAGE_LOG_FD>>config.log 644{ 645 echo 646 AS_BOX([Running $as_me.]) 647} >&AS_MESSAGE_LOG_FD 648 649lt_cl_help="\ 650'$as_me' creates a local libtool stub from the current configuration, 651for use in further configure time tests before the real libtool is 652generated. 653 654Usage: $[0] [[OPTIONS]] 655 656 -h, --help print this help, then exit 657 -V, --version print version number, then exit 658 -q, --quiet do not print progress messages 659 -d, --debug don't remove temporary files 660 661Report bugs to <bug-libtool@gnu.org>." 662 663lt_cl_version="\ 664m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666configured by $[0], generated by m4_PACKAGE_STRING. 667 668Copyright (C) 2011 Free Software Foundation, Inc. 669This config.lt script is free software; the Free Software Foundation 670gives unlimited permision to copy, distribute and modify it." 671 672while test 0 != $[#] 673do 674 case $[1] in 675 --version | --v* | -V ) 676 echo "$lt_cl_version"; exit 0 ;; 677 --help | --h* | -h ) 678 echo "$lt_cl_help"; exit 0 ;; 679 --debug | --d* | -d ) 680 debug=: ;; 681 --quiet | --q* | --silent | --s* | -q ) 682 lt_cl_silent=: ;; 683 684 -*) AC_MSG_ERROR([unrecognized option: $[1] 685Try '$[0] --help' for more information.]) ;; 686 687 *) AC_MSG_ERROR([unrecognized argument: $[1] 688Try '$[0] --help' for more information.]) ;; 689 esac 690 shift 691done 692 693if $lt_cl_silent; then 694 exec AS_MESSAGE_FD>/dev/null 695fi 696_LTEOF 697 698cat >>"$CONFIG_LT" <<_LTEOF 699_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700_LTEOF 701 702cat >>"$CONFIG_LT" <<\_LTEOF 703AC_MSG_NOTICE([creating $ofile]) 704_LT_OUTPUT_LIBTOOL_COMMANDS 705AS_EXIT(0) 706_LTEOF 707chmod +x "$CONFIG_LT" 708 709# configure is writing to config.log, but config.lt does its own redirection, 710# appending to config.log, which fails on DOS, as config.log is still kept 711# open by configure. Here we exec the FD to /dev/null, effectively closing 712# config.log, so it can be properly (re)opened and appended to by config.lt. 713lt_cl_success=: 714test yes = "$silent" && 715 lt_config_lt_args="$lt_config_lt_args --quiet" 716exec AS_MESSAGE_LOG_FD>/dev/null 717$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718exec AS_MESSAGE_LOG_FD>>config.log 719$lt_cl_success || AS_EXIT(1) 720])# LT_OUTPUT 721 722 723# _LT_CONFIG(TAG) 724# --------------- 725# If TAG is the built-in tag, create an initial libtool script with a 726# default configuration from the untagged config vars. Otherwise add code 727# to config.status for appending the configuration named by TAG from the 728# matching tagged config vars. 729m4_defun([_LT_CONFIG], 730[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731_LT_CONFIG_SAVE_COMMANDS([ 732 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733 m4_if(_LT_TAG, [C], [ 734 # See if we are running on zsh, and set the options that allow our 735 # commands through without removal of \ escapes. 736 if test -n "${ZSH_VERSION+set}"; then 737 setopt NO_GLOB_SUBST 738 fi 739 740 cfgfile=${ofile}T 741 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742 $RM "$cfgfile" 743 744 cat <<_LT_EOF >> "$cfgfile" 745#! $SHELL 746# Generated automatically by $as_me ($PACKAGE) $VERSION 747# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749 750# Provide generalized library-building support services. 751# Written by Gordon Matzigkeit, 1996 752 753_LT_COPYING 754_LT_LIBTOOL_TAGS 755 756# Configured defaults for sys_lib_dlsearch_path munging. 757: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758 759# ### BEGIN LIBTOOL CONFIG 760_LT_LIBTOOL_CONFIG_VARS 761_LT_LIBTOOL_TAG_VARS 762# ### END LIBTOOL CONFIG 763 764_LT_EOF 765 766 cat <<'_LT_EOF' >> "$cfgfile" 767 768# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769 770_LT_PREPARE_MUNGE_PATH_LIST 771_LT_PREPARE_CC_BASENAME 772 773# ### END FUNCTIONS SHARED WITH CONFIGURE 774 775_LT_EOF 776 777 case $host_os in 778 aix3*) 779 cat <<\_LT_EOF >> "$cfgfile" 780# AIX sometimes has problems with the GCC collect2 program. For some 781# reason, if we set the COLLECT_NAMES environment variable, the problems 782# vanish in a puff of smoke. 783if test set != "${COLLECT_NAMES+set}"; then 784 COLLECT_NAMES= 785 export COLLECT_NAMES 786fi 787_LT_EOF 788 ;; 789 esac 790 791 _LT_PROG_LTMAIN 792 793 # We use sed instead of cat because bash on DJGPP gets confused if 794 # if finds mixed CR/LF and LF-only lines. Since sed operates in 795 # text mode, it properly converts lines to CR/LF. This bash problem 796 # is reportedly fixed, but why not run on old versions too? 797 sed '$q' "$ltmain" >> "$cfgfile" \ 798 || (rm -f "$cfgfile"; exit 1) 799 800 mv -f "$cfgfile" "$ofile" || 801 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802 chmod +x "$ofile" 803], 804[cat <<_LT_EOF >> "$ofile" 805 806dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807dnl in a comment (ie after a #). 808# ### BEGIN LIBTOOL TAG CONFIG: $1 809_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810# ### END LIBTOOL TAG CONFIG: $1 811_LT_EOF 812])dnl /m4_if 813], 814[m4_if([$1], [], [ 815 PACKAGE='$PACKAGE' 816 VERSION='$VERSION' 817 RM='$RM' 818 ofile='$ofile'], []) 819])dnl /_LT_CONFIG_SAVE_COMMANDS 820])# _LT_CONFIG 821 822 823# LT_SUPPORTED_TAG(TAG) 824# --------------------- 825# Trace this macro to discover what tags are supported by the libtool 826# --tag option, using: 827# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828AC_DEFUN([LT_SUPPORTED_TAG], []) 829 830 831# C support is built-in for now 832m4_define([_LT_LANG_C_enabled], []) 833m4_define([_LT_TAGS], []) 834 835 836# LT_LANG(LANG) 837# ------------- 838# Enable libtool support for the given language if not already enabled. 839AC_DEFUN([LT_LANG], 840[AC_BEFORE([$0], [LT_OUTPUT])dnl 841m4_case([$1], 842 [C], [_LT_LANG(C)], 843 [C++], [_LT_LANG(CXX)], 844 [Go], [_LT_LANG(GO)], 845 [Java], [_LT_LANG(GCJ)], 846 [Fortran 77], [_LT_LANG(F77)], 847 [Fortran], [_LT_LANG(FC)], 848 [Windows Resource], [_LT_LANG(RC)], 849 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850 [_LT_LANG($1)], 851 [m4_fatal([$0: unsupported language: "$1"])])])dnl 852])# LT_LANG 853 854 855# _LT_LANG(LANGNAME) 856# ------------------ 857m4_defun([_LT_LANG], 858[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859 [LT_SUPPORTED_TAG([$1])dnl 860 m4_append([_LT_TAGS], [$1 ])dnl 861 m4_define([_LT_LANG_]$1[_enabled], [])dnl 862 _LT_LANG_$1_CONFIG($1)])dnl 863])# _LT_LANG 864 865 866m4_ifndef([AC_PROG_GO], [ 867# NOTE: This macro has been submitted for inclusion into # 868# GNU Autoconf as AC_PROG_GO. When it is available in # 869# a released version of Autoconf we should remove this # 870# macro and use it instead. # 871m4_defun([AC_PROG_GO], 872[AC_LANG_PUSH(Go)dnl 873AC_ARG_VAR([GOC], [Go compiler command])dnl 874AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875_AC_ARG_VAR_LDFLAGS()dnl 876AC_CHECK_TOOL(GOC, gccgo) 877if test -z "$GOC"; then 878 if test -n "$ac_tool_prefix"; then 879 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880 fi 881fi 882if test -z "$GOC"; then 883 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884fi 885])#m4_defun 886])#m4_ifndef 887 888 889# _LT_LANG_DEFAULT_CONFIG 890# ----------------------- 891m4_defun([_LT_LANG_DEFAULT_CONFIG], 892[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893 [LT_LANG(CXX)], 894 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895 896AC_PROVIDE_IFELSE([AC_PROG_F77], 897 [LT_LANG(F77)], 898 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899 900AC_PROVIDE_IFELSE([AC_PROG_FC], 901 [LT_LANG(FC)], 902 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903 904dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905dnl pulling things in needlessly. 906AC_PROVIDE_IFELSE([AC_PROG_GCJ], 907 [LT_LANG(GCJ)], 908 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909 [LT_LANG(GCJ)], 910 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911 [LT_LANG(GCJ)], 912 [m4_ifdef([AC_PROG_GCJ], 913 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914 m4_ifdef([A][M_PROG_GCJ], 915 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916 m4_ifdef([LT_PROG_GCJ], 917 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918 919AC_PROVIDE_IFELSE([AC_PROG_GO], 920 [LT_LANG(GO)], 921 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922 923AC_PROVIDE_IFELSE([LT_PROG_RC], 924 [LT_LANG(RC)], 925 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926])# _LT_LANG_DEFAULT_CONFIG 927 928# Obsolete macros: 929AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934dnl aclocal-1.4 backwards compatibility: 935dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936dnl AC_DEFUN([AC_LIBTOOL_F77], []) 937dnl AC_DEFUN([AC_LIBTOOL_FC], []) 938dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939dnl AC_DEFUN([AC_LIBTOOL_RC], []) 940 941 942# _LT_TAG_COMPILER 943# ---------------- 944m4_defun([_LT_TAG_COMPILER], 945[AC_REQUIRE([AC_PROG_CC])dnl 946 947_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951 952# If no C compiler was specified, use CC. 953LTCC=${LTCC-"$CC"} 954 955# If no C compiler flags were specified, use CFLAGS. 956LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957 958# Allow CC to be a program name with arguments. 959compiler=$CC 960])# _LT_TAG_COMPILER 961 962 963# _LT_COMPILER_BOILERPLATE 964# ------------------------ 965# Check for compiler boilerplate output or warnings with 966# the simple compiler test code. 967m4_defun([_LT_COMPILER_BOILERPLATE], 968[m4_require([_LT_DECL_SED])dnl 969ac_outfile=conftest.$ac_objext 970echo "$lt_simple_compile_test_code" >conftest.$ac_ext 971eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972_lt_compiler_boilerplate=`cat conftest.err` 973$RM conftest* 974])# _LT_COMPILER_BOILERPLATE 975 976 977# _LT_LINKER_BOILERPLATE 978# ---------------------- 979# Check for linker boilerplate output or warnings with 980# the simple link test code. 981m4_defun([_LT_LINKER_BOILERPLATE], 982[m4_require([_LT_DECL_SED])dnl 983ac_outfile=conftest.$ac_objext 984echo "$lt_simple_link_test_code" >conftest.$ac_ext 985eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986_lt_linker_boilerplate=`cat conftest.err` 987$RM -r conftest* 988])# _LT_LINKER_BOILERPLATE 989 990# _LT_REQUIRED_DARWIN_CHECKS 991# ------------------------- 992m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993 case $host_os in 994 rhapsody* | darwin*) 995 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997 AC_CHECK_TOOL([LIPO], [lipo], [:]) 998 AC_CHECK_TOOL([OTOOL], [otool], [:]) 999 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000 _LT_DECL([], [DSYMUTIL], [1], 1001 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002 _LT_DECL([], [NMEDIT], [1], 1003 [Tool to change global to local symbols on Mac OS X]) 1004 _LT_DECL([], [LIPO], [1], 1005 [Tool to manipulate fat objects and archives on Mac OS X]) 1006 _LT_DECL([], [OTOOL], [1], 1007 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008 _LT_DECL([], [OTOOL64], [1], 1009 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010 1011 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012 [lt_cv_apple_cc_single_mod=no 1013 if test -z "$LT_MULTI_MODULE"; then 1014 # By default we will add the -single_module flag. You can override 1015 # by either setting the environment variable LT_MULTI_MODULE 1016 # non-empty at configure time, or by adding -multi_module to the 1017 # link flags. 1018 rm -rf libconftest.dylib* 1019 echo "int foo(void){return 1;}" > conftest.c 1020 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024 _lt_result=$? 1025 # If there is a non-empty error log, and "single_module" 1026 # appears in it, assume the flag caused a linker warning 1027 if test -s conftest.err && $GREP single_module conftest.err; then 1028 cat conftest.err >&AS_MESSAGE_LOG_FD 1029 # Otherwise, if the output was created with a 0 exit code from 1030 # the compiler, it worked. 1031 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032 lt_cv_apple_cc_single_mod=yes 1033 else 1034 cat conftest.err >&AS_MESSAGE_LOG_FD 1035 fi 1036 rm -rf libconftest.dylib* 1037 rm -f conftest.* 1038 fi]) 1039 1040 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041 [lt_cv_ld_exported_symbols_list], 1042 [lt_cv_ld_exported_symbols_list=no 1043 save_LDFLAGS=$LDFLAGS 1044 echo "_main" > conftest.sym 1045 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047 [lt_cv_ld_exported_symbols_list=yes], 1048 [lt_cv_ld_exported_symbols_list=no]) 1049 LDFLAGS=$save_LDFLAGS 1050 ]) 1051 1052 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053 [lt_cv_ld_force_load=no 1054 cat > conftest.c << _LT_EOF 1055int forced_loaded() { return 2;} 1056_LT_EOF 1057 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063 cat > conftest.c << _LT_EOF 1064int main() { return 0;} 1065_LT_EOF 1066 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068 _lt_result=$? 1069 if test -s conftest.err && $GREP force_load conftest.err; then 1070 cat conftest.err >&AS_MESSAGE_LOG_FD 1071 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072 lt_cv_ld_force_load=yes 1073 else 1074 cat conftest.err >&AS_MESSAGE_LOG_FD 1075 fi 1076 rm -f conftest.err libconftest.a conftest conftest.c 1077 rm -rf conftest.dSYM 1078 ]) 1079 case $host_os in 1080 rhapsody* | darwin1.[[012]]) 1081 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082 darwin1.*) 1083 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084 darwin*) # darwin 5.x on 1085 # if running on 10.5 or later, the deployment target defaults 1086 # to the OS version, if on x86, and 10.4, the deployment 1087 # target defaults to 10.4. Don't you love it? 1088 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091 10.[[012]][[,.]]*) 1092 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093 10.*) 1094 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095 esac 1096 ;; 1097 esac 1098 if test yes = "$lt_cv_apple_cc_single_mod"; then 1099 _lt_dar_single_mod='$single_module' 1100 fi 1101 if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103 else 1104 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105 fi 1106 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107 _lt_dsymutil='~$DSYMUTIL $lib || :' 1108 else 1109 _lt_dsymutil= 1110 fi 1111 ;; 1112 esac 1113]) 1114 1115 1116# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117# --------------------------------- 1118# Checks for linker and compiler features on darwin 1119m4_defun([_LT_DARWIN_LINKER_FEATURES], 1120[ 1121 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123 _LT_TAGVAR(hardcode_direct, $1)=no 1124 _LT_TAGVAR(hardcode_automatic, $1)=yes 1125 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126 if test yes = "$lt_cv_ld_force_load"; then 1127 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 1128 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130 else 1131 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132 fi 1133 _LT_TAGVAR(link_all_deplibs, $1)=yes 1134 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135 case $cc_basename in 1136 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137 *) _lt_dar_can_shared=$GCC ;; 1138 esac 1139 if test yes = "$_lt_dar_can_shared"; then 1140 output_verbose_link_cmd=func_echo_all 1141 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 1142 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" 1144 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" 1145 m4_if([$1], [CXX], 1146[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" 1148 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" 1149 fi 1150],[]) 1151 else 1152 _LT_TAGVAR(ld_shlibs, $1)=no 1153 fi 1154]) 1155 1156# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157# ---------------------------------- 1158# Links a minimal program and checks the executable 1159# for the system default hardcoded library path. In most cases, 1160# this is /usr/lib:/lib, but when the MPI compilers are used 1161# the location of the communication and MPI libs are included too. 1162# If we don't find anything, use the default library path according 1163# to the aix ld manual. 1164# Store the results from the different compilers for each TAGNAME. 1165# Allow to override them for all tags through lt_cv_aix_libpath. 1166m4_defun([_LT_SYS_MODULE_PATH_AIX], 1167[m4_require([_LT_DECL_SED])dnl 1168if test set = "${lt_cv_aix_libpath+set}"; then 1169 aix_libpath=$lt_cv_aix_libpath 1170else 1171 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173 lt_aix_libpath_sed='[ 1174 /Import File Strings/,/^$/ { 1175 /^0/ { 1176 s/^0 *\([^ ]*\) *$/\1/ 1177 p 1178 } 1179 }]' 1180 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181 # Check for a 64-bit object if we didn't find anything. 1182 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184 fi],[]) 1185 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187 fi 1188 ]) 1189 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190fi 1191])# _LT_SYS_MODULE_PATH_AIX 1192 1193 1194# _LT_SHELL_INIT(ARG) 1195# ------------------- 1196m4_define([_LT_SHELL_INIT], 1197[m4_divert_text([M4SH-INIT], [$1 1198])])# _LT_SHELL_INIT 1199 1200 1201 1202# _LT_PROG_ECHO_BACKSLASH 1203# ----------------------- 1204# Find how we can fake an echo command that does not interpret backslash. 1205# In particular, with Autoconf 2.60 or later we add some code to the start 1206# of the generated configure script that will find a shell with a builtin 1207# printf (that we can use as an echo command). 1208m4_defun([_LT_PROG_ECHO_BACKSLASH], 1209[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212 1213AC_MSG_CHECKING([how to print strings]) 1214# Test print first, because it will be a builtin if present. 1215if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217 ECHO='print -r --' 1218elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219 ECHO='printf %s\n' 1220else 1221 # Use this function as a fallback that always works. 1222 func_fallback_echo () 1223 { 1224 eval 'cat <<_LTECHO_EOF 1225$[]1 1226_LTECHO_EOF' 1227 } 1228 ECHO='func_fallback_echo' 1229fi 1230 1231# func_echo_all arg... 1232# Invoke $ECHO with all args, space-separated. 1233func_echo_all () 1234{ 1235 $ECHO "$*" 1236} 1237 1238case $ECHO in 1239 printf*) AC_MSG_RESULT([printf]) ;; 1240 print*) AC_MSG_RESULT([print -r]) ;; 1241 *) AC_MSG_RESULT([cat]) ;; 1242esac 1243 1244m4_ifdef([_AS_DETECT_SUGGESTED], 1245[_AS_DETECT_SUGGESTED([ 1246 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250 PATH=/empty FPATH=/empty; export PATH FPATH 1251 test "X`printf %s $ECHO`" = "X$ECHO" \ 1252 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253 1254_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256])# _LT_PROG_ECHO_BACKSLASH 1257 1258 1259# _LT_WITH_SYSROOT 1260# ---------------- 1261AC_DEFUN([_LT_WITH_SYSROOT], 1262[AC_MSG_CHECKING([for sysroot]) 1263AC_ARG_WITH([sysroot], 1264[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265 [Search for dependent libraries within DIR (or the compiler's sysroot 1266 if not specified).])], 1267[], [with_sysroot=no]) 1268 1269dnl lt_sysroot will always be passed unquoted. We quote it here 1270dnl in case the user passed a directory name. 1271lt_sysroot= 1272case $with_sysroot in #( 1273 yes) 1274 if test yes = "$GCC"; then 1275 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276 fi 1277 ;; #( 1278 /*) 1279 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280 ;; #( 1281 no|'') 1282 ;; #( 1283 *) 1284 AC_MSG_RESULT([$with_sysroot]) 1285 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286 ;; 1287esac 1288 1289 AC_MSG_RESULT([${lt_sysroot:-no}]) 1290_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291[dependent libraries, and where our libraries should be installed.])]) 1292 1293# _LT_ENABLE_LOCK 1294# --------------- 1295m4_defun([_LT_ENABLE_LOCK], 1296[AC_ARG_ENABLE([libtool-lock], 1297 [AS_HELP_STRING([--disable-libtool-lock], 1298 [avoid locking (might break parallel builds)])]) 1299test no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300 1301# Some flags need to be propagated to the compiler or linker for good 1302# libtool support. 1303case $host in 1304ia64-*-hpux*) 1305 # Find out what ABI is being produced by ac_compile, and set mode 1306 # options accordingly. 1307 echo 'int i;' > conftest.$ac_ext 1308 if AC_TRY_EVAL(ac_compile); then 1309 case `/usr/bin/file conftest.$ac_objext` in 1310 *ELF-32*) 1311 HPUX_IA64_MODE=32 1312 ;; 1313 *ELF-64*) 1314 HPUX_IA64_MODE=64 1315 ;; 1316 esac 1317 fi 1318 rm -rf conftest* 1319 ;; 1320*-*-irix6*) 1321 # Find out what ABI is being produced by ac_compile, and set linker 1322 # options accordingly. 1323 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324 if AC_TRY_EVAL(ac_compile); then 1325 if test yes = "$lt_cv_prog_gnu_ld"; then 1326 case `/usr/bin/file conftest.$ac_objext` in 1327 *32-bit*) 1328 LD="${LD-ld} -melf32bsmip" 1329 ;; 1330 *N32*) 1331 LD="${LD-ld} -melf32bmipn32" 1332 ;; 1333 *64-bit*) 1334 LD="${LD-ld} -melf64bmip" 1335 ;; 1336 esac 1337 else 1338 case `/usr/bin/file conftest.$ac_objext` in 1339 *32-bit*) 1340 LD="${LD-ld} -32" 1341 ;; 1342 *N32*) 1343 LD="${LD-ld} -n32" 1344 ;; 1345 *64-bit*) 1346 LD="${LD-ld} -64" 1347 ;; 1348 esac 1349 fi 1350 fi 1351 rm -rf conftest* 1352 ;; 1353 1354mips64*-*linux*) 1355 # Find out what ABI is being produced by ac_compile, and set linker 1356 # options accordingly. 1357 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358 if AC_TRY_EVAL(ac_compile); then 1359 emul=elf 1360 case `/usr/bin/file conftest.$ac_objext` in 1361 *32-bit*) 1362 emul="${emul}32" 1363 ;; 1364 *64-bit*) 1365 emul="${emul}64" 1366 ;; 1367 esac 1368 case `/usr/bin/file conftest.$ac_objext` in 1369 *MSB*) 1370 emul="${emul}btsmip" 1371 ;; 1372 *LSB*) 1373 emul="${emul}ltsmip" 1374 ;; 1375 esac 1376 case `/usr/bin/file conftest.$ac_objext` in 1377 *N32*) 1378 emul="${emul}n32" 1379 ;; 1380 esac 1381 LD="${LD-ld} -m $emul" 1382 fi 1383 rm -rf conftest* 1384 ;; 1385 1386x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388 # Find out what ABI is being produced by ac_compile, and set linker 1389 # options accordingly. Note that the listed cases only cover the 1390 # situations where additional linker options are needed (such as when 1391 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392 # vice versa); the common cases where no linker options are needed do 1393 # not appear in the list. 1394 echo 'int i;' > conftest.$ac_ext 1395 if AC_TRY_EVAL(ac_compile); then 1396 case `/usr/bin/file conftest.o` in 1397 *32-bit*) 1398 case $host in 1399 x86_64-*kfreebsd*-gnu) 1400 LD="${LD-ld} -m elf_i386_fbsd" 1401 ;; 1402 x86_64-*linux*) 1403 case `/usr/bin/file conftest.o` in 1404 *x86-64*) 1405 LD="${LD-ld} -m elf32_x86_64" 1406 ;; 1407 *) 1408 LD="${LD-ld} -m elf_i386" 1409 ;; 1410 esac 1411 ;; 1412 powerpc64le-*linux*) 1413 LD="${LD-ld} -m elf32lppclinux" 1414 ;; 1415 powerpc64-*linux*) 1416 LD="${LD-ld} -m elf32ppclinux" 1417 ;; 1418 s390x-*linux*) 1419 LD="${LD-ld} -m elf_s390" 1420 ;; 1421 sparc64-*linux*) 1422 LD="${LD-ld} -m elf32_sparc" 1423 ;; 1424 esac 1425 ;; 1426 *64-bit*) 1427 case $host in 1428 x86_64-*kfreebsd*-gnu) 1429 LD="${LD-ld} -m elf_x86_64_fbsd" 1430 ;; 1431 x86_64-*linux*) 1432 LD="${LD-ld} -m elf_x86_64" 1433 ;; 1434 powerpcle-*linux*) 1435 LD="${LD-ld} -m elf64lppc" 1436 ;; 1437 powerpc-*linux*) 1438 LD="${LD-ld} -m elf64ppc" 1439 ;; 1440 s390*-*linux*|s390*-*tpf*) 1441 LD="${LD-ld} -m elf64_s390" 1442 ;; 1443 sparc*-*linux*) 1444 LD="${LD-ld} -m elf64_sparc" 1445 ;; 1446 esac 1447 ;; 1448 esac 1449 fi 1450 rm -rf conftest* 1451 ;; 1452 1453*-*-sco3.2v5*) 1454 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455 SAVE_CFLAGS=$CFLAGS 1456 CFLAGS="$CFLAGS -belf" 1457 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458 [AC_LANG_PUSH(C) 1459 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460 AC_LANG_POP]) 1461 if test yes != "$lt_cv_cc_needs_belf"; then 1462 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463 CFLAGS=$SAVE_CFLAGS 1464 fi 1465 ;; 1466*-*solaris*) 1467 # Find out what ABI is being produced by ac_compile, and set linker 1468 # options accordingly. 1469 echo 'int i;' > conftest.$ac_ext 1470 if AC_TRY_EVAL(ac_compile); then 1471 case `/usr/bin/file conftest.o` in 1472 *64-bit*) 1473 case $lt_cv_prog_gnu_ld in 1474 yes*) 1475 case $host in 1476 i?86-*-solaris*|x86_64-*-solaris*) 1477 LD="${LD-ld} -m elf_x86_64" 1478 ;; 1479 sparc*-*-solaris*) 1480 LD="${LD-ld} -m elf64_sparc" 1481 ;; 1482 esac 1483 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485 LD=${LD-ld}_sol2 1486 fi 1487 ;; 1488 *) 1489 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490 LD="${LD-ld} -64" 1491 fi 1492 ;; 1493 esac 1494 ;; 1495 esac 1496 fi 1497 rm -rf conftest* 1498 ;; 1499esac 1500 1501need_locks=$enable_libtool_lock 1502])# _LT_ENABLE_LOCK 1503 1504 1505# _LT_PROG_AR 1506# ----------- 1507m4_defun([_LT_PROG_AR], 1508[AC_CHECK_TOOLS(AR, [ar], false) 1509: ${AR=ar} 1510: ${AR_FLAGS=cru} 1511_LT_DECL([], [AR], [1], [The archiver]) 1512_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513 1514AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515 [lt_cv_ar_at_file=no 1516 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517 [echo conftest.$ac_objext > conftest.lst 1518 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519 AC_TRY_EVAL([lt_ar_try]) 1520 if test 0 -eq "$ac_status"; then 1521 # Ensure the archiver fails upon bogus file names. 1522 rm -f conftest.$ac_objext libconftest.a 1523 AC_TRY_EVAL([lt_ar_try]) 1524 if test 0 -ne "$ac_status"; then 1525 lt_cv_ar_at_file=@ 1526 fi 1527 fi 1528 rm -f conftest.* libconftest.a 1529 ]) 1530 ]) 1531 1532if test no = "$lt_cv_ar_at_file"; then 1533 archiver_list_spec= 1534else 1535 archiver_list_spec=$lt_cv_ar_at_file 1536fi 1537_LT_DECL([], [archiver_list_spec], [1], 1538 [How to feed a file listing to the archiver]) 1539])# _LT_PROG_AR 1540 1541 1542# _LT_CMD_OLD_ARCHIVE 1543# ------------------- 1544m4_defun([_LT_CMD_OLD_ARCHIVE], 1545[_LT_PROG_AR 1546 1547AC_CHECK_TOOL(STRIP, strip, :) 1548test -z "$STRIP" && STRIP=: 1549_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550 1551AC_CHECK_TOOL(RANLIB, ranlib, :) 1552test -z "$RANLIB" && RANLIB=: 1553_LT_DECL([], [RANLIB], [1], 1554 [Commands used to install an old-style archive]) 1555 1556# Determine commands to create old-style static archives. 1557old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558old_postinstall_cmds='chmod 644 $oldlib' 1559old_postuninstall_cmds= 1560 1561if test -n "$RANLIB"; then 1562 case $host_os in 1563 bitrig* | openbsd*) 1564 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565 ;; 1566 *) 1567 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568 ;; 1569 esac 1570 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571fi 1572 1573case $host_os in 1574 darwin*) 1575 lock_old_archive_extraction=yes ;; 1576 *) 1577 lock_old_archive_extraction=no ;; 1578esac 1579_LT_DECL([], [old_postinstall_cmds], [2]) 1580_LT_DECL([], [old_postuninstall_cmds], [2]) 1581_LT_TAGDECL([], [old_archive_cmds], [2], 1582 [Commands used to build an old-style archive]) 1583_LT_DECL([], [lock_old_archive_extraction], [0], 1584 [Whether to use a lock for old archive extraction]) 1585])# _LT_CMD_OLD_ARCHIVE 1586 1587 1588# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590# ---------------------------------------------------------------- 1591# Check whether the given compiler option works 1592AC_DEFUN([_LT_COMPILER_OPTION], 1593[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594m4_require([_LT_DECL_SED])dnl 1595AC_CACHE_CHECK([$1], [$2], 1596 [$2=no 1597 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600 # Insert the option either (1) after the last *FLAGS variable, or 1601 # (2) before a word containing "conftest.", or (3) at the end. 1602 # Note that $ac_compile itself does not contain backslashes and begins 1603 # with a dollar sign (not a hyphen), so the echo should work correctly. 1604 # The option is referenced via a variable to avoid confusing sed. 1605 lt_compile=`echo "$ac_compile" | $SED \ 1606 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608 -e 's:$: $lt_compiler_flag:'` 1609 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610 (eval "$lt_compile" 2>conftest.err) 1611 ac_status=$? 1612 cat conftest.err >&AS_MESSAGE_LOG_FD 1613 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614 if (exit $ac_status) && test -s "$ac_outfile"; then 1615 # The compiler can only warn and ignore the option if not recognized 1616 # So say no if there are warnings other than the usual output. 1617 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620 $2=yes 1621 fi 1622 fi 1623 $RM conftest* 1624]) 1625 1626if test yes = "[$]$2"; then 1627 m4_if([$5], , :, [$5]) 1628else 1629 m4_if([$6], , :, [$6]) 1630fi 1631])# _LT_COMPILER_OPTION 1632 1633# Old name: 1634AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635dnl aclocal-1.4 backwards compatibility: 1636dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637 1638 1639# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641# ---------------------------------------------------- 1642# Check whether the given linker option works 1643AC_DEFUN([_LT_LINKER_OPTION], 1644[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645m4_require([_LT_DECL_SED])dnl 1646AC_CACHE_CHECK([$1], [$2], 1647 [$2=no 1648 save_LDFLAGS=$LDFLAGS 1649 LDFLAGS="$LDFLAGS $3" 1650 echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652 # The linker can only warn and ignore the option if not recognized 1653 # So say no if there are warnings 1654 if test -s conftest.err; then 1655 # Append any errors to the config.log. 1656 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659 if diff conftest.exp conftest.er2 >/dev/null; then 1660 $2=yes 1661 fi 1662 else 1663 $2=yes 1664 fi 1665 fi 1666 $RM -r conftest* 1667 LDFLAGS=$save_LDFLAGS 1668]) 1669 1670if test yes = "[$]$2"; then 1671 m4_if([$4], , :, [$4]) 1672else 1673 m4_if([$5], , :, [$5]) 1674fi 1675])# _LT_LINKER_OPTION 1676 1677# Old name: 1678AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679dnl aclocal-1.4 backwards compatibility: 1680dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681 1682 1683# LT_CMD_MAX_LEN 1684#--------------- 1685AC_DEFUN([LT_CMD_MAX_LEN], 1686[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687# find the maximum length of command line arguments 1688AC_MSG_CHECKING([the maximum length of command line arguments]) 1689AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690 i=0 1691 teststring=ABCD 1692 1693 case $build_os in 1694 msdosdjgpp*) 1695 # On DJGPP, this test can blow up pretty badly due to problems in libc 1696 # (any single argument exceeding 2000 bytes causes a buffer overrun 1697 # during glob expansion). Even if it were fixed, the result of this 1698 # check would be larger than it should be. 1699 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700 ;; 1701 1702 gnu*) 1703 # Under GNU Hurd, this test is not required because there is 1704 # no limit to the length of command line arguments. 1705 # Libtool will interpret -1 as no limit whatsoever 1706 lt_cv_sys_max_cmd_len=-1; 1707 ;; 1708 1709 cygwin* | mingw* | cegcc*) 1710 # On Win9x/ME, this test blows up -- it succeeds, but takes 1711 # about 5 minutes as the teststring grows exponentially. 1712 # Worse, since 9x/ME are not pre-emptively multitasking, 1713 # you end up with a "frozen" computer, even though with patience 1714 # the test eventually succeeds (with a max line length of 256k). 1715 # Instead, let's just punt: use the minimum linelength reported by 1716 # all of the supported platforms: 8192 (on NT/2K/XP). 1717 lt_cv_sys_max_cmd_len=8192; 1718 ;; 1719 1720 mint*) 1721 # On MiNT this can take a long time and run out of memory. 1722 lt_cv_sys_max_cmd_len=8192; 1723 ;; 1724 1725 amigaos*) 1726 # On AmigaOS with pdksh, this test takes hours, literally. 1727 # So we just punt and use a minimum line length of 8192. 1728 lt_cv_sys_max_cmd_len=8192; 1729 ;; 1730 1731 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732 # This has been around since 386BSD, at least. Likely further. 1733 if test -x /sbin/sysctl; then 1734 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735 elif test -x /usr/sbin/sysctl; then 1736 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737 else 1738 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739 fi 1740 # And add a safety zone 1741 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743 ;; 1744 1745 interix*) 1746 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747 lt_cv_sys_max_cmd_len=196608 1748 ;; 1749 1750 os2*) 1751 # The test takes a long time on OS/2. 1752 lt_cv_sys_max_cmd_len=8192 1753 ;; 1754 1755 osf*) 1756 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758 # nice to cause kernel panics so lets avoid the loop below. 1759 # First set a reasonable default. 1760 lt_cv_sys_max_cmd_len=16384 1761 # 1762 if test -x /sbin/sysconfig; then 1763 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765 esac 1766 fi 1767 ;; 1768 sco3.2v5*) 1769 lt_cv_sys_max_cmd_len=102400 1770 ;; 1771 sysv5* | sco5v6* | sysv4.2uw2*) 1772 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773 if test -n "$kargmax"; then 1774 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775 else 1776 lt_cv_sys_max_cmd_len=32768 1777 fi 1778 ;; 1779 *) 1780 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781 if test -n "$lt_cv_sys_max_cmd_len" && \ 1782 test undefined != "$lt_cv_sys_max_cmd_len"; then 1783 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785 else 1786 # Make teststring a little bigger before we do anything with it. 1787 # a 1K string should be a reasonable start. 1788 for i in 1 2 3 4 5 6 7 8; do 1789 teststring=$teststring$teststring 1790 done 1791 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792 # If test is not a shell built-in, we'll probably end up computing a 1793 # maximum length that is only half of the actual maximum length, but 1794 # we can't tell. 1795 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797 test 17 != "$i" # 1/2 MB should be enough 1798 do 1799 i=`expr $i + 1` 1800 teststring=$teststring$teststring 1801 done 1802 # Only check the string length outside the loop. 1803 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804 teststring= 1805 # Add a significant safety factor because C++ compilers can tack on 1806 # massive amounts of additional arguments before passing them to the 1807 # linker. It appears as though 1/2 is a usable value. 1808 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809 fi 1810 ;; 1811 esac 1812]) 1813if test -n "$lt_cv_sys_max_cmd_len"; then 1814 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815else 1816 AC_MSG_RESULT(none) 1817fi 1818max_cmd_len=$lt_cv_sys_max_cmd_len 1819_LT_DECL([], [max_cmd_len], [0], 1820 [What is the maximum length of a command?]) 1821])# LT_CMD_MAX_LEN 1822 1823# Old name: 1824AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825dnl aclocal-1.4 backwards compatibility: 1826dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827 1828 1829# _LT_HEADER_DLFCN 1830# ---------------- 1831m4_defun([_LT_HEADER_DLFCN], 1832[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833])# _LT_HEADER_DLFCN 1834 1835 1836# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838# ---------------------------------------------------------------- 1839m4_defun([_LT_TRY_DLOPEN_SELF], 1840[m4_require([_LT_HEADER_DLFCN])dnl 1841if test yes = "$cross_compiling"; then : 1842 [$4] 1843else 1844 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845 lt_status=$lt_dlunknown 1846 cat > conftest.$ac_ext <<_LT_EOF 1847[#line $LINENO "configure" 1848#include "confdefs.h" 1849 1850#if HAVE_DLFCN_H 1851#include <dlfcn.h> 1852#endif 1853 1854#include <stdio.h> 1855 1856#ifdef RTLD_GLOBAL 1857# define LT_DLGLOBAL RTLD_GLOBAL 1858#else 1859# ifdef DL_GLOBAL 1860# define LT_DLGLOBAL DL_GLOBAL 1861# else 1862# define LT_DLGLOBAL 0 1863# endif 1864#endif 1865 1866/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867 find out it does not work in some platform. */ 1868#ifndef LT_DLLAZY_OR_NOW 1869# ifdef RTLD_LAZY 1870# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871# else 1872# ifdef DL_LAZY 1873# define LT_DLLAZY_OR_NOW DL_LAZY 1874# else 1875# ifdef RTLD_NOW 1876# define LT_DLLAZY_OR_NOW RTLD_NOW 1877# else 1878# ifdef DL_NOW 1879# define LT_DLLAZY_OR_NOW DL_NOW 1880# else 1881# define LT_DLLAZY_OR_NOW 0 1882# endif 1883# endif 1884# endif 1885# endif 1886#endif 1887 1888/* When -fvisibility=hidden is used, assume the code has been annotated 1889 correspondingly for the symbols needed. */ 1890#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891int fnord () __attribute__((visibility("default"))); 1892#endif 1893 1894int fnord () { return 42; } 1895int main () 1896{ 1897 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898 int status = $lt_dlunknown; 1899 1900 if (self) 1901 { 1902 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903 else 1904 { 1905 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906 else puts (dlerror ()); 1907 } 1908 /* dlclose (self); */ 1909 } 1910 else 1911 puts (dlerror ()); 1912 1913 return status; 1914}] 1915_LT_EOF 1916 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918 lt_status=$? 1919 case x$lt_status in 1920 x$lt_dlno_uscore) $1 ;; 1921 x$lt_dlneed_uscore) $2 ;; 1922 x$lt_dlunknown|x*) $3 ;; 1923 esac 1924 else : 1925 # compilation failed 1926 $3 1927 fi 1928fi 1929rm -fr conftest* 1930])# _LT_TRY_DLOPEN_SELF 1931 1932 1933# LT_SYS_DLOPEN_SELF 1934# ------------------ 1935AC_DEFUN([LT_SYS_DLOPEN_SELF], 1936[m4_require([_LT_HEADER_DLFCN])dnl 1937if test yes != "$enable_dlopen"; then 1938 enable_dlopen=unknown 1939 enable_dlopen_self=unknown 1940 enable_dlopen_self_static=unknown 1941else 1942 lt_cv_dlopen=no 1943 lt_cv_dlopen_libs= 1944 1945 case $host_os in 1946 beos*) 1947 lt_cv_dlopen=load_add_on 1948 lt_cv_dlopen_libs= 1949 lt_cv_dlopen_self=yes 1950 ;; 1951 1952 mingw* | pw32* | cegcc*) 1953 lt_cv_dlopen=LoadLibrary 1954 lt_cv_dlopen_libs= 1955 ;; 1956 1957 cygwin*) 1958 lt_cv_dlopen=dlopen 1959 lt_cv_dlopen_libs= 1960 ;; 1961 1962 darwin*) 1963 # if libdl is installed we need to link against it 1964 AC_CHECK_LIB([dl], [dlopen], 1965 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966 lt_cv_dlopen=dyld 1967 lt_cv_dlopen_libs= 1968 lt_cv_dlopen_self=yes 1969 ]) 1970 ;; 1971 1972 tpf*) 1973 # Don't try to run any link tests for TPF. We know it's impossible 1974 # because TPF is a cross-compiler, and we know how we open DSOs. 1975 lt_cv_dlopen=dlopen 1976 lt_cv_dlopen_libs= 1977 lt_cv_dlopen_self=no 1978 ;; 1979 1980 *) 1981 AC_CHECK_FUNC([shl_load], 1982 [lt_cv_dlopen=shl_load], 1983 [AC_CHECK_LIB([dld], [shl_load], 1984 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985 [AC_CHECK_FUNC([dlopen], 1986 [lt_cv_dlopen=dlopen], 1987 [AC_CHECK_LIB([dl], [dlopen], 1988 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989 [AC_CHECK_LIB([svld], [dlopen], 1990 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991 [AC_CHECK_LIB([dld], [dld_link], 1992 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993 ]) 1994 ]) 1995 ]) 1996 ]) 1997 ]) 1998 ;; 1999 esac 2000 2001 if test no = "$lt_cv_dlopen"; then 2002 enable_dlopen=no 2003 else 2004 enable_dlopen=yes 2005 fi 2006 2007 case $lt_cv_dlopen in 2008 dlopen) 2009 save_CPPFLAGS=$CPPFLAGS 2010 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011 2012 save_LDFLAGS=$LDFLAGS 2013 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014 2015 save_LIBS=$LIBS 2016 LIBS="$lt_cv_dlopen_libs $LIBS" 2017 2018 AC_CACHE_CHECK([whether a program can dlopen itself], 2019 lt_cv_dlopen_self, [dnl 2020 _LT_TRY_DLOPEN_SELF( 2021 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023 ]) 2024 2025 if test yes = "$lt_cv_dlopen_self"; then 2026 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028 lt_cv_dlopen_self_static, [dnl 2029 _LT_TRY_DLOPEN_SELF( 2030 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032 ]) 2033 fi 2034 2035 CPPFLAGS=$save_CPPFLAGS 2036 LDFLAGS=$save_LDFLAGS 2037 LIBS=$save_LIBS 2038 ;; 2039 esac 2040 2041 case $lt_cv_dlopen_self in 2042 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043 *) enable_dlopen_self=unknown ;; 2044 esac 2045 2046 case $lt_cv_dlopen_self_static in 2047 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048 *) enable_dlopen_self_static=unknown ;; 2049 esac 2050fi 2051_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052 [Whether dlopen is supported]) 2053_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054 [Whether dlopen of programs is supported]) 2055_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056 [Whether dlopen of statically linked programs is supported]) 2057])# LT_SYS_DLOPEN_SELF 2058 2059# Old name: 2060AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061dnl aclocal-1.4 backwards compatibility: 2062dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063 2064 2065# _LT_COMPILER_C_O([TAGNAME]) 2066# --------------------------- 2067# Check to see if options -c and -o are simultaneously supported by compiler. 2068# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069m4_defun([_LT_COMPILER_C_O], 2070[m4_require([_LT_DECL_SED])dnl 2071m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072m4_require([_LT_TAG_COMPILER])dnl 2073AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076 $RM -r conftest 2>/dev/null 2077 mkdir conftest 2078 cd conftest 2079 mkdir out 2080 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081 2082 lt_compiler_flag="-o out/conftest2.$ac_objext" 2083 # Insert the option either (1) after the last *FLAGS variable, or 2084 # (2) before a word containing "conftest.", or (3) at the end. 2085 # Note that $ac_compile itself does not contain backslashes and begins 2086 # with a dollar sign (not a hyphen), so the echo should work correctly. 2087 lt_compile=`echo "$ac_compile" | $SED \ 2088 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090 -e 's:$: $lt_compiler_flag:'` 2091 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092 (eval "$lt_compile" 2>out/conftest.err) 2093 ac_status=$? 2094 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097 then 2098 # The compiler can only warn and ignore the option if not recognized 2099 # So say no if there are warnings 2100 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104 fi 2105 fi 2106 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107 $RM conftest* 2108 # SGI C++ compiler will create directory out/ii_files/ for 2109 # template instantiation 2110 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111 $RM out/* && rmdir out 2112 cd .. 2113 $RM -r conftest 2114 $RM conftest* 2115]) 2116_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117 [Does compiler simultaneously support -c and -o options?]) 2118])# _LT_COMPILER_C_O 2119 2120 2121# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122# ---------------------------------- 2123# Check to see if we can do hard links to lock some files if needed 2124m4_defun([_LT_COMPILER_FILE_LOCKS], 2125[m4_require([_LT_ENABLE_LOCK])dnl 2126m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127_LT_COMPILER_C_O([$1]) 2128 2129hard_links=nottested 2130if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131 # do not overwrite the value of need_locks provided by the user 2132 AC_MSG_CHECKING([if we can lock with hard links]) 2133 hard_links=yes 2134 $RM conftest* 2135 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136 touch conftest.a 2137 ln conftest.a conftest.b 2>&5 || hard_links=no 2138 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139 AC_MSG_RESULT([$hard_links]) 2140 if test no = "$hard_links"; then 2141 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142 need_locks=warn 2143 fi 2144else 2145 need_locks=no 2146fi 2147_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148])# _LT_COMPILER_FILE_LOCKS 2149 2150 2151# _LT_CHECK_OBJDIR 2152# ---------------- 2153m4_defun([_LT_CHECK_OBJDIR], 2154[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155[rm -f .libs 2>/dev/null 2156mkdir .libs 2>/dev/null 2157if test -d .libs; then 2158 lt_cv_objdir=.libs 2159else 2160 # MS-DOS does not allow filenames that begin with a dot. 2161 lt_cv_objdir=_libs 2162fi 2163rmdir .libs 2>/dev/null]) 2164objdir=$lt_cv_objdir 2165_LT_DECL([], [objdir], [0], 2166 [The name of the directory that contains temporary libtool files])dnl 2167m4_pattern_allow([LT_OBJDIR])dnl 2168AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170])# _LT_CHECK_OBJDIR 2171 2172 2173# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174# -------------------------------------- 2175# Check hardcoding attributes. 2176m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178_LT_TAGVAR(hardcode_action, $1)= 2179if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182 2183 # We can hardcode non-existent directories. 2184 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186 # have to relink, otherwise we might link with an installed library 2187 # when we should be linking with a yet-to-be-installed one 2188 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190 # Linking always hardcodes the temporary library directory. 2191 _LT_TAGVAR(hardcode_action, $1)=relink 2192 else 2193 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194 _LT_TAGVAR(hardcode_action, $1)=immediate 2195 fi 2196else 2197 # We cannot hardcode anything, or else we can only hardcode existing 2198 # directories. 2199 _LT_TAGVAR(hardcode_action, $1)=unsupported 2200fi 2201AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202 2203if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205 # Fast installation is not supported 2206 enable_fast_install=no 2207elif test yes = "$shlibpath_overrides_runpath" || 2208 test no = "$enable_shared"; then 2209 # Fast installation is not necessary 2210 enable_fast_install=needless 2211fi 2212_LT_TAGDECL([], [hardcode_action], [0], 2213 [How to hardcode a shared library path into an executable]) 2214])# _LT_LINKER_HARDCODE_LIBPATH 2215 2216 2217# _LT_CMD_STRIPLIB 2218# ---------------- 2219m4_defun([_LT_CMD_STRIPLIB], 2220[m4_require([_LT_DECL_EGREP]) 2221striplib= 2222old_striplib= 2223AC_MSG_CHECKING([whether stripping libraries is possible]) 2224if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227 AC_MSG_RESULT([yes]) 2228else 2229# FIXME - insert some real tests, host_os isn't really good enough 2230 case $host_os in 2231 darwin*) 2232 if test -n "$STRIP"; then 2233 striplib="$STRIP -x" 2234 old_striplib="$STRIP -S" 2235 AC_MSG_RESULT([yes]) 2236 else 2237 AC_MSG_RESULT([no]) 2238 fi 2239 ;; 2240 *) 2241 AC_MSG_RESULT([no]) 2242 ;; 2243 esac 2244fi 2245_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246_LT_DECL([], [striplib], [1]) 2247])# _LT_CMD_STRIPLIB 2248 2249 2250# _LT_PREPARE_MUNGE_PATH_LIST 2251# --------------------------- 2252# Make sure func_munge_path_list() is defined correctly. 2253m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254[[# func_munge_path_list VARIABLE PATH 2255# ----------------------------------- 2256# VARIABLE is name of variable containing _space_ separated list of 2257# directories to be munged by the contents of PATH, which is string 2258# having a format: 2259# "DIR[:DIR]:" 2260# string "DIR[ DIR]" will be prepended to VARIABLE 2261# ":DIR[:DIR]" 2262# string "DIR[ DIR]" will be appended to VARIABLE 2263# "DIRP[:DIRP]::[DIRA:]DIRA" 2264# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265# "DIRA[ DIRA]" will be appended to VARIABLE 2266# "DIR[:DIR]" 2267# VARIABLE will be replaced by "DIR[ DIR]" 2268func_munge_path_list () 2269{ 2270 case x@S|@2 in 2271 x) 2272 ;; 2273 *:) 2274 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275 ;; 2276 x:*) 2277 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278 ;; 2279 *::*) 2280 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282 ;; 2283 *) 2284 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285 ;; 2286 esac 2287} 2288]])# _LT_PREPARE_PATH_LIST 2289 2290 2291# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292# ----------------------------- 2293# PORTME Fill in your ld.so characteristics 2294m4_defun([_LT_SYS_DYNAMIC_LINKER], 2295[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296m4_require([_LT_DECL_EGREP])dnl 2297m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298m4_require([_LT_DECL_OBJDUMP])dnl 2299m4_require([_LT_DECL_SED])dnl 2300m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302AC_MSG_CHECKING([dynamic linker characteristics]) 2303m4_if([$1], 2304 [], [ 2305if test yes = "$GCC"; then 2306 case $host_os in 2307 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308 *) lt_awk_arg='/^libraries:/' ;; 2309 esac 2310 case $host_os in 2311 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312 *) lt_sed_strip_eq='s|=/|/|g' ;; 2313 esac 2314 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315 case $lt_search_path_spec in 2316 *\;*) 2317 # if the path contains ";" then we assume it to be the separator 2318 # otherwise default to the standard path separator (i.e. ":") - it is 2319 # assumed that no part of a normal pathname contains ";" but that should 2320 # okay in the real world where ";" in dirpaths is itself problematic. 2321 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322 ;; 2323 *) 2324 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325 ;; 2326 esac 2327 # Ok, now we have the path, separated by spaces, we can step through it 2328 # and add multilib dir if necessary... 2329 lt_tmp_lt_search_path_spec= 2330 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331 # ...but if some path component already ends with the multilib dir we assume 2332 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333 case "$lt_multi_os_dir; $lt_search_path_spec " in 2334 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335 lt_multi_os_dir= 2336 ;; 2337 esac 2338 for lt_sys_path in $lt_search_path_spec; do 2339 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341 elif test -n "$lt_multi_os_dir"; then 2342 test -d "$lt_sys_path" && \ 2343 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344 fi 2345 done 2346 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347BEGIN {RS = " "; FS = "/|\n";} { 2348 lt_foo = ""; 2349 lt_count = 0; 2350 for (lt_i = NF; lt_i > 0; lt_i--) { 2351 if ($lt_i != "" && $lt_i != ".") { 2352 if ($lt_i == "..") { 2353 lt_count++; 2354 } else { 2355 if (lt_count == 0) { 2356 lt_foo = "/" $lt_i lt_foo; 2357 } else { 2358 lt_count--; 2359 } 2360 } 2361 } 2362 } 2363 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365}'` 2366 # AWK program above erroneously prepends '/' to C:/dos/paths 2367 # for these hosts. 2368 case $host_os in 2369 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371 esac 2372 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373else 2374 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375fi]) 2376library_names_spec= 2377libname_spec='lib$name' 2378soname_spec= 2379shrext_cmds=.so 2380postinstall_cmds= 2381postuninstall_cmds= 2382finish_cmds= 2383finish_eval= 2384shlibpath_var= 2385shlibpath_overrides_runpath=unknown 2386version_type=none 2387dynamic_linker="$host_os ld.so" 2388sys_lib_dlsearch_path_spec="/lib /usr/lib" 2389need_lib_prefix=unknown 2390hardcode_into_libs=no 2391 2392# when you set need_version to no, make sure it does not cause -set_version 2393# flags to be left without arguments 2394need_version=unknown 2395 2396AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397[User-defined run-time library search path.]) 2398 2399case $host_os in 2400aix3*) 2401 version_type=linux # correct to gnu/linux during the next big refactor 2402 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403 shlibpath_var=LIBPATH 2404 2405 # AIX 3 has no versioning support, so we append a major version to the name. 2406 soname_spec='$libname$release$shared_ext$major' 2407 ;; 2408 2409aix[[4-9]]*) 2410 version_type=linux # correct to gnu/linux during the next big refactor 2411 need_lib_prefix=no 2412 need_version=no 2413 hardcode_into_libs=yes 2414 if test ia64 = "$host_cpu"; then 2415 # AIX 5 supports IA64 2416 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417 shlibpath_var=LD_LIBRARY_PATH 2418 else 2419 # With GCC up to 2.95.x, collect2 would create an import file 2420 # for dependence libraries. The import file would start with 2421 # the line '#! .'. This would cause the generated library to 2422 # depend on '.', always an invalid library. This was fixed in 2423 # development snapshots of GCC prior to 3.0. 2424 case $host_os in 2425 aix4 | aix4.[[01]] | aix4.[[01]].*) 2426 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427 echo ' yes ' 2428 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429 : 2430 else 2431 can_build_shared=no 2432 fi 2433 ;; 2434 esac 2435 # Using Import Files as archive members, it is possible to support 2436 # filename-based versioning of shared library archives on AIX. While 2437 # this would work for both with and without runtime linking, it will 2438 # prevent static linking of such archives. So we do filename-based 2439 # shared library versioning with .so extension only, which is used 2440 # when both runtime linking and shared linking is enabled. 2441 # Unfortunately, runtime linking may impact performance, so we do 2442 # not want this to be the default eventually. Also, we use the 2443 # versioned .so libs for executables only if there is the -brtl 2444 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445 # To allow for filename-based versioning support, we need to create 2446 # libNAME.so.V as an archive file, containing: 2447 # *) an Import File, referring to the versioned filename of the 2448 # archive as well as the shared archive member, telling the 2449 # bitwidth (32 or 64) of that shared object, and providing the 2450 # list of exported symbols of that shared object, eventually 2451 # decorated with the 'weak' keyword 2452 # *) the shared object with the F_LOADONLY flag set, to really avoid 2453 # it being seen by the linker. 2454 # At run time we better use the real file rather than another symlink, 2455 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456 2457 case $with_aix_soname,$aix_use_runtimelinking in 2458 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459 # soname into executable. Probably we can add versioning support to 2460 # collect2, so additional links can be useful in future. 2461 aix,yes) # traditional libtool 2462 dynamic_linker='AIX unversionable lib.so' 2463 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464 # instead of lib<name>.a to let people know that these are not 2465 # typical AIX shared libraries. 2466 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467 ;; 2468 aix,no) # traditional AIX only 2469 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470 # We preserve .a as extension for shared libraries through AIX4.2 2471 # and later when we are not doing run time linking. 2472 library_names_spec='$libname$release.a $libname.a' 2473 soname_spec='$libname$release$shared_ext$major' 2474 ;; 2475 svr4,*) # full svr4 only 2476 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478 # We do not specify a path in Import Files, so LIBPATH fires. 2479 shlibpath_overrides_runpath=yes 2480 ;; 2481 *,yes) # both, prefer svr4 2482 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484 # unpreferred sharedlib libNAME.a needs extra handling 2485 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2486 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2487 # We do not specify a path in Import Files, so LIBPATH fires. 2488 shlibpath_overrides_runpath=yes 2489 ;; 2490 *,no) # both, prefer aix 2491 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492 library_names_spec='$libname$release.a $libname.a' 2493 soname_spec='$libname$release$shared_ext$major' 2494 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2496 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2497 ;; 2498 esac 2499 shlibpath_var=LIBPATH 2500 fi 2501 ;; 2502 2503amigaos*) 2504 case $host_cpu in 2505 powerpc) 2506 # Since July 2007 AmigaOS4 officially supports .so libraries. 2507 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509 ;; 2510 m68k) 2511 library_names_spec='$libname.ixlibrary $libname.a' 2512 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2514 ;; 2515 esac 2516 ;; 2517 2518beos*) 2519 library_names_spec='$libname$shared_ext' 2520 dynamic_linker="$host_os ld.so" 2521 shlibpath_var=LIBRARY_PATH 2522 ;; 2523 2524bsdi[[45]]*) 2525 version_type=linux # correct to gnu/linux during the next big refactor 2526 need_version=no 2527 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528 soname_spec='$libname$release$shared_ext$major' 2529 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530 shlibpath_var=LD_LIBRARY_PATH 2531 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533 # the default ld.so.conf also contains /usr/contrib/lib and 2534 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535 # libtool to hard-code these into programs 2536 ;; 2537 2538cygwin* | mingw* | pw32* | cegcc*) 2539 version_type=windows 2540 shrext_cmds=.dll 2541 need_version=no 2542 need_lib_prefix=no 2543 2544 case $GCC,$cc_basename in 2545 yes,*) 2546 # gcc 2547 library_names_spec='$libname.dll.a' 2548 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549 postinstall_cmds='base_file=`basename \$file`~ 2550 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551 dldir=$destdir/`dirname \$dlpath`~ 2552 test -d \$dldir || mkdir -p \$dldir~ 2553 $install_prog $dir/$dlname \$dldir/$dlname~ 2554 chmod a+x \$dldir/$dlname~ 2555 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557 fi' 2558 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559 dlpath=$dir/\$dldll~ 2560 $RM \$dlpath' 2561 shlibpath_overrides_runpath=yes 2562 2563 case $host_os in 2564 cygwin*) 2565 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567m4_if([$1], [],[ 2568 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569 ;; 2570 mingw* | cegcc*) 2571 # MinGW DLLs use traditional 'lib' prefix 2572 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573 ;; 2574 pw32*) 2575 # pw32 DLLs use 'pw' prefix rather than 'lib' 2576 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577 ;; 2578 esac 2579 dynamic_linker='Win32 ld.exe' 2580 ;; 2581 2582 *,cl*) 2583 # Native MSVC 2584 libname_spec='$name' 2585 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586 library_names_spec='$libname.dll.lib' 2587 2588 case $build_os in 2589 mingw*) 2590 sys_lib_search_path_spec= 2591 lt_save_ifs=$IFS 2592 IFS=';' 2593 for lt_path in $LIB 2594 do 2595 IFS=$lt_save_ifs 2596 # Let DOS variable expansion print the short 8.3 style file name. 2597 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599 done 2600 IFS=$lt_save_ifs 2601 # Convert to MSYS style. 2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603 ;; 2604 cygwin*) 2605 # Convert to unix form, then to dos form, then back to unix form 2606 # but this time dos style (no spaces!) so that the unix form looks 2607 # like /cygdrive/c/PROGRA~1:/cygdr... 2608 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611 ;; 2612 *) 2613 sys_lib_search_path_spec=$LIB 2614 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615 # It is most probably a Windows format PATH. 2616 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617 else 2618 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619 fi 2620 # FIXME: find the short name or the path components, as spaces are 2621 # common. (e.g. "Program Files" -> "PROGRA~1") 2622 ;; 2623 esac 2624 2625 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626 postinstall_cmds='base_file=`basename \$file`~ 2627 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628 dldir=$destdir/`dirname \$dlpath`~ 2629 test -d \$dldir || mkdir -p \$dldir~ 2630 $install_prog $dir/$dlname \$dldir/$dlname' 2631 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632 dlpath=$dir/\$dldll~ 2633 $RM \$dlpath' 2634 shlibpath_overrides_runpath=yes 2635 dynamic_linker='Win32 link.exe' 2636 ;; 2637 2638 *) 2639 # Assume MSVC wrapper 2640 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641 dynamic_linker='Win32 ld.exe' 2642 ;; 2643 esac 2644 # FIXME: first we should search . and the directory the executable is in 2645 shlibpath_var=PATH 2646 ;; 2647 2648darwin* | rhapsody*) 2649 dynamic_linker="$host_os dyld" 2650 version_type=darwin 2651 need_lib_prefix=no 2652 need_version=no 2653 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654 soname_spec='$libname$release$major$shared_ext' 2655 shlibpath_overrides_runpath=yes 2656 shlibpath_var=DYLD_LIBRARY_PATH 2657 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658m4_if([$1], [],[ 2659 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661 ;; 2662 2663dgux*) 2664 version_type=linux # correct to gnu/linux during the next big refactor 2665 need_lib_prefix=no 2666 need_version=no 2667 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668 soname_spec='$libname$release$shared_ext$major' 2669 shlibpath_var=LD_LIBRARY_PATH 2670 ;; 2671 2672freebsd* | dragonfly*) 2673 # DragonFly does not have aout. When/if they implement a new 2674 # versioning mechanism, adjust this. 2675 if test -x /usr/bin/objformat; then 2676 objformat=`/usr/bin/objformat` 2677 else 2678 case $host_os in 2679 freebsd[[23]].*) objformat=aout ;; 2680 *) objformat=elf ;; 2681 esac 2682 fi 2683 # Handle Gentoo/FreeBSD as it was Linux 2684 case $host_vendor in 2685 gentoo) 2686 version_type=linux ;; 2687 *) 2688 version_type=freebsd-$objformat ;; 2689 esac 2690 2691 case $version_type in 2692 freebsd-elf*) 2693 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2694 soname_spec='$libname$release$shared_ext$major' 2695 need_version=no 2696 need_lib_prefix=no 2697 ;; 2698 freebsd-*) 2699 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2700 need_version=yes 2701 ;; 2702 linux) 2703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2704 soname_spec='${libname}${release}${shared_ext}$major' 2705 need_lib_prefix=no 2706 need_version=no 2707 ;; 2708 esac 2709 shlibpath_var=LD_LIBRARY_PATH 2710 case $host_os in 2711 freebsd2.*) 2712 shlibpath_overrides_runpath=yes 2713 ;; 2714 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2715 shlibpath_overrides_runpath=yes 2716 hardcode_into_libs=yes 2717 ;; 2718 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2719 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2720 shlibpath_overrides_runpath=no 2721 hardcode_into_libs=yes 2722 ;; 2723 *) # from 4.6 on, and DragonFly 2724 shlibpath_overrides_runpath=yes 2725 hardcode_into_libs=yes 2726 ;; 2727 esac 2728 ;; 2729 2730haiku*) 2731 version_type=linux # correct to gnu/linux during the next big refactor 2732 need_lib_prefix=no 2733 need_version=no 2734 dynamic_linker="$host_os runtime_loader" 2735 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2736 soname_spec='$libname$release$shared_ext$major' 2737 shlibpath_var=LIBRARY_PATH 2738 shlibpath_overrides_runpath=no 2739 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2740 hardcode_into_libs=yes 2741 ;; 2742 2743hpux9* | hpux10* | hpux11*) 2744 # Give a soname corresponding to the major version so that dld.sl refuses to 2745 # link against other versions. 2746 version_type=sunos 2747 need_lib_prefix=no 2748 need_version=no 2749 case $host_cpu in 2750 ia64*) 2751 shrext_cmds='.so' 2752 hardcode_into_libs=yes 2753 dynamic_linker="$host_os dld.so" 2754 shlibpath_var=LD_LIBRARY_PATH 2755 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2756 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2757 soname_spec='$libname$release$shared_ext$major' 2758 if test 32 = "$HPUX_IA64_MODE"; then 2759 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2760 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2761 else 2762 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2763 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2764 fi 2765 ;; 2766 hppa*64*) 2767 shrext_cmds='.sl' 2768 hardcode_into_libs=yes 2769 dynamic_linker="$host_os dld.sl" 2770 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2771 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2772 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2773 soname_spec='$libname$release$shared_ext$major' 2774 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2775 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2776 ;; 2777 *) 2778 shrext_cmds='.sl' 2779 dynamic_linker="$host_os dld.sl" 2780 shlibpath_var=SHLIB_PATH 2781 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2782 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2783 soname_spec='$libname$release$shared_ext$major' 2784 ;; 2785 esac 2786 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2787 postinstall_cmds='chmod 555 $lib' 2788 # or fails outright, so override atomically: 2789 install_override_mode=555 2790 ;; 2791 2792interix[[3-9]]*) 2793 version_type=linux # correct to gnu/linux during the next big refactor 2794 need_lib_prefix=no 2795 need_version=no 2796 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2797 soname_spec='$libname$release$shared_ext$major' 2798 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2799 shlibpath_var=LD_LIBRARY_PATH 2800 shlibpath_overrides_runpath=no 2801 hardcode_into_libs=yes 2802 ;; 2803 2804irix5* | irix6* | nonstopux*) 2805 case $host_os in 2806 nonstopux*) version_type=nonstopux ;; 2807 *) 2808 if test yes = "$lt_cv_prog_gnu_ld"; then 2809 version_type=linux # correct to gnu/linux during the next big refactor 2810 else 2811 version_type=irix 2812 fi ;; 2813 esac 2814 need_lib_prefix=no 2815 need_version=no 2816 soname_spec='$libname$release$shared_ext$major' 2817 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2818 case $host_os in 2819 irix5* | nonstopux*) 2820 libsuff= shlibsuff= 2821 ;; 2822 *) 2823 case $LD in # libtool.m4 will add one of these switches to LD 2824 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2825 libsuff= shlibsuff= libmagic=32-bit;; 2826 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2827 libsuff=32 shlibsuff=N32 libmagic=N32;; 2828 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2829 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2830 *) libsuff= shlibsuff= libmagic=never-match;; 2831 esac 2832 ;; 2833 esac 2834 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2835 shlibpath_overrides_runpath=no 2836 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2837 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2838 hardcode_into_libs=yes 2839 ;; 2840 2841# No shared lib support for Linux oldld, aout, or coff. 2842linux*oldld* | linux*aout* | linux*coff*) 2843 dynamic_linker=no 2844 ;; 2845 2846linux*android*) 2847 version_type=none # Android doesn't support versioned libraries. 2848 need_lib_prefix=no 2849 need_version=no 2850 library_names_spec='$libname$release$shared_ext' 2851 soname_spec='$libname$release$shared_ext' 2852 finish_cmds= 2853 shlibpath_var=LD_LIBRARY_PATH 2854 shlibpath_overrides_runpath=yes 2855 2856 # This implies no fast_install, which is unacceptable. 2857 # Some rework will be needed to allow for fast_install 2858 # before this can be enabled. 2859 hardcode_into_libs=yes 2860 2861 dynamic_linker='Android linker' 2862 # Don't embed -rpath directories since the linker doesn't support them. 2863 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2864 ;; 2865 2866# This must be glibc/ELF. 2867linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2868 version_type=linux # correct to gnu/linux during the next big refactor 2869 need_lib_prefix=no 2870 need_version=no 2871 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2872 soname_spec='$libname$release$shared_ext$major' 2873 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2874 shlibpath_var=LD_LIBRARY_PATH 2875 shlibpath_overrides_runpath=no 2876 2877 # Some binutils ld are patched to set DT_RUNPATH 2878 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2879 [lt_cv_shlibpath_overrides_runpath=no 2880 save_LDFLAGS=$LDFLAGS 2881 save_libdir=$libdir 2882 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2883 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2884 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2885 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2886 [lt_cv_shlibpath_overrides_runpath=yes])]) 2887 LDFLAGS=$save_LDFLAGS 2888 libdir=$save_libdir 2889 ]) 2890 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2891 2892 # This implies no fast_install, which is unacceptable. 2893 # Some rework will be needed to allow for fast_install 2894 # before this can be enabled. 2895 hardcode_into_libs=yes 2896 2897 # Ideally, we could use ldconfig to report *all* directores which are 2898 # searched for libraries, however this is still not possible. Aside from not 2899 # being certain /sbin/ldconfig is available, command 2900 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2901 # even though it is searched at run-time. Try to do the best guess by 2902 # appending ld.so.conf contents (and includes) to the search path. 2903 if test -f /etc/ld.so.conf; then 2904 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 2905 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2906 fi 2907 2908 # We used to test for /lib/ld.so.1 and disable shared libraries on 2909 # powerpc, because MkLinux only supported shared libraries with the 2910 # GNU dynamic linker. Since this was broken with cross compilers, 2911 # most powerpc-linux boxes support dynamic linking these days and 2912 # people can always --disable-shared, the test was removed, and we 2913 # assume the GNU/Linux dynamic linker is in use. 2914 dynamic_linker='GNU/Linux ld.so' 2915 ;; 2916 2917netbsd*) 2918 version_type=sunos 2919 need_lib_prefix=no 2920 need_version=no 2921 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2922 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2923 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2924 dynamic_linker='NetBSD (a.out) ld.so' 2925 else 2926 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2927 soname_spec='$libname$release$shared_ext$major' 2928 dynamic_linker='NetBSD ld.elf_so' 2929 fi 2930 shlibpath_var=LD_LIBRARY_PATH 2931 shlibpath_overrides_runpath=yes 2932 hardcode_into_libs=yes 2933 ;; 2934 2935newsos6) 2936 version_type=linux # correct to gnu/linux during the next big refactor 2937 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2938 shlibpath_var=LD_LIBRARY_PATH 2939 shlibpath_overrides_runpath=yes 2940 ;; 2941 2942*nto* | *qnx*) 2943 version_type=qnx 2944 need_lib_prefix=no 2945 need_version=no 2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2947 soname_spec='$libname$release$shared_ext$major' 2948 shlibpath_var=LD_LIBRARY_PATH 2949 shlibpath_overrides_runpath=no 2950 hardcode_into_libs=yes 2951 dynamic_linker='ldqnx.so' 2952 ;; 2953 2954openbsd* | bitrig*) 2955 version_type=sunos 2956 sys_lib_dlsearch_path_spec=/usr/lib 2957 need_lib_prefix=no 2958 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2959 need_version=no 2960 else 2961 need_version=yes 2962 fi 2963 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2964 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2965 shlibpath_var=LD_LIBRARY_PATH 2966 shlibpath_overrides_runpath=yes 2967 ;; 2968 2969os2*) 2970 libname_spec='$name' 2971 version_type=windows 2972 shrext_cmds=.dll 2973 need_version=no 2974 need_lib_prefix=no 2975 # OS/2 can only load a DLL with a base name of 8 characters or less. 2976 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2977 v=$($ECHO $release$versuffix | tr -d .-); 2978 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2979 $ECHO $n$v`$shared_ext' 2980 library_names_spec='${libname}_dll.$libext' 2981 dynamic_linker='OS/2 ld.exe' 2982 shlibpath_var=BEGINLIBPATH 2983 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2984 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2985 postinstall_cmds='base_file=`basename \$file`~ 2986 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2987 dldir=$destdir/`dirname \$dlpath`~ 2988 test -d \$dldir || mkdir -p \$dldir~ 2989 $install_prog $dir/$dlname \$dldir/$dlname~ 2990 chmod a+x \$dldir/$dlname~ 2991 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2992 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2993 fi' 2994 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2995 dlpath=$dir/\$dldll~ 2996 $RM \$dlpath' 2997 ;; 2998 2999osf3* | osf4* | osf5*) 3000 version_type=osf 3001 need_lib_prefix=no 3002 need_version=no 3003 soname_spec='$libname$release$shared_ext$major' 3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3005 shlibpath_var=LD_LIBRARY_PATH 3006 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3007 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3008 ;; 3009 3010rdos*) 3011 dynamic_linker=no 3012 ;; 3013 3014solaris*) 3015 version_type=linux # correct to gnu/linux during the next big refactor 3016 need_lib_prefix=no 3017 need_version=no 3018 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3019 soname_spec='$libname$release$shared_ext$major' 3020 shlibpath_var=LD_LIBRARY_PATH 3021 shlibpath_overrides_runpath=yes 3022 hardcode_into_libs=yes 3023 # ldd complains unless libraries are executable 3024 postinstall_cmds='chmod +x $lib' 3025 ;; 3026 3027sunos4*) 3028 version_type=sunos 3029 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3030 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3031 shlibpath_var=LD_LIBRARY_PATH 3032 shlibpath_overrides_runpath=yes 3033 if test yes = "$with_gnu_ld"; then 3034 need_lib_prefix=no 3035 fi 3036 need_version=yes 3037 ;; 3038 3039sysv4 | sysv4.3*) 3040 version_type=linux # correct to gnu/linux during the next big refactor 3041 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3042 soname_spec='$libname$release$shared_ext$major' 3043 shlibpath_var=LD_LIBRARY_PATH 3044 case $host_vendor in 3045 sni) 3046 shlibpath_overrides_runpath=no 3047 need_lib_prefix=no 3048 runpath_var=LD_RUN_PATH 3049 ;; 3050 siemens) 3051 need_lib_prefix=no 3052 ;; 3053 motorola) 3054 need_lib_prefix=no 3055 need_version=no 3056 shlibpath_overrides_runpath=no 3057 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3058 ;; 3059 esac 3060 ;; 3061 3062sysv4*MP*) 3063 if test -d /usr/nec; then 3064 version_type=linux # correct to gnu/linux during the next big refactor 3065 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3066 soname_spec='$libname$shared_ext.$major' 3067 shlibpath_var=LD_LIBRARY_PATH 3068 fi 3069 ;; 3070 3071sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3072 version_type=sco 3073 need_lib_prefix=no 3074 need_version=no 3075 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3076 soname_spec='$libname$release$shared_ext$major' 3077 shlibpath_var=LD_LIBRARY_PATH 3078 shlibpath_overrides_runpath=yes 3079 hardcode_into_libs=yes 3080 if test yes = "$with_gnu_ld"; then 3081 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3082 else 3083 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3084 case $host_os in 3085 sco3.2v5*) 3086 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3087 ;; 3088 esac 3089 fi 3090 sys_lib_dlsearch_path_spec='/usr/lib' 3091 ;; 3092 3093tpf*) 3094 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3095 version_type=linux # correct to gnu/linux during the next big refactor 3096 need_lib_prefix=no 3097 need_version=no 3098 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3099 shlibpath_var=LD_LIBRARY_PATH 3100 shlibpath_overrides_runpath=no 3101 hardcode_into_libs=yes 3102 ;; 3103 3104uts4*) 3105 version_type=linux # correct to gnu/linux during the next big refactor 3106 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3107 soname_spec='$libname$release$shared_ext$major' 3108 shlibpath_var=LD_LIBRARY_PATH 3109 ;; 3110 3111*) 3112 dynamic_linker=no 3113 ;; 3114esac 3115AC_MSG_RESULT([$dynamic_linker]) 3116test no = "$dynamic_linker" && can_build_shared=no 3117 3118variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3119if test yes = "$GCC"; then 3120 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3121fi 3122 3123if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3124 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3125fi 3126 3127if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3128 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129fi 3130 3131# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3132configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3133 3134# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3135func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3136 3137# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3138configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3139 3140_LT_DECL([], [variables_saved_for_relink], [1], 3141 [Variables whose values should be saved in libtool wrapper scripts and 3142 restored at link time]) 3143_LT_DECL([], [need_lib_prefix], [0], 3144 [Do we need the "lib" prefix for modules?]) 3145_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3146_LT_DECL([], [version_type], [0], [Library versioning type]) 3147_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3148_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3149_LT_DECL([], [shlibpath_overrides_runpath], [0], 3150 [Is shlibpath searched before the hard-coded library search path?]) 3151_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3152_LT_DECL([], [library_names_spec], [1], 3153 [[List of archive names. First name is the real one, the rest are links. 3154 The last name is the one that the linker finds with -lNAME]]) 3155_LT_DECL([], [soname_spec], [1], 3156 [[The coded name of the library, if different from the real name]]) 3157_LT_DECL([], [install_override_mode], [1], 3158 [Permission mode override for installation of shared libraries]) 3159_LT_DECL([], [postinstall_cmds], [2], 3160 [Command to use after installation of a shared archive]) 3161_LT_DECL([], [postuninstall_cmds], [2], 3162 [Command to use after uninstallation of a shared archive]) 3163_LT_DECL([], [finish_cmds], [2], 3164 [Commands used to finish a libtool library installation in a directory]) 3165_LT_DECL([], [finish_eval], [1], 3166 [[As "finish_cmds", except a single script fragment to be evaled but 3167 not shown]]) 3168_LT_DECL([], [hardcode_into_libs], [0], 3169 [Whether we should hardcode library paths into libraries]) 3170_LT_DECL([], [sys_lib_search_path_spec], [2], 3171 [Compile-time system search path for libraries]) 3172_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3173 [Detected run-time system search path for libraries]) 3174_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3175 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3176])# _LT_SYS_DYNAMIC_LINKER 3177 3178 3179# _LT_PATH_TOOL_PREFIX(TOOL) 3180# -------------------------- 3181# find a file program that can recognize shared library 3182AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3183[m4_require([_LT_DECL_EGREP])dnl 3184AC_MSG_CHECKING([for $1]) 3185AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3186[case $MAGIC_CMD in 3187[[\\/*] | ?:[\\/]*]) 3188 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3189 ;; 3190*) 3191 lt_save_MAGIC_CMD=$MAGIC_CMD 3192 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3193dnl $ac_dummy forces splitting on constant user-supplied paths. 3194dnl POSIX.2 word splitting is done only on the output of word expansions, 3195dnl not every word. This closes a longstanding sh security hole. 3196 ac_dummy="m4_if([$2], , $PATH, [$2])" 3197 for ac_dir in $ac_dummy; do 3198 IFS=$lt_save_ifs 3199 test -z "$ac_dir" && ac_dir=. 3200 if test -f "$ac_dir/$1"; then 3201 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3202 if test -n "$file_magic_test_file"; then 3203 case $deplibs_check_method in 3204 "file_magic "*) 3205 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3206 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3208 $EGREP "$file_magic_regex" > /dev/null; then 3209 : 3210 else 3211 cat <<_LT_EOF 1>&2 3212 3213*** Warning: the command libtool uses to detect shared libraries, 3214*** $file_magic_cmd, produces output that libtool cannot recognize. 3215*** The result is that libtool may fail to recognize shared libraries 3216*** as such. This will affect the creation of libtool libraries that 3217*** depend on shared libraries, but programs linked with such libtool 3218*** libraries will work regardless of this problem. Nevertheless, you 3219*** may want to report the problem to your system manager and/or to 3220*** bug-libtool@gnu.org 3221 3222_LT_EOF 3223 fi ;; 3224 esac 3225 fi 3226 break 3227 fi 3228 done 3229 IFS=$lt_save_ifs 3230 MAGIC_CMD=$lt_save_MAGIC_CMD 3231 ;; 3232esac]) 3233MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3234if test -n "$MAGIC_CMD"; then 3235 AC_MSG_RESULT($MAGIC_CMD) 3236else 3237 AC_MSG_RESULT(no) 3238fi 3239_LT_DECL([], [MAGIC_CMD], [0], 3240 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3241])# _LT_PATH_TOOL_PREFIX 3242 3243# Old name: 3244AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3245dnl aclocal-1.4 backwards compatibility: 3246dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3247 3248 3249# _LT_PATH_MAGIC 3250# -------------- 3251# find a file program that can recognize a shared library 3252m4_defun([_LT_PATH_MAGIC], 3253[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3254if test -z "$lt_cv_path_MAGIC_CMD"; then 3255 if test -n "$ac_tool_prefix"; then 3256 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3257 else 3258 MAGIC_CMD=: 3259 fi 3260fi 3261])# _LT_PATH_MAGIC 3262 3263 3264# LT_PATH_LD 3265# ---------- 3266# find the pathname to the GNU or non-GNU linker 3267AC_DEFUN([LT_PATH_LD], 3268[AC_REQUIRE([AC_PROG_CC])dnl 3269AC_REQUIRE([AC_CANONICAL_HOST])dnl 3270AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3271m4_require([_LT_DECL_SED])dnl 3272m4_require([_LT_DECL_EGREP])dnl 3273m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3274 3275AC_ARG_WITH([gnu-ld], 3276 [AS_HELP_STRING([--with-gnu-ld], 3277 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3278 [test no = "$withval" || with_gnu_ld=yes], 3279 [with_gnu_ld=no])dnl 3280 3281ac_prog=ld 3282if test yes = "$GCC"; then 3283 # Check if gcc -print-prog-name=ld gives a path. 3284 AC_MSG_CHECKING([for ld used by $CC]) 3285 case $host in 3286 *-*-mingw*) 3287 # gcc leaves a trailing carriage return, which upsets mingw 3288 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3289 *) 3290 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3291 esac 3292 case $ac_prog in 3293 # Accept absolute paths. 3294 [[\\/]]* | ?:[[\\/]]*) 3295 re_direlt='/[[^/]][[^/]]*/\.\./' 3296 # Canonicalize the pathname of ld 3297 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3298 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3299 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3300 done 3301 test -z "$LD" && LD=$ac_prog 3302 ;; 3303 "") 3304 # If it fails, then pretend we aren't using GCC. 3305 ac_prog=ld 3306 ;; 3307 *) 3308 # If it is relative, then search for the first ld in PATH. 3309 with_gnu_ld=unknown 3310 ;; 3311 esac 3312elif test yes = "$with_gnu_ld"; then 3313 AC_MSG_CHECKING([for GNU ld]) 3314else 3315 AC_MSG_CHECKING([for non-GNU ld]) 3316fi 3317AC_CACHE_VAL(lt_cv_path_LD, 3318[if test -z "$LD"; then 3319 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3320 for ac_dir in $PATH; do 3321 IFS=$lt_save_ifs 3322 test -z "$ac_dir" && ac_dir=. 3323 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3324 lt_cv_path_LD=$ac_dir/$ac_prog 3325 # Check to see if the program is GNU ld. I'd rather use --version, 3326 # but apparently some variants of GNU ld only accept -v. 3327 # Break only if it was the GNU/non-GNU ld that we prefer. 3328 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3329 *GNU* | *'with BFD'*) 3330 test no != "$with_gnu_ld" && break 3331 ;; 3332 *) 3333 test yes != "$with_gnu_ld" && break 3334 ;; 3335 esac 3336 fi 3337 done 3338 IFS=$lt_save_ifs 3339else 3340 lt_cv_path_LD=$LD # Let the user override the test with a path. 3341fi]) 3342LD=$lt_cv_path_LD 3343if test -n "$LD"; then 3344 AC_MSG_RESULT($LD) 3345else 3346 AC_MSG_RESULT(no) 3347fi 3348test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3349_LT_PATH_LD_GNU 3350AC_SUBST([LD]) 3351 3352_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3353])# LT_PATH_LD 3354 3355# Old names: 3356AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3357AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3358dnl aclocal-1.4 backwards compatibility: 3359dnl AC_DEFUN([AM_PROG_LD], []) 3360dnl AC_DEFUN([AC_PROG_LD], []) 3361 3362 3363# _LT_PATH_LD_GNU 3364#- -------------- 3365m4_defun([_LT_PATH_LD_GNU], 3366[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3367[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3368case `$LD -v 2>&1 </dev/null` in 3369*GNU* | *'with BFD'*) 3370 lt_cv_prog_gnu_ld=yes 3371 ;; 3372*) 3373 lt_cv_prog_gnu_ld=no 3374 ;; 3375esac]) 3376with_gnu_ld=$lt_cv_prog_gnu_ld 3377])# _LT_PATH_LD_GNU 3378 3379 3380# _LT_CMD_RELOAD 3381# -------------- 3382# find reload flag for linker 3383# -- PORTME Some linkers may need a different reload flag. 3384m4_defun([_LT_CMD_RELOAD], 3385[AC_CACHE_CHECK([for $LD option to reload object files], 3386 lt_cv_ld_reload_flag, 3387 [lt_cv_ld_reload_flag='-r']) 3388reload_flag=$lt_cv_ld_reload_flag 3389case $reload_flag in 3390"" | " "*) ;; 3391*) reload_flag=" $reload_flag" ;; 3392esac 3393reload_cmds='$LD$reload_flag -o $output$reload_objs' 3394case $host_os in 3395 cygwin* | mingw* | pw32* | cegcc*) 3396 if test yes != "$GCC"; then 3397 reload_cmds=false 3398 fi 3399 ;; 3400 darwin*) 3401 if test yes = "$GCC"; then 3402 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3403 else 3404 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3405 fi 3406 ;; 3407esac 3408_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3409_LT_TAGDECL([], [reload_cmds], [2])dnl 3410])# _LT_CMD_RELOAD 3411 3412 3413# _LT_PATH_DD 3414# ----------- 3415# find a working dd 3416m4_defun([_LT_PATH_DD], 3417[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3418[printf 0123456789abcdef0123456789abcdef >conftest.i 3419cat conftest.i conftest.i >conftest2.i 3420: ${lt_DD:=$DD} 3421AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3422[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3423 cmp -s conftest.i conftest.out \ 3424 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3425fi]) 3426rm -f conftest.i conftest2.i conftest.out]) 3427])# _LT_PATH_DD 3428 3429 3430# _LT_CMD_TRUNCATE 3431# ---------------- 3432# find command to truncate a binary pipe 3433m4_defun([_LT_CMD_TRUNCATE], 3434[m4_require([_LT_PATH_DD]) 3435AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3436[printf 0123456789abcdef0123456789abcdef >conftest.i 3437cat conftest.i conftest.i >conftest2.i 3438lt_cv_truncate_bin= 3439if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3440 cmp -s conftest.i conftest.out \ 3441 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3442fi 3443rm -f conftest.i conftest2.i conftest.out 3444test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3445_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3446 [Command to truncate a binary pipe]) 3447])# _LT_CMD_TRUNCATE 3448 3449 3450# _LT_CHECK_MAGIC_METHOD 3451# ---------------------- 3452# how to check for library dependencies 3453# -- PORTME fill in with the dynamic library characteristics 3454m4_defun([_LT_CHECK_MAGIC_METHOD], 3455[m4_require([_LT_DECL_EGREP]) 3456m4_require([_LT_DECL_OBJDUMP]) 3457AC_CACHE_CHECK([how to recognize dependent libraries], 3458lt_cv_deplibs_check_method, 3459[lt_cv_file_magic_cmd='$MAGIC_CMD' 3460lt_cv_file_magic_test_file= 3461lt_cv_deplibs_check_method='unknown' 3462# Need to set the preceding variable on all platforms that support 3463# interlibrary dependencies. 3464# 'none' -- dependencies not supported. 3465# 'unknown' -- same as none, but documents that we really don't know. 3466# 'pass_all' -- all dependencies passed with no checks. 3467# 'test_compile' -- check by making test program. 3468# 'file_magic [[regex]]' -- check by looking for files in library path 3469# that responds to the $file_magic_cmd with a given extended regex. 3470# If you have 'file' or equivalent on your system and you're not sure 3471# whether 'pass_all' will *always* work, you probably want this one. 3472 3473case $host_os in 3474aix[[4-9]]*) 3475 lt_cv_deplibs_check_method=pass_all 3476 ;; 3477 3478beos*) 3479 lt_cv_deplibs_check_method=pass_all 3480 ;; 3481 3482bsdi[[45]]*) 3483 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3484 lt_cv_file_magic_cmd='/usr/bin/file -L' 3485 lt_cv_file_magic_test_file=/shlib/libc.so 3486 ;; 3487 3488cygwin*) 3489 # func_win32_libid is a shell function defined in ltmain.sh 3490 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3491 lt_cv_file_magic_cmd='func_win32_libid' 3492 ;; 3493 3494mingw* | pw32*) 3495 # Base MSYS/MinGW do not provide the 'file' command needed by 3496 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3497 # unless we find 'file', for example because we are cross-compiling. 3498 if ( file / ) >/dev/null 2>&1; then 3499 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3500 lt_cv_file_magic_cmd='func_win32_libid' 3501 else 3502 # Keep this pattern in sync with the one in func_win32_libid. 3503 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3504 lt_cv_file_magic_cmd='$OBJDUMP -f' 3505 fi 3506 ;; 3507 3508cegcc*) 3509 # use the weaker test based on 'objdump'. See mingw*. 3510 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3511 lt_cv_file_magic_cmd='$OBJDUMP -f' 3512 ;; 3513 3514darwin* | rhapsody*) 3515 lt_cv_deplibs_check_method=pass_all 3516 ;; 3517 3518freebsd* | dragonfly*) 3519 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3520 case $host_cpu in 3521 i*86 ) 3522 # Not sure whether the presence of OpenBSD here was a mistake. 3523 # Let's accept both of them until this is cleared up. 3524 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3525 lt_cv_file_magic_cmd=/usr/bin/file 3526 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3527 ;; 3528 esac 3529 else 3530 lt_cv_deplibs_check_method=pass_all 3531 fi 3532 ;; 3533 3534haiku*) 3535 lt_cv_deplibs_check_method=pass_all 3536 ;; 3537 3538hpux10.20* | hpux11*) 3539 lt_cv_file_magic_cmd=/usr/bin/file 3540 case $host_cpu in 3541 ia64*) 3542 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3543 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3544 ;; 3545 hppa*64*) 3546 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 3547 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3548 ;; 3549 *) 3550 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3551 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3552 ;; 3553 esac 3554 ;; 3555 3556interix[[3-9]]*) 3557 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3558 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3559 ;; 3560 3561irix5* | irix6* | nonstopux*) 3562 case $LD in 3563 *-32|*"-32 ") libmagic=32-bit;; 3564 *-n32|*"-n32 ") libmagic=N32;; 3565 *-64|*"-64 ") libmagic=64-bit;; 3566 *) libmagic=never-match;; 3567 esac 3568 lt_cv_deplibs_check_method=pass_all 3569 ;; 3570 3571# This must be glibc/ELF. 3572linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3573 lt_cv_deplibs_check_method=pass_all 3574 ;; 3575 3576netbsd*) 3577 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3578 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3579 else 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3581 fi 3582 ;; 3583 3584newos6*) 3585 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3586 lt_cv_file_magic_cmd=/usr/bin/file 3587 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3588 ;; 3589 3590*nto* | *qnx*) 3591 lt_cv_deplibs_check_method=pass_all 3592 ;; 3593 3594openbsd* | bitrig*) 3595 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3596 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3597 else 3598 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3599 fi 3600 ;; 3601 3602osf3* | osf4* | osf5*) 3603 lt_cv_deplibs_check_method=pass_all 3604 ;; 3605 3606rdos*) 3607 lt_cv_deplibs_check_method=pass_all 3608 ;; 3609 3610solaris*) 3611 lt_cv_deplibs_check_method=pass_all 3612 ;; 3613 3614sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3615 lt_cv_deplibs_check_method=pass_all 3616 ;; 3617 3618sysv4 | sysv4.3*) 3619 case $host_vendor in 3620 motorola) 3621 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' 3622 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3623 ;; 3624 ncr) 3625 lt_cv_deplibs_check_method=pass_all 3626 ;; 3627 sequent) 3628 lt_cv_file_magic_cmd='/bin/file' 3629 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3630 ;; 3631 sni) 3632 lt_cv_file_magic_cmd='/bin/file' 3633 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3634 lt_cv_file_magic_test_file=/lib/libc.so 3635 ;; 3636 siemens) 3637 lt_cv_deplibs_check_method=pass_all 3638 ;; 3639 pc) 3640 lt_cv_deplibs_check_method=pass_all 3641 ;; 3642 esac 3643 ;; 3644 3645tpf*) 3646 lt_cv_deplibs_check_method=pass_all 3647 ;; 3648os2*) 3649 lt_cv_deplibs_check_method=pass_all 3650 ;; 3651esac 3652]) 3653 3654file_magic_glob= 3655want_nocaseglob=no 3656if test "$build" = "$host"; then 3657 case $host_os in 3658 mingw* | pw32*) 3659 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3660 want_nocaseglob=yes 3661 else 3662 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3663 fi 3664 ;; 3665 esac 3666fi 3667 3668file_magic_cmd=$lt_cv_file_magic_cmd 3669deplibs_check_method=$lt_cv_deplibs_check_method 3670test -z "$deplibs_check_method" && deplibs_check_method=unknown 3671 3672_LT_DECL([], [deplibs_check_method], [1], 3673 [Method to check whether dependent libraries are shared objects]) 3674_LT_DECL([], [file_magic_cmd], [1], 3675 [Command to use when deplibs_check_method = "file_magic"]) 3676_LT_DECL([], [file_magic_glob], [1], 3677 [How to find potential files when deplibs_check_method = "file_magic"]) 3678_LT_DECL([], [want_nocaseglob], [1], 3679 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3680])# _LT_CHECK_MAGIC_METHOD 3681 3682 3683# LT_PATH_NM 3684# ---------- 3685# find the pathname to a BSD- or MS-compatible name lister 3686AC_DEFUN([LT_PATH_NM], 3687[AC_REQUIRE([AC_PROG_CC])dnl 3688AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3689[if test -n "$NM"; then 3690 # Let the user override the test. 3691 lt_cv_path_NM=$NM 3692else 3693 lt_nm_to_check=${ac_tool_prefix}nm 3694 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3695 lt_nm_to_check="$lt_nm_to_check nm" 3696 fi 3697 for lt_tmp_nm in $lt_nm_to_check; do 3698 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3699 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3700 IFS=$lt_save_ifs 3701 test -z "$ac_dir" && ac_dir=. 3702 tmp_nm=$ac_dir/$lt_tmp_nm 3703 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3704 # Check to see if the nm accepts a BSD-compat flag. 3705 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3706 # nm: unknown option "B" ignored 3707 # Tru64's nm complains that /dev/null is an invalid object file 3708 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3709 case $build_os in 3710 mingw*) lt_bad_file=conftest.nm/nofile ;; 3711 *) lt_bad_file=/dev/null ;; 3712 esac 3713 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3714 *$lt_bad_file* | *'Invalid file or object type'*) 3715 lt_cv_path_NM="$tmp_nm -B" 3716 break 2 3717 ;; 3718 *) 3719 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3720 */dev/null*) 3721 lt_cv_path_NM="$tmp_nm -p" 3722 break 2 3723 ;; 3724 *) 3725 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3726 continue # so that we can try to find one that supports BSD flags 3727 ;; 3728 esac 3729 ;; 3730 esac 3731 fi 3732 done 3733 IFS=$lt_save_ifs 3734 done 3735 : ${lt_cv_path_NM=no} 3736fi]) 3737if test no != "$lt_cv_path_NM"; then 3738 NM=$lt_cv_path_NM 3739else 3740 # Didn't find any BSD compatible name lister, look for dumpbin. 3741 if test -n "$DUMPBIN"; then : 3742 # Let the user override the test. 3743 else 3744 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3745 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3746 *COFF*) 3747 DUMPBIN="$DUMPBIN -symbols -headers" 3748 ;; 3749 *) 3750 DUMPBIN=: 3751 ;; 3752 esac 3753 fi 3754 AC_SUBST([DUMPBIN]) 3755 if test : != "$DUMPBIN"; then 3756 NM=$DUMPBIN 3757 fi 3758fi 3759test -z "$NM" && NM=nm 3760AC_SUBST([NM]) 3761_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3762 3763AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3764 [lt_cv_nm_interface="BSD nm" 3765 echo "int some_variable = 0;" > conftest.$ac_ext 3766 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3767 (eval "$ac_compile" 2>conftest.err) 3768 cat conftest.err >&AS_MESSAGE_LOG_FD 3769 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3770 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3771 cat conftest.err >&AS_MESSAGE_LOG_FD 3772 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3773 cat conftest.out >&AS_MESSAGE_LOG_FD 3774 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3775 lt_cv_nm_interface="MS dumpbin" 3776 fi 3777 rm -f conftest*]) 3778])# LT_PATH_NM 3779 3780# Old names: 3781AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3782AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3783dnl aclocal-1.4 backwards compatibility: 3784dnl AC_DEFUN([AM_PROG_NM], []) 3785dnl AC_DEFUN([AC_PROG_NM], []) 3786 3787# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3788# -------------------------------- 3789# how to determine the name of the shared library 3790# associated with a specific link library. 3791# -- PORTME fill in with the dynamic library characteristics 3792m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3793[m4_require([_LT_DECL_EGREP]) 3794m4_require([_LT_DECL_OBJDUMP]) 3795m4_require([_LT_DECL_DLLTOOL]) 3796AC_CACHE_CHECK([how to associate runtime and link libraries], 3797lt_cv_sharedlib_from_linklib_cmd, 3798[lt_cv_sharedlib_from_linklib_cmd='unknown' 3799 3800case $host_os in 3801cygwin* | mingw* | pw32* | cegcc*) 3802 # two different shell functions defined in ltmain.sh; 3803 # decide which one to use based on capabilities of $DLLTOOL 3804 case `$DLLTOOL --help 2>&1` in 3805 *--identify-strict*) 3806 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3807 ;; 3808 *) 3809 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3810 ;; 3811 esac 3812 ;; 3813*) 3814 # fallback: assume linklib IS sharedlib 3815 lt_cv_sharedlib_from_linklib_cmd=$ECHO 3816 ;; 3817esac 3818]) 3819sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3820test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821 3822_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3823 [Command to associate shared and link libraries]) 3824])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3825 3826 3827# _LT_PATH_MANIFEST_TOOL 3828# ---------------------- 3829# locate the manifest tool 3830m4_defun([_LT_PATH_MANIFEST_TOOL], 3831[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3832test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3833AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3834 [lt_cv_path_mainfest_tool=no 3835 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3836 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3837 cat conftest.err >&AS_MESSAGE_LOG_FD 3838 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3839 lt_cv_path_mainfest_tool=yes 3840 fi 3841 rm -f conftest*]) 3842if test yes != "$lt_cv_path_mainfest_tool"; then 3843 MANIFEST_TOOL=: 3844fi 3845_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3846])# _LT_PATH_MANIFEST_TOOL 3847 3848 3849# _LT_DLL_DEF_P([FILE]) 3850# --------------------- 3851# True iff FILE is a Windows DLL '.def' file. 3852# Keep in sync with func_dll_def_p in the libtool script 3853AC_DEFUN([_LT_DLL_DEF_P], 3854[dnl 3855 test DEF = "`$SED -n dnl 3856 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3857 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3858 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3859 -e q dnl Only consider the first "real" line 3860 $1`" dnl 3861])# _LT_DLL_DEF_P 3862 3863 3864# LT_LIB_M 3865# -------- 3866# check for math library 3867AC_DEFUN([LT_LIB_M], 3868[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3869LIBM= 3870case $host in 3871*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3872 # These system don't have libm, or don't need it 3873 ;; 3874*-ncr-sysv4.3*) 3875 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3876 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3877 ;; 3878*) 3879 AC_CHECK_LIB(m, cos, LIBM=-lm) 3880 ;; 3881esac 3882AC_SUBST([LIBM]) 3883])# LT_LIB_M 3884 3885# Old name: 3886AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3887dnl aclocal-1.4 backwards compatibility: 3888dnl AC_DEFUN([AC_CHECK_LIBM], []) 3889 3890 3891# _LT_COMPILER_NO_RTTI([TAGNAME]) 3892# ------------------------------- 3893m4_defun([_LT_COMPILER_NO_RTTI], 3894[m4_require([_LT_TAG_COMPILER])dnl 3895 3896_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3897 3898if test yes = "$GCC"; then 3899 case $cc_basename in 3900 nvcc*) 3901 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3902 *) 3903 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3904 esac 3905 3906 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3907 lt_cv_prog_compiler_rtti_exceptions, 3908 [-fno-rtti -fno-exceptions], [], 3909 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3910fi 3911_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3912 [Compiler flag to turn off builtin functions]) 3913])# _LT_COMPILER_NO_RTTI 3914 3915 3916# _LT_CMD_GLOBAL_SYMBOLS 3917# ---------------------- 3918m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3919[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3920AC_REQUIRE([AC_PROG_CC])dnl 3921AC_REQUIRE([AC_PROG_AWK])dnl 3922AC_REQUIRE([LT_PATH_NM])dnl 3923AC_REQUIRE([LT_PATH_LD])dnl 3924m4_require([_LT_DECL_SED])dnl 3925m4_require([_LT_DECL_EGREP])dnl 3926m4_require([_LT_TAG_COMPILER])dnl 3927 3928# Check for command to grab the raw symbol name followed by C symbol from nm. 3929AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3930AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3931[ 3932# These are sane defaults that work on at least a few old systems. 3933# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3934 3935# Character class describing NM global symbol codes. 3936symcode='[[BCDEGRST]]' 3937 3938# Regexp to match symbols that can be accessed directly from C. 3939sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3940 3941# Define system-specific variables. 3942case $host_os in 3943aix*) 3944 symcode='[[BCDT]]' 3945 ;; 3946cygwin* | mingw* | pw32* | cegcc*) 3947 symcode='[[ABCDGISTW]]' 3948 ;; 3949hpux*) 3950 if test ia64 = "$host_cpu"; then 3951 symcode='[[ABCDEGRST]]' 3952 fi 3953 ;; 3954irix* | nonstopux*) 3955 symcode='[[BCDEGRST]]' 3956 ;; 3957osf*) 3958 symcode='[[BCDEGQRST]]' 3959 ;; 3960solaris*) 3961 symcode='[[BDRT]]' 3962 ;; 3963sco3.2v5*) 3964 symcode='[[DT]]' 3965 ;; 3966sysv4.2uw2*) 3967 symcode='[[DT]]' 3968 ;; 3969sysv5* | sco5v6* | unixware* | OpenUNIX*) 3970 symcode='[[ABDT]]' 3971 ;; 3972sysv4) 3973 symcode='[[DFNSTU]]' 3974 ;; 3975esac 3976 3977# If we're using GNU nm, then use its standard symbol codes. 3978case `$NM -V 2>&1` in 3979*GNU* | *'with BFD'*) 3980 symcode='[[ABCDGIRSTW]]' ;; 3981esac 3982 3983if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3984 # Gets list of data symbols to import. 3985 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3986 # Adjust the below global symbol transforms to fixup imported variables. 3987 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3988 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3989 lt_c_name_lib_hook="\ 3990 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3991 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3992else 3993 # Disable hooks by default. 3994 lt_cv_sys_global_symbol_to_import= 3995 lt_cdecl_hook= 3996 lt_c_name_hook= 3997 lt_c_name_lib_hook= 3998fi 3999 4000# Transform an extracted symbol line into a proper C declaration. 4001# Some systems (esp. on ia64) link data and code symbols differently, 4002# so use this general approach. 4003lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4004$lt_cdecl_hook\ 4005" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4006" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007 4008# Transform an extracted symbol line into symbol name and symbol address 4009lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4010$lt_c_name_hook\ 4011" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4013 4014# Transform an extracted symbol line into symbol name with lib prefix and 4015# symbol address. 4016lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4017$lt_c_name_lib_hook\ 4018" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4019" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4020" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021 4022# Handle CRLF in mingw tool chain 4023opt_cr= 4024case $build_os in 4025mingw*) 4026 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4027 ;; 4028esac 4029 4030# Try without a prefix underscore, then with it. 4031for ac_symprfx in "" "_"; do 4032 4033 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4034 symxfrm="\\1 $ac_symprfx\\2 \\2" 4035 4036 # Write the raw and C identifiers. 4037 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4038 # Fake it for dumpbin and say T for any non-static function, 4039 # D for any global variable and I for any imported variable. 4040 # Also find C++ and __fastcall symbols from MSVC++, 4041 # which start with @ or ?. 4042 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4043" {last_section=section; section=\$ 3};"\ 4044" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4045" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4046" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4047" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4048" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4049" \$ 0!~/External *\|/{next};"\ 4050" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4051" {if(hide[section]) next};"\ 4052" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4053" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4054" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4055" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4056" ' prfx=^$ac_symprfx]" 4057 else 4058 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4059 fi 4060 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4061 4062 # Check to see that the pipe works correctly. 4063 pipe_works=no 4064 4065 rm -f conftest* 4066 cat > conftest.$ac_ext <<_LT_EOF 4067#ifdef __cplusplus 4068extern "C" { 4069#endif 4070char nm_test_var; 4071void nm_test_func(void); 4072void nm_test_func(void){} 4073#ifdef __cplusplus 4074} 4075#endif 4076int main(){nm_test_var='a';nm_test_func();return(0);} 4077_LT_EOF 4078 4079 if AC_TRY_EVAL(ac_compile); then 4080 # Now try to grab the symbols. 4081 nlist=conftest.nm 4082 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4083 # Try sorting and uniquifying the output. 4084 if sort "$nlist" | uniq > "$nlist"T; then 4085 mv -f "$nlist"T "$nlist" 4086 else 4087 rm -f "$nlist"T 4088 fi 4089 4090 # Make sure that we snagged all the symbols we need. 4091 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4092 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4093 cat <<_LT_EOF > conftest.$ac_ext 4094/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4095#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4096/* DATA imports from DLLs on WIN32 can't be const, because runtime 4097 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4098# define LT@&t@_DLSYM_CONST 4099#elif defined __osf__ 4100/* This system does not cope well with relocations in const data. */ 4101# define LT@&t@_DLSYM_CONST 4102#else 4103# define LT@&t@_DLSYM_CONST const 4104#endif 4105 4106#ifdef __cplusplus 4107extern "C" { 4108#endif 4109 4110_LT_EOF 4111 # Now generate the symbol file. 4112 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4113 4114 cat <<_LT_EOF >> conftest.$ac_ext 4115 4116/* The mapping between symbol names and symbols. */ 4117LT@&t@_DLSYM_CONST struct { 4118 const char *name; 4119 void *address; 4120} 4121lt__PROGRAM__LTX_preloaded_symbols[[]] = 4122{ 4123 { "@PROGRAM@", (void *) 0 }, 4124_LT_EOF 4125 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4126 cat <<\_LT_EOF >> conftest.$ac_ext 4127 {0, (void *) 0} 4128}; 4129 4130/* This works around a problem in FreeBSD linker */ 4131#ifdef FREEBSD_WORKAROUND 4132static const void *lt_preloaded_setup() { 4133 return lt__PROGRAM__LTX_preloaded_symbols; 4134} 4135#endif 4136 4137#ifdef __cplusplus 4138} 4139#endif 4140_LT_EOF 4141 # Now try linking the two files. 4142 mv conftest.$ac_objext conftstm.$ac_objext 4143 lt_globsym_save_LIBS=$LIBS 4144 lt_globsym_save_CFLAGS=$CFLAGS 4145 LIBS=conftstm.$ac_objext 4146 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4147 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4148 pipe_works=yes 4149 fi 4150 LIBS=$lt_globsym_save_LIBS 4151 CFLAGS=$lt_globsym_save_CFLAGS 4152 else 4153 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4154 fi 4155 else 4156 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4157 fi 4158 else 4159 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160 fi 4161 else 4162 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4163 cat conftest.$ac_ext >&5 4164 fi 4165 rm -rf conftest* conftst* 4166 4167 # Do not use the global_symbol_pipe unless it works. 4168 if test yes = "$pipe_works"; then 4169 break 4170 else 4171 lt_cv_sys_global_symbol_pipe= 4172 fi 4173done 4174]) 4175if test -z "$lt_cv_sys_global_symbol_pipe"; then 4176 lt_cv_sys_global_symbol_to_cdecl= 4177fi 4178if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4179 AC_MSG_RESULT(failed) 4180else 4181 AC_MSG_RESULT(ok) 4182fi 4183 4184# Response file support. 4185if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4186 nm_file_list_spec='@' 4187elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4188 nm_file_list_spec='@' 4189fi 4190 4191_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4192 [Take the output of nm and produce a listing of raw symbols and C names]) 4193_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4194 [Transform the output of nm in a proper C declaration]) 4195_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4196 [Transform the output of nm into a list of symbols to manually relocate]) 4197_LT_DECL([global_symbol_to_c_name_address], 4198 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4199 [Transform the output of nm in a C name address pair]) 4200_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4201 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4202 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4203_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4204 [The name lister interface]) 4205_LT_DECL([], [nm_file_list_spec], [1], 4206 [Specify filename containing input files for $NM]) 4207]) # _LT_CMD_GLOBAL_SYMBOLS 4208 4209 4210# _LT_COMPILER_PIC([TAGNAME]) 4211# --------------------------- 4212m4_defun([_LT_COMPILER_PIC], 4213[m4_require([_LT_TAG_COMPILER])dnl 4214_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4215_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4216_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217 4218m4_if([$1], [CXX], [ 4219 # C++ specific cases for pic, static, wl, etc. 4220 if test yes = "$GXX"; then 4221 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4223 4224 case $host_os in 4225 aix*) 4226 # All AIX code is PIC. 4227 if test ia64 = "$host_cpu"; then 4228 # AIX 5 now supports IA64 processor 4229 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4230 fi 4231 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232 ;; 4233 4234 amigaos*) 4235 case $host_cpu in 4236 powerpc) 4237 # see comment about AmigaOS4 .so support 4238 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4239 ;; 4240 m68k) 4241 # FIXME: we need at least 68020 code to build shared libraries, but 4242 # adding the '-m68020' flag to GCC prevents building anything better, 4243 # like '-m68040'. 4244 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4245 ;; 4246 esac 4247 ;; 4248 4249 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4250 # PIC is the default for these OSes. 4251 ;; 4252 mingw* | cygwin* | os2* | pw32* | cegcc*) 4253 # This hack is so that the source file can tell whether it is being 4254 # built for inclusion in a dll (and should export symbols for example). 4255 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4256 # (--disable-auto-import) libraries 4257 m4_if([$1], [GCJ], [], 4258 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4259 case $host_os in 4260 os2*) 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4262 ;; 4263 esac 4264 ;; 4265 darwin* | rhapsody*) 4266 # PIC is the default on this platform 4267 # Common symbols not allowed in MH_DYLIB files 4268 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4269 ;; 4270 *djgpp*) 4271 # DJGPP does not support shared libraries at all 4272 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4273 ;; 4274 haiku*) 4275 # PIC is the default for Haiku. 4276 # The "-static" flag exists, but is broken. 4277 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4278 ;; 4279 interix[[3-9]]*) 4280 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4281 # Instead, we relocate shared libraries at runtime. 4282 ;; 4283 sysv4*MP*) 4284 if test -d /usr/nec; then 4285 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4286 fi 4287 ;; 4288 hpux*) 4289 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4290 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4291 # sets the default TLS model and affects inlining. 4292 case $host_cpu in 4293 hppa*64*) 4294 ;; 4295 *) 4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4297 ;; 4298 esac 4299 ;; 4300 *qnx* | *nto*) 4301 # QNX uses GNU C++, but need to define -shared option too, otherwise 4302 # it will coredump. 4303 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4304 ;; 4305 *) 4306 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307 ;; 4308 esac 4309 else 4310 case $host_os in 4311 aix[[4-9]]*) 4312 # All AIX code is PIC. 4313 if test ia64 = "$host_cpu"; then 4314 # AIX 5 now supports IA64 processor 4315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4316 else 4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4318 fi 4319 ;; 4320 chorus*) 4321 case $cc_basename in 4322 cxch68*) 4323 # Green Hills C++ Compiler 4324 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 4325 ;; 4326 esac 4327 ;; 4328 mingw* | cygwin* | os2* | pw32* | cegcc*) 4329 # This hack is so that the source file can tell whether it is being 4330 # built for inclusion in a dll (and should export symbols for example). 4331 m4_if([$1], [GCJ], [], 4332 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333 ;; 4334 dgux*) 4335 case $cc_basename in 4336 ec++*) 4337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4338 ;; 4339 ghcx*) 4340 # Green Hills C++ Compiler 4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4342 ;; 4343 *) 4344 ;; 4345 esac 4346 ;; 4347 freebsd* | dragonfly*) 4348 # FreeBSD uses GNU C++ 4349 ;; 4350 hpux9* | hpux10* | hpux11*) 4351 case $cc_basename in 4352 CC*) 4353 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4355 if test ia64 != "$host_cpu"; then 4356 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4357 fi 4358 ;; 4359 aCC*) 4360 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4361 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4362 case $host_cpu in 4363 hppa*64*|ia64*) 4364 # +Z the default 4365 ;; 4366 *) 4367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4368 ;; 4369 esac 4370 ;; 4371 *) 4372 ;; 4373 esac 4374 ;; 4375 interix*) 4376 # This is c89, which is MS Visual C++ (no shared libs) 4377 # Anyone wants to do a port? 4378 ;; 4379 irix5* | irix6* | nonstopux*) 4380 case $cc_basename in 4381 CC*) 4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4384 # CC pic flag -KPIC is the default. 4385 ;; 4386 *) 4387 ;; 4388 esac 4389 ;; 4390 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4391 case $cc_basename in 4392 KCC*) 4393 # KAI C++ Compiler 4394 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4395 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4396 ;; 4397 ecpc* ) 4398 # old Intel C++ for x86_64, which still supported -KPIC. 4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402 ;; 4403 icpc* ) 4404 # Intel C++, used to be incompatible with GCC. 4405 # ICC 10 doesn't accept -KPIC any more. 4406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4409 ;; 4410 pgCC* | pgcpp*) 4411 # Portland Group C++ compiler 4412 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4414 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415 ;; 4416 cxx*) 4417 # Compaq C++ 4418 # Make sure the PIC flag is empty. It appears that all Alpha 4419 # Linux and Compaq Tru64 Unix objects are PIC. 4420 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4421 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4422 ;; 4423 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4424 # IBM XL 8.0, 9.0 on PPC and BlueGene 4425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4427 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4428 ;; 4429 *) 4430 case `$CC -V 2>&1 | sed 5q` in 4431 *Sun\ C*) 4432 # Sun C++ 5.9 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4436 ;; 4437 esac 4438 ;; 4439 esac 4440 ;; 4441 lynxos*) 4442 ;; 4443 m88k*) 4444 ;; 4445 mvs*) 4446 case $cc_basename in 4447 cxx*) 4448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4449 ;; 4450 *) 4451 ;; 4452 esac 4453 ;; 4454 netbsd*) 4455 ;; 4456 *qnx* | *nto*) 4457 # QNX uses GNU C++, but need to define -shared option too, otherwise 4458 # it will coredump. 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4460 ;; 4461 osf3* | osf4* | osf5*) 4462 case $cc_basename in 4463 KCC*) 4464 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4465 ;; 4466 RCC*) 4467 # Rational C++ 2.4.1 4468 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4469 ;; 4470 cxx*) 4471 # Digital/Compaq C++ 4472 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4473 # Make sure the PIC flag is empty. It appears that all Alpha 4474 # Linux and Compaq Tru64 Unix objects are PIC. 4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4477 ;; 4478 *) 4479 ;; 4480 esac 4481 ;; 4482 psos*) 4483 ;; 4484 solaris*) 4485 case $cc_basename in 4486 CC* | sunCC*) 4487 # Sun C++ 4.2, 5.x and Centerline C++ 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4490 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4491 ;; 4492 gcx*) 4493 # Green Hills C++ Compiler 4494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4495 ;; 4496 *) 4497 ;; 4498 esac 4499 ;; 4500 sunos4*) 4501 case $cc_basename in 4502 CC*) 4503 # Sun C++ 4.x 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4506 ;; 4507 lcc*) 4508 # Lucid 4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4510 ;; 4511 *) 4512 ;; 4513 esac 4514 ;; 4515 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4516 case $cc_basename in 4517 CC*) 4518 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4519 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4520 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4521 ;; 4522 esac 4523 ;; 4524 tandem*) 4525 case $cc_basename in 4526 NCC*) 4527 # NonStop-UX NCC 3.20 4528 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4529 ;; 4530 *) 4531 ;; 4532 esac 4533 ;; 4534 vxworks*) 4535 ;; 4536 *) 4537 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4538 ;; 4539 esac 4540 fi 4541], 4542[ 4543 if test yes = "$GCC"; then 4544 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4546 4547 case $host_os in 4548 aix*) 4549 # All AIX code is PIC. 4550 if test ia64 = "$host_cpu"; then 4551 # AIX 5 now supports IA64 processor 4552 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4553 fi 4554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555 ;; 4556 4557 amigaos*) 4558 case $host_cpu in 4559 powerpc) 4560 # see comment about AmigaOS4 .so support 4561 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4562 ;; 4563 m68k) 4564 # FIXME: we need at least 68020 code to build shared libraries, but 4565 # adding the '-m68020' flag to GCC prevents building anything better, 4566 # like '-m68040'. 4567 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4568 ;; 4569 esac 4570 ;; 4571 4572 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4573 # PIC is the default for these OSes. 4574 ;; 4575 4576 mingw* | cygwin* | pw32* | os2* | cegcc*) 4577 # This hack is so that the source file can tell whether it is being 4578 # built for inclusion in a dll (and should export symbols for example). 4579 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4580 # (--disable-auto-import) libraries 4581 m4_if([$1], [GCJ], [], 4582 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4583 case $host_os in 4584 os2*) 4585 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4586 ;; 4587 esac 4588 ;; 4589 4590 darwin* | rhapsody*) 4591 # PIC is the default on this platform 4592 # Common symbols not allowed in MH_DYLIB files 4593 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4594 ;; 4595 4596 haiku*) 4597 # PIC is the default for Haiku. 4598 # The "-static" flag exists, but is broken. 4599 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4600 ;; 4601 4602 hpux*) 4603 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4604 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4605 # sets the default TLS model and affects inlining. 4606 case $host_cpu in 4607 hppa*64*) 4608 # +Z the default 4609 ;; 4610 *) 4611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4612 ;; 4613 esac 4614 ;; 4615 4616 interix[[3-9]]*) 4617 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4618 # Instead, we relocate shared libraries at runtime. 4619 ;; 4620 4621 msdosdjgpp*) 4622 # Just because we use GCC doesn't mean we suddenly get shared libraries 4623 # on systems that don't support them. 4624 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4625 enable_shared=no 4626 ;; 4627 4628 *nto* | *qnx*) 4629 # QNX uses GNU C++, but need to define -shared option too, otherwise 4630 # it will coredump. 4631 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4632 ;; 4633 4634 sysv4*MP*) 4635 if test -d /usr/nec; then 4636 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4637 fi 4638 ;; 4639 4640 *) 4641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4642 ;; 4643 esac 4644 4645 case $cc_basename in 4646 nvcc*) # Cuda Compiler Driver 2.2 4647 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4648 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4649 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4650 fi 4651 ;; 4652 esac 4653 else 4654 # PORTME Check for flag to pass linker flags through the system compiler. 4655 case $host_os in 4656 aix*) 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4658 if test ia64 = "$host_cpu"; then 4659 # AIX 5 now supports IA64 processor 4660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4661 else 4662 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4663 fi 4664 ;; 4665 4666 darwin* | rhapsody*) 4667 # PIC is the default on this platform 4668 # Common symbols not allowed in MH_DYLIB files 4669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4670 case $cc_basename in 4671 nagfor*) 4672 # NAG Fortran compiler 4673 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4675 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4676 ;; 4677 esac 4678 ;; 4679 4680 mingw* | cygwin* | pw32* | os2* | cegcc*) 4681 # This hack is so that the source file can tell whether it is being 4682 # built for inclusion in a dll (and should export symbols for example). 4683 m4_if([$1], [GCJ], [], 4684 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4685 case $host_os in 4686 os2*) 4687 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4688 ;; 4689 esac 4690 ;; 4691 4692 hpux9* | hpux10* | hpux11*) 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4694 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4695 # not for PA HP-UX. 4696 case $host_cpu in 4697 hppa*64*|ia64*) 4698 # +Z the default 4699 ;; 4700 *) 4701 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4702 ;; 4703 esac 4704 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4705 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4706 ;; 4707 4708 irix5* | irix6* | nonstopux*) 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4710 # PIC (with -KPIC) is the default. 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4712 ;; 4713 4714 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4715 case $cc_basename in 4716 # old Intel for x86_64, which still supported -KPIC. 4717 ecc*) 4718 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4720 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721 ;; 4722 # icc used to be incompatible with GCC. 4723 # ICC 10 doesn't accept -KPIC any more. 4724 icc* | ifort*) 4725 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4726 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4727 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4728 ;; 4729 # Lahey Fortran 8.1. 4730 lf95*) 4731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4733 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4734 ;; 4735 nagfor*) 4736 # NAG Fortran compiler 4737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4740 ;; 4741 tcc*) 4742 # Fabrice Bellard et al's Tiny C Compiler 4743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4746 ;; 4747 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4748 # Portland Group compilers (*not* the Pentium gcc compiler, 4749 # which looks to be a dead project) 4750 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4751 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4752 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4753 ;; 4754 ccc*) 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756 # All Alpha code is PIC. 4757 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4758 ;; 4759 xl* | bgxl* | bgf* | mpixl*) 4760 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4762 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4764 ;; 4765 *) 4766 case `$CC -V 2>&1 | sed 5q` in 4767 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4768 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4769 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4770 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4772 ;; 4773 *Sun\ F* | *Sun*Fortran*) 4774 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4775 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4777 ;; 4778 *Sun\ C*) 4779 # Sun C 5.9 4780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4781 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4782 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4783 ;; 4784 *Intel*\ [[CF]]*Compiler*) 4785 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4788 ;; 4789 *Portland\ Group*) 4790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4792 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4793 ;; 4794 esac 4795 ;; 4796 esac 4797 ;; 4798 4799 newsos6) 4800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4802 ;; 4803 4804 *nto* | *qnx*) 4805 # QNX uses GNU C++, but need to define -shared option too, otherwise 4806 # it will coredump. 4807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4808 ;; 4809 4810 osf3* | osf4* | osf5*) 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812 # All OSF/1 code is PIC. 4813 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4814 ;; 4815 4816 rdos*) 4817 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4818 ;; 4819 4820 solaris*) 4821 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4823 case $cc_basename in 4824 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4825 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4826 *) 4827 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4828 esac 4829 ;; 4830 4831 sunos4*) 4832 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4833 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4834 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4835 ;; 4836 4837 sysv4 | sysv4.2uw2* | sysv4.3*) 4838 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4840 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4841 ;; 4842 4843 sysv4*MP*) 4844 if test -d /usr/nec; then 4845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4846 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847 fi 4848 ;; 4849 4850 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4851 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4854 ;; 4855 4856 unicos*) 4857 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4858 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4859 ;; 4860 4861 uts4*) 4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864 ;; 4865 4866 *) 4867 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868 ;; 4869 esac 4870 fi 4871]) 4872case $host_os in 4873 # For platforms that do not support PIC, -DPIC is meaningless: 4874 *djgpp*) 4875 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4876 ;; 4877 *) 4878 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4879 ;; 4880esac 4881 4882AC_CACHE_CHECK([for $compiler option to produce PIC], 4883 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4884 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4885_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4886 4887# 4888# Check to make sure the PIC flag actually works. 4889# 4890if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4891 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4892 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4893 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4894 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4895 "" | " "*) ;; 4896 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4897 esac], 4898 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4899 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4900fi 4901_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4902 [Additional compiler flags for building library objects]) 4903 4904_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4905 [How to pass a linker flag through the compiler]) 4906# 4907# Check to make sure the static flag actually works. 4908# 4909wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4910_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4911 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4912 $lt_tmp_static_flag, 4913 [], 4914 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4915_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4916 [Compiler flag to prevent dynamic linking]) 4917])# _LT_COMPILER_PIC 4918 4919 4920# _LT_LINKER_SHLIBS([TAGNAME]) 4921# ---------------------------- 4922# See if the linker supports building shared libraries. 4923m4_defun([_LT_LINKER_SHLIBS], 4924[AC_REQUIRE([LT_PATH_LD])dnl 4925AC_REQUIRE([LT_PATH_NM])dnl 4926m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4927m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928m4_require([_LT_DECL_EGREP])dnl 4929m4_require([_LT_DECL_SED])dnl 4930m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4931m4_require([_LT_TAG_COMPILER])dnl 4932AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4933m4_if([$1], [CXX], [ 4934 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4935 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4936 case $host_os in 4937 aix[[4-9]]*) 4938 # If we're using GNU nm, then we don't want the "-C" option. 4939 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4940 # Without the "-l" option, or with the "-B" option, AIX nm treats 4941 # weak defined symbols like other global defined symbols, whereas 4942 # GNU nm marks them as "W". 4943 # While the 'weak' keyword is ignored in the Export File, we need 4944 # it in the Import File for the 'aix-soname' feature, so we have 4945 # to replace the "-B" option with "-P" for AIX nm. 4946 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4947 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 4948 else 4949 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4950 fi 4951 ;; 4952 pw32*) 4953 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4954 ;; 4955 cygwin* | mingw* | cegcc*) 4956 case $cc_basename in 4957 cl*) 4958 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4959 ;; 4960 *) 4961 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4962 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4963 ;; 4964 esac 4965 ;; 4966 *) 4967 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4968 ;; 4969 esac 4970], [ 4971 runpath_var= 4972 _LT_TAGVAR(allow_undefined_flag, $1)= 4973 _LT_TAGVAR(always_export_symbols, $1)=no 4974 _LT_TAGVAR(archive_cmds, $1)= 4975 _LT_TAGVAR(archive_expsym_cmds, $1)= 4976 _LT_TAGVAR(compiler_needs_object, $1)=no 4977 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4978 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4979 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4980 _LT_TAGVAR(hardcode_automatic, $1)=no 4981 _LT_TAGVAR(hardcode_direct, $1)=no 4982 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4983 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4984 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4985 _LT_TAGVAR(hardcode_minus_L, $1)=no 4986 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4987 _LT_TAGVAR(inherit_rpath, $1)=no 4988 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4989 _LT_TAGVAR(module_cmds, $1)= 4990 _LT_TAGVAR(module_expsym_cmds, $1)= 4991 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4992 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4993 _LT_TAGVAR(thread_safe_flag_spec, $1)= 4994 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4995 # include_expsyms should be a list of space-separated symbols to be *always* 4996 # included in the symbol list 4997 _LT_TAGVAR(include_expsyms, $1)= 4998 # exclude_expsyms can be an extended regexp of symbols to exclude 4999 # it will be wrapped by ' (' and ')$', so one must not match beginning or 5000 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5001 # as well as any symbol that contains 'd'. 5002 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5003 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5004 # platforms (ab)use it in PIC code, but their linkers get confused if 5005 # the symbol is explicitly referenced. Since portable code cannot 5006 # rely on this symbol name, it's probably fine to never include it in 5007 # preloaded symbol tables. 5008 # Exclude shared library initialization/finalization symbols. 5009dnl Note also adjust exclude_expsyms for C++ above. 5010 extract_expsyms_cmds= 5011 5012 case $host_os in 5013 cygwin* | mingw* | pw32* | cegcc*) 5014 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5015 # When not using gcc, we currently assume that we are using 5016 # Microsoft Visual C++. 5017 if test yes != "$GCC"; then 5018 with_gnu_ld=no 5019 fi 5020 ;; 5021 interix*) 5022 # we just hope/assume this is gcc and not c89 (= MSVC++) 5023 with_gnu_ld=yes 5024 ;; 5025 openbsd* | bitrig*) 5026 with_gnu_ld=no 5027 ;; 5028 esac 5029 5030 _LT_TAGVAR(ld_shlibs, $1)=yes 5031 5032 # On some targets, GNU ld is compatible enough with the native linker 5033 # that we're better off using the native interface for both. 5034 lt_use_gnu_ld_interface=no 5035 if test yes = "$with_gnu_ld"; then 5036 case $host_os in 5037 aix*) 5038 # The AIX port of GNU ld has always aspired to compatibility 5039 # with the native linker. However, as the warning in the GNU ld 5040 # block says, versions before 2.19.5* couldn't really create working 5041 # shared libraries, regardless of the interface used. 5042 case `$LD -v 2>&1` in 5043 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5044 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5045 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5046 *) 5047 lt_use_gnu_ld_interface=yes 5048 ;; 5049 esac 5050 ;; 5051 *) 5052 lt_use_gnu_ld_interface=yes 5053 ;; 5054 esac 5055 fi 5056 5057 if test yes = "$lt_use_gnu_ld_interface"; then 5058 # If archive_cmds runs LD, not CC, wlarc should be empty 5059 wlarc='$wl' 5060 5061 # Set some defaults for GNU ld with shared library support. These 5062 # are reset later if shared libraries are not supported. Putting them 5063 # here allows them to be overridden if necessary. 5064 runpath_var=LD_RUN_PATH 5065 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5066 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5067 # ancient GNU ld didn't support --whole-archive et. al. 5068 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5069 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5070 else 5071 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5072 fi 5073 supports_anon_versioning=no 5074 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5075 *GNU\ gold*) supports_anon_versioning=yes ;; 5076 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5077 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5078 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5079 *\ 2.11.*) ;; # other 2.11 versions 5080 *) supports_anon_versioning=yes ;; 5081 esac 5082 5083 # See if GNU ld supports shared libraries. 5084 case $host_os in 5085 aix[[3-9]]*) 5086 # On AIX/PPC, the GNU linker is very broken 5087 if test ia64 != "$host_cpu"; then 5088 _LT_TAGVAR(ld_shlibs, $1)=no 5089 cat <<_LT_EOF 1>&2 5090 5091*** Warning: the GNU linker, at least up to release 2.19, is reported 5092*** to be unable to reliably create shared libraries on AIX. 5093*** Therefore, libtool is disabling shared libraries support. If you 5094*** really care for shared libraries, you may want to install binutils 5095*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5096*** You will then need to restart the configuration process. 5097 5098_LT_EOF 5099 fi 5100 ;; 5101 5102 amigaos*) 5103 case $host_cpu in 5104 powerpc) 5105 # see comment about AmigaOS4 .so support 5106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5107 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5108 ;; 5109 m68k) 5110 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 5111 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5112 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5113 ;; 5114 esac 5115 ;; 5116 5117 beos*) 5118 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5119 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5120 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5121 # support --undefined. This deserves some investigation. FIXME 5122 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5123 else 5124 _LT_TAGVAR(ld_shlibs, $1)=no 5125 fi 5126 ;; 5127 5128 cygwin* | mingw* | pw32* | cegcc*) 5129 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5130 # as there is no search path for DLLs. 5131 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5132 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5133 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5134 _LT_TAGVAR(always_export_symbols, $1)=no 5135 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5136 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 5137 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5138 5139 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5140 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5141 # If the export-symbols file already is a .def file, use it as 5142 # is; otherwise, prepend EXPORTS... 5143 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5144 cp $export_symbols $output_objdir/$soname.def; 5145 else 5146 echo EXPORTS > $output_objdir/$soname.def; 5147 cat $export_symbols >> $output_objdir/$soname.def; 5148 fi~ 5149 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5150 else 5151 _LT_TAGVAR(ld_shlibs, $1)=no 5152 fi 5153 ;; 5154 5155 haiku*) 5156 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5157 _LT_TAGVAR(link_all_deplibs, $1)=yes 5158 ;; 5159 5160 os2*) 5161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5162 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5163 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5164 shrext_cmds=.dll 5165 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5170 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5171 emximp -o $lib $output_objdir/$libname.def' 5172 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5173 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5174 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5175 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5176 prefix_cmds="$SED"~ 5177 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5178 prefix_cmds="$prefix_cmds -e 1d"; 5179 fi~ 5180 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5181 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5182 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5183 emximp -o $lib $output_objdir/$libname.def' 5184 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5185 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5186 ;; 5187 5188 interix[[3-9]]*) 5189 _LT_TAGVAR(hardcode_direct, $1)=no 5190 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5193 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5194 # Instead, shared libraries are loaded at an image base (0x10000000 by 5195 # default) and relocated if they conflict, which is a slow very memory 5196 # consuming and fragmenting process. To avoid this, we pick a random, 5197 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5198 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5199 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5200 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5201 ;; 5202 5203 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5204 tmp_diet=no 5205 if test linux-dietlibc = "$host_os"; then 5206 case $cc_basename in 5207 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5208 esac 5209 fi 5210 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5211 && test no = "$tmp_diet" 5212 then 5213 tmp_addflag=' $pic_flag' 5214 tmp_sharedflag='-shared' 5215 case $cc_basename,$host_cpu in 5216 pgcc*) # Portland Group C compiler 5217 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 5218 tmp_addflag=' $pic_flag' 5219 ;; 5220 pgf77* | pgf90* | pgf95* | pgfortran*) 5221 # Portland Group f77 and f90 compilers 5222 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 5223 tmp_addflag=' $pic_flag -Mnomain' ;; 5224 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5225 tmp_addflag=' -i_dynamic' ;; 5226 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5227 tmp_addflag=' -i_dynamic -nofor_main' ;; 5228 ifc* | ifort*) # Intel Fortran compiler 5229 tmp_addflag=' -nofor_main' ;; 5230 lf95*) # Lahey Fortran 8.1 5231 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5232 tmp_sharedflag='--shared' ;; 5233 nagfor*) # NAGFOR 5.3 5234 tmp_sharedflag='-Wl,-shared' ;; 5235 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5236 tmp_sharedflag='-qmkshrobj' 5237 tmp_addflag= ;; 5238 nvcc*) # Cuda Compiler Driver 2.2 5239 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 5240 _LT_TAGVAR(compiler_needs_object, $1)=yes 5241 ;; 5242 esac 5243 case `$CC -V 2>&1 | sed 5q` in 5244 *Sun\ C*) # Sun C 5.9 5245 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 5246 _LT_TAGVAR(compiler_needs_object, $1)=yes 5247 tmp_sharedflag='-G' ;; 5248 *Sun\ F*) # Sun Fortran 8.3 5249 tmp_sharedflag='-G' ;; 5250 esac 5251 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5252 5253 if test yes = "$supports_anon_versioning"; then 5254 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5255 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5256 echo "local: *; };" >> $output_objdir/$libname.ver~ 5257 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5258 fi 5259 5260 case $cc_basename in 5261 tcc*) 5262 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5263 ;; 5264 xlf* | bgf* | bgxlf* | mpixlf*) 5265 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5266 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5268 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5269 if test yes = "$supports_anon_versioning"; then 5270 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5271 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5272 echo "local: *; };" >> $output_objdir/$libname.ver~ 5273 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5274 fi 5275 ;; 5276 esac 5277 else 5278 _LT_TAGVAR(ld_shlibs, $1)=no 5279 fi 5280 ;; 5281 5282 netbsd*) 5283 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5284 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5285 wlarc= 5286 else 5287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5288 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 5289 fi 5290 ;; 5291 5292 solaris*) 5293 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5294 _LT_TAGVAR(ld_shlibs, $1)=no 5295 cat <<_LT_EOF 1>&2 5296 5297*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5298*** create shared libraries on Solaris systems. Therefore, libtool 5299*** is disabling shared libraries support. We urge you to upgrade GNU 5300*** binutils to release 2.9.1 or newer. Another option is to modify 5301*** your PATH or compiler configuration so that the native linker is 5302*** used, and then restart. 5303 5304_LT_EOF 5305 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5306 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5307 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 5308 else 5309 _LT_TAGVAR(ld_shlibs, $1)=no 5310 fi 5311 ;; 5312 5313 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5314 case `$LD -v 2>&1` in 5315 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5316 _LT_TAGVAR(ld_shlibs, $1)=no 5317 cat <<_LT_EOF 1>&2 5318 5319*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5320*** reliably create shared libraries on SCO systems. Therefore, libtool 5321*** is disabling shared libraries support. We urge you to upgrade GNU 5322*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5323*** your PATH or compiler configuration so that the native linker is 5324*** used, and then restart. 5325 5326_LT_EOF 5327 ;; 5328 *) 5329 # For security reasons, it is highly recommended that you always 5330 # use absolute paths for naming shared libraries, and exclude the 5331 # DT_RUNPATH tag from executables and libraries. But doing so 5332 # requires that you compile everything twice, which is a pain. 5333 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5336 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 5337 else 5338 _LT_TAGVAR(ld_shlibs, $1)=no 5339 fi 5340 ;; 5341 esac 5342 ;; 5343 5344 sunos4*) 5345 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5346 wlarc= 5347 _LT_TAGVAR(hardcode_direct, $1)=yes 5348 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5349 ;; 5350 5351 *) 5352 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5354 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 5355 else 5356 _LT_TAGVAR(ld_shlibs, $1)=no 5357 fi 5358 ;; 5359 esac 5360 5361 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5362 runpath_var= 5363 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5364 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5365 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5366 fi 5367 else 5368 # PORTME fill in a description of your system's linker (not GNU ld) 5369 case $host_os in 5370 aix3*) 5371 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5372 _LT_TAGVAR(always_export_symbols, $1)=yes 5373 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 5374 # Note: this linker hardcodes the directories in LIBPATH if there 5375 # are no directories specified by -L. 5376 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5377 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5378 # Neither direct hardcoding nor static linking is supported with a 5379 # broken collect2. 5380 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5381 fi 5382 ;; 5383 5384 aix[[4-9]]*) 5385 if test ia64 = "$host_cpu"; then 5386 # On IA64, the linker does run time linking by default, so we don't 5387 # have to do anything special. 5388 aix_use_runtimelinking=no 5389 exp_sym_flag='-Bexport' 5390 no_entry_flag= 5391 else 5392 # If we're using GNU nm, then we don't want the "-C" option. 5393 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5394 # Without the "-l" option, or with the "-B" option, AIX nm treats 5395 # weak defined symbols like other global defined symbols, whereas 5396 # GNU nm marks them as "W". 5397 # While the 'weak' keyword is ignored in the Export File, we need 5398 # it in the Import File for the 'aix-soname' feature, so we have 5399 # to replace the "-B" option with "-P" for AIX nm. 5400 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5401 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5402 else 5403 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5404 fi 5405 aix_use_runtimelinking=no 5406 5407 # Test if we are trying to use run time linking or normal 5408 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5409 # have runtime linking enabled, and use it for executables. 5410 # For shared libraries, we enable/disable runtime linking 5411 # depending on the kind of the shared library created - 5412 # when "with_aix_soname,aix_use_runtimelinking" is: 5413 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5414 # "aix,yes" lib.so shared, rtl:yes, for executables 5415 # lib.a static archive 5416 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5417 # lib.a(lib.so.V) shared, rtl:no, for executables 5418 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5419 # lib.a(lib.so.V) shared, rtl:no 5420 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5421 # lib.a static archive 5422 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5423 for ld_flag in $LDFLAGS; do 5424 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5425 aix_use_runtimelinking=yes 5426 break 5427 fi 5428 done 5429 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5430 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5431 # so we don't have lib.a shared libs to link our executables. 5432 # We have to force runtime linking in this case. 5433 aix_use_runtimelinking=yes 5434 LDFLAGS="$LDFLAGS -Wl,-brtl" 5435 fi 5436 ;; 5437 esac 5438 5439 exp_sym_flag='-bexport' 5440 no_entry_flag='-bnoentry' 5441 fi 5442 5443 # When large executables or shared objects are built, AIX ld can 5444 # have problems creating the table of contents. If linking a library 5445 # or program results in "error TOC overflow" add -mminimal-toc to 5446 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5447 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5448 5449 _LT_TAGVAR(archive_cmds, $1)='' 5450 _LT_TAGVAR(hardcode_direct, $1)=yes 5451 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5452 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5453 _LT_TAGVAR(link_all_deplibs, $1)=yes 5454 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5455 case $with_aix_soname,$aix_use_runtimelinking in 5456 aix,*) ;; # traditional, no import file 5457 svr4,* | *,yes) # use import file 5458 # The Import File defines what to hardcode. 5459 _LT_TAGVAR(hardcode_direct, $1)=no 5460 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5461 ;; 5462 esac 5463 5464 if test yes = "$GCC"; then 5465 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5466 # We only want to do this on AIX 4.2 and lower, the check 5467 # below for broken collect2 doesn't work under 4.3+ 5468 collect2name=`$CC -print-prog-name=collect2` 5469 if test -f "$collect2name" && 5470 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5471 then 5472 # We have reworked collect2 5473 : 5474 else 5475 # We have old collect2 5476 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5477 # It fails to find uninstalled libraries when the uninstalled 5478 # path is not listed in the libpath. Setting hardcode_minus_L 5479 # to unsupported forces relinking 5480 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5482 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5483 fi 5484 ;; 5485 esac 5486 shared_flag='-shared' 5487 if test yes = "$aix_use_runtimelinking"; then 5488 shared_flag="$shared_flag "'$wl-G' 5489 fi 5490 # Need to ensure runtime linking is disabled for the traditional 5491 # shared library, or the linker may eventually find shared libraries 5492 # /with/ Import File - we do not want to mix them. 5493 shared_flag_aix='-shared' 5494 shared_flag_svr4='-shared $wl-G' 5495 else 5496 # not using gcc 5497 if test ia64 = "$host_cpu"; then 5498 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5499 # chokes on -Wl,-G. The following line is correct: 5500 shared_flag='-G' 5501 else 5502 if test yes = "$aix_use_runtimelinking"; then 5503 shared_flag='$wl-G' 5504 else 5505 shared_flag='$wl-bM:SRE' 5506 fi 5507 shared_flag_aix='$wl-bM:SRE' 5508 shared_flag_svr4='$wl-G' 5509 fi 5510 fi 5511 5512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5513 # It seems that -bexpall does not export symbols beginning with 5514 # underscore (_), so it is better to generate a list of symbols to export. 5515 _LT_TAGVAR(always_export_symbols, $1)=yes 5516 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5517 # Warning - without using the other runtime loading flags (-brtl), 5518 # -berok will link without error, but may produce a broken library. 5519 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5520 # Determine the default libpath from the value encoded in an 5521 # empty executable. 5522 _LT_SYS_MODULE_PATH_AIX([$1]) 5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5524 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 5525 else 5526 if test ia64 = "$host_cpu"; then 5527 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5528 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5529 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 5530 else 5531 # Determine the default libpath from the value encoded in an 5532 # empty executable. 5533 _LT_SYS_MODULE_PATH_AIX([$1]) 5534 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5535 # Warning - without using the other run time loading flags, 5536 # -berok will link without error, but may produce a broken library. 5537 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5538 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5539 if test yes = "$with_gnu_ld"; then 5540 # We only use this code for GNU lds that support --whole-archive. 5541 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5542 else 5543 # Exported symbols can be pulled into shared objects from archives 5544 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5545 fi 5546 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5547 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5548 # -brtl affects multiple linker settings, -berok does not and is overridden later 5549 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5550 if test svr4 != "$with_aix_soname"; then 5551 # This is similar to how AIX traditionally builds its shared libraries. 5552 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5553 fi 5554 if test aix != "$with_aix_soname"; then 5555 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5556 else 5557 # used by -dlpreopen to get the symbols 5558 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5559 fi 5560 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5561 fi 5562 fi 5563 ;; 5564 5565 amigaos*) 5566 case $host_cpu in 5567 powerpc) 5568 # see comment about AmigaOS4 .so support 5569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5570 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5571 ;; 5572 m68k) 5573 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 5574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5575 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5576 ;; 5577 esac 5578 ;; 5579 5580 bsdi[[45]]*) 5581 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5582 ;; 5583 5584 cygwin* | mingw* | pw32* | cegcc*) 5585 # When not using gcc, we currently assume that we are using 5586 # Microsoft Visual C++. 5587 # hardcode_libdir_flag_spec is actually meaningless, as there is 5588 # no search path for DLLs. 5589 case $cc_basename in 5590 cl*) 5591 # Native MSVC 5592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5593 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5594 _LT_TAGVAR(always_export_symbols, $1)=yes 5595 _LT_TAGVAR(file_list_spec, $1)='@' 5596 # Tell ltmain to make .lib files, not .a files. 5597 libext=lib 5598 # Tell ltmain to make .dll files, not .so files. 5599 shrext_cmds=.dll 5600 # FIXME: Setting linknames here is a bad hack. 5601 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5602 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5603 cp "$export_symbols" "$output_objdir/$soname.def"; 5604 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5605 else 5606 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5607 fi~ 5608 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5609 linknames=' 5610 # The linker will not automatically build a static lib if we build a DLL. 5611 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5612 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5613 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5614 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5615 # Don't use ranlib 5616 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5617 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5618 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5619 case $lt_outputfile in 5620 *.exe|*.EXE) ;; 5621 *) 5622 lt_outputfile=$lt_outputfile.exe 5623 lt_tool_outputfile=$lt_tool_outputfile.exe 5624 ;; 5625 esac~ 5626 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5627 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5628 $RM "$lt_outputfile.manifest"; 5629 fi' 5630 ;; 5631 *) 5632 # Assume MSVC wrapper 5633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5634 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5635 # Tell ltmain to make .lib files, not .a files. 5636 libext=lib 5637 # Tell ltmain to make .dll files, not .so files. 5638 shrext_cmds=.dll 5639 # FIXME: Setting linknames here is a bad hack. 5640 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5641 # The linker will automatically build a .lib file if we build a DLL. 5642 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5643 # FIXME: Should let the user specify the lib program. 5644 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5645 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5646 ;; 5647 esac 5648 ;; 5649 5650 darwin* | rhapsody*) 5651 _LT_DARWIN_LINKER_FEATURES($1) 5652 ;; 5653 5654 dgux*) 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5657 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658 ;; 5659 5660 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5661 # support. Future versions do this automatically, but an explicit c++rt0.o 5662 # does not break anything, and helps significantly (at the cost of a little 5663 # extra space). 5664 freebsd2.2*) 5665 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5667 _LT_TAGVAR(hardcode_direct, $1)=yes 5668 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5669 ;; 5670 5671 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5672 freebsd2.*) 5673 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5674 _LT_TAGVAR(hardcode_direct, $1)=yes 5675 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5676 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5677 ;; 5678 5679 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5680 freebsd* | dragonfly*) 5681 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5683 _LT_TAGVAR(hardcode_direct, $1)=yes 5684 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5685 ;; 5686 5687 hpux9*) 5688 if test yes = "$GCC"; then 5689 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5690 else 5691 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5692 fi 5693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5694 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5695 _LT_TAGVAR(hardcode_direct, $1)=yes 5696 5697 # hardcode_minus_L: Not really in the search PATH, 5698 # but as the default location of the library. 5699 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5701 ;; 5702 5703 hpux10*) 5704 if test yes,no = "$GCC,$with_gnu_ld"; then 5705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5706 else 5707 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5708 fi 5709 if test no = "$with_gnu_ld"; then 5710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5711 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5712 _LT_TAGVAR(hardcode_direct, $1)=yes 5713 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5714 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5715 # hardcode_minus_L: Not really in the search PATH, 5716 # but as the default location of the library. 5717 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5718 fi 5719 ;; 5720 5721 hpux11*) 5722 if test yes,no = "$GCC,$with_gnu_ld"; then 5723 case $host_cpu in 5724 hppa*64*) 5725 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5726 ;; 5727 ia64*) 5728 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5729 ;; 5730 *) 5731 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5732 ;; 5733 esac 5734 else 5735 case $host_cpu in 5736 hppa*64*) 5737 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5738 ;; 5739 ia64*) 5740 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5741 ;; 5742 *) 5743 m4_if($1, [], [ 5744 # Older versions of the 11.00 compiler do not understand -b yet 5745 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5746 _LT_LINKER_OPTION([if $CC understands -b], 5747 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5748 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5749 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5750 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5751 ;; 5752 esac 5753 fi 5754 if test no = "$with_gnu_ld"; then 5755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5756 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757 5758 case $host_cpu in 5759 hppa*64*|ia64*) 5760 _LT_TAGVAR(hardcode_direct, $1)=no 5761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5762 ;; 5763 *) 5764 _LT_TAGVAR(hardcode_direct, $1)=yes 5765 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5766 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5767 5768 # hardcode_minus_L: Not really in the search PATH, 5769 # but as the default location of the library. 5770 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5771 ;; 5772 esac 5773 fi 5774 ;; 5775 5776 irix5* | irix6* | nonstopux*) 5777 if test yes = "$GCC"; then 5778 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 5779 # Try to use the -exported_symbol ld option, if it does not 5780 # work, assume that -exports_file does not work either and 5781 # implicitly export all symbols. 5782 # This should be the same for all languages, so no per-tag cache variable. 5783 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5784 [lt_cv_irix_exported_symbol], 5785 [save_LDFLAGS=$LDFLAGS 5786 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5787 AC_LINK_IFELSE( 5788 [AC_LANG_SOURCE( 5789 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5790 [C++], [[int foo (void) { return 0; }]], 5791 [Fortran 77], [[ 5792 subroutine foo 5793 end]], 5794 [Fortran], [[ 5795 subroutine foo 5796 end]])])], 5797 [lt_cv_irix_exported_symbol=yes], 5798 [lt_cv_irix_exported_symbol=no]) 5799 LDFLAGS=$save_LDFLAGS]) 5800 if test yes = "$lt_cv_irix_exported_symbol"; then 5801 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 5802 fi 5803 else 5804 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 5805 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 5806 fi 5807 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5808 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5809 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5810 _LT_TAGVAR(inherit_rpath, $1)=yes 5811 _LT_TAGVAR(link_all_deplibs, $1)=yes 5812 ;; 5813 5814 linux*) 5815 case $cc_basename in 5816 tcc*) 5817 # Fabrice Bellard et al's Tiny C Compiler 5818 _LT_TAGVAR(ld_shlibs, $1)=yes 5819 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5820 ;; 5821 esac 5822 ;; 5823 5824 netbsd*) 5825 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5826 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5827 else 5828 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5829 fi 5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5831 _LT_TAGVAR(hardcode_direct, $1)=yes 5832 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5833 ;; 5834 5835 newsos6) 5836 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5837 _LT_TAGVAR(hardcode_direct, $1)=yes 5838 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5839 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5841 ;; 5842 5843 *nto* | *qnx*) 5844 ;; 5845 5846 openbsd* | bitrig*) 5847 if test -f /usr/libexec/ld.so; then 5848 _LT_TAGVAR(hardcode_direct, $1)=yes 5849 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5850 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5851 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5852 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5854 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5855 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5856 else 5857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5859 fi 5860 else 5861 _LT_TAGVAR(ld_shlibs, $1)=no 5862 fi 5863 ;; 5864 5865 os2*) 5866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5867 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5868 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5869 shrext_cmds=.dll 5870 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5871 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5872 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5873 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5874 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5875 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5876 emximp -o $lib $output_objdir/$libname.def' 5877 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5878 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5879 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5880 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5881 prefix_cmds="$SED"~ 5882 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5883 prefix_cmds="$prefix_cmds -e 1d"; 5884 fi~ 5885 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5886 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5887 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5888 emximp -o $lib $output_objdir/$libname.def' 5889 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5890 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5891 ;; 5892 5893 osf3*) 5894 if test yes = "$GCC"; then 5895 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5896 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 5897 else 5898 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 5900 fi 5901 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5903 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5904 ;; 5905 5906 osf4* | osf5*) # as osf3* with the addition of -msym flag 5907 if test yes = "$GCC"; then 5908 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 5910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5911 else 5912 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5913 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 5914 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 5915 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 5916 5917 # Both c and cxx compiler support -rpath directly 5918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5919 fi 5920 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5921 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5922 ;; 5923 5924 solaris*) 5925 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5926 if test yes = "$GCC"; then 5927 wlarc='$wl' 5928 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5929 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5930 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5931 else 5932 case `$CC -V 2>&1` in 5933 *"Compilers 5.0"*) 5934 wlarc='' 5935 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5936 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5937 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5938 ;; 5939 *) 5940 wlarc='$wl' 5941 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5942 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5943 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5944 ;; 5945 esac 5946 fi 5947 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5948 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949 case $host_os in 5950 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5951 *) 5952 # The compiler driver will combine and reorder linker options, 5953 # but understands '-z linker_flag'. GCC discards it without '$wl', 5954 # but is careful enough not to reorder. 5955 # Supported since Solaris 2.6 (maybe 2.5.1?) 5956 if test yes = "$GCC"; then 5957 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5958 else 5959 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5960 fi 5961 ;; 5962 esac 5963 _LT_TAGVAR(link_all_deplibs, $1)=yes 5964 ;; 5965 5966 sunos4*) 5967 if test sequent = "$host_vendor"; then 5968 # Use $CC to link under sequent, because it throws in some extra .o 5969 # files that make .init and .fini sections work. 5970 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5971 else 5972 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5973 fi 5974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5975 _LT_TAGVAR(hardcode_direct, $1)=yes 5976 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5977 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978 ;; 5979 5980 sysv4) 5981 case $host_vendor in 5982 sni) 5983 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5985 ;; 5986 siemens) 5987 ## LD is ld it makes a PLAMLIB 5988 ## CC just makes a GrossModule. 5989 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5990 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5991 _LT_TAGVAR(hardcode_direct, $1)=no 5992 ;; 5993 motorola) 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5995 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5996 ;; 5997 esac 5998 runpath_var='LD_RUN_PATH' 5999 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000 ;; 6001 6002 sysv4.3*) 6003 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6006 ;; 6007 6008 sysv4*MP*) 6009 if test -d /usr/nec; then 6010 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6011 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012 runpath_var=LD_RUN_PATH 6013 hardcode_runpath_var=yes 6014 _LT_TAGVAR(ld_shlibs, $1)=yes 6015 fi 6016 ;; 6017 6018 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6019 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6020 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6021 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6022 runpath_var='LD_RUN_PATH' 6023 6024 if test yes = "$GCC"; then 6025 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6027 else 6028 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6029 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6030 fi 6031 ;; 6032 6033 sysv5* | sco3.2v5* | sco5v6*) 6034 # Note: We CANNOT use -z defs as we might desire, because we do not 6035 # link with -lc, and that would cause any symbols used from libc to 6036 # always be unresolved, which means just about no library would 6037 # ever link correctly. If we're not using GNU ld we use -z text 6038 # though, which does catch some bad symbols but isn't as heavy-handed 6039 # as -z defs. 6040 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6041 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6042 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6043 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6045 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6046 _LT_TAGVAR(link_all_deplibs, $1)=yes 6047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6048 runpath_var='LD_RUN_PATH' 6049 6050 if test yes = "$GCC"; then 6051 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6052 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6053 else 6054 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6055 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6056 fi 6057 ;; 6058 6059 uts4*) 6060 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6062 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6063 ;; 6064 6065 *) 6066 _LT_TAGVAR(ld_shlibs, $1)=no 6067 ;; 6068 esac 6069 6070 if test sni = "$host_vendor"; then 6071 case $host in 6072 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6073 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6074 ;; 6075 esac 6076 fi 6077 fi 6078]) 6079AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6080test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6081 6082_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6083 6084_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6085_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6086_LT_DECL([], [extract_expsyms_cmds], [2], 6087 [The commands to extract the exported symbol list from a shared archive]) 6088 6089# 6090# Do we need to explicitly link libc? 6091# 6092case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6093x|xyes) 6094 # Assume -lc should be added 6095 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6096 6097 if test yes,yes = "$GCC,$enable_shared"; then 6098 case $_LT_TAGVAR(archive_cmds, $1) in 6099 *'~'*) 6100 # FIXME: we may have to deal with multi-command sequences. 6101 ;; 6102 '$CC '*) 6103 # Test whether the compiler implicitly links with -lc since on some 6104 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6105 # to ld, don't add -lc before -lgcc. 6106 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6107 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6108 [$RM conftest* 6109 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6110 6111 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6112 soname=conftest 6113 lib=conftest 6114 libobjs=conftest.$ac_objext 6115 deplibs= 6116 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6117 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6118 compiler_flags=-v 6119 linker_flags=-v 6120 verstring= 6121 output_objdir=. 6122 libname=conftest 6123 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6124 _LT_TAGVAR(allow_undefined_flag, $1)= 6125 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6126 then 6127 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6128 else 6129 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6130 fi 6131 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6132 else 6133 cat conftest.err 1>&5 6134 fi 6135 $RM conftest* 6136 ]) 6137 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6138 ;; 6139 esac 6140 fi 6141 ;; 6142esac 6143 6144_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6145 [Whether or not to add -lc for building shared libraries]) 6146_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6147 [enable_shared_with_static_runtimes], [0], 6148 [Whether or not to disallow shared libs when runtime libs are static]) 6149_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6150 [Compiler flag to allow reflexive dlopens]) 6151_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6152 [Compiler flag to generate shared objects directly from archives]) 6153_LT_TAGDECL([], [compiler_needs_object], [1], 6154 [Whether the compiler copes with passing no objects directly]) 6155_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6156 [Create an old-style archive from a shared archive]) 6157_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6158 [Create a temporary old-style archive to link instead of a shared archive]) 6159_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6160_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6161_LT_TAGDECL([], [module_cmds], [2], 6162 [Commands used to build a loadable module if different from building 6163 a shared archive.]) 6164_LT_TAGDECL([], [module_expsym_cmds], [2]) 6165_LT_TAGDECL([], [with_gnu_ld], [1], 6166 [Whether we are building with GNU ld or not]) 6167_LT_TAGDECL([], [allow_undefined_flag], [1], 6168 [Flag that allows shared libraries with undefined symbols to be built]) 6169_LT_TAGDECL([], [no_undefined_flag], [1], 6170 [Flag that enforces no undefined symbols]) 6171_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6172 [Flag to hardcode $libdir into a binary during linking. 6173 This must work even if $libdir does not exist]) 6174_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6175 [Whether we need a single "-rpath" flag with a separated argument]) 6176_LT_TAGDECL([], [hardcode_direct], [0], 6177 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6178 DIR into the resulting binary]) 6179_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6180 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6181 DIR into the resulting binary and the resulting library dependency is 6182 "absolute", i.e impossible to change by setting $shlibpath_var if the 6183 library is relocated]) 6184_LT_TAGDECL([], [hardcode_minus_L], [0], 6185 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6186 into the resulting binary]) 6187_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6188 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6189 into the resulting binary]) 6190_LT_TAGDECL([], [hardcode_automatic], [0], 6191 [Set to "yes" if building a shared library automatically hardcodes DIR 6192 into the library and all subsequent libraries and executables linked 6193 against it]) 6194_LT_TAGDECL([], [inherit_rpath], [0], 6195 [Set to yes if linker adds runtime paths of dependent libraries 6196 to runtime path list]) 6197_LT_TAGDECL([], [link_all_deplibs], [0], 6198 [Whether libtool must link a program against all its dependency libraries]) 6199_LT_TAGDECL([], [always_export_symbols], [0], 6200 [Set to "yes" if exported symbols are required]) 6201_LT_TAGDECL([], [export_symbols_cmds], [2], 6202 [The commands to list exported symbols]) 6203_LT_TAGDECL([], [exclude_expsyms], [1], 6204 [Symbols that should not be listed in the preloaded symbols]) 6205_LT_TAGDECL([], [include_expsyms], [1], 6206 [Symbols that must always be exported]) 6207_LT_TAGDECL([], [prelink_cmds], [2], 6208 [Commands necessary for linking programs (against libraries) with templates]) 6209_LT_TAGDECL([], [postlink_cmds], [2], 6210 [Commands necessary for finishing linking programs]) 6211_LT_TAGDECL([], [file_list_spec], [1], 6212 [Specify filename containing input files]) 6213dnl FIXME: Not yet implemented 6214dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6215dnl [Compiler flag to generate thread safe objects]) 6216])# _LT_LINKER_SHLIBS 6217 6218 6219# _LT_LANG_C_CONFIG([TAG]) 6220# ------------------------ 6221# Ensure that the configuration variables for a C compiler are suitably 6222# defined. These variables are subsequently used by _LT_CONFIG to write 6223# the compiler configuration to 'libtool'. 6224m4_defun([_LT_LANG_C_CONFIG], 6225[m4_require([_LT_DECL_EGREP])dnl 6226lt_save_CC=$CC 6227AC_LANG_PUSH(C) 6228 6229# Source file extension for C test sources. 6230ac_ext=c 6231 6232# Object file extension for compiled C test sources. 6233objext=o 6234_LT_TAGVAR(objext, $1)=$objext 6235 6236# Code to be used in simple compile tests 6237lt_simple_compile_test_code="int some_variable = 0;" 6238 6239# Code to be used in simple link tests 6240lt_simple_link_test_code='int main(){return(0);}' 6241 6242_LT_TAG_COMPILER 6243# Save the default compiler, since it gets overwritten when the other 6244# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6245compiler_DEFAULT=$CC 6246 6247# save warnings/boilerplate of simple test code 6248_LT_COMPILER_BOILERPLATE 6249_LT_LINKER_BOILERPLATE 6250 6251if test -n "$compiler"; then 6252 _LT_COMPILER_NO_RTTI($1) 6253 _LT_COMPILER_PIC($1) 6254 _LT_COMPILER_C_O($1) 6255 _LT_COMPILER_FILE_LOCKS($1) 6256 _LT_LINKER_SHLIBS($1) 6257 _LT_SYS_DYNAMIC_LINKER($1) 6258 _LT_LINKER_HARDCODE_LIBPATH($1) 6259 LT_SYS_DLOPEN_SELF 6260 _LT_CMD_STRIPLIB 6261 6262 # Report what library types will actually be built 6263 AC_MSG_CHECKING([if libtool supports shared libraries]) 6264 AC_MSG_RESULT([$can_build_shared]) 6265 6266 AC_MSG_CHECKING([whether to build shared libraries]) 6267 test no = "$can_build_shared" && enable_shared=no 6268 6269 # On AIX, shared libraries and static libraries use the same namespace, and 6270 # are all built from PIC. 6271 case $host_os in 6272 aix3*) 6273 test yes = "$enable_shared" && enable_static=no 6274 if test -n "$RANLIB"; then 6275 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6276 postinstall_cmds='$RANLIB $lib' 6277 fi 6278 ;; 6279 6280 aix[[4-9]]*) 6281 if test ia64 != "$host_cpu"; then 6282 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6283 yes,aix,yes) ;; # shared object as lib.so file only 6284 yes,svr4,*) ;; # shared object as lib.so archive member only 6285 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6286 esac 6287 fi 6288 ;; 6289 esac 6290 AC_MSG_RESULT([$enable_shared]) 6291 6292 AC_MSG_CHECKING([whether to build static libraries]) 6293 # Make sure either enable_shared or enable_static is yes. 6294 test yes = "$enable_shared" || enable_static=yes 6295 AC_MSG_RESULT([$enable_static]) 6296 6297 _LT_CONFIG($1) 6298fi 6299AC_LANG_POP 6300CC=$lt_save_CC 6301])# _LT_LANG_C_CONFIG 6302 6303 6304# _LT_LANG_CXX_CONFIG([TAG]) 6305# -------------------------- 6306# Ensure that the configuration variables for a C++ compiler are suitably 6307# defined. These variables are subsequently used by _LT_CONFIG to write 6308# the compiler configuration to 'libtool'. 6309m4_defun([_LT_LANG_CXX_CONFIG], 6310[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6311m4_require([_LT_DECL_EGREP])dnl 6312m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6313if test -n "$CXX" && ( test no != "$CXX" && 6314 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6315 (test g++ != "$CXX"))); then 6316 AC_PROG_CXXCPP 6317else 6318 _lt_caught_CXX_error=yes 6319fi 6320 6321AC_LANG_PUSH(C++) 6322_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323_LT_TAGVAR(allow_undefined_flag, $1)= 6324_LT_TAGVAR(always_export_symbols, $1)=no 6325_LT_TAGVAR(archive_expsym_cmds, $1)= 6326_LT_TAGVAR(compiler_needs_object, $1)=no 6327_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328_LT_TAGVAR(hardcode_direct, $1)=no 6329_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332_LT_TAGVAR(hardcode_minus_L, $1)=no 6333_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334_LT_TAGVAR(hardcode_automatic, $1)=no 6335_LT_TAGVAR(inherit_rpath, $1)=no 6336_LT_TAGVAR(module_cmds, $1)= 6337_LT_TAGVAR(module_expsym_cmds, $1)= 6338_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6340_LT_TAGVAR(reload_flag, $1)=$reload_flag 6341_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342_LT_TAGVAR(no_undefined_flag, $1)= 6343_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345 6346# Source file extension for C++ test sources. 6347ac_ext=cpp 6348 6349# Object file extension for compiled C++ test sources. 6350objext=o 6351_LT_TAGVAR(objext, $1)=$objext 6352 6353# No sense in running all these tests if we already determined that 6354# the CXX compiler isn't working. Some variables (like enable_shared) 6355# are currently assumed to apply to all compilers on this platform, 6356# and will be corrupted by setting them based on a non-working compiler. 6357if test yes != "$_lt_caught_CXX_error"; then 6358 # Code to be used in simple compile tests 6359 lt_simple_compile_test_code="int some_variable = 0;" 6360 6361 # Code to be used in simple link tests 6362 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363 6364 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365 _LT_TAG_COMPILER 6366 6367 # save warnings/boilerplate of simple test code 6368 _LT_COMPILER_BOILERPLATE 6369 _LT_LINKER_BOILERPLATE 6370 6371 # Allow CC to be a program name with arguments. 6372 lt_save_CC=$CC 6373 lt_save_CFLAGS=$CFLAGS 6374 lt_save_LD=$LD 6375 lt_save_GCC=$GCC 6376 GCC=$GXX 6377 lt_save_with_gnu_ld=$with_gnu_ld 6378 lt_save_path_LD=$lt_cv_path_LD 6379 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6380 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6381 else 6382 $as_unset lt_cv_prog_gnu_ld 6383 fi 6384 if test -n "${lt_cv_path_LDCXX+set}"; then 6385 lt_cv_path_LD=$lt_cv_path_LDCXX 6386 else 6387 $as_unset lt_cv_path_LD 6388 fi 6389 test -z "${LDCXX+set}" || LD=$LDCXX 6390 CC=${CXX-"c++"} 6391 CFLAGS=$CXXFLAGS 6392 compiler=$CC 6393 _LT_TAGVAR(compiler, $1)=$CC 6394 _LT_CC_BASENAME([$compiler]) 6395 6396 if test -n "$compiler"; then 6397 # We don't want -fno-exception when compiling C++ code, so set the 6398 # no_builtin_flag separately 6399 if test yes = "$GXX"; then 6400 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6401 else 6402 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6403 fi 6404 6405 if test yes = "$GXX"; then 6406 # Set up default GNU C++ configuration 6407 6408 LT_PATH_LD 6409 6410 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6411 # archiving commands below assume that GNU ld is being used. 6412 if test yes = "$with_gnu_ld"; then 6413 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6414 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 6415 6416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6417 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418 6419 # If archive_cmds runs LD, not CC, wlarc should be empty 6420 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6421 # investigate it a little bit more. (MM) 6422 wlarc='$wl' 6423 6424 # ancient GNU ld didn't support --whole-archive et. al. 6425 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6426 $GREP 'no-whole-archive' > /dev/null; then 6427 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6428 else 6429 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6430 fi 6431 else 6432 with_gnu_ld=no 6433 wlarc= 6434 6435 # A generic and very simple default shared library creation 6436 # command for GNU C++ for the case where it uses the native 6437 # linker, instead of GNU ld. If possible, this setting should 6438 # overridden to take advantage of the native linker features on 6439 # the platform it is being used on. 6440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441 fi 6442 6443 # Commands to make compiler produce verbose output that lists 6444 # what "hidden" libraries, object files and flags are used when 6445 # linking a shared library. 6446 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6447 6448 else 6449 GXX=no 6450 with_gnu_ld=no 6451 wlarc= 6452 fi 6453 6454 # PORTME: fill in a description of your system's C++ link characteristics 6455 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456 _LT_TAGVAR(ld_shlibs, $1)=yes 6457 case $host_os in 6458 aix3*) 6459 # FIXME: insert proper C++ library support 6460 _LT_TAGVAR(ld_shlibs, $1)=no 6461 ;; 6462 aix[[4-9]]*) 6463 if test ia64 = "$host_cpu"; then 6464 # On IA64, the linker does run time linking by default, so we don't 6465 # have to do anything special. 6466 aix_use_runtimelinking=no 6467 exp_sym_flag='-Bexport' 6468 no_entry_flag= 6469 else 6470 aix_use_runtimelinking=no 6471 6472 # Test if we are trying to use run time linking or normal 6473 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6474 # have runtime linking enabled, and use it for executables. 6475 # For shared libraries, we enable/disable runtime linking 6476 # depending on the kind of the shared library created - 6477 # when "with_aix_soname,aix_use_runtimelinking" is: 6478 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6479 # "aix,yes" lib.so shared, rtl:yes, for executables 6480 # lib.a static archive 6481 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6482 # lib.a(lib.so.V) shared, rtl:no, for executables 6483 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6484 # lib.a(lib.so.V) shared, rtl:no 6485 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6486 # lib.a static archive 6487 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6488 for ld_flag in $LDFLAGS; do 6489 case $ld_flag in 6490 *-brtl*) 6491 aix_use_runtimelinking=yes 6492 break 6493 ;; 6494 esac 6495 done 6496 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6497 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6498 # so we don't have lib.a shared libs to link our executables. 6499 # We have to force runtime linking in this case. 6500 aix_use_runtimelinking=yes 6501 LDFLAGS="$LDFLAGS -Wl,-brtl" 6502 fi 6503 ;; 6504 esac 6505 6506 exp_sym_flag='-bexport' 6507 no_entry_flag='-bnoentry' 6508 fi 6509 6510 # When large executables or shared objects are built, AIX ld can 6511 # have problems creating the table of contents. If linking a library 6512 # or program results in "error TOC overflow" add -mminimal-toc to 6513 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6514 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515 6516 _LT_TAGVAR(archive_cmds, $1)='' 6517 _LT_TAGVAR(hardcode_direct, $1)=yes 6518 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6519 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6520 _LT_TAGVAR(link_all_deplibs, $1)=yes 6521 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6522 case $with_aix_soname,$aix_use_runtimelinking in 6523 aix,*) ;; # no import file 6524 svr4,* | *,yes) # use import file 6525 # The Import File defines what to hardcode. 6526 _LT_TAGVAR(hardcode_direct, $1)=no 6527 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6528 ;; 6529 esac 6530 6531 if test yes = "$GXX"; then 6532 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6533 # We only want to do this on AIX 4.2 and lower, the check 6534 # below for broken collect2 doesn't work under 4.3+ 6535 collect2name=`$CC -print-prog-name=collect2` 6536 if test -f "$collect2name" && 6537 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6538 then 6539 # We have reworked collect2 6540 : 6541 else 6542 # We have old collect2 6543 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6544 # It fails to find uninstalled libraries when the uninstalled 6545 # path is not listed in the libpath. Setting hardcode_minus_L 6546 # to unsupported forces relinking 6547 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6548 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6549 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6550 fi 6551 esac 6552 shared_flag='-shared' 6553 if test yes = "$aix_use_runtimelinking"; then 6554 shared_flag=$shared_flag' $wl-G' 6555 fi 6556 # Need to ensure runtime linking is disabled for the traditional 6557 # shared library, or the linker may eventually find shared libraries 6558 # /with/ Import File - we do not want to mix them. 6559 shared_flag_aix='-shared' 6560 shared_flag_svr4='-shared $wl-G' 6561 else 6562 # not using gcc 6563 if test ia64 = "$host_cpu"; then 6564 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6565 # chokes on -Wl,-G. The following line is correct: 6566 shared_flag='-G' 6567 else 6568 if test yes = "$aix_use_runtimelinking"; then 6569 shared_flag='$wl-G' 6570 else 6571 shared_flag='$wl-bM:SRE' 6572 fi 6573 shared_flag_aix='$wl-bM:SRE' 6574 shared_flag_svr4='$wl-G' 6575 fi 6576 fi 6577 6578 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6579 # It seems that -bexpall does not export symbols beginning with 6580 # underscore (_), so it is better to generate a list of symbols to 6581 # export. 6582 _LT_TAGVAR(always_export_symbols, $1)=yes 6583 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6584 # Warning - without using the other runtime loading flags (-brtl), 6585 # -berok will link without error, but may produce a broken library. 6586 # The "-G" linker flag allows undefined symbols. 6587 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6588 # Determine the default libpath from the value encoded in an empty 6589 # executable. 6590 _LT_SYS_MODULE_PATH_AIX([$1]) 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6592 6593 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 6594 else 6595 if test ia64 = "$host_cpu"; then 6596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6597 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6598 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 6599 else 6600 # Determine the default libpath from the value encoded in an 6601 # empty executable. 6602 _LT_SYS_MODULE_PATH_AIX([$1]) 6603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604 # Warning - without using the other run time loading flags, 6605 # -berok will link without error, but may produce a broken library. 6606 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6607 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6608 if test yes = "$with_gnu_ld"; then 6609 # We only use this code for GNU lds that support --whole-archive. 6610 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6611 else 6612 # Exported symbols can be pulled into shared objects from archives 6613 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6614 fi 6615 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6616 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6617 # -brtl affects multiple linker settings, -berok does not and is overridden later 6618 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6619 if test svr4 != "$with_aix_soname"; then 6620 # This is similar to how AIX traditionally builds its shared 6621 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6622 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 6623 fi 6624 if test aix != "$with_aix_soname"; then 6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 6626 else 6627 # used by -dlpreopen to get the symbols 6628 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6629 fi 6630 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6631 fi 6632 fi 6633 ;; 6634 6635 beos*) 6636 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6637 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6638 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6639 # support --undefined. This deserves some investigation. FIXME 6640 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641 else 6642 _LT_TAGVAR(ld_shlibs, $1)=no 6643 fi 6644 ;; 6645 6646 chorus*) 6647 case $cc_basename in 6648 *) 6649 # FIXME: insert proper C++ library support 6650 _LT_TAGVAR(ld_shlibs, $1)=no 6651 ;; 6652 esac 6653 ;; 6654 6655 cygwin* | mingw* | pw32* | cegcc*) 6656 case $GXX,$cc_basename in 6657 ,cl* | no,cl*) 6658 # Native MSVC 6659 # hardcode_libdir_flag_spec is actually meaningless, as there is 6660 # no search path for DLLs. 6661 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6662 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6663 _LT_TAGVAR(always_export_symbols, $1)=yes 6664 _LT_TAGVAR(file_list_spec, $1)='@' 6665 # Tell ltmain to make .lib files, not .a files. 6666 libext=lib 6667 # Tell ltmain to make .dll files, not .so files. 6668 shrext_cmds=.dll 6669 # FIXME: Setting linknames here is a bad hack. 6670 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6671 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6672 cp "$export_symbols" "$output_objdir/$soname.def"; 6673 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6674 else 6675 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6676 fi~ 6677 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6678 linknames=' 6679 # The linker will not automatically build a static lib if we build a DLL. 6680 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6681 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6682 # Don't use ranlib 6683 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6684 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6685 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6686 case $lt_outputfile in 6687 *.exe|*.EXE) ;; 6688 *) 6689 lt_outputfile=$lt_outputfile.exe 6690 lt_tool_outputfile=$lt_tool_outputfile.exe 6691 ;; 6692 esac~ 6693 func_to_tool_file "$lt_outputfile"~ 6694 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6695 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6696 $RM "$lt_outputfile.manifest"; 6697 fi' 6698 ;; 6699 *) 6700 # g++ 6701 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6702 # as there is no search path for DLLs. 6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6705 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6706 _LT_TAGVAR(always_export_symbols, $1)=no 6707 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708 6709 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6710 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6711 # If the export-symbols file already is a .def file, use it as 6712 # is; otherwise, prepend EXPORTS... 6713 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6714 cp $export_symbols $output_objdir/$soname.def; 6715 else 6716 echo EXPORTS > $output_objdir/$soname.def; 6717 cat $export_symbols >> $output_objdir/$soname.def; 6718 fi~ 6719 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6720 else 6721 _LT_TAGVAR(ld_shlibs, $1)=no 6722 fi 6723 ;; 6724 esac 6725 ;; 6726 darwin* | rhapsody*) 6727 _LT_DARWIN_LINKER_FEATURES($1) 6728 ;; 6729 6730 os2*) 6731 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6732 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6733 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6734 shrext_cmds=.dll 6735 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6736 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6737 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6738 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6739 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6740 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6741 emximp -o $lib $output_objdir/$libname.def' 6742 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6743 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6744 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6745 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6746 prefix_cmds="$SED"~ 6747 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6748 prefix_cmds="$prefix_cmds -e 1d"; 6749 fi~ 6750 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6751 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6752 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6753 emximp -o $lib $output_objdir/$libname.def' 6754 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6755 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6756 ;; 6757 6758 dgux*) 6759 case $cc_basename in 6760 ec++*) 6761 # FIXME: insert proper C++ library support 6762 _LT_TAGVAR(ld_shlibs, $1)=no 6763 ;; 6764 ghcx*) 6765 # Green Hills C++ Compiler 6766 # FIXME: insert proper C++ library support 6767 _LT_TAGVAR(ld_shlibs, $1)=no 6768 ;; 6769 *) 6770 # FIXME: insert proper C++ library support 6771 _LT_TAGVAR(ld_shlibs, $1)=no 6772 ;; 6773 esac 6774 ;; 6775 6776 freebsd2.*) 6777 # C++ shared libraries reported to be fairly broken before 6778 # switch to ELF 6779 _LT_TAGVAR(ld_shlibs, $1)=no 6780 ;; 6781 6782 freebsd-elf*) 6783 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784 ;; 6785 6786 freebsd* | dragonfly*) 6787 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788 # conventions 6789 _LT_TAGVAR(ld_shlibs, $1)=yes 6790 ;; 6791 6792 haiku*) 6793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6794 _LT_TAGVAR(link_all_deplibs, $1)=yes 6795 ;; 6796 6797 hpux9*) 6798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801 _LT_TAGVAR(hardcode_direct, $1)=yes 6802 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803 # but as the default 6804 # location of the library. 6805 6806 case $cc_basename in 6807 CC*) 6808 # FIXME: insert proper C++ library support 6809 _LT_TAGVAR(ld_shlibs, $1)=no 6810 ;; 6811 aCC*) 6812 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6813 # Commands to make compiler produce verbose output that lists 6814 # what "hidden" libraries, object files and flags are used when 6815 # linking a shared library. 6816 # 6817 # There doesn't appear to be a way to prevent this compiler from 6818 # explicitly linking system object files so we need to strip them 6819 # from the output so that they don't get included in the library 6820 # dependencies. 6821 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6822 ;; 6823 *) 6824 if test yes = "$GXX"; then 6825 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6826 else 6827 # FIXME: insert proper C++ library support 6828 _LT_TAGVAR(ld_shlibs, $1)=no 6829 fi 6830 ;; 6831 esac 6832 ;; 6833 6834 hpux10*|hpux11*) 6835 if test no = "$with_gnu_ld"; then 6836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838 6839 case $host_cpu in 6840 hppa*64*|ia64*) 6841 ;; 6842 *) 6843 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844 ;; 6845 esac 6846 fi 6847 case $host_cpu in 6848 hppa*64*|ia64*) 6849 _LT_TAGVAR(hardcode_direct, $1)=no 6850 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851 ;; 6852 *) 6853 _LT_TAGVAR(hardcode_direct, $1)=yes 6854 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856 # but as the default 6857 # location of the library. 6858 ;; 6859 esac 6860 6861 case $cc_basename in 6862 CC*) 6863 # FIXME: insert proper C++ library support 6864 _LT_TAGVAR(ld_shlibs, $1)=no 6865 ;; 6866 aCC*) 6867 case $host_cpu in 6868 hppa*64*) 6869 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870 ;; 6871 ia64*) 6872 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873 ;; 6874 *) 6875 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6876 ;; 6877 esac 6878 # Commands to make compiler produce verbose output that lists 6879 # what "hidden" libraries, object files and flags are used when 6880 # linking a shared library. 6881 # 6882 # There doesn't appear to be a way to prevent this compiler from 6883 # explicitly linking system object files so we need to strip them 6884 # from the output so that they don't get included in the library 6885 # dependencies. 6886 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6887 ;; 6888 *) 6889 if test yes = "$GXX"; then 6890 if test no = "$with_gnu_ld"; then 6891 case $host_cpu in 6892 hppa*64*) 6893 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894 ;; 6895 ia64*) 6896 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6897 ;; 6898 *) 6899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6900 ;; 6901 esac 6902 fi 6903 else 6904 # FIXME: insert proper C++ library support 6905 _LT_TAGVAR(ld_shlibs, $1)=no 6906 fi 6907 ;; 6908 esac 6909 ;; 6910 6911 interix[[3-9]]*) 6912 _LT_TAGVAR(hardcode_direct, $1)=no 6913 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917 # Instead, shared libraries are loaded at an image base (0x10000000 by 6918 # default) and relocated if they conflict, which is a slow very memory 6919 # consuming and fragmenting process. To avoid this, we pick a random, 6920 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 6923 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 6924 ;; 6925 irix5* | irix6*) 6926 case $cc_basename in 6927 CC*) 6928 # SGI C++ 6929 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 6930 6931 # Archives containing C++ object files must be created using 6932 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933 # necessary to make sure instantiated templates are included 6934 # in the archive. 6935 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936 ;; 6937 *) 6938 if test yes = "$GXX"; then 6939 if test no = "$with_gnu_ld"; then 6940 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 6941 else 6942 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 6943 fi 6944 fi 6945 _LT_TAGVAR(link_all_deplibs, $1)=yes 6946 ;; 6947 esac 6948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950 _LT_TAGVAR(inherit_rpath, $1)=yes 6951 ;; 6952 6953 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954 case $cc_basename in 6955 KCC*) 6956 # Kuck and Associates, Inc. (KAI) C++ Compiler 6957 6958 # KCC will only create a shared library if the output file 6959 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960 # to its proper name (with version) after linking. 6961 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 6962 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' 6963 # Commands to make compiler produce verbose output that lists 6964 # what "hidden" libraries, object files and flags are used when 6965 # linking a shared library. 6966 # 6967 # There doesn't appear to be a way to prevent this compiler from 6968 # explicitly linking system object files so we need to strip them 6969 # from the output so that they don't get included in the library 6970 # dependencies. 6971 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6972 6973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975 6976 # Archives containing C++ object files must be created using 6977 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979 ;; 6980 icpc* | ecpc* ) 6981 # Intel C++ 6982 with_gnu_ld=yes 6983 # version 8.0 and above of icpc choke on multiply defined symbols 6984 # if we add $predep_objects and $postdep_objects, however 7.1 and 6985 # earlier do not add the objects themselves. 6986 case `$CC -V 2>&1` in 6987 *"Version 7."*) 6988 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 6990 ;; 6991 *) # Version 8.0 or newer 6992 tmp_idyn= 6993 case $host_cpu in 6994 ia64*) tmp_idyn=' -i_dynamic';; 6995 esac 6996 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 6998 ;; 6999 esac 7000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004 ;; 7005 pgCC* | pgcpp*) 7006 # Portland Group C++ compiler 7007 case `$CC -V` in 7008 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010 rm -rf $tpldir~ 7011 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014 rm -rf $tpldir~ 7015 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017 $RANLIB $oldlib' 7018 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019 rm -rf $tpldir~ 7020 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7022 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023 rm -rf $tpldir~ 7024 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7026 ;; 7027 *) # Version 6 and above use weak symbols 7028 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7030 ;; 7031 esac 7032 7033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7036 ;; 7037 cxx*) 7038 # Compaq C++ 7039 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' 7041 7042 runpath_var=LD_RUN_PATH 7043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045 7046 # Commands to make compiler produce verbose output that lists 7047 # what "hidden" libraries, object files and flags are used when 7048 # linking a shared library. 7049 # 7050 # There doesn't appear to be a way to prevent this compiler from 7051 # explicitly linking system object files so we need to strip them 7052 # from the output so that they don't get included in the library 7053 # dependencies. 7054 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 7055 ;; 7056 xl* | mpixl* | bgxl*) 7057 # IBM XL 8.0 on PPC, with GNU ld 7058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061 if test yes = "$supports_anon_versioning"; then 7062 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7063 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064 echo "local: *; };" >> $output_objdir/$libname.ver~ 7065 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066 fi 7067 ;; 7068 *) 7069 case `$CC -V 2>&1 | sed 5q` in 7070 *Sun\ C*) 7071 # Sun C++ 5.9 7072 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' 7075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7077 _LT_TAGVAR(compiler_needs_object, $1)=yes 7078 7079 # Not sure whether something based on 7080 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081 # would be better. 7082 output_verbose_link_cmd='func_echo_all' 7083 7084 # Archives containing C++ object files must be created using 7085 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086 # necessary to make sure instantiated templates are included 7087 # in the archive. 7088 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089 ;; 7090 esac 7091 ;; 7092 esac 7093 ;; 7094 7095 lynxos*) 7096 # FIXME: insert proper C++ library support 7097 _LT_TAGVAR(ld_shlibs, $1)=no 7098 ;; 7099 7100 m88k*) 7101 # FIXME: insert proper C++ library support 7102 _LT_TAGVAR(ld_shlibs, $1)=no 7103 ;; 7104 7105 mvs*) 7106 case $cc_basename in 7107 cxx*) 7108 # FIXME: insert proper C++ library support 7109 _LT_TAGVAR(ld_shlibs, $1)=no 7110 ;; 7111 *) 7112 # FIXME: insert proper C++ library support 7113 _LT_TAGVAR(ld_shlibs, $1)=no 7114 ;; 7115 esac 7116 ;; 7117 7118 netbsd*) 7119 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121 wlarc= 7122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123 _LT_TAGVAR(hardcode_direct, $1)=yes 7124 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125 fi 7126 # Workaround some broken pre-1.5 toolchains 7127 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128 ;; 7129 7130 *nto* | *qnx*) 7131 _LT_TAGVAR(ld_shlibs, $1)=yes 7132 ;; 7133 7134 openbsd* | bitrig*) 7135 if test -f /usr/libexec/ld.so; then 7136 _LT_TAGVAR(hardcode_direct, $1)=yes 7137 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 7143 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145 fi 7146 output_verbose_link_cmd=func_echo_all 7147 else 7148 _LT_TAGVAR(ld_shlibs, $1)=no 7149 fi 7150 ;; 7151 7152 osf3* | osf4* | osf5*) 7153 case $cc_basename in 7154 KCC*) 7155 # Kuck and Associates, Inc. (KAI) C++ Compiler 7156 7157 # KCC will only create a shared library if the output file 7158 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159 # to its proper name (with version) after linking. 7160 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 7161 7162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164 7165 # Archives containing C++ object files must be created using 7166 # the KAI C++ compiler. 7167 case $host in 7168 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170 esac 7171 ;; 7172 RCC*) 7173 # Rational C++ 2.4.1 7174 # FIXME: insert proper C++ library support 7175 _LT_TAGVAR(ld_shlibs, $1)=no 7176 ;; 7177 cxx*) 7178 case $host in 7179 osf3*) 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 7182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183 ;; 7184 *) 7185 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 7187 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188 echo "-hidden">> $lib.exp~ 7189 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ 7190 $RM $lib.exp' 7191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192 ;; 7193 esac 7194 7195 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196 7197 # Commands to make compiler produce verbose output that lists 7198 # what "hidden" libraries, object files and flags are used when 7199 # linking a shared library. 7200 # 7201 # There doesn't appear to be a way to prevent this compiler from 7202 # explicitly linking system object files so we need to strip them 7203 # from the output so that they don't get included in the library 7204 # dependencies. 7205 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 7206 ;; 7207 *) 7208 if test yes,no = "$GXX,$with_gnu_ld"; then 7209 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210 case $host in 7211 osf3*) 7212 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 7213 ;; 7214 *) 7215 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 7216 ;; 7217 esac 7218 7219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221 7222 # Commands to make compiler produce verbose output that lists 7223 # what "hidden" libraries, object files and flags are used when 7224 # linking a shared library. 7225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226 7227 else 7228 # FIXME: insert proper C++ library support 7229 _LT_TAGVAR(ld_shlibs, $1)=no 7230 fi 7231 ;; 7232 esac 7233 ;; 7234 7235 psos*) 7236 # FIXME: insert proper C++ library support 7237 _LT_TAGVAR(ld_shlibs, $1)=no 7238 ;; 7239 7240 sunos4*) 7241 case $cc_basename in 7242 CC*) 7243 # Sun C++ 4.x 7244 # FIXME: insert proper C++ library support 7245 _LT_TAGVAR(ld_shlibs, $1)=no 7246 ;; 7247 lcc*) 7248 # Lucid 7249 # FIXME: insert proper C++ library support 7250 _LT_TAGVAR(ld_shlibs, $1)=no 7251 ;; 7252 *) 7253 # FIXME: insert proper C++ library support 7254 _LT_TAGVAR(ld_shlibs, $1)=no 7255 ;; 7256 esac 7257 ;; 7258 7259 solaris*) 7260 case $cc_basename in 7261 CC* | sunCC*) 7262 # Sun C++ 4.2, 5.x and Centerline C++ 7263 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7268 7269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271 case $host_os in 7272 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273 *) 7274 # The compiler driver will combine and reorder linker options, 7275 # but understands '-z linker_flag'. 7276 # Supported since Solaris 2.6 (maybe 2.5.1?) 7277 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278 ;; 7279 esac 7280 _LT_TAGVAR(link_all_deplibs, $1)=yes 7281 7282 output_verbose_link_cmd='func_echo_all' 7283 7284 # Archives containing C++ object files must be created using 7285 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286 # necessary to make sure instantiated templates are included 7287 # in the archive. 7288 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289 ;; 7290 gcx*) 7291 # Green Hills C++ Compiler 7292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293 7294 # The C++ compiler must be used to create the archive. 7295 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296 ;; 7297 *) 7298 # GNU C++ compiler with Solaris linker 7299 if test yes,no = "$GXX,$with_gnu_ld"; then 7300 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7303 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7305 7306 # Commands to make compiler produce verbose output that lists 7307 # what "hidden" libraries, object files and flags are used when 7308 # linking a shared library. 7309 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310 else 7311 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312 # platform. 7313 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7316 7317 # Commands to make compiler produce verbose output that lists 7318 # what "hidden" libraries, object files and flags are used when 7319 # linking a shared library. 7320 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321 fi 7322 7323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324 case $host_os in 7325 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326 *) 7327 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328 ;; 7329 esac 7330 fi 7331 ;; 7332 esac 7333 ;; 7334 7335 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339 runpath_var='LD_RUN_PATH' 7340 7341 case $cc_basename in 7342 CC*) 7343 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345 ;; 7346 *) 7347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349 ;; 7350 esac 7351 ;; 7352 7353 sysv5* | sco3.2v5* | sco5v6*) 7354 # Note: We CANNOT use -z defs as we might desire, because we do not 7355 # link with -lc, and that would cause any symbols used from libc to 7356 # always be unresolved, which means just about no library would 7357 # ever link correctly. If we're not using GNU ld we use -z text 7358 # though, which does catch some bad symbols but isn't as heavy-handed 7359 # as -z defs. 7360 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366 _LT_TAGVAR(link_all_deplibs, $1)=yes 7367 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368 runpath_var='LD_RUN_PATH' 7369 7370 case $cc_basename in 7371 CC*) 7372 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7376 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377 '"$_LT_TAGVAR(reload_cmds, $1)" 7378 ;; 7379 *) 7380 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382 ;; 7383 esac 7384 ;; 7385 7386 tandem*) 7387 case $cc_basename in 7388 NCC*) 7389 # NonStop-UX NCC 3.20 7390 # FIXME: insert proper C++ library support 7391 _LT_TAGVAR(ld_shlibs, $1)=no 7392 ;; 7393 *) 7394 # FIXME: insert proper C++ library support 7395 _LT_TAGVAR(ld_shlibs, $1)=no 7396 ;; 7397 esac 7398 ;; 7399 7400 vxworks*) 7401 # FIXME: insert proper C++ library support 7402 _LT_TAGVAR(ld_shlibs, $1)=no 7403 ;; 7404 7405 *) 7406 # FIXME: insert proper C++ library support 7407 _LT_TAGVAR(ld_shlibs, $1)=no 7408 ;; 7409 esac 7410 7411 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413 7414 _LT_TAGVAR(GCC, $1)=$GXX 7415 _LT_TAGVAR(LD, $1)=$LD 7416 7417 ## CAVEAT EMPTOR: 7418 ## There is no encapsulation within the following macros, do not change 7419 ## the running order or otherwise move them around unless you know exactly 7420 ## what you are doing... 7421 _LT_SYS_HIDDEN_LIBDEPS($1) 7422 _LT_COMPILER_PIC($1) 7423 _LT_COMPILER_C_O($1) 7424 _LT_COMPILER_FILE_LOCKS($1) 7425 _LT_LINKER_SHLIBS($1) 7426 _LT_SYS_DYNAMIC_LINKER($1) 7427 _LT_LINKER_HARDCODE_LIBPATH($1) 7428 7429 _LT_CONFIG($1) 7430 fi # test -n "$compiler" 7431 7432 CC=$lt_save_CC 7433 CFLAGS=$lt_save_CFLAGS 7434 LDCXX=$LD 7435 LD=$lt_save_LD 7436 GCC=$lt_save_GCC 7437 with_gnu_ld=$lt_save_with_gnu_ld 7438 lt_cv_path_LDCXX=$lt_cv_path_LD 7439 lt_cv_path_LD=$lt_save_path_LD 7440 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442fi # test yes != "$_lt_caught_CXX_error" 7443 7444AC_LANG_POP 7445])# _LT_LANG_CXX_CONFIG 7446 7447 7448# _LT_FUNC_STRIPNAME_CNF 7449# ---------------------- 7450# func_stripname_cnf prefix suffix name 7451# strip PREFIX and SUFFIX off of NAME. 7452# PREFIX and SUFFIX must not contain globbing or regex special 7453# characters, hashes, percent signs, but SUFFIX may contain a leading 7454# dot (in which case that matches only a dot). 7455# 7456# This function is identical to the (non-XSI) version of func_stripname, 7457# except this one can be used by m4 code that may be executed by configure, 7458# rather than the libtool script. 7459m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460AC_REQUIRE([_LT_DECL_SED]) 7461AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462func_stripname_cnf () 7463{ 7464 case @S|@2 in 7465 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467 esac 7468} # func_stripname_cnf 7469])# _LT_FUNC_STRIPNAME_CNF 7470 7471 7472# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473# --------------------------------- 7474# Figure out "hidden" library dependencies from verbose 7475# compiler output when linking a shared library. 7476# Parse the compiler output and extract the necessary 7477# objects, libraries and library flags. 7478m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481# Dependencies to place before and after the object being linked: 7482_LT_TAGVAR(predep_objects, $1)= 7483_LT_TAGVAR(postdep_objects, $1)= 7484_LT_TAGVAR(predeps, $1)= 7485_LT_TAGVAR(postdeps, $1)= 7486_LT_TAGVAR(compiler_lib_search_path, $1)= 7487 7488dnl we can't use the lt_simple_compile_test_code here, 7489dnl because it contains code intended for an executable, 7490dnl not a library. It's possible we should let each 7491dnl tag define a new lt_????_link_test_code variable, 7492dnl but it's only used here... 7493m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494int a; 7495void foo (void) { a = 0; } 7496_LT_EOF 7497], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498class Foo 7499{ 7500public: 7501 Foo (void) { a = 0; } 7502private: 7503 int a; 7504}; 7505_LT_EOF 7506], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507 subroutine foo 7508 implicit none 7509 integer*4 a 7510 a=0 7511 return 7512 end 7513_LT_EOF 7514], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515 subroutine foo 7516 implicit none 7517 integer a 7518 a=0 7519 return 7520 end 7521_LT_EOF 7522], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523public class foo { 7524 private int a; 7525 public void bar (void) { 7526 a = 0; 7527 } 7528}; 7529_LT_EOF 7530], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531package foo 7532func foo() { 7533} 7534_LT_EOF 7535]) 7536 7537_lt_libdeps_save_CFLAGS=$CFLAGS 7538case "$CC $CFLAGS " in #( 7539*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542esac 7543 7544dnl Parse the compiler output and extract the necessary 7545dnl objects, libraries and library flags. 7546if AC_TRY_EVAL(ac_compile); then 7547 # Parse the compiler output and extract the necessary 7548 # objects, libraries and library flags. 7549 7550 # Sentinel used to keep track of whether or not we are before 7551 # the conftest object file. 7552 pre_test_object_deps_done=no 7553 7554 for p in `eval "$output_verbose_link_cmd"`; do 7555 case $prev$p in 7556 7557 -L* | -R* | -l*) 7558 # Some compilers place space between "-{L,R}" and the path. 7559 # Remove the space. 7560 if test x-L = "$p" || 7561 test x-R = "$p"; then 7562 prev=$p 7563 continue 7564 fi 7565 7566 # Expand the sysroot to ease extracting the directories later. 7567 if test -z "$prev"; then 7568 case $p in 7569 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572 esac 7573 fi 7574 case $p in 7575 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576 esac 7577 if test no = "$pre_test_object_deps_done"; then 7578 case $prev in 7579 -L | -R) 7580 # Internal compiler library paths should come after those 7581 # provided the user. The postdeps already come after the 7582 # user supplied libs so there is no need to process them. 7583 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585 else 7586 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587 fi 7588 ;; 7589 # The "-l" case would never come before the object being 7590 # linked, so don't bother handling this case. 7591 esac 7592 else 7593 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594 _LT_TAGVAR(postdeps, $1)=$prev$p 7595 else 7596 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597 fi 7598 fi 7599 prev= 7600 ;; 7601 7602 *.lto.$objext) ;; # Ignore GCC LTO objects 7603 *.$objext) 7604 # This assumes that the test object file only shows up 7605 # once in the compiler output. 7606 if test "$p" = "conftest.$objext"; then 7607 pre_test_object_deps_done=yes 7608 continue 7609 fi 7610 7611 if test no = "$pre_test_object_deps_done"; then 7612 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613 _LT_TAGVAR(predep_objects, $1)=$p 7614 else 7615 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616 fi 7617 else 7618 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619 _LT_TAGVAR(postdep_objects, $1)=$p 7620 else 7621 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622 fi 7623 fi 7624 ;; 7625 7626 *) ;; # Ignore the rest. 7627 7628 esac 7629 done 7630 7631 # Clean up. 7632 rm -f a.out a.exe 7633else 7634 echo "libtool.m4: error: problem compiling $1 test program" 7635fi 7636 7637$RM -f confest.$objext 7638CFLAGS=$_lt_libdeps_save_CFLAGS 7639 7640# PORTME: override above test on systems where it is broken 7641m4_if([$1], [CXX], 7642[case $host_os in 7643interix[[3-9]]*) 7644 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645 # hack all around it, let's just trust "g++" to DTRT. 7646 _LT_TAGVAR(predep_objects,$1)= 7647 _LT_TAGVAR(postdep_objects,$1)= 7648 _LT_TAGVAR(postdeps,$1)= 7649 ;; 7650esac 7651]) 7652 7653case " $_LT_TAGVAR(postdeps, $1) " in 7654*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7655esac 7656 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659fi 7660_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661 [The directories searched by this compiler when creating a shared library]) 7662_LT_TAGDECL([], [predep_objects], [1], 7663 [Dependencies to place before and after the objects being linked to 7664 create a shared library]) 7665_LT_TAGDECL([], [postdep_objects], [1]) 7666_LT_TAGDECL([], [predeps], [1]) 7667_LT_TAGDECL([], [postdeps], [1]) 7668_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669 [The library search path used internally by the compiler when linking 7670 a shared library]) 7671])# _LT_SYS_HIDDEN_LIBDEPS 7672 7673 7674# _LT_LANG_F77_CONFIG([TAG]) 7675# -------------------------- 7676# Ensure that the configuration variables for a Fortran 77 compiler are 7677# suitably defined. These variables are subsequently used by _LT_CONFIG 7678# to write the compiler configuration to 'libtool'. 7679m4_defun([_LT_LANG_F77_CONFIG], 7680[AC_LANG_PUSH(Fortran 77) 7681if test -z "$F77" || test no = "$F77"; then 7682 _lt_disable_F77=yes 7683fi 7684 7685_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686_LT_TAGVAR(allow_undefined_flag, $1)= 7687_LT_TAGVAR(always_export_symbols, $1)=no 7688_LT_TAGVAR(archive_expsym_cmds, $1)= 7689_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690_LT_TAGVAR(hardcode_direct, $1)=no 7691_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694_LT_TAGVAR(hardcode_minus_L, $1)=no 7695_LT_TAGVAR(hardcode_automatic, $1)=no 7696_LT_TAGVAR(inherit_rpath, $1)=no 7697_LT_TAGVAR(module_cmds, $1)= 7698_LT_TAGVAR(module_expsym_cmds, $1)= 7699_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7701_LT_TAGVAR(reload_flag, $1)=$reload_flag 7702_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703_LT_TAGVAR(no_undefined_flag, $1)= 7704_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706 7707# Source file extension for f77 test sources. 7708ac_ext=f 7709 7710# Object file extension for compiled f77 test sources. 7711objext=o 7712_LT_TAGVAR(objext, $1)=$objext 7713 7714# No sense in running all these tests if we already determined that 7715# the F77 compiler isn't working. Some variables (like enable_shared) 7716# are currently assumed to apply to all compilers on this platform, 7717# and will be corrupted by setting them based on a non-working compiler. 7718if test yes != "$_lt_disable_F77"; then 7719 # Code to be used in simple compile tests 7720 lt_simple_compile_test_code="\ 7721 subroutine t 7722 return 7723 end 7724" 7725 7726 # Code to be used in simple link tests 7727 lt_simple_link_test_code="\ 7728 program t 7729 end 7730" 7731 7732 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733 _LT_TAG_COMPILER 7734 7735 # save warnings/boilerplate of simple test code 7736 _LT_COMPILER_BOILERPLATE 7737 _LT_LINKER_BOILERPLATE 7738 7739 # Allow CC to be a program name with arguments. 7740 lt_save_CC=$CC 7741 lt_save_GCC=$GCC 7742 lt_save_CFLAGS=$CFLAGS 7743 CC=${F77-"f77"} 7744 CFLAGS=$FFLAGS 7745 compiler=$CC 7746 _LT_TAGVAR(compiler, $1)=$CC 7747 _LT_CC_BASENAME([$compiler]) 7748 GCC=$G77 7749 if test -n "$compiler"; then 7750 AC_MSG_CHECKING([if libtool supports shared libraries]) 7751 AC_MSG_RESULT([$can_build_shared]) 7752 7753 AC_MSG_CHECKING([whether to build shared libraries]) 7754 test no = "$can_build_shared" && enable_shared=no 7755 7756 # On AIX, shared libraries and static libraries use the same namespace, and 7757 # are all built from PIC. 7758 case $host_os in 7759 aix3*) 7760 test yes = "$enable_shared" && enable_static=no 7761 if test -n "$RANLIB"; then 7762 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763 postinstall_cmds='$RANLIB $lib' 7764 fi 7765 ;; 7766 aix[[4-9]]*) 7767 if test ia64 != "$host_cpu"; then 7768 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769 yes,aix,yes) ;; # shared object as lib.so file only 7770 yes,svr4,*) ;; # shared object as lib.so archive member only 7771 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772 esac 7773 fi 7774 ;; 7775 esac 7776 AC_MSG_RESULT([$enable_shared]) 7777 7778 AC_MSG_CHECKING([whether to build static libraries]) 7779 # Make sure either enable_shared or enable_static is yes. 7780 test yes = "$enable_shared" || enable_static=yes 7781 AC_MSG_RESULT([$enable_static]) 7782 7783 _LT_TAGVAR(GCC, $1)=$G77 7784 _LT_TAGVAR(LD, $1)=$LD 7785 7786 ## CAVEAT EMPTOR: 7787 ## There is no encapsulation within the following macros, do not change 7788 ## the running order or otherwise move them around unless you know exactly 7789 ## what you are doing... 7790 _LT_COMPILER_PIC($1) 7791 _LT_COMPILER_C_O($1) 7792 _LT_COMPILER_FILE_LOCKS($1) 7793 _LT_LINKER_SHLIBS($1) 7794 _LT_SYS_DYNAMIC_LINKER($1) 7795 _LT_LINKER_HARDCODE_LIBPATH($1) 7796 7797 _LT_CONFIG($1) 7798 fi # test -n "$compiler" 7799 7800 GCC=$lt_save_GCC 7801 CC=$lt_save_CC 7802 CFLAGS=$lt_save_CFLAGS 7803fi # test yes != "$_lt_disable_F77" 7804 7805AC_LANG_POP 7806])# _LT_LANG_F77_CONFIG 7807 7808 7809# _LT_LANG_FC_CONFIG([TAG]) 7810# ------------------------- 7811# Ensure that the configuration variables for a Fortran compiler are 7812# suitably defined. These variables are subsequently used by _LT_CONFIG 7813# to write the compiler configuration to 'libtool'. 7814m4_defun([_LT_LANG_FC_CONFIG], 7815[AC_LANG_PUSH(Fortran) 7816 7817if test -z "$FC" || test no = "$FC"; then 7818 _lt_disable_FC=yes 7819fi 7820 7821_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822_LT_TAGVAR(allow_undefined_flag, $1)= 7823_LT_TAGVAR(always_export_symbols, $1)=no 7824_LT_TAGVAR(archive_expsym_cmds, $1)= 7825_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826_LT_TAGVAR(hardcode_direct, $1)=no 7827_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830_LT_TAGVAR(hardcode_minus_L, $1)=no 7831_LT_TAGVAR(hardcode_automatic, $1)=no 7832_LT_TAGVAR(inherit_rpath, $1)=no 7833_LT_TAGVAR(module_cmds, $1)= 7834_LT_TAGVAR(module_expsym_cmds, $1)= 7835_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7837_LT_TAGVAR(reload_flag, $1)=$reload_flag 7838_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839_LT_TAGVAR(no_undefined_flag, $1)= 7840_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842 7843# Source file extension for fc test sources. 7844ac_ext=${ac_fc_srcext-f} 7845 7846# Object file extension for compiled fc test sources. 7847objext=o 7848_LT_TAGVAR(objext, $1)=$objext 7849 7850# No sense in running all these tests if we already determined that 7851# the FC compiler isn't working. Some variables (like enable_shared) 7852# are currently assumed to apply to all compilers on this platform, 7853# and will be corrupted by setting them based on a non-working compiler. 7854if test yes != "$_lt_disable_FC"; then 7855 # Code to be used in simple compile tests 7856 lt_simple_compile_test_code="\ 7857 subroutine t 7858 return 7859 end 7860" 7861 7862 # Code to be used in simple link tests 7863 lt_simple_link_test_code="\ 7864 program t 7865 end 7866" 7867 7868 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869 _LT_TAG_COMPILER 7870 7871 # save warnings/boilerplate of simple test code 7872 _LT_COMPILER_BOILERPLATE 7873 _LT_LINKER_BOILERPLATE 7874 7875 # Allow CC to be a program name with arguments. 7876 lt_save_CC=$CC 7877 lt_save_GCC=$GCC 7878 lt_save_CFLAGS=$CFLAGS 7879 CC=${FC-"f95"} 7880 CFLAGS=$FCFLAGS 7881 compiler=$CC 7882 GCC=$ac_cv_fc_compiler_gnu 7883 7884 _LT_TAGVAR(compiler, $1)=$CC 7885 _LT_CC_BASENAME([$compiler]) 7886 7887 if test -n "$compiler"; then 7888 AC_MSG_CHECKING([if libtool supports shared libraries]) 7889 AC_MSG_RESULT([$can_build_shared]) 7890 7891 AC_MSG_CHECKING([whether to build shared libraries]) 7892 test no = "$can_build_shared" && enable_shared=no 7893 7894 # On AIX, shared libraries and static libraries use the same namespace, and 7895 # are all built from PIC. 7896 case $host_os in 7897 aix3*) 7898 test yes = "$enable_shared" && enable_static=no 7899 if test -n "$RANLIB"; then 7900 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901 postinstall_cmds='$RANLIB $lib' 7902 fi 7903 ;; 7904 aix[[4-9]]*) 7905 if test ia64 != "$host_cpu"; then 7906 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907 yes,aix,yes) ;; # shared object as lib.so file only 7908 yes,svr4,*) ;; # shared object as lib.so archive member only 7909 yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910 esac 7911 fi 7912 ;; 7913 esac 7914 AC_MSG_RESULT([$enable_shared]) 7915 7916 AC_MSG_CHECKING([whether to build static libraries]) 7917 # Make sure either enable_shared or enable_static is yes. 7918 test yes = "$enable_shared" || enable_static=yes 7919 AC_MSG_RESULT([$enable_static]) 7920 7921 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922 _LT_TAGVAR(LD, $1)=$LD 7923 7924 ## CAVEAT EMPTOR: 7925 ## There is no encapsulation within the following macros, do not change 7926 ## the running order or otherwise move them around unless you know exactly 7927 ## what you are doing... 7928 _LT_SYS_HIDDEN_LIBDEPS($1) 7929 _LT_COMPILER_PIC($1) 7930 _LT_COMPILER_C_O($1) 7931 _LT_COMPILER_FILE_LOCKS($1) 7932 _LT_LINKER_SHLIBS($1) 7933 _LT_SYS_DYNAMIC_LINKER($1) 7934 _LT_LINKER_HARDCODE_LIBPATH($1) 7935 7936 _LT_CONFIG($1) 7937 fi # test -n "$compiler" 7938 7939 GCC=$lt_save_GCC 7940 CC=$lt_save_CC 7941 CFLAGS=$lt_save_CFLAGS 7942fi # test yes != "$_lt_disable_FC" 7943 7944AC_LANG_POP 7945])# _LT_LANG_FC_CONFIG 7946 7947 7948# _LT_LANG_GCJ_CONFIG([TAG]) 7949# -------------------------- 7950# Ensure that the configuration variables for the GNU Java Compiler compiler 7951# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952# to write the compiler configuration to 'libtool'. 7953m4_defun([_LT_LANG_GCJ_CONFIG], 7954[AC_REQUIRE([LT_PROG_GCJ])dnl 7955AC_LANG_SAVE 7956 7957# Source file extension for Java test sources. 7958ac_ext=java 7959 7960# Object file extension for compiled Java test sources. 7961objext=o 7962_LT_TAGVAR(objext, $1)=$objext 7963 7964# Code to be used in simple compile tests 7965lt_simple_compile_test_code="class foo {}" 7966 7967# Code to be used in simple link tests 7968lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7969 7970# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971_LT_TAG_COMPILER 7972 7973# save warnings/boilerplate of simple test code 7974_LT_COMPILER_BOILERPLATE 7975_LT_LINKER_BOILERPLATE 7976 7977# Allow CC to be a program name with arguments. 7978lt_save_CC=$CC 7979lt_save_CFLAGS=$CFLAGS 7980lt_save_GCC=$GCC 7981GCC=yes 7982CC=${GCJ-"gcj"} 7983CFLAGS=$GCJFLAGS 7984compiler=$CC 7985_LT_TAGVAR(compiler, $1)=$CC 7986_LT_TAGVAR(LD, $1)=$LD 7987_LT_CC_BASENAME([$compiler]) 7988 7989# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7991 7992_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7993_LT_TAGVAR(reload_flag, $1)=$reload_flag 7994_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7995 7996if test -n "$compiler"; then 7997 _LT_COMPILER_NO_RTTI($1) 7998 _LT_COMPILER_PIC($1) 7999 _LT_COMPILER_C_O($1) 8000 _LT_COMPILER_FILE_LOCKS($1) 8001 _LT_LINKER_SHLIBS($1) 8002 _LT_LINKER_HARDCODE_LIBPATH($1) 8003 8004 _LT_CONFIG($1) 8005fi 8006 8007AC_LANG_RESTORE 8008 8009GCC=$lt_save_GCC 8010CC=$lt_save_CC 8011CFLAGS=$lt_save_CFLAGS 8012])# _LT_LANG_GCJ_CONFIG 8013 8014 8015# _LT_LANG_GO_CONFIG([TAG]) 8016# -------------------------- 8017# Ensure that the configuration variables for the GNU Go compiler 8018# are suitably defined. These variables are subsequently used by _LT_CONFIG 8019# to write the compiler configuration to 'libtool'. 8020m4_defun([_LT_LANG_GO_CONFIG], 8021[AC_REQUIRE([LT_PROG_GO])dnl 8022AC_LANG_SAVE 8023 8024# Source file extension for Go test sources. 8025ac_ext=go 8026 8027# Object file extension for compiled Go test sources. 8028objext=o 8029_LT_TAGVAR(objext, $1)=$objext 8030 8031# Code to be used in simple compile tests 8032lt_simple_compile_test_code="package main; func main() { }" 8033 8034# Code to be used in simple link tests 8035lt_simple_link_test_code='package main; func main() { }' 8036 8037# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8038_LT_TAG_COMPILER 8039 8040# save warnings/boilerplate of simple test code 8041_LT_COMPILER_BOILERPLATE 8042_LT_LINKER_BOILERPLATE 8043 8044# Allow CC to be a program name with arguments. 8045lt_save_CC=$CC 8046lt_save_CFLAGS=$CFLAGS 8047lt_save_GCC=$GCC 8048GCC=yes 8049CC=${GOC-"gccgo"} 8050CFLAGS=$GOFLAGS 8051compiler=$CC 8052_LT_TAGVAR(compiler, $1)=$CC 8053_LT_TAGVAR(LD, $1)=$LD 8054_LT_CC_BASENAME([$compiler]) 8055 8056# Go did not exist at the time GCC didn't implicitly link libc in. 8057_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8058 8059_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8060_LT_TAGVAR(reload_flag, $1)=$reload_flag 8061_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8062 8063if test -n "$compiler"; then 8064 _LT_COMPILER_NO_RTTI($1) 8065 _LT_COMPILER_PIC($1) 8066 _LT_COMPILER_C_O($1) 8067 _LT_COMPILER_FILE_LOCKS($1) 8068 _LT_LINKER_SHLIBS($1) 8069 _LT_LINKER_HARDCODE_LIBPATH($1) 8070 8071 _LT_CONFIG($1) 8072fi 8073 8074AC_LANG_RESTORE 8075 8076GCC=$lt_save_GCC 8077CC=$lt_save_CC 8078CFLAGS=$lt_save_CFLAGS 8079])# _LT_LANG_GO_CONFIG 8080 8081 8082# _LT_LANG_RC_CONFIG([TAG]) 8083# ------------------------- 8084# Ensure that the configuration variables for the Windows resource compiler 8085# are suitably defined. These variables are subsequently used by _LT_CONFIG 8086# to write the compiler configuration to 'libtool'. 8087m4_defun([_LT_LANG_RC_CONFIG], 8088[AC_REQUIRE([LT_PROG_RC])dnl 8089AC_LANG_SAVE 8090 8091# Source file extension for RC test sources. 8092ac_ext=rc 8093 8094# Object file extension for compiled RC test sources. 8095objext=o 8096_LT_TAGVAR(objext, $1)=$objext 8097 8098# Code to be used in simple compile tests 8099lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8100 8101# Code to be used in simple link tests 8102lt_simple_link_test_code=$lt_simple_compile_test_code 8103 8104# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8105_LT_TAG_COMPILER 8106 8107# save warnings/boilerplate of simple test code 8108_LT_COMPILER_BOILERPLATE 8109_LT_LINKER_BOILERPLATE 8110 8111# Allow CC to be a program name with arguments. 8112lt_save_CC=$CC 8113lt_save_CFLAGS=$CFLAGS 8114lt_save_GCC=$GCC 8115GCC= 8116CC=${RC-"windres"} 8117CFLAGS= 8118compiler=$CC 8119_LT_TAGVAR(compiler, $1)=$CC 8120_LT_CC_BASENAME([$compiler]) 8121_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8122 8123if test -n "$compiler"; then 8124 : 8125 _LT_CONFIG($1) 8126fi 8127 8128GCC=$lt_save_GCC 8129AC_LANG_RESTORE 8130CC=$lt_save_CC 8131CFLAGS=$lt_save_CFLAGS 8132])# _LT_LANG_RC_CONFIG 8133 8134 8135# LT_PROG_GCJ 8136# ----------- 8137AC_DEFUN([LT_PROG_GCJ], 8138[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8139 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8140 [AC_CHECK_TOOL(GCJ, gcj,) 8141 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8142 AC_SUBST(GCJFLAGS)])])[]dnl 8143]) 8144 8145# Old name: 8146AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8147dnl aclocal-1.4 backwards compatibility: 8148dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8149 8150 8151# LT_PROG_GO 8152# ---------- 8153AC_DEFUN([LT_PROG_GO], 8154[AC_CHECK_TOOL(GOC, gccgo,) 8155]) 8156 8157 8158# LT_PROG_RC 8159# ---------- 8160AC_DEFUN([LT_PROG_RC], 8161[AC_CHECK_TOOL(RC, windres,) 8162]) 8163 8164# Old name: 8165AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8166dnl aclocal-1.4 backwards compatibility: 8167dnl AC_DEFUN([LT_AC_PROG_RC], []) 8168 8169 8170# _LT_DECL_EGREP 8171# -------------- 8172# If we don't have a new enough Autoconf to choose the best grep 8173# available, choose the one first in the user's PATH. 8174m4_defun([_LT_DECL_EGREP], 8175[AC_REQUIRE([AC_PROG_EGREP])dnl 8176AC_REQUIRE([AC_PROG_FGREP])dnl 8177test -z "$GREP" && GREP=grep 8178_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8179_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8180_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8181dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8182AC_SUBST([GREP]) 8183]) 8184 8185 8186# _LT_DECL_OBJDUMP 8187# -------------- 8188# If we don't have a new enough Autoconf to choose the best objdump 8189# available, choose the one first in the user's PATH. 8190m4_defun([_LT_DECL_OBJDUMP], 8191[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8192test -z "$OBJDUMP" && OBJDUMP=objdump 8193_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8194AC_SUBST([OBJDUMP]) 8195]) 8196 8197# _LT_DECL_DLLTOOL 8198# ---------------- 8199# Ensure DLLTOOL variable is set. 8200m4_defun([_LT_DECL_DLLTOOL], 8201[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8202test -z "$DLLTOOL" && DLLTOOL=dlltool 8203_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8204AC_SUBST([DLLTOOL]) 8205]) 8206 8207# _LT_DECL_SED 8208# ------------ 8209# Check for a fully-functional sed program, that truncates 8210# as few characters as possible. Prefer GNU sed if found. 8211m4_defun([_LT_DECL_SED], 8212[AC_PROG_SED 8213test -z "$SED" && SED=sed 8214Xsed="$SED -e 1s/^X//" 8215_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8216_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8217 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8218])# _LT_DECL_SED 8219 8220m4_ifndef([AC_PROG_SED], [ 8221# NOTE: This macro has been submitted for inclusion into # 8222# GNU Autoconf as AC_PROG_SED. When it is available in # 8223# a released version of Autoconf we should remove this # 8224# macro and use it instead. # 8225 8226m4_defun([AC_PROG_SED], 8227[AC_MSG_CHECKING([for a sed that does not truncate output]) 8228AC_CACHE_VAL(lt_cv_path_SED, 8229[# Loop through the user's path and test for sed and gsed. 8230# Then use that list of sed's as ones to test for truncation. 8231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8232for as_dir in $PATH 8233do 8234 IFS=$as_save_IFS 8235 test -z "$as_dir" && as_dir=. 8236 for lt_ac_prog in sed gsed; do 8237 for ac_exec_ext in '' $ac_executable_extensions; do 8238 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8239 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8240 fi 8241 done 8242 done 8243done 8244IFS=$as_save_IFS 8245lt_ac_max=0 8246lt_ac_count=0 8247# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8248# along with /bin/sed that truncates output. 8249for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8250 test ! -f "$lt_ac_sed" && continue 8251 cat /dev/null > conftest.in 8252 lt_ac_count=0 8253 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8254 # Check for GNU sed and select it if it is found. 8255 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8256 lt_cv_path_SED=$lt_ac_sed 8257 break 8258 fi 8259 while true; do 8260 cat conftest.in conftest.in >conftest.tmp 8261 mv conftest.tmp conftest.in 8262 cp conftest.in conftest.nl 8263 echo >>conftest.nl 8264 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8265 cmp -s conftest.out conftest.nl || break 8266 # 10000 chars as input seems more than enough 8267 test 10 -lt "$lt_ac_count" && break 8268 lt_ac_count=`expr $lt_ac_count + 1` 8269 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8270 lt_ac_max=$lt_ac_count 8271 lt_cv_path_SED=$lt_ac_sed 8272 fi 8273 done 8274done 8275]) 8276SED=$lt_cv_path_SED 8277AC_SUBST([SED]) 8278AC_MSG_RESULT([$SED]) 8279])#AC_PROG_SED 8280])#m4_ifndef 8281 8282# Old name: 8283AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8284dnl aclocal-1.4 backwards compatibility: 8285dnl AC_DEFUN([LT_AC_PROG_SED], []) 8286 8287 8288# _LT_CHECK_SHELL_FEATURES 8289# ------------------------ 8290# Find out whether the shell is Bourne or XSI compatible, 8291# or has some other useful features. 8292m4_defun([_LT_CHECK_SHELL_FEATURES], 8293[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8294 lt_unset=unset 8295else 8296 lt_unset=false 8297fi 8298_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8299 8300# test EBCDIC or ASCII 8301case `echo X|tr X '\101'` in 8302 A) # ASCII based system 8303 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8304 lt_SP2NL='tr \040 \012' 8305 lt_NL2SP='tr \015\012 \040\040' 8306 ;; 8307 *) # EBCDIC based system 8308 lt_SP2NL='tr \100 \n' 8309 lt_NL2SP='tr \r\n \100\100' 8310 ;; 8311esac 8312_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8313_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8314])# _LT_CHECK_SHELL_FEATURES 8315 8316 8317# _LT_PATH_CONVERSION_FUNCTIONS 8318# ----------------------------- 8319# Determine what file name conversion functions should be used by 8320# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8321# for certain cross-compile configurations and native mingw. 8322m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8323[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8324AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8325AC_MSG_CHECKING([how to convert $build file names to $host format]) 8326AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8327[case $host in 8328 *-*-mingw* ) 8329 case $build in 8330 *-*-mingw* ) # actually msys 8331 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8332 ;; 8333 *-*-cygwin* ) 8334 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8335 ;; 8336 * ) # otherwise, assume *nix 8337 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8338 ;; 8339 esac 8340 ;; 8341 *-*-cygwin* ) 8342 case $build in 8343 *-*-mingw* ) # actually msys 8344 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8345 ;; 8346 *-*-cygwin* ) 8347 lt_cv_to_host_file_cmd=func_convert_file_noop 8348 ;; 8349 * ) # otherwise, assume *nix 8350 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8351 ;; 8352 esac 8353 ;; 8354 * ) # unhandled hosts (and "normal" native builds) 8355 lt_cv_to_host_file_cmd=func_convert_file_noop 8356 ;; 8357esac 8358]) 8359to_host_file_cmd=$lt_cv_to_host_file_cmd 8360AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8361_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8362 [0], [convert $build file names to $host format])dnl 8363 8364AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8365AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8366[#assume ordinary cross tools, or native build. 8367lt_cv_to_tool_file_cmd=func_convert_file_noop 8368case $host in 8369 *-*-mingw* ) 8370 case $build in 8371 *-*-mingw* ) # actually msys 8372 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8373 ;; 8374 esac 8375 ;; 8376esac 8377]) 8378to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8379AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8380_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8381 [0], [convert $build files to toolchain format])dnl 8382])# _LT_PATH_CONVERSION_FUNCTIONS 8383 8384# Helper functions for option handling. -*- Autoconf -*- 8385# 8386# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8387# Foundation, Inc. 8388# Written by Gary V. Vaughan, 2004 8389# 8390# This file is free software; the Free Software Foundation gives 8391# unlimited permission to copy and/or distribute it, with or without 8392# modifications, as long as this notice is preserved. 8393 8394# serial 8 ltoptions.m4 8395 8396# This is to help aclocal find these macros, as it can't see m4_define. 8397AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8398 8399 8400# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8401# ------------------------------------------ 8402m4_define([_LT_MANGLE_OPTION], 8403[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8404 8405 8406# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8407# --------------------------------------- 8408# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8409# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8410# saved as a flag. 8411m4_define([_LT_SET_OPTION], 8412[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8413m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8414 _LT_MANGLE_DEFUN([$1], [$2]), 8415 [m4_warning([Unknown $1 option '$2'])])[]dnl 8416]) 8417 8418 8419# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8420# ------------------------------------------------------------ 8421# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8422m4_define([_LT_IF_OPTION], 8423[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8424 8425 8426# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8427# ------------------------------------------------------- 8428# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8429# are set. 8430m4_define([_LT_UNLESS_OPTIONS], 8431[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8432 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8433 [m4_define([$0_found])])])[]dnl 8434m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8435])[]dnl 8436]) 8437 8438 8439# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8440# ---------------------------------------- 8441# OPTION-LIST is a space-separated list of Libtool options associated 8442# with MACRO-NAME. If any OPTION has a matching handler declared with 8443# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8444# the unknown option and exit. 8445m4_defun([_LT_SET_OPTIONS], 8446[# Set options 8447m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8448 [_LT_SET_OPTION([$1], _LT_Option)]) 8449 8450m4_if([$1],[LT_INIT],[ 8451 dnl 8452 dnl Simply set some default values (i.e off) if boolean options were not 8453 dnl specified: 8454 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8455 ]) 8456 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8457 ]) 8458 dnl 8459 dnl If no reference was made to various pairs of opposing options, then 8460 dnl we run the default mode handler for the pair. For example, if neither 8461 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8462 dnl archives by default: 8463 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8464 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8465 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8466 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8467 [_LT_ENABLE_FAST_INSTALL]) 8468 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8469 [_LT_WITH_AIX_SONAME([aix])]) 8470 ]) 8471])# _LT_SET_OPTIONS 8472 8473 8474 8475# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8476# ----------------------------------------- 8477m4_define([_LT_MANGLE_DEFUN], 8478[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8479 8480 8481# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8482# ----------------------------------------------- 8483m4_define([LT_OPTION_DEFINE], 8484[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8485])# LT_OPTION_DEFINE 8486 8487 8488# dlopen 8489# ------ 8490LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8491]) 8492 8493AU_DEFUN([AC_LIBTOOL_DLOPEN], 8494[_LT_SET_OPTION([LT_INIT], [dlopen]) 8495AC_DIAGNOSE([obsolete], 8496[$0: Remove this warning and the call to _LT_SET_OPTION when you 8497put the 'dlopen' option into LT_INIT's first parameter.]) 8498]) 8499 8500dnl aclocal-1.4 backwards compatibility: 8501dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8502 8503 8504# win32-dll 8505# --------- 8506# Declare package support for building win32 dll's. 8507LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8508[enable_win32_dll=yes 8509 8510case $host in 8511*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8512 AC_CHECK_TOOL(AS, as, false) 8513 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8514 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8515 ;; 8516esac 8517 8518test -z "$AS" && AS=as 8519_LT_DECL([], [AS], [1], [Assembler program])dnl 8520 8521test -z "$DLLTOOL" && DLLTOOL=dlltool 8522_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8523 8524test -z "$OBJDUMP" && OBJDUMP=objdump 8525_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8526])# win32-dll 8527 8528AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8529[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8530_LT_SET_OPTION([LT_INIT], [win32-dll]) 8531AC_DIAGNOSE([obsolete], 8532[$0: Remove this warning and the call to _LT_SET_OPTION when you 8533put the 'win32-dll' option into LT_INIT's first parameter.]) 8534]) 8535 8536dnl aclocal-1.4 backwards compatibility: 8537dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8538 8539 8540# _LT_ENABLE_SHARED([DEFAULT]) 8541# ---------------------------- 8542# implement the --enable-shared flag, and supports the 'shared' and 8543# 'disable-shared' LT_INIT options. 8544# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8545m4_define([_LT_ENABLE_SHARED], 8546[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8547AC_ARG_ENABLE([shared], 8548 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8549 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8550 [p=${PACKAGE-default} 8551 case $enableval in 8552 yes) enable_shared=yes ;; 8553 no) enable_shared=no ;; 8554 *) 8555 enable_shared=no 8556 # Look at the argument we got. We use all the common list separators. 8557 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8558 for pkg in $enableval; do 8559 IFS=$lt_save_ifs 8560 if test "X$pkg" = "X$p"; then 8561 enable_shared=yes 8562 fi 8563 done 8564 IFS=$lt_save_ifs 8565 ;; 8566 esac], 8567 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8568 8569 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8570 [Whether or not to build shared libraries]) 8571])# _LT_ENABLE_SHARED 8572 8573LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8574LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8575 8576# Old names: 8577AC_DEFUN([AC_ENABLE_SHARED], 8578[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8579]) 8580 8581AC_DEFUN([AC_DISABLE_SHARED], 8582[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8583]) 8584 8585AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8586AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8587 8588dnl aclocal-1.4 backwards compatibility: 8589dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8590dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8591 8592 8593 8594# _LT_ENABLE_STATIC([DEFAULT]) 8595# ---------------------------- 8596# implement the --enable-static flag, and support the 'static' and 8597# 'disable-static' LT_INIT options. 8598# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8599m4_define([_LT_ENABLE_STATIC], 8600[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8601AC_ARG_ENABLE([static], 8602 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8603 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8604 [p=${PACKAGE-default} 8605 case $enableval in 8606 yes) enable_static=yes ;; 8607 no) enable_static=no ;; 8608 *) 8609 enable_static=no 8610 # Look at the argument we got. We use all the common list separators. 8611 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8612 for pkg in $enableval; do 8613 IFS=$lt_save_ifs 8614 if test "X$pkg" = "X$p"; then 8615 enable_static=yes 8616 fi 8617 done 8618 IFS=$lt_save_ifs 8619 ;; 8620 esac], 8621 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8622 8623 _LT_DECL([build_old_libs], [enable_static], [0], 8624 [Whether or not to build static libraries]) 8625])# _LT_ENABLE_STATIC 8626 8627LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8628LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8629 8630# Old names: 8631AC_DEFUN([AC_ENABLE_STATIC], 8632[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8633]) 8634 8635AC_DEFUN([AC_DISABLE_STATIC], 8636[_LT_SET_OPTION([LT_INIT], [disable-static]) 8637]) 8638 8639AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8640AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8641 8642dnl aclocal-1.4 backwards compatibility: 8643dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8644dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8645 8646 8647 8648# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8649# ---------------------------------- 8650# implement the --enable-fast-install flag, and support the 'fast-install' 8651# and 'disable-fast-install' LT_INIT options. 8652# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8653m4_define([_LT_ENABLE_FAST_INSTALL], 8654[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8655AC_ARG_ENABLE([fast-install], 8656 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8657 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8658 [p=${PACKAGE-default} 8659 case $enableval in 8660 yes) enable_fast_install=yes ;; 8661 no) enable_fast_install=no ;; 8662 *) 8663 enable_fast_install=no 8664 # Look at the argument we got. We use all the common list separators. 8665 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8666 for pkg in $enableval; do 8667 IFS=$lt_save_ifs 8668 if test "X$pkg" = "X$p"; then 8669 enable_fast_install=yes 8670 fi 8671 done 8672 IFS=$lt_save_ifs 8673 ;; 8674 esac], 8675 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8676 8677_LT_DECL([fast_install], [enable_fast_install], [0], 8678 [Whether or not to optimize for fast installation])dnl 8679])# _LT_ENABLE_FAST_INSTALL 8680 8681LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8682LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8683 8684# Old names: 8685AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8686[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8687AC_DIAGNOSE([obsolete], 8688[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8689the 'fast-install' option into LT_INIT's first parameter.]) 8690]) 8691 8692AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8693[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8694AC_DIAGNOSE([obsolete], 8695[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8696the 'disable-fast-install' option into LT_INIT's first parameter.]) 8697]) 8698 8699dnl aclocal-1.4 backwards compatibility: 8700dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8701dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8702 8703 8704# _LT_WITH_AIX_SONAME([DEFAULT]) 8705# ---------------------------------- 8706# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8707# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8708# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8709m4_define([_LT_WITH_AIX_SONAME], 8710[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8711shared_archive_member_spec= 8712case $host,$enable_shared in 8713power*-*-aix[[5-9]]*,yes) 8714 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8715 AC_ARG_WITH([aix-soname], 8716 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8717 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8718 [case $withval in 8719 aix|svr4|both) 8720 ;; 8721 *) 8722 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8723 ;; 8724 esac 8725 lt_cv_with_aix_soname=$with_aix_soname], 8726 [AC_CACHE_VAL([lt_cv_with_aix_soname], 8727 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8728 with_aix_soname=$lt_cv_with_aix_soname]) 8729 AC_MSG_RESULT([$with_aix_soname]) 8730 if test aix != "$with_aix_soname"; then 8731 # For the AIX way of multilib, we name the shared archive member 8732 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8733 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8734 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8735 # the AIX toolchain works better with OBJECT_MODE set (default 32). 8736 if test 64 = "${OBJECT_MODE-32}"; then 8737 shared_archive_member_spec=shr_64 8738 else 8739 shared_archive_member_spec=shr 8740 fi 8741 fi 8742 ;; 8743*) 8744 with_aix_soname=aix 8745 ;; 8746esac 8747 8748_LT_DECL([], [shared_archive_member_spec], [0], 8749 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8750])# _LT_WITH_AIX_SONAME 8751 8752LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8753LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8754LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8755 8756 8757# _LT_WITH_PIC([MODE]) 8758# -------------------- 8759# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8760# LT_INIT options. 8761# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8762m4_define([_LT_WITH_PIC], 8763[AC_ARG_WITH([pic], 8764 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8765 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8766 [lt_p=${PACKAGE-default} 8767 case $withval in 8768 yes|no) pic_mode=$withval ;; 8769 *) 8770 pic_mode=default 8771 # Look at the argument we got. We use all the common list separators. 8772 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8773 for lt_pkg in $withval; do 8774 IFS=$lt_save_ifs 8775 if test "X$lt_pkg" = "X$lt_p"; then 8776 pic_mode=yes 8777 fi 8778 done 8779 IFS=$lt_save_ifs 8780 ;; 8781 esac], 8782 [pic_mode=m4_default([$1], [default])]) 8783 8784_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8785])# _LT_WITH_PIC 8786 8787LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8788LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8789 8790# Old name: 8791AU_DEFUN([AC_LIBTOOL_PICMODE], 8792[_LT_SET_OPTION([LT_INIT], [pic-only]) 8793AC_DIAGNOSE([obsolete], 8794[$0: Remove this warning and the call to _LT_SET_OPTION when you 8795put the 'pic-only' option into LT_INIT's first parameter.]) 8796]) 8797 8798dnl aclocal-1.4 backwards compatibility: 8799dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8800 8801 8802m4_define([_LTDL_MODE], []) 8803LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8804 [m4_define([_LTDL_MODE], [nonrecursive])]) 8805LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8806 [m4_define([_LTDL_MODE], [recursive])]) 8807LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8808 [m4_define([_LTDL_MODE], [subproject])]) 8809 8810m4_define([_LTDL_TYPE], []) 8811LT_OPTION_DEFINE([LTDL_INIT], [installable], 8812 [m4_define([_LTDL_TYPE], [installable])]) 8813LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8814 [m4_define([_LTDL_TYPE], [convenience])]) 8815 8816# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8817# 8818# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8819# Foundation, Inc. 8820# Written by Gary V. Vaughan, 2004 8821# 8822# This file is free software; the Free Software Foundation gives 8823# unlimited permission to copy and/or distribute it, with or without 8824# modifications, as long as this notice is preserved. 8825 8826# serial 6 ltsugar.m4 8827 8828# This is to help aclocal find these macros, as it can't see m4_define. 8829AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8830 8831 8832# lt_join(SEP, ARG1, [ARG2...]) 8833# ----------------------------- 8834# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8835# associated separator. 8836# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8837# versions in m4sugar had bugs. 8838m4_define([lt_join], 8839[m4_if([$#], [1], [], 8840 [$#], [2], [[$2]], 8841 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8842m4_define([_lt_join], 8843[m4_if([$#$2], [2], [], 8844 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8845 8846 8847# lt_car(LIST) 8848# lt_cdr(LIST) 8849# ------------ 8850# Manipulate m4 lists. 8851# These macros are necessary as long as will still need to support 8852# Autoconf-2.59, which quotes differently. 8853m4_define([lt_car], [[$1]]) 8854m4_define([lt_cdr], 8855[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8856 [$#], 1, [], 8857 [m4_dquote(m4_shift($@))])]) 8858m4_define([lt_unquote], $1) 8859 8860 8861# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8862# ------------------------------------------ 8863# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8864# Note that neither SEPARATOR nor STRING are expanded; they are appended 8865# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8866# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8867# than defined and empty). 8868# 8869# This macro is needed until we can rely on Autoconf 2.62, since earlier 8870# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8871m4_define([lt_append], 8872[m4_define([$1], 8873 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8874 8875 8876 8877# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8878# ---------------------------------------------------------- 8879# Produce a SEP delimited list of all paired combinations of elements of 8880# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8881# has the form PREFIXmINFIXSUFFIXn. 8882# Needed until we can rely on m4_combine added in Autoconf 2.62. 8883m4_define([lt_combine], 8884[m4_if(m4_eval([$# > 3]), [1], 8885 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8886[[m4_foreach([_Lt_prefix], [$2], 8887 [m4_foreach([_Lt_suffix], 8888 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8889 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8890 8891 8892# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8893# ----------------------------------------------------------------------- 8894# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8895# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8896m4_define([lt_if_append_uniq], 8897[m4_ifdef([$1], 8898 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8899 [lt_append([$1], [$2], [$3])$4], 8900 [$5])], 8901 [lt_append([$1], [$2], [$3])$4])]) 8902 8903 8904# lt_dict_add(DICT, KEY, VALUE) 8905# ----------------------------- 8906m4_define([lt_dict_add], 8907[m4_define([$1($2)], [$3])]) 8908 8909 8910# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8911# -------------------------------------------- 8912m4_define([lt_dict_add_subkey], 8913[m4_define([$1($2:$3)], [$4])]) 8914 8915 8916# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8917# ---------------------------------- 8918m4_define([lt_dict_fetch], 8919[m4_ifval([$3], 8920 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8921 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922 8923 8924# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8925# ----------------------------------------------------------------- 8926m4_define([lt_if_dict_fetch], 8927[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8928 [$5], 8929 [$6])]) 8930 8931 8932# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8933# -------------------------------------------------------------- 8934m4_define([lt_dict_filter], 8935[m4_if([$5], [], [], 8936 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8937 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8938 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8939]) 8940 8941# ltversion.m4 -- version numbers -*- Autoconf -*- 8942# 8943# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8944# Written by Scott James Remnant, 2004 8945# 8946# This file is free software; the Free Software Foundation gives 8947# unlimited permission to copy and/or distribute it, with or without 8948# modifications, as long as this notice is preserved. 8949 8950# @configure_input@ 8951 8952# serial 4179 ltversion.m4 8953# This file is part of GNU Libtool 8954 8955m4_define([LT_PACKAGE_VERSION], [2.4.6]) 8956m4_define([LT_PACKAGE_REVISION], [2.4.6]) 8957 8958AC_DEFUN([LTVERSION_VERSION], 8959[macro_version='2.4.6' 8960macro_revision='2.4.6' 8961_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8962_LT_DECL(, macro_revision, 0) 8963]) 8964 8965# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8966# 8967# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8968# Foundation, Inc. 8969# Written by Scott James Remnant, 2004. 8970# 8971# This file is free software; the Free Software Foundation gives 8972# unlimited permission to copy and/or distribute it, with or without 8973# modifications, as long as this notice is preserved. 8974 8975# serial 5 lt~obsolete.m4 8976 8977# These exist entirely to fool aclocal when bootstrapping libtool. 8978# 8979# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8980# which have later been changed to m4_define as they aren't part of the 8981# exported API, or moved to Autoconf or Automake where they belong. 8982# 8983# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8984# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8985# using a macro with the same name in our local m4/libtool.m4 it'll 8986# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8987# and doesn't know about Autoconf macros at all.) 8988# 8989# So we provide this file, which has a silly filename so it's always 8990# included after everything else. This provides aclocal with the 8991# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8992# because those macros already exist, or will be overwritten later. 8993# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8994# 8995# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8996# Yes, that means every name once taken will need to remain here until 8997# we give up compatibility with versions before 1.7, at which point 8998# we need to keep only those names which we still refer to. 8999 9000# This is to help aclocal find these macros, as it can't see m4_define. 9001AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9002 9003m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9004m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9005m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9006m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9007m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9008m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9009m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9010m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9011m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9012m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9013m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9014m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9015m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9016m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9017m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9018m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9019m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9020m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9021m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9022m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9023m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9024m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9025m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9026m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9027m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9028m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9029m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9030m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9031m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9032m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9033m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9034m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9035m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9036m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9037m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9038m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9039m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9040m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9041m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9042m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9043m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9044m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9045m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9046m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9047m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9048m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9049m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9050m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9051m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9052m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9053m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9054m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9055m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9056m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9057m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9058m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9059m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9060m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9061m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9062m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9063m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9064 9065# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9066# serial 1 (pkg-config-0.24) 9067# 9068# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9069# 9070# This program is free software; you can redistribute it and/or modify 9071# it under the terms of the GNU General Public License as published by 9072# the Free Software Foundation; either version 2 of the License, or 9073# (at your option) any later version. 9074# 9075# This program is distributed in the hope that it will be useful, but 9076# WITHOUT ANY WARRANTY; without even the implied warranty of 9077# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9078# General Public License for more details. 9079# 9080# You should have received a copy of the GNU General Public License 9081# along with this program; if not, write to the Free Software 9082# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9083# 9084# As a special exception to the GNU General Public License, if you 9085# distribute this file as part of a program that contains a 9086# configuration script generated by Autoconf, you may include it under 9087# the same distribution terms that you use for the rest of that program. 9088 9089# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9090# ---------------------------------- 9091AC_DEFUN([PKG_PROG_PKG_CONFIG], 9092[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9093m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9094m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9095AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9096AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9097AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9098 9099if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9100 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9101fi 9102if test -n "$PKG_CONFIG"; then 9103 _pkg_min_version=m4_default([$1], [0.9.0]) 9104 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9105 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9106 AC_MSG_RESULT([yes]) 9107 else 9108 AC_MSG_RESULT([no]) 9109 PKG_CONFIG="" 9110 fi 9111fi[]dnl 9112])# PKG_PROG_PKG_CONFIG 9113 9114# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9115# 9116# Check to see whether a particular set of modules exists. Similar 9117# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9118# 9119# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9120# only at the first occurence in configure.ac, so if the first place 9121# it's called might be skipped (such as if it is within an "if", you 9122# have to call PKG_CHECK_EXISTS manually 9123# -------------------------------------------------------------- 9124AC_DEFUN([PKG_CHECK_EXISTS], 9125[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9126if test -n "$PKG_CONFIG" && \ 9127 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9128 m4_default([$2], [:]) 9129m4_ifvaln([$3], [else 9130 $3])dnl 9131fi]) 9132 9133# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9134# --------------------------------------------- 9135m4_define([_PKG_CONFIG], 9136[if test -n "$$1"; then 9137 pkg_cv_[]$1="$$1" 9138 elif test -n "$PKG_CONFIG"; then 9139 PKG_CHECK_EXISTS([$3], 9140 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9141 test "x$?" != "x0" && pkg_failed=yes ], 9142 [pkg_failed=yes]) 9143 else 9144 pkg_failed=untried 9145fi[]dnl 9146])# _PKG_CONFIG 9147 9148# _PKG_SHORT_ERRORS_SUPPORTED 9149# ----------------------------- 9150AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9151[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9152if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9153 _pkg_short_errors_supported=yes 9154else 9155 _pkg_short_errors_supported=no 9156fi[]dnl 9157])# _PKG_SHORT_ERRORS_SUPPORTED 9158 9159 9160# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9161# [ACTION-IF-NOT-FOUND]) 9162# 9163# 9164# Note that if there is a possibility the first call to 9165# PKG_CHECK_MODULES might not happen, you should be sure to include an 9166# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9167# 9168# 9169# -------------------------------------------------------------- 9170AC_DEFUN([PKG_CHECK_MODULES], 9171[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9172AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9173AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9174 9175pkg_failed=no 9176AC_MSG_CHECKING([for $1]) 9177 9178_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9179_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9180 9181m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9182and $1[]_LIBS to avoid the need to call pkg-config. 9183See the pkg-config man page for more details.]) 9184 9185if test $pkg_failed = yes; then 9186 AC_MSG_RESULT([no]) 9187 _PKG_SHORT_ERRORS_SUPPORTED 9188 if test $_pkg_short_errors_supported = yes; then 9189 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9190 else 9191 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9192 fi 9193 # Put the nasty error message in config.log where it belongs 9194 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9195 9196 m4_default([$4], [AC_MSG_ERROR( 9197[Package requirements ($2) were not met: 9198 9199$$1_PKG_ERRORS 9200 9201Consider adjusting the PKG_CONFIG_PATH environment variable if you 9202installed software in a non-standard prefix. 9203 9204_PKG_TEXT])[]dnl 9205 ]) 9206elif test $pkg_failed = untried; then 9207 AC_MSG_RESULT([no]) 9208 m4_default([$4], [AC_MSG_FAILURE( 9209[The pkg-config script could not be found or is too old. Make sure it 9210is in your PATH or set the PKG_CONFIG environment variable to the full 9211path to pkg-config. 9212 9213_PKG_TEXT 9214 9215To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9216 ]) 9217else 9218 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9219 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9220 AC_MSG_RESULT([yes]) 9221 $3 9222fi[]dnl 9223])# PKG_CHECK_MODULES 9224 9225 9226# PKG_INSTALLDIR(DIRECTORY) 9227# ------------------------- 9228# Substitutes the variable pkgconfigdir as the location where a module 9229# should install pkg-config .pc files. By default the directory is 9230# $libdir/pkgconfig, but the default can be changed by passing 9231# DIRECTORY. The user can override through the --with-pkgconfigdir 9232# parameter. 9233AC_DEFUN([PKG_INSTALLDIR], 9234[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9235m4_pushdef([pkg_description], 9236 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9237AC_ARG_WITH([pkgconfigdir], 9238 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9239 [with_pkgconfigdir=]pkg_default) 9240AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9241m4_popdef([pkg_default]) 9242m4_popdef([pkg_description]) 9243]) dnl PKG_INSTALLDIR 9244 9245 9246# PKG_NOARCH_INSTALLDIR(DIRECTORY) 9247# ------------------------- 9248# Substitutes the variable noarch_pkgconfigdir as the location where a 9249# module should install arch-independent pkg-config .pc files. By 9250# default the directory is $datadir/pkgconfig, but the default can be 9251# changed by passing DIRECTORY. The user can override through the 9252# --with-noarch-pkgconfigdir parameter. 9253AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9254[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9255m4_pushdef([pkg_description], 9256 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9257AC_ARG_WITH([noarch-pkgconfigdir], 9258 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9259 [with_noarch_pkgconfigdir=]pkg_default) 9260AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9261m4_popdef([pkg_default]) 9262m4_popdef([pkg_description]) 9263]) dnl PKG_NOARCH_INSTALLDIR 9264 9265 9266# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9267# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9268# ------------------------------------------- 9269# Retrieves the value of the pkg-config variable for the given module. 9270AC_DEFUN([PKG_CHECK_VAR], 9271[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9272AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9273 9274_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9275AS_VAR_COPY([$1], [pkg_cv_][$1]) 9276 9277AS_VAR_IF([$1], [""], [$5], [$4])dnl 9278])# PKG_CHECK_VAR 9279 9280dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9281dnl 9282dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9283dnl 9284dnl Permission is hereby granted, free of charge, to any person obtaining a 9285dnl copy of this software and associated documentation files (the "Software"), 9286dnl to deal in the Software without restriction, including without limitation 9287dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9288dnl and/or sell copies of the Software, and to permit persons to whom the 9289dnl Software is furnished to do so, subject to the following conditions: 9290dnl 9291dnl The above copyright notice and this permission notice (including the next 9292dnl paragraph) shall be included in all copies or substantial portions of the 9293dnl Software. 9294dnl 9295dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9296dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9297dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9298dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9299dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9300dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9301dnl DEALINGS IN THE SOFTWARE. 9302 9303# XORG_MACROS_VERSION(required-version) 9304# ------------------------------------- 9305# Minimum version: 1.1.0 9306# 9307# If you're using a macro added in Version 1.1 or newer, include this in 9308# your configure.ac with the minimum required version, such as: 9309# XORG_MACROS_VERSION(1.1) 9310# 9311# To ensure that this macro is defined, also add: 9312# m4_ifndef([XORG_MACROS_VERSION], 9313# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9314# 9315# 9316# See the "minimum version" comment for each macro you use to see what 9317# version you require. 9318m4_defun([XORG_MACROS_VERSION],[ 9319m4_define([vers_have], [1.19.0]) 9320m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9321m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9322m4_if(m4_cmp(maj_have, maj_needed), 0,, 9323 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9324m4_if(m4_version_compare(vers_have, [$1]), -1, 9325 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9326m4_undefine([vers_have]) 9327m4_undefine([maj_have]) 9328m4_undefine([maj_needed]) 9329]) # XORG_MACROS_VERSION 9330 9331# XORG_PROG_RAWCPP() 9332# ------------------ 9333# Minimum version: 1.0.0 9334# 9335# Find cpp program and necessary flags for use in pre-processing text files 9336# such as man pages and config files 9337AC_DEFUN([XORG_PROG_RAWCPP],[ 9338AC_REQUIRE([AC_PROG_CPP]) 9339AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9340 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9341 9342# Check for flag to avoid builtin definitions - assumes unix is predefined, 9343# which is not the best choice for supporting other OS'es, but covers most 9344# of the ones we need for now. 9345AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9346AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9347if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9348 AC_MSG_RESULT([no]) 9349else 9350 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9351 RAWCPPFLAGS=-undef 9352 AC_MSG_RESULT([yes]) 9353 # under Cygwin unix is still defined even with -undef 9354 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9355 RAWCPPFLAGS="-undef -ansi" 9356 AC_MSG_RESULT([yes, with -ansi]) 9357 else 9358 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9359 fi 9360fi 9361rm -f conftest.$ac_ext 9362 9363AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9364AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9365if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9366 AC_MSG_RESULT([no]) 9367else 9368 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9369 TRADITIONALCPPFLAGS="-traditional" 9370 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9371 AC_MSG_RESULT([yes]) 9372 else 9373 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9374 fi 9375fi 9376rm -f conftest.$ac_ext 9377AC_SUBST(RAWCPPFLAGS) 9378AC_SUBST(TRADITIONALCPPFLAGS) 9379]) # XORG_PROG_RAWCPP 9380 9381# XORG_MANPAGE_SECTIONS() 9382# ----------------------- 9383# Minimum version: 1.0.0 9384# 9385# Determine which sections man pages go in for the different man page types 9386# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9387# Not sure if there's any better way than just hardcoding by OS name. 9388# Override default settings by setting environment variables 9389# Added MAN_SUBSTS in version 1.8 9390# Added AC_PROG_SED in version 1.8 9391 9392AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9393AC_REQUIRE([AC_CANONICAL_HOST]) 9394AC_REQUIRE([AC_PROG_SED]) 9395 9396if test x$APP_MAN_SUFFIX = x ; then 9397 APP_MAN_SUFFIX=1 9398fi 9399if test x$APP_MAN_DIR = x ; then 9400 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9401fi 9402 9403if test x$LIB_MAN_SUFFIX = x ; then 9404 LIB_MAN_SUFFIX=3 9405fi 9406if test x$LIB_MAN_DIR = x ; then 9407 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9408fi 9409 9410if test x$FILE_MAN_SUFFIX = x ; then 9411 case $host_os in 9412 solaris*) FILE_MAN_SUFFIX=4 ;; 9413 *) FILE_MAN_SUFFIX=5 ;; 9414 esac 9415fi 9416if test x$FILE_MAN_DIR = x ; then 9417 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9418fi 9419 9420if test x$MISC_MAN_SUFFIX = x ; then 9421 case $host_os in 9422 solaris*) MISC_MAN_SUFFIX=5 ;; 9423 *) MISC_MAN_SUFFIX=7 ;; 9424 esac 9425fi 9426if test x$MISC_MAN_DIR = x ; then 9427 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9428fi 9429 9430if test x$DRIVER_MAN_SUFFIX = x ; then 9431 case $host_os in 9432 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9433 *) DRIVER_MAN_SUFFIX=4 ;; 9434 esac 9435fi 9436if test x$DRIVER_MAN_DIR = x ; then 9437 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9438fi 9439 9440if test x$ADMIN_MAN_SUFFIX = x ; then 9441 case $host_os in 9442 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9443 *) ADMIN_MAN_SUFFIX=8 ;; 9444 esac 9445fi 9446if test x$ADMIN_MAN_DIR = x ; then 9447 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9448fi 9449 9450 9451AC_SUBST([APP_MAN_SUFFIX]) 9452AC_SUBST([LIB_MAN_SUFFIX]) 9453AC_SUBST([FILE_MAN_SUFFIX]) 9454AC_SUBST([MISC_MAN_SUFFIX]) 9455AC_SUBST([DRIVER_MAN_SUFFIX]) 9456AC_SUBST([ADMIN_MAN_SUFFIX]) 9457AC_SUBST([APP_MAN_DIR]) 9458AC_SUBST([LIB_MAN_DIR]) 9459AC_SUBST([FILE_MAN_DIR]) 9460AC_SUBST([MISC_MAN_DIR]) 9461AC_SUBST([DRIVER_MAN_DIR]) 9462AC_SUBST([ADMIN_MAN_DIR]) 9463 9464XORG_MAN_PAGE="X Version 11" 9465AC_SUBST([XORG_MAN_PAGE]) 9466MAN_SUBSTS="\ 9467 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9468 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9469 -e 's|__xservername__|Xorg|g' \ 9470 -e 's|__xconfigfile__|xorg.conf|g' \ 9471 -e 's|__projectroot__|\$(prefix)|g' \ 9472 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9473 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9474 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9475 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9476 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9477 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9478 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9479AC_SUBST([MAN_SUBSTS]) 9480 9481]) # XORG_MANPAGE_SECTIONS 9482 9483# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9484# ------------------------ 9485# Minimum version: 1.7.0 9486# 9487# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9488# provided by xorg-sgml-doctools, if installed. 9489AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9490AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9491XORG_SGML_PATH= 9492PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9493 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9494 [m4_ifval([$1],[:], 9495 [if test x"$cross_compiling" != x"yes" ; then 9496 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9497 [XORG_SGML_PATH=$prefix/share/sgml]) 9498 fi]) 9499 ]) 9500 9501# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9502# the path and the name of the doc stylesheet 9503if test "x$XORG_SGML_PATH" != "x" ; then 9504 AC_MSG_RESULT([$XORG_SGML_PATH]) 9505 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9506 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9507else 9508 AC_MSG_RESULT([no]) 9509fi 9510 9511AC_SUBST(XORG_SGML_PATH) 9512AC_SUBST(STYLESHEET_SRCDIR) 9513AC_SUBST(XSL_STYLESHEET) 9514AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9515]) # XORG_CHECK_SGML_DOCTOOLS 9516 9517# XORG_CHECK_LINUXDOC 9518# ------------------- 9519# Minimum version: 1.0.0 9520# 9521# Defines the variable MAKE_TEXT if the necessary tools and 9522# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9523# Whether or not the necessary tools and files are found can be checked 9524# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9525AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9526AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9527AC_REQUIRE([XORG_WITH_PS2PDF]) 9528 9529AC_PATH_PROG(LINUXDOC, linuxdoc) 9530 9531AC_MSG_CHECKING([whether to build documentation]) 9532 9533if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9534 BUILDDOC=yes 9535else 9536 BUILDDOC=no 9537fi 9538 9539AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9540 9541AC_MSG_RESULT([$BUILDDOC]) 9542 9543AC_MSG_CHECKING([whether to build pdf documentation]) 9544 9545if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9546 BUILDPDFDOC=yes 9547else 9548 BUILDPDFDOC=no 9549fi 9550 9551AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9552 9553AC_MSG_RESULT([$BUILDPDFDOC]) 9554 9555MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9556MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9557MAKE_PDF="$PS2PDF" 9558MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9559 9560AC_SUBST(MAKE_TEXT) 9561AC_SUBST(MAKE_PS) 9562AC_SUBST(MAKE_PDF) 9563AC_SUBST(MAKE_HTML) 9564]) # XORG_CHECK_LINUXDOC 9565 9566# XORG_CHECK_DOCBOOK 9567# ------------------- 9568# Minimum version: 1.0.0 9569# 9570# Checks for the ability to build output formats from SGML DocBook source. 9571# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9572# indicates whether the necessary tools and files are found and, if set, 9573# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9574AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9575AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9576 9577BUILDTXTDOC=no 9578BUILDPDFDOC=no 9579BUILDPSDOC=no 9580BUILDHTMLDOC=no 9581 9582AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9583AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9584AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9585AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9586 9587AC_MSG_CHECKING([whether to build text documentation]) 9588if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9589 test x$BUILD_TXTDOC != xno; then 9590 BUILDTXTDOC=yes 9591fi 9592AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9593AC_MSG_RESULT([$BUILDTXTDOC]) 9594 9595AC_MSG_CHECKING([whether to build PDF documentation]) 9596if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9597 test x$BUILD_PDFDOC != xno; then 9598 BUILDPDFDOC=yes 9599fi 9600AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9601AC_MSG_RESULT([$BUILDPDFDOC]) 9602 9603AC_MSG_CHECKING([whether to build PostScript documentation]) 9604if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9605 test x$BUILD_PSDOC != xno; then 9606 BUILDPSDOC=yes 9607fi 9608AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9609AC_MSG_RESULT([$BUILDPSDOC]) 9610 9611AC_MSG_CHECKING([whether to build HTML documentation]) 9612if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9613 test x$BUILD_HTMLDOC != xno; then 9614 BUILDHTMLDOC=yes 9615fi 9616AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9617AC_MSG_RESULT([$BUILDHTMLDOC]) 9618 9619MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9620MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9621MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9622MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9623 9624AC_SUBST(MAKE_TEXT) 9625AC_SUBST(MAKE_PS) 9626AC_SUBST(MAKE_PDF) 9627AC_SUBST(MAKE_HTML) 9628]) # XORG_CHECK_DOCBOOK 9629 9630# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9631# ---------------- 9632# Minimum version: 1.5.0 9633# Minimum version for optional DEFAULT argument: 1.11.0 9634# 9635# Documentation tools are not always available on all platforms and sometimes 9636# not at the appropriate level. This macro enables a module to test for the 9637# presence of the tool and obtain it's path in separate variables. Coupled with 9638# the --with-xmlto option, it allows maximum flexibilty in making decisions 9639# as whether or not to use the xmlto package. When DEFAULT is not specified, 9640# --with-xmlto assumes 'auto'. 9641# 9642# Interface to module: 9643# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9644# XMLTO: returns the path of the xmlto program found 9645# returns the path set by the user in the environment 9646# --with-xmlto: 'yes' user instructs the module to use xmlto 9647# 'no' user instructs the module not to use xmlto 9648# 9649# Added in version 1.10.0 9650# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9651# xmlto for text output requires either lynx, links, or w3m browsers 9652# 9653# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9654# 9655AC_DEFUN([XORG_WITH_XMLTO],[ 9656AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9657m4_define([_defopt], m4_default([$2], [auto])) 9658AC_ARG_WITH(xmlto, 9659 AS_HELP_STRING([--with-xmlto], 9660 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9661 [use_xmlto=$withval], [use_xmlto=]_defopt) 9662m4_undefine([_defopt]) 9663 9664if test "x$use_xmlto" = x"auto"; then 9665 AC_PATH_PROG([XMLTO], [xmlto]) 9666 if test "x$XMLTO" = "x"; then 9667 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9668 have_xmlto=no 9669 else 9670 have_xmlto=yes 9671 fi 9672elif test "x$use_xmlto" = x"yes" ; then 9673 AC_PATH_PROG([XMLTO], [xmlto]) 9674 if test "x$XMLTO" = "x"; then 9675 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9676 fi 9677 have_xmlto=yes 9678elif test "x$use_xmlto" = x"no" ; then 9679 if test "x$XMLTO" != "x"; then 9680 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9681 fi 9682 have_xmlto=no 9683else 9684 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9685fi 9686 9687# Test for a minimum version of xmlto, if provided. 9688m4_ifval([$1], 9689[if test "$have_xmlto" = yes; then 9690 # scrape the xmlto version 9691 AC_MSG_CHECKING([the xmlto version]) 9692 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9693 AC_MSG_RESULT([$xmlto_version]) 9694 AS_VERSION_COMPARE([$xmlto_version], [$1], 9695 [if test "x$use_xmlto" = xauto; then 9696 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9697 have_xmlto=no 9698 else 9699 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9700 fi]) 9701fi]) 9702 9703# Test for the ability of xmlto to generate a text target 9704have_xmlto_text=no 9705cat > conftest.xml << "EOF" 9706EOF 9707AS_IF([test "$have_xmlto" = yes], 9708 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9709 [have_xmlto_text=yes], 9710 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9711rm -f conftest.xml 9712AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9713AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9714]) # XORG_WITH_XMLTO 9715 9716# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9717# -------------------------------------------- 9718# Minimum version: 1.12.0 9719# Minimum version for optional DEFAULT argument: 1.12.0 9720# 9721# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9722# XML-based language used for the transformation of XML documents. 9723# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9724# It is used under the cover by xmlto to generate html files from DocBook/XML. 9725# The XSLT processor is often used as a standalone tool for transformations. 9726# It should not be assumed that this tool is used only to work with documnetation. 9727# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9728# 9729# Interface to module: 9730# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9731# XSLTPROC: returns the path of the xsltproc program found 9732# returns the path set by the user in the environment 9733# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9734# 'no' user instructs the module not to use xsltproc 9735# have_xsltproc: returns yes if xsltproc found in PATH or no 9736# 9737# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9738# 9739AC_DEFUN([XORG_WITH_XSLTPROC],[ 9740AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9741# Preserves the interface, should it be implemented later 9742m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9743m4_define([_defopt], m4_default([$2], [auto])) 9744AC_ARG_WITH(xsltproc, 9745 AS_HELP_STRING([--with-xsltproc], 9746 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9747 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9748m4_undefine([_defopt]) 9749 9750if test "x$use_xsltproc" = x"auto"; then 9751 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9752 if test "x$XSLTPROC" = "x"; then 9753 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9754 have_xsltproc=no 9755 else 9756 have_xsltproc=yes 9757 fi 9758elif test "x$use_xsltproc" = x"yes" ; then 9759 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9760 if test "x$XSLTPROC" = "x"; then 9761 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9762 fi 9763 have_xsltproc=yes 9764elif test "x$use_xsltproc" = x"no" ; then 9765 if test "x$XSLTPROC" != "x"; then 9766 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9767 fi 9768 have_xsltproc=no 9769else 9770 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9771fi 9772 9773AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9774]) # XORG_WITH_XSLTPROC 9775 9776# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9777# ---------------------------------------- 9778# Minimum version: 1.15.0 9779# 9780# PERL (Practical Extraction and Report Language) is a language optimized for 9781# scanning arbitrary text files, extracting information from those text files, 9782# and printing reports based on that information. 9783# 9784# When DEFAULT is not specified, --with-perl assumes 'auto'. 9785# 9786# Interface to module: 9787# HAVE_PERL: used in makefiles to conditionally scan text files 9788# PERL: returns the path of the perl program found 9789# returns the path set by the user in the environment 9790# --with-perl: 'yes' user instructs the module to use perl 9791# 'no' user instructs the module not to use perl 9792# have_perl: returns yes if perl found in PATH or no 9793# 9794# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9795# 9796AC_DEFUN([XORG_WITH_PERL],[ 9797AC_ARG_VAR([PERL], [Path to perl command]) 9798# Preserves the interface, should it be implemented later 9799m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9800m4_define([_defopt], m4_default([$2], [auto])) 9801AC_ARG_WITH(perl, 9802 AS_HELP_STRING([--with-perl], 9803 [Use perl for extracting information from files (default: ]_defopt[)]), 9804 [use_perl=$withval], [use_perl=]_defopt) 9805m4_undefine([_defopt]) 9806 9807if test "x$use_perl" = x"auto"; then 9808 AC_PATH_PROG([PERL], [perl]) 9809 if test "x$PERL" = "x"; then 9810 AC_MSG_WARN([perl not found - cannot extract information and report]) 9811 have_perl=no 9812 else 9813 have_perl=yes 9814 fi 9815elif test "x$use_perl" = x"yes" ; then 9816 AC_PATH_PROG([PERL], [perl]) 9817 if test "x$PERL" = "x"; then 9818 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9819 fi 9820 have_perl=yes 9821elif test "x$use_perl" = x"no" ; then 9822 if test "x$PERL" != "x"; then 9823 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9824 fi 9825 have_perl=no 9826else 9827 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9828fi 9829 9830AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9831]) # XORG_WITH_PERL 9832 9833# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9834# ---------------- 9835# Minimum version: 1.5.0 9836# Minimum version for optional DEFAULT argument: 1.11.0 9837# 9838# Documentation tools are not always available on all platforms and sometimes 9839# not at the appropriate level. This macro enables a module to test for the 9840# presence of the tool and obtain it's path in separate variables. Coupled with 9841# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9842# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9843# --with-asciidoc assumes 'auto'. 9844# 9845# Interface to module: 9846# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9847# ASCIIDOC: returns the path of the asciidoc program found 9848# returns the path set by the user in the environment 9849# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9850# 'no' user instructs the module not to use asciidoc 9851# 9852# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9853# 9854AC_DEFUN([XORG_WITH_ASCIIDOC],[ 9855AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9856m4_define([_defopt], m4_default([$2], [auto])) 9857AC_ARG_WITH(asciidoc, 9858 AS_HELP_STRING([--with-asciidoc], 9859 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9860 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9861m4_undefine([_defopt]) 9862 9863if test "x$use_asciidoc" = x"auto"; then 9864 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9865 if test "x$ASCIIDOC" = "x"; then 9866 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9867 have_asciidoc=no 9868 else 9869 have_asciidoc=yes 9870 fi 9871elif test "x$use_asciidoc" = x"yes" ; then 9872 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9873 if test "x$ASCIIDOC" = "x"; then 9874 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9875 fi 9876 have_asciidoc=yes 9877elif test "x$use_asciidoc" = x"no" ; then 9878 if test "x$ASCIIDOC" != "x"; then 9879 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9880 fi 9881 have_asciidoc=no 9882else 9883 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9884fi 9885m4_ifval([$1], 9886[if test "$have_asciidoc" = yes; then 9887 # scrape the asciidoc version 9888 AC_MSG_CHECKING([the asciidoc version]) 9889 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9890 AC_MSG_RESULT([$asciidoc_version]) 9891 AS_VERSION_COMPARE([$asciidoc_version], [$1], 9892 [if test "x$use_asciidoc" = xauto; then 9893 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9894 have_asciidoc=no 9895 else 9896 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9897 fi]) 9898fi]) 9899AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9900]) # XORG_WITH_ASCIIDOC 9901 9902# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9903# ------------------------------------------- 9904# Minimum version: 1.5.0 9905# Minimum version for optional DEFAULT argument: 1.11.0 9906# Minimum version for optional DOT checking: 1.18.0 9907# 9908# Documentation tools are not always available on all platforms and sometimes 9909# not at the appropriate level. This macro enables a module to test for the 9910# presence of the tool and obtain it's path in separate variables. Coupled with 9911# the --with-doxygen option, it allows maximum flexibilty in making decisions 9912# as whether or not to use the doxygen package. When DEFAULT is not specified, 9913# --with-doxygen assumes 'auto'. 9914# 9915# Interface to module: 9916# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9917# DOXYGEN: returns the path of the doxygen program found 9918# returns the path set by the user in the environment 9919# --with-doxygen: 'yes' user instructs the module to use doxygen 9920# 'no' user instructs the module not to use doxygen 9921# 9922# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9923# 9924AC_DEFUN([XORG_WITH_DOXYGEN],[ 9925AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9926AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9927m4_define([_defopt], m4_default([$2], [auto])) 9928AC_ARG_WITH(doxygen, 9929 AS_HELP_STRING([--with-doxygen], 9930 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9931 [use_doxygen=$withval], [use_doxygen=]_defopt) 9932m4_undefine([_defopt]) 9933 9934if test "x$use_doxygen" = x"auto"; then 9935 AC_PATH_PROG([DOXYGEN], [doxygen]) 9936 if test "x$DOXYGEN" = "x"; then 9937 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9938 have_doxygen=no 9939 else 9940 have_doxygen=yes 9941 fi 9942elif test "x$use_doxygen" = x"yes" ; then 9943 AC_PATH_PROG([DOXYGEN], [doxygen]) 9944 if test "x$DOXYGEN" = "x"; then 9945 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9946 fi 9947 have_doxygen=yes 9948elif test "x$use_doxygen" = x"no" ; then 9949 if test "x$DOXYGEN" != "x"; then 9950 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9951 fi 9952 have_doxygen=no 9953else 9954 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9955fi 9956m4_ifval([$1], 9957[if test "$have_doxygen" = yes; then 9958 # scrape the doxygen version 9959 AC_MSG_CHECKING([the doxygen version]) 9960 doxygen_version=`$DOXYGEN --version 2>/dev/null` 9961 AC_MSG_RESULT([$doxygen_version]) 9962 AS_VERSION_COMPARE([$doxygen_version], [$1], 9963 [if test "x$use_doxygen" = xauto; then 9964 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9965 have_doxygen=no 9966 else 9967 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9968 fi]) 9969fi]) 9970 9971dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 9972dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 9973dnl HAVE_DOT = @HAVE_DOT@ 9974HAVE_DOT=no 9975if test "x$have_doxygen" = "xyes"; then 9976 AC_PATH_PROG([DOT], [dot]) 9977 if test "x$DOT" != "x"; then 9978 HAVE_DOT=yes 9979 fi 9980fi 9981 9982AC_SUBST([HAVE_DOT]) 9983AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9984AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9985]) # XORG_WITH_DOXYGEN 9986 9987# XORG_WITH_GROFF([DEFAULT]) 9988# ---------------- 9989# Minimum version: 1.6.0 9990# Minimum version for optional DEFAULT argument: 1.11.0 9991# 9992# Documentation tools are not always available on all platforms and sometimes 9993# not at the appropriate level. This macro enables a module to test for the 9994# presence of the tool and obtain it's path in separate variables. Coupled with 9995# the --with-groff option, it allows maximum flexibilty in making decisions 9996# as whether or not to use the groff package. When DEFAULT is not specified, 9997# --with-groff assumes 'auto'. 9998# 9999# Interface to module: 10000# HAVE_GROFF: used in makefiles to conditionally generate documentation 10001# HAVE_GROFF_MM: the memorandum macros (-mm) package 10002# HAVE_GROFF_MS: the -ms macros package 10003# GROFF: returns the path of the groff program found 10004# returns the path set by the user in the environment 10005# --with-groff: 'yes' user instructs the module to use groff 10006# 'no' user instructs the module not to use groff 10007# 10008# Added in version 1.9.0: 10009# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10010# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10011# psselect from the psutils package. 10012# the ghostcript package. Refer to the grohtml man pages 10013# 10014# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10015# 10016# OS and distros often splits groff in a basic and full package, the former 10017# having the groff program and the later having devices, fonts and macros 10018# Checking for the groff executable is not enough. 10019# 10020# If macros are missing, we cannot assume that groff is useless, so we don't 10021# unset HAVE_GROFF or GROFF env variables. 10022# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10023# 10024AC_DEFUN([XORG_WITH_GROFF],[ 10025AC_ARG_VAR([GROFF], [Path to groff command]) 10026m4_define([_defopt], m4_default([$1], [auto])) 10027AC_ARG_WITH(groff, 10028 AS_HELP_STRING([--with-groff], 10029 [Use groff to regenerate documentation (default: ]_defopt[)]), 10030 [use_groff=$withval], [use_groff=]_defopt) 10031m4_undefine([_defopt]) 10032 10033if test "x$use_groff" = x"auto"; then 10034 AC_PATH_PROG([GROFF], [groff]) 10035 if test "x$GROFF" = "x"; then 10036 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10037 have_groff=no 10038 else 10039 have_groff=yes 10040 fi 10041elif test "x$use_groff" = x"yes" ; then 10042 AC_PATH_PROG([GROFF], [groff]) 10043 if test "x$GROFF" = "x"; then 10044 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10045 fi 10046 have_groff=yes 10047elif test "x$use_groff" = x"no" ; then 10048 if test "x$GROFF" != "x"; then 10049 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10050 fi 10051 have_groff=no 10052else 10053 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10054fi 10055 10056# We have groff, test for the presence of the macro packages 10057if test "x$have_groff" = x"yes"; then 10058 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10059 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10060 groff_ms_works=yes 10061 else 10062 groff_ms_works=no 10063 fi 10064 AC_MSG_RESULT([$groff_ms_works]) 10065 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10066 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10067 groff_mm_works=yes 10068 else 10069 groff_mm_works=no 10070 fi 10071 AC_MSG_RESULT([$groff_mm_works]) 10072fi 10073 10074# We have groff, test for HTML dependencies, one command per package 10075if test "x$have_groff" = x"yes"; then 10076 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10077 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10078 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10079 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10080 have_groff_html=yes 10081 else 10082 have_groff_html=no 10083 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10084 fi 10085fi 10086 10087# Set Automake conditionals for Makefiles 10088AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10089AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10090AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10091AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10092]) # XORG_WITH_GROFF 10093 10094# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10095# --------------------------------------- 10096# Minimum version: 1.6.0 10097# Minimum version for optional DEFAULT argument: 1.11.0 10098# Minimum version for optional MIN-VERSION argument: 1.15.0 10099# 10100# Documentation tools are not always available on all platforms and sometimes 10101# not at the appropriate level. This macro enables a module to test for the 10102# presence of the tool and obtain it's path in separate variables. Coupled with 10103# the --with-fop option, it allows maximum flexibilty in making decisions 10104# as whether or not to use the fop package. When DEFAULT is not specified, 10105# --with-fop assumes 'auto'. 10106# 10107# Interface to module: 10108# HAVE_FOP: used in makefiles to conditionally generate documentation 10109# FOP: returns the path of the fop program found 10110# returns the path set by the user in the environment 10111# --with-fop: 'yes' user instructs the module to use fop 10112# 'no' user instructs the module not to use fop 10113# 10114# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10115# 10116AC_DEFUN([XORG_WITH_FOP],[ 10117AC_ARG_VAR([FOP], [Path to fop command]) 10118m4_define([_defopt], m4_default([$2], [auto])) 10119AC_ARG_WITH(fop, 10120 AS_HELP_STRING([--with-fop], 10121 [Use fop to regenerate documentation (default: ]_defopt[)]), 10122 [use_fop=$withval], [use_fop=]_defopt) 10123m4_undefine([_defopt]) 10124 10125if test "x$use_fop" = x"auto"; then 10126 AC_PATH_PROG([FOP], [fop]) 10127 if test "x$FOP" = "x"; then 10128 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10129 have_fop=no 10130 else 10131 have_fop=yes 10132 fi 10133elif test "x$use_fop" = x"yes" ; then 10134 AC_PATH_PROG([FOP], [fop]) 10135 if test "x$FOP" = "x"; then 10136 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10137 fi 10138 have_fop=yes 10139elif test "x$use_fop" = x"no" ; then 10140 if test "x$FOP" != "x"; then 10141 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10142 fi 10143 have_fop=no 10144else 10145 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10146fi 10147 10148# Test for a minimum version of fop, if provided. 10149m4_ifval([$1], 10150[if test "$have_fop" = yes; then 10151 # scrape the fop version 10152 AC_MSG_CHECKING([for fop minimum version]) 10153 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10154 AC_MSG_RESULT([$fop_version]) 10155 AS_VERSION_COMPARE([$fop_version], [$1], 10156 [if test "x$use_fop" = xauto; then 10157 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10158 have_fop=no 10159 else 10160 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10161 fi]) 10162fi]) 10163AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10164]) # XORG_WITH_FOP 10165 10166# XORG_WITH_M4([MIN-VERSION]) 10167# --------------------------- 10168# Minimum version: 1.19.0 10169# 10170# This macro attempts to locate an m4 macro processor which supports 10171# -I option and is only useful for modules relying on M4 in order to 10172# expand macros in source code files. 10173# 10174# Interface to module: 10175# M4: returns the path of the m4 program found 10176# returns the path set by the user in the environment 10177# 10178AC_DEFUN([XORG_WITH_M4], [ 10179AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10180 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10181 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10182 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10183 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10184 [$PATH:/usr/gnu/bin])]) 10185 10186AC_SUBST([M4], [$ac_cv_path_M4]) 10187]) # XORG_WITH_M4 10188 10189# XORG_WITH_PS2PDF([DEFAULT]) 10190# ---------------- 10191# Minimum version: 1.6.0 10192# Minimum version for optional DEFAULT argument: 1.11.0 10193# 10194# Documentation tools are not always available on all platforms and sometimes 10195# not at the appropriate level. This macro enables a module to test for the 10196# presence of the tool and obtain it's path in separate variables. Coupled with 10197# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10198# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10199# --with-ps2pdf assumes 'auto'. 10200# 10201# Interface to module: 10202# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10203# PS2PDF: returns the path of the ps2pdf program found 10204# returns the path set by the user in the environment 10205# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10206# 'no' user instructs the module not to use ps2pdf 10207# 10208# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10209# 10210AC_DEFUN([XORG_WITH_PS2PDF],[ 10211AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10212m4_define([_defopt], m4_default([$1], [auto])) 10213AC_ARG_WITH(ps2pdf, 10214 AS_HELP_STRING([--with-ps2pdf], 10215 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10216 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10217m4_undefine([_defopt]) 10218 10219if test "x$use_ps2pdf" = x"auto"; then 10220 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10221 if test "x$PS2PDF" = "x"; then 10222 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10223 have_ps2pdf=no 10224 else 10225 have_ps2pdf=yes 10226 fi 10227elif test "x$use_ps2pdf" = x"yes" ; then 10228 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10229 if test "x$PS2PDF" = "x"; then 10230 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10231 fi 10232 have_ps2pdf=yes 10233elif test "x$use_ps2pdf" = x"no" ; then 10234 if test "x$PS2PDF" != "x"; then 10235 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10236 fi 10237 have_ps2pdf=no 10238else 10239 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10240fi 10241AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10242]) # XORG_WITH_PS2PDF 10243 10244# XORG_ENABLE_DOCS (enable_docs=yes) 10245# ---------------- 10246# Minimum version: 1.6.0 10247# 10248# Documentation tools are not always available on all platforms and sometimes 10249# not at the appropriate level. This macro enables a builder to skip all 10250# documentation targets except traditional man pages. 10251# Combined with the specific tool checking macros XORG_WITH_*, it provides 10252# maximum flexibilty in controlling documentation building. 10253# Refer to: 10254# XORG_WITH_XMLTO --with-xmlto 10255# XORG_WITH_ASCIIDOC --with-asciidoc 10256# XORG_WITH_DOXYGEN --with-doxygen 10257# XORG_WITH_FOP --with-fop 10258# XORG_WITH_GROFF --with-groff 10259# XORG_WITH_PS2PDF --with-ps2pdf 10260# 10261# Interface to module: 10262# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10263# --enable-docs: 'yes' user instructs the module to generate docs 10264# 'no' user instructs the module not to generate docs 10265# parm1: specify the default value, yes or no. 10266# 10267AC_DEFUN([XORG_ENABLE_DOCS],[ 10268m4_define([docs_default], m4_default([$1], [yes])) 10269AC_ARG_ENABLE(docs, 10270 AS_HELP_STRING([--enable-docs], 10271 [Enable building the documentation (default: ]docs_default[)]), 10272 [build_docs=$enableval], [build_docs=]docs_default) 10273m4_undefine([docs_default]) 10274AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10275AC_MSG_CHECKING([whether to build documentation]) 10276AC_MSG_RESULT([$build_docs]) 10277]) # XORG_ENABLE_DOCS 10278 10279# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10280# ---------------- 10281# Minimum version: 1.6.0 10282# 10283# This macro enables a builder to skip all developer documentation. 10284# Combined with the specific tool checking macros XORG_WITH_*, it provides 10285# maximum flexibilty in controlling documentation building. 10286# Refer to: 10287# XORG_WITH_XMLTO --with-xmlto 10288# XORG_WITH_ASCIIDOC --with-asciidoc 10289# XORG_WITH_DOXYGEN --with-doxygen 10290# XORG_WITH_FOP --with-fop 10291# XORG_WITH_GROFF --with-groff 10292# XORG_WITH_PS2PDF --with-ps2pdf 10293# 10294# Interface to module: 10295# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10296# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10297# 'no' user instructs the module not to generate developer docs 10298# parm1: specify the default value, yes or no. 10299# 10300AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10301m4_define([devel_default], m4_default([$1], [yes])) 10302AC_ARG_ENABLE(devel-docs, 10303 AS_HELP_STRING([--enable-devel-docs], 10304 [Enable building the developer documentation (default: ]devel_default[)]), 10305 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10306m4_undefine([devel_default]) 10307AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10308AC_MSG_CHECKING([whether to build developer documentation]) 10309AC_MSG_RESULT([$build_devel_docs]) 10310]) # XORG_ENABLE_DEVEL_DOCS 10311 10312# XORG_ENABLE_SPECS (enable_specs=yes) 10313# ---------------- 10314# Minimum version: 1.6.0 10315# 10316# This macro enables a builder to skip all functional specification targets. 10317# Combined with the specific tool checking macros XORG_WITH_*, it provides 10318# maximum flexibilty in controlling documentation building. 10319# Refer to: 10320# XORG_WITH_XMLTO --with-xmlto 10321# XORG_WITH_ASCIIDOC --with-asciidoc 10322# XORG_WITH_DOXYGEN --with-doxygen 10323# XORG_WITH_FOP --with-fop 10324# XORG_WITH_GROFF --with-groff 10325# XORG_WITH_PS2PDF --with-ps2pdf 10326# 10327# Interface to module: 10328# ENABLE_SPECS: used in makefiles to conditionally generate specs 10329# --enable-specs: 'yes' user instructs the module to generate specs 10330# 'no' user instructs the module not to generate specs 10331# parm1: specify the default value, yes or no. 10332# 10333AC_DEFUN([XORG_ENABLE_SPECS],[ 10334m4_define([spec_default], m4_default([$1], [yes])) 10335AC_ARG_ENABLE(specs, 10336 AS_HELP_STRING([--enable-specs], 10337 [Enable building the specs (default: ]spec_default[)]), 10338 [build_specs=$enableval], [build_specs=]spec_default) 10339m4_undefine([spec_default]) 10340AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10341AC_MSG_CHECKING([whether to build functional specifications]) 10342AC_MSG_RESULT([$build_specs]) 10343]) # XORG_ENABLE_SPECS 10344 10345# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10346# ---------------------------------------------- 10347# Minimum version: 1.13.0 10348# 10349# This macro enables a builder to enable/disable unit testing 10350# It makes no assumption about the test cases implementation 10351# Test cases may or may not use Automake "Support for test suites" 10352# They may or may not use the software utility library GLib 10353# 10354# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10355# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10356# The variable enable_unit_tests is used by other macros in this file. 10357# 10358# Interface to module: 10359# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10360# enable_unit_tests: used in configure.ac for additional configuration 10361# --enable-unit-tests: 'yes' user instructs the module to build tests 10362# 'no' user instructs the module not to build tests 10363# parm1: specify the default value, yes or no. 10364# 10365AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10366AC_BEFORE([$0], [XORG_WITH_GLIB]) 10367AC_BEFORE([$0], [XORG_LD_WRAP]) 10368AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10369m4_define([_defopt], m4_default([$1], [auto])) 10370AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10371 [Enable building unit test cases (default: ]_defopt[)]), 10372 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10373m4_undefine([_defopt]) 10374AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10375AC_MSG_CHECKING([whether to build unit test cases]) 10376AC_MSG_RESULT([$enable_unit_tests]) 10377]) # XORG_ENABLE_UNIT_TESTS 10378 10379# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10380# ------------------------------------------------------ 10381# Minimum version: 1.17.0 10382# 10383# This macro enables a builder to enable/disable integration testing 10384# It makes no assumption about the test cases' implementation 10385# Test cases may or may not use Automake "Support for test suites" 10386# 10387# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10388# usually requires less dependencies and may be built and run under less 10389# stringent environments than integration tests. 10390# 10391# Interface to module: 10392# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10393# enable_integration_tests: used in configure.ac for additional configuration 10394# --enable-integration-tests: 'yes' user instructs the module to build tests 10395# 'no' user instructs the module not to build tests 10396# parm1: specify the default value, yes or no. 10397# 10398AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10399AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10400m4_define([_defopt], m4_default([$1], [auto])) 10401AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10402 [Enable building integration test cases (default: ]_defopt[)]), 10403 [enable_integration_tests=$enableval], 10404 [enable_integration_tests=]_defopt) 10405m4_undefine([_defopt]) 10406AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10407 [test "x$enable_integration_tests" != xno]) 10408AC_MSG_CHECKING([whether to build unit test cases]) 10409AC_MSG_RESULT([$enable_integration_tests]) 10410]) # XORG_ENABLE_INTEGRATION_TESTS 10411 10412# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10413# ---------------------------------------- 10414# Minimum version: 1.13.0 10415# 10416# GLib is a library which provides advanced data structures and functions. 10417# This macro enables a module to test for the presence of Glib. 10418# 10419# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10420# Otherwise the value of $enable_unit_tests is blank. 10421# 10422# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10423# test support usually requires less dependencies and may be built and run under 10424# less stringent environments than integration tests. 10425# 10426# Interface to module: 10427# HAVE_GLIB: used in makefiles to conditionally build targets 10428# with_glib: used in configure.ac to know if GLib has been found 10429# --with-glib: 'yes' user instructs the module to use glib 10430# 'no' user instructs the module not to use glib 10431# 10432AC_DEFUN([XORG_WITH_GLIB],[ 10433AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10434m4_define([_defopt], m4_default([$2], [auto])) 10435AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10436 [Use GLib library for unit testing (default: ]_defopt[)]), 10437 [with_glib=$withval], [with_glib=]_defopt) 10438m4_undefine([_defopt]) 10439 10440have_glib=no 10441# Do not probe GLib if user explicitly disabled unit testing 10442if test "x$enable_unit_tests" != x"no"; then 10443 # Do not probe GLib if user explicitly disabled it 10444 if test "x$with_glib" != x"no"; then 10445 m4_ifval( 10446 [$1], 10447 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10448 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10449 ) 10450 fi 10451fi 10452 10453# Not having GLib when unit testing has been explicitly requested is an error 10454if test "x$enable_unit_tests" = x"yes"; then 10455 if test "x$have_glib" = x"no"; then 10456 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10457 fi 10458fi 10459 10460# Having unit testing disabled when GLib has been explicitly requested is an error 10461if test "x$enable_unit_tests" = x"no"; then 10462 if test "x$with_glib" = x"yes"; then 10463 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10464 fi 10465fi 10466 10467# Not having GLib when it has been explicitly requested is an error 10468if test "x$with_glib" = x"yes"; then 10469 if test "x$have_glib" = x"no"; then 10470 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10471 fi 10472fi 10473 10474AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10475]) # XORG_WITH_GLIB 10476 10477# XORG_LD_WRAP([required|optional]) 10478# --------------------------------- 10479# Minimum version: 1.13.0 10480# 10481# Check if linker supports -wrap, passed via compiler flags 10482# 10483# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10484# Otherwise the value of $enable_unit_tests is blank. 10485# 10486# Argument added in 1.16.0 - default is "required", to match existing behavior 10487# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10488# available, an argument of "optional" allows use when some unit tests require 10489# ld -wrap and others do not. 10490# 10491AC_DEFUN([XORG_LD_WRAP],[ 10492XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10493 [AC_LANG_PROGRAM([#include <stdlib.h> 10494 void __wrap_exit(int status) { return; }], 10495 [exit(0);])]) 10496# Not having ld wrap when unit testing has been explicitly requested is an error 10497if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10498 if test "x$have_ld_wrap" = x"no"; then 10499 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10500 fi 10501fi 10502AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10503# 10504]) # XORG_LD_WRAP 10505 10506# XORG_CHECK_LINKER_FLAGS 10507# ----------------------- 10508# SYNOPSIS 10509# 10510# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10511# 10512# DESCRIPTION 10513# 10514# Check whether the given linker FLAGS work with the current language's 10515# linker, or whether they give an error. 10516# 10517# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10518# success/failure. 10519# 10520# PROGRAM-SOURCE is the program source to link with, if needed 10521# 10522# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10523# 10524# LICENSE 10525# 10526# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10527# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10528# Copyright (c) 2009 Matteo Frigo 10529# 10530# This program is free software: you can redistribute it and/or modify it 10531# under the terms of the GNU General Public License as published by the 10532# Free Software Foundation, either version 3 of the License, or (at your 10533# option) any later version. 10534# 10535# This program is distributed in the hope that it will be useful, but 10536# WITHOUT ANY WARRANTY; without even the implied warranty of 10537# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10538# Public License for more details. 10539# 10540# You should have received a copy of the GNU General Public License along 10541# with this program. If not, see <http://www.gnu.org/licenses/>. 10542# 10543# As a special exception, the respective Autoconf Macro's copyright owner 10544# gives unlimited permission to copy, distribute and modify the configure 10545# scripts that are the output of Autoconf when processing the Macro. You 10546# need not follow the terms of the GNU General Public License when using 10547# or distributing such scripts, even though portions of the text of the 10548# Macro appear in them. The GNU General Public License (GPL) does govern 10549# all other use of the material that constitutes the Autoconf Macro. 10550# 10551# This special exception to the GPL applies to versions of the Autoconf 10552# Macro released by the Autoconf Archive. When you make and distribute a 10553# modified version of the Autoconf Macro, you may extend this special 10554# exception to the GPL to apply to your modified version as well.# 10555AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10556[AC_MSG_CHECKING([whether the linker accepts $1]) 10557dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10558AS_LITERAL_IF([$1], 10559 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10560 ax_save_FLAGS=$LDFLAGS 10561 LDFLAGS="$1" 10562 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10563 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10564 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10565 LDFLAGS=$ax_save_FLAGS])], 10566 [ax_save_FLAGS=$LDFLAGS 10567 LDFLAGS="$1" 10568 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10569 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10570 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10571 LDFLAGS=$ax_save_FLAGS]) 10572eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10573AC_MSG_RESULT($xorg_check_linker_flags) 10574if test "x$xorg_check_linker_flags" = xyes; then 10575 m4_default([$2], :) 10576else 10577 m4_default([$3], :) 10578fi 10579]) # XORG_CHECK_LINKER_FLAGS 10580 10581# XORG_MEMORY_CHECK_FLAGS 10582# ----------------------- 10583# Minimum version: 1.16.0 10584# 10585# This macro attempts to find appropriate memory checking functionality 10586# for various platforms which unit testing code may use to catch various 10587# forms of memory allocation and access errors in testing. 10588# 10589# Interface to module: 10590# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10591# Usually added to TESTS_ENVIRONMENT in Makefile.am 10592# 10593# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10594# 10595AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10596 10597AC_REQUIRE([AC_CANONICAL_HOST]) 10598AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10599 [Environment variables to enable memory checking in tests]) 10600 10601# Check for different types of support on different platforms 10602case $host_os in 10603 solaris*) 10604 AC_CHECK_LIB([umem], [umem_alloc], 10605 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10606 ;; 10607 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10608 # both directly and inverted, so should not be 0 or 255. 10609 malloc_debug_env='MALLOC_PERTURB_=15' 10610 ;; 10611 darwin*) 10612 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10613 ;; 10614 *bsd*) 10615 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10616 ;; 10617esac 10618 10619# User supplied flags override default flags 10620if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10621 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10622fi 10623 10624AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10625]) # XORG_WITH_LINT 10626 10627# XORG_CHECK_MALLOC_ZERO 10628# ---------------------- 10629# Minimum version: 1.0.0 10630# 10631# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10632# malloc(0) returns NULL. Packages should add one of these cflags to 10633# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10634AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10635AC_ARG_ENABLE(malloc0returnsnull, 10636 AS_HELP_STRING([--enable-malloc0returnsnull], 10637 [malloc(0) returns NULL (default: auto)]), 10638 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10639 [MALLOC_ZERO_RETURNS_NULL=auto]) 10640 10641AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10642if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10643AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10644 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10645#include <stdlib.h> 10646],[ 10647 char *m0, *r0, *c0, *p; 10648 m0 = malloc(0); 10649 p = malloc(10); 10650 r0 = realloc(p,0); 10651 c0 = calloc(0,10); 10652 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10653])], 10654 [xorg_cv_malloc0_returns_null=yes], 10655 [xorg_cv_malloc0_returns_null=no])]) 10656MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10657fi 10658AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10659 10660if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10661 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10662 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10663 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10664else 10665 MALLOC_ZERO_CFLAGS="" 10666 XMALLOC_ZERO_CFLAGS="" 10667 XTMALLOC_ZERO_CFLAGS="" 10668fi 10669 10670AC_SUBST([MALLOC_ZERO_CFLAGS]) 10671AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10672AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10673]) # XORG_CHECK_MALLOC_ZERO 10674 10675# XORG_WITH_LINT() 10676# ---------------- 10677# Minimum version: 1.1.0 10678# 10679# This macro enables the use of a tool that flags some suspicious and 10680# non-portable constructs (likely to be bugs) in C language source code. 10681# It will attempt to locate the tool and use appropriate options. 10682# There are various lint type tools on different platforms. 10683# 10684# Interface to module: 10685# LINT: returns the path to the tool found on the platform 10686# or the value set to LINT on the configure cmd line 10687# also an Automake conditional 10688# LINT_FLAGS: an Automake variable with appropriate flags 10689# 10690# --with-lint: 'yes' user instructs the module to use lint 10691# 'no' user instructs the module not to use lint (default) 10692# 10693# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10694# If the user sets the value of LINT_FLAGS, they are used verbatim. 10695# 10696AC_DEFUN([XORG_WITH_LINT],[ 10697 10698AC_ARG_VAR([LINT], [Path to a lint-style command]) 10699AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10700AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10701 [Use a lint-style source code checker (default: disabled)])], 10702 [use_lint=$withval], [use_lint=no]) 10703 10704# Obtain platform specific info like program name and options 10705# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10706case $host_os in 10707 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10708 lint_name=splint 10709 lint_options="-badflag" 10710 ;; 10711 *freebsd* | *netbsd*) 10712 lint_name=lint 10713 lint_options="-u -b" 10714 ;; 10715 *solaris*) 10716 lint_name=lint 10717 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10718 ;; 10719esac 10720 10721# Test for the presence of the program (either guessed by the code or spelled out by the user) 10722if test "x$use_lint" = x"yes" ; then 10723 AC_PATH_PROG([LINT], [$lint_name]) 10724 if test "x$LINT" = "x"; then 10725 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10726 fi 10727elif test "x$use_lint" = x"no" ; then 10728 if test "x$LINT" != "x"; then 10729 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10730 fi 10731else 10732 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10733fi 10734 10735# User supplied flags override default flags 10736if test "x$LINT_FLAGS" != "x"; then 10737 lint_options=$LINT_FLAGS 10738fi 10739 10740AC_SUBST([LINT_FLAGS],[$lint_options]) 10741AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10742 10743]) # XORG_WITH_LINT 10744 10745# XORG_LINT_LIBRARY(LIBNAME) 10746# -------------------------- 10747# Minimum version: 1.1.0 10748# 10749# Sets up flags for building lint libraries for checking programs that call 10750# functions in the library. 10751# 10752# Interface to module: 10753# LINTLIB - Automake variable with the name of lint library file to make 10754# MAKE_LINT_LIB - Automake conditional 10755# 10756# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10757# - 'no' user instructs the module not to create a lint library (default) 10758 10759AC_DEFUN([XORG_LINT_LIBRARY],[ 10760AC_REQUIRE([XORG_WITH_LINT]) 10761AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10762 [Create lint library (default: disabled)])], 10763 [make_lint_lib=$enableval], [make_lint_lib=no]) 10764 10765if test "x$make_lint_lib" = x"yes" ; then 10766 LINTLIB=llib-l$1.ln 10767 if test "x$LINT" = "x"; then 10768 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10769 fi 10770elif test "x$make_lint_lib" != x"no" ; then 10771 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10772fi 10773 10774AC_SUBST(LINTLIB) 10775AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10776 10777]) # XORG_LINT_LIBRARY 10778 10779# XORG_COMPILER_BRAND 10780# ------------------- 10781# Minimum version: 1.14.0 10782# 10783# Checks for various brands of compilers and sets flags as appropriate: 10784# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10785# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10786# clang compiler - sets CLANGCC to "yes" 10787# Intel compiler - sets INTELCC to "yes" 10788# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10789# 10790AC_DEFUN([XORG_COMPILER_BRAND], [ 10791AC_LANG_CASE( 10792 [C], [ 10793 AC_REQUIRE([AC_PROG_CC_C99]) 10794 ], 10795 [C++], [ 10796 AC_REQUIRE([AC_PROG_CXX]) 10797 ] 10798) 10799AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10800AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10801AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10802]) # XORG_COMPILER_BRAND 10803 10804# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10805# --------------- 10806# Minimum version: 1.16.0 10807# 10808# Test if the compiler works when passed the given flag as a command line argument. 10809# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10810# next flag in the list until there are no more options. 10811# 10812# Note that this does not guarantee that the compiler supports the flag as some 10813# compilers will simply ignore arguments that they do not understand, but we do 10814# attempt to weed out false positives by using -Werror=unknown-warning-option and 10815# -Werror=unused-command-line-argument 10816# 10817AC_DEFUN([XORG_TESTSET_CFLAG], [ 10818m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10819m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10820 10821AC_LANG_COMPILER_REQUIRE 10822 10823AC_LANG_CASE( 10824 [C], [ 10825 AC_REQUIRE([AC_PROG_CC_C99]) 10826 define([PREFIX], [C]) 10827 define([CACHE_PREFIX], [cc]) 10828 define([COMPILER], [$CC]) 10829 ], 10830 [C++], [ 10831 define([PREFIX], [CXX]) 10832 define([CACHE_PREFIX], [cxx]) 10833 define([COMPILER], [$CXX]) 10834 ] 10835) 10836 10837[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10838 10839if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10840 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10841 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10842 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10843 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10844 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10845 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10846 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10847 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10848fi 10849 10850if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10851 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10852 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10853 fi 10854 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10855 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10856 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10857 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10858 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10859 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10860 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10861 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10862fi 10863 10864found="no" 10865m4_foreach([flag], m4_cdr($@), [ 10866 if test $found = "no" ; then 10867 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10868 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10869 fi 10870 10871 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10872 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10873 fi 10874 10875 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10876 10877dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10878 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10879 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10880 AC_CACHE_VAL($cacheid, 10881 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10882 [eval $cacheid=yes], 10883 [eval $cacheid=no])]) 10884 10885 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10886 10887 eval supported=\$$cacheid 10888 AC_MSG_RESULT([$supported]) 10889 if test "$supported" = "yes" ; then 10890 $1="$$1 ]flag[" 10891 found="yes" 10892 fi 10893 fi 10894]) 10895]) # XORG_TESTSET_CFLAG 10896 10897# XORG_COMPILER_FLAGS 10898# --------------- 10899# Minimum version: 1.16.0 10900# 10901# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10902# arguments supported by the selected compiler which do NOT alter the generated 10903# code. These arguments will cause the compiler to print various warnings 10904# during compilation AND turn a conservative set of warnings into errors. 10905# 10906# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10907# future versions of util-macros as options are added to new compilers. 10908# 10909AC_DEFUN([XORG_COMPILER_FLAGS], [ 10910AC_REQUIRE([XORG_COMPILER_BRAND]) 10911 10912AC_ARG_ENABLE(selective-werror, 10913 AS_HELP_STRING([--disable-selective-werror], 10914 [Turn off selective compiler errors. (default: enabled)]), 10915 [SELECTIVE_WERROR=$enableval], 10916 [SELECTIVE_WERROR=yes]) 10917 10918AC_LANG_CASE( 10919 [C], [ 10920 define([PREFIX], [C]) 10921 ], 10922 [C++], [ 10923 define([PREFIX], [CXX]) 10924 ] 10925) 10926# -v is too short to test reliably with XORG_TESTSET_CFLAG 10927if test "x$SUNCC" = "xyes"; then 10928 [BASE_]PREFIX[FLAGS]="-v" 10929else 10930 [BASE_]PREFIX[FLAGS]="" 10931fi 10932 10933# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10934XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10935XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10936XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10937XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10938 10939AC_LANG_CASE( 10940 [C], [ 10941 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10942 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10943 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10944 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10945 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10946 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10947 ] 10948) 10949 10950# This chunk adds additional warnings that could catch undesired effects. 10951XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10952XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10953XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10954XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10955XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10956XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10957XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10958 10959# These are currently disabled because they are noisy. They will be enabled 10960# in the future once the codebase is sufficiently modernized to silence 10961# them. For now, I don't want them to drown out the other warnings. 10962# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10963# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10964# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10965 10966# Turn some warnings into errors, so we don't accidently get successful builds 10967# when there are problems that should be fixed. 10968 10969if test "x$SELECTIVE_WERROR" = "xyes" ; then 10970XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10971XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10972XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10973XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10974XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10975XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10976XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10977XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10978XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10979XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10980XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10981XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10982XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10983else 10984AC_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]) 10985XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10986XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10987XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10988XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10989XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10990XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10991XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10992XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10993XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10994XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10995XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10996XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10997XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10998fi 10999 11000AC_SUBST([BASE_]PREFIX[FLAGS]) 11001]) # XORG_COMPILER_FLAGS 11002 11003# XORG_CWARNFLAGS 11004# --------------- 11005# Minimum version: 1.2.0 11006# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11007# 11008# Defines CWARNFLAGS to enable C compiler warnings. 11009# 11010# This function is deprecated because it defines -fno-strict-aliasing 11011# which alters the code generated by the compiler. If -fno-strict-aliasing 11012# is needed, then it should be added explicitly in the module when 11013# it is updated to use BASE_CFLAGS. 11014# 11015AC_DEFUN([XORG_CWARNFLAGS], [ 11016AC_REQUIRE([XORG_COMPILER_FLAGS]) 11017AC_REQUIRE([XORG_COMPILER_BRAND]) 11018AC_LANG_CASE( 11019 [C], [ 11020 CWARNFLAGS="$BASE_CFLAGS" 11021 if test "x$GCC" = xyes ; then 11022 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11023 fi 11024 AC_SUBST(CWARNFLAGS) 11025 ] 11026) 11027]) # XORG_CWARNFLAGS 11028 11029# XORG_STRICT_OPTION 11030# ----------------------- 11031# Minimum version: 1.3.0 11032# 11033# Add configure option to enable strict compilation flags, such as treating 11034# warnings as fatal errors. 11035# If --enable-strict-compilation is passed to configure, adds strict flags to 11036# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11037# 11038# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11039# when strict compilation is unconditionally desired. 11040AC_DEFUN([XORG_STRICT_OPTION], [ 11041AC_REQUIRE([XORG_CWARNFLAGS]) 11042AC_REQUIRE([XORG_COMPILER_FLAGS]) 11043 11044AC_ARG_ENABLE(strict-compilation, 11045 AS_HELP_STRING([--enable-strict-compilation], 11046 [Enable all warnings from compiler and make them errors (default: disabled)]), 11047 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11048 11049AC_LANG_CASE( 11050 [C], [ 11051 define([PREFIX], [C]) 11052 ], 11053 [C++], [ 11054 define([PREFIX], [CXX]) 11055 ] 11056) 11057 11058[STRICT_]PREFIX[FLAGS]="" 11059XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11060XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11061 11062# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11063# activate it with -Werror, so we add it here explicitly. 11064XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11065 11066if test "x$STRICT_COMPILE" = "xyes"; then 11067 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11068 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11069fi 11070AC_SUBST([STRICT_]PREFIX[FLAGS]) 11071AC_SUBST([BASE_]PREFIX[FLAGS]) 11072AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11073]) # XORG_STRICT_OPTION 11074 11075# XORG_DEFAULT_OPTIONS 11076# -------------------- 11077# Minimum version: 1.3.0 11078# 11079# Defines default options for X.Org modules. 11080# 11081AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11082AC_REQUIRE([AC_PROG_INSTALL]) 11083XORG_COMPILER_FLAGS 11084XORG_CWARNFLAGS 11085XORG_STRICT_OPTION 11086XORG_RELEASE_VERSION 11087XORG_CHANGELOG 11088XORG_INSTALL 11089XORG_MANPAGE_SECTIONS 11090m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11091 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11092]) # XORG_DEFAULT_OPTIONS 11093 11094# XORG_INSTALL() 11095# ---------------- 11096# Minimum version: 1.4.0 11097# 11098# Defines the variable INSTALL_CMD as the command to copy 11099# INSTALL from $prefix/share/util-macros. 11100# 11101AC_DEFUN([XORG_INSTALL], [ 11102AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11103macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11104INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11105mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11106|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11107echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11108AC_SUBST([INSTALL_CMD]) 11109]) # XORG_INSTALL 11110dnl Copyright 2005 Red Hat, Inc 11111dnl 11112dnl Permission to use, copy, modify, distribute, and sell this software and its 11113dnl documentation for any purpose is hereby granted without fee, provided that 11114dnl the above copyright notice appear in all copies and that both that 11115dnl copyright notice and this permission notice appear in supporting 11116dnl documentation. 11117dnl 11118dnl The above copyright notice and this permission notice shall be included 11119dnl in all copies or substantial portions of the Software. 11120dnl 11121dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11122dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11123dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11124dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11125dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11126dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11127dnl OTHER DEALINGS IN THE SOFTWARE. 11128dnl 11129dnl Except as contained in this notice, the name of the copyright holders shall 11130dnl not be used in advertising or otherwise to promote the sale, use or 11131dnl other dealings in this Software without prior written authorization 11132dnl from the copyright holders. 11133dnl 11134 11135# XORG_RELEASE_VERSION 11136# -------------------- 11137# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11138 11139AC_DEFUN([XORG_RELEASE_VERSION],[ 11140 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11141 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11142 [Major version of this package]) 11143 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11144 if test "x$PVM" = "x"; then 11145 PVM="0" 11146 fi 11147 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11148 [$PVM], 11149 [Minor version of this package]) 11150 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11151 if test "x$PVP" = "x"; then 11152 PVP="0" 11153 fi 11154 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11155 [$PVP], 11156 [Patch version of this package]) 11157]) 11158 11159# XORG_CHANGELOG() 11160# ---------------- 11161# Minimum version: 1.2.0 11162# 11163# Defines the variable CHANGELOG_CMD as the command to generate 11164# ChangeLog from git. 11165# 11166# 11167AC_DEFUN([XORG_CHANGELOG], [ 11168CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11169mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11170|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11171echo 'git directory not found: installing possibly empty changelog.' >&2)" 11172AC_SUBST([CHANGELOG_CMD]) 11173]) # XORG_CHANGELOG 11174 11175dnl Copyright 2005 Red Hat, Inc 11176dnl 11177dnl Permission to use, copy, modify, distribute, and sell this software and its 11178dnl documentation for any purpose is hereby granted without fee, provided that 11179dnl the above copyright notice appear in all copies and that both that 11180dnl copyright notice and this permission notice appear in supporting 11181dnl documentation. 11182dnl 11183dnl The above copyright notice and this permission notice shall be included 11184dnl in all copies or substantial portions of the Software. 11185dnl 11186dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11187dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11188dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11189dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11190dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11191dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11192dnl OTHER DEALINGS IN THE SOFTWARE. 11193dnl 11194dnl Except as contained in this notice, the name of the copyright holders shall 11195dnl not be used in advertising or otherwise to promote the sale, use or 11196dnl other dealings in this Software without prior written authorization 11197dnl from the copyright holders. 11198dnl 11199 11200# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11201# -------------------------- 11202# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11203# is defined, then add the given PROTO to $REQUIRED_MODULES. 11204 11205AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11206 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11207 SAVE_CFLAGS="$CFLAGS" 11208 CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11209 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11210#include "xorg-server.h" 11211#if !defined $1 11212#error $1 not defined 11213#endif 11214 ]])], 11215 [_EXT_CHECK=yes], 11216 [_EXT_CHECK=no]) 11217 CFLAGS="$SAVE_CFLAGS" 11218 AC_MSG_CHECKING([if $1 is defined]) 11219 AC_MSG_RESULT([$_EXT_CHECK]) 11220 if test "$_EXT_CHECK" != no; then 11221 REQUIRED_MODULES="$REQUIRED_MODULES $2" 11222 fi 11223]) 11224 11225# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 11226# Foundation, Inc. 11227# 11228# This file is free software; the Free Software Foundation 11229# gives unlimited permission to copy and/or distribute it, 11230# with or without modifications, as long as this notice is preserved. 11231 11232# serial 1 11233 11234# AM_AUTOMAKE_VERSION(VERSION) 11235# ---------------------------- 11236# Automake X.Y traces this macro to ensure aclocal.m4 has been 11237# generated from the m4 files accompanying Automake X.Y. 11238# (This private macro should not be called outside this file.) 11239AC_DEFUN([AM_AUTOMAKE_VERSION], 11240[am__api_version='1.11' 11241dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11242dnl require some minimum version. Point them to the right macro. 11243m4_if([$1], [1.11.6], [], 11244 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11245]) 11246 11247# _AM_AUTOCONF_VERSION(VERSION) 11248# ----------------------------- 11249# aclocal traces this macro to find the Autoconf version. 11250# This is a private macro too. Using m4_define simplifies 11251# the logic in aclocal, which can simply ignore this definition. 11252m4_define([_AM_AUTOCONF_VERSION], []) 11253 11254# AM_SET_CURRENT_AUTOMAKE_VERSION 11255# ------------------------------- 11256# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11257# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11258AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11259[AM_AUTOMAKE_VERSION([1.11.6])dnl 11260m4_ifndef([AC_AUTOCONF_VERSION], 11261 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11262_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11263 11264# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11265 11266# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 11267# 11268# This file is free software; the Free Software Foundation 11269# gives unlimited permission to copy and/or distribute it, 11270# with or without modifications, as long as this notice is preserved. 11271 11272# serial 1 11273 11274# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11275# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 11276# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 11277# 11278# Of course, Automake must honor this variable whenever it calls a 11279# tool from the auxiliary directory. The problem is that $srcdir (and 11280# therefore $ac_aux_dir as well) can be either absolute or relative, 11281# depending on how configure is run. This is pretty annoying, since 11282# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11283# source directory, any form will work fine, but in subdirectories a 11284# relative path needs to be adjusted first. 11285# 11286# $ac_aux_dir/missing 11287# fails when called from a subdirectory if $ac_aux_dir is relative 11288# $top_srcdir/$ac_aux_dir/missing 11289# fails if $ac_aux_dir is absolute, 11290# fails when called from a subdirectory in a VPATH build with 11291# a relative $ac_aux_dir 11292# 11293# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11294# are both prefixed by $srcdir. In an in-source build this is usually 11295# harmless because $srcdir is `.', but things will broke when you 11296# start a VPATH build or use an absolute $srcdir. 11297# 11298# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11299# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11300# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11301# and then we would define $MISSING as 11302# MISSING="\${SHELL} $am_aux_dir/missing" 11303# This will work as long as MISSING is not called from configure, because 11304# unfortunately $(top_srcdir) has no meaning in configure. 11305# However there are other variables, like CC, which are often used in 11306# configure, and could therefore not use this "fixed" $ac_aux_dir. 11307# 11308# Another solution, used here, is to always expand $ac_aux_dir to an 11309# absolute PATH. The drawback is that using absolute paths prevent a 11310# configured tree to be moved without reconfiguration. 11311 11312AC_DEFUN([AM_AUX_DIR_EXPAND], 11313[dnl Rely on autoconf to set up CDPATH properly. 11314AC_PREREQ([2.50])dnl 11315# expand $ac_aux_dir to an absolute path 11316am_aux_dir=`cd $ac_aux_dir && pwd` 11317]) 11318 11319# AM_CONDITIONAL -*- Autoconf -*- 11320 11321# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11322# Free Software Foundation, Inc. 11323# 11324# This file is free software; the Free Software Foundation 11325# gives unlimited permission to copy and/or distribute it, 11326# with or without modifications, as long as this notice is preserved. 11327 11328# serial 9 11329 11330# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11331# ------------------------------------- 11332# Define a conditional. 11333AC_DEFUN([AM_CONDITIONAL], 11334[AC_PREREQ(2.52)dnl 11335 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11336 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11337AC_SUBST([$1_TRUE])dnl 11338AC_SUBST([$1_FALSE])dnl 11339_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11340_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11341m4_define([_AM_COND_VALUE_$1], [$2])dnl 11342if $2; then 11343 $1_TRUE= 11344 $1_FALSE='#' 11345else 11346 $1_TRUE='#' 11347 $1_FALSE= 11348fi 11349AC_CONFIG_COMMANDS_PRE( 11350[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11351 AC_MSG_ERROR([[conditional "$1" was never defined. 11352Usually this means the macro was only invoked conditionally.]]) 11353fi])]) 11354 11355# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 11356# 2010, 2011 Free Software Foundation, Inc. 11357# 11358# This file is free software; the Free Software Foundation 11359# gives unlimited permission to copy and/or distribute it, 11360# with or without modifications, as long as this notice is preserved. 11361 11362# serial 12 11363 11364# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 11365# written in clear, in which case automake, when reading aclocal.m4, 11366# will think it sees a *use*, and therefore will trigger all it's 11367# C support machinery. Also note that it means that autoscan, seeing 11368# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11369 11370 11371# _AM_DEPENDENCIES(NAME) 11372# ---------------------- 11373# See how the compiler implements dependency checking. 11374# NAME is "CC", "CXX", "GCJ", or "OBJC". 11375# We try a few techniques and use that to set a single cache variable. 11376# 11377# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11378# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11379# dependency, and given that the user is not expected to run this macro, 11380# just rely on AC_PROG_CC. 11381AC_DEFUN([_AM_DEPENDENCIES], 11382[AC_REQUIRE([AM_SET_DEPDIR])dnl 11383AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11384AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11385AC_REQUIRE([AM_DEP_TRACK])dnl 11386 11387ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 11388 [$1], CXX, [depcc="$CXX" am_compiler_list=], 11389 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11390 [$1], UPC, [depcc="$UPC" am_compiler_list=], 11391 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11392 [depcc="$$1" am_compiler_list=]) 11393 11394AC_CACHE_CHECK([dependency style of $depcc], 11395 [am_cv_$1_dependencies_compiler_type], 11396[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11397 # We make a subdir and do the tests there. Otherwise we can end up 11398 # making bogus files that we don't know about and never remove. For 11399 # instance it was reported that on HP-UX the gcc test will end up 11400 # making a dummy file named `D' -- because `-MD' means `put the output 11401 # in D'. 11402 rm -rf conftest.dir 11403 mkdir conftest.dir 11404 # Copy depcomp to subdir because otherwise we won't find it if we're 11405 # using a relative directory. 11406 cp "$am_depcomp" conftest.dir 11407 cd conftest.dir 11408 # We will build objects and dependencies in a subdirectory because 11409 # it helps to detect inapplicable dependency modes. For instance 11410 # both Tru64's cc and ICC support -MD to output dependencies as a 11411 # side effect of compilation, but ICC will put the dependencies in 11412 # the current directory while Tru64 will put them in the object 11413 # directory. 11414 mkdir sub 11415 11416 am_cv_$1_dependencies_compiler_type=none 11417 if test "$am_compiler_list" = ""; then 11418 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11419 fi 11420 am__universal=false 11421 m4_case([$1], [CC], 11422 [case " $depcc " in #( 11423 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11424 esac], 11425 [CXX], 11426 [case " $depcc " in #( 11427 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11428 esac]) 11429 11430 for depmode in $am_compiler_list; do 11431 # Setup a source with many dependencies, because some compilers 11432 # like to wrap large dependency lists on column 80 (with \), and 11433 # we should not choose a depcomp mode which is confused by this. 11434 # 11435 # We need to recreate these files for each test, as the compiler may 11436 # overwrite some of them when testing with obscure command lines. 11437 # This happens at least with the AIX C compiler. 11438 : > sub/conftest.c 11439 for i in 1 2 3 4 5 6; do 11440 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11441 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 11442 # Solaris 8's {/usr,}/bin/sh. 11443 touch sub/conftst$i.h 11444 done 11445 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11446 11447 # We check with `-c' and `-o' for the sake of the "dashmstdout" 11448 # mode. It turns out that the SunPro C++ compiler does not properly 11449 # handle `-M -o', and we need to detect this. Also, some Intel 11450 # versions had trouble with output in subdirs 11451 am__obj=sub/conftest.${OBJEXT-o} 11452 am__minus_obj="-o $am__obj" 11453 case $depmode in 11454 gcc) 11455 # This depmode causes a compiler race in universal mode. 11456 test "$am__universal" = false || continue 11457 ;; 11458 nosideeffect) 11459 # after this tag, mechanisms are not by side-effect, so they'll 11460 # only be used when explicitly requested 11461 if test "x$enable_dependency_tracking" = xyes; then 11462 continue 11463 else 11464 break 11465 fi 11466 ;; 11467 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11468 # This compiler won't grok `-c -o', but also, the minuso test has 11469 # not run yet. These depmodes are late enough in the game, and 11470 # so weak that their functioning should not be impacted. 11471 am__obj=conftest.${OBJEXT-o} 11472 am__minus_obj= 11473 ;; 11474 none) break ;; 11475 esac 11476 if depmode=$depmode \ 11477 source=sub/conftest.c object=$am__obj \ 11478 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11479 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11480 >/dev/null 2>conftest.err && 11481 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11482 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11483 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11484 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11485 # icc doesn't choke on unknown options, it will just issue warnings 11486 # or remarks (even with -Werror). So we grep stderr for any message 11487 # that says an option was ignored or not supported. 11488 # When given -MP, icc 7.0 and 7.1 complain thusly: 11489 # icc: Command line warning: ignoring option '-M'; no argument required 11490 # The diagnosis changed in icc 8.0: 11491 # icc: Command line remark: option '-MP' not supported 11492 if (grep 'ignoring option' conftest.err || 11493 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11494 am_cv_$1_dependencies_compiler_type=$depmode 11495 break 11496 fi 11497 fi 11498 done 11499 11500 cd .. 11501 rm -rf conftest.dir 11502else 11503 am_cv_$1_dependencies_compiler_type=none 11504fi 11505]) 11506AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11507AM_CONDITIONAL([am__fastdep$1], [ 11508 test "x$enable_dependency_tracking" != xno \ 11509 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11510]) 11511 11512 11513# AM_SET_DEPDIR 11514# ------------- 11515# Choose a directory name for dependency files. 11516# This macro is AC_REQUIREd in _AM_DEPENDENCIES 11517AC_DEFUN([AM_SET_DEPDIR], 11518[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11519AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11520]) 11521 11522 11523# AM_DEP_TRACK 11524# ------------ 11525AC_DEFUN([AM_DEP_TRACK], 11526[AC_ARG_ENABLE(dependency-tracking, 11527[ --disable-dependency-tracking speeds up one-time build 11528 --enable-dependency-tracking do not reject slow dependency extractors]) 11529if test "x$enable_dependency_tracking" != xno; then 11530 am_depcomp="$ac_aux_dir/depcomp" 11531 AMDEPBACKSLASH='\' 11532 am__nodep='_no' 11533fi 11534AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11535AC_SUBST([AMDEPBACKSLASH])dnl 11536_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11537AC_SUBST([am__nodep])dnl 11538_AM_SUBST_NOTMAKE([am__nodep])dnl 11539]) 11540 11541# Generate code to set up dependency tracking. -*- Autoconf -*- 11542 11543# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 11544# Free Software Foundation, Inc. 11545# 11546# This file is free software; the Free Software Foundation 11547# gives unlimited permission to copy and/or distribute it, 11548# with or without modifications, as long as this notice is preserved. 11549 11550#serial 5 11551 11552# _AM_OUTPUT_DEPENDENCY_COMMANDS 11553# ------------------------------ 11554AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11555[{ 11556 # Autoconf 2.62 quotes --file arguments for eval, but not when files 11557 # are listed without --file. Let's play safe and only enable the eval 11558 # if we detect the quoting. 11559 case $CONFIG_FILES in 11560 *\'*) eval set x "$CONFIG_FILES" ;; 11561 *) set x $CONFIG_FILES ;; 11562 esac 11563 shift 11564 for mf 11565 do 11566 # Strip MF so we end up with the name of the file. 11567 mf=`echo "$mf" | sed -e 's/:.*$//'` 11568 # Check whether this is an Automake generated Makefile or not. 11569 # We used to match only the files named `Makefile.in', but 11570 # some people rename them; so instead we look at the file content. 11571 # Grep'ing the first line is not enough: some people post-process 11572 # each Makefile.in and add a new line on top of each file to say so. 11573 # Grep'ing the whole file is not good either: AIX grep has a line 11574 # limit of 2048, but all sed's we know have understand at least 4000. 11575 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11576 dirpart=`AS_DIRNAME("$mf")` 11577 else 11578 continue 11579 fi 11580 # Extract the definition of DEPDIR, am__include, and am__quote 11581 # from the Makefile without running `make'. 11582 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11583 test -z "$DEPDIR" && continue 11584 am__include=`sed -n 's/^am__include = //p' < "$mf"` 11585 test -z "am__include" && continue 11586 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11587 # When using ansi2knr, U may be empty or an underscore; expand it 11588 U=`sed -n 's/^U = //p' < "$mf"` 11589 # Find all dependency output files, they are included files with 11590 # $(DEPDIR) in their names. We invoke sed twice because it is the 11591 # simplest approach to changing $(DEPDIR) to its actual value in the 11592 # expansion. 11593 for file in `sed -n " 11594 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11595 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11596 # Make sure the directory exists. 11597 test -f "$dirpart/$file" && continue 11598 fdir=`AS_DIRNAME(["$file"])` 11599 AS_MKDIR_P([$dirpart/$fdir]) 11600 # echo "creating $dirpart/$file" 11601 echo '# dummy' > "$dirpart/$file" 11602 done 11603 done 11604} 11605])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11606 11607 11608# AM_OUTPUT_DEPENDENCY_COMMANDS 11609# ----------------------------- 11610# This macro should only be invoked once -- use via AC_REQUIRE. 11611# 11612# This code is only required when automatic dependency tracking 11613# is enabled. FIXME. This creates each `.P' file that we will 11614# need in order to bootstrap the dependency handling code. 11615AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11616[AC_CONFIG_COMMANDS([depfiles], 11617 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11618 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11619]) 11620 11621# Do all the work for Automake. -*- Autoconf -*- 11622 11623# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 11624# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 11625# 11626# This file is free software; the Free Software Foundation 11627# gives unlimited permission to copy and/or distribute it, 11628# with or without modifications, as long as this notice is preserved. 11629 11630# serial 16 11631 11632# This macro actually does too much. Some checks are only needed if 11633# your package does certain things. But this isn't really a big deal. 11634 11635# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11636# AM_INIT_AUTOMAKE([OPTIONS]) 11637# ----------------------------------------------- 11638# The call with PACKAGE and VERSION arguments is the old style 11639# call (pre autoconf-2.50), which is being phased out. PACKAGE 11640# and VERSION should now be passed to AC_INIT and removed from 11641# the call to AM_INIT_AUTOMAKE. 11642# We support both call styles for the transition. After 11643# the next Automake release, Autoconf can make the AC_INIT 11644# arguments mandatory, and then we can depend on a new Autoconf 11645# release and drop the old call support. 11646AC_DEFUN([AM_INIT_AUTOMAKE], 11647[AC_PREREQ([2.62])dnl 11648dnl Autoconf wants to disallow AM_ names. We explicitly allow 11649dnl the ones we care about. 11650m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11651AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11652AC_REQUIRE([AC_PROG_INSTALL])dnl 11653if test "`cd $srcdir && pwd`" != "`pwd`"; then 11654 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11655 # is not polluted with repeated "-I." 11656 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11657 # test to see if srcdir already configured 11658 if test -f $srcdir/config.status; then 11659 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11660 fi 11661fi 11662 11663# test whether we have cygpath 11664if test -z "$CYGPATH_W"; then 11665 if (cygpath --version) >/dev/null 2>/dev/null; then 11666 CYGPATH_W='cygpath -w' 11667 else 11668 CYGPATH_W=echo 11669 fi 11670fi 11671AC_SUBST([CYGPATH_W]) 11672 11673# Define the identity of the package. 11674dnl Distinguish between old-style and new-style calls. 11675m4_ifval([$2], 11676[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11677 AC_SUBST([PACKAGE], [$1])dnl 11678 AC_SUBST([VERSION], [$2])], 11679[_AM_SET_OPTIONS([$1])dnl 11680dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11681m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 11682 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11683 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11684 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11685 11686_AM_IF_OPTION([no-define],, 11687[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 11688 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 11689 11690# Some tools Automake needs. 11691AC_REQUIRE([AM_SANITY_CHECK])dnl 11692AC_REQUIRE([AC_ARG_PROGRAM])dnl 11693AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 11694AM_MISSING_PROG(AUTOCONF, autoconf) 11695AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 11696AM_MISSING_PROG(AUTOHEADER, autoheader) 11697AM_MISSING_PROG(MAKEINFO, makeinfo) 11698AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11699AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11700AC_REQUIRE([AM_PROG_MKDIR_P])dnl 11701# We need awk for the "check" target. The system "awk" is bad on 11702# some platforms. 11703AC_REQUIRE([AC_PROG_AWK])dnl 11704AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11705AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11706_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11707 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11708 [_AM_PROG_TAR([v7])])]) 11709_AM_IF_OPTION([no-dependencies],, 11710[AC_PROVIDE_IFELSE([AC_PROG_CC], 11711 [_AM_DEPENDENCIES(CC)], 11712 [define([AC_PROG_CC], 11713 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 11714AC_PROVIDE_IFELSE([AC_PROG_CXX], 11715 [_AM_DEPENDENCIES(CXX)], 11716 [define([AC_PROG_CXX], 11717 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 11718AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11719 [_AM_DEPENDENCIES(OBJC)], 11720 [define([AC_PROG_OBJC], 11721 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 11722]) 11723_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 11724dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 11725dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 11726dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 11727AC_CONFIG_COMMANDS_PRE(dnl 11728[m4_provide_if([_AM_COMPILER_EXEEXT], 11729 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11730]) 11731 11732dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11733dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11734dnl mangled by Autoconf and run in a shell conditional statement. 11735m4_define([_AC_COMPILER_EXEEXT], 11736m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11737 11738 11739# When config.status generates a header, we must update the stamp-h file. 11740# This file resides in the same directory as the config header 11741# that is generated. The stamp files are numbered to have different names. 11742 11743# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11744# loop where config.status creates the headers, so we can generate 11745# our stamp files there. 11746AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11747[# Compute $1's index in $config_headers. 11748_am_arg=$1 11749_am_stamp_count=1 11750for _am_header in $config_headers :; do 11751 case $_am_header in 11752 $_am_arg | $_am_arg:* ) 11753 break ;; 11754 * ) 11755 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11756 esac 11757done 11758echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11759 11760# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 11761# Inc. 11762# 11763# This file is free software; the Free Software Foundation 11764# gives unlimited permission to copy and/or distribute it, 11765# with or without modifications, as long as this notice is preserved. 11766 11767# serial 1 11768 11769# AM_PROG_INSTALL_SH 11770# ------------------ 11771# Define $install_sh. 11772AC_DEFUN([AM_PROG_INSTALL_SH], 11773[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11774if test x"${install_sh}" != xset; then 11775 case $am_aux_dir in 11776 *\ * | *\ *) 11777 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11778 *) 11779 install_sh="\${SHELL} $am_aux_dir/install-sh" 11780 esac 11781fi 11782AC_SUBST(install_sh)]) 11783 11784# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 11785# 11786# This file is free software; the Free Software Foundation 11787# gives unlimited permission to copy and/or distribute it, 11788# with or without modifications, as long as this notice is preserved. 11789 11790# serial 2 11791 11792# Check whether the underlying file-system supports filenames 11793# with a leading dot. For instance MS-DOS doesn't. 11794AC_DEFUN([AM_SET_LEADING_DOT], 11795[rm -rf .tst 2>/dev/null 11796mkdir .tst 2>/dev/null 11797if test -d .tst; then 11798 am__leading_dot=. 11799else 11800 am__leading_dot=_ 11801fi 11802rmdir .tst 2>/dev/null 11803AC_SUBST([am__leading_dot])]) 11804 11805# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11806# From Jim Meyering 11807 11808# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 11809# 2011 Free Software Foundation, Inc. 11810# 11811# This file is free software; the Free Software Foundation 11812# gives unlimited permission to copy and/or distribute it, 11813# with or without modifications, as long as this notice is preserved. 11814 11815# serial 5 11816 11817# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11818# ---------------------------------- 11819# Control maintainer-specific portions of Makefiles. 11820# Default is to disable them, unless `enable' is passed literally. 11821# For symmetry, `disable' may be passed as well. Anyway, the user 11822# can override the default with the --enable/--disable switch. 11823AC_DEFUN([AM_MAINTAINER_MODE], 11824[m4_case(m4_default([$1], [disable]), 11825 [enable], [m4_define([am_maintainer_other], [disable])], 11826 [disable], [m4_define([am_maintainer_other], [enable])], 11827 [m4_define([am_maintainer_other], [enable]) 11828 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11829AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11830 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11831 AC_ARG_ENABLE([maintainer-mode], 11832[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 11833 (and sometimes confusing) to the casual installer], 11834 [USE_MAINTAINER_MODE=$enableval], 11835 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11836 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11837 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11838 MAINT=$MAINTAINER_MODE_TRUE 11839 AC_SUBST([MAINT])dnl 11840] 11841) 11842 11843AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 11844 11845# Check to see how 'make' treats includes. -*- Autoconf -*- 11846 11847# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 11848# 11849# This file is free software; the Free Software Foundation 11850# gives unlimited permission to copy and/or distribute it, 11851# with or without modifications, as long as this notice is preserved. 11852 11853# serial 4 11854 11855# AM_MAKE_INCLUDE() 11856# ----------------- 11857# Check to see how make treats includes. 11858AC_DEFUN([AM_MAKE_INCLUDE], 11859[am_make=${MAKE-make} 11860cat > confinc << 'END' 11861am__doit: 11862 @echo this is the am__doit target 11863.PHONY: am__doit 11864END 11865# If we don't find an include directive, just comment out the code. 11866AC_MSG_CHECKING([for style of include used by $am_make]) 11867am__include="#" 11868am__quote= 11869_am_result=none 11870# First try GNU make style include. 11871echo "include confinc" > confmf 11872# Ignore all kinds of additional output from `make'. 11873case `$am_make -s -f confmf 2> /dev/null` in #( 11874*the\ am__doit\ target*) 11875 am__include=include 11876 am__quote= 11877 _am_result=GNU 11878 ;; 11879esac 11880# Now try BSD make style include. 11881if test "$am__include" = "#"; then 11882 echo '.include "confinc"' > confmf 11883 case `$am_make -s -f confmf 2> /dev/null` in #( 11884 *the\ am__doit\ target*) 11885 am__include=.include 11886 am__quote="\"" 11887 _am_result=BSD 11888 ;; 11889 esac 11890fi 11891AC_SUBST([am__include]) 11892AC_SUBST([am__quote]) 11893AC_MSG_RESULT([$_am_result]) 11894rm -f confinc confmf 11895]) 11896 11897# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11898 11899# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 11900# Free Software Foundation, Inc. 11901# 11902# This file is free software; the Free Software Foundation 11903# gives unlimited permission to copy and/or distribute it, 11904# with or without modifications, as long as this notice is preserved. 11905 11906# serial 6 11907 11908# AM_MISSING_PROG(NAME, PROGRAM) 11909# ------------------------------ 11910AC_DEFUN([AM_MISSING_PROG], 11911[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11912$1=${$1-"${am_missing_run}$2"} 11913AC_SUBST($1)]) 11914 11915 11916# AM_MISSING_HAS_RUN 11917# ------------------ 11918# Define MISSING if not defined so far and test if it supports --run. 11919# If it does, set am_missing_run to use it, otherwise, to nothing. 11920AC_DEFUN([AM_MISSING_HAS_RUN], 11921[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11922AC_REQUIRE_AUX_FILE([missing])dnl 11923if test x"${MISSING+set}" != xset; then 11924 case $am_aux_dir in 11925 *\ * | *\ *) 11926 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11927 *) 11928 MISSING="\${SHELL} $am_aux_dir/missing" ;; 11929 esac 11930fi 11931# Use eval to expand $SHELL 11932if eval "$MISSING --run true"; then 11933 am_missing_run="$MISSING --run " 11934else 11935 am_missing_run= 11936 AC_MSG_WARN([`missing' script is too old or missing]) 11937fi 11938]) 11939 11940# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 11941# Inc. 11942# 11943# This file is free software; the Free Software Foundation 11944# gives unlimited permission to copy and/or distribute it, 11945# with or without modifications, as long as this notice is preserved. 11946 11947# serial 1 11948 11949# AM_PROG_MKDIR_P 11950# --------------- 11951# Check for `mkdir -p'. 11952AC_DEFUN([AM_PROG_MKDIR_P], 11953[AC_PREREQ([2.60])dnl 11954AC_REQUIRE([AC_PROG_MKDIR_P])dnl 11955dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 11956dnl while keeping a definition of mkdir_p for backward compatibility. 11957dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 11958dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 11959dnl Makefile.ins that do not define MKDIR_P, so we do our own 11960dnl adjustment using top_builddir (which is defined more often than 11961dnl MKDIR_P). 11962AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 11963case $mkdir_p in 11964 [[\\/$]]* | ?:[[\\/]]*) ;; 11965 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 11966esac 11967]) 11968 11969# Helper functions for option handling. -*- Autoconf -*- 11970 11971# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 11972# Foundation, Inc. 11973# 11974# This file is free software; the Free Software Foundation 11975# gives unlimited permission to copy and/or distribute it, 11976# with or without modifications, as long as this notice is preserved. 11977 11978# serial 5 11979 11980# _AM_MANGLE_OPTION(NAME) 11981# ----------------------- 11982AC_DEFUN([_AM_MANGLE_OPTION], 11983[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11984 11985# _AM_SET_OPTION(NAME) 11986# -------------------- 11987# Set option NAME. Presently that only means defining a flag for this option. 11988AC_DEFUN([_AM_SET_OPTION], 11989[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 11990 11991# _AM_SET_OPTIONS(OPTIONS) 11992# ------------------------ 11993# OPTIONS is a space-separated list of Automake options. 11994AC_DEFUN([_AM_SET_OPTIONS], 11995[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11996 11997# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11998# ------------------------------------------- 11999# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12000AC_DEFUN([_AM_IF_OPTION], 12001[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12002 12003# Check to make sure that the build environment is sane. -*- Autoconf -*- 12004 12005# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 12006# Free Software Foundation, Inc. 12007# 12008# This file is free software; the Free Software Foundation 12009# gives unlimited permission to copy and/or distribute it, 12010# with or without modifications, as long as this notice is preserved. 12011 12012# serial 5 12013 12014# AM_SANITY_CHECK 12015# --------------- 12016AC_DEFUN([AM_SANITY_CHECK], 12017[AC_MSG_CHECKING([whether build environment is sane]) 12018# Just in case 12019sleep 1 12020echo timestamp > conftest.file 12021# Reject unsafe characters in $srcdir or the absolute working directory 12022# name. Accept space and tab only in the latter. 12023am_lf=' 12024' 12025case `pwd` in 12026 *[[\\\"\#\$\&\'\`$am_lf]]*) 12027 AC_MSG_ERROR([unsafe absolute working directory name]);; 12028esac 12029case $srcdir in 12030 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12031 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 12032esac 12033 12034# Do `set' in a subshell so we don't clobber the current shell's 12035# arguments. Must try -L first in case configure is actually a 12036# symlink; some systems play weird games with the mod time of symlinks 12037# (eg FreeBSD returns the mod time of the symlink's containing 12038# directory). 12039if ( 12040 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12041 if test "$[*]" = "X"; then 12042 # -L didn't work. 12043 set X `ls -t "$srcdir/configure" conftest.file` 12044 fi 12045 rm -f conftest.file 12046 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12047 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12048 12049 # If neither matched, then we have a broken ls. This can happen 12050 # if, for instance, CONFIG_SHELL is bash and it inherits a 12051 # broken ls alias from the environment. This has actually 12052 # happened. Such a system could not be considered "sane". 12053 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12054alias in your environment]) 12055 fi 12056 12057 test "$[2]" = conftest.file 12058 ) 12059then 12060 # Ok. 12061 : 12062else 12063 AC_MSG_ERROR([newly created file is older than distributed files! 12064Check your system clock]) 12065fi 12066AC_MSG_RESULT(yes)]) 12067 12068# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 12069# 12070# This file is free software; the Free Software Foundation 12071# gives unlimited permission to copy and/or distribute it, 12072# with or without modifications, as long as this notice is preserved. 12073 12074# serial 2 12075 12076# AM_SILENT_RULES([DEFAULT]) 12077# -------------------------- 12078# Enable less verbose build rules; with the default set to DEFAULT 12079# (`yes' being less verbose, `no' or empty being verbose). 12080AC_DEFUN([AM_SILENT_RULES], 12081[AC_ARG_ENABLE([silent-rules], 12082[ --enable-silent-rules less verbose build output (undo: `make V=1') 12083 --disable-silent-rules verbose build output (undo: `make V=0')]) 12084case $enable_silent_rules in 12085yes) AM_DEFAULT_VERBOSITY=0;; 12086no) AM_DEFAULT_VERBOSITY=1;; 12087*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12088esac 12089dnl 12090dnl A few `make' implementations (e.g., NonStop OS and NextStep) 12091dnl do not support nested variable expansions. 12092dnl See automake bug#9928 and bug#10237. 12093am_make=${MAKE-make} 12094AC_CACHE_CHECK([whether $am_make supports nested variables], 12095 [am_cv_make_support_nested_variables], 12096 [if AS_ECHO([['TRUE=$(BAR$(V)) 12097BAR0=false 12098BAR1=true 12099V=1 12100am__doit: 12101 @$(TRUE) 12102.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12103 am_cv_make_support_nested_variables=yes 12104else 12105 am_cv_make_support_nested_variables=no 12106fi]) 12107if test $am_cv_make_support_nested_variables = yes; then 12108 dnl Using `$V' instead of `$(V)' breaks IRIX make. 12109 AM_V='$(V)' 12110 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12111else 12112 AM_V=$AM_DEFAULT_VERBOSITY 12113 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12114fi 12115AC_SUBST([AM_V])dnl 12116AM_SUBST_NOTMAKE([AM_V])dnl 12117AC_SUBST([AM_DEFAULT_V])dnl 12118AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12119AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12120AM_BACKSLASH='\' 12121AC_SUBST([AM_BACKSLASH])dnl 12122_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12123]) 12124 12125# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 12126# 12127# This file is free software; the Free Software Foundation 12128# gives unlimited permission to copy and/or distribute it, 12129# with or without modifications, as long as this notice is preserved. 12130 12131# serial 1 12132 12133# AM_PROG_INSTALL_STRIP 12134# --------------------- 12135# One issue with vendor `install' (even GNU) is that you can't 12136# specify the program used to strip binaries. This is especially 12137# annoying in cross-compiling environments, where the build's strip 12138# is unlikely to handle the host's binaries. 12139# Fortunately install-sh will honor a STRIPPROG variable, so we 12140# always use install-sh in `make install-strip', and initialize 12141# STRIPPROG with the value of the STRIP variable (set by the user). 12142AC_DEFUN([AM_PROG_INSTALL_STRIP], 12143[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12144# Installed binaries are usually stripped using `strip' when the user 12145# run `make install-strip'. However `strip' might not be the right 12146# tool to use in cross-compilation environments, therefore Automake 12147# will honor the `STRIP' environment variable to overrule this program. 12148dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 12149if test "$cross_compiling" != no; then 12150 AC_CHECK_TOOL([STRIP], [strip], :) 12151fi 12152INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12153AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12154 12155# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 12156# 12157# This file is free software; the Free Software Foundation 12158# gives unlimited permission to copy and/or distribute it, 12159# with or without modifications, as long as this notice is preserved. 12160 12161# serial 3 12162 12163# _AM_SUBST_NOTMAKE(VARIABLE) 12164# --------------------------- 12165# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12166# This macro is traced by Automake. 12167AC_DEFUN([_AM_SUBST_NOTMAKE]) 12168 12169# AM_SUBST_NOTMAKE(VARIABLE) 12170# -------------------------- 12171# Public sister of _AM_SUBST_NOTMAKE. 12172AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12173 12174# Check how to create a tarball. -*- Autoconf -*- 12175 12176# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 12177# 12178# This file is free software; the Free Software Foundation 12179# gives unlimited permission to copy and/or distribute it, 12180# with or without modifications, as long as this notice is preserved. 12181 12182# serial 2 12183 12184# _AM_PROG_TAR(FORMAT) 12185# -------------------- 12186# Check how to create a tarball in format FORMAT. 12187# FORMAT should be one of `v7', `ustar', or `pax'. 12188# 12189# Substitute a variable $(am__tar) that is a command 12190# writing to stdout a FORMAT-tarball containing the directory 12191# $tardir. 12192# tardir=directory && $(am__tar) > result.tar 12193# 12194# Substitute a variable $(am__untar) that extract such 12195# a tarball read from stdin. 12196# $(am__untar) < result.tar 12197AC_DEFUN([_AM_PROG_TAR], 12198[# Always define AMTAR for backward compatibility. Yes, it's still used 12199# in the wild :-( We should find a proper way to deprecate it ... 12200AC_SUBST([AMTAR], ['$${TAR-tar}']) 12201m4_if([$1], [v7], 12202 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12203 [m4_case([$1], [ustar],, [pax],, 12204 [m4_fatal([Unknown tar format])]) 12205AC_MSG_CHECKING([how to create a $1 tar archive]) 12206# Loop over all known methods to create a tar archive until one works. 12207_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12208_am_tools=${am_cv_prog_tar_$1-$_am_tools} 12209# Do not fold the above two line into one, because Tru64 sh and 12210# Solaris sh will not grok spaces in the rhs of `-'. 12211for _am_tool in $_am_tools 12212do 12213 case $_am_tool in 12214 gnutar) 12215 for _am_tar in tar gnutar gtar; 12216 do 12217 AM_RUN_LOG([$_am_tar --version]) && break 12218 done 12219 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12220 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12221 am__untar="$_am_tar -xf -" 12222 ;; 12223 plaintar) 12224 # Must skip GNU tar: if it does not support --format= it doesn't create 12225 # ustar tarball either. 12226 (tar --version) >/dev/null 2>&1 && continue 12227 am__tar='tar chf - "$$tardir"' 12228 am__tar_='tar chf - "$tardir"' 12229 am__untar='tar xf -' 12230 ;; 12231 pax) 12232 am__tar='pax -L -x $1 -w "$$tardir"' 12233 am__tar_='pax -L -x $1 -w "$tardir"' 12234 am__untar='pax -r' 12235 ;; 12236 cpio) 12237 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12238 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12239 am__untar='cpio -i -H $1 -d' 12240 ;; 12241 none) 12242 am__tar=false 12243 am__tar_=false 12244 am__untar=false 12245 ;; 12246 esac 12247 12248 # If the value was cached, stop now. We just wanted to have am__tar 12249 # and am__untar set. 12250 test -n "${am_cv_prog_tar_$1}" && break 12251 12252 # tar/untar a dummy directory, and stop if the command works 12253 rm -rf conftest.dir 12254 mkdir conftest.dir 12255 echo GrepMe > conftest.dir/file 12256 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12257 rm -rf conftest.dir 12258 if test -s conftest.tar; then 12259 AM_RUN_LOG([$am__untar <conftest.tar]) 12260 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12261 fi 12262done 12263rm -rf conftest.dir 12264 12265AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12266AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12267AC_SUBST([am__tar]) 12268AC_SUBST([am__untar]) 12269]) # _AM_PROG_TAR 12270 12271