aclocal.m4 revision eaa3dbe0
1# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 2 3# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24# 25# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 27# Inc. 28# Written by Gordon Matzigkeit, 1996 29# 30# This file is free software; the Free Software Foundation gives 31# unlimited permission to copy and/or distribute it, with or without 32# modifications, as long as this notice is preserved. 33 34m4_define([_LT_COPYING], [dnl 35# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 37# Inc. 38# Written by Gordon Matzigkeit, 1996 39# 40# This file is part of GNU Libtool. 41# 42# GNU Libtool is free software; you can redistribute it and/or 43# modify it under the terms of the GNU General Public License as 44# published by the Free Software Foundation; either version 2 of 45# the License, or (at your option) any later version. 46# 47# As a special exception to the GNU General Public License, 48# if you distribute this file as part of a program or library that 49# is built using GNU Libtool, you may include this file under the 50# same distribution terms that you use for the rest of that program. 51# 52# GNU Libtool is distributed in the hope that it will be useful, 53# but WITHOUT ANY WARRANTY; without even the implied warranty of 54# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55# GNU General Public License for more details. 56# 57# You should have received a copy of the GNU General Public License 58# along with GNU Libtool; see the file COPYING. If not, a copy 59# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60# obtained by writing to the Free Software Foundation, Inc., 61# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62]) 63 64# serial 57 LT_INIT 65 66 67# LT_PREREQ(VERSION) 68# ------------------ 69# Complain and exit if this libtool version is less that VERSION. 70m4_defun([LT_PREREQ], 71[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72 [m4_default([$3], 73 [m4_fatal([Libtool version $1 or higher is required], 74 63)])], 75 [$2])]) 76 77 78# _LT_CHECK_BUILDDIR 79# ------------------ 80# Complain if the absolute build directory name contains unusual characters 81m4_defun([_LT_CHECK_BUILDDIR], 82[case `pwd` in 83 *\ * | *\ *) 84 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85esac 86]) 87 88 89# LT_INIT([OPTIONS]) 90# ------------------ 91AC_DEFUN([LT_INIT], 92[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94AC_BEFORE([$0], [LT_LANG])dnl 95AC_BEFORE([$0], [LT_OUTPUT])dnl 96AC_BEFORE([$0], [LTDL_INIT])dnl 97m4_require([_LT_CHECK_BUILDDIR])dnl 98 99dnl Autoconf doesn't catch unexpanded LT_ macros by default: 100m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103dnl unless we require an AC_DEFUNed macro: 104AC_REQUIRE([LTOPTIONS_VERSION])dnl 105AC_REQUIRE([LTSUGAR_VERSION])dnl 106AC_REQUIRE([LTVERSION_VERSION])dnl 107AC_REQUIRE([LTOBSOLETE_VERSION])dnl 108m4_require([_LT_PROG_LTMAIN])dnl 109 110_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111 112dnl Parse OPTIONS 113_LT_SET_OPTIONS([$0], [$1]) 114 115# This can be used to rebuild libtool when needed 116LIBTOOL_DEPS="$ltmain" 117 118# Always use our own libtool. 119LIBTOOL='$(SHELL) $(top_builddir)/libtool' 120AC_SUBST(LIBTOOL)dnl 121 122_LT_SETUP 123 124# Only expand once: 125m4_define([LT_INIT]) 126])# LT_INIT 127 128# Old names: 129AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131dnl aclocal-1.4 backwards compatibility: 132dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134 135 136# _LT_CC_BASENAME(CC) 137# ------------------- 138# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139m4_defun([_LT_CC_BASENAME], 140[for cc_temp in $1""; do 141 case $cc_temp in 142 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144 \-*) ;; 145 *) break;; 146 esac 147done 148cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149]) 150 151 152# _LT_FILEUTILS_DEFAULTS 153# ---------------------- 154# It is okay to use these file commands and assume they have been set 155# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156m4_defun([_LT_FILEUTILS_DEFAULTS], 157[: ${CP="cp -f"} 158: ${MV="mv -f"} 159: ${RM="rm -f"} 160])# _LT_FILEUTILS_DEFAULTS 161 162 163# _LT_SETUP 164# --------- 165m4_defun([_LT_SETUP], 166[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167AC_REQUIRE([AC_CANONICAL_BUILD])dnl 168AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170 171_LT_DECL([], [host_alias], [0], [The host system])dnl 172_LT_DECL([], [host], [0])dnl 173_LT_DECL([], [host_os], [0])dnl 174dnl 175_LT_DECL([], [build_alias], [0], [The build system])dnl 176_LT_DECL([], [build], [0])dnl 177_LT_DECL([], [build_os], [0])dnl 178dnl 179AC_REQUIRE([AC_PROG_CC])dnl 180AC_REQUIRE([LT_PATH_LD])dnl 181AC_REQUIRE([LT_PATH_NM])dnl 182dnl 183AC_REQUIRE([AC_PROG_LN_S])dnl 184test -z "$LN_S" && LN_S="ln -s" 185_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 186dnl 187AC_REQUIRE([LT_CMD_MAX_LEN])dnl 188_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 189_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 190dnl 191m4_require([_LT_FILEUTILS_DEFAULTS])dnl 192m4_require([_LT_CHECK_SHELL_FEATURES])dnl 193m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 194m4_require([_LT_CMD_RELOAD])dnl 195m4_require([_LT_CHECK_MAGIC_METHOD])dnl 196m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 197m4_require([_LT_CMD_OLD_ARCHIVE])dnl 198m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 199m4_require([_LT_WITH_SYSROOT])dnl 200 201_LT_CONFIG_LIBTOOL_INIT([ 202# See if we are running on zsh, and set the options which allow our 203# commands through without removal of \ escapes INIT. 204if test -n "\${ZSH_VERSION+set}" ; then 205 setopt NO_GLOB_SUBST 206fi 207]) 208if test -n "${ZSH_VERSION+set}" ; then 209 setopt NO_GLOB_SUBST 210fi 211 212_LT_CHECK_OBJDIR 213 214m4_require([_LT_TAG_COMPILER])dnl 215 216case $host_os in 217aix3*) 218 # AIX sometimes has problems with the GCC collect2 program. For some 219 # reason, if we set the COLLECT_NAMES environment variable, the problems 220 # vanish in a puff of smoke. 221 if test "X${COLLECT_NAMES+set}" != Xset; then 222 COLLECT_NAMES= 223 export COLLECT_NAMES 224 fi 225 ;; 226esac 227 228# Global variables: 229ofile=libtool 230can_build_shared=yes 231 232# All known linkers require a `.a' archive for static linking (except MSVC, 233# which needs '.lib'). 234libext=a 235 236with_gnu_ld="$lt_cv_prog_gnu_ld" 237 238old_CC="$CC" 239old_CFLAGS="$CFLAGS" 240 241# Set sane defaults for various variables 242test -z "$CC" && CC=cc 243test -z "$LTCC" && LTCC=$CC 244test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 245test -z "$LD" && LD=ld 246test -z "$ac_objext" && ac_objext=o 247 248_LT_CC_BASENAME([$compiler]) 249 250# Only perform the check for file, if the check method requires it 251test -z "$MAGIC_CMD" && MAGIC_CMD=file 252case $deplibs_check_method in 253file_magic*) 254 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 255 _LT_PATH_MAGIC 256 fi 257 ;; 258esac 259 260# Use C for the default configuration in the libtool script 261LT_SUPPORTED_TAG([CC]) 262_LT_LANG_C_CONFIG 263_LT_LANG_DEFAULT_CONFIG 264_LT_CONFIG_COMMANDS 265])# _LT_SETUP 266 267 268# _LT_PREPARE_SED_QUOTE_VARS 269# -------------------------- 270# Define a few sed substitution that help us do robust quoting. 271m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 272[# Backslashify metacharacters that are still active within 273# double-quoted strings. 274sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 275 276# Same as above, but do not quote variable references. 277double_quote_subst='s/\([["`\\]]\)/\\\1/g' 278 279# Sed substitution to delay expansion of an escaped shell variable in a 280# double_quote_subst'ed string. 281delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 282 283# Sed substitution to delay expansion of an escaped single quote. 284delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 285 286# Sed substitution to avoid accidental globbing in evaled expressions 287no_glob_subst='s/\*/\\\*/g' 288]) 289 290# _LT_PROG_LTMAIN 291# --------------- 292# Note that this code is called both from `configure', and `config.status' 293# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 294# `config.status' has no value for ac_aux_dir unless we are using Automake, 295# so we pass a copy along to make sure it has a sensible value anyway. 296m4_defun([_LT_PROG_LTMAIN], 297[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 298_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 299ltmain="$ac_aux_dir/ltmain.sh" 300])# _LT_PROG_LTMAIN 301 302 303 304# So that we can recreate a full libtool script including additional 305# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 306# in macros and then make a single call at the end using the `libtool' 307# label. 308 309 310# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 311# ---------------------------------------- 312# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 313m4_define([_LT_CONFIG_LIBTOOL_INIT], 314[m4_ifval([$1], 315 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 316 [$1 317])])]) 318 319# Initialize. 320m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 321 322 323# _LT_CONFIG_LIBTOOL([COMMANDS]) 324# ------------------------------ 325# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 326m4_define([_LT_CONFIG_LIBTOOL], 327[m4_ifval([$1], 328 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 329 [$1 330])])]) 331 332# Initialize. 333m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 334 335 336# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 337# ----------------------------------------------------- 338m4_defun([_LT_CONFIG_SAVE_COMMANDS], 339[_LT_CONFIG_LIBTOOL([$1]) 340_LT_CONFIG_LIBTOOL_INIT([$2]) 341]) 342 343 344# _LT_FORMAT_COMMENT([COMMENT]) 345# ----------------------------- 346# Add leading comment marks to the start of each line, and a trailing 347# full-stop to the whole comment if one is not present already. 348m4_define([_LT_FORMAT_COMMENT], 349[m4_ifval([$1], [ 350m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 351 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 352)]) 353 354 355 356 357 358# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 359# ------------------------------------------------------------------- 360# CONFIGNAME is the name given to the value in the libtool script. 361# VARNAME is the (base) name used in the configure script. 362# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 363# VARNAME. Any other value will be used directly. 364m4_define([_LT_DECL], 365[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 367 [m4_ifval([$1], [$1], [$2])]) 368 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 369 m4_ifval([$4], 370 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 371 lt_dict_add_subkey([lt_decl_dict], [$2], 372 [tagged?], [m4_ifval([$5], [yes], [no])])]) 373]) 374 375 376# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 377# -------------------------------------------------------- 378m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 379 380 381# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 382# ------------------------------------------------ 383m4_define([lt_decl_tag_varnames], 384[_lt_decl_filter([tagged?], [yes], $@)]) 385 386 387# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 388# --------------------------------------------------------- 389m4_define([_lt_decl_filter], 390[m4_case([$#], 391 [0], [m4_fatal([$0: too few arguments: $#])], 392 [1], [m4_fatal([$0: too few arguments: $#: $1])], 393 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 394 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 395 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 396]) 397 398 399# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 400# -------------------------------------------------- 401m4_define([lt_decl_quote_varnames], 402[_lt_decl_filter([value], [1], $@)]) 403 404 405# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 406# --------------------------------------------------- 407m4_define([lt_decl_dquote_varnames], 408[_lt_decl_filter([value], [2], $@)]) 409 410 411# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 412# --------------------------------------------------- 413m4_define([lt_decl_varnames_tagged], 414[m4_assert([$# <= 2])dnl 415_$0(m4_quote(m4_default([$1], [[, ]])), 416 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 417 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 418m4_define([_lt_decl_varnames_tagged], 419[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 420 421 422# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 423# ------------------------------------------------ 424m4_define([lt_decl_all_varnames], 425[_$0(m4_quote(m4_default([$1], [[, ]])), 426 m4_if([$2], [], 427 m4_quote(lt_decl_varnames), 428 m4_quote(m4_shift($@))))[]dnl 429]) 430m4_define([_lt_decl_all_varnames], 431[lt_join($@, lt_decl_varnames_tagged([$1], 432 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 433]) 434 435 436# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 437# ------------------------------------ 438# Quote a variable value, and forward it to `config.status' so that its 439# declaration there will have the same value as in `configure'. VARNAME 440# must have a single quote delimited value for this to work. 441m4_define([_LT_CONFIG_STATUS_DECLARE], 442[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 443 444 445# _LT_CONFIG_STATUS_DECLARATIONS 446# ------------------------------ 447# We delimit libtool config variables with single quotes, so when 448# we write them to config.status, we have to be sure to quote all 449# embedded single quotes properly. In configure, this macro expands 450# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 451# 452# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 453m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 454[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 455 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 456 457 458# _LT_LIBTOOL_TAGS 459# ---------------- 460# Output comment and list of tags supported by the script 461m4_defun([_LT_LIBTOOL_TAGS], 462[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 463available_tags="_LT_TAGS"dnl 464]) 465 466 467# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 468# ----------------------------------- 469# Extract the dictionary values for VARNAME (optionally with TAG) and 470# expand to a commented shell variable setting: 471# 472# # Some comment about what VAR is for. 473# visible_name=$lt_internal_name 474m4_define([_LT_LIBTOOL_DECLARE], 475[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 476 [description])))[]dnl 477m4_pushdef([_libtool_name], 478 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 479m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 480 [0], [_libtool_name=[$]$1], 481 [1], [_libtool_name=$lt_[]$1], 482 [2], [_libtool_name=$lt_[]$1], 483 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 484m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 485]) 486 487 488# _LT_LIBTOOL_CONFIG_VARS 489# ----------------------- 490# Produce commented declarations of non-tagged libtool config variables 491# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 492# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 493# section) are produced by _LT_LIBTOOL_TAG_VARS. 494m4_defun([_LT_LIBTOOL_CONFIG_VARS], 495[m4_foreach([_lt_var], 496 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 497 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 498 499 500# _LT_LIBTOOL_TAG_VARS(TAG) 501# ------------------------- 502m4_define([_LT_LIBTOOL_TAG_VARS], 503[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 504 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 505 506 507# _LT_TAGVAR(VARNAME, [TAGNAME]) 508# ------------------------------ 509m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 510 511 512# _LT_CONFIG_COMMANDS 513# ------------------- 514# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 515# variables for single and double quote escaping we saved from calls 516# to _LT_DECL, we can put quote escaped variables declarations 517# into `config.status', and then the shell code to quote escape them in 518# for loops in `config.status'. Finally, any additional code accumulated 519# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 520m4_defun([_LT_CONFIG_COMMANDS], 521[AC_PROVIDE_IFELSE([LT_OUTPUT], 522 dnl If the libtool generation code has been placed in $CONFIG_LT, 523 dnl instead of duplicating it all over again into config.status, 524 dnl then we will have config.status run $CONFIG_LT later, so it 525 dnl needs to know what name is stored there: 526 [AC_CONFIG_COMMANDS([libtool], 527 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 528 dnl If the libtool generation code is destined for config.status, 529 dnl expand the accumulated commands and init code now: 530 [AC_CONFIG_COMMANDS([libtool], 531 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 532])#_LT_CONFIG_COMMANDS 533 534 535# Initialize. 536m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 537[ 538 539# The HP-UX ksh and POSIX shell print the target directory to stdout 540# if CDPATH is set. 541(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 542 543sed_quote_subst='$sed_quote_subst' 544double_quote_subst='$double_quote_subst' 545delay_variable_subst='$delay_variable_subst' 546_LT_CONFIG_STATUS_DECLARATIONS 547LTCC='$LTCC' 548LTCFLAGS='$LTCFLAGS' 549compiler='$compiler_DEFAULT' 550 551# A function that is used when there is no print builtin or printf. 552func_fallback_echo () 553{ 554 eval 'cat <<_LTECHO_EOF 555\$[]1 556_LTECHO_EOF' 557} 558 559# Quote evaled strings. 560for var in lt_decl_all_varnames([[ \ 561]], lt_decl_quote_varnames); do 562 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 563 *[[\\\\\\\`\\"\\\$]]*) 564 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 565 ;; 566 *) 567 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 568 ;; 569 esac 570done 571 572# Double-quote double-evaled strings. 573for var in lt_decl_all_varnames([[ \ 574]], lt_decl_dquote_varnames); do 575 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 576 *[[\\\\\\\`\\"\\\$]]*) 577 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 578 ;; 579 *) 580 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 581 ;; 582 esac 583done 584 585_LT_OUTPUT_LIBTOOL_INIT 586]) 587 588# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 589# ------------------------------------ 590# Generate a child script FILE with all initialization necessary to 591# reuse the environment learned by the parent script, and make the 592# file executable. If COMMENT is supplied, it is inserted after the 593# `#!' sequence but before initialization text begins. After this 594# macro, additional text can be appended to FILE to form the body of 595# the child script. The macro ends with non-zero status if the 596# file could not be fully written (such as if the disk is full). 597m4_ifdef([AS_INIT_GENERATED], 598[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 599[m4_defun([_LT_GENERATED_FILE_INIT], 600[m4_require([AS_PREPARE])]dnl 601[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 602[lt_write_fail=0 603cat >$1 <<_ASEOF || lt_write_fail=1 604#! $SHELL 605# Generated by $as_me. 606$2 607SHELL=\${CONFIG_SHELL-$SHELL} 608export SHELL 609_ASEOF 610cat >>$1 <<\_ASEOF || lt_write_fail=1 611AS_SHELL_SANITIZE 612_AS_PREPARE 613exec AS_MESSAGE_FD>&1 614_ASEOF 615test $lt_write_fail = 0 && chmod +x $1[]dnl 616m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 617 618# LT_OUTPUT 619# --------- 620# This macro allows early generation of the libtool script (before 621# AC_OUTPUT is called), incase it is used in configure for compilation 622# tests. 623AC_DEFUN([LT_OUTPUT], 624[: ${CONFIG_LT=./config.lt} 625AC_MSG_NOTICE([creating $CONFIG_LT]) 626_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 627[# Run this file to recreate a libtool stub with the current configuration.]) 628 629cat >>"$CONFIG_LT" <<\_LTEOF 630lt_cl_silent=false 631exec AS_MESSAGE_LOG_FD>>config.log 632{ 633 echo 634 AS_BOX([Running $as_me.]) 635} >&AS_MESSAGE_LOG_FD 636 637lt_cl_help="\ 638\`$as_me' creates a local libtool stub from the current configuration, 639for use in further configure time tests before the real libtool is 640generated. 641 642Usage: $[0] [[OPTIONS]] 643 644 -h, --help print this help, then exit 645 -V, --version print version number, then exit 646 -q, --quiet do not print progress messages 647 -d, --debug don't remove temporary files 648 649Report bugs to <bug-libtool@gnu.org>." 650 651lt_cl_version="\ 652m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 653m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 654configured by $[0], generated by m4_PACKAGE_STRING. 655 656Copyright (C) 2010 Free Software Foundation, Inc. 657This config.lt script is free software; the Free Software Foundation 658gives unlimited permision to copy, distribute and modify it." 659 660while test $[#] != 0 661do 662 case $[1] in 663 --version | --v* | -V ) 664 echo "$lt_cl_version"; exit 0 ;; 665 --help | --h* | -h ) 666 echo "$lt_cl_help"; exit 0 ;; 667 --debug | --d* | -d ) 668 debug=: ;; 669 --quiet | --q* | --silent | --s* | -q ) 670 lt_cl_silent=: ;; 671 672 -*) AC_MSG_ERROR([unrecognized option: $[1] 673Try \`$[0] --help' for more information.]) ;; 674 675 *) AC_MSG_ERROR([unrecognized argument: $[1] 676Try \`$[0] --help' for more information.]) ;; 677 esac 678 shift 679done 680 681if $lt_cl_silent; then 682 exec AS_MESSAGE_FD>/dev/null 683fi 684_LTEOF 685 686cat >>"$CONFIG_LT" <<_LTEOF 687_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 688_LTEOF 689 690cat >>"$CONFIG_LT" <<\_LTEOF 691AC_MSG_NOTICE([creating $ofile]) 692_LT_OUTPUT_LIBTOOL_COMMANDS 693AS_EXIT(0) 694_LTEOF 695chmod +x "$CONFIG_LT" 696 697# configure is writing to config.log, but config.lt does its own redirection, 698# appending to config.log, which fails on DOS, as config.log is still kept 699# open by configure. Here we exec the FD to /dev/null, effectively closing 700# config.log, so it can be properly (re)opened and appended to by config.lt. 701lt_cl_success=: 702test "$silent" = yes && 703 lt_config_lt_args="$lt_config_lt_args --quiet" 704exec AS_MESSAGE_LOG_FD>/dev/null 705$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 706exec AS_MESSAGE_LOG_FD>>config.log 707$lt_cl_success || AS_EXIT(1) 708])# LT_OUTPUT 709 710 711# _LT_CONFIG(TAG) 712# --------------- 713# If TAG is the built-in tag, create an initial libtool script with a 714# default configuration from the untagged config vars. Otherwise add code 715# to config.status for appending the configuration named by TAG from the 716# matching tagged config vars. 717m4_defun([_LT_CONFIG], 718[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 719_LT_CONFIG_SAVE_COMMANDS([ 720 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 721 m4_if(_LT_TAG, [C], [ 722 # See if we are running on zsh, and set the options which allow our 723 # commands through without removal of \ escapes. 724 if test -n "${ZSH_VERSION+set}" ; then 725 setopt NO_GLOB_SUBST 726 fi 727 728 cfgfile="${ofile}T" 729 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 730 $RM "$cfgfile" 731 732 cat <<_LT_EOF >> "$cfgfile" 733#! $SHELL 734 735# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 736# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 737# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 738# NOTE: Changes made to this file will be lost: look at ltmain.sh. 739# 740_LT_COPYING 741_LT_LIBTOOL_TAGS 742 743# ### BEGIN LIBTOOL CONFIG 744_LT_LIBTOOL_CONFIG_VARS 745_LT_LIBTOOL_TAG_VARS 746# ### END LIBTOOL CONFIG 747 748_LT_EOF 749 750 case $host_os in 751 aix3*) 752 cat <<\_LT_EOF >> "$cfgfile" 753# AIX sometimes has problems with the GCC collect2 program. For some 754# reason, if we set the COLLECT_NAMES environment variable, the problems 755# vanish in a puff of smoke. 756if test "X${COLLECT_NAMES+set}" != Xset; then 757 COLLECT_NAMES= 758 export COLLECT_NAMES 759fi 760_LT_EOF 761 ;; 762 esac 763 764 _LT_PROG_LTMAIN 765 766 # We use sed instead of cat because bash on DJGPP gets confused if 767 # if finds mixed CR/LF and LF-only lines. Since sed operates in 768 # text mode, it properly converts lines to CR/LF. This bash problem 769 # is reportedly fixed, but why not run on old versions too? 770 sed '$q' "$ltmain" >> "$cfgfile" \ 771 || (rm -f "$cfgfile"; exit 1) 772 773 _LT_PROG_REPLACE_SHELLFNS 774 775 mv -f "$cfgfile" "$ofile" || 776 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 777 chmod +x "$ofile" 778], 779[cat <<_LT_EOF >> "$ofile" 780 781dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 782dnl in a comment (ie after a #). 783# ### BEGIN LIBTOOL TAG CONFIG: $1 784_LT_LIBTOOL_TAG_VARS(_LT_TAG) 785# ### END LIBTOOL TAG CONFIG: $1 786_LT_EOF 787])dnl /m4_if 788], 789[m4_if([$1], [], [ 790 PACKAGE='$PACKAGE' 791 VERSION='$VERSION' 792 TIMESTAMP='$TIMESTAMP' 793 RM='$RM' 794 ofile='$ofile'], []) 795])dnl /_LT_CONFIG_SAVE_COMMANDS 796])# _LT_CONFIG 797 798 799# LT_SUPPORTED_TAG(TAG) 800# --------------------- 801# Trace this macro to discover what tags are supported by the libtool 802# --tag option, using: 803# autoconf --trace 'LT_SUPPORTED_TAG:$1' 804AC_DEFUN([LT_SUPPORTED_TAG], []) 805 806 807# C support is built-in for now 808m4_define([_LT_LANG_C_enabled], []) 809m4_define([_LT_TAGS], []) 810 811 812# LT_LANG(LANG) 813# ------------- 814# Enable libtool support for the given language if not already enabled. 815AC_DEFUN([LT_LANG], 816[AC_BEFORE([$0], [LT_OUTPUT])dnl 817m4_case([$1], 818 [C], [_LT_LANG(C)], 819 [C++], [_LT_LANG(CXX)], 820 [Java], [_LT_LANG(GCJ)], 821 [Fortran 77], [_LT_LANG(F77)], 822 [Fortran], [_LT_LANG(FC)], 823 [Windows Resource], [_LT_LANG(RC)], 824 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 825 [_LT_LANG($1)], 826 [m4_fatal([$0: unsupported language: "$1"])])])dnl 827])# LT_LANG 828 829 830# _LT_LANG(LANGNAME) 831# ------------------ 832m4_defun([_LT_LANG], 833[m4_ifdef([_LT_LANG_]$1[_enabled], [], 834 [LT_SUPPORTED_TAG([$1])dnl 835 m4_append([_LT_TAGS], [$1 ])dnl 836 m4_define([_LT_LANG_]$1[_enabled], [])dnl 837 _LT_LANG_$1_CONFIG($1)])dnl 838])# _LT_LANG 839 840 841# _LT_LANG_DEFAULT_CONFIG 842# ----------------------- 843m4_defun([_LT_LANG_DEFAULT_CONFIG], 844[AC_PROVIDE_IFELSE([AC_PROG_CXX], 845 [LT_LANG(CXX)], 846 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 847 848AC_PROVIDE_IFELSE([AC_PROG_F77], 849 [LT_LANG(F77)], 850 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 851 852AC_PROVIDE_IFELSE([AC_PROG_FC], 853 [LT_LANG(FC)], 854 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 855 856dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 857dnl pulling things in needlessly. 858AC_PROVIDE_IFELSE([AC_PROG_GCJ], 859 [LT_LANG(GCJ)], 860 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 861 [LT_LANG(GCJ)], 862 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 863 [LT_LANG(GCJ)], 864 [m4_ifdef([AC_PROG_GCJ], 865 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 866 m4_ifdef([A][M_PROG_GCJ], 867 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 868 m4_ifdef([LT_PROG_GCJ], 869 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 870 871AC_PROVIDE_IFELSE([LT_PROG_RC], 872 [LT_LANG(RC)], 873 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 874])# _LT_LANG_DEFAULT_CONFIG 875 876# Obsolete macros: 877AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 878AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 879AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 880AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 881AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 882dnl aclocal-1.4 backwards compatibility: 883dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 884dnl AC_DEFUN([AC_LIBTOOL_F77], []) 885dnl AC_DEFUN([AC_LIBTOOL_FC], []) 886dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 887dnl AC_DEFUN([AC_LIBTOOL_RC], []) 888 889 890# _LT_TAG_COMPILER 891# ---------------- 892m4_defun([_LT_TAG_COMPILER], 893[AC_REQUIRE([AC_PROG_CC])dnl 894 895_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 896_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 897_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 898_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 899 900# If no C compiler was specified, use CC. 901LTCC=${LTCC-"$CC"} 902 903# If no C compiler flags were specified, use CFLAGS. 904LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 905 906# Allow CC to be a program name with arguments. 907compiler=$CC 908])# _LT_TAG_COMPILER 909 910 911# _LT_COMPILER_BOILERPLATE 912# ------------------------ 913# Check for compiler boilerplate output or warnings with 914# the simple compiler test code. 915m4_defun([_LT_COMPILER_BOILERPLATE], 916[m4_require([_LT_DECL_SED])dnl 917ac_outfile=conftest.$ac_objext 918echo "$lt_simple_compile_test_code" >conftest.$ac_ext 919eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 920_lt_compiler_boilerplate=`cat conftest.err` 921$RM conftest* 922])# _LT_COMPILER_BOILERPLATE 923 924 925# _LT_LINKER_BOILERPLATE 926# ---------------------- 927# Check for linker boilerplate output or warnings with 928# the simple link test code. 929m4_defun([_LT_LINKER_BOILERPLATE], 930[m4_require([_LT_DECL_SED])dnl 931ac_outfile=conftest.$ac_objext 932echo "$lt_simple_link_test_code" >conftest.$ac_ext 933eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 934_lt_linker_boilerplate=`cat conftest.err` 935$RM -r conftest* 936])# _LT_LINKER_BOILERPLATE 937 938# _LT_REQUIRED_DARWIN_CHECKS 939# ------------------------- 940m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 941 case $host_os in 942 rhapsody* | darwin*) 943 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 944 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 945 AC_CHECK_TOOL([LIPO], [lipo], [:]) 946 AC_CHECK_TOOL([OTOOL], [otool], [:]) 947 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 948 _LT_DECL([], [DSYMUTIL], [1], 949 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 950 _LT_DECL([], [NMEDIT], [1], 951 [Tool to change global to local symbols on Mac OS X]) 952 _LT_DECL([], [LIPO], [1], 953 [Tool to manipulate fat objects and archives on Mac OS X]) 954 _LT_DECL([], [OTOOL], [1], 955 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 956 _LT_DECL([], [OTOOL64], [1], 957 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 958 959 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 960 [lt_cv_apple_cc_single_mod=no 961 if test -z "${LT_MULTI_MODULE}"; then 962 # By default we will add the -single_module flag. You can override 963 # by either setting the environment variable LT_MULTI_MODULE 964 # non-empty at configure time, or by adding -multi_module to the 965 # link flags. 966 rm -rf libconftest.dylib* 967 echo "int foo(void){return 1;}" > conftest.c 968 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 969-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 970 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 971 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 972 _lt_result=$? 973 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 974 lt_cv_apple_cc_single_mod=yes 975 else 976 cat conftest.err >&AS_MESSAGE_LOG_FD 977 fi 978 rm -rf libconftest.dylib* 979 rm -f conftest.* 980 fi]) 981 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 982 [lt_cv_ld_exported_symbols_list], 983 [lt_cv_ld_exported_symbols_list=no 984 save_LDFLAGS=$LDFLAGS 985 echo "_main" > conftest.sym 986 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 987 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 988 [lt_cv_ld_exported_symbols_list=yes], 989 [lt_cv_ld_exported_symbols_list=no]) 990 LDFLAGS="$save_LDFLAGS" 991 ]) 992 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 993 [lt_cv_ld_force_load=no 994 cat > conftest.c << _LT_EOF 995int forced_loaded() { return 2;} 996_LT_EOF 997 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 998 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 999 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1000 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1001 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1002 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1003 cat > conftest.c << _LT_EOF 1004int main() { return 0;} 1005_LT_EOF 1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1007 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1008 _lt_result=$? 1009 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 1010 lt_cv_ld_force_load=yes 1011 else 1012 cat conftest.err >&AS_MESSAGE_LOG_FD 1013 fi 1014 rm -f conftest.err libconftest.a conftest conftest.c 1015 rm -rf conftest.dSYM 1016 ]) 1017 case $host_os in 1018 rhapsody* | darwin1.[[012]]) 1019 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1020 darwin1.*) 1021 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1022 darwin*) # darwin 5.x on 1023 # if running on 10.5 or later, the deployment target defaults 1024 # to the OS version, if on x86, and 10.4, the deployment 1025 # target defaults to 10.4. Don't you love it? 1026 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1027 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1028 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1029 10.[[012]]*) 1030 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1031 10.*) 1032 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1033 esac 1034 ;; 1035 esac 1036 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1037 _lt_dar_single_mod='$single_module' 1038 fi 1039 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1040 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1041 else 1042 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1043 fi 1044 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1045 _lt_dsymutil='~$DSYMUTIL $lib || :' 1046 else 1047 _lt_dsymutil= 1048 fi 1049 ;; 1050 esac 1051]) 1052 1053 1054# _LT_DARWIN_LINKER_FEATURES 1055# -------------------------- 1056# Checks for linker and compiler features on darwin 1057m4_defun([_LT_DARWIN_LINKER_FEATURES], 1058[ 1059 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1060 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1061 _LT_TAGVAR(hardcode_direct, $1)=no 1062 _LT_TAGVAR(hardcode_automatic, $1)=yes 1063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1064 if test "$lt_cv_ld_force_load" = "yes"; then 1065 _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\"`' 1066 else 1067 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1068 fi 1069 _LT_TAGVAR(link_all_deplibs, $1)=yes 1070 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1071 case $cc_basename in 1072 ifort*) _lt_dar_can_shared=yes ;; 1073 *) _lt_dar_can_shared=$GCC ;; 1074 esac 1075 if test "$_lt_dar_can_shared" = "yes"; then 1076 output_verbose_link_cmd=func_echo_all 1077 _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}" 1078 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1079 _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}" 1080 _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}" 1081 m4_if([$1], [CXX], 1082[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1083 _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}" 1084 _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}" 1085 fi 1086],[]) 1087 else 1088 _LT_TAGVAR(ld_shlibs, $1)=no 1089 fi 1090]) 1091 1092# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1093# ---------------------------------- 1094# Links a minimal program and checks the executable 1095# for the system default hardcoded library path. In most cases, 1096# this is /usr/lib:/lib, but when the MPI compilers are used 1097# the location of the communication and MPI libs are included too. 1098# If we don't find anything, use the default library path according 1099# to the aix ld manual. 1100# Store the results from the different compilers for each TAGNAME. 1101# Allow to override them for all tags through lt_cv_aix_libpath. 1102m4_defun([_LT_SYS_MODULE_PATH_AIX], 1103[m4_require([_LT_DECL_SED])dnl 1104if test "${lt_cv_aix_libpath+set}" = set; then 1105 aix_libpath=$lt_cv_aix_libpath 1106else 1107 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1108 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1109 lt_aix_libpath_sed='[ 1110 /Import File Strings/,/^$/ { 1111 /^0/ { 1112 s/^0 *\([^ ]*\) *$/\1/ 1113 p 1114 } 1115 }]' 1116 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1117 # Check for a 64-bit object if we didn't find anything. 1118 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1119 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1120 fi],[]) 1121 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1122 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1123 fi 1124 ]) 1125 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1126fi 1127])# _LT_SYS_MODULE_PATH_AIX 1128 1129 1130# _LT_SHELL_INIT(ARG) 1131# ------------------- 1132m4_define([_LT_SHELL_INIT], 1133[m4_divert_text([M4SH-INIT], [$1 1134])])# _LT_SHELL_INIT 1135 1136 1137 1138# _LT_PROG_ECHO_BACKSLASH 1139# ----------------------- 1140# Find how we can fake an echo command that does not interpret backslash. 1141# In particular, with Autoconf 2.60 or later we add some code to the start 1142# of the generated configure script which will find a shell with a builtin 1143# printf (which we can use as an echo command). 1144m4_defun([_LT_PROG_ECHO_BACKSLASH], 1145[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1146ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1147ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1148 1149AC_MSG_CHECKING([how to print strings]) 1150# Test print first, because it will be a builtin if present. 1151if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1152 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1153 ECHO='print -r --' 1154elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1155 ECHO='printf %s\n' 1156else 1157 # Use this function as a fallback that always works. 1158 func_fallback_echo () 1159 { 1160 eval 'cat <<_LTECHO_EOF 1161$[]1 1162_LTECHO_EOF' 1163 } 1164 ECHO='func_fallback_echo' 1165fi 1166 1167# func_echo_all arg... 1168# Invoke $ECHO with all args, space-separated. 1169func_echo_all () 1170{ 1171 $ECHO "$*" 1172} 1173 1174case "$ECHO" in 1175 printf*) AC_MSG_RESULT([printf]) ;; 1176 print*) AC_MSG_RESULT([print -r]) ;; 1177 *) AC_MSG_RESULT([cat]) ;; 1178esac 1179 1180m4_ifdef([_AS_DETECT_SUGGESTED], 1181[_AS_DETECT_SUGGESTED([ 1182 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1183 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1184 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1185 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1186 PATH=/empty FPATH=/empty; export PATH FPATH 1187 test "X`printf %s $ECHO`" = "X$ECHO" \ 1188 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1189 1190_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1191_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1192])# _LT_PROG_ECHO_BACKSLASH 1193 1194 1195# _LT_WITH_SYSROOT 1196# ---------------- 1197AC_DEFUN([_LT_WITH_SYSROOT], 1198[AC_MSG_CHECKING([for sysroot]) 1199AC_ARG_WITH([sysroot], 1200[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1201 (or the compiler's sysroot if not specified).], 1202[], [with_sysroot=no]) 1203 1204dnl lt_sysroot will always be passed unquoted. We quote it here 1205dnl in case the user passed a directory name. 1206lt_sysroot= 1207case ${with_sysroot} in #( 1208 yes) 1209 if test "$GCC" = yes; then 1210 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1211 fi 1212 ;; #( 1213 /*) 1214 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1215 ;; #( 1216 no|'') 1217 ;; #( 1218 *) 1219 AC_MSG_RESULT([${with_sysroot}]) 1220 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1221 ;; 1222esac 1223 1224 AC_MSG_RESULT([${lt_sysroot:-no}]) 1225_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1226[dependent libraries, and in which our libraries should be installed.])]) 1227 1228# _LT_ENABLE_LOCK 1229# --------------- 1230m4_defun([_LT_ENABLE_LOCK], 1231[AC_ARG_ENABLE([libtool-lock], 1232 [AS_HELP_STRING([--disable-libtool-lock], 1233 [avoid locking (might break parallel builds)])]) 1234test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1235 1236# Some flags need to be propagated to the compiler or linker for good 1237# libtool support. 1238case $host in 1239ia64-*-hpux*) 1240 # Find out which ABI we are using. 1241 echo 'int i;' > conftest.$ac_ext 1242 if AC_TRY_EVAL(ac_compile); then 1243 case `/usr/bin/file conftest.$ac_objext` in 1244 *ELF-32*) 1245 HPUX_IA64_MODE="32" 1246 ;; 1247 *ELF-64*) 1248 HPUX_IA64_MODE="64" 1249 ;; 1250 esac 1251 fi 1252 rm -rf conftest* 1253 ;; 1254*-*-irix6*) 1255 # Find out which ABI we are using. 1256 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1257 if AC_TRY_EVAL(ac_compile); then 1258 if test "$lt_cv_prog_gnu_ld" = yes; then 1259 case `/usr/bin/file conftest.$ac_objext` in 1260 *32-bit*) 1261 LD="${LD-ld} -melf32bsmip" 1262 ;; 1263 *N32*) 1264 LD="${LD-ld} -melf32bmipn32" 1265 ;; 1266 *64-bit*) 1267 LD="${LD-ld} -melf64bmip" 1268 ;; 1269 esac 1270 else 1271 case `/usr/bin/file conftest.$ac_objext` in 1272 *32-bit*) 1273 LD="${LD-ld} -32" 1274 ;; 1275 *N32*) 1276 LD="${LD-ld} -n32" 1277 ;; 1278 *64-bit*) 1279 LD="${LD-ld} -64" 1280 ;; 1281 esac 1282 fi 1283 fi 1284 rm -rf conftest* 1285 ;; 1286 1287x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1288s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1289 # Find out which ABI we are using. 1290 echo 'int i;' > conftest.$ac_ext 1291 if AC_TRY_EVAL(ac_compile); then 1292 case `/usr/bin/file conftest.o` in 1293 *32-bit*) 1294 case $host in 1295 x86_64-*kfreebsd*-gnu) 1296 LD="${LD-ld} -m elf_i386_fbsd" 1297 ;; 1298 x86_64-*linux*) 1299 LD="${LD-ld} -m elf_i386" 1300 ;; 1301 ppc64-*linux*|powerpc64-*linux*) 1302 LD="${LD-ld} -m elf32ppclinux" 1303 ;; 1304 s390x-*linux*) 1305 LD="${LD-ld} -m elf_s390" 1306 ;; 1307 sparc64-*linux*) 1308 LD="${LD-ld} -m elf32_sparc" 1309 ;; 1310 esac 1311 ;; 1312 *64-bit*) 1313 case $host in 1314 x86_64-*kfreebsd*-gnu) 1315 LD="${LD-ld} -m elf_x86_64_fbsd" 1316 ;; 1317 x86_64-*linux*) 1318 LD="${LD-ld} -m elf_x86_64" 1319 ;; 1320 ppc*-*linux*|powerpc*-*linux*) 1321 LD="${LD-ld} -m elf64ppc" 1322 ;; 1323 s390*-*linux*|s390*-*tpf*) 1324 LD="${LD-ld} -m elf64_s390" 1325 ;; 1326 sparc*-*linux*) 1327 LD="${LD-ld} -m elf64_sparc" 1328 ;; 1329 esac 1330 ;; 1331 esac 1332 fi 1333 rm -rf conftest* 1334 ;; 1335 1336*-*-sco3.2v5*) 1337 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1338 SAVE_CFLAGS="$CFLAGS" 1339 CFLAGS="$CFLAGS -belf" 1340 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1341 [AC_LANG_PUSH(C) 1342 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1343 AC_LANG_POP]) 1344 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1345 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1346 CFLAGS="$SAVE_CFLAGS" 1347 fi 1348 ;; 1349sparc*-*solaris*) 1350 # Find out which ABI we are using. 1351 echo 'int i;' > conftest.$ac_ext 1352 if AC_TRY_EVAL(ac_compile); then 1353 case `/usr/bin/file conftest.o` in 1354 *64-bit*) 1355 case $lt_cv_prog_gnu_ld in 1356 yes*) LD="${LD-ld} -m elf64_sparc" ;; 1357 *) 1358 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1359 LD="${LD-ld} -64" 1360 fi 1361 ;; 1362 esac 1363 ;; 1364 esac 1365 fi 1366 rm -rf conftest* 1367 ;; 1368esac 1369 1370need_locks="$enable_libtool_lock" 1371])# _LT_ENABLE_LOCK 1372 1373 1374# _LT_PROG_AR 1375# ----------- 1376m4_defun([_LT_PROG_AR], 1377[AC_CHECK_TOOLS(AR, [ar], false) 1378: ${AR=ar} 1379: ${AR_FLAGS=cru} 1380_LT_DECL([], [AR], [1], [The archiver]) 1381_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1382 1383AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1384 [lt_cv_ar_at_file=no 1385 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1386 [echo conftest.$ac_objext > conftest.lst 1387 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1388 AC_TRY_EVAL([lt_ar_try]) 1389 if test "$ac_status" -eq 0; then 1390 # Ensure the archiver fails upon bogus file names. 1391 rm -f conftest.$ac_objext libconftest.a 1392 AC_TRY_EVAL([lt_ar_try]) 1393 if test "$ac_status" -ne 0; then 1394 lt_cv_ar_at_file=@ 1395 fi 1396 fi 1397 rm -f conftest.* libconftest.a 1398 ]) 1399 ]) 1400 1401if test "x$lt_cv_ar_at_file" = xno; then 1402 archiver_list_spec= 1403else 1404 archiver_list_spec=$lt_cv_ar_at_file 1405fi 1406_LT_DECL([], [archiver_list_spec], [1], 1407 [How to feed a file listing to the archiver]) 1408])# _LT_PROG_AR 1409 1410 1411# _LT_CMD_OLD_ARCHIVE 1412# ------------------- 1413m4_defun([_LT_CMD_OLD_ARCHIVE], 1414[_LT_PROG_AR 1415 1416AC_CHECK_TOOL(STRIP, strip, :) 1417test -z "$STRIP" && STRIP=: 1418_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1419 1420AC_CHECK_TOOL(RANLIB, ranlib, :) 1421test -z "$RANLIB" && RANLIB=: 1422_LT_DECL([], [RANLIB], [1], 1423 [Commands used to install an old-style archive]) 1424 1425# Determine commands to create old-style static archives. 1426old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1427old_postinstall_cmds='chmod 644 $oldlib' 1428old_postuninstall_cmds= 1429 1430if test -n "$RANLIB"; then 1431 case $host_os in 1432 openbsd*) 1433 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1434 ;; 1435 *) 1436 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1437 ;; 1438 esac 1439 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1440fi 1441 1442case $host_os in 1443 darwin*) 1444 lock_old_archive_extraction=yes ;; 1445 *) 1446 lock_old_archive_extraction=no ;; 1447esac 1448_LT_DECL([], [old_postinstall_cmds], [2]) 1449_LT_DECL([], [old_postuninstall_cmds], [2]) 1450_LT_TAGDECL([], [old_archive_cmds], [2], 1451 [Commands used to build an old-style archive]) 1452_LT_DECL([], [lock_old_archive_extraction], [0], 1453 [Whether to use a lock for old archive extraction]) 1454])# _LT_CMD_OLD_ARCHIVE 1455 1456 1457# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1458# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1459# ---------------------------------------------------------------- 1460# Check whether the given compiler option works 1461AC_DEFUN([_LT_COMPILER_OPTION], 1462[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1463m4_require([_LT_DECL_SED])dnl 1464AC_CACHE_CHECK([$1], [$2], 1465 [$2=no 1466 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1467 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1468 lt_compiler_flag="$3" 1469 # Insert the option either (1) after the last *FLAGS variable, or 1470 # (2) before a word containing "conftest.", or (3) at the end. 1471 # Note that $ac_compile itself does not contain backslashes and begins 1472 # with a dollar sign (not a hyphen), so the echo should work correctly. 1473 # The option is referenced via a variable to avoid confusing sed. 1474 lt_compile=`echo "$ac_compile" | $SED \ 1475 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1476 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1477 -e 's:$: $lt_compiler_flag:'` 1478 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1479 (eval "$lt_compile" 2>conftest.err) 1480 ac_status=$? 1481 cat conftest.err >&AS_MESSAGE_LOG_FD 1482 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1483 if (exit $ac_status) && test -s "$ac_outfile"; then 1484 # The compiler can only warn and ignore the option if not recognized 1485 # So say no if there are warnings other than the usual output. 1486 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1487 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1488 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1489 $2=yes 1490 fi 1491 fi 1492 $RM conftest* 1493]) 1494 1495if test x"[$]$2" = xyes; then 1496 m4_if([$5], , :, [$5]) 1497else 1498 m4_if([$6], , :, [$6]) 1499fi 1500])# _LT_COMPILER_OPTION 1501 1502# Old name: 1503AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1504dnl aclocal-1.4 backwards compatibility: 1505dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1506 1507 1508# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1509# [ACTION-SUCCESS], [ACTION-FAILURE]) 1510# ---------------------------------------------------- 1511# Check whether the given linker option works 1512AC_DEFUN([_LT_LINKER_OPTION], 1513[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1514m4_require([_LT_DECL_SED])dnl 1515AC_CACHE_CHECK([$1], [$2], 1516 [$2=no 1517 save_LDFLAGS="$LDFLAGS" 1518 LDFLAGS="$LDFLAGS $3" 1519 echo "$lt_simple_link_test_code" > conftest.$ac_ext 1520 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1521 # The linker can only warn and ignore the option if not recognized 1522 # So say no if there are warnings 1523 if test -s conftest.err; then 1524 # Append any errors to the config.log. 1525 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1526 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1527 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1528 if diff conftest.exp conftest.er2 >/dev/null; then 1529 $2=yes 1530 fi 1531 else 1532 $2=yes 1533 fi 1534 fi 1535 $RM -r conftest* 1536 LDFLAGS="$save_LDFLAGS" 1537]) 1538 1539if test x"[$]$2" = xyes; then 1540 m4_if([$4], , :, [$4]) 1541else 1542 m4_if([$5], , :, [$5]) 1543fi 1544])# _LT_LINKER_OPTION 1545 1546# Old name: 1547AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1548dnl aclocal-1.4 backwards compatibility: 1549dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1550 1551 1552# LT_CMD_MAX_LEN 1553#--------------- 1554AC_DEFUN([LT_CMD_MAX_LEN], 1555[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1556# find the maximum length of command line arguments 1557AC_MSG_CHECKING([the maximum length of command line arguments]) 1558AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1559 i=0 1560 teststring="ABCD" 1561 1562 case $build_os in 1563 msdosdjgpp*) 1564 # On DJGPP, this test can blow up pretty badly due to problems in libc 1565 # (any single argument exceeding 2000 bytes causes a buffer overrun 1566 # during glob expansion). Even if it were fixed, the result of this 1567 # check would be larger than it should be. 1568 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1569 ;; 1570 1571 gnu*) 1572 # Under GNU Hurd, this test is not required because there is 1573 # no limit to the length of command line arguments. 1574 # Libtool will interpret -1 as no limit whatsoever 1575 lt_cv_sys_max_cmd_len=-1; 1576 ;; 1577 1578 cygwin* | mingw* | cegcc*) 1579 # On Win9x/ME, this test blows up -- it succeeds, but takes 1580 # about 5 minutes as the teststring grows exponentially. 1581 # Worse, since 9x/ME are not pre-emptively multitasking, 1582 # you end up with a "frozen" computer, even though with patience 1583 # the test eventually succeeds (with a max line length of 256k). 1584 # Instead, let's just punt: use the minimum linelength reported by 1585 # all of the supported platforms: 8192 (on NT/2K/XP). 1586 lt_cv_sys_max_cmd_len=8192; 1587 ;; 1588 1589 mint*) 1590 # On MiNT this can take a long time and run out of memory. 1591 lt_cv_sys_max_cmd_len=8192; 1592 ;; 1593 1594 amigaos*) 1595 # On AmigaOS with pdksh, this test takes hours, literally. 1596 # So we just punt and use a minimum line length of 8192. 1597 lt_cv_sys_max_cmd_len=8192; 1598 ;; 1599 1600 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1601 # This has been around since 386BSD, at least. Likely further. 1602 if test -x /sbin/sysctl; then 1603 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1604 elif test -x /usr/sbin/sysctl; then 1605 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1606 else 1607 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1608 fi 1609 # And add a safety zone 1610 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1611 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1612 ;; 1613 1614 interix*) 1615 # We know the value 262144 and hardcode it with a safety zone (like BSD) 1616 lt_cv_sys_max_cmd_len=196608 1617 ;; 1618 1619 osf*) 1620 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1621 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1622 # nice to cause kernel panics so lets avoid the loop below. 1623 # First set a reasonable default. 1624 lt_cv_sys_max_cmd_len=16384 1625 # 1626 if test -x /sbin/sysconfig; then 1627 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1628 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1629 esac 1630 fi 1631 ;; 1632 sco3.2v5*) 1633 lt_cv_sys_max_cmd_len=102400 1634 ;; 1635 sysv5* | sco5v6* | sysv4.2uw2*) 1636 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1637 if test -n "$kargmax"; then 1638 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1639 else 1640 lt_cv_sys_max_cmd_len=32768 1641 fi 1642 ;; 1643 *) 1644 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1645 if test -n "$lt_cv_sys_max_cmd_len"; then 1646 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1647 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1648 else 1649 # Make teststring a little bigger before we do anything with it. 1650 # a 1K string should be a reasonable start. 1651 for i in 1 2 3 4 5 6 7 8 ; do 1652 teststring=$teststring$teststring 1653 done 1654 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1655 # If test is not a shell built-in, we'll probably end up computing a 1656 # maximum length that is only half of the actual maximum length, but 1657 # we can't tell. 1658 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1659 = "X$teststring$teststring"; } >/dev/null 2>&1 && 1660 test $i != 17 # 1/2 MB should be enough 1661 do 1662 i=`expr $i + 1` 1663 teststring=$teststring$teststring 1664 done 1665 # Only check the string length outside the loop. 1666 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1667 teststring= 1668 # Add a significant safety factor because C++ compilers can tack on 1669 # massive amounts of additional arguments before passing them to the 1670 # linker. It appears as though 1/2 is a usable value. 1671 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1672 fi 1673 ;; 1674 esac 1675]) 1676if test -n $lt_cv_sys_max_cmd_len ; then 1677 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1678else 1679 AC_MSG_RESULT(none) 1680fi 1681max_cmd_len=$lt_cv_sys_max_cmd_len 1682_LT_DECL([], [max_cmd_len], [0], 1683 [What is the maximum length of a command?]) 1684])# LT_CMD_MAX_LEN 1685 1686# Old name: 1687AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1688dnl aclocal-1.4 backwards compatibility: 1689dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1690 1691 1692# _LT_HEADER_DLFCN 1693# ---------------- 1694m4_defun([_LT_HEADER_DLFCN], 1695[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1696])# _LT_HEADER_DLFCN 1697 1698 1699# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1700# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1701# ---------------------------------------------------------------- 1702m4_defun([_LT_TRY_DLOPEN_SELF], 1703[m4_require([_LT_HEADER_DLFCN])dnl 1704if test "$cross_compiling" = yes; then : 1705 [$4] 1706else 1707 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1708 lt_status=$lt_dlunknown 1709 cat > conftest.$ac_ext <<_LT_EOF 1710[#line $LINENO "configure" 1711#include "confdefs.h" 1712 1713#if HAVE_DLFCN_H 1714#include <dlfcn.h> 1715#endif 1716 1717#include <stdio.h> 1718 1719#ifdef RTLD_GLOBAL 1720# define LT_DLGLOBAL RTLD_GLOBAL 1721#else 1722# ifdef DL_GLOBAL 1723# define LT_DLGLOBAL DL_GLOBAL 1724# else 1725# define LT_DLGLOBAL 0 1726# endif 1727#endif 1728 1729/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1730 find out it does not work in some platform. */ 1731#ifndef LT_DLLAZY_OR_NOW 1732# ifdef RTLD_LAZY 1733# define LT_DLLAZY_OR_NOW RTLD_LAZY 1734# else 1735# ifdef DL_LAZY 1736# define LT_DLLAZY_OR_NOW DL_LAZY 1737# else 1738# ifdef RTLD_NOW 1739# define LT_DLLAZY_OR_NOW RTLD_NOW 1740# else 1741# ifdef DL_NOW 1742# define LT_DLLAZY_OR_NOW DL_NOW 1743# else 1744# define LT_DLLAZY_OR_NOW 0 1745# endif 1746# endif 1747# endif 1748# endif 1749#endif 1750 1751/* When -fvisbility=hidden is used, assume the code has been annotated 1752 correspondingly for the symbols needed. */ 1753#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1754int fnord () __attribute__((visibility("default"))); 1755#endif 1756 1757int fnord () { return 42; } 1758int main () 1759{ 1760 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1761 int status = $lt_dlunknown; 1762 1763 if (self) 1764 { 1765 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1766 else 1767 { 1768 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1769 else puts (dlerror ()); 1770 } 1771 /* dlclose (self); */ 1772 } 1773 else 1774 puts (dlerror ()); 1775 1776 return status; 1777}] 1778_LT_EOF 1779 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1780 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1781 lt_status=$? 1782 case x$lt_status in 1783 x$lt_dlno_uscore) $1 ;; 1784 x$lt_dlneed_uscore) $2 ;; 1785 x$lt_dlunknown|x*) $3 ;; 1786 esac 1787 else : 1788 # compilation failed 1789 $3 1790 fi 1791fi 1792rm -fr conftest* 1793])# _LT_TRY_DLOPEN_SELF 1794 1795 1796# LT_SYS_DLOPEN_SELF 1797# ------------------ 1798AC_DEFUN([LT_SYS_DLOPEN_SELF], 1799[m4_require([_LT_HEADER_DLFCN])dnl 1800if test "x$enable_dlopen" != xyes; then 1801 enable_dlopen=unknown 1802 enable_dlopen_self=unknown 1803 enable_dlopen_self_static=unknown 1804else 1805 lt_cv_dlopen=no 1806 lt_cv_dlopen_libs= 1807 1808 case $host_os in 1809 beos*) 1810 lt_cv_dlopen="load_add_on" 1811 lt_cv_dlopen_libs= 1812 lt_cv_dlopen_self=yes 1813 ;; 1814 1815 mingw* | pw32* | cegcc*) 1816 lt_cv_dlopen="LoadLibrary" 1817 lt_cv_dlopen_libs= 1818 ;; 1819 1820 cygwin*) 1821 lt_cv_dlopen="dlopen" 1822 lt_cv_dlopen_libs= 1823 ;; 1824 1825 darwin*) 1826 # if libdl is installed we need to link against it 1827 AC_CHECK_LIB([dl], [dlopen], 1828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1829 lt_cv_dlopen="dyld" 1830 lt_cv_dlopen_libs= 1831 lt_cv_dlopen_self=yes 1832 ]) 1833 ;; 1834 1835 *) 1836 AC_CHECK_FUNC([shl_load], 1837 [lt_cv_dlopen="shl_load"], 1838 [AC_CHECK_LIB([dld], [shl_load], 1839 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1840 [AC_CHECK_FUNC([dlopen], 1841 [lt_cv_dlopen="dlopen"], 1842 [AC_CHECK_LIB([dl], [dlopen], 1843 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1844 [AC_CHECK_LIB([svld], [dlopen], 1845 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1846 [AC_CHECK_LIB([dld], [dld_link], 1847 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1848 ]) 1849 ]) 1850 ]) 1851 ]) 1852 ]) 1853 ;; 1854 esac 1855 1856 if test "x$lt_cv_dlopen" != xno; then 1857 enable_dlopen=yes 1858 else 1859 enable_dlopen=no 1860 fi 1861 1862 case $lt_cv_dlopen in 1863 dlopen) 1864 save_CPPFLAGS="$CPPFLAGS" 1865 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1866 1867 save_LDFLAGS="$LDFLAGS" 1868 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1869 1870 save_LIBS="$LIBS" 1871 LIBS="$lt_cv_dlopen_libs $LIBS" 1872 1873 AC_CACHE_CHECK([whether a program can dlopen itself], 1874 lt_cv_dlopen_self, [dnl 1875 _LT_TRY_DLOPEN_SELF( 1876 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1877 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1878 ]) 1879 1880 if test "x$lt_cv_dlopen_self" = xyes; then 1881 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1882 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1883 lt_cv_dlopen_self_static, [dnl 1884 _LT_TRY_DLOPEN_SELF( 1885 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1886 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1887 ]) 1888 fi 1889 1890 CPPFLAGS="$save_CPPFLAGS" 1891 LDFLAGS="$save_LDFLAGS" 1892 LIBS="$save_LIBS" 1893 ;; 1894 esac 1895 1896 case $lt_cv_dlopen_self in 1897 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1898 *) enable_dlopen_self=unknown ;; 1899 esac 1900 1901 case $lt_cv_dlopen_self_static in 1902 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1903 *) enable_dlopen_self_static=unknown ;; 1904 esac 1905fi 1906_LT_DECL([dlopen_support], [enable_dlopen], [0], 1907 [Whether dlopen is supported]) 1908_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1909 [Whether dlopen of programs is supported]) 1910_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1911 [Whether dlopen of statically linked programs is supported]) 1912])# LT_SYS_DLOPEN_SELF 1913 1914# Old name: 1915AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1916dnl aclocal-1.4 backwards compatibility: 1917dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1918 1919 1920# _LT_COMPILER_C_O([TAGNAME]) 1921# --------------------------- 1922# Check to see if options -c and -o are simultaneously supported by compiler. 1923# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1924m4_defun([_LT_COMPILER_C_O], 1925[m4_require([_LT_DECL_SED])dnl 1926m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1927m4_require([_LT_TAG_COMPILER])dnl 1928AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1929 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1930 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1931 $RM -r conftest 2>/dev/null 1932 mkdir conftest 1933 cd conftest 1934 mkdir out 1935 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1936 1937 lt_compiler_flag="-o out/conftest2.$ac_objext" 1938 # Insert the option either (1) after the last *FLAGS variable, or 1939 # (2) before a word containing "conftest.", or (3) at the end. 1940 # Note that $ac_compile itself does not contain backslashes and begins 1941 # with a dollar sign (not a hyphen), so the echo should work correctly. 1942 lt_compile=`echo "$ac_compile" | $SED \ 1943 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1944 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1945 -e 's:$: $lt_compiler_flag:'` 1946 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1947 (eval "$lt_compile" 2>out/conftest.err) 1948 ac_status=$? 1949 cat out/conftest.err >&AS_MESSAGE_LOG_FD 1950 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1951 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1952 then 1953 # The compiler can only warn and ignore the option if not recognized 1954 # So say no if there are warnings 1955 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1956 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1957 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1958 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1959 fi 1960 fi 1961 chmod u+w . 2>&AS_MESSAGE_LOG_FD 1962 $RM conftest* 1963 # SGI C++ compiler will create directory out/ii_files/ for 1964 # template instantiation 1965 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1966 $RM out/* && rmdir out 1967 cd .. 1968 $RM -r conftest 1969 $RM conftest* 1970]) 1971_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1972 [Does compiler simultaneously support -c and -o options?]) 1973])# _LT_COMPILER_C_O 1974 1975 1976# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1977# ---------------------------------- 1978# Check to see if we can do hard links to lock some files if needed 1979m4_defun([_LT_COMPILER_FILE_LOCKS], 1980[m4_require([_LT_ENABLE_LOCK])dnl 1981m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1982_LT_COMPILER_C_O([$1]) 1983 1984hard_links="nottested" 1985if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1986 # do not overwrite the value of need_locks provided by the user 1987 AC_MSG_CHECKING([if we can lock with hard links]) 1988 hard_links=yes 1989 $RM conftest* 1990 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1991 touch conftest.a 1992 ln conftest.a conftest.b 2>&5 || hard_links=no 1993 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1994 AC_MSG_RESULT([$hard_links]) 1995 if test "$hard_links" = no; then 1996 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1997 need_locks=warn 1998 fi 1999else 2000 need_locks=no 2001fi 2002_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2003])# _LT_COMPILER_FILE_LOCKS 2004 2005 2006# _LT_CHECK_OBJDIR 2007# ---------------- 2008m4_defun([_LT_CHECK_OBJDIR], 2009[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2010[rm -f .libs 2>/dev/null 2011mkdir .libs 2>/dev/null 2012if test -d .libs; then 2013 lt_cv_objdir=.libs 2014else 2015 # MS-DOS does not allow filenames that begin with a dot. 2016 lt_cv_objdir=_libs 2017fi 2018rmdir .libs 2>/dev/null]) 2019objdir=$lt_cv_objdir 2020_LT_DECL([], [objdir], [0], 2021 [The name of the directory that contains temporary libtool files])dnl 2022m4_pattern_allow([LT_OBJDIR])dnl 2023AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2024 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2025])# _LT_CHECK_OBJDIR 2026 2027 2028# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2029# -------------------------------------- 2030# Check hardcoding attributes. 2031m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2032[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2033_LT_TAGVAR(hardcode_action, $1)= 2034if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2035 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2036 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2037 2038 # We can hardcode non-existent directories. 2039 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2040 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2041 # have to relink, otherwise we might link with an installed library 2042 # when we should be linking with a yet-to-be-installed one 2043 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2044 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2045 # Linking always hardcodes the temporary library directory. 2046 _LT_TAGVAR(hardcode_action, $1)=relink 2047 else 2048 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2049 _LT_TAGVAR(hardcode_action, $1)=immediate 2050 fi 2051else 2052 # We cannot hardcode anything, or else we can only hardcode existing 2053 # directories. 2054 _LT_TAGVAR(hardcode_action, $1)=unsupported 2055fi 2056AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2057 2058if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2059 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2060 # Fast installation is not supported 2061 enable_fast_install=no 2062elif test "$shlibpath_overrides_runpath" = yes || 2063 test "$enable_shared" = no; then 2064 # Fast installation is not necessary 2065 enable_fast_install=needless 2066fi 2067_LT_TAGDECL([], [hardcode_action], [0], 2068 [How to hardcode a shared library path into an executable]) 2069])# _LT_LINKER_HARDCODE_LIBPATH 2070 2071 2072# _LT_CMD_STRIPLIB 2073# ---------------- 2074m4_defun([_LT_CMD_STRIPLIB], 2075[m4_require([_LT_DECL_EGREP]) 2076striplib= 2077old_striplib= 2078AC_MSG_CHECKING([whether stripping libraries is possible]) 2079if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2080 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2081 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2082 AC_MSG_RESULT([yes]) 2083else 2084# FIXME - insert some real tests, host_os isn't really good enough 2085 case $host_os in 2086 darwin*) 2087 if test -n "$STRIP" ; then 2088 striplib="$STRIP -x" 2089 old_striplib="$STRIP -S" 2090 AC_MSG_RESULT([yes]) 2091 else 2092 AC_MSG_RESULT([no]) 2093 fi 2094 ;; 2095 *) 2096 AC_MSG_RESULT([no]) 2097 ;; 2098 esac 2099fi 2100_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2101_LT_DECL([], [striplib], [1]) 2102])# _LT_CMD_STRIPLIB 2103 2104 2105# _LT_SYS_DYNAMIC_LINKER([TAG]) 2106# ----------------------------- 2107# PORTME Fill in your ld.so characteristics 2108m4_defun([_LT_SYS_DYNAMIC_LINKER], 2109[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2110m4_require([_LT_DECL_EGREP])dnl 2111m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2112m4_require([_LT_DECL_OBJDUMP])dnl 2113m4_require([_LT_DECL_SED])dnl 2114m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2115AC_MSG_CHECKING([dynamic linker characteristics]) 2116m4_if([$1], 2117 [], [ 2118if test "$GCC" = yes; then 2119 case $host_os in 2120 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2121 *) lt_awk_arg="/^libraries:/" ;; 2122 esac 2123 case $host_os in 2124 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2125 *) lt_sed_strip_eq="s,=/,/,g" ;; 2126 esac 2127 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2128 case $lt_search_path_spec in 2129 *\;*) 2130 # if the path contains ";" then we assume it to be the separator 2131 # otherwise default to the standard path separator (i.e. ":") - it is 2132 # assumed that no part of a normal pathname contains ";" but that should 2133 # okay in the real world where ";" in dirpaths is itself problematic. 2134 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2135 ;; 2136 *) 2137 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2138 ;; 2139 esac 2140 # Ok, now we have the path, separated by spaces, we can step through it 2141 # and add multilib dir if necessary. 2142 lt_tmp_lt_search_path_spec= 2143 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2144 for lt_sys_path in $lt_search_path_spec; do 2145 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2146 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2147 else 2148 test -d "$lt_sys_path" && \ 2149 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2150 fi 2151 done 2152 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2153BEGIN {RS=" "; FS="/|\n";} { 2154 lt_foo=""; 2155 lt_count=0; 2156 for (lt_i = NF; lt_i > 0; lt_i--) { 2157 if ($lt_i != "" && $lt_i != ".") { 2158 if ($lt_i == "..") { 2159 lt_count++; 2160 } else { 2161 if (lt_count == 0) { 2162 lt_foo="/" $lt_i lt_foo; 2163 } else { 2164 lt_count--; 2165 } 2166 } 2167 } 2168 } 2169 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2170 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2171}'` 2172 # AWK program above erroneously prepends '/' to C:/dos/paths 2173 # for these hosts. 2174 case $host_os in 2175 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2176 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2177 esac 2178 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2179else 2180 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2181fi]) 2182library_names_spec= 2183libname_spec='lib$name' 2184soname_spec= 2185shrext_cmds=".so" 2186postinstall_cmds= 2187postuninstall_cmds= 2188finish_cmds= 2189finish_eval= 2190shlibpath_var= 2191shlibpath_overrides_runpath=unknown 2192version_type=none 2193dynamic_linker="$host_os ld.so" 2194sys_lib_dlsearch_path_spec="/lib /usr/lib" 2195need_lib_prefix=unknown 2196hardcode_into_libs=no 2197 2198# when you set need_version to no, make sure it does not cause -set_version 2199# flags to be left without arguments 2200need_version=unknown 2201 2202case $host_os in 2203aix3*) 2204 version_type=linux 2205 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2206 shlibpath_var=LIBPATH 2207 2208 # AIX 3 has no versioning support, so we append a major version to the name. 2209 soname_spec='${libname}${release}${shared_ext}$major' 2210 ;; 2211 2212aix[[4-9]]*) 2213 version_type=linux 2214 need_lib_prefix=no 2215 need_version=no 2216 hardcode_into_libs=yes 2217 if test "$host_cpu" = ia64; then 2218 # AIX 5 supports IA64 2219 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2220 shlibpath_var=LD_LIBRARY_PATH 2221 else 2222 # With GCC up to 2.95.x, collect2 would create an import file 2223 # for dependence libraries. The import file would start with 2224 # the line `#! .'. This would cause the generated library to 2225 # depend on `.', always an invalid library. This was fixed in 2226 # development snapshots of GCC prior to 3.0. 2227 case $host_os in 2228 aix4 | aix4.[[01]] | aix4.[[01]].*) 2229 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2230 echo ' yes ' 2231 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2232 : 2233 else 2234 can_build_shared=no 2235 fi 2236 ;; 2237 esac 2238 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2239 # soname into executable. Probably we can add versioning support to 2240 # collect2, so additional links can be useful in future. 2241 if test "$aix_use_runtimelinking" = yes; then 2242 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2243 # instead of lib<name>.a to let people know that these are not 2244 # typical AIX shared libraries. 2245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2246 else 2247 # We preserve .a as extension for shared libraries through AIX4.2 2248 # and later when we are not doing run time linking. 2249 library_names_spec='${libname}${release}.a $libname.a' 2250 soname_spec='${libname}${release}${shared_ext}$major' 2251 fi 2252 shlibpath_var=LIBPATH 2253 fi 2254 ;; 2255 2256amigaos*) 2257 case $host_cpu in 2258 powerpc) 2259 # Since July 2007 AmigaOS4 officially supports .so libraries. 2260 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2261 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2262 ;; 2263 m68k) 2264 library_names_spec='$libname.ixlibrary $libname.a' 2265 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2266 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 2267 ;; 2268 esac 2269 ;; 2270 2271beos*) 2272 library_names_spec='${libname}${shared_ext}' 2273 dynamic_linker="$host_os ld.so" 2274 shlibpath_var=LIBRARY_PATH 2275 ;; 2276 2277bsdi[[45]]*) 2278 version_type=linux 2279 need_version=no 2280 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2281 soname_spec='${libname}${release}${shared_ext}$major' 2282 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2283 shlibpath_var=LD_LIBRARY_PATH 2284 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2285 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2286 # the default ld.so.conf also contains /usr/contrib/lib and 2287 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2288 # libtool to hard-code these into programs 2289 ;; 2290 2291cygwin* | mingw* | pw32* | cegcc*) 2292 version_type=windows 2293 shrext_cmds=".dll" 2294 need_version=no 2295 need_lib_prefix=no 2296 2297 case $GCC,$cc_basename in 2298 yes,*) 2299 # gcc 2300 library_names_spec='$libname.dll.a' 2301 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2302 postinstall_cmds='base_file=`basename \${file}`~ 2303 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2304 dldir=$destdir/`dirname \$dlpath`~ 2305 test -d \$dldir || mkdir -p \$dldir~ 2306 $install_prog $dir/$dlname \$dldir/$dlname~ 2307 chmod a+x \$dldir/$dlname~ 2308 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2309 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2310 fi' 2311 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2312 dlpath=$dir/\$dldll~ 2313 $RM \$dlpath' 2314 shlibpath_overrides_runpath=yes 2315 2316 case $host_os in 2317 cygwin*) 2318 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2319 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2320m4_if([$1], [],[ 2321 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2322 ;; 2323 mingw* | cegcc*) 2324 # MinGW DLLs use traditional 'lib' prefix 2325 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2326 ;; 2327 pw32*) 2328 # pw32 DLLs use 'pw' prefix rather than 'lib' 2329 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2330 ;; 2331 esac 2332 dynamic_linker='Win32 ld.exe' 2333 ;; 2334 2335 *,cl*) 2336 # Native MSVC 2337 libname_spec='$name' 2338 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2339 library_names_spec='${libname}.dll.lib' 2340 2341 case $build_os in 2342 mingw*) 2343 sys_lib_search_path_spec= 2344 lt_save_ifs=$IFS 2345 IFS=';' 2346 for lt_path in $LIB 2347 do 2348 IFS=$lt_save_ifs 2349 # Let DOS variable expansion print the short 8.3 style file name. 2350 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2351 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2352 done 2353 IFS=$lt_save_ifs 2354 # Convert to MSYS style. 2355 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2356 ;; 2357 cygwin*) 2358 # Convert to unix form, then to dos form, then back to unix form 2359 # but this time dos style (no spaces!) so that the unix form looks 2360 # like /cygdrive/c/PROGRA~1:/cygdr... 2361 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2362 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2363 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2364 ;; 2365 *) 2366 sys_lib_search_path_spec="$LIB" 2367 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2368 # It is most probably a Windows format PATH. 2369 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2370 else 2371 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2372 fi 2373 # FIXME: find the short name or the path components, as spaces are 2374 # common. (e.g. "Program Files" -> "PROGRA~1") 2375 ;; 2376 esac 2377 2378 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2379 postinstall_cmds='base_file=`basename \${file}`~ 2380 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2381 dldir=$destdir/`dirname \$dlpath`~ 2382 test -d \$dldir || mkdir -p \$dldir~ 2383 $install_prog $dir/$dlname \$dldir/$dlname' 2384 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2385 dlpath=$dir/\$dldll~ 2386 $RM \$dlpath' 2387 shlibpath_overrides_runpath=yes 2388 dynamic_linker='Win32 link.exe' 2389 ;; 2390 2391 *) 2392 # Assume MSVC wrapper 2393 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2394 dynamic_linker='Win32 ld.exe' 2395 ;; 2396 esac 2397 # FIXME: first we should search . and the directory the executable is in 2398 shlibpath_var=PATH 2399 ;; 2400 2401darwin* | rhapsody*) 2402 dynamic_linker="$host_os dyld" 2403 version_type=darwin 2404 need_lib_prefix=no 2405 need_version=no 2406 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2407 soname_spec='${libname}${release}${major}$shared_ext' 2408 shlibpath_overrides_runpath=yes 2409 shlibpath_var=DYLD_LIBRARY_PATH 2410 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2411m4_if([$1], [],[ 2412 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2413 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2414 ;; 2415 2416dgux*) 2417 version_type=linux 2418 need_lib_prefix=no 2419 need_version=no 2420 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2421 soname_spec='${libname}${release}${shared_ext}$major' 2422 shlibpath_var=LD_LIBRARY_PATH 2423 ;; 2424 2425freebsd1*) 2426 dynamic_linker=no 2427 ;; 2428 2429freebsd* | dragonfly*) 2430 # DragonFly does not have aout. When/if they implement a new 2431 # versioning mechanism, adjust this. 2432 if test -x /usr/bin/objformat; then 2433 objformat=`/usr/bin/objformat` 2434 else 2435 case $host_os in 2436 freebsd[[123]]*) objformat=aout ;; 2437 *) objformat=elf ;; 2438 esac 2439 fi 2440 # Handle Gentoo/FreeBSD as it was Linux 2441 case $host_vendor in 2442 gentoo) 2443 version_type=linux ;; 2444 *) 2445 version_type=freebsd-$objformat ;; 2446 esac 2447 2448 case $version_type in 2449 freebsd-elf*) 2450 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2451 need_version=no 2452 need_lib_prefix=no 2453 ;; 2454 freebsd-*) 2455 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2456 need_version=yes 2457 ;; 2458 linux) 2459 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2460 soname_spec='${libname}${release}${shared_ext}$major' 2461 need_lib_prefix=no 2462 need_version=no 2463 ;; 2464 esac 2465 shlibpath_var=LD_LIBRARY_PATH 2466 case $host_os in 2467 freebsd2*) 2468 shlibpath_overrides_runpath=yes 2469 ;; 2470 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2471 shlibpath_overrides_runpath=yes 2472 hardcode_into_libs=yes 2473 ;; 2474 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2475 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2476 shlibpath_overrides_runpath=no 2477 hardcode_into_libs=yes 2478 ;; 2479 *) # from 4.6 on, and DragonFly 2480 shlibpath_overrides_runpath=yes 2481 hardcode_into_libs=yes 2482 ;; 2483 esac 2484 ;; 2485 2486gnu*) 2487 version_type=linux 2488 need_lib_prefix=no 2489 need_version=no 2490 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2491 soname_spec='${libname}${release}${shared_ext}$major' 2492 shlibpath_var=LD_LIBRARY_PATH 2493 hardcode_into_libs=yes 2494 ;; 2495 2496haiku*) 2497 version_type=linux 2498 need_lib_prefix=no 2499 need_version=no 2500 dynamic_linker="$host_os runtime_loader" 2501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2502 soname_spec='${libname}${release}${shared_ext}$major' 2503 shlibpath_var=LIBRARY_PATH 2504 shlibpath_overrides_runpath=yes 2505 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2506 hardcode_into_libs=yes 2507 ;; 2508 2509hpux9* | hpux10* | hpux11*) 2510 # Give a soname corresponding to the major version so that dld.sl refuses to 2511 # link against other versions. 2512 version_type=sunos 2513 need_lib_prefix=no 2514 need_version=no 2515 case $host_cpu in 2516 ia64*) 2517 shrext_cmds='.so' 2518 hardcode_into_libs=yes 2519 dynamic_linker="$host_os dld.so" 2520 shlibpath_var=LD_LIBRARY_PATH 2521 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2522 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2523 soname_spec='${libname}${release}${shared_ext}$major' 2524 if test "X$HPUX_IA64_MODE" = X32; then 2525 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2526 else 2527 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2528 fi 2529 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2530 ;; 2531 hppa*64*) 2532 shrext_cmds='.sl' 2533 hardcode_into_libs=yes 2534 dynamic_linker="$host_os dld.sl" 2535 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2536 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2537 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2538 soname_spec='${libname}${release}${shared_ext}$major' 2539 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2540 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2541 ;; 2542 *) 2543 shrext_cmds='.sl' 2544 dynamic_linker="$host_os dld.sl" 2545 shlibpath_var=SHLIB_PATH 2546 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2548 soname_spec='${libname}${release}${shared_ext}$major' 2549 ;; 2550 esac 2551 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2552 postinstall_cmds='chmod 555 $lib' 2553 # or fails outright, so override atomically: 2554 install_override_mode=555 2555 ;; 2556 2557interix[[3-9]]*) 2558 version_type=linux 2559 need_lib_prefix=no 2560 need_version=no 2561 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2562 soname_spec='${libname}${release}${shared_ext}$major' 2563 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2564 shlibpath_var=LD_LIBRARY_PATH 2565 shlibpath_overrides_runpath=no 2566 hardcode_into_libs=yes 2567 ;; 2568 2569irix5* | irix6* | nonstopux*) 2570 case $host_os in 2571 nonstopux*) version_type=nonstopux ;; 2572 *) 2573 if test "$lt_cv_prog_gnu_ld" = yes; then 2574 version_type=linux 2575 else 2576 version_type=irix 2577 fi ;; 2578 esac 2579 need_lib_prefix=no 2580 need_version=no 2581 soname_spec='${libname}${release}${shared_ext}$major' 2582 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2583 case $host_os in 2584 irix5* | nonstopux*) 2585 libsuff= shlibsuff= 2586 ;; 2587 *) 2588 case $LD in # libtool.m4 will add one of these switches to LD 2589 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2590 libsuff= shlibsuff= libmagic=32-bit;; 2591 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2592 libsuff=32 shlibsuff=N32 libmagic=N32;; 2593 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2594 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2595 *) libsuff= shlibsuff= libmagic=never-match;; 2596 esac 2597 ;; 2598 esac 2599 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2600 shlibpath_overrides_runpath=no 2601 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2602 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2603 hardcode_into_libs=yes 2604 ;; 2605 2606# No shared lib support for Linux oldld, aout, or coff. 2607linux*oldld* | linux*aout* | linux*coff*) 2608 dynamic_linker=no 2609 ;; 2610 2611# This must be Linux ELF. 2612linux* | k*bsd*-gnu | kopensolaris*-gnu) 2613 version_type=linux 2614 need_lib_prefix=no 2615 need_version=no 2616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2617 soname_spec='${libname}${release}${shared_ext}$major' 2618 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2619 shlibpath_var=LD_LIBRARY_PATH 2620 shlibpath_overrides_runpath=no 2621 2622 # Some binutils ld are patched to set DT_RUNPATH 2623 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2624 [lt_cv_shlibpath_overrides_runpath=no 2625 save_LDFLAGS=$LDFLAGS 2626 save_libdir=$libdir 2627 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2628 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2629 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2630 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2631 [lt_cv_shlibpath_overrides_runpath=yes])]) 2632 LDFLAGS=$save_LDFLAGS 2633 libdir=$save_libdir 2634 ]) 2635 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2636 2637 # This implies no fast_install, which is unacceptable. 2638 # Some rework will be needed to allow for fast_install 2639 # before this can be enabled. 2640 hardcode_into_libs=yes 2641 2642 # Append ld.so.conf contents to the search path 2643 if test -f /etc/ld.so.conf; then 2644 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' ' '` 2645 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2646 fi 2647 2648 # We used to test for /lib/ld.so.1 and disable shared libraries on 2649 # powerpc, because MkLinux only supported shared libraries with the 2650 # GNU dynamic linker. Since this was broken with cross compilers, 2651 # most powerpc-linux boxes support dynamic linking these days and 2652 # people can always --disable-shared, the test was removed, and we 2653 # assume the GNU/Linux dynamic linker is in use. 2654 dynamic_linker='GNU/Linux ld.so' 2655 ;; 2656 2657netbsd*) 2658 version_type=sunos 2659 need_lib_prefix=no 2660 need_version=no 2661 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2663 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2664 dynamic_linker='NetBSD (a.out) ld.so' 2665 else 2666 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2667 soname_spec='${libname}${release}${shared_ext}$major' 2668 dynamic_linker='NetBSD ld.elf_so' 2669 fi 2670 shlibpath_var=LD_LIBRARY_PATH 2671 shlibpath_overrides_runpath=yes 2672 hardcode_into_libs=yes 2673 ;; 2674 2675newsos6) 2676 version_type=linux 2677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678 shlibpath_var=LD_LIBRARY_PATH 2679 shlibpath_overrides_runpath=yes 2680 ;; 2681 2682*nto* | *qnx*) 2683 version_type=qnx 2684 need_lib_prefix=no 2685 need_version=no 2686 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2687 soname_spec='${libname}${release}${shared_ext}$major' 2688 shlibpath_var=LD_LIBRARY_PATH 2689 shlibpath_overrides_runpath=no 2690 hardcode_into_libs=yes 2691 dynamic_linker='ldqnx.so' 2692 ;; 2693 2694openbsd*) 2695 version_type=sunos 2696 sys_lib_dlsearch_path_spec="/usr/lib" 2697 need_lib_prefix=no 2698 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2699 case $host_os in 2700 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2701 *) need_version=no ;; 2702 esac 2703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2704 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2705 shlibpath_var=LD_LIBRARY_PATH 2706 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2707 case $host_os in 2708 openbsd2.[[89]] | openbsd2.[[89]].*) 2709 shlibpath_overrides_runpath=no 2710 ;; 2711 *) 2712 shlibpath_overrides_runpath=yes 2713 ;; 2714 esac 2715 else 2716 shlibpath_overrides_runpath=yes 2717 fi 2718 ;; 2719 2720os2*) 2721 libname_spec='$name' 2722 shrext_cmds=".dll" 2723 need_lib_prefix=no 2724 library_names_spec='$libname${shared_ext} $libname.a' 2725 dynamic_linker='OS/2 ld.exe' 2726 shlibpath_var=LIBPATH 2727 ;; 2728 2729osf3* | osf4* | osf5*) 2730 version_type=osf 2731 need_lib_prefix=no 2732 need_version=no 2733 soname_spec='${libname}${release}${shared_ext}$major' 2734 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2735 shlibpath_var=LD_LIBRARY_PATH 2736 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2737 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2738 ;; 2739 2740rdos*) 2741 dynamic_linker=no 2742 ;; 2743 2744solaris*) 2745 version_type=linux 2746 need_lib_prefix=no 2747 need_version=no 2748 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2749 soname_spec='${libname}${release}${shared_ext}$major' 2750 shlibpath_var=LD_LIBRARY_PATH 2751 shlibpath_overrides_runpath=yes 2752 hardcode_into_libs=yes 2753 # ldd complains unless libraries are executable 2754 postinstall_cmds='chmod +x $lib' 2755 ;; 2756 2757sunos4*) 2758 version_type=sunos 2759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2760 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2761 shlibpath_var=LD_LIBRARY_PATH 2762 shlibpath_overrides_runpath=yes 2763 if test "$with_gnu_ld" = yes; then 2764 need_lib_prefix=no 2765 fi 2766 need_version=yes 2767 ;; 2768 2769sysv4 | sysv4.3*) 2770 version_type=linux 2771 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2772 soname_spec='${libname}${release}${shared_ext}$major' 2773 shlibpath_var=LD_LIBRARY_PATH 2774 case $host_vendor in 2775 sni) 2776 shlibpath_overrides_runpath=no 2777 need_lib_prefix=no 2778 runpath_var=LD_RUN_PATH 2779 ;; 2780 siemens) 2781 need_lib_prefix=no 2782 ;; 2783 motorola) 2784 need_lib_prefix=no 2785 need_version=no 2786 shlibpath_overrides_runpath=no 2787 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2788 ;; 2789 esac 2790 ;; 2791 2792sysv4*MP*) 2793 if test -d /usr/nec ;then 2794 version_type=linux 2795 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2796 soname_spec='$libname${shared_ext}.$major' 2797 shlibpath_var=LD_LIBRARY_PATH 2798 fi 2799 ;; 2800 2801sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2802 version_type=freebsd-elf 2803 need_lib_prefix=no 2804 need_version=no 2805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2806 soname_spec='${libname}${release}${shared_ext}$major' 2807 shlibpath_var=LD_LIBRARY_PATH 2808 shlibpath_overrides_runpath=yes 2809 hardcode_into_libs=yes 2810 if test "$with_gnu_ld" = yes; then 2811 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2812 else 2813 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2814 case $host_os in 2815 sco3.2v5*) 2816 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2817 ;; 2818 esac 2819 fi 2820 sys_lib_dlsearch_path_spec='/usr/lib' 2821 ;; 2822 2823tpf*) 2824 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2825 version_type=linux 2826 need_lib_prefix=no 2827 need_version=no 2828 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2829 shlibpath_var=LD_LIBRARY_PATH 2830 shlibpath_overrides_runpath=no 2831 hardcode_into_libs=yes 2832 ;; 2833 2834uts4*) 2835 version_type=linux 2836 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2837 soname_spec='${libname}${release}${shared_ext}$major' 2838 shlibpath_var=LD_LIBRARY_PATH 2839 ;; 2840 2841*) 2842 dynamic_linker=no 2843 ;; 2844esac 2845AC_MSG_RESULT([$dynamic_linker]) 2846test "$dynamic_linker" = no && can_build_shared=no 2847 2848variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2849if test "$GCC" = yes; then 2850 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2851fi 2852 2853if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2854 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2855fi 2856if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2857 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2858fi 2859 2860_LT_DECL([], [variables_saved_for_relink], [1], 2861 [Variables whose values should be saved in libtool wrapper scripts and 2862 restored at link time]) 2863_LT_DECL([], [need_lib_prefix], [0], 2864 [Do we need the "lib" prefix for modules?]) 2865_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2866_LT_DECL([], [version_type], [0], [Library versioning type]) 2867_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2868_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2869_LT_DECL([], [shlibpath_overrides_runpath], [0], 2870 [Is shlibpath searched before the hard-coded library search path?]) 2871_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2872_LT_DECL([], [library_names_spec], [1], 2873 [[List of archive names. First name is the real one, the rest are links. 2874 The last name is the one that the linker finds with -lNAME]]) 2875_LT_DECL([], [soname_spec], [1], 2876 [[The coded name of the library, if different from the real name]]) 2877_LT_DECL([], [install_override_mode], [1], 2878 [Permission mode override for installation of shared libraries]) 2879_LT_DECL([], [postinstall_cmds], [2], 2880 [Command to use after installation of a shared archive]) 2881_LT_DECL([], [postuninstall_cmds], [2], 2882 [Command to use after uninstallation of a shared archive]) 2883_LT_DECL([], [finish_cmds], [2], 2884 [Commands used to finish a libtool library installation in a directory]) 2885_LT_DECL([], [finish_eval], [1], 2886 [[As "finish_cmds", except a single script fragment to be evaled but 2887 not shown]]) 2888_LT_DECL([], [hardcode_into_libs], [0], 2889 [Whether we should hardcode library paths into libraries]) 2890_LT_DECL([], [sys_lib_search_path_spec], [2], 2891 [Compile-time system search path for libraries]) 2892_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2893 [Run-time system search path for libraries]) 2894])# _LT_SYS_DYNAMIC_LINKER 2895 2896 2897# _LT_PATH_TOOL_PREFIX(TOOL) 2898# -------------------------- 2899# find a file program which can recognize shared library 2900AC_DEFUN([_LT_PATH_TOOL_PREFIX], 2901[m4_require([_LT_DECL_EGREP])dnl 2902AC_MSG_CHECKING([for $1]) 2903AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2904[case $MAGIC_CMD in 2905[[\\/*] | ?:[\\/]*]) 2906 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2907 ;; 2908*) 2909 lt_save_MAGIC_CMD="$MAGIC_CMD" 2910 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2911dnl $ac_dummy forces splitting on constant user-supplied paths. 2912dnl POSIX.2 word splitting is done only on the output of word expansions, 2913dnl not every word. This closes a longstanding sh security hole. 2914 ac_dummy="m4_if([$2], , $PATH, [$2])" 2915 for ac_dir in $ac_dummy; do 2916 IFS="$lt_save_ifs" 2917 test -z "$ac_dir" && ac_dir=. 2918 if test -f $ac_dir/$1; then 2919 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2920 if test -n "$file_magic_test_file"; then 2921 case $deplibs_check_method in 2922 "file_magic "*) 2923 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2924 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2925 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2926 $EGREP "$file_magic_regex" > /dev/null; then 2927 : 2928 else 2929 cat <<_LT_EOF 1>&2 2930 2931*** Warning: the command libtool uses to detect shared libraries, 2932*** $file_magic_cmd, produces output that libtool cannot recognize. 2933*** The result is that libtool may fail to recognize shared libraries 2934*** as such. This will affect the creation of libtool libraries that 2935*** depend on shared libraries, but programs linked with such libtool 2936*** libraries will work regardless of this problem. Nevertheless, you 2937*** may want to report the problem to your system manager and/or to 2938*** bug-libtool@gnu.org 2939 2940_LT_EOF 2941 fi ;; 2942 esac 2943 fi 2944 break 2945 fi 2946 done 2947 IFS="$lt_save_ifs" 2948 MAGIC_CMD="$lt_save_MAGIC_CMD" 2949 ;; 2950esac]) 2951MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2952if test -n "$MAGIC_CMD"; then 2953 AC_MSG_RESULT($MAGIC_CMD) 2954else 2955 AC_MSG_RESULT(no) 2956fi 2957_LT_DECL([], [MAGIC_CMD], [0], 2958 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2959])# _LT_PATH_TOOL_PREFIX 2960 2961# Old name: 2962AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2963dnl aclocal-1.4 backwards compatibility: 2964dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2965 2966 2967# _LT_PATH_MAGIC 2968# -------------- 2969# find a file program which can recognize a shared library 2970m4_defun([_LT_PATH_MAGIC], 2971[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2972if test -z "$lt_cv_path_MAGIC_CMD"; then 2973 if test -n "$ac_tool_prefix"; then 2974 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2975 else 2976 MAGIC_CMD=: 2977 fi 2978fi 2979])# _LT_PATH_MAGIC 2980 2981 2982# LT_PATH_LD 2983# ---------- 2984# find the pathname to the GNU or non-GNU linker 2985AC_DEFUN([LT_PATH_LD], 2986[AC_REQUIRE([AC_PROG_CC])dnl 2987AC_REQUIRE([AC_CANONICAL_HOST])dnl 2988AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2989m4_require([_LT_DECL_SED])dnl 2990m4_require([_LT_DECL_EGREP])dnl 2991m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2992 2993AC_ARG_WITH([gnu-ld], 2994 [AS_HELP_STRING([--with-gnu-ld], 2995 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2996 [test "$withval" = no || with_gnu_ld=yes], 2997 [with_gnu_ld=no])dnl 2998 2999ac_prog=ld 3000if test "$GCC" = yes; then 3001 # Check if gcc -print-prog-name=ld gives a path. 3002 AC_MSG_CHECKING([for ld used by $CC]) 3003 case $host in 3004 *-*-mingw*) 3005 # gcc leaves a trailing carriage return which upsets mingw 3006 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3007 *) 3008 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3009 esac 3010 case $ac_prog in 3011 # Accept absolute paths. 3012 [[\\/]]* | ?:[[\\/]]*) 3013 re_direlt='/[[^/]][[^/]]*/\.\./' 3014 # Canonicalize the pathname of ld 3015 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3016 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3017 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3018 done 3019 test -z "$LD" && LD="$ac_prog" 3020 ;; 3021 "") 3022 # If it fails, then pretend we aren't using GCC. 3023 ac_prog=ld 3024 ;; 3025 *) 3026 # If it is relative, then search for the first ld in PATH. 3027 with_gnu_ld=unknown 3028 ;; 3029 esac 3030elif test "$with_gnu_ld" = yes; then 3031 AC_MSG_CHECKING([for GNU ld]) 3032else 3033 AC_MSG_CHECKING([for non-GNU ld]) 3034fi 3035AC_CACHE_VAL(lt_cv_path_LD, 3036[if test -z "$LD"; then 3037 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3038 for ac_dir in $PATH; do 3039 IFS="$lt_save_ifs" 3040 test -z "$ac_dir" && ac_dir=. 3041 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3042 lt_cv_path_LD="$ac_dir/$ac_prog" 3043 # Check to see if the program is GNU ld. I'd rather use --version, 3044 # but apparently some variants of GNU ld only accept -v. 3045 # Break only if it was the GNU/non-GNU ld that we prefer. 3046 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3047 *GNU* | *'with BFD'*) 3048 test "$with_gnu_ld" != no && break 3049 ;; 3050 *) 3051 test "$with_gnu_ld" != yes && break 3052 ;; 3053 esac 3054 fi 3055 done 3056 IFS="$lt_save_ifs" 3057else 3058 lt_cv_path_LD="$LD" # Let the user override the test with a path. 3059fi]) 3060LD="$lt_cv_path_LD" 3061if test -n "$LD"; then 3062 AC_MSG_RESULT($LD) 3063else 3064 AC_MSG_RESULT(no) 3065fi 3066test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3067_LT_PATH_LD_GNU 3068AC_SUBST([LD]) 3069 3070_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3071])# LT_PATH_LD 3072 3073# Old names: 3074AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3075AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3076dnl aclocal-1.4 backwards compatibility: 3077dnl AC_DEFUN([AM_PROG_LD], []) 3078dnl AC_DEFUN([AC_PROG_LD], []) 3079 3080 3081# _LT_PATH_LD_GNU 3082#- -------------- 3083m4_defun([_LT_PATH_LD_GNU], 3084[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3085[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3086case `$LD -v 2>&1 </dev/null` in 3087*GNU* | *'with BFD'*) 3088 lt_cv_prog_gnu_ld=yes 3089 ;; 3090*) 3091 lt_cv_prog_gnu_ld=no 3092 ;; 3093esac]) 3094with_gnu_ld=$lt_cv_prog_gnu_ld 3095])# _LT_PATH_LD_GNU 3096 3097 3098# _LT_CMD_RELOAD 3099# -------------- 3100# find reload flag for linker 3101# -- PORTME Some linkers may need a different reload flag. 3102m4_defun([_LT_CMD_RELOAD], 3103[AC_CACHE_CHECK([for $LD option to reload object files], 3104 lt_cv_ld_reload_flag, 3105 [lt_cv_ld_reload_flag='-r']) 3106reload_flag=$lt_cv_ld_reload_flag 3107case $reload_flag in 3108"" | " "*) ;; 3109*) reload_flag=" $reload_flag" ;; 3110esac 3111reload_cmds='$LD$reload_flag -o $output$reload_objs' 3112case $host_os in 3113 cygwin* | mingw* | pw32* | cegcc*) 3114 if test "$GCC" != yes; then 3115 reload_cmds=false 3116 fi 3117 ;; 3118 darwin*) 3119 if test "$GCC" = yes; then 3120 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3121 else 3122 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3123 fi 3124 ;; 3125esac 3126_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3127_LT_TAGDECL([], [reload_cmds], [2])dnl 3128])# _LT_CMD_RELOAD 3129 3130 3131# _LT_CHECK_MAGIC_METHOD 3132# ---------------------- 3133# how to check for library dependencies 3134# -- PORTME fill in with the dynamic library characteristics 3135m4_defun([_LT_CHECK_MAGIC_METHOD], 3136[m4_require([_LT_DECL_EGREP]) 3137m4_require([_LT_DECL_OBJDUMP]) 3138AC_CACHE_CHECK([how to recognize dependent libraries], 3139lt_cv_deplibs_check_method, 3140[lt_cv_file_magic_cmd='$MAGIC_CMD' 3141lt_cv_file_magic_test_file= 3142lt_cv_deplibs_check_method='unknown' 3143# Need to set the preceding variable on all platforms that support 3144# interlibrary dependencies. 3145# 'none' -- dependencies not supported. 3146# `unknown' -- same as none, but documents that we really don't know. 3147# 'pass_all' -- all dependencies passed with no checks. 3148# 'test_compile' -- check by making test program. 3149# 'file_magic [[regex]]' -- check by looking for files in library path 3150# which responds to the $file_magic_cmd with a given extended regex. 3151# If you have `file' or equivalent on your system and you're not sure 3152# whether `pass_all' will *always* work, you probably want this one. 3153 3154case $host_os in 3155aix[[4-9]]*) 3156 lt_cv_deplibs_check_method=pass_all 3157 ;; 3158 3159beos*) 3160 lt_cv_deplibs_check_method=pass_all 3161 ;; 3162 3163bsdi[[45]]*) 3164 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3165 lt_cv_file_magic_cmd='/usr/bin/file -L' 3166 lt_cv_file_magic_test_file=/shlib/libc.so 3167 ;; 3168 3169cygwin*) 3170 # func_win32_libid is a shell function defined in ltmain.sh 3171 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3172 lt_cv_file_magic_cmd='func_win32_libid' 3173 ;; 3174 3175mingw* | pw32*) 3176 # Base MSYS/MinGW do not provide the 'file' command needed by 3177 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3178 # unless we find 'file', for example because we are cross-compiling. 3179 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3180 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3181 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3182 lt_cv_file_magic_cmd='func_win32_libid' 3183 else 3184 # Keep this pattern in sync with the one in func_win32_libid. 3185 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3186 lt_cv_file_magic_cmd='$OBJDUMP -f' 3187 fi 3188 ;; 3189 3190cegcc*) 3191 # use the weaker test based on 'objdump'. See mingw*. 3192 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3193 lt_cv_file_magic_cmd='$OBJDUMP -f' 3194 ;; 3195 3196darwin* | rhapsody*) 3197 lt_cv_deplibs_check_method=pass_all 3198 ;; 3199 3200freebsd* | dragonfly*) 3201 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3202 case $host_cpu in 3203 i*86 ) 3204 # Not sure whether the presence of OpenBSD here was a mistake. 3205 # Let's accept both of them until this is cleared up. 3206 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3207 lt_cv_file_magic_cmd=/usr/bin/file 3208 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3209 ;; 3210 esac 3211 else 3212 lt_cv_deplibs_check_method=pass_all 3213 fi 3214 ;; 3215 3216gnu*) 3217 lt_cv_deplibs_check_method=pass_all 3218 ;; 3219 3220haiku*) 3221 lt_cv_deplibs_check_method=pass_all 3222 ;; 3223 3224hpux10.20* | hpux11*) 3225 lt_cv_file_magic_cmd=/usr/bin/file 3226 case $host_cpu in 3227 ia64*) 3228 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3229 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3230 ;; 3231 hppa*64*) 3232 [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]'] 3233 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3234 ;; 3235 *) 3236 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3237 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3238 ;; 3239 esac 3240 ;; 3241 3242interix[[3-9]]*) 3243 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3244 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3245 ;; 3246 3247irix5* | irix6* | nonstopux*) 3248 case $LD in 3249 *-32|*"-32 ") libmagic=32-bit;; 3250 *-n32|*"-n32 ") libmagic=N32;; 3251 *-64|*"-64 ") libmagic=64-bit;; 3252 *) libmagic=never-match;; 3253 esac 3254 lt_cv_deplibs_check_method=pass_all 3255 ;; 3256 3257# This must be Linux ELF. 3258linux* | k*bsd*-gnu | kopensolaris*-gnu) 3259 lt_cv_deplibs_check_method=pass_all 3260 ;; 3261 3262netbsd*) 3263 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3264 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3265 else 3266 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3267 fi 3268 ;; 3269 3270newos6*) 3271 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3272 lt_cv_file_magic_cmd=/usr/bin/file 3273 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3274 ;; 3275 3276*nto* | *qnx*) 3277 lt_cv_deplibs_check_method=pass_all 3278 ;; 3279 3280openbsd*) 3281 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3282 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3283 else 3284 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3285 fi 3286 ;; 3287 3288osf3* | osf4* | osf5*) 3289 lt_cv_deplibs_check_method=pass_all 3290 ;; 3291 3292rdos*) 3293 lt_cv_deplibs_check_method=pass_all 3294 ;; 3295 3296solaris*) 3297 lt_cv_deplibs_check_method=pass_all 3298 ;; 3299 3300sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3301 lt_cv_deplibs_check_method=pass_all 3302 ;; 3303 3304sysv4 | sysv4.3*) 3305 case $host_vendor in 3306 motorola) 3307 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]]' 3308 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3309 ;; 3310 ncr) 3311 lt_cv_deplibs_check_method=pass_all 3312 ;; 3313 sequent) 3314 lt_cv_file_magic_cmd='/bin/file' 3315 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3316 ;; 3317 sni) 3318 lt_cv_file_magic_cmd='/bin/file' 3319 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3320 lt_cv_file_magic_test_file=/lib/libc.so 3321 ;; 3322 siemens) 3323 lt_cv_deplibs_check_method=pass_all 3324 ;; 3325 pc) 3326 lt_cv_deplibs_check_method=pass_all 3327 ;; 3328 esac 3329 ;; 3330 3331tpf*) 3332 lt_cv_deplibs_check_method=pass_all 3333 ;; 3334esac 3335]) 3336 3337file_magic_glob= 3338want_nocaseglob=no 3339if test "$build" = "$host"; then 3340 case $host_os in 3341 mingw* | pw32*) 3342 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3343 want_nocaseglob=yes 3344 else 3345 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3346 fi 3347 ;; 3348 esac 3349fi 3350 3351file_magic_cmd=$lt_cv_file_magic_cmd 3352deplibs_check_method=$lt_cv_deplibs_check_method 3353test -z "$deplibs_check_method" && deplibs_check_method=unknown 3354 3355_LT_DECL([], [deplibs_check_method], [1], 3356 [Method to check whether dependent libraries are shared objects]) 3357_LT_DECL([], [file_magic_cmd], [1], 3358 [Command to use when deplibs_check_method = "file_magic"]) 3359_LT_DECL([], [file_magic_glob], [1], 3360 [How to find potential files when deplibs_check_method = "file_magic"]) 3361_LT_DECL([], [want_nocaseglob], [1], 3362 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3363])# _LT_CHECK_MAGIC_METHOD 3364 3365 3366# LT_PATH_NM 3367# ---------- 3368# find the pathname to a BSD- or MS-compatible name lister 3369AC_DEFUN([LT_PATH_NM], 3370[AC_REQUIRE([AC_PROG_CC])dnl 3371AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3372[if test -n "$NM"; then 3373 # Let the user override the test. 3374 lt_cv_path_NM="$NM" 3375else 3376 lt_nm_to_check="${ac_tool_prefix}nm" 3377 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3378 lt_nm_to_check="$lt_nm_to_check nm" 3379 fi 3380 for lt_tmp_nm in $lt_nm_to_check; do 3381 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3382 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3383 IFS="$lt_save_ifs" 3384 test -z "$ac_dir" && ac_dir=. 3385 tmp_nm="$ac_dir/$lt_tmp_nm" 3386 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3387 # Check to see if the nm accepts a BSD-compat flag. 3388 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3389 # nm: unknown option "B" ignored 3390 # Tru64's nm complains that /dev/null is an invalid object file 3391 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3392 */dev/null* | *'Invalid file or object type'*) 3393 lt_cv_path_NM="$tmp_nm -B" 3394 break 3395 ;; 3396 *) 3397 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3398 */dev/null*) 3399 lt_cv_path_NM="$tmp_nm -p" 3400 break 3401 ;; 3402 *) 3403 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3404 continue # so that we can try to find one that supports BSD flags 3405 ;; 3406 esac 3407 ;; 3408 esac 3409 fi 3410 done 3411 IFS="$lt_save_ifs" 3412 done 3413 : ${lt_cv_path_NM=no} 3414fi]) 3415if test "$lt_cv_path_NM" != "no"; then 3416 NM="$lt_cv_path_NM" 3417else 3418 # Didn't find any BSD compatible name lister, look for dumpbin. 3419 if test -n "$DUMPBIN"; then : 3420 # Let the user override the test. 3421 else 3422 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3423 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3424 *COFF*) 3425 DUMPBIN="$DUMPBIN -symbols" 3426 ;; 3427 *) 3428 DUMPBIN=: 3429 ;; 3430 esac 3431 fi 3432 AC_SUBST([DUMPBIN]) 3433 if test "$DUMPBIN" != ":"; then 3434 NM="$DUMPBIN" 3435 fi 3436fi 3437test -z "$NM" && NM=nm 3438AC_SUBST([NM]) 3439_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3440 3441AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3442 [lt_cv_nm_interface="BSD nm" 3443 echo "int some_variable = 0;" > conftest.$ac_ext 3444 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3445 (eval "$ac_compile" 2>conftest.err) 3446 cat conftest.err >&AS_MESSAGE_LOG_FD 3447 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3448 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3449 cat conftest.err >&AS_MESSAGE_LOG_FD 3450 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3451 cat conftest.out >&AS_MESSAGE_LOG_FD 3452 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3453 lt_cv_nm_interface="MS dumpbin" 3454 fi 3455 rm -f conftest*]) 3456])# LT_PATH_NM 3457 3458# Old names: 3459AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3460AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3461dnl aclocal-1.4 backwards compatibility: 3462dnl AC_DEFUN([AM_PROG_NM], []) 3463dnl AC_DEFUN([AC_PROG_NM], []) 3464 3465# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3466# -------------------------------- 3467# how to determine the name of the shared library 3468# associated with a specific link library. 3469# -- PORTME fill in with the dynamic library characteristics 3470m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3471[m4_require([_LT_DECL_EGREP]) 3472m4_require([_LT_DECL_OBJDUMP]) 3473m4_require([_LT_DECL_DLLTOOL]) 3474AC_CACHE_CHECK([how to associate runtime and link libraries], 3475lt_cv_sharedlib_from_linklib_cmd, 3476[lt_cv_sharedlib_from_linklib_cmd='unknown' 3477 3478case $host_os in 3479cygwin* | mingw* | pw32* | cegcc*) 3480 # two different shell functions defined in ltmain.sh 3481 # decide which to use based on capabilities of $DLLTOOL 3482 case `$DLLTOOL --help 2>&1` in 3483 *--identify-strict*) 3484 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3485 ;; 3486 *) 3487 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3488 ;; 3489 esac 3490 ;; 3491*) 3492 # fallback: assume linklib IS sharedlib 3493 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3494 ;; 3495esac 3496]) 3497sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3498test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3499 3500_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3501 [Command to associate shared and link libraries]) 3502])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3503 3504 3505# _LT_PATH_MANIFEST_TOOL 3506# ---------------------- 3507# locate the manifest tool 3508m4_defun([_LT_PATH_MANIFEST_TOOL], 3509[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3510test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3511AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3512 [lt_cv_path_mainfest_tool=no 3513 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3514 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3515 cat conftest.err >&AS_MESSAGE_LOG_FD 3516 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3517 lt_cv_path_mainfest_tool=yes 3518 fi 3519 rm -f conftest*]) 3520if test "x$lt_cv_path_mainfest_tool" != xyes; then 3521 MANIFEST_TOOL=: 3522fi 3523_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3524])# _LT_PATH_MANIFEST_TOOL 3525 3526 3527# LT_LIB_M 3528# -------- 3529# check for math library 3530AC_DEFUN([LT_LIB_M], 3531[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3532LIBM= 3533case $host in 3534*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3535 # These system don't have libm, or don't need it 3536 ;; 3537*-ncr-sysv4.3*) 3538 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3539 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3540 ;; 3541*) 3542 AC_CHECK_LIB(m, cos, LIBM="-lm") 3543 ;; 3544esac 3545AC_SUBST([LIBM]) 3546])# LT_LIB_M 3547 3548# Old name: 3549AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3550dnl aclocal-1.4 backwards compatibility: 3551dnl AC_DEFUN([AC_CHECK_LIBM], []) 3552 3553 3554# _LT_COMPILER_NO_RTTI([TAGNAME]) 3555# ------------------------------- 3556m4_defun([_LT_COMPILER_NO_RTTI], 3557[m4_require([_LT_TAG_COMPILER])dnl 3558 3559_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3560 3561if test "$GCC" = yes; then 3562 case $cc_basename in 3563 nvcc*) 3564 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3565 *) 3566 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3567 esac 3568 3569 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3570 lt_cv_prog_compiler_rtti_exceptions, 3571 [-fno-rtti -fno-exceptions], [], 3572 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3573fi 3574_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3575 [Compiler flag to turn off builtin functions]) 3576])# _LT_COMPILER_NO_RTTI 3577 3578 3579# _LT_CMD_GLOBAL_SYMBOLS 3580# ---------------------- 3581m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3582[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3583AC_REQUIRE([AC_PROG_CC])dnl 3584AC_REQUIRE([AC_PROG_AWK])dnl 3585AC_REQUIRE([LT_PATH_NM])dnl 3586AC_REQUIRE([LT_PATH_LD])dnl 3587m4_require([_LT_DECL_SED])dnl 3588m4_require([_LT_DECL_EGREP])dnl 3589m4_require([_LT_TAG_COMPILER])dnl 3590 3591# Check for command to grab the raw symbol name followed by C symbol from nm. 3592AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3593AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3594[ 3595# These are sane defaults that work on at least a few old systems. 3596# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3597 3598# Character class describing NM global symbol codes. 3599symcode='[[BCDEGRST]]' 3600 3601# Regexp to match symbols that can be accessed directly from C. 3602sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3603 3604# Define system-specific variables. 3605case $host_os in 3606aix*) 3607 symcode='[[BCDT]]' 3608 ;; 3609cygwin* | mingw* | pw32* | cegcc*) 3610 symcode='[[ABCDGISTW]]' 3611 ;; 3612hpux*) 3613 if test "$host_cpu" = ia64; then 3614 symcode='[[ABCDEGRST]]' 3615 fi 3616 ;; 3617irix* | nonstopux*) 3618 symcode='[[BCDEGRST]]' 3619 ;; 3620osf*) 3621 symcode='[[BCDEGQRST]]' 3622 ;; 3623solaris*) 3624 symcode='[[BDRT]]' 3625 ;; 3626sco3.2v5*) 3627 symcode='[[DT]]' 3628 ;; 3629sysv4.2uw2*) 3630 symcode='[[DT]]' 3631 ;; 3632sysv5* | sco5v6* | unixware* | OpenUNIX*) 3633 symcode='[[ABDT]]' 3634 ;; 3635sysv4) 3636 symcode='[[DFNSTU]]' 3637 ;; 3638esac 3639 3640# If we're using GNU nm, then use its standard symbol codes. 3641case `$NM -V 2>&1` in 3642*GNU* | *'with BFD'*) 3643 symcode='[[ABCDGIRSTW]]' ;; 3644esac 3645 3646# Transform an extracted symbol line into a proper C declaration. 3647# Some systems (esp. on ia64) link data and code symbols differently, 3648# so use this general approach. 3649lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3650 3651# Transform an extracted symbol line into symbol name and symbol address 3652lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3653lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3654 3655# Handle CRLF in mingw tool chain 3656opt_cr= 3657case $build_os in 3658mingw*) 3659 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3660 ;; 3661esac 3662 3663# Try without a prefix underscore, then with it. 3664for ac_symprfx in "" "_"; do 3665 3666 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3667 symxfrm="\\1 $ac_symprfx\\2 \\2" 3668 3669 # Write the raw and C identifiers. 3670 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3671 # Fake it for dumpbin and say T for any non-static function 3672 # and D for any global variable. 3673 # Also find C++ and __fastcall symbols from MSVC++, 3674 # which start with @ or ?. 3675 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3676" {last_section=section; section=\$ 3};"\ 3677" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3678" \$ 0!~/External *\|/{next};"\ 3679" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3680" {if(hide[section]) next};"\ 3681" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3682" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3683" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3684" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3685" ' prfx=^$ac_symprfx]" 3686 else 3687 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3688 fi 3689 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3690 3691 # Check to see that the pipe works correctly. 3692 pipe_works=no 3693 3694 rm -f conftest* 3695 cat > conftest.$ac_ext <<_LT_EOF 3696#ifdef __cplusplus 3697extern "C" { 3698#endif 3699char nm_test_var; 3700void nm_test_func(void); 3701void nm_test_func(void){} 3702#ifdef __cplusplus 3703} 3704#endif 3705int main(){nm_test_var='a';nm_test_func();return(0);} 3706_LT_EOF 3707 3708 if AC_TRY_EVAL(ac_compile); then 3709 # Now try to grab the symbols. 3710 nlist=conftest.nm 3711 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3712 # Try sorting and uniquifying the output. 3713 if sort "$nlist" | uniq > "$nlist"T; then 3714 mv -f "$nlist"T "$nlist" 3715 else 3716 rm -f "$nlist"T 3717 fi 3718 3719 # Make sure that we snagged all the symbols we need. 3720 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3721 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3722 cat <<_LT_EOF > conftest.$ac_ext 3723/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3724#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3725/* DATA imports from DLLs on WIN32 con't be const, because runtime 3726 relocations are performed -- see ld's documentation on pseudo-relocs. */ 3727# define LT@&t@_DLSYM_CONST 3728#elif defined(__osf__) 3729/* This system does not cope well with relocations in const data. */ 3730# define LT@&t@_DLSYM_CONST 3731#else 3732# define LT@&t@_DLSYM_CONST const 3733#endif 3734 3735#ifdef __cplusplus 3736extern "C" { 3737#endif 3738 3739_LT_EOF 3740 # Now generate the symbol file. 3741 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3742 3743 cat <<_LT_EOF >> conftest.$ac_ext 3744 3745/* The mapping between symbol names and symbols. */ 3746LT@&t@_DLSYM_CONST struct { 3747 const char *name; 3748 void *address; 3749} 3750lt__PROGRAM__LTX_preloaded_symbols[[]] = 3751{ 3752 { "@PROGRAM@", (void *) 0 }, 3753_LT_EOF 3754 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3755 cat <<\_LT_EOF >> conftest.$ac_ext 3756 {0, (void *) 0} 3757}; 3758 3759/* This works around a problem in FreeBSD linker */ 3760#ifdef FREEBSD_WORKAROUND 3761static const void *lt_preloaded_setup() { 3762 return lt__PROGRAM__LTX_preloaded_symbols; 3763} 3764#endif 3765 3766#ifdef __cplusplus 3767} 3768#endif 3769_LT_EOF 3770 # Now try linking the two files. 3771 mv conftest.$ac_objext conftstm.$ac_objext 3772 lt_globsym_save_LIBS=$LIBS 3773 lt_globsym_save_CFLAGS=$CFLAGS 3774 LIBS="conftstm.$ac_objext" 3775 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3776 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3777 pipe_works=yes 3778 fi 3779 LIBS=$lt_globsym_save_LIBS 3780 CFLAGS=$lt_globsym_save_CFLAGS 3781 else 3782 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3783 fi 3784 else 3785 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3786 fi 3787 else 3788 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3789 fi 3790 else 3791 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3792 cat conftest.$ac_ext >&5 3793 fi 3794 rm -rf conftest* conftst* 3795 3796 # Do not use the global_symbol_pipe unless it works. 3797 if test "$pipe_works" = yes; then 3798 break 3799 else 3800 lt_cv_sys_global_symbol_pipe= 3801 fi 3802done 3803]) 3804if test -z "$lt_cv_sys_global_symbol_pipe"; then 3805 lt_cv_sys_global_symbol_to_cdecl= 3806fi 3807if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3808 AC_MSG_RESULT(failed) 3809else 3810 AC_MSG_RESULT(ok) 3811fi 3812 3813# Response file support. 3814if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3815 nm_file_list_spec='@' 3816elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3817 nm_file_list_spec='@' 3818fi 3819 3820_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3821 [Take the output of nm and produce a listing of raw symbols and C names]) 3822_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3823 [Transform the output of nm in a proper C declaration]) 3824_LT_DECL([global_symbol_to_c_name_address], 3825 [lt_cv_sys_global_symbol_to_c_name_address], [1], 3826 [Transform the output of nm in a C name address pair]) 3827_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3828 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3829 [Transform the output of nm in a C name address pair when lib prefix is needed]) 3830_LT_DECL([], [nm_file_list_spec], [1], 3831 [Specify filename containing input files for $NM]) 3832]) # _LT_CMD_GLOBAL_SYMBOLS 3833 3834 3835# _LT_COMPILER_PIC([TAGNAME]) 3836# --------------------------- 3837m4_defun([_LT_COMPILER_PIC], 3838[m4_require([_LT_TAG_COMPILER])dnl 3839_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3840_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3841_LT_TAGVAR(lt_prog_compiler_static, $1)= 3842 3843m4_if([$1], [CXX], [ 3844 # C++ specific cases for pic, static, wl, etc. 3845 if test "$GXX" = yes; then 3846 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3848 3849 case $host_os in 3850 aix*) 3851 # All AIX code is PIC. 3852 if test "$host_cpu" = ia64; then 3853 # AIX 5 now supports IA64 processor 3854 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3855 fi 3856 ;; 3857 3858 amigaos*) 3859 case $host_cpu in 3860 powerpc) 3861 # see comment about AmigaOS4 .so support 3862 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3863 ;; 3864 m68k) 3865 # FIXME: we need at least 68020 code to build shared libraries, but 3866 # adding the `-m68020' flag to GCC prevents building anything better, 3867 # like `-m68040'. 3868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3869 ;; 3870 esac 3871 ;; 3872 3873 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3874 # PIC is the default for these OSes. 3875 ;; 3876 mingw* | cygwin* | os2* | pw32* | cegcc*) 3877 # This hack is so that the source file can tell whether it is being 3878 # built for inclusion in a dll (and should export symbols for example). 3879 # Although the cygwin gcc ignores -fPIC, still need this for old-style 3880 # (--disable-auto-import) libraries 3881 m4_if([$1], [GCJ], [], 3882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3883 ;; 3884 darwin* | rhapsody*) 3885 # PIC is the default on this platform 3886 # Common symbols not allowed in MH_DYLIB files 3887 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3888 ;; 3889 *djgpp*) 3890 # DJGPP does not support shared libraries at all 3891 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3892 ;; 3893 haiku*) 3894 # PIC is the default for Haiku. 3895 # The "-static" flag exists, but is broken. 3896 _LT_TAGVAR(lt_prog_compiler_static, $1)= 3897 ;; 3898 interix[[3-9]]*) 3899 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3900 # Instead, we relocate shared libraries at runtime. 3901 ;; 3902 sysv4*MP*) 3903 if test -d /usr/nec; then 3904 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3905 fi 3906 ;; 3907 hpux*) 3908 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3909 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3910 # sets the default TLS model and affects inlining. 3911 case $host_cpu in 3912 hppa*64*) 3913 ;; 3914 *) 3915 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3916 ;; 3917 esac 3918 ;; 3919 *qnx* | *nto*) 3920 # QNX uses GNU C++, but need to define -shared option too, otherwise 3921 # it will coredump. 3922 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3923 ;; 3924 *) 3925 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3926 ;; 3927 esac 3928 else 3929 case $host_os in 3930 aix[[4-9]]*) 3931 # All AIX code is PIC. 3932 if test "$host_cpu" = ia64; then 3933 # AIX 5 now supports IA64 processor 3934 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3935 else 3936 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3937 fi 3938 ;; 3939 chorus*) 3940 case $cc_basename in 3941 cxch68*) 3942 # Green Hills C++ Compiler 3943 # _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" 3944 ;; 3945 esac 3946 ;; 3947 mingw* | cygwin* | os2* | pw32* | cegcc*) 3948 # This hack is so that the source file can tell whether it is being 3949 # built for inclusion in a dll (and should export symbols for example). 3950 m4_if([$1], [GCJ], [], 3951 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3952 ;; 3953 dgux*) 3954 case $cc_basename in 3955 ec++*) 3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3957 ;; 3958 ghcx*) 3959 # Green Hills C++ Compiler 3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3961 ;; 3962 *) 3963 ;; 3964 esac 3965 ;; 3966 freebsd* | dragonfly*) 3967 # FreeBSD uses GNU C++ 3968 ;; 3969 hpux9* | hpux10* | hpux11*) 3970 case $cc_basename in 3971 CC*) 3972 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3973 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3974 if test "$host_cpu" != ia64; then 3975 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3976 fi 3977 ;; 3978 aCC*) 3979 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3980 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3981 case $host_cpu in 3982 hppa*64*|ia64*) 3983 # +Z the default 3984 ;; 3985 *) 3986 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3987 ;; 3988 esac 3989 ;; 3990 *) 3991 ;; 3992 esac 3993 ;; 3994 interix*) 3995 # This is c89, which is MS Visual C++ (no shared libs) 3996 # Anyone wants to do a port? 3997 ;; 3998 irix5* | irix6* | nonstopux*) 3999 case $cc_basename in 4000 CC*) 4001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4002 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4003 # CC pic flag -KPIC is the default. 4004 ;; 4005 *) 4006 ;; 4007 esac 4008 ;; 4009 linux* | k*bsd*-gnu | kopensolaris*-gnu) 4010 case $cc_basename in 4011 KCC*) 4012 # KAI C++ Compiler 4013 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4014 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4015 ;; 4016 ecpc* ) 4017 # old Intel C++ for x86_64 which still supported -KPIC. 4018 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4019 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4020 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4021 ;; 4022 icpc* ) 4023 # Intel C++, used to be incompatible with GCC. 4024 # ICC 10 doesn't accept -KPIC any more. 4025 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4027 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4028 ;; 4029 pgCC* | pgcpp*) 4030 # Portland Group C++ compiler 4031 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4032 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4033 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4034 ;; 4035 cxx*) 4036 # Compaq C++ 4037 # Make sure the PIC flag is empty. It appears that all Alpha 4038 # Linux and Compaq Tru64 Unix objects are PIC. 4039 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4040 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4041 ;; 4042 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4043 # IBM XL 8.0, 9.0 on PPC and BlueGene 4044 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4045 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4046 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4047 ;; 4048 *) 4049 case `$CC -V 2>&1 | sed 5q` in 4050 *Sun\ C*) 4051 # Sun C++ 5.9 4052 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4053 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4054 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4055 ;; 4056 esac 4057 ;; 4058 esac 4059 ;; 4060 lynxos*) 4061 ;; 4062 m88k*) 4063 ;; 4064 mvs*) 4065 case $cc_basename in 4066 cxx*) 4067 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4068 ;; 4069 *) 4070 ;; 4071 esac 4072 ;; 4073 netbsd*) 4074 ;; 4075 *qnx* | *nto*) 4076 # QNX uses GNU C++, but need to define -shared option too, otherwise 4077 # it will coredump. 4078 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4079 ;; 4080 osf3* | osf4* | osf5*) 4081 case $cc_basename in 4082 KCC*) 4083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4084 ;; 4085 RCC*) 4086 # Rational C++ 2.4.1 4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4088 ;; 4089 cxx*) 4090 # Digital/Compaq C++ 4091 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4092 # Make sure the PIC flag is empty. It appears that all Alpha 4093 # Linux and Compaq Tru64 Unix objects are PIC. 4094 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4095 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4096 ;; 4097 *) 4098 ;; 4099 esac 4100 ;; 4101 psos*) 4102 ;; 4103 solaris*) 4104 case $cc_basename in 4105 CC* | sunCC*) 4106 # Sun C++ 4.2, 5.x and Centerline C++ 4107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4108 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4109 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4110 ;; 4111 gcx*) 4112 # Green Hills C++ Compiler 4113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4114 ;; 4115 *) 4116 ;; 4117 esac 4118 ;; 4119 sunos4*) 4120 case $cc_basename in 4121 CC*) 4122 # Sun C++ 4.x 4123 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4124 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4125 ;; 4126 lcc*) 4127 # Lucid 4128 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4129 ;; 4130 *) 4131 ;; 4132 esac 4133 ;; 4134 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4135 case $cc_basename in 4136 CC*) 4137 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4138 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4139 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4140 ;; 4141 esac 4142 ;; 4143 tandem*) 4144 case $cc_basename in 4145 NCC*) 4146 # NonStop-UX NCC 3.20 4147 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4148 ;; 4149 *) 4150 ;; 4151 esac 4152 ;; 4153 vxworks*) 4154 ;; 4155 *) 4156 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4157 ;; 4158 esac 4159 fi 4160], 4161[ 4162 if test "$GCC" = yes; then 4163 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4164 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4165 4166 case $host_os in 4167 aix*) 4168 # All AIX code is PIC. 4169 if test "$host_cpu" = ia64; then 4170 # AIX 5 now supports IA64 processor 4171 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4172 fi 4173 ;; 4174 4175 amigaos*) 4176 case $host_cpu in 4177 powerpc) 4178 # see comment about AmigaOS4 .so support 4179 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4180 ;; 4181 m68k) 4182 # FIXME: we need at least 68020 code to build shared libraries, but 4183 # adding the `-m68020' flag to GCC prevents building anything better, 4184 # like `-m68040'. 4185 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4186 ;; 4187 esac 4188 ;; 4189 4190 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4191 # PIC is the default for these OSes. 4192 ;; 4193 4194 mingw* | cygwin* | pw32* | os2* | cegcc*) 4195 # This hack is so that the source file can tell whether it is being 4196 # built for inclusion in a dll (and should export symbols for example). 4197 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4198 # (--disable-auto-import) libraries 4199 m4_if([$1], [GCJ], [], 4200 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4201 ;; 4202 4203 darwin* | rhapsody*) 4204 # PIC is the default on this platform 4205 # Common symbols not allowed in MH_DYLIB files 4206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4207 ;; 4208 4209 haiku*) 4210 # PIC is the default for Haiku. 4211 # The "-static" flag exists, but is broken. 4212 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4213 ;; 4214 4215 hpux*) 4216 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4217 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4218 # sets the default TLS model and affects inlining. 4219 case $host_cpu in 4220 hppa*64*) 4221 # +Z the default 4222 ;; 4223 *) 4224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4225 ;; 4226 esac 4227 ;; 4228 4229 interix[[3-9]]*) 4230 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4231 # Instead, we relocate shared libraries at runtime. 4232 ;; 4233 4234 msdosdjgpp*) 4235 # Just because we use GCC doesn't mean we suddenly get shared libraries 4236 # on systems that don't support them. 4237 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4238 enable_shared=no 4239 ;; 4240 4241 *nto* | *qnx*) 4242 # QNX uses GNU C++, but need to define -shared option too, otherwise 4243 # it will coredump. 4244 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4245 ;; 4246 4247 sysv4*MP*) 4248 if test -d /usr/nec; then 4249 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4250 fi 4251 ;; 4252 4253 *) 4254 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4255 ;; 4256 esac 4257 4258 case $cc_basename in 4259 nvcc*) # Cuda Compiler Driver 2.2 4260 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4261 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4262 ;; 4263 esac 4264 else 4265 # PORTME Check for flag to pass linker flags through the system compiler. 4266 case $host_os in 4267 aix*) 4268 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4269 if test "$host_cpu" = ia64; then 4270 # AIX 5 now supports IA64 processor 4271 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4272 else 4273 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4274 fi 4275 ;; 4276 4277 mingw* | cygwin* | pw32* | os2* | cegcc*) 4278 # This hack is so that the source file can tell whether it is being 4279 # built for inclusion in a dll (and should export symbols for example). 4280 m4_if([$1], [GCJ], [], 4281 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4282 ;; 4283 4284 hpux9* | hpux10* | hpux11*) 4285 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4286 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4287 # not for PA HP-UX. 4288 case $host_cpu in 4289 hppa*64*|ia64*) 4290 # +Z the default 4291 ;; 4292 *) 4293 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4294 ;; 4295 esac 4296 # Is there a better lt_prog_compiler_static that works with the bundled CC? 4297 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4298 ;; 4299 4300 irix5* | irix6* | nonstopux*) 4301 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4302 # PIC (with -KPIC) is the default. 4303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4304 ;; 4305 4306 linux* | k*bsd*-gnu | kopensolaris*-gnu) 4307 case $cc_basename in 4308 # old Intel for x86_64 which still supported -KPIC. 4309 ecc*) 4310 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4312 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4313 ;; 4314 # icc used to be incompatible with GCC. 4315 # ICC 10 doesn't accept -KPIC any more. 4316 icc* | ifort*) 4317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4318 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4319 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4320 ;; 4321 # Lahey Fortran 8.1. 4322 lf95*) 4323 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4324 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4325 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4326 ;; 4327 nagfor*) 4328 # NAG Fortran compiler 4329 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4330 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4331 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4332 ;; 4333 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4334 # Portland Group compilers (*not* the Pentium gcc compiler, 4335 # which looks to be a dead project) 4336 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4339 ;; 4340 ccc*) 4341 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4342 # All Alpha code is PIC. 4343 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4344 ;; 4345 xl* | bgxl* | bgf* | mpixl*) 4346 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4349 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4350 ;; 4351 *) 4352 case `$CC -V 2>&1 | sed 5q` in 4353 *Sun\ F* | *Sun*Fortran*) 4354 # Sun Fortran 8.3 passes all unrecognized flags to the linker 4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4357 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4358 ;; 4359 *Sun\ C*) 4360 # Sun C 5.9 4361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4362 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4363 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4364 ;; 4365 esac 4366 ;; 4367 esac 4368 ;; 4369 4370 newsos6) 4371 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4373 ;; 4374 4375 *nto* | *qnx*) 4376 # QNX uses GNU C++, but need to define -shared option too, otherwise 4377 # it will coredump. 4378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4379 ;; 4380 4381 osf3* | osf4* | osf5*) 4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383 # All OSF/1 code is PIC. 4384 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4385 ;; 4386 4387 rdos*) 4388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4389 ;; 4390 4391 solaris*) 4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4394 case $cc_basename in 4395 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4397 *) 4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4399 esac 4400 ;; 4401 4402 sunos4*) 4403 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4406 ;; 4407 4408 sysv4 | sysv4.2uw2* | sysv4.3*) 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4412 ;; 4413 4414 sysv4*MP*) 4415 if test -d /usr/nec ;then 4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4417 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4418 fi 4419 ;; 4420 4421 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4422 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425 ;; 4426 4427 unicos*) 4428 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4429 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4430 ;; 4431 4432 uts4*) 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4434 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435 ;; 4436 4437 *) 4438 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4439 ;; 4440 esac 4441 fi 4442]) 4443case $host_os in 4444 # For platforms which do not support PIC, -DPIC is meaningless: 4445 *djgpp*) 4446 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4447 ;; 4448 *) 4449 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4450 ;; 4451esac 4452 4453AC_CACHE_CHECK([for $compiler option to produce PIC], 4454 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4455 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4456_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4457 4458# 4459# Check to make sure the PIC flag actually works. 4460# 4461if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4462 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4463 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4464 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4465 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4466 "" | " "*) ;; 4467 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4468 esac], 4469 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4470 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4471fi 4472_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4473 [Additional compiler flags for building library objects]) 4474 4475_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4476 [How to pass a linker flag through the compiler]) 4477# 4478# Check to make sure the static flag actually works. 4479# 4480wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4481_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4482 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4483 $lt_tmp_static_flag, 4484 [], 4485 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4486_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4487 [Compiler flag to prevent dynamic linking]) 4488])# _LT_COMPILER_PIC 4489 4490 4491# _LT_LINKER_SHLIBS([TAGNAME]) 4492# ---------------------------- 4493# See if the linker supports building shared libraries. 4494m4_defun([_LT_LINKER_SHLIBS], 4495[AC_REQUIRE([LT_PATH_LD])dnl 4496AC_REQUIRE([LT_PATH_NM])dnl 4497m4_require([_LT_PATH_MANIFEST_TOOL])dnl 4498m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4499m4_require([_LT_DECL_EGREP])dnl 4500m4_require([_LT_DECL_SED])dnl 4501m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4502m4_require([_LT_TAG_COMPILER])dnl 4503AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4504m4_if([$1], [CXX], [ 4505 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4506 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4507 case $host_os in 4508 aix[[4-9]]*) 4509 # If we're using GNU nm, then we don't want the "-C" option. 4510 # -C means demangle to AIX nm, but means don't demangle with GNU nm 4511 # Also, AIX nm treats weak defined symbols like other global defined 4512 # symbols, whereas GNU nm marks them as "W". 4513 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4514 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4515 else 4516 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4517 fi 4518 ;; 4519 pw32*) 4520 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4521 ;; 4522 cygwin* | mingw* | cegcc*) 4523 case $cc_basename in 4524 cl*) ;; 4525 *) 4526 _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' 4527 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4528 ;; 4529 esac 4530 ;; 4531 *) 4532 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4533 ;; 4534 esac 4535], [ 4536 runpath_var= 4537 _LT_TAGVAR(allow_undefined_flag, $1)= 4538 _LT_TAGVAR(always_export_symbols, $1)=no 4539 _LT_TAGVAR(archive_cmds, $1)= 4540 _LT_TAGVAR(archive_expsym_cmds, $1)= 4541 _LT_TAGVAR(compiler_needs_object, $1)=no 4542 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4543 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4544 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4545 _LT_TAGVAR(hardcode_automatic, $1)=no 4546 _LT_TAGVAR(hardcode_direct, $1)=no 4547 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4548 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4549 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4550 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4551 _LT_TAGVAR(hardcode_minus_L, $1)=no 4552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4553 _LT_TAGVAR(inherit_rpath, $1)=no 4554 _LT_TAGVAR(link_all_deplibs, $1)=unknown 4555 _LT_TAGVAR(module_cmds, $1)= 4556 _LT_TAGVAR(module_expsym_cmds, $1)= 4557 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4558 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4559 _LT_TAGVAR(thread_safe_flag_spec, $1)= 4560 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4561 # include_expsyms should be a list of space-separated symbols to be *always* 4562 # included in the symbol list 4563 _LT_TAGVAR(include_expsyms, $1)= 4564 # exclude_expsyms can be an extended regexp of symbols to exclude 4565 # it will be wrapped by ` (' and `)$', so one must not match beginning or 4566 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4567 # as well as any symbol that contains `d'. 4568 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4569 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4570 # platforms (ab)use it in PIC code, but their linkers get confused if 4571 # the symbol is explicitly referenced. Since portable code cannot 4572 # rely on this symbol name, it's probably fine to never include it in 4573 # preloaded symbol tables. 4574 # Exclude shared library initialization/finalization symbols. 4575dnl Note also adjust exclude_expsyms for C++ above. 4576 extract_expsyms_cmds= 4577 4578 case $host_os in 4579 cygwin* | mingw* | pw32* | cegcc*) 4580 # FIXME: the MSVC++ port hasn't been tested in a loooong time 4581 # When not using gcc, we currently assume that we are using 4582 # Microsoft Visual C++. 4583 if test "$GCC" != yes; then 4584 with_gnu_ld=no 4585 fi 4586 ;; 4587 interix*) 4588 # we just hope/assume this is gcc and not c89 (= MSVC++) 4589 with_gnu_ld=yes 4590 ;; 4591 openbsd*) 4592 with_gnu_ld=no 4593 ;; 4594 esac 4595 4596 _LT_TAGVAR(ld_shlibs, $1)=yes 4597 4598 # On some targets, GNU ld is compatible enough with the native linker 4599 # that we're better off using the native interface for both. 4600 lt_use_gnu_ld_interface=no 4601 if test "$with_gnu_ld" = yes; then 4602 case $host_os in 4603 aix*) 4604 # The AIX port of GNU ld has always aspired to compatibility 4605 # with the native linker. However, as the warning in the GNU ld 4606 # block says, versions before 2.19.5* couldn't really create working 4607 # shared libraries, regardless of the interface used. 4608 case `$LD -v 2>&1` in 4609 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4610 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4611 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4612 *) 4613 lt_use_gnu_ld_interface=yes 4614 ;; 4615 esac 4616 ;; 4617 *) 4618 lt_use_gnu_ld_interface=yes 4619 ;; 4620 esac 4621 fi 4622 4623 if test "$lt_use_gnu_ld_interface" = yes; then 4624 # If archive_cmds runs LD, not CC, wlarc should be empty 4625 wlarc='${wl}' 4626 4627 # Set some defaults for GNU ld with shared library support. These 4628 # are reset later if shared libraries are not supported. Putting them 4629 # here allows them to be overridden if necessary. 4630 runpath_var=LD_RUN_PATH 4631 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4632 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4633 # ancient GNU ld didn't support --whole-archive et. al. 4634 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4635 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4636 else 4637 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4638 fi 4639 supports_anon_versioning=no 4640 case `$LD -v 2>&1` in 4641 *GNU\ gold*) supports_anon_versioning=yes ;; 4642 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4643 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4644 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4645 *\ 2.11.*) ;; # other 2.11 versions 4646 *) supports_anon_versioning=yes ;; 4647 esac 4648 4649 # See if GNU ld supports shared libraries. 4650 case $host_os in 4651 aix[[3-9]]*) 4652 # On AIX/PPC, the GNU linker is very broken 4653 if test "$host_cpu" != ia64; then 4654 _LT_TAGVAR(ld_shlibs, $1)=no 4655 cat <<_LT_EOF 1>&2 4656 4657*** Warning: the GNU linker, at least up to release 2.19, is reported 4658*** to be unable to reliably create shared libraries on AIX. 4659*** Therefore, libtool is disabling shared libraries support. If you 4660*** really care for shared libraries, you may want to install binutils 4661*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4662*** You will then need to restart the configuration process. 4663 4664_LT_EOF 4665 fi 4666 ;; 4667 4668 amigaos*) 4669 case $host_cpu in 4670 powerpc) 4671 # see comment about AmigaOS4 .so support 4672 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4673 _LT_TAGVAR(archive_expsym_cmds, $1)='' 4674 ;; 4675 m68k) 4676 _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)' 4677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4678 _LT_TAGVAR(hardcode_minus_L, $1)=yes 4679 ;; 4680 esac 4681 ;; 4682 4683 beos*) 4684 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4685 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4686 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4687 # support --undefined. This deserves some investigation. FIXME 4688 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4689 else 4690 _LT_TAGVAR(ld_shlibs, $1)=no 4691 fi 4692 ;; 4693 4694 cygwin* | mingw* | pw32* | cegcc*) 4695 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4696 # as there is no search path for DLLs. 4697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4699 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4700 _LT_TAGVAR(always_export_symbols, $1)=no 4701 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4702 _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' 4703 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4704 4705 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4706 _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' 4707 # If the export-symbols file already is a .def file (1st line 4708 # is EXPORTS), use it as is; otherwise, prepend... 4709 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4710 cp $export_symbols $output_objdir/$soname.def; 4711 else 4712 echo EXPORTS > $output_objdir/$soname.def; 4713 cat $export_symbols >> $output_objdir/$soname.def; 4714 fi~ 4715 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4716 else 4717 _LT_TAGVAR(ld_shlibs, $1)=no 4718 fi 4719 ;; 4720 4721 haiku*) 4722 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4723 _LT_TAGVAR(link_all_deplibs, $1)=yes 4724 ;; 4725 4726 interix[[3-9]]*) 4727 _LT_TAGVAR(hardcode_direct, $1)=no 4728 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4729 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4730 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4731 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4732 # Instead, shared libraries are loaded at an image base (0x10000000 by 4733 # default) and relocated if they conflict, which is a slow very memory 4734 # consuming and fragmenting process. To avoid this, we pick a random, 4735 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4736 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4737 _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' 4738 _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' 4739 ;; 4740 4741 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4742 tmp_diet=no 4743 if test "$host_os" = linux-dietlibc; then 4744 case $cc_basename in 4745 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4746 esac 4747 fi 4748 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4749 && test "$tmp_diet" = no 4750 then 4751 tmp_addflag=' $pic_flag' 4752 tmp_sharedflag='-shared' 4753 case $cc_basename,$host_cpu in 4754 pgcc*) # Portland Group C compiler 4755 _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' 4756 tmp_addflag=' $pic_flag' 4757 ;; 4758 pgf77* | pgf90* | pgf95* | pgfortran*) 4759 # Portland Group f77 and f90 compilers 4760 _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' 4761 tmp_addflag=' $pic_flag -Mnomain' ;; 4762 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4763 tmp_addflag=' -i_dynamic' ;; 4764 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4765 tmp_addflag=' -i_dynamic -nofor_main' ;; 4766 ifc* | ifort*) # Intel Fortran compiler 4767 tmp_addflag=' -nofor_main' ;; 4768 lf95*) # Lahey Fortran 8.1 4769 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4770 tmp_sharedflag='--shared' ;; 4771 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4772 tmp_sharedflag='-qmkshrobj' 4773 tmp_addflag= ;; 4774 nvcc*) # Cuda Compiler Driver 2.2 4775 _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' 4776 _LT_TAGVAR(compiler_needs_object, $1)=yes 4777 ;; 4778 esac 4779 case `$CC -V 2>&1 | sed 5q` in 4780 *Sun\ C*) # Sun C 5.9 4781 _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' 4782 _LT_TAGVAR(compiler_needs_object, $1)=yes 4783 tmp_sharedflag='-G' ;; 4784 *Sun\ F*) # Sun Fortran 8.3 4785 tmp_sharedflag='-G' ;; 4786 esac 4787 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4788 4789 if test "x$supports_anon_versioning" = xyes; then 4790 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4791 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4792 echo "local: *; };" >> $output_objdir/$libname.ver~ 4793 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4794 fi 4795 4796 case $cc_basename in 4797 xlf* | bgf* | bgxlf* | mpixlf*) 4798 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4799 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4801 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4802 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4803 if test "x$supports_anon_versioning" = xyes; then 4804 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4805 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4806 echo "local: *; };" >> $output_objdir/$libname.ver~ 4807 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4808 fi 4809 ;; 4810 esac 4811 else 4812 _LT_TAGVAR(ld_shlibs, $1)=no 4813 fi 4814 ;; 4815 4816 netbsd*) 4817 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4818 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4819 wlarc= 4820 else 4821 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4822 _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' 4823 fi 4824 ;; 4825 4826 solaris*) 4827 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4828 _LT_TAGVAR(ld_shlibs, $1)=no 4829 cat <<_LT_EOF 1>&2 4830 4831*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4832*** create shared libraries on Solaris systems. Therefore, libtool 4833*** is disabling shared libraries support. We urge you to upgrade GNU 4834*** binutils to release 2.9.1 or newer. Another option is to modify 4835*** your PATH or compiler configuration so that the native linker is 4836*** used, and then restart. 4837 4838_LT_EOF 4839 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4840 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4841 _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' 4842 else 4843 _LT_TAGVAR(ld_shlibs, $1)=no 4844 fi 4845 ;; 4846 4847 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4848 case `$LD -v 2>&1` in 4849 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4850 _LT_TAGVAR(ld_shlibs, $1)=no 4851 cat <<_LT_EOF 1>&2 4852 4853*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4854*** reliably create shared libraries on SCO systems. Therefore, libtool 4855*** is disabling shared libraries support. We urge you to upgrade GNU 4856*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4857*** your PATH or compiler configuration so that the native linker is 4858*** used, and then restart. 4859 4860_LT_EOF 4861 ;; 4862 *) 4863 # For security reasons, it is highly recommended that you always 4864 # use absolute paths for naming shared libraries, and exclude the 4865 # DT_RUNPATH tag from executables and libraries. But doing so 4866 # requires that you compile everything twice, which is a pain. 4867 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4869 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4870 _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' 4871 else 4872 _LT_TAGVAR(ld_shlibs, $1)=no 4873 fi 4874 ;; 4875 esac 4876 ;; 4877 4878 sunos4*) 4879 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4880 wlarc= 4881 _LT_TAGVAR(hardcode_direct, $1)=yes 4882 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4883 ;; 4884 4885 *) 4886 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888 _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' 4889 else 4890 _LT_TAGVAR(ld_shlibs, $1)=no 4891 fi 4892 ;; 4893 esac 4894 4895 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4896 runpath_var= 4897 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4898 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4899 _LT_TAGVAR(whole_archive_flag_spec, $1)= 4900 fi 4901 else 4902 # PORTME fill in a description of your system's linker (not GNU ld) 4903 case $host_os in 4904 aix3*) 4905 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4906 _LT_TAGVAR(always_export_symbols, $1)=yes 4907 _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' 4908 # Note: this linker hardcodes the directories in LIBPATH if there 4909 # are no directories specified by -L. 4910 _LT_TAGVAR(hardcode_minus_L, $1)=yes 4911 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4912 # Neither direct hardcoding nor static linking is supported with a 4913 # broken collect2. 4914 _LT_TAGVAR(hardcode_direct, $1)=unsupported 4915 fi 4916 ;; 4917 4918 aix[[4-9]]*) 4919 if test "$host_cpu" = ia64; then 4920 # On IA64, the linker does run time linking by default, so we don't 4921 # have to do anything special. 4922 aix_use_runtimelinking=no 4923 exp_sym_flag='-Bexport' 4924 no_entry_flag="" 4925 else 4926 # If we're using GNU nm, then we don't want the "-C" option. 4927 # -C means demangle to AIX nm, but means don't demangle with GNU nm 4928 # Also, AIX nm treats weak defined symbols like other global 4929 # defined symbols, whereas GNU nm marks them as "W". 4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4932 else 4933 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4934 fi 4935 aix_use_runtimelinking=no 4936 4937 # Test if we are trying to use run time linking or normal 4938 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4939 # need to do runtime linking. 4940 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4941 for ld_flag in $LDFLAGS; do 4942 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4943 aix_use_runtimelinking=yes 4944 break 4945 fi 4946 done 4947 ;; 4948 esac 4949 4950 exp_sym_flag='-bexport' 4951 no_entry_flag='-bnoentry' 4952 fi 4953 4954 # When large executables or shared objects are built, AIX ld can 4955 # have problems creating the table of contents. If linking a library 4956 # or program results in "error TOC overflow" add -mminimal-toc to 4957 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4958 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4959 4960 _LT_TAGVAR(archive_cmds, $1)='' 4961 _LT_TAGVAR(hardcode_direct, $1)=yes 4962 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4963 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4964 _LT_TAGVAR(link_all_deplibs, $1)=yes 4965 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4966 4967 if test "$GCC" = yes; then 4968 case $host_os in aix4.[[012]]|aix4.[[012]].*) 4969 # We only want to do this on AIX 4.2 and lower, the check 4970 # below for broken collect2 doesn't work under 4.3+ 4971 collect2name=`${CC} -print-prog-name=collect2` 4972 if test -f "$collect2name" && 4973 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4974 then 4975 # We have reworked collect2 4976 : 4977 else 4978 # We have old collect2 4979 _LT_TAGVAR(hardcode_direct, $1)=unsupported 4980 # It fails to find uninstalled libraries when the uninstalled 4981 # path is not listed in the libpath. Setting hardcode_minus_L 4982 # to unsupported forces relinking 4983 _LT_TAGVAR(hardcode_minus_L, $1)=yes 4984 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4985 _LT_TAGVAR(hardcode_libdir_separator, $1)= 4986 fi 4987 ;; 4988 esac 4989 shared_flag='-shared' 4990 if test "$aix_use_runtimelinking" = yes; then 4991 shared_flag="$shared_flag "'${wl}-G' 4992 fi 4993 else 4994 # not using gcc 4995 if test "$host_cpu" = ia64; then 4996 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4997 # chokes on -Wl,-G. The following line is correct: 4998 shared_flag='-G' 4999 else 5000 if test "$aix_use_runtimelinking" = yes; then 5001 shared_flag='${wl}-G' 5002 else 5003 shared_flag='${wl}-bM:SRE' 5004 fi 5005 fi 5006 fi 5007 5008 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5009 # It seems that -bexpall does not export symbols beginning with 5010 # underscore (_), so it is better to generate a list of symbols to export. 5011 _LT_TAGVAR(always_export_symbols, $1)=yes 5012 if test "$aix_use_runtimelinking" = yes; then 5013 # Warning - without using the other runtime loading flags (-brtl), 5014 # -berok will link without error, but may produce a broken library. 5015 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5016 # Determine the default libpath from the value encoded in an 5017 # empty executable. 5018 _LT_SYS_MODULE_PATH_AIX([$1]) 5019 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5021 else 5022 if test "$host_cpu" = ia64; then 5023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5024 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5025 _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" 5026 else 5027 # Determine the default libpath from the value encoded in an 5028 # empty executable. 5029 _LT_SYS_MODULE_PATH_AIX([$1]) 5030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5031 # Warning - without using the other run time loading flags, 5032 # -berok will link without error, but may produce a broken library. 5033 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5034 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5035 if test "$with_gnu_ld" = yes; then 5036 # We only use this code for GNU lds that support --whole-archive. 5037 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5038 else 5039 # Exported symbols can be pulled into shared objects from archives 5040 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5041 fi 5042 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5043 # This is similar to how AIX traditionally builds its shared libraries. 5044 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5045 fi 5046 fi 5047 ;; 5048 5049 amigaos*) 5050 case $host_cpu in 5051 powerpc) 5052 # see comment about AmigaOS4 .so support 5053 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5054 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5055 ;; 5056 m68k) 5057 _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)' 5058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5059 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5060 ;; 5061 esac 5062 ;; 5063 5064 bsdi[[45]]*) 5065 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5066 ;; 5067 5068 cygwin* | mingw* | pw32* | cegcc*) 5069 # When not using gcc, we currently assume that we are using 5070 # Microsoft Visual C++. 5071 # hardcode_libdir_flag_spec is actually meaningless, as there is 5072 # no search path for DLLs. 5073 case $cc_basename in 5074 cl*) 5075 # Native MSVC 5076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5077 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5078 _LT_TAGVAR(always_export_symbols, $1)=yes 5079 _LT_TAGVAR(file_list_spec, $1)='@' 5080 # Tell ltmain to make .lib files, not .a files. 5081 libext=lib 5082 # Tell ltmain to make .dll files, not .so files. 5083 shrext_cmds=".dll" 5084 # FIXME: Setting linknames here is a bad hack. 5085 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5086 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5087 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5088 else 5089 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5090 fi~ 5091 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5092 linknames=' 5093 # The linker will not automatically build a static lib if we build a DLL. 5094 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5095 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5096 _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' 5097 # Don't use ranlib 5098 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5099 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5100 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5101 case $lt_outputfile in 5102 *.exe|*.EXE) ;; 5103 *) 5104 lt_outputfile="$lt_outputfile.exe" 5105 lt_tool_outputfile="$lt_tool_outputfile.exe" 5106 ;; 5107 esac~ 5108 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5109 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5110 $RM "$lt_outputfile.manifest"; 5111 fi' 5112 ;; 5113 *) 5114 # Assume MSVC wrapper 5115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5116 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5117 # Tell ltmain to make .lib files, not .a files. 5118 libext=lib 5119 # Tell ltmain to make .dll files, not .so files. 5120 shrext_cmds=".dll" 5121 # FIXME: Setting linknames here is a bad hack. 5122 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5123 # The linker will automatically build a .lib file if we build a DLL. 5124 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5125 # FIXME: Should let the user specify the lib program. 5126 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5127 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5128 ;; 5129 esac 5130 ;; 5131 5132 darwin* | rhapsody*) 5133 _LT_DARWIN_LINKER_FEATURES($1) 5134 ;; 5135 5136 dgux*) 5137 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5138 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5139 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5140 ;; 5141 5142 freebsd1*) 5143 _LT_TAGVAR(ld_shlibs, $1)=no 5144 ;; 5145 5146 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5147 # support. Future versions do this automatically, but an explicit c++rt0.o 5148 # does not break anything, and helps significantly (at the cost of a little 5149 # extra space). 5150 freebsd2.2*) 5151 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5152 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5153 _LT_TAGVAR(hardcode_direct, $1)=yes 5154 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5155 ;; 5156 5157 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5158 freebsd2*) 5159 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5160 _LT_TAGVAR(hardcode_direct, $1)=yes 5161 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5162 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5163 ;; 5164 5165 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5166 freebsd* | dragonfly*) 5167 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5168 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5169 _LT_TAGVAR(hardcode_direct, $1)=yes 5170 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5171 ;; 5172 5173 hpux9*) 5174 if test "$GCC" = yes; then 5175 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5176 else 5177 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5178 fi 5179 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5180 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5181 _LT_TAGVAR(hardcode_direct, $1)=yes 5182 5183 # hardcode_minus_L: Not really in the search PATH, 5184 # but as the default location of the library. 5185 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5186 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5187 ;; 5188 5189 hpux10*) 5190 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5191 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5192 else 5193 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5194 fi 5195 if test "$with_gnu_ld" = no; then 5196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5197 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5198 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5199 _LT_TAGVAR(hardcode_direct, $1)=yes 5200 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5201 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5202 # hardcode_minus_L: Not really in the search PATH, 5203 # but as the default location of the library. 5204 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5205 fi 5206 ;; 5207 5208 hpux11*) 5209 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5210 case $host_cpu in 5211 hppa*64*) 5212 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5213 ;; 5214 ia64*) 5215 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5216 ;; 5217 *) 5218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5219 ;; 5220 esac 5221 else 5222 case $host_cpu in 5223 hppa*64*) 5224 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5225 ;; 5226 ia64*) 5227 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5228 ;; 5229 *) 5230 m4_if($1, [], [ 5231 # Older versions of the 11.00 compiler do not understand -b yet 5232 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5233 _LT_LINKER_OPTION([if $CC understands -b], 5234 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5235 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5236 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5237 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5238 ;; 5239 esac 5240 fi 5241 if test "$with_gnu_ld" = no; then 5242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244 5245 case $host_cpu in 5246 hppa*64*|ia64*) 5247 _LT_TAGVAR(hardcode_direct, $1)=no 5248 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5249 ;; 5250 *) 5251 _LT_TAGVAR(hardcode_direct, $1)=yes 5252 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5253 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5254 5255 # hardcode_minus_L: Not really in the search PATH, 5256 # but as the default location of the library. 5257 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5258 ;; 5259 esac 5260 fi 5261 ;; 5262 5263 irix5* | irix6* | nonstopux*) 5264 if test "$GCC" = yes; then 5265 _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' 5266 # Try to use the -exported_symbol ld option, if it does not 5267 # work, assume that -exports_file does not work either and 5268 # implicitly export all symbols. 5269 # This should be the same for all languages, so no per-tag cache variable. 5270 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5271 [lt_cv_irix_exported_symbol], 5272 [save_LDFLAGS="$LDFLAGS" 5273 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5274 AC_LINK_IFELSE( 5275 [AC_LANG_SOURCE( 5276 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5277 [C++], [[int foo (void) { return 0; }]], 5278 [Fortran 77], [[ 5279 subroutine foo 5280 end]], 5281 [Fortran], [[ 5282 subroutine foo 5283 end]])])], 5284 [lt_cv_irix_exported_symbol=yes], 5285 [lt_cv_irix_exported_symbol=no]) 5286 LDFLAGS="$save_LDFLAGS"]) 5287 if test "$lt_cv_irix_exported_symbol" = yes; then 5288 _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' 5289 fi 5290 else 5291 _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' 5292 _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' 5293 fi 5294 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5296 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5297 _LT_TAGVAR(inherit_rpath, $1)=yes 5298 _LT_TAGVAR(link_all_deplibs, $1)=yes 5299 ;; 5300 5301 netbsd*) 5302 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5303 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5304 else 5305 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5306 fi 5307 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5308 _LT_TAGVAR(hardcode_direct, $1)=yes 5309 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5310 ;; 5311 5312 newsos6) 5313 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5314 _LT_TAGVAR(hardcode_direct, $1)=yes 5315 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5316 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5317 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5318 ;; 5319 5320 *nto* | *qnx*) 5321 ;; 5322 5323 openbsd*) 5324 if test -f /usr/libexec/ld.so; then 5325 _LT_TAGVAR(hardcode_direct, $1)=yes 5326 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5327 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5328 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5330 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5331 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5332 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5333 else 5334 case $host_os in 5335 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5336 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5338 ;; 5339 *) 5340 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5342 ;; 5343 esac 5344 fi 5345 else 5346 _LT_TAGVAR(ld_shlibs, $1)=no 5347 fi 5348 ;; 5349 5350 os2*) 5351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5352 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5353 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5354 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5355 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5356 ;; 5357 5358 osf3*) 5359 if test "$GCC" = yes; then 5360 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5361 _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' 5362 else 5363 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5364 _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' 5365 fi 5366 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5368 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5369 ;; 5370 5371 osf4* | osf5*) # as osf3* with the addition of -msym flag 5372 if test "$GCC" = yes; then 5373 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5374 _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' 5375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5376 else 5377 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5378 _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' 5379 _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~ 5380 $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' 5381 5382 # Both c and cxx compiler support -rpath directly 5383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5384 fi 5385 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5386 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5387 ;; 5388 5389 solaris*) 5390 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5391 if test "$GCC" = yes; then 5392 wlarc='${wl}' 5393 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5394 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5395 $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' 5396 else 5397 case `$CC -V 2>&1` in 5398 *"Compilers 5.0"*) 5399 wlarc='' 5400 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5401 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5402 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5403 ;; 5404 *) 5405 wlarc='${wl}' 5406 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5407 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5408 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5409 ;; 5410 esac 5411 fi 5412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5413 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5414 case $host_os in 5415 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5416 *) 5417 # The compiler driver will combine and reorder linker options, 5418 # but understands `-z linker_flag'. GCC discards it without `$wl', 5419 # but is careful enough not to reorder. 5420 # Supported since Solaris 2.6 (maybe 2.5.1?) 5421 if test "$GCC" = yes; then 5422 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5423 else 5424 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5425 fi 5426 ;; 5427 esac 5428 _LT_TAGVAR(link_all_deplibs, $1)=yes 5429 ;; 5430 5431 sunos4*) 5432 if test "x$host_vendor" = xsequent; then 5433 # Use $CC to link under sequent, because it throws in some extra .o 5434 # files that make .init and .fini sections work. 5435 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5436 else 5437 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5438 fi 5439 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5440 _LT_TAGVAR(hardcode_direct, $1)=yes 5441 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5442 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5443 ;; 5444 5445 sysv4) 5446 case $host_vendor in 5447 sni) 5448 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5449 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5450 ;; 5451 siemens) 5452 ## LD is ld it makes a PLAMLIB 5453 ## CC just makes a GrossModule. 5454 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5455 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5456 _LT_TAGVAR(hardcode_direct, $1)=no 5457 ;; 5458 motorola) 5459 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5460 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5461 ;; 5462 esac 5463 runpath_var='LD_RUN_PATH' 5464 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5465 ;; 5466 5467 sysv4.3*) 5468 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5469 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5470 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5471 ;; 5472 5473 sysv4*MP*) 5474 if test -d /usr/nec; then 5475 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5476 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5477 runpath_var=LD_RUN_PATH 5478 hardcode_runpath_var=yes 5479 _LT_TAGVAR(ld_shlibs, $1)=yes 5480 fi 5481 ;; 5482 5483 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5484 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5485 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5486 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5487 runpath_var='LD_RUN_PATH' 5488 5489 if test "$GCC" = yes; then 5490 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5491 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5492 else 5493 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5494 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5495 fi 5496 ;; 5497 5498 sysv5* | sco3.2v5* | sco5v6*) 5499 # Note: We can NOT use -z defs as we might desire, because we do not 5500 # link with -lc, and that would cause any symbols used from libc to 5501 # always be unresolved, which means just about no library would 5502 # ever link correctly. If we're not using GNU ld we use -z text 5503 # though, which does catch some bad symbols but isn't as heavy-handed 5504 # as -z defs. 5505 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5506 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5507 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5508 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5510 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5511 _LT_TAGVAR(link_all_deplibs, $1)=yes 5512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5513 runpath_var='LD_RUN_PATH' 5514 5515 if test "$GCC" = yes; then 5516 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5517 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5518 else 5519 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5520 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5521 fi 5522 ;; 5523 5524 uts4*) 5525 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5526 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5527 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5528 ;; 5529 5530 *) 5531 _LT_TAGVAR(ld_shlibs, $1)=no 5532 ;; 5533 esac 5534 5535 if test x$host_vendor = xsni; then 5536 case $host in 5537 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5538 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5539 ;; 5540 esac 5541 fi 5542 fi 5543]) 5544AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5545test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5546 5547_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5548 5549_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5550_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5551_LT_DECL([], [extract_expsyms_cmds], [2], 5552 [The commands to extract the exported symbol list from a shared archive]) 5553 5554# 5555# Do we need to explicitly link libc? 5556# 5557case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5558x|xyes) 5559 # Assume -lc should be added 5560 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5561 5562 if test "$enable_shared" = yes && test "$GCC" = yes; then 5563 case $_LT_TAGVAR(archive_cmds, $1) in 5564 *'~'*) 5565 # FIXME: we may have to deal with multi-command sequences. 5566 ;; 5567 '$CC '*) 5568 # Test whether the compiler implicitly links with -lc since on some 5569 # systems, -lgcc has to come before -lc. If gcc already passes -lc 5570 # to ld, don't add -lc before -lgcc. 5571 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5572 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5573 [$RM conftest* 5574 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5575 5576 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5577 soname=conftest 5578 lib=conftest 5579 libobjs=conftest.$ac_objext 5580 deplibs= 5581 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5582 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5583 compiler_flags=-v 5584 linker_flags=-v 5585 verstring= 5586 output_objdir=. 5587 libname=conftest 5588 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5589 _LT_TAGVAR(allow_undefined_flag, $1)= 5590 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5591 then 5592 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5593 else 5594 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5595 fi 5596 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5597 else 5598 cat conftest.err 1>&5 5599 fi 5600 $RM conftest* 5601 ]) 5602 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5603 ;; 5604 esac 5605 fi 5606 ;; 5607esac 5608 5609_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5610 [Whether or not to add -lc for building shared libraries]) 5611_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5612 [enable_shared_with_static_runtimes], [0], 5613 [Whether or not to disallow shared libs when runtime libs are static]) 5614_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5615 [Compiler flag to allow reflexive dlopens]) 5616_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5617 [Compiler flag to generate shared objects directly from archives]) 5618_LT_TAGDECL([], [compiler_needs_object], [1], 5619 [Whether the compiler copes with passing no objects directly]) 5620_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5621 [Create an old-style archive from a shared archive]) 5622_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5623 [Create a temporary old-style archive to link instead of a shared archive]) 5624_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5625_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5626_LT_TAGDECL([], [module_cmds], [2], 5627 [Commands used to build a loadable module if different from building 5628 a shared archive.]) 5629_LT_TAGDECL([], [module_expsym_cmds], [2]) 5630_LT_TAGDECL([], [with_gnu_ld], [1], 5631 [Whether we are building with GNU ld or not]) 5632_LT_TAGDECL([], [allow_undefined_flag], [1], 5633 [Flag that allows shared libraries with undefined symbols to be built]) 5634_LT_TAGDECL([], [no_undefined_flag], [1], 5635 [Flag that enforces no undefined symbols]) 5636_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5637 [Flag to hardcode $libdir into a binary during linking. 5638 This must work even if $libdir does not exist]) 5639_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5640 [[If ld is used when linking, flag to hardcode $libdir into a binary 5641 during linking. This must work even if $libdir does not exist]]) 5642_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5643 [Whether we need a single "-rpath" flag with a separated argument]) 5644_LT_TAGDECL([], [hardcode_direct], [0], 5645 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5646 DIR into the resulting binary]) 5647_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5648 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5649 DIR into the resulting binary and the resulting library dependency is 5650 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5651 library is relocated]) 5652_LT_TAGDECL([], [hardcode_minus_L], [0], 5653 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5654 into the resulting binary]) 5655_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5656 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5657 into the resulting binary]) 5658_LT_TAGDECL([], [hardcode_automatic], [0], 5659 [Set to "yes" if building a shared library automatically hardcodes DIR 5660 into the library and all subsequent libraries and executables linked 5661 against it]) 5662_LT_TAGDECL([], [inherit_rpath], [0], 5663 [Set to yes if linker adds runtime paths of dependent libraries 5664 to runtime path list]) 5665_LT_TAGDECL([], [link_all_deplibs], [0], 5666 [Whether libtool must link a program against all its dependency libraries]) 5667_LT_TAGDECL([], [always_export_symbols], [0], 5668 [Set to "yes" if exported symbols are required]) 5669_LT_TAGDECL([], [export_symbols_cmds], [2], 5670 [The commands to list exported symbols]) 5671_LT_TAGDECL([], [exclude_expsyms], [1], 5672 [Symbols that should not be listed in the preloaded symbols]) 5673_LT_TAGDECL([], [include_expsyms], [1], 5674 [Symbols that must always be exported]) 5675_LT_TAGDECL([], [prelink_cmds], [2], 5676 [Commands necessary for linking programs (against libraries) with templates]) 5677_LT_TAGDECL([], [postlink_cmds], [2], 5678 [Commands necessary for finishing linking programs]) 5679_LT_TAGDECL([], [file_list_spec], [1], 5680 [Specify filename containing input files]) 5681dnl FIXME: Not yet implemented 5682dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5683dnl [Compiler flag to generate thread safe objects]) 5684])# _LT_LINKER_SHLIBS 5685 5686 5687# _LT_LANG_C_CONFIG([TAG]) 5688# ------------------------ 5689# Ensure that the configuration variables for a C compiler are suitably 5690# defined. These variables are subsequently used by _LT_CONFIG to write 5691# the compiler configuration to `libtool'. 5692m4_defun([_LT_LANG_C_CONFIG], 5693[m4_require([_LT_DECL_EGREP])dnl 5694lt_save_CC="$CC" 5695AC_LANG_PUSH(C) 5696 5697# Source file extension for C test sources. 5698ac_ext=c 5699 5700# Object file extension for compiled C test sources. 5701objext=o 5702_LT_TAGVAR(objext, $1)=$objext 5703 5704# Code to be used in simple compile tests 5705lt_simple_compile_test_code="int some_variable = 0;" 5706 5707# Code to be used in simple link tests 5708lt_simple_link_test_code='int main(){return(0);}' 5709 5710_LT_TAG_COMPILER 5711# Save the default compiler, since it gets overwritten when the other 5712# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5713compiler_DEFAULT=$CC 5714 5715# save warnings/boilerplate of simple test code 5716_LT_COMPILER_BOILERPLATE 5717_LT_LINKER_BOILERPLATE 5718 5719if test -n "$compiler"; then 5720 _LT_COMPILER_NO_RTTI($1) 5721 _LT_COMPILER_PIC($1) 5722 _LT_COMPILER_C_O($1) 5723 _LT_COMPILER_FILE_LOCKS($1) 5724 _LT_LINKER_SHLIBS($1) 5725 _LT_SYS_DYNAMIC_LINKER($1) 5726 _LT_LINKER_HARDCODE_LIBPATH($1) 5727 LT_SYS_DLOPEN_SELF 5728 _LT_CMD_STRIPLIB 5729 5730 # Report which library types will actually be built 5731 AC_MSG_CHECKING([if libtool supports shared libraries]) 5732 AC_MSG_RESULT([$can_build_shared]) 5733 5734 AC_MSG_CHECKING([whether to build shared libraries]) 5735 test "$can_build_shared" = "no" && enable_shared=no 5736 5737 # On AIX, shared libraries and static libraries use the same namespace, and 5738 # are all built from PIC. 5739 case $host_os in 5740 aix3*) 5741 test "$enable_shared" = yes && enable_static=no 5742 if test -n "$RANLIB"; then 5743 archive_cmds="$archive_cmds~\$RANLIB \$lib" 5744 postinstall_cmds='$RANLIB $lib' 5745 fi 5746 ;; 5747 5748 aix[[4-9]]*) 5749 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5750 test "$enable_shared" = yes && enable_static=no 5751 fi 5752 ;; 5753 esac 5754 AC_MSG_RESULT([$enable_shared]) 5755 5756 AC_MSG_CHECKING([whether to build static libraries]) 5757 # Make sure either enable_shared or enable_static is yes. 5758 test "$enable_shared" = yes || enable_static=yes 5759 AC_MSG_RESULT([$enable_static]) 5760 5761 _LT_CONFIG($1) 5762fi 5763AC_LANG_POP 5764CC="$lt_save_CC" 5765])# _LT_LANG_C_CONFIG 5766 5767 5768# _LT_LANG_CXX_CONFIG([TAG]) 5769# -------------------------- 5770# Ensure that the configuration variables for a C++ compiler are suitably 5771# defined. These variables are subsequently used by _LT_CONFIG to write 5772# the compiler configuration to `libtool'. 5773m4_defun([_LT_LANG_CXX_CONFIG], 5774[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5775m4_require([_LT_DECL_EGREP])dnl 5776m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5777if test -n "$CXX" && ( test "X$CXX" != "Xno" && 5778 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5779 (test "X$CXX" != "Xg++"))) ; then 5780 AC_PROG_CXXCPP 5781else 5782 _lt_caught_CXX_error=yes 5783fi 5784 5785AC_LANG_PUSH(C++) 5786_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5787_LT_TAGVAR(allow_undefined_flag, $1)= 5788_LT_TAGVAR(always_export_symbols, $1)=no 5789_LT_TAGVAR(archive_expsym_cmds, $1)= 5790_LT_TAGVAR(compiler_needs_object, $1)=no 5791_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5792_LT_TAGVAR(hardcode_direct, $1)=no 5793_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5794_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5795_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5796_LT_TAGVAR(hardcode_libdir_separator, $1)= 5797_LT_TAGVAR(hardcode_minus_L, $1)=no 5798_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5799_LT_TAGVAR(hardcode_automatic, $1)=no 5800_LT_TAGVAR(inherit_rpath, $1)=no 5801_LT_TAGVAR(module_cmds, $1)= 5802_LT_TAGVAR(module_expsym_cmds, $1)= 5803_LT_TAGVAR(link_all_deplibs, $1)=unknown 5804_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5805_LT_TAGVAR(reload_flag, $1)=$reload_flag 5806_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5807_LT_TAGVAR(no_undefined_flag, $1)= 5808_LT_TAGVAR(whole_archive_flag_spec, $1)= 5809_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5810 5811# Source file extension for C++ test sources. 5812ac_ext=cpp 5813 5814# Object file extension for compiled C++ test sources. 5815objext=o 5816_LT_TAGVAR(objext, $1)=$objext 5817 5818# No sense in running all these tests if we already determined that 5819# the CXX compiler isn't working. Some variables (like enable_shared) 5820# are currently assumed to apply to all compilers on this platform, 5821# and will be corrupted by setting them based on a non-working compiler. 5822if test "$_lt_caught_CXX_error" != yes; then 5823 # Code to be used in simple compile tests 5824 lt_simple_compile_test_code="int some_variable = 0;" 5825 5826 # Code to be used in simple link tests 5827 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5828 5829 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5830 _LT_TAG_COMPILER 5831 5832 # save warnings/boilerplate of simple test code 5833 _LT_COMPILER_BOILERPLATE 5834 _LT_LINKER_BOILERPLATE 5835 5836 # Allow CC to be a program name with arguments. 5837 lt_save_CC=$CC 5838 lt_save_CFLAGS=$CFLAGS 5839 lt_save_LD=$LD 5840 lt_save_GCC=$GCC 5841 GCC=$GXX 5842 lt_save_with_gnu_ld=$with_gnu_ld 5843 lt_save_path_LD=$lt_cv_path_LD 5844 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5845 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5846 else 5847 $as_unset lt_cv_prog_gnu_ld 5848 fi 5849 if test -n "${lt_cv_path_LDCXX+set}"; then 5850 lt_cv_path_LD=$lt_cv_path_LDCXX 5851 else 5852 $as_unset lt_cv_path_LD 5853 fi 5854 test -z "${LDCXX+set}" || LD=$LDCXX 5855 CC=${CXX-"c++"} 5856 CFLAGS=$CXXFLAGS 5857 compiler=$CC 5858 _LT_TAGVAR(compiler, $1)=$CC 5859 _LT_CC_BASENAME([$compiler]) 5860 5861 if test -n "$compiler"; then 5862 # We don't want -fno-exception when compiling C++ code, so set the 5863 # no_builtin_flag separately 5864 if test "$GXX" = yes; then 5865 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5866 else 5867 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5868 fi 5869 5870 if test "$GXX" = yes; then 5871 # Set up default GNU C++ configuration 5872 5873 LT_PATH_LD 5874 5875 # Check if GNU C++ uses GNU ld as the underlying linker, since the 5876 # archiving commands below assume that GNU ld is being used. 5877 if test "$with_gnu_ld" = yes; then 5878 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5879 _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' 5880 5881 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5882 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5883 5884 # If archive_cmds runs LD, not CC, wlarc should be empty 5885 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5886 # investigate it a little bit more. (MM) 5887 wlarc='${wl}' 5888 5889 # ancient GNU ld didn't support --whole-archive et. al. 5890 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5891 $GREP 'no-whole-archive' > /dev/null; then 5892 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5893 else 5894 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5895 fi 5896 else 5897 with_gnu_ld=no 5898 wlarc= 5899 5900 # A generic and very simple default shared library creation 5901 # command for GNU C++ for the case where it uses the native 5902 # linker, instead of GNU ld. If possible, this setting should 5903 # overridden to take advantage of the native linker features on 5904 # the platform it is being used on. 5905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5906 fi 5907 5908 # Commands to make compiler produce verbose output that lists 5909 # what "hidden" libraries, object files and flags are used when 5910 # linking a shared library. 5911 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5912 5913 else 5914 GXX=no 5915 with_gnu_ld=no 5916 wlarc= 5917 fi 5918 5919 # PORTME: fill in a description of your system's C++ link characteristics 5920 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5921 _LT_TAGVAR(ld_shlibs, $1)=yes 5922 case $host_os in 5923 aix3*) 5924 # FIXME: insert proper C++ library support 5925 _LT_TAGVAR(ld_shlibs, $1)=no 5926 ;; 5927 aix[[4-9]]*) 5928 if test "$host_cpu" = ia64; then 5929 # On IA64, the linker does run time linking by default, so we don't 5930 # have to do anything special. 5931 aix_use_runtimelinking=no 5932 exp_sym_flag='-Bexport' 5933 no_entry_flag="" 5934 else 5935 aix_use_runtimelinking=no 5936 5937 # Test if we are trying to use run time linking or normal 5938 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5939 # need to do runtime linking. 5940 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5941 for ld_flag in $LDFLAGS; do 5942 case $ld_flag in 5943 *-brtl*) 5944 aix_use_runtimelinking=yes 5945 break 5946 ;; 5947 esac 5948 done 5949 ;; 5950 esac 5951 5952 exp_sym_flag='-bexport' 5953 no_entry_flag='-bnoentry' 5954 fi 5955 5956 # When large executables or shared objects are built, AIX ld can 5957 # have problems creating the table of contents. If linking a library 5958 # or program results in "error TOC overflow" add -mminimal-toc to 5959 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5960 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5961 5962 _LT_TAGVAR(archive_cmds, $1)='' 5963 _LT_TAGVAR(hardcode_direct, $1)=yes 5964 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5966 _LT_TAGVAR(link_all_deplibs, $1)=yes 5967 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5968 5969 if test "$GXX" = yes; then 5970 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5971 # We only want to do this on AIX 4.2 and lower, the check 5972 # below for broken collect2 doesn't work under 4.3+ 5973 collect2name=`${CC} -print-prog-name=collect2` 5974 if test -f "$collect2name" && 5975 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5976 then 5977 # We have reworked collect2 5978 : 5979 else 5980 # We have old collect2 5981 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5982 # It fails to find uninstalled libraries when the uninstalled 5983 # path is not listed in the libpath. Setting hardcode_minus_L 5984 # to unsupported forces relinking 5985 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5987 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5988 fi 5989 esac 5990 shared_flag='-shared' 5991 if test "$aix_use_runtimelinking" = yes; then 5992 shared_flag="$shared_flag "'${wl}-G' 5993 fi 5994 else 5995 # not using gcc 5996 if test "$host_cpu" = ia64; then 5997 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5998 # chokes on -Wl,-G. The following line is correct: 5999 shared_flag='-G' 6000 else 6001 if test "$aix_use_runtimelinking" = yes; then 6002 shared_flag='${wl}-G' 6003 else 6004 shared_flag='${wl}-bM:SRE' 6005 fi 6006 fi 6007 fi 6008 6009 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6010 # It seems that -bexpall does not export symbols beginning with 6011 # underscore (_), so it is better to generate a list of symbols to 6012 # export. 6013 _LT_TAGVAR(always_export_symbols, $1)=yes 6014 if test "$aix_use_runtimelinking" = yes; then 6015 # Warning - without using the other runtime loading flags (-brtl), 6016 # -berok will link without error, but may produce a broken library. 6017 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6018 # Determine the default libpath from the value encoded in an empty 6019 # executable. 6020 _LT_SYS_MODULE_PATH_AIX([$1]) 6021 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6022 6023 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6024 else 6025 if test "$host_cpu" = ia64; then 6026 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6027 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6028 _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" 6029 else 6030 # Determine the default libpath from the value encoded in an 6031 # empty executable. 6032 _LT_SYS_MODULE_PATH_AIX([$1]) 6033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6034 # Warning - without using the other run time loading flags, 6035 # -berok will link without error, but may produce a broken library. 6036 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6037 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6038 if test "$with_gnu_ld" = yes; then 6039 # We only use this code for GNU lds that support --whole-archive. 6040 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6041 else 6042 # Exported symbols can be pulled into shared objects from archives 6043 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6044 fi 6045 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6046 # This is similar to how AIX traditionally builds its shared 6047 # libraries. 6048 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6049 fi 6050 fi 6051 ;; 6052 6053 beos*) 6054 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6055 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6056 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6057 # support --undefined. This deserves some investigation. FIXME 6058 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6059 else 6060 _LT_TAGVAR(ld_shlibs, $1)=no 6061 fi 6062 ;; 6063 6064 chorus*) 6065 case $cc_basename in 6066 *) 6067 # FIXME: insert proper C++ library support 6068 _LT_TAGVAR(ld_shlibs, $1)=no 6069 ;; 6070 esac 6071 ;; 6072 6073 cygwin* | mingw* | pw32* | cegcc*) 6074 case $GXX,$cc_basename in 6075 ,cl* | no,cl*) 6076 # Native MSVC 6077 # hardcode_libdir_flag_spec is actually meaningless, as there is 6078 # no search path for DLLs. 6079 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6080 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6081 _LT_TAGVAR(always_export_symbols, $1)=yes 6082 _LT_TAGVAR(file_list_spec, $1)='@' 6083 # Tell ltmain to make .lib files, not .a files. 6084 libext=lib 6085 # Tell ltmain to make .dll files, not .so files. 6086 shrext_cmds=".dll" 6087 # FIXME: Setting linknames here is a bad hack. 6088 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6089 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6090 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6091 else 6092 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6093 fi~ 6094 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6095 linknames=' 6096 # The linker will not automatically build a static lib if we build a DLL. 6097 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6098 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6099 # Don't use ranlib 6100 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6101 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6102 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6103 case $lt_outputfile in 6104 *.exe|*.EXE) ;; 6105 *) 6106 lt_outputfile="$lt_outputfile.exe" 6107 lt_tool_outputfile="$lt_tool_outputfile.exe" 6108 ;; 6109 esac~ 6110 func_to_tool_file "$lt_outputfile"~ 6111 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6112 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6113 $RM "$lt_outputfile.manifest"; 6114 fi' 6115 ;; 6116 *) 6117 # g++ 6118 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6119 # as there is no search path for DLLs. 6120 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6121 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6122 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6123 _LT_TAGVAR(always_export_symbols, $1)=no 6124 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6125 6126 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6127 _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' 6128 # If the export-symbols file already is a .def file (1st line 6129 # is EXPORTS), use it as is; otherwise, prepend... 6130 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6131 cp $export_symbols $output_objdir/$soname.def; 6132 else 6133 echo EXPORTS > $output_objdir/$soname.def; 6134 cat $export_symbols >> $output_objdir/$soname.def; 6135 fi~ 6136 $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' 6137 else 6138 _LT_TAGVAR(ld_shlibs, $1)=no 6139 fi 6140 ;; 6141 esac 6142 ;; 6143 darwin* | rhapsody*) 6144 _LT_DARWIN_LINKER_FEATURES($1) 6145 ;; 6146 6147 dgux*) 6148 case $cc_basename in 6149 ec++*) 6150 # FIXME: insert proper C++ library support 6151 _LT_TAGVAR(ld_shlibs, $1)=no 6152 ;; 6153 ghcx*) 6154 # Green Hills C++ Compiler 6155 # FIXME: insert proper C++ library support 6156 _LT_TAGVAR(ld_shlibs, $1)=no 6157 ;; 6158 *) 6159 # FIXME: insert proper C++ library support 6160 _LT_TAGVAR(ld_shlibs, $1)=no 6161 ;; 6162 esac 6163 ;; 6164 6165 freebsd[[12]]*) 6166 # C++ shared libraries reported to be fairly broken before 6167 # switch to ELF 6168 _LT_TAGVAR(ld_shlibs, $1)=no 6169 ;; 6170 6171 freebsd-elf*) 6172 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6173 ;; 6174 6175 freebsd* | dragonfly*) 6176 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6177 # conventions 6178 _LT_TAGVAR(ld_shlibs, $1)=yes 6179 ;; 6180 6181 gnu*) 6182 ;; 6183 6184 haiku*) 6185 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6186 _LT_TAGVAR(link_all_deplibs, $1)=yes 6187 ;; 6188 6189 hpux9*) 6190 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6191 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6193 _LT_TAGVAR(hardcode_direct, $1)=yes 6194 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6195 # but as the default 6196 # location of the library. 6197 6198 case $cc_basename in 6199 CC*) 6200 # FIXME: insert proper C++ library support 6201 _LT_TAGVAR(ld_shlibs, $1)=no 6202 ;; 6203 aCC*) 6204 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6205 # Commands to make compiler produce verbose output that lists 6206 # what "hidden" libraries, object files and flags are used when 6207 # linking a shared library. 6208 # 6209 # There doesn't appear to be a way to prevent this compiler from 6210 # explicitly linking system object files so we need to strip them 6211 # from the output so that they don't get included in the library 6212 # dependencies. 6213 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"' 6214 ;; 6215 *) 6216 if test "$GXX" = yes; then 6217 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6218 else 6219 # FIXME: insert proper C++ library support 6220 _LT_TAGVAR(ld_shlibs, $1)=no 6221 fi 6222 ;; 6223 esac 6224 ;; 6225 6226 hpux10*|hpux11*) 6227 if test $with_gnu_ld = no; then 6228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6229 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6230 6231 case $host_cpu in 6232 hppa*64*|ia64*) 6233 ;; 6234 *) 6235 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6236 ;; 6237 esac 6238 fi 6239 case $host_cpu in 6240 hppa*64*|ia64*) 6241 _LT_TAGVAR(hardcode_direct, $1)=no 6242 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6243 ;; 6244 *) 6245 _LT_TAGVAR(hardcode_direct, $1)=yes 6246 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6247 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6248 # but as the default 6249 # location of the library. 6250 ;; 6251 esac 6252 6253 case $cc_basename in 6254 CC*) 6255 # FIXME: insert proper C++ library support 6256 _LT_TAGVAR(ld_shlibs, $1)=no 6257 ;; 6258 aCC*) 6259 case $host_cpu in 6260 hppa*64*) 6261 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6262 ;; 6263 ia64*) 6264 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6265 ;; 6266 *) 6267 _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' 6268 ;; 6269 esac 6270 # Commands to make compiler produce verbose output that lists 6271 # what "hidden" libraries, object files and flags are used when 6272 # linking a shared library. 6273 # 6274 # There doesn't appear to be a way to prevent this compiler from 6275 # explicitly linking system object files so we need to strip them 6276 # from the output so that they don't get included in the library 6277 # dependencies. 6278 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"' 6279 ;; 6280 *) 6281 if test "$GXX" = yes; then 6282 if test $with_gnu_ld = no; then 6283 case $host_cpu in 6284 hppa*64*) 6285 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6286 ;; 6287 ia64*) 6288 _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' 6289 ;; 6290 *) 6291 _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' 6292 ;; 6293 esac 6294 fi 6295 else 6296 # FIXME: insert proper C++ library support 6297 _LT_TAGVAR(ld_shlibs, $1)=no 6298 fi 6299 ;; 6300 esac 6301 ;; 6302 6303 interix[[3-9]]*) 6304 _LT_TAGVAR(hardcode_direct, $1)=no 6305 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6306 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6307 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6308 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6309 # Instead, shared libraries are loaded at an image base (0x10000000 by 6310 # default) and relocated if they conflict, which is a slow very memory 6311 # consuming and fragmenting process. To avoid this, we pick a random, 6312 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6313 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6314 _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' 6315 _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' 6316 ;; 6317 irix5* | irix6*) 6318 case $cc_basename in 6319 CC*) 6320 # SGI C++ 6321 _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' 6322 6323 # Archives containing C++ object files must be created using 6324 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6325 # necessary to make sure instantiated templates are included 6326 # in the archive. 6327 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6328 ;; 6329 *) 6330 if test "$GXX" = yes; then 6331 if test "$with_gnu_ld" = no; then 6332 _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' 6333 else 6334 _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' 6335 fi 6336 fi 6337 _LT_TAGVAR(link_all_deplibs, $1)=yes 6338 ;; 6339 esac 6340 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6341 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6342 _LT_TAGVAR(inherit_rpath, $1)=yes 6343 ;; 6344 6345 linux* | k*bsd*-gnu | kopensolaris*-gnu) 6346 case $cc_basename in 6347 KCC*) 6348 # Kuck and Associates, Inc. (KAI) C++ Compiler 6349 6350 # KCC will only create a shared library if the output file 6351 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6352 # to its proper name (with version) after linking. 6353 _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' 6354 _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' 6355 # Commands to make compiler produce verbose output that lists 6356 # what "hidden" libraries, object files and flags are used when 6357 # linking a shared library. 6358 # 6359 # There doesn't appear to be a way to prevent this compiler from 6360 # explicitly linking system object files so we need to strip them 6361 # from the output so that they don't get included in the library 6362 # dependencies. 6363 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"' 6364 6365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6366 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6367 6368 # Archives containing C++ object files must be created using 6369 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6370 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6371 ;; 6372 icpc* | ecpc* ) 6373 # Intel C++ 6374 with_gnu_ld=yes 6375 # version 8.0 and above of icpc choke on multiply defined symbols 6376 # if we add $predep_objects and $postdep_objects, however 7.1 and 6377 # earlier do not add the objects themselves. 6378 case `$CC -V 2>&1` in 6379 *"Version 7."*) 6380 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6381 _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' 6382 ;; 6383 *) # Version 8.0 or newer 6384 tmp_idyn= 6385 case $host_cpu in 6386 ia64*) tmp_idyn=' -i_dynamic';; 6387 esac 6388 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6389 _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' 6390 ;; 6391 esac 6392 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6394 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6395 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6396 ;; 6397 pgCC* | pgcpp*) 6398 # Portland Group C++ compiler 6399 case `$CC -V` in 6400 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6401 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6402 rm -rf $tpldir~ 6403 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6404 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6405 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6406 rm -rf $tpldir~ 6407 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6408 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6409 $RANLIB $oldlib' 6410 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6411 rm -rf $tpldir~ 6412 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6413 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6414 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6415 rm -rf $tpldir~ 6416 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6417 $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' 6418 ;; 6419 *) # Version 6 and above use weak symbols 6420 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6421 _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' 6422 ;; 6423 esac 6424 6425 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6426 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6427 _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' 6428 ;; 6429 cxx*) 6430 # Compaq C++ 6431 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6432 _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' 6433 6434 runpath_var=LD_RUN_PATH 6435 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6436 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6437 6438 # Commands to make compiler produce verbose output that lists 6439 # what "hidden" libraries, object files and flags are used when 6440 # linking a shared library. 6441 # 6442 # There doesn't appear to be a way to prevent this compiler from 6443 # explicitly linking system object files so we need to strip them 6444 # from the output so that they don't get included in the library 6445 # dependencies. 6446 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' 6447 ;; 6448 xl* | mpixl* | bgxl*) 6449 # IBM XL 8.0 on PPC, with GNU ld 6450 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6451 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6452 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6453 if test "x$supports_anon_versioning" = xyes; then 6454 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6455 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6456 echo "local: *; };" >> $output_objdir/$libname.ver~ 6457 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6458 fi 6459 ;; 6460 *) 6461 case `$CC -V 2>&1 | sed 5q` in 6462 *Sun\ C*) 6463 # Sun C++ 5.9 6464 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6465 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6466 _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' 6467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6468 _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' 6469 _LT_TAGVAR(compiler_needs_object, $1)=yes 6470 6471 # Not sure whether something based on 6472 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6473 # would be better. 6474 output_verbose_link_cmd='func_echo_all' 6475 6476 # Archives containing C++ object files must be created using 6477 # "CC -xar", where "CC" is the Sun C++ compiler. This is 6478 # necessary to make sure instantiated templates are included 6479 # in the archive. 6480 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6481 ;; 6482 esac 6483 ;; 6484 esac 6485 ;; 6486 6487 lynxos*) 6488 # FIXME: insert proper C++ library support 6489 _LT_TAGVAR(ld_shlibs, $1)=no 6490 ;; 6491 6492 m88k*) 6493 # FIXME: insert proper C++ library support 6494 _LT_TAGVAR(ld_shlibs, $1)=no 6495 ;; 6496 6497 mvs*) 6498 case $cc_basename in 6499 cxx*) 6500 # FIXME: insert proper C++ library support 6501 _LT_TAGVAR(ld_shlibs, $1)=no 6502 ;; 6503 *) 6504 # FIXME: insert proper C++ library support 6505 _LT_TAGVAR(ld_shlibs, $1)=no 6506 ;; 6507 esac 6508 ;; 6509 6510 netbsd*) 6511 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6512 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6513 wlarc= 6514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6515 _LT_TAGVAR(hardcode_direct, $1)=yes 6516 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6517 fi 6518 # Workaround some broken pre-1.5 toolchains 6519 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6520 ;; 6521 6522 *nto* | *qnx*) 6523 _LT_TAGVAR(ld_shlibs, $1)=yes 6524 ;; 6525 6526 openbsd2*) 6527 # C++ shared libraries are fairly broken 6528 _LT_TAGVAR(ld_shlibs, $1)=no 6529 ;; 6530 6531 openbsd*) 6532 if test -f /usr/libexec/ld.so; then 6533 _LT_TAGVAR(hardcode_direct, $1)=yes 6534 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6535 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6538 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6539 _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' 6540 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6541 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6542 fi 6543 output_verbose_link_cmd=func_echo_all 6544 else 6545 _LT_TAGVAR(ld_shlibs, $1)=no 6546 fi 6547 ;; 6548 6549 osf3* | osf4* | osf5*) 6550 case $cc_basename in 6551 KCC*) 6552 # Kuck and Associates, Inc. (KAI) C++ Compiler 6553 6554 # KCC will only create a shared library if the output file 6555 # ends with ".so" (or ".sl" for HP-UX), so rename the library 6556 # to its proper name (with version) after linking. 6557 _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' 6558 6559 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6560 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6561 6562 # Archives containing C++ object files must be created using 6563 # the KAI C++ compiler. 6564 case $host in 6565 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6566 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6567 esac 6568 ;; 6569 RCC*) 6570 # Rational C++ 2.4.1 6571 # FIXME: insert proper C++ library support 6572 _LT_TAGVAR(ld_shlibs, $1)=no 6573 ;; 6574 cxx*) 6575 case $host in 6576 osf3*) 6577 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6578 _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' 6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6580 ;; 6581 *) 6582 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6583 _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' 6584 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6585 echo "-hidden">> $lib.exp~ 6586 $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~ 6587 $RM $lib.exp' 6588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6589 ;; 6590 esac 6591 6592 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6593 6594 # Commands to make compiler produce verbose output that lists 6595 # what "hidden" libraries, object files and flags are used when 6596 # linking a shared library. 6597 # 6598 # There doesn't appear to be a way to prevent this compiler from 6599 # explicitly linking system object files so we need to strip them 6600 # from the output so that they don't get included in the library 6601 # dependencies. 6602 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"' 6603 ;; 6604 *) 6605 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6606 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6607 case $host in 6608 osf3*) 6609 _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' 6610 ;; 6611 *) 6612 _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' 6613 ;; 6614 esac 6615 6616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6617 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6618 6619 # Commands to make compiler produce verbose output that lists 6620 # what "hidden" libraries, object files and flags are used when 6621 # linking a shared library. 6622 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6623 6624 else 6625 # FIXME: insert proper C++ library support 6626 _LT_TAGVAR(ld_shlibs, $1)=no 6627 fi 6628 ;; 6629 esac 6630 ;; 6631 6632 psos*) 6633 # FIXME: insert proper C++ library support 6634 _LT_TAGVAR(ld_shlibs, $1)=no 6635 ;; 6636 6637 sunos4*) 6638 case $cc_basename in 6639 CC*) 6640 # Sun C++ 4.x 6641 # FIXME: insert proper C++ library support 6642 _LT_TAGVAR(ld_shlibs, $1)=no 6643 ;; 6644 lcc*) 6645 # Lucid 6646 # FIXME: insert proper C++ library support 6647 _LT_TAGVAR(ld_shlibs, $1)=no 6648 ;; 6649 *) 6650 # FIXME: insert proper C++ library support 6651 _LT_TAGVAR(ld_shlibs, $1)=no 6652 ;; 6653 esac 6654 ;; 6655 6656 solaris*) 6657 case $cc_basename in 6658 CC* | sunCC*) 6659 # Sun C++ 4.2, 5.x and Centerline C++ 6660 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6661 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6662 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6663 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6664 $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' 6665 6666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6667 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6668 case $host_os in 6669 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6670 *) 6671 # The compiler driver will combine and reorder linker options, 6672 # but understands `-z linker_flag'. 6673 # Supported since Solaris 2.6 (maybe 2.5.1?) 6674 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6675 ;; 6676 esac 6677 _LT_TAGVAR(link_all_deplibs, $1)=yes 6678 6679 output_verbose_link_cmd='func_echo_all' 6680 6681 # Archives containing C++ object files must be created using 6682 # "CC -xar", where "CC" is the Sun C++ compiler. This is 6683 # necessary to make sure instantiated templates are included 6684 # in the archive. 6685 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6686 ;; 6687 gcx*) 6688 # Green Hills C++ Compiler 6689 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6690 6691 # The C++ compiler must be used to create the archive. 6692 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6693 ;; 6694 *) 6695 # GNU C++ compiler with Solaris linker 6696 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6697 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6698 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6699 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6700 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6701 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6702 6703 # Commands to make compiler produce verbose output that lists 6704 # what "hidden" libraries, object files and flags are used when 6705 # linking a shared library. 6706 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6707 else 6708 # g++ 2.7 appears to require `-G' NOT `-shared' on this 6709 # platform. 6710 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6711 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6712 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6713 6714 # Commands to make compiler produce verbose output that lists 6715 # what "hidden" libraries, object files and flags are used when 6716 # linking a shared library. 6717 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6718 fi 6719 6720 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6721 case $host_os in 6722 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6723 *) 6724 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6725 ;; 6726 esac 6727 fi 6728 ;; 6729 esac 6730 ;; 6731 6732 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6733 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6734 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6735 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6736 runpath_var='LD_RUN_PATH' 6737 6738 case $cc_basename in 6739 CC*) 6740 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6741 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6742 ;; 6743 *) 6744 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6745 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6746 ;; 6747 esac 6748 ;; 6749 6750 sysv5* | sco3.2v5* | sco5v6*) 6751 # Note: We can NOT use -z defs as we might desire, because we do not 6752 # link with -lc, and that would cause any symbols used from libc to 6753 # always be unresolved, which means just about no library would 6754 # ever link correctly. If we're not using GNU ld we use -z text 6755 # though, which does catch some bad symbols but isn't as heavy-handed 6756 # as -z defs. 6757 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6758 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6759 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6760 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6761 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6762 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6763 _LT_TAGVAR(link_all_deplibs, $1)=yes 6764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6765 runpath_var='LD_RUN_PATH' 6766 6767 case $cc_basename in 6768 CC*) 6769 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6770 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6771 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6772 '"$_LT_TAGVAR(old_archive_cmds, $1)" 6773 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6774 '"$_LT_TAGVAR(reload_cmds, $1)" 6775 ;; 6776 *) 6777 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6778 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6779 ;; 6780 esac 6781 ;; 6782 6783 tandem*) 6784 case $cc_basename in 6785 NCC*) 6786 # NonStop-UX NCC 3.20 6787 # FIXME: insert proper C++ library support 6788 _LT_TAGVAR(ld_shlibs, $1)=no 6789 ;; 6790 *) 6791 # FIXME: insert proper C++ library support 6792 _LT_TAGVAR(ld_shlibs, $1)=no 6793 ;; 6794 esac 6795 ;; 6796 6797 vxworks*) 6798 # FIXME: insert proper C++ library support 6799 _LT_TAGVAR(ld_shlibs, $1)=no 6800 ;; 6801 6802 *) 6803 # FIXME: insert proper C++ library support 6804 _LT_TAGVAR(ld_shlibs, $1)=no 6805 ;; 6806 esac 6807 6808 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6809 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6810 6811 _LT_TAGVAR(GCC, $1)="$GXX" 6812 _LT_TAGVAR(LD, $1)="$LD" 6813 6814 ## CAVEAT EMPTOR: 6815 ## There is no encapsulation within the following macros, do not change 6816 ## the running order or otherwise move them around unless you know exactly 6817 ## what you are doing... 6818 _LT_SYS_HIDDEN_LIBDEPS($1) 6819 _LT_COMPILER_PIC($1) 6820 _LT_COMPILER_C_O($1) 6821 _LT_COMPILER_FILE_LOCKS($1) 6822 _LT_LINKER_SHLIBS($1) 6823 _LT_SYS_DYNAMIC_LINKER($1) 6824 _LT_LINKER_HARDCODE_LIBPATH($1) 6825 6826 _LT_CONFIG($1) 6827 fi # test -n "$compiler" 6828 6829 CC=$lt_save_CC 6830 CFLAGS=$lt_save_CFLAGS 6831 LDCXX=$LD 6832 LD=$lt_save_LD 6833 GCC=$lt_save_GCC 6834 with_gnu_ld=$lt_save_with_gnu_ld 6835 lt_cv_path_LDCXX=$lt_cv_path_LD 6836 lt_cv_path_LD=$lt_save_path_LD 6837 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6838 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6839fi # test "$_lt_caught_CXX_error" != yes 6840 6841AC_LANG_POP 6842])# _LT_LANG_CXX_CONFIG 6843 6844 6845# _LT_FUNC_STRIPNAME_CNF 6846# ---------------------- 6847# func_stripname_cnf prefix suffix name 6848# strip PREFIX and SUFFIX off of NAME. 6849# PREFIX and SUFFIX must not contain globbing or regex special 6850# characters, hashes, percent signs, but SUFFIX may contain a leading 6851# dot (in which case that matches only a dot). 6852# 6853# This function is identical to the (non-XSI) version of func_stripname, 6854# except this one can be used by m4 code that may be executed by configure, 6855# rather than the libtool script. 6856m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6857AC_REQUIRE([_LT_DECL_SED]) 6858AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6859func_stripname_cnf () 6860{ 6861 case ${2} in 6862 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6863 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6864 esac 6865} # func_stripname_cnf 6866])# _LT_FUNC_STRIPNAME_CNF 6867 6868# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6869# --------------------------------- 6870# Figure out "hidden" library dependencies from verbose 6871# compiler output when linking a shared library. 6872# Parse the compiler output and extract the necessary 6873# objects, libraries and library flags. 6874m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6875[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6876AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6877# Dependencies to place before and after the object being linked: 6878_LT_TAGVAR(predep_objects, $1)= 6879_LT_TAGVAR(postdep_objects, $1)= 6880_LT_TAGVAR(predeps, $1)= 6881_LT_TAGVAR(postdeps, $1)= 6882_LT_TAGVAR(compiler_lib_search_path, $1)= 6883 6884dnl we can't use the lt_simple_compile_test_code here, 6885dnl because it contains code intended for an executable, 6886dnl not a library. It's possible we should let each 6887dnl tag define a new lt_????_link_test_code variable, 6888dnl but it's only used here... 6889m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6890int a; 6891void foo (void) { a = 0; } 6892_LT_EOF 6893], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6894class Foo 6895{ 6896public: 6897 Foo (void) { a = 0; } 6898private: 6899 int a; 6900}; 6901_LT_EOF 6902], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6903 subroutine foo 6904 implicit none 6905 integer*4 a 6906 a=0 6907 return 6908 end 6909_LT_EOF 6910], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6911 subroutine foo 6912 implicit none 6913 integer a 6914 a=0 6915 return 6916 end 6917_LT_EOF 6918], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6919public class foo { 6920 private int a; 6921 public void bar (void) { 6922 a = 0; 6923 } 6924}; 6925_LT_EOF 6926]) 6927 6928_lt_libdeps_save_CFLAGS=$CFLAGS 6929case "$CC $CFLAGS " in #( 6930*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6931*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6932esac 6933 6934dnl Parse the compiler output and extract the necessary 6935dnl objects, libraries and library flags. 6936if AC_TRY_EVAL(ac_compile); then 6937 # Parse the compiler output and extract the necessary 6938 # objects, libraries and library flags. 6939 6940 # Sentinel used to keep track of whether or not we are before 6941 # the conftest object file. 6942 pre_test_object_deps_done=no 6943 6944 for p in `eval "$output_verbose_link_cmd"`; do 6945 case ${prev}${p} in 6946 6947 -L* | -R* | -l*) 6948 # Some compilers place space between "-{L,R}" and the path. 6949 # Remove the space. 6950 if test $p = "-L" || 6951 test $p = "-R"; then 6952 prev=$p 6953 continue 6954 fi 6955 6956 # Expand the sysroot to ease extracting the directories later. 6957 if test -z "$prev"; then 6958 case $p in 6959 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6960 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6961 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6962 esac 6963 fi 6964 case $p in 6965 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6966 esac 6967 if test "$pre_test_object_deps_done" = no; then 6968 case ${prev} in 6969 -L | -R) 6970 # Internal compiler library paths should come after those 6971 # provided the user. The postdeps already come after the 6972 # user supplied libs so there is no need to process them. 6973 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6974 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6975 else 6976 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6977 fi 6978 ;; 6979 # The "-l" case would never come before the object being 6980 # linked, so don't bother handling this case. 6981 esac 6982 else 6983 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6984 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6985 else 6986 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6987 fi 6988 fi 6989 prev= 6990 ;; 6991 6992 *.lto.$objext) ;; # Ignore GCC LTO objects 6993 *.$objext) 6994 # This assumes that the test object file only shows up 6995 # once in the compiler output. 6996 if test "$p" = "conftest.$objext"; then 6997 pre_test_object_deps_done=yes 6998 continue 6999 fi 7000 7001 if test "$pre_test_object_deps_done" = no; then 7002 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7003 _LT_TAGVAR(predep_objects, $1)="$p" 7004 else 7005 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7006 fi 7007 else 7008 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7009 _LT_TAGVAR(postdep_objects, $1)="$p" 7010 else 7011 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7012 fi 7013 fi 7014 ;; 7015 7016 *) ;; # Ignore the rest. 7017 7018 esac 7019 done 7020 7021 # Clean up. 7022 rm -f a.out a.exe 7023else 7024 echo "libtool.m4: error: problem compiling $1 test program" 7025fi 7026 7027$RM -f confest.$objext 7028CFLAGS=$_lt_libdeps_save_CFLAGS 7029 7030# PORTME: override above test on systems where it is broken 7031m4_if([$1], [CXX], 7032[case $host_os in 7033interix[[3-9]]*) 7034 # Interix 3.5 installs completely hosed .la files for C++, so rather than 7035 # hack all around it, let's just trust "g++" to DTRT. 7036 _LT_TAGVAR(predep_objects,$1)= 7037 _LT_TAGVAR(postdep_objects,$1)= 7038 _LT_TAGVAR(postdeps,$1)= 7039 ;; 7040 7041linux*) 7042 case `$CC -V 2>&1 | sed 5q` in 7043 *Sun\ C*) 7044 # Sun C++ 5.9 7045 7046 # The more standards-conforming stlport4 library is 7047 # incompatible with the Cstd library. Avoid specifying 7048 # it if it's in CXXFLAGS. Ignore libCrun as 7049 # -library=stlport4 depends on it. 7050 case " $CXX $CXXFLAGS " in 7051 *" -library=stlport4 "*) 7052 solaris_use_stlport4=yes 7053 ;; 7054 esac 7055 7056 if test "$solaris_use_stlport4" != yes; then 7057 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7058 fi 7059 ;; 7060 esac 7061 ;; 7062 7063solaris*) 7064 case $cc_basename in 7065 CC* | sunCC*) 7066 # The more standards-conforming stlport4 library is 7067 # incompatible with the Cstd library. Avoid specifying 7068 # it if it's in CXXFLAGS. Ignore libCrun as 7069 # -library=stlport4 depends on it. 7070 case " $CXX $CXXFLAGS " in 7071 *" -library=stlport4 "*) 7072 solaris_use_stlport4=yes 7073 ;; 7074 esac 7075 7076 # Adding this requires a known-good setup of shared libraries for 7077 # Sun compiler versions before 5.6, else PIC objects from an old 7078 # archive will be linked into the output, leading to subtle bugs. 7079 if test "$solaris_use_stlport4" != yes; then 7080 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7081 fi 7082 ;; 7083 esac 7084 ;; 7085esac 7086]) 7087 7088case " $_LT_TAGVAR(postdeps, $1) " in 7089*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7090esac 7091 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7092if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7093 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7094fi 7095_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7096 [The directories searched by this compiler when creating a shared library]) 7097_LT_TAGDECL([], [predep_objects], [1], 7098 [Dependencies to place before and after the objects being linked to 7099 create a shared library]) 7100_LT_TAGDECL([], [postdep_objects], [1]) 7101_LT_TAGDECL([], [predeps], [1]) 7102_LT_TAGDECL([], [postdeps], [1]) 7103_LT_TAGDECL([], [compiler_lib_search_path], [1], 7104 [The library search path used internally by the compiler when linking 7105 a shared library]) 7106])# _LT_SYS_HIDDEN_LIBDEPS 7107 7108 7109# _LT_LANG_F77_CONFIG([TAG]) 7110# -------------------------- 7111# Ensure that the configuration variables for a Fortran 77 compiler are 7112# suitably defined. These variables are subsequently used by _LT_CONFIG 7113# to write the compiler configuration to `libtool'. 7114m4_defun([_LT_LANG_F77_CONFIG], 7115[AC_LANG_PUSH(Fortran 77) 7116if test -z "$F77" || test "X$F77" = "Xno"; then 7117 _lt_disable_F77=yes 7118fi 7119 7120_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7121_LT_TAGVAR(allow_undefined_flag, $1)= 7122_LT_TAGVAR(always_export_symbols, $1)=no 7123_LT_TAGVAR(archive_expsym_cmds, $1)= 7124_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7125_LT_TAGVAR(hardcode_direct, $1)=no 7126_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7127_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7128_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7129_LT_TAGVAR(hardcode_libdir_separator, $1)= 7130_LT_TAGVAR(hardcode_minus_L, $1)=no 7131_LT_TAGVAR(hardcode_automatic, $1)=no 7132_LT_TAGVAR(inherit_rpath, $1)=no 7133_LT_TAGVAR(module_cmds, $1)= 7134_LT_TAGVAR(module_expsym_cmds, $1)= 7135_LT_TAGVAR(link_all_deplibs, $1)=unknown 7136_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7137_LT_TAGVAR(reload_flag, $1)=$reload_flag 7138_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7139_LT_TAGVAR(no_undefined_flag, $1)= 7140_LT_TAGVAR(whole_archive_flag_spec, $1)= 7141_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7142 7143# Source file extension for f77 test sources. 7144ac_ext=f 7145 7146# Object file extension for compiled f77 test sources. 7147objext=o 7148_LT_TAGVAR(objext, $1)=$objext 7149 7150# No sense in running all these tests if we already determined that 7151# the F77 compiler isn't working. Some variables (like enable_shared) 7152# are currently assumed to apply to all compilers on this platform, 7153# and will be corrupted by setting them based on a non-working compiler. 7154if test "$_lt_disable_F77" != yes; then 7155 # Code to be used in simple compile tests 7156 lt_simple_compile_test_code="\ 7157 subroutine t 7158 return 7159 end 7160" 7161 7162 # Code to be used in simple link tests 7163 lt_simple_link_test_code="\ 7164 program t 7165 end 7166" 7167 7168 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7169 _LT_TAG_COMPILER 7170 7171 # save warnings/boilerplate of simple test code 7172 _LT_COMPILER_BOILERPLATE 7173 _LT_LINKER_BOILERPLATE 7174 7175 # Allow CC to be a program name with arguments. 7176 lt_save_CC="$CC" 7177 lt_save_GCC=$GCC 7178 lt_save_CFLAGS=$CFLAGS 7179 CC=${F77-"f77"} 7180 CFLAGS=$FFLAGS 7181 compiler=$CC 7182 _LT_TAGVAR(compiler, $1)=$CC 7183 _LT_CC_BASENAME([$compiler]) 7184 GCC=$G77 7185 if test -n "$compiler"; then 7186 AC_MSG_CHECKING([if libtool supports shared libraries]) 7187 AC_MSG_RESULT([$can_build_shared]) 7188 7189 AC_MSG_CHECKING([whether to build shared libraries]) 7190 test "$can_build_shared" = "no" && enable_shared=no 7191 7192 # On AIX, shared libraries and static libraries use the same namespace, and 7193 # are all built from PIC. 7194 case $host_os in 7195 aix3*) 7196 test "$enable_shared" = yes && enable_static=no 7197 if test -n "$RANLIB"; then 7198 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7199 postinstall_cmds='$RANLIB $lib' 7200 fi 7201 ;; 7202 aix[[4-9]]*) 7203 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7204 test "$enable_shared" = yes && enable_static=no 7205 fi 7206 ;; 7207 esac 7208 AC_MSG_RESULT([$enable_shared]) 7209 7210 AC_MSG_CHECKING([whether to build static libraries]) 7211 # Make sure either enable_shared or enable_static is yes. 7212 test "$enable_shared" = yes || enable_static=yes 7213 AC_MSG_RESULT([$enable_static]) 7214 7215 _LT_TAGVAR(GCC, $1)="$G77" 7216 _LT_TAGVAR(LD, $1)="$LD" 7217 7218 ## CAVEAT EMPTOR: 7219 ## There is no encapsulation within the following macros, do not change 7220 ## the running order or otherwise move them around unless you know exactly 7221 ## what you are doing... 7222 _LT_COMPILER_PIC($1) 7223 _LT_COMPILER_C_O($1) 7224 _LT_COMPILER_FILE_LOCKS($1) 7225 _LT_LINKER_SHLIBS($1) 7226 _LT_SYS_DYNAMIC_LINKER($1) 7227 _LT_LINKER_HARDCODE_LIBPATH($1) 7228 7229 _LT_CONFIG($1) 7230 fi # test -n "$compiler" 7231 7232 GCC=$lt_save_GCC 7233 CC="$lt_save_CC" 7234 CFLAGS="$lt_save_CFLAGS" 7235fi # test "$_lt_disable_F77" != yes 7236 7237AC_LANG_POP 7238])# _LT_LANG_F77_CONFIG 7239 7240 7241# _LT_LANG_FC_CONFIG([TAG]) 7242# ------------------------- 7243# Ensure that the configuration variables for a Fortran compiler are 7244# suitably defined. These variables are subsequently used by _LT_CONFIG 7245# to write the compiler configuration to `libtool'. 7246m4_defun([_LT_LANG_FC_CONFIG], 7247[AC_LANG_PUSH(Fortran) 7248 7249if test -z "$FC" || test "X$FC" = "Xno"; then 7250 _lt_disable_FC=yes 7251fi 7252 7253_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7254_LT_TAGVAR(allow_undefined_flag, $1)= 7255_LT_TAGVAR(always_export_symbols, $1)=no 7256_LT_TAGVAR(archive_expsym_cmds, $1)= 7257_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7258_LT_TAGVAR(hardcode_direct, $1)=no 7259_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7260_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7261_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7262_LT_TAGVAR(hardcode_libdir_separator, $1)= 7263_LT_TAGVAR(hardcode_minus_L, $1)=no 7264_LT_TAGVAR(hardcode_automatic, $1)=no 7265_LT_TAGVAR(inherit_rpath, $1)=no 7266_LT_TAGVAR(module_cmds, $1)= 7267_LT_TAGVAR(module_expsym_cmds, $1)= 7268_LT_TAGVAR(link_all_deplibs, $1)=unknown 7269_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7270_LT_TAGVAR(reload_flag, $1)=$reload_flag 7271_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7272_LT_TAGVAR(no_undefined_flag, $1)= 7273_LT_TAGVAR(whole_archive_flag_spec, $1)= 7274_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7275 7276# Source file extension for fc test sources. 7277ac_ext=${ac_fc_srcext-f} 7278 7279# Object file extension for compiled fc test sources. 7280objext=o 7281_LT_TAGVAR(objext, $1)=$objext 7282 7283# No sense in running all these tests if we already determined that 7284# the FC compiler isn't working. Some variables (like enable_shared) 7285# are currently assumed to apply to all compilers on this platform, 7286# and will be corrupted by setting them based on a non-working compiler. 7287if test "$_lt_disable_FC" != yes; then 7288 # Code to be used in simple compile tests 7289 lt_simple_compile_test_code="\ 7290 subroutine t 7291 return 7292 end 7293" 7294 7295 # Code to be used in simple link tests 7296 lt_simple_link_test_code="\ 7297 program t 7298 end 7299" 7300 7301 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7302 _LT_TAG_COMPILER 7303 7304 # save warnings/boilerplate of simple test code 7305 _LT_COMPILER_BOILERPLATE 7306 _LT_LINKER_BOILERPLATE 7307 7308 # Allow CC to be a program name with arguments. 7309 lt_save_CC="$CC" 7310 lt_save_GCC=$GCC 7311 lt_save_CFLAGS=$CFLAGS 7312 CC=${FC-"f95"} 7313 CFLAGS=$FCFLAGS 7314 compiler=$CC 7315 GCC=$ac_cv_fc_compiler_gnu 7316 7317 _LT_TAGVAR(compiler, $1)=$CC 7318 _LT_CC_BASENAME([$compiler]) 7319 7320 if test -n "$compiler"; then 7321 AC_MSG_CHECKING([if libtool supports shared libraries]) 7322 AC_MSG_RESULT([$can_build_shared]) 7323 7324 AC_MSG_CHECKING([whether to build shared libraries]) 7325 test "$can_build_shared" = "no" && enable_shared=no 7326 7327 # On AIX, shared libraries and static libraries use the same namespace, and 7328 # are all built from PIC. 7329 case $host_os in 7330 aix3*) 7331 test "$enable_shared" = yes && enable_static=no 7332 if test -n "$RANLIB"; then 7333 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7334 postinstall_cmds='$RANLIB $lib' 7335 fi 7336 ;; 7337 aix[[4-9]]*) 7338 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7339 test "$enable_shared" = yes && enable_static=no 7340 fi 7341 ;; 7342 esac 7343 AC_MSG_RESULT([$enable_shared]) 7344 7345 AC_MSG_CHECKING([whether to build static libraries]) 7346 # Make sure either enable_shared or enable_static is yes. 7347 test "$enable_shared" = yes || enable_static=yes 7348 AC_MSG_RESULT([$enable_static]) 7349 7350 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7351 _LT_TAGVAR(LD, $1)="$LD" 7352 7353 ## CAVEAT EMPTOR: 7354 ## There is no encapsulation within the following macros, do not change 7355 ## the running order or otherwise move them around unless you know exactly 7356 ## what you are doing... 7357 _LT_SYS_HIDDEN_LIBDEPS($1) 7358 _LT_COMPILER_PIC($1) 7359 _LT_COMPILER_C_O($1) 7360 _LT_COMPILER_FILE_LOCKS($1) 7361 _LT_LINKER_SHLIBS($1) 7362 _LT_SYS_DYNAMIC_LINKER($1) 7363 _LT_LINKER_HARDCODE_LIBPATH($1) 7364 7365 _LT_CONFIG($1) 7366 fi # test -n "$compiler" 7367 7368 GCC=$lt_save_GCC 7369 CC=$lt_save_CC 7370 CFLAGS=$lt_save_CFLAGS 7371fi # test "$_lt_disable_FC" != yes 7372 7373AC_LANG_POP 7374])# _LT_LANG_FC_CONFIG 7375 7376 7377# _LT_LANG_GCJ_CONFIG([TAG]) 7378# -------------------------- 7379# Ensure that the configuration variables for the GNU Java Compiler compiler 7380# are suitably defined. These variables are subsequently used by _LT_CONFIG 7381# to write the compiler configuration to `libtool'. 7382m4_defun([_LT_LANG_GCJ_CONFIG], 7383[AC_REQUIRE([LT_PROG_GCJ])dnl 7384AC_LANG_SAVE 7385 7386# Source file extension for Java test sources. 7387ac_ext=java 7388 7389# Object file extension for compiled Java test sources. 7390objext=o 7391_LT_TAGVAR(objext, $1)=$objext 7392 7393# Code to be used in simple compile tests 7394lt_simple_compile_test_code="class foo {}" 7395 7396# Code to be used in simple link tests 7397lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7398 7399# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7400_LT_TAG_COMPILER 7401 7402# save warnings/boilerplate of simple test code 7403_LT_COMPILER_BOILERPLATE 7404_LT_LINKER_BOILERPLATE 7405 7406# Allow CC to be a program name with arguments. 7407lt_save_CC=$CC 7408lt_save_CFLAGS=$CFLAGS 7409lt_save_GCC=$GCC 7410GCC=yes 7411CC=${GCJ-"gcj"} 7412CFLAGS=$GCJFLAGS 7413compiler=$CC 7414_LT_TAGVAR(compiler, $1)=$CC 7415_LT_TAGVAR(LD, $1)="$LD" 7416_LT_CC_BASENAME([$compiler]) 7417 7418# GCJ did not exist at the time GCC didn't implicitly link libc in. 7419_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7420 7421_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7422_LT_TAGVAR(reload_flag, $1)=$reload_flag 7423_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7424 7425if test -n "$compiler"; then 7426 _LT_COMPILER_NO_RTTI($1) 7427 _LT_COMPILER_PIC($1) 7428 _LT_COMPILER_C_O($1) 7429 _LT_COMPILER_FILE_LOCKS($1) 7430 _LT_LINKER_SHLIBS($1) 7431 _LT_LINKER_HARDCODE_LIBPATH($1) 7432 7433 _LT_CONFIG($1) 7434fi 7435 7436AC_LANG_RESTORE 7437 7438GCC=$lt_save_GCC 7439CC=$lt_save_CC 7440CFLAGS=$lt_save_CFLAGS 7441])# _LT_LANG_GCJ_CONFIG 7442 7443 7444# _LT_LANG_RC_CONFIG([TAG]) 7445# ------------------------- 7446# Ensure that the configuration variables for the Windows resource compiler 7447# are suitably defined. These variables are subsequently used by _LT_CONFIG 7448# to write the compiler configuration to `libtool'. 7449m4_defun([_LT_LANG_RC_CONFIG], 7450[AC_REQUIRE([LT_PROG_RC])dnl 7451AC_LANG_SAVE 7452 7453# Source file extension for RC test sources. 7454ac_ext=rc 7455 7456# Object file extension for compiled RC test sources. 7457objext=o 7458_LT_TAGVAR(objext, $1)=$objext 7459 7460# Code to be used in simple compile tests 7461lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7462 7463# Code to be used in simple link tests 7464lt_simple_link_test_code="$lt_simple_compile_test_code" 7465 7466# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7467_LT_TAG_COMPILER 7468 7469# save warnings/boilerplate of simple test code 7470_LT_COMPILER_BOILERPLATE 7471_LT_LINKER_BOILERPLATE 7472 7473# Allow CC to be a program name with arguments. 7474lt_save_CC="$CC" 7475lt_save_CFLAGS=$CFLAGS 7476lt_save_GCC=$GCC 7477GCC= 7478CC=${RC-"windres"} 7479CFLAGS= 7480compiler=$CC 7481_LT_TAGVAR(compiler, $1)=$CC 7482_LT_CC_BASENAME([$compiler]) 7483_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7484 7485if test -n "$compiler"; then 7486 : 7487 _LT_CONFIG($1) 7488fi 7489 7490GCC=$lt_save_GCC 7491AC_LANG_RESTORE 7492CC=$lt_save_CC 7493CFLAGS=$lt_save_CFLAGS 7494])# _LT_LANG_RC_CONFIG 7495 7496 7497# LT_PROG_GCJ 7498# ----------- 7499AC_DEFUN([LT_PROG_GCJ], 7500[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7501 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7502 [AC_CHECK_TOOL(GCJ, gcj,) 7503 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7504 AC_SUBST(GCJFLAGS)])])[]dnl 7505]) 7506 7507# Old name: 7508AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7509dnl aclocal-1.4 backwards compatibility: 7510dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7511 7512 7513# LT_PROG_RC 7514# ---------- 7515AC_DEFUN([LT_PROG_RC], 7516[AC_CHECK_TOOL(RC, windres,) 7517]) 7518 7519# Old name: 7520AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7521dnl aclocal-1.4 backwards compatibility: 7522dnl AC_DEFUN([LT_AC_PROG_RC], []) 7523 7524 7525# _LT_DECL_EGREP 7526# -------------- 7527# If we don't have a new enough Autoconf to choose the best grep 7528# available, choose the one first in the user's PATH. 7529m4_defun([_LT_DECL_EGREP], 7530[AC_REQUIRE([AC_PROG_EGREP])dnl 7531AC_REQUIRE([AC_PROG_FGREP])dnl 7532test -z "$GREP" && GREP=grep 7533_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7534_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7535_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7536dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7537AC_SUBST([GREP]) 7538]) 7539 7540 7541# _LT_DECL_OBJDUMP 7542# -------------- 7543# If we don't have a new enough Autoconf to choose the best objdump 7544# available, choose the one first in the user's PATH. 7545m4_defun([_LT_DECL_OBJDUMP], 7546[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7547test -z "$OBJDUMP" && OBJDUMP=objdump 7548_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7549AC_SUBST([OBJDUMP]) 7550]) 7551 7552# _LT_DECL_DLLTOOL 7553# ---------------- 7554# Ensure DLLTOOL variable is set. 7555m4_defun([_LT_DECL_DLLTOOL], 7556[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7557test -z "$DLLTOOL" && DLLTOOL=dlltool 7558_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7559AC_SUBST([DLLTOOL]) 7560]) 7561 7562# _LT_DECL_SED 7563# ------------ 7564# Check for a fully-functional sed program, that truncates 7565# as few characters as possible. Prefer GNU sed if found. 7566m4_defun([_LT_DECL_SED], 7567[AC_PROG_SED 7568test -z "$SED" && SED=sed 7569Xsed="$SED -e 1s/^X//" 7570_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7571_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7572 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7573])# _LT_DECL_SED 7574 7575m4_ifndef([AC_PROG_SED], [ 7576# NOTE: This macro has been submitted for inclusion into # 7577# GNU Autoconf as AC_PROG_SED. When it is available in # 7578# a released version of Autoconf we should remove this # 7579# macro and use it instead. # 7580 7581m4_defun([AC_PROG_SED], 7582[AC_MSG_CHECKING([for a sed that does not truncate output]) 7583AC_CACHE_VAL(lt_cv_path_SED, 7584[# Loop through the user's path and test for sed and gsed. 7585# Then use that list of sed's as ones to test for truncation. 7586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7587for as_dir in $PATH 7588do 7589 IFS=$as_save_IFS 7590 test -z "$as_dir" && as_dir=. 7591 for lt_ac_prog in sed gsed; do 7592 for ac_exec_ext in '' $ac_executable_extensions; do 7593 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7594 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7595 fi 7596 done 7597 done 7598done 7599IFS=$as_save_IFS 7600lt_ac_max=0 7601lt_ac_count=0 7602# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7603# along with /bin/sed that truncates output. 7604for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7605 test ! -f $lt_ac_sed && continue 7606 cat /dev/null > conftest.in 7607 lt_ac_count=0 7608 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7609 # Check for GNU sed and select it if it is found. 7610 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7611 lt_cv_path_SED=$lt_ac_sed 7612 break 7613 fi 7614 while true; do 7615 cat conftest.in conftest.in >conftest.tmp 7616 mv conftest.tmp conftest.in 7617 cp conftest.in conftest.nl 7618 echo >>conftest.nl 7619 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7620 cmp -s conftest.out conftest.nl || break 7621 # 10000 chars as input seems more than enough 7622 test $lt_ac_count -gt 10 && break 7623 lt_ac_count=`expr $lt_ac_count + 1` 7624 if test $lt_ac_count -gt $lt_ac_max; then 7625 lt_ac_max=$lt_ac_count 7626 lt_cv_path_SED=$lt_ac_sed 7627 fi 7628 done 7629done 7630]) 7631SED=$lt_cv_path_SED 7632AC_SUBST([SED]) 7633AC_MSG_RESULT([$SED]) 7634])#AC_PROG_SED 7635])#m4_ifndef 7636 7637# Old name: 7638AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7639dnl aclocal-1.4 backwards compatibility: 7640dnl AC_DEFUN([LT_AC_PROG_SED], []) 7641 7642 7643# _LT_CHECK_SHELL_FEATURES 7644# ------------------------ 7645# Find out whether the shell is Bourne or XSI compatible, 7646# or has some other useful features. 7647m4_defun([_LT_CHECK_SHELL_FEATURES], 7648[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7649# Try some XSI features 7650xsi_shell=no 7651( _lt_dummy="a/b/c" 7652 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7653 = c,a/b,b/c, \ 7654 && eval 'test $(( 1 + 1 )) -eq 2 \ 7655 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7656 && xsi_shell=yes 7657AC_MSG_RESULT([$xsi_shell]) 7658_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7659 7660AC_MSG_CHECKING([whether the shell understands "+="]) 7661lt_shell_append=no 7662( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7663 >/dev/null 2>&1 \ 7664 && lt_shell_append=yes 7665AC_MSG_RESULT([$lt_shell_append]) 7666_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7667 7668if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7669 lt_unset=unset 7670else 7671 lt_unset=false 7672fi 7673_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7674 7675# test EBCDIC or ASCII 7676case `echo X|tr X '\101'` in 7677 A) # ASCII based system 7678 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7679 lt_SP2NL='tr \040 \012' 7680 lt_NL2SP='tr \015\012 \040\040' 7681 ;; 7682 *) # EBCDIC based system 7683 lt_SP2NL='tr \100 \n' 7684 lt_NL2SP='tr \r\n \100\100' 7685 ;; 7686esac 7687_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7688_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7689])# _LT_CHECK_SHELL_FEATURES 7690 7691 7692# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7693# ------------------------------------------------------ 7694# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7695# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7696m4_defun([_LT_PROG_FUNCTION_REPLACE], 7697[dnl { 7698sed -e '/^$1 ()$/,/^} # $1 /c\ 7699$1 ()\ 7700{\ 7701m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7702} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7703 && mv -f "$cfgfile.tmp" "$cfgfile" \ 7704 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7705test 0 -eq $? || _lt_function_replace_fail=: 7706]) 7707 7708 7709# _LT_PROG_REPLACE_SHELLFNS 7710# ------------------------- 7711# Replace existing portable implementations of several shell functions with 7712# equivalent extended shell implementations where those features are available.. 7713m4_defun([_LT_PROG_REPLACE_SHELLFNS], 7714[if test x"$xsi_shell" = xyes; then 7715 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7716 case ${1} in 7717 */*) func_dirname_result="${1%/*}${2}" ;; 7718 * ) func_dirname_result="${3}" ;; 7719 esac]) 7720 7721 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7722 func_basename_result="${1##*/}"]) 7723 7724 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7725 case ${1} in 7726 */*) func_dirname_result="${1%/*}${2}" ;; 7727 * ) func_dirname_result="${3}" ;; 7728 esac 7729 func_basename_result="${1##*/}"]) 7730 7731 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7732 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7733 # positional parameters, so assign one to ordinary parameter first. 7734 func_stripname_result=${3} 7735 func_stripname_result=${func_stripname_result#"${1}"} 7736 func_stripname_result=${func_stripname_result%"${2}"}]) 7737 7738 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7739 func_split_long_opt_name=${1%%=*} 7740 func_split_long_opt_arg=${1#*=}]) 7741 7742 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7743 func_split_short_opt_arg=${1#??} 7744 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7745 7746 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7747 case ${1} in 7748 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7749 *) func_lo2o_result=${1} ;; 7750 esac]) 7751 7752 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7753 7754 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7755 7756 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7757fi 7758 7759if test x"$lt_shell_append" = xyes; then 7760 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7761 7762 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7763 func_quote_for_eval "${2}" 7764dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7765 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7766 7767 # Save a `func_append' function call where possible by direct use of '+=' 7768 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7769 && mv -f "$cfgfile.tmp" "$cfgfile" \ 7770 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7771 test 0 -eq $? || _lt_function_replace_fail=: 7772else 7773 # Save a `func_append' function call even when '+=' is not available 7774 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7775 && mv -f "$cfgfile.tmp" "$cfgfile" \ 7776 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7777 test 0 -eq $? || _lt_function_replace_fail=: 7778fi 7779 7780if test x"$_lt_function_replace_fail" = x":"; then 7781 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7782fi 7783]) 7784 7785# _LT_PATH_CONVERSION_FUNCTIONS 7786# ----------------------------- 7787# Determine which file name conversion functions should be used by 7788# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7789# for certain cross-compile configurations and native mingw. 7790m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7791[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7792AC_REQUIRE([AC_CANONICAL_BUILD])dnl 7793AC_MSG_CHECKING([how to convert $build file names to $host format]) 7794AC_CACHE_VAL(lt_cv_to_host_file_cmd, 7795[case $host in 7796 *-*-mingw* ) 7797 case $build in 7798 *-*-mingw* ) # actually msys 7799 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7800 ;; 7801 *-*-cygwin* ) 7802 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7803 ;; 7804 * ) # otherwise, assume *nix 7805 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7806 ;; 7807 esac 7808 ;; 7809 *-*-cygwin* ) 7810 case $build in 7811 *-*-mingw* ) # actually msys 7812 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7813 ;; 7814 *-*-cygwin* ) 7815 lt_cv_to_host_file_cmd=func_convert_file_noop 7816 ;; 7817 * ) # otherwise, assume *nix 7818 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7819 ;; 7820 esac 7821 ;; 7822 * ) # unhandled hosts (and "normal" native builds) 7823 lt_cv_to_host_file_cmd=func_convert_file_noop 7824 ;; 7825esac 7826]) 7827to_host_file_cmd=$lt_cv_to_host_file_cmd 7828AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7829_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7830 [0], [convert $build file names to $host format])dnl 7831 7832AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7833AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7834[#assume ordinary cross tools, or native build. 7835lt_cv_to_tool_file_cmd=func_convert_file_noop 7836case $host in 7837 *-*-mingw* ) 7838 case $build in 7839 *-*-mingw* ) # actually msys 7840 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7841 ;; 7842 esac 7843 ;; 7844esac 7845]) 7846to_tool_file_cmd=$lt_cv_to_tool_file_cmd 7847AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7848_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7849 [0], [convert $build files to toolchain format])dnl 7850])# _LT_PATH_CONVERSION_FUNCTIONS 7851 7852# Helper functions for option handling. -*- Autoconf -*- 7853# 7854# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7855# Inc. 7856# Written by Gary V. Vaughan, 2004 7857# 7858# This file is free software; the Free Software Foundation gives 7859# unlimited permission to copy and/or distribute it, with or without 7860# modifications, as long as this notice is preserved. 7861 7862# serial 7 ltoptions.m4 7863 7864# This is to help aclocal find these macros, as it can't see m4_define. 7865AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7866 7867 7868# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7869# ------------------------------------------ 7870m4_define([_LT_MANGLE_OPTION], 7871[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7872 7873 7874# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7875# --------------------------------------- 7876# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7877# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7878# saved as a flag. 7879m4_define([_LT_SET_OPTION], 7880[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7881m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7882 _LT_MANGLE_DEFUN([$1], [$2]), 7883 [m4_warning([Unknown $1 option `$2'])])[]dnl 7884]) 7885 7886 7887# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7888# ------------------------------------------------------------ 7889# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7890m4_define([_LT_IF_OPTION], 7891[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7892 7893 7894# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7895# ------------------------------------------------------- 7896# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7897# are set. 7898m4_define([_LT_UNLESS_OPTIONS], 7899[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7900 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7901 [m4_define([$0_found])])])[]dnl 7902m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7903])[]dnl 7904]) 7905 7906 7907# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7908# ---------------------------------------- 7909# OPTION-LIST is a space-separated list of Libtool options associated 7910# with MACRO-NAME. If any OPTION has a matching handler declared with 7911# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7912# the unknown option and exit. 7913m4_defun([_LT_SET_OPTIONS], 7914[# Set options 7915m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7916 [_LT_SET_OPTION([$1], _LT_Option)]) 7917 7918m4_if([$1],[LT_INIT],[ 7919 dnl 7920 dnl Simply set some default values (i.e off) if boolean options were not 7921 dnl specified: 7922 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7923 ]) 7924 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7925 ]) 7926 dnl 7927 dnl If no reference was made to various pairs of opposing options, then 7928 dnl we run the default mode handler for the pair. For example, if neither 7929 dnl `shared' nor `disable-shared' was passed, we enable building of shared 7930 dnl archives by default: 7931 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7932 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7933 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7934 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7935 [_LT_ENABLE_FAST_INSTALL]) 7936 ]) 7937])# _LT_SET_OPTIONS 7938 7939 7940 7941# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7942# ----------------------------------------- 7943m4_define([_LT_MANGLE_DEFUN], 7944[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7945 7946 7947# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7948# ----------------------------------------------- 7949m4_define([LT_OPTION_DEFINE], 7950[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7951])# LT_OPTION_DEFINE 7952 7953 7954# dlopen 7955# ------ 7956LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7957]) 7958 7959AU_DEFUN([AC_LIBTOOL_DLOPEN], 7960[_LT_SET_OPTION([LT_INIT], [dlopen]) 7961AC_DIAGNOSE([obsolete], 7962[$0: Remove this warning and the call to _LT_SET_OPTION when you 7963put the `dlopen' option into LT_INIT's first parameter.]) 7964]) 7965 7966dnl aclocal-1.4 backwards compatibility: 7967dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7968 7969 7970# win32-dll 7971# --------- 7972# Declare package support for building win32 dll's. 7973LT_OPTION_DEFINE([LT_INIT], [win32-dll], 7974[enable_win32_dll=yes 7975 7976case $host in 7977*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7978 AC_CHECK_TOOL(AS, as, false) 7979 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7980 AC_CHECK_TOOL(OBJDUMP, objdump, false) 7981 ;; 7982esac 7983 7984test -z "$AS" && AS=as 7985_LT_DECL([], [AS], [1], [Assembler program])dnl 7986 7987test -z "$DLLTOOL" && DLLTOOL=dlltool 7988_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 7989 7990test -z "$OBJDUMP" && OBJDUMP=objdump 7991_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7992])# win32-dll 7993 7994AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7995[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7996_LT_SET_OPTION([LT_INIT], [win32-dll]) 7997AC_DIAGNOSE([obsolete], 7998[$0: Remove this warning and the call to _LT_SET_OPTION when you 7999put the `win32-dll' option into LT_INIT's first parameter.]) 8000]) 8001 8002dnl aclocal-1.4 backwards compatibility: 8003dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8004 8005 8006# _LT_ENABLE_SHARED([DEFAULT]) 8007# ---------------------------- 8008# implement the --enable-shared flag, and supports the `shared' and 8009# `disable-shared' LT_INIT options. 8010# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8011m4_define([_LT_ENABLE_SHARED], 8012[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8013AC_ARG_ENABLE([shared], 8014 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8015 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8016 [p=${PACKAGE-default} 8017 case $enableval in 8018 yes) enable_shared=yes ;; 8019 no) enable_shared=no ;; 8020 *) 8021 enable_shared=no 8022 # Look at the argument we got. We use all the common list separators. 8023 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8024 for pkg in $enableval; do 8025 IFS="$lt_save_ifs" 8026 if test "X$pkg" = "X$p"; then 8027 enable_shared=yes 8028 fi 8029 done 8030 IFS="$lt_save_ifs" 8031 ;; 8032 esac], 8033 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8034 8035 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8036 [Whether or not to build shared libraries]) 8037])# _LT_ENABLE_SHARED 8038 8039LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8040LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8041 8042# Old names: 8043AC_DEFUN([AC_ENABLE_SHARED], 8044[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8045]) 8046 8047AC_DEFUN([AC_DISABLE_SHARED], 8048[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8049]) 8050 8051AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8052AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8053 8054dnl aclocal-1.4 backwards compatibility: 8055dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8056dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8057 8058 8059 8060# _LT_ENABLE_STATIC([DEFAULT]) 8061# ---------------------------- 8062# implement the --enable-static flag, and support the `static' and 8063# `disable-static' LT_INIT options. 8064# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8065m4_define([_LT_ENABLE_STATIC], 8066[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8067AC_ARG_ENABLE([static], 8068 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8069 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8070 [p=${PACKAGE-default} 8071 case $enableval in 8072 yes) enable_static=yes ;; 8073 no) enable_static=no ;; 8074 *) 8075 enable_static=no 8076 # Look at the argument we got. We use all the common list separators. 8077 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8078 for pkg in $enableval; do 8079 IFS="$lt_save_ifs" 8080 if test "X$pkg" = "X$p"; then 8081 enable_static=yes 8082 fi 8083 done 8084 IFS="$lt_save_ifs" 8085 ;; 8086 esac], 8087 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8088 8089 _LT_DECL([build_old_libs], [enable_static], [0], 8090 [Whether or not to build static libraries]) 8091])# _LT_ENABLE_STATIC 8092 8093LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8094LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8095 8096# Old names: 8097AC_DEFUN([AC_ENABLE_STATIC], 8098[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8099]) 8100 8101AC_DEFUN([AC_DISABLE_STATIC], 8102[_LT_SET_OPTION([LT_INIT], [disable-static]) 8103]) 8104 8105AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8106AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8107 8108dnl aclocal-1.4 backwards compatibility: 8109dnl AC_DEFUN([AM_ENABLE_STATIC], []) 8110dnl AC_DEFUN([AM_DISABLE_STATIC], []) 8111 8112 8113 8114# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8115# ---------------------------------- 8116# implement the --enable-fast-install flag, and support the `fast-install' 8117# and `disable-fast-install' LT_INIT options. 8118# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8119m4_define([_LT_ENABLE_FAST_INSTALL], 8120[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8121AC_ARG_ENABLE([fast-install], 8122 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8123 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8124 [p=${PACKAGE-default} 8125 case $enableval in 8126 yes) enable_fast_install=yes ;; 8127 no) enable_fast_install=no ;; 8128 *) 8129 enable_fast_install=no 8130 # Look at the argument we got. We use all the common list separators. 8131 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8132 for pkg in $enableval; do 8133 IFS="$lt_save_ifs" 8134 if test "X$pkg" = "X$p"; then 8135 enable_fast_install=yes 8136 fi 8137 done 8138 IFS="$lt_save_ifs" 8139 ;; 8140 esac], 8141 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8142 8143_LT_DECL([fast_install], [enable_fast_install], [0], 8144 [Whether or not to optimize for fast installation])dnl 8145])# _LT_ENABLE_FAST_INSTALL 8146 8147LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8148LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8149 8150# Old names: 8151AU_DEFUN([AC_ENABLE_FAST_INSTALL], 8152[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8153AC_DIAGNOSE([obsolete], 8154[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8155the `fast-install' option into LT_INIT's first parameter.]) 8156]) 8157 8158AU_DEFUN([AC_DISABLE_FAST_INSTALL], 8159[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8160AC_DIAGNOSE([obsolete], 8161[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8162the `disable-fast-install' option into LT_INIT's first parameter.]) 8163]) 8164 8165dnl aclocal-1.4 backwards compatibility: 8166dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8167dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8168 8169 8170# _LT_WITH_PIC([MODE]) 8171# -------------------- 8172# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8173# LT_INIT options. 8174# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8175m4_define([_LT_WITH_PIC], 8176[AC_ARG_WITH([pic], 8177 [AS_HELP_STRING([--with-pic], 8178 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8179 [pic_mode="$withval"], 8180 [pic_mode=default]) 8181 8182test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8183 8184_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8185])# _LT_WITH_PIC 8186 8187LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8188LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8189 8190# Old name: 8191AU_DEFUN([AC_LIBTOOL_PICMODE], 8192[_LT_SET_OPTION([LT_INIT], [pic-only]) 8193AC_DIAGNOSE([obsolete], 8194[$0: Remove this warning and the call to _LT_SET_OPTION when you 8195put the `pic-only' option into LT_INIT's first parameter.]) 8196]) 8197 8198dnl aclocal-1.4 backwards compatibility: 8199dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8200 8201 8202m4_define([_LTDL_MODE], []) 8203LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8204 [m4_define([_LTDL_MODE], [nonrecursive])]) 8205LT_OPTION_DEFINE([LTDL_INIT], [recursive], 8206 [m4_define([_LTDL_MODE], [recursive])]) 8207LT_OPTION_DEFINE([LTDL_INIT], [subproject], 8208 [m4_define([_LTDL_MODE], [subproject])]) 8209 8210m4_define([_LTDL_TYPE], []) 8211LT_OPTION_DEFINE([LTDL_INIT], [installable], 8212 [m4_define([_LTDL_TYPE], [installable])]) 8213LT_OPTION_DEFINE([LTDL_INIT], [convenience], 8214 [m4_define([_LTDL_TYPE], [convenience])]) 8215 8216# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8217# 8218# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8219# Written by Gary V. Vaughan, 2004 8220# 8221# This file is free software; the Free Software Foundation gives 8222# unlimited permission to copy and/or distribute it, with or without 8223# modifications, as long as this notice is preserved. 8224 8225# serial 6 ltsugar.m4 8226 8227# This is to help aclocal find these macros, as it can't see m4_define. 8228AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8229 8230 8231# lt_join(SEP, ARG1, [ARG2...]) 8232# ----------------------------- 8233# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8234# associated separator. 8235# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8236# versions in m4sugar had bugs. 8237m4_define([lt_join], 8238[m4_if([$#], [1], [], 8239 [$#], [2], [[$2]], 8240 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8241m4_define([_lt_join], 8242[m4_if([$#$2], [2], [], 8243 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8244 8245 8246# lt_car(LIST) 8247# lt_cdr(LIST) 8248# ------------ 8249# Manipulate m4 lists. 8250# These macros are necessary as long as will still need to support 8251# Autoconf-2.59 which quotes differently. 8252m4_define([lt_car], [[$1]]) 8253m4_define([lt_cdr], 8254[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8255 [$#], 1, [], 8256 [m4_dquote(m4_shift($@))])]) 8257m4_define([lt_unquote], $1) 8258 8259 8260# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8261# ------------------------------------------ 8262# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8263# Note that neither SEPARATOR nor STRING are expanded; they are appended 8264# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8265# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8266# than defined and empty). 8267# 8268# This macro is needed until we can rely on Autoconf 2.62, since earlier 8269# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8270m4_define([lt_append], 8271[m4_define([$1], 8272 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8273 8274 8275 8276# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8277# ---------------------------------------------------------- 8278# Produce a SEP delimited list of all paired combinations of elements of 8279# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8280# has the form PREFIXmINFIXSUFFIXn. 8281# Needed until we can rely on m4_combine added in Autoconf 2.62. 8282m4_define([lt_combine], 8283[m4_if(m4_eval([$# > 3]), [1], 8284 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8285[[m4_foreach([_Lt_prefix], [$2], 8286 [m4_foreach([_Lt_suffix], 8287 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8288 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8289 8290 8291# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8292# ----------------------------------------------------------------------- 8293# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8294# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8295m4_define([lt_if_append_uniq], 8296[m4_ifdef([$1], 8297 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8298 [lt_append([$1], [$2], [$3])$4], 8299 [$5])], 8300 [lt_append([$1], [$2], [$3])$4])]) 8301 8302 8303# lt_dict_add(DICT, KEY, VALUE) 8304# ----------------------------- 8305m4_define([lt_dict_add], 8306[m4_define([$1($2)], [$3])]) 8307 8308 8309# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8310# -------------------------------------------- 8311m4_define([lt_dict_add_subkey], 8312[m4_define([$1($2:$3)], [$4])]) 8313 8314 8315# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8316# ---------------------------------- 8317m4_define([lt_dict_fetch], 8318[m4_ifval([$3], 8319 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8320 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8321 8322 8323# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8324# ----------------------------------------------------------------- 8325m4_define([lt_if_dict_fetch], 8326[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8327 [$5], 8328 [$6])]) 8329 8330 8331# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8332# -------------------------------------------------------------- 8333m4_define([lt_dict_filter], 8334[m4_if([$5], [], [], 8335 [lt_join(m4_quote(m4_default([$4], [[, ]])), 8336 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8337 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8338]) 8339 8340# ltversion.m4 -- version numbers -*- Autoconf -*- 8341# 8342# Copyright (C) 2004 Free Software Foundation, Inc. 8343# Written by Scott James Remnant, 2004 8344# 8345# This file is free software; the Free Software Foundation gives 8346# unlimited permission to copy and/or distribute it, with or without 8347# modifications, as long as this notice is preserved. 8348 8349# @configure_input@ 8350 8351# serial 3293 ltversion.m4 8352# This file is part of GNU Libtool 8353 8354m4_define([LT_PACKAGE_VERSION], [2.4]) 8355m4_define([LT_PACKAGE_REVISION], [1.3293]) 8356 8357AC_DEFUN([LTVERSION_VERSION], 8358[macro_version='2.4' 8359macro_revision='1.3293' 8360_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8361_LT_DECL(, macro_revision, 0) 8362]) 8363 8364# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8365# 8366# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8367# Written by Scott James Remnant, 2004. 8368# 8369# This file is free software; the Free Software Foundation gives 8370# unlimited permission to copy and/or distribute it, with or without 8371# modifications, as long as this notice is preserved. 8372 8373# serial 5 lt~obsolete.m4 8374 8375# These exist entirely to fool aclocal when bootstrapping libtool. 8376# 8377# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8378# which have later been changed to m4_define as they aren't part of the 8379# exported API, or moved to Autoconf or Automake where they belong. 8380# 8381# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8382# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8383# using a macro with the same name in our local m4/libtool.m4 it'll 8384# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8385# and doesn't know about Autoconf macros at all.) 8386# 8387# So we provide this file, which has a silly filename so it's always 8388# included after everything else. This provides aclocal with the 8389# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8390# because those macros already exist, or will be overwritten later. 8391# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8392# 8393# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8394# Yes, that means every name once taken will need to remain here until 8395# we give up compatibility with versions before 1.7, at which point 8396# we need to keep only those names which we still refer to. 8397 8398# This is to help aclocal find these macros, as it can't see m4_define. 8399AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8400 8401m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8402m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8403m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8404m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8405m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8406m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8407m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8408m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8409m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8410m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8411m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8412m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8413m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8414m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8415m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8416m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8417m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8418m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8419m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8420m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8421m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8422m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8423m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8424m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8425m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8426m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8427m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8428m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8429m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8430m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8431m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8432m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8433m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8434m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8435m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8436m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8437m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8438m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8439m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8440m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8441m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8442m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8443m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8444m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8445m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8446m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8447m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8448m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8449m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8450m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8451m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8452m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8453m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8454m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8455m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8456m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8457m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8458m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8459m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8460m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8461m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8462 8463# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8464# serial 1 (pkg-config-0.24) 8465# 8466# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8467# 8468# This program is free software; you can redistribute it and/or modify 8469# it under the terms of the GNU General Public License as published by 8470# the Free Software Foundation; either version 2 of the License, or 8471# (at your option) any later version. 8472# 8473# This program is distributed in the hope that it will be useful, but 8474# WITHOUT ANY WARRANTY; without even the implied warranty of 8475# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8476# General Public License for more details. 8477# 8478# You should have received a copy of the GNU General Public License 8479# along with this program; if not, write to the Free Software 8480# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8481# 8482# As a special exception to the GNU General Public License, if you 8483# distribute this file as part of a program that contains a 8484# configuration script generated by Autoconf, you may include it under 8485# the same distribution terms that you use for the rest of that program. 8486 8487# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8488# ---------------------------------- 8489AC_DEFUN([PKG_PROG_PKG_CONFIG], 8490[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8491m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8492m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 8493AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8494AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8495AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8496 8497if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8498 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8499fi 8500if test -n "$PKG_CONFIG"; then 8501 _pkg_min_version=m4_default([$1], [0.9.0]) 8502 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8503 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8504 AC_MSG_RESULT([yes]) 8505 else 8506 AC_MSG_RESULT([no]) 8507 PKG_CONFIG="" 8508 fi 8509fi[]dnl 8510])# PKG_PROG_PKG_CONFIG 8511 8512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8513# 8514# Check to see whether a particular set of modules exists. Similar 8515# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8516# 8517# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8518# only at the first occurence in configure.ac, so if the first place 8519# it's called might be skipped (such as if it is within an "if", you 8520# have to call PKG_CHECK_EXISTS manually 8521# -------------------------------------------------------------- 8522AC_DEFUN([PKG_CHECK_EXISTS], 8523[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8524if test -n "$PKG_CONFIG" && \ 8525 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8526 m4_default([$2], [:]) 8527m4_ifvaln([$3], [else 8528 $3])dnl 8529fi]) 8530 8531# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8532# --------------------------------------------- 8533m4_define([_PKG_CONFIG], 8534[if test -n "$$1"; then 8535 pkg_cv_[]$1="$$1" 8536 elif test -n "$PKG_CONFIG"; then 8537 PKG_CHECK_EXISTS([$3], 8538 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8539 test "x$?" != "x0" && pkg_failed=yes ], 8540 [pkg_failed=yes]) 8541 else 8542 pkg_failed=untried 8543fi[]dnl 8544])# _PKG_CONFIG 8545 8546# _PKG_SHORT_ERRORS_SUPPORTED 8547# ----------------------------- 8548AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8549[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8550if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8551 _pkg_short_errors_supported=yes 8552else 8553 _pkg_short_errors_supported=no 8554fi[]dnl 8555])# _PKG_SHORT_ERRORS_SUPPORTED 8556 8557 8558# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8559# [ACTION-IF-NOT-FOUND]) 8560# 8561# 8562# Note that if there is a possibility the first call to 8563# PKG_CHECK_MODULES might not happen, you should be sure to include an 8564# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8565# 8566# 8567# -------------------------------------------------------------- 8568AC_DEFUN([PKG_CHECK_MODULES], 8569[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8570AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8571AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8572 8573pkg_failed=no 8574AC_MSG_CHECKING([for $1]) 8575 8576_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8577_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8578 8579m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8580and $1[]_LIBS to avoid the need to call pkg-config. 8581See the pkg-config man page for more details.]) 8582 8583if test $pkg_failed = yes; then 8584 AC_MSG_RESULT([no]) 8585 _PKG_SHORT_ERRORS_SUPPORTED 8586 if test $_pkg_short_errors_supported = yes; then 8587 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8588 else 8589 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8590 fi 8591 # Put the nasty error message in config.log where it belongs 8592 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8593 8594 m4_default([$4], [AC_MSG_ERROR( 8595[Package requirements ($2) were not met: 8596 8597$$1_PKG_ERRORS 8598 8599Consider adjusting the PKG_CONFIG_PATH environment variable if you 8600installed software in a non-standard prefix. 8601 8602_PKG_TEXT])[]dnl 8603 ]) 8604elif test $pkg_failed = untried; then 8605 AC_MSG_RESULT([no]) 8606 m4_default([$4], [AC_MSG_FAILURE( 8607[The pkg-config script could not be found or is too old. Make sure it 8608is in your PATH or set the PKG_CONFIG environment variable to the full 8609path to pkg-config. 8610 8611_PKG_TEXT 8612 8613To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 8614 ]) 8615else 8616 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8617 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8618 AC_MSG_RESULT([yes]) 8619 $3 8620fi[]dnl 8621])# PKG_CHECK_MODULES 8622 8623 8624# PKG_INSTALLDIR(DIRECTORY) 8625# ------------------------- 8626# Substitutes the variable pkgconfigdir as the location where a module 8627# should install pkg-config .pc files. By default the directory is 8628# $libdir/pkgconfig, but the default can be changed by passing 8629# DIRECTORY. The user can override through the --with-pkgconfigdir 8630# parameter. 8631AC_DEFUN([PKG_INSTALLDIR], 8632[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 8633m4_pushdef([pkg_description], 8634 [pkg-config installation directory @<:@]pkg_default[@:>@]) 8635AC_ARG_WITH([pkgconfigdir], 8636 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 8637 [with_pkgconfigdir=]pkg_default) 8638AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 8639m4_popdef([pkg_default]) 8640m4_popdef([pkg_description]) 8641]) dnl PKG_INSTALLDIR 8642 8643 8644# PKG_NOARCH_INSTALLDIR(DIRECTORY) 8645# ------------------------- 8646# Substitutes the variable noarch_pkgconfigdir as the location where a 8647# module should install arch-independent pkg-config .pc files. By 8648# default the directory is $datadir/pkgconfig, but the default can be 8649# changed by passing DIRECTORY. The user can override through the 8650# --with-noarch-pkgconfigdir parameter. 8651AC_DEFUN([PKG_NOARCH_INSTALLDIR], 8652[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 8653m4_pushdef([pkg_description], 8654 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 8655AC_ARG_WITH([noarch-pkgconfigdir], 8656 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 8657 [with_noarch_pkgconfigdir=]pkg_default) 8658AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 8659m4_popdef([pkg_default]) 8660m4_popdef([pkg_description]) 8661]) dnl PKG_NOARCH_INSTALLDIR 8662 8663 8664# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 8665# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8666# ------------------------------------------- 8667# Retrieves the value of the pkg-config variable for the given module. 8668AC_DEFUN([PKG_CHECK_VAR], 8669[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8670AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 8671 8672_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 8673AS_VAR_COPY([$1], [pkg_cv_][$1]) 8674 8675AS_VAR_IF([$1], [""], [$5], [$4])dnl 8676])# PKG_CHECK_VAR 8677 8678dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8679dnl 8680dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8681dnl 8682dnl Permission is hereby granted, free of charge, to any person obtaining a 8683dnl copy of this software and associated documentation files (the "Software"), 8684dnl to deal in the Software without restriction, including without limitation 8685dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8686dnl and/or sell copies of the Software, and to permit persons to whom the 8687dnl Software is furnished to do so, subject to the following conditions: 8688dnl 8689dnl The above copyright notice and this permission notice (including the next 8690dnl paragraph) shall be included in all copies or substantial portions of the 8691dnl Software. 8692dnl 8693dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8694dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8695dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8696dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8697dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8698dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8699dnl DEALINGS IN THE SOFTWARE. 8700 8701# XORG_MACROS_VERSION(required-version) 8702# ------------------------------------- 8703# Minimum version: 1.1.0 8704# 8705# If you're using a macro added in Version 1.1 or newer, include this in 8706# your configure.ac with the minimum required version, such as: 8707# XORG_MACROS_VERSION(1.1) 8708# 8709# To ensure that this macro is defined, also add: 8710# m4_ifndef([XORG_MACROS_VERSION], 8711# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8712# 8713# 8714# See the "minimum version" comment for each macro you use to see what 8715# version you require. 8716m4_defun([XORG_MACROS_VERSION],[ 8717m4_define([vers_have], [1.17]) 8718m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8719m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8720m4_if(m4_cmp(maj_have, maj_needed), 0,, 8721 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8722m4_if(m4_version_compare(vers_have, [$1]), -1, 8723 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8724m4_undefine([vers_have]) 8725m4_undefine([maj_have]) 8726m4_undefine([maj_needed]) 8727]) # XORG_MACROS_VERSION 8728 8729# XORG_PROG_RAWCPP() 8730# ------------------ 8731# Minimum version: 1.0.0 8732# 8733# Find cpp program and necessary flags for use in pre-processing text files 8734# such as man pages and config files 8735AC_DEFUN([XORG_PROG_RAWCPP],[ 8736AC_REQUIRE([AC_PROG_CPP]) 8737AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8738 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8739 8740# Check for flag to avoid builtin definitions - assumes unix is predefined, 8741# which is not the best choice for supporting other OS'es, but covers most 8742# of the ones we need for now. 8743AC_MSG_CHECKING([if $RAWCPP requires -undef]) 8744AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8745if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8746 AC_MSG_RESULT([no]) 8747else 8748 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8749 RAWCPPFLAGS=-undef 8750 AC_MSG_RESULT([yes]) 8751 # under Cygwin unix is still defined even with -undef 8752 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8753 RAWCPPFLAGS="-undef -ansi" 8754 AC_MSG_RESULT([yes, with -ansi]) 8755 else 8756 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8757 fi 8758fi 8759rm -f conftest.$ac_ext 8760 8761AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8762AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8763if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8764 AC_MSG_RESULT([no]) 8765else 8766 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8767 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8768 AC_MSG_RESULT([yes]) 8769 else 8770 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8771 fi 8772fi 8773rm -f conftest.$ac_ext 8774AC_SUBST(RAWCPPFLAGS) 8775]) # XORG_PROG_RAWCPP 8776 8777# XORG_MANPAGE_SECTIONS() 8778# ----------------------- 8779# Minimum version: 1.0.0 8780# 8781# Determine which sections man pages go in for the different man page types 8782# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8783# Not sure if there's any better way than just hardcoding by OS name. 8784# Override default settings by setting environment variables 8785# Added MAN_SUBSTS in version 1.8 8786# Added AC_PROG_SED in version 1.8 8787 8788AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8789AC_REQUIRE([AC_CANONICAL_HOST]) 8790AC_REQUIRE([AC_PROG_SED]) 8791 8792if test x$APP_MAN_SUFFIX = x ; then 8793 APP_MAN_SUFFIX=1 8794fi 8795if test x$APP_MAN_DIR = x ; then 8796 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8797fi 8798 8799if test x$LIB_MAN_SUFFIX = x ; then 8800 LIB_MAN_SUFFIX=3 8801fi 8802if test x$LIB_MAN_DIR = x ; then 8803 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8804fi 8805 8806if test x$FILE_MAN_SUFFIX = x ; then 8807 case $host_os in 8808 solaris*) FILE_MAN_SUFFIX=4 ;; 8809 *) FILE_MAN_SUFFIX=5 ;; 8810 esac 8811fi 8812if test x$FILE_MAN_DIR = x ; then 8813 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8814fi 8815 8816if test x$MISC_MAN_SUFFIX = x ; then 8817 case $host_os in 8818 solaris*) MISC_MAN_SUFFIX=5 ;; 8819 *) MISC_MAN_SUFFIX=7 ;; 8820 esac 8821fi 8822if test x$MISC_MAN_DIR = x ; then 8823 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8824fi 8825 8826if test x$DRIVER_MAN_SUFFIX = x ; then 8827 case $host_os in 8828 solaris*) DRIVER_MAN_SUFFIX=7 ;; 8829 *) DRIVER_MAN_SUFFIX=4 ;; 8830 esac 8831fi 8832if test x$DRIVER_MAN_DIR = x ; then 8833 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8834fi 8835 8836if test x$ADMIN_MAN_SUFFIX = x ; then 8837 case $host_os in 8838 solaris*) ADMIN_MAN_SUFFIX=1m ;; 8839 *) ADMIN_MAN_SUFFIX=8 ;; 8840 esac 8841fi 8842if test x$ADMIN_MAN_DIR = x ; then 8843 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8844fi 8845 8846 8847AC_SUBST([APP_MAN_SUFFIX]) 8848AC_SUBST([LIB_MAN_SUFFIX]) 8849AC_SUBST([FILE_MAN_SUFFIX]) 8850AC_SUBST([MISC_MAN_SUFFIX]) 8851AC_SUBST([DRIVER_MAN_SUFFIX]) 8852AC_SUBST([ADMIN_MAN_SUFFIX]) 8853AC_SUBST([APP_MAN_DIR]) 8854AC_SUBST([LIB_MAN_DIR]) 8855AC_SUBST([FILE_MAN_DIR]) 8856AC_SUBST([MISC_MAN_DIR]) 8857AC_SUBST([DRIVER_MAN_DIR]) 8858AC_SUBST([ADMIN_MAN_DIR]) 8859 8860XORG_MAN_PAGE="X Version 11" 8861AC_SUBST([XORG_MAN_PAGE]) 8862MAN_SUBSTS="\ 8863 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8864 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8865 -e 's|__xservername__|Xorg|g' \ 8866 -e 's|__xconfigfile__|xorg.conf|g' \ 8867 -e 's|__projectroot__|\$(prefix)|g' \ 8868 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8869 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8870 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8871 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8872 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8873 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8874 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8875AC_SUBST([MAN_SUBSTS]) 8876 8877]) # XORG_MANPAGE_SECTIONS 8878 8879# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8880# ------------------------ 8881# Minimum version: 1.7.0 8882# 8883# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8884# provided by xorg-sgml-doctools, if installed. 8885AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8886AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8887XORG_SGML_PATH= 8888PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8889 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8890 [m4_ifval([$1],[:], 8891 [if test x"$cross_compiling" != x"yes" ; then 8892 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8893 [XORG_SGML_PATH=$prefix/share/sgml]) 8894 fi]) 8895 ]) 8896 8897# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8898# the path and the name of the doc stylesheet 8899if test "x$XORG_SGML_PATH" != "x" ; then 8900 AC_MSG_RESULT([$XORG_SGML_PATH]) 8901 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 8902 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 8903else 8904 AC_MSG_RESULT([no]) 8905fi 8906 8907AC_SUBST(XORG_SGML_PATH) 8908AC_SUBST(STYLESHEET_SRCDIR) 8909AC_SUBST(XSL_STYLESHEET) 8910AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 8911]) # XORG_CHECK_SGML_DOCTOOLS 8912 8913# XORG_CHECK_LINUXDOC 8914# ------------------- 8915# Minimum version: 1.0.0 8916# 8917# Defines the variable MAKE_TEXT if the necessary tools and 8918# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8919# Whether or not the necessary tools and files are found can be checked 8920# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8921AC_DEFUN([XORG_CHECK_LINUXDOC],[ 8922AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8923AC_REQUIRE([XORG_WITH_PS2PDF]) 8924 8925AC_PATH_PROG(LINUXDOC, linuxdoc) 8926 8927AC_MSG_CHECKING([whether to build documentation]) 8928 8929if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 8930 BUILDDOC=yes 8931else 8932 BUILDDOC=no 8933fi 8934 8935AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8936 8937AC_MSG_RESULT([$BUILDDOC]) 8938 8939AC_MSG_CHECKING([whether to build pdf documentation]) 8940 8941if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 8942 BUILDPDFDOC=yes 8943else 8944 BUILDPDFDOC=no 8945fi 8946 8947AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8948 8949AC_MSG_RESULT([$BUILDPDFDOC]) 8950 8951MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 8952MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8953MAKE_PDF="$PS2PDF" 8954MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8955 8956AC_SUBST(MAKE_TEXT) 8957AC_SUBST(MAKE_PS) 8958AC_SUBST(MAKE_PDF) 8959AC_SUBST(MAKE_HTML) 8960]) # XORG_CHECK_LINUXDOC 8961 8962# XORG_CHECK_DOCBOOK 8963# ------------------- 8964# Minimum version: 1.0.0 8965# 8966# Checks for the ability to build output formats from SGML DocBook source. 8967# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 8968# indicates whether the necessary tools and files are found and, if set, 8969# $(MAKE_XXX) blah.sgml will produce blah.xxx. 8970AC_DEFUN([XORG_CHECK_DOCBOOK],[ 8971AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8972 8973BUILDTXTDOC=no 8974BUILDPDFDOC=no 8975BUILDPSDOC=no 8976BUILDHTMLDOC=no 8977 8978AC_PATH_PROG(DOCBOOKPS, docbook2ps) 8979AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 8980AC_PATH_PROG(DOCBOOKHTML, docbook2html) 8981AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8982 8983AC_MSG_CHECKING([whether to build text documentation]) 8984if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 8985 test x$BUILD_TXTDOC != xno; then 8986 BUILDTXTDOC=yes 8987fi 8988AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 8989AC_MSG_RESULT([$BUILDTXTDOC]) 8990 8991AC_MSG_CHECKING([whether to build PDF documentation]) 8992if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 8993 test x$BUILD_PDFDOC != xno; then 8994 BUILDPDFDOC=yes 8995fi 8996AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8997AC_MSG_RESULT([$BUILDPDFDOC]) 8998 8999AC_MSG_CHECKING([whether to build PostScript documentation]) 9000if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9001 test x$BUILD_PSDOC != xno; then 9002 BUILDPSDOC=yes 9003fi 9004AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9005AC_MSG_RESULT([$BUILDPSDOC]) 9006 9007AC_MSG_CHECKING([whether to build HTML documentation]) 9008if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9009 test x$BUILD_HTMLDOC != xno; then 9010 BUILDHTMLDOC=yes 9011fi 9012AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9013AC_MSG_RESULT([$BUILDHTMLDOC]) 9014 9015MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9016MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9017MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9018MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9019 9020AC_SUBST(MAKE_TEXT) 9021AC_SUBST(MAKE_PS) 9022AC_SUBST(MAKE_PDF) 9023AC_SUBST(MAKE_HTML) 9024]) # XORG_CHECK_DOCBOOK 9025 9026# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9027# ---------------- 9028# Minimum version: 1.5.0 9029# Minimum version for optional DEFAULT argument: 1.11.0 9030# 9031# Documentation tools are not always available on all platforms and sometimes 9032# not at the appropriate level. This macro enables a module to test for the 9033# presence of the tool and obtain it's path in separate variables. Coupled with 9034# the --with-xmlto option, it allows maximum flexibilty in making decisions 9035# as whether or not to use the xmlto package. When DEFAULT is not specified, 9036# --with-xmlto assumes 'auto'. 9037# 9038# Interface to module: 9039# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9040# XMLTO: returns the path of the xmlto program found 9041# returns the path set by the user in the environment 9042# --with-xmlto: 'yes' user instructs the module to use xmlto 9043# 'no' user instructs the module not to use xmlto 9044# 9045# Added in version 1.10.0 9046# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9047# xmlto for text output requires either lynx, links, or w3m browsers 9048# 9049# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9050# 9051AC_DEFUN([XORG_WITH_XMLTO],[ 9052AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9053m4_define([_defopt], m4_default([$2], [auto])) 9054AC_ARG_WITH(xmlto, 9055 AS_HELP_STRING([--with-xmlto], 9056 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9057 [use_xmlto=$withval], [use_xmlto=]_defopt) 9058m4_undefine([_defopt]) 9059 9060if test "x$use_xmlto" = x"auto"; then 9061 AC_PATH_PROG([XMLTO], [xmlto]) 9062 if test "x$XMLTO" = "x"; then 9063 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9064 have_xmlto=no 9065 else 9066 have_xmlto=yes 9067 fi 9068elif test "x$use_xmlto" = x"yes" ; then 9069 AC_PATH_PROG([XMLTO], [xmlto]) 9070 if test "x$XMLTO" = "x"; then 9071 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9072 fi 9073 have_xmlto=yes 9074elif test "x$use_xmlto" = x"no" ; then 9075 if test "x$XMLTO" != "x"; then 9076 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9077 fi 9078 have_xmlto=no 9079else 9080 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9081fi 9082 9083# Test for a minimum version of xmlto, if provided. 9084m4_ifval([$1], 9085[if test "$have_xmlto" = yes; then 9086 # scrape the xmlto version 9087 AC_MSG_CHECKING([the xmlto version]) 9088 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9089 AC_MSG_RESULT([$xmlto_version]) 9090 AS_VERSION_COMPARE([$xmlto_version], [$1], 9091 [if test "x$use_xmlto" = xauto; then 9092 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9093 have_xmlto=no 9094 else 9095 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9096 fi]) 9097fi]) 9098 9099# Test for the ability of xmlto to generate a text target 9100have_xmlto_text=no 9101cat > conftest.xml << "EOF" 9102EOF 9103AS_IF([test "$have_xmlto" = yes], 9104 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9105 [have_xmlto_text=yes], 9106 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9107rm -f conftest.xml 9108AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9109AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9110]) # XORG_WITH_XMLTO 9111 9112# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9113# -------------------------------------------- 9114# Minimum version: 1.12.0 9115# Minimum version for optional DEFAULT argument: 1.12.0 9116# 9117# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9118# XML-based language used for the transformation of XML documents. 9119# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9120# It is used under the cover by xmlto to generate html files from DocBook/XML. 9121# The XSLT processor is often used as a standalone tool for transformations. 9122# It should not be assumed that this tool is used only to work with documnetation. 9123# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9124# 9125# Interface to module: 9126# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9127# XSLTPROC: returns the path of the xsltproc program found 9128# returns the path set by the user in the environment 9129# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9130# 'no' user instructs the module not to use xsltproc 9131# have_xsltproc: returns yes if xsltproc found in PATH or no 9132# 9133# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9134# 9135AC_DEFUN([XORG_WITH_XSLTPROC],[ 9136AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9137# Preserves the interface, should it be implemented later 9138m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9139m4_define([_defopt], m4_default([$2], [auto])) 9140AC_ARG_WITH(xsltproc, 9141 AS_HELP_STRING([--with-xsltproc], 9142 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9143 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9144m4_undefine([_defopt]) 9145 9146if test "x$use_xsltproc" = x"auto"; then 9147 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9148 if test "x$XSLTPROC" = "x"; then 9149 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9150 have_xsltproc=no 9151 else 9152 have_xsltproc=yes 9153 fi 9154elif test "x$use_xsltproc" = x"yes" ; then 9155 AC_PATH_PROG([XSLTPROC], [xsltproc]) 9156 if test "x$XSLTPROC" = "x"; then 9157 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9158 fi 9159 have_xsltproc=yes 9160elif test "x$use_xsltproc" = x"no" ; then 9161 if test "x$XSLTPROC" != "x"; then 9162 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9163 fi 9164 have_xsltproc=no 9165else 9166 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9167fi 9168 9169AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9170]) # XORG_WITH_XSLTPROC 9171 9172# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9173# ---------------------------------------- 9174# Minimum version: 1.15.0 9175# 9176# PERL (Practical Extraction and Report Language) is a language optimized for 9177# scanning arbitrary text files, extracting information from those text files, 9178# and printing reports based on that information. 9179# 9180# When DEFAULT is not specified, --with-perl assumes 'auto'. 9181# 9182# Interface to module: 9183# HAVE_PERL: used in makefiles to conditionally scan text files 9184# PERL: returns the path of the perl program found 9185# returns the path set by the user in the environment 9186# --with-perl: 'yes' user instructs the module to use perl 9187# 'no' user instructs the module not to use perl 9188# have_perl: returns yes if perl found in PATH or no 9189# 9190# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9191# 9192AC_DEFUN([XORG_WITH_PERL],[ 9193AC_ARG_VAR([PERL], [Path to perl command]) 9194# Preserves the interface, should it be implemented later 9195m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9196m4_define([_defopt], m4_default([$2], [auto])) 9197AC_ARG_WITH(perl, 9198 AS_HELP_STRING([--with-perl], 9199 [Use perl for extracting information from files (default: ]_defopt[)]), 9200 [use_perl=$withval], [use_perl=]_defopt) 9201m4_undefine([_defopt]) 9202 9203if test "x$use_perl" = x"auto"; then 9204 AC_PATH_PROG([PERL], [perl]) 9205 if test "x$PERL" = "x"; then 9206 AC_MSG_WARN([perl not found - cannot extract information and report]) 9207 have_perl=no 9208 else 9209 have_perl=yes 9210 fi 9211elif test "x$use_perl" = x"yes" ; then 9212 AC_PATH_PROG([PERL], [perl]) 9213 if test "x$PERL" = "x"; then 9214 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9215 fi 9216 have_perl=yes 9217elif test "x$use_perl" = x"no" ; then 9218 if test "x$PERL" != "x"; then 9219 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9220 fi 9221 have_perl=no 9222else 9223 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9224fi 9225 9226AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9227]) # XORG_WITH_PERL 9228 9229# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9230# ---------------- 9231# Minimum version: 1.5.0 9232# Minimum version for optional DEFAULT argument: 1.11.0 9233# 9234# Documentation tools are not always available on all platforms and sometimes 9235# not at the appropriate level. This macro enables a module to test for the 9236# presence of the tool and obtain it's path in separate variables. Coupled with 9237# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9238# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9239# --with-asciidoc assumes 'auto'. 9240# 9241# Interface to module: 9242# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9243# ASCIIDOC: returns the path of the asciidoc program found 9244# returns the path set by the user in the environment 9245# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9246# 'no' user instructs the module not to use asciidoc 9247# 9248# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9249# 9250AC_DEFUN([XORG_WITH_ASCIIDOC],[ 9251AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9252m4_define([_defopt], m4_default([$2], [auto])) 9253AC_ARG_WITH(asciidoc, 9254 AS_HELP_STRING([--with-asciidoc], 9255 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9256 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9257m4_undefine([_defopt]) 9258 9259if test "x$use_asciidoc" = x"auto"; then 9260 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9261 if test "x$ASCIIDOC" = "x"; then 9262 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9263 have_asciidoc=no 9264 else 9265 have_asciidoc=yes 9266 fi 9267elif test "x$use_asciidoc" = x"yes" ; then 9268 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9269 if test "x$ASCIIDOC" = "x"; then 9270 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9271 fi 9272 have_asciidoc=yes 9273elif test "x$use_asciidoc" = x"no" ; then 9274 if test "x$ASCIIDOC" != "x"; then 9275 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9276 fi 9277 have_asciidoc=no 9278else 9279 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9280fi 9281m4_ifval([$1], 9282[if test "$have_asciidoc" = yes; then 9283 # scrape the asciidoc version 9284 AC_MSG_CHECKING([the asciidoc version]) 9285 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9286 AC_MSG_RESULT([$asciidoc_version]) 9287 AS_VERSION_COMPARE([$asciidoc_version], [$1], 9288 [if test "x$use_asciidoc" = xauto; then 9289 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9290 have_asciidoc=no 9291 else 9292 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9293 fi]) 9294fi]) 9295AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9296]) # XORG_WITH_ASCIIDOC 9297 9298# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9299# -------------------------------- 9300# Minimum version: 1.5.0 9301# Minimum version for optional DEFAULT argument: 1.11.0 9302# 9303# Documentation tools are not always available on all platforms and sometimes 9304# not at the appropriate level. This macro enables a module to test for the 9305# presence of the tool and obtain it's path in separate variables. Coupled with 9306# the --with-doxygen option, it allows maximum flexibilty in making decisions 9307# as whether or not to use the doxygen package. When DEFAULT is not specified, 9308# --with-doxygen assumes 'auto'. 9309# 9310# Interface to module: 9311# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9312# DOXYGEN: returns the path of the doxygen program found 9313# returns the path set by the user in the environment 9314# --with-doxygen: 'yes' user instructs the module to use doxygen 9315# 'no' user instructs the module not to use doxygen 9316# 9317# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9318# 9319AC_DEFUN([XORG_WITH_DOXYGEN],[ 9320AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9321m4_define([_defopt], m4_default([$2], [auto])) 9322AC_ARG_WITH(doxygen, 9323 AS_HELP_STRING([--with-doxygen], 9324 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9325 [use_doxygen=$withval], [use_doxygen=]_defopt) 9326m4_undefine([_defopt]) 9327 9328if test "x$use_doxygen" = x"auto"; then 9329 AC_PATH_PROG([DOXYGEN], [doxygen]) 9330 if test "x$DOXYGEN" = "x"; then 9331 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9332 have_doxygen=no 9333 else 9334 have_doxygen=yes 9335 fi 9336elif test "x$use_doxygen" = x"yes" ; then 9337 AC_PATH_PROG([DOXYGEN], [doxygen]) 9338 if test "x$DOXYGEN" = "x"; then 9339 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9340 fi 9341 have_doxygen=yes 9342elif test "x$use_doxygen" = x"no" ; then 9343 if test "x$DOXYGEN" != "x"; then 9344 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9345 fi 9346 have_doxygen=no 9347else 9348 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9349fi 9350m4_ifval([$1], 9351[if test "$have_doxygen" = yes; then 9352 # scrape the doxygen version 9353 AC_MSG_CHECKING([the doxygen version]) 9354 doxygen_version=`$DOXYGEN --version 2>/dev/null` 9355 AC_MSG_RESULT([$doxygen_version]) 9356 AS_VERSION_COMPARE([$doxygen_version], [$1], 9357 [if test "x$use_doxygen" = xauto; then 9358 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9359 have_doxygen=no 9360 else 9361 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9362 fi]) 9363fi]) 9364AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9365]) # XORG_WITH_DOXYGEN 9366 9367# XORG_WITH_GROFF([DEFAULT]) 9368# ---------------- 9369# Minimum version: 1.6.0 9370# Minimum version for optional DEFAULT argument: 1.11.0 9371# 9372# Documentation tools are not always available on all platforms and sometimes 9373# not at the appropriate level. This macro enables a module to test for the 9374# presence of the tool and obtain it's path in separate variables. Coupled with 9375# the --with-groff option, it allows maximum flexibilty in making decisions 9376# as whether or not to use the groff package. When DEFAULT is not specified, 9377# --with-groff assumes 'auto'. 9378# 9379# Interface to module: 9380# HAVE_GROFF: used in makefiles to conditionally generate documentation 9381# HAVE_GROFF_MM: the memorandum macros (-mm) package 9382# HAVE_GROFF_MS: the -ms macros package 9383# GROFF: returns the path of the groff program found 9384# returns the path set by the user in the environment 9385# --with-groff: 'yes' user instructs the module to use groff 9386# 'no' user instructs the module not to use groff 9387# 9388# Added in version 1.9.0: 9389# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9390# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9391# psselect from the psutils package. 9392# the ghostcript package. Refer to the grohtml man pages 9393# 9394# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9395# 9396# OS and distros often splits groff in a basic and full package, the former 9397# having the groff program and the later having devices, fonts and macros 9398# Checking for the groff executable is not enough. 9399# 9400# If macros are missing, we cannot assume that groff is useless, so we don't 9401# unset HAVE_GROFF or GROFF env variables. 9402# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9403# 9404AC_DEFUN([XORG_WITH_GROFF],[ 9405AC_ARG_VAR([GROFF], [Path to groff command]) 9406m4_define([_defopt], m4_default([$1], [auto])) 9407AC_ARG_WITH(groff, 9408 AS_HELP_STRING([--with-groff], 9409 [Use groff to regenerate documentation (default: ]_defopt[)]), 9410 [use_groff=$withval], [use_groff=]_defopt) 9411m4_undefine([_defopt]) 9412 9413if test "x$use_groff" = x"auto"; then 9414 AC_PATH_PROG([GROFF], [groff]) 9415 if test "x$GROFF" = "x"; then 9416 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9417 have_groff=no 9418 else 9419 have_groff=yes 9420 fi 9421elif test "x$use_groff" = x"yes" ; then 9422 AC_PATH_PROG([GROFF], [groff]) 9423 if test "x$GROFF" = "x"; then 9424 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9425 fi 9426 have_groff=yes 9427elif test "x$use_groff" = x"no" ; then 9428 if test "x$GROFF" != "x"; then 9429 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9430 fi 9431 have_groff=no 9432else 9433 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9434fi 9435 9436# We have groff, test for the presence of the macro packages 9437if test "x$have_groff" = x"yes"; then 9438 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9439 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9440 groff_ms_works=yes 9441 else 9442 groff_ms_works=no 9443 fi 9444 AC_MSG_RESULT([$groff_ms_works]) 9445 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9446 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9447 groff_mm_works=yes 9448 else 9449 groff_mm_works=no 9450 fi 9451 AC_MSG_RESULT([$groff_mm_works]) 9452fi 9453 9454# We have groff, test for HTML dependencies, one command per package 9455if test "x$have_groff" = x"yes"; then 9456 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9457 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9458 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9459 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9460 have_groff_html=yes 9461 else 9462 have_groff_html=no 9463 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9464 fi 9465fi 9466 9467# Set Automake conditionals for Makefiles 9468AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9469AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9470AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9471AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9472]) # XORG_WITH_GROFF 9473 9474# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9475# --------------------------------------- 9476# Minimum version: 1.6.0 9477# Minimum version for optional DEFAULT argument: 1.11.0 9478# Minimum version for optional MIN-VERSION argument: 1.15.0 9479# 9480# Documentation tools are not always available on all platforms and sometimes 9481# not at the appropriate level. This macro enables a module to test for the 9482# presence of the tool and obtain it's path in separate variables. Coupled with 9483# the --with-fop option, it allows maximum flexibilty in making decisions 9484# as whether or not to use the fop package. When DEFAULT is not specified, 9485# --with-fop assumes 'auto'. 9486# 9487# Interface to module: 9488# HAVE_FOP: used in makefiles to conditionally generate documentation 9489# FOP: returns the path of the fop program found 9490# returns the path set by the user in the environment 9491# --with-fop: 'yes' user instructs the module to use fop 9492# 'no' user instructs the module not to use fop 9493# 9494# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9495# 9496AC_DEFUN([XORG_WITH_FOP],[ 9497AC_ARG_VAR([FOP], [Path to fop command]) 9498m4_define([_defopt], m4_default([$2], [auto])) 9499AC_ARG_WITH(fop, 9500 AS_HELP_STRING([--with-fop], 9501 [Use fop to regenerate documentation (default: ]_defopt[)]), 9502 [use_fop=$withval], [use_fop=]_defopt) 9503m4_undefine([_defopt]) 9504 9505if test "x$use_fop" = x"auto"; then 9506 AC_PATH_PROG([FOP], [fop]) 9507 if test "x$FOP" = "x"; then 9508 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9509 have_fop=no 9510 else 9511 have_fop=yes 9512 fi 9513elif test "x$use_fop" = x"yes" ; then 9514 AC_PATH_PROG([FOP], [fop]) 9515 if test "x$FOP" = "x"; then 9516 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9517 fi 9518 have_fop=yes 9519elif test "x$use_fop" = x"no" ; then 9520 if test "x$FOP" != "x"; then 9521 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9522 fi 9523 have_fop=no 9524else 9525 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9526fi 9527 9528# Test for a minimum version of fop, if provided. 9529m4_ifval([$1], 9530[if test "$have_fop" = yes; then 9531 # scrape the fop version 9532 AC_MSG_CHECKING([for fop minimum version]) 9533 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9534 AC_MSG_RESULT([$fop_version]) 9535 AS_VERSION_COMPARE([$fop_version], [$1], 9536 [if test "x$use_fop" = xauto; then 9537 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9538 have_fop=no 9539 else 9540 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9541 fi]) 9542fi]) 9543AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9544]) # XORG_WITH_FOP 9545 9546# XORG_WITH_PS2PDF([DEFAULT]) 9547# ---------------- 9548# Minimum version: 1.6.0 9549# Minimum version for optional DEFAULT argument: 1.11.0 9550# 9551# Documentation tools are not always available on all platforms and sometimes 9552# not at the appropriate level. This macro enables a module to test for the 9553# presence of the tool and obtain it's path in separate variables. Coupled with 9554# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9555# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9556# --with-ps2pdf assumes 'auto'. 9557# 9558# Interface to module: 9559# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9560# PS2PDF: returns the path of the ps2pdf program found 9561# returns the path set by the user in the environment 9562# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9563# 'no' user instructs the module not to use ps2pdf 9564# 9565# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9566# 9567AC_DEFUN([XORG_WITH_PS2PDF],[ 9568AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9569m4_define([_defopt], m4_default([$1], [auto])) 9570AC_ARG_WITH(ps2pdf, 9571 AS_HELP_STRING([--with-ps2pdf], 9572 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9573 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9574m4_undefine([_defopt]) 9575 9576if test "x$use_ps2pdf" = x"auto"; then 9577 AC_PATH_PROG([PS2PDF], [ps2pdf]) 9578 if test "x$PS2PDF" = "x"; then 9579 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9580 have_ps2pdf=no 9581 else 9582 have_ps2pdf=yes 9583 fi 9584elif test "x$use_ps2pdf" = x"yes" ; then 9585 AC_PATH_PROG([PS2PDF], [ps2pdf]) 9586 if test "x$PS2PDF" = "x"; then 9587 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9588 fi 9589 have_ps2pdf=yes 9590elif test "x$use_ps2pdf" = x"no" ; then 9591 if test "x$PS2PDF" != "x"; then 9592 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9593 fi 9594 have_ps2pdf=no 9595else 9596 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9597fi 9598AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9599]) # XORG_WITH_PS2PDF 9600 9601# XORG_ENABLE_DOCS (enable_docs=yes) 9602# ---------------- 9603# Minimum version: 1.6.0 9604# 9605# Documentation tools are not always available on all platforms and sometimes 9606# not at the appropriate level. This macro enables a builder to skip all 9607# documentation targets except traditional man pages. 9608# Combined with the specific tool checking macros XORG_WITH_*, it provides 9609# maximum flexibilty in controlling documentation building. 9610# Refer to: 9611# XORG_WITH_XMLTO --with-xmlto 9612# XORG_WITH_ASCIIDOC --with-asciidoc 9613# XORG_WITH_DOXYGEN --with-doxygen 9614# XORG_WITH_FOP --with-fop 9615# XORG_WITH_GROFF --with-groff 9616# XORG_WITH_PS2PDF --with-ps2pdf 9617# 9618# Interface to module: 9619# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9620# --enable-docs: 'yes' user instructs the module to generate docs 9621# 'no' user instructs the module not to generate docs 9622# parm1: specify the default value, yes or no. 9623# 9624AC_DEFUN([XORG_ENABLE_DOCS],[ 9625m4_define([docs_default], m4_default([$1], [yes])) 9626AC_ARG_ENABLE(docs, 9627 AS_HELP_STRING([--enable-docs], 9628 [Enable building the documentation (default: ]docs_default[)]), 9629 [build_docs=$enableval], [build_docs=]docs_default) 9630m4_undefine([docs_default]) 9631AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9632AC_MSG_CHECKING([whether to build documentation]) 9633AC_MSG_RESULT([$build_docs]) 9634]) # XORG_ENABLE_DOCS 9635 9636# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9637# ---------------- 9638# Minimum version: 1.6.0 9639# 9640# This macro enables a builder to skip all developer documentation. 9641# Combined with the specific tool checking macros XORG_WITH_*, it provides 9642# maximum flexibilty in controlling documentation building. 9643# Refer to: 9644# XORG_WITH_XMLTO --with-xmlto 9645# XORG_WITH_ASCIIDOC --with-asciidoc 9646# XORG_WITH_DOXYGEN --with-doxygen 9647# XORG_WITH_FOP --with-fop 9648# XORG_WITH_GROFF --with-groff 9649# XORG_WITH_PS2PDF --with-ps2pdf 9650# 9651# Interface to module: 9652# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9653# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9654# 'no' user instructs the module not to generate developer docs 9655# parm1: specify the default value, yes or no. 9656# 9657AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9658m4_define([devel_default], m4_default([$1], [yes])) 9659AC_ARG_ENABLE(devel-docs, 9660 AS_HELP_STRING([--enable-devel-docs], 9661 [Enable building the developer documentation (default: ]devel_default[)]), 9662 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9663m4_undefine([devel_default]) 9664AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9665AC_MSG_CHECKING([whether to build developer documentation]) 9666AC_MSG_RESULT([$build_devel_docs]) 9667]) # XORG_ENABLE_DEVEL_DOCS 9668 9669# XORG_ENABLE_SPECS (enable_specs=yes) 9670# ---------------- 9671# Minimum version: 1.6.0 9672# 9673# This macro enables a builder to skip all functional specification targets. 9674# Combined with the specific tool checking macros XORG_WITH_*, it provides 9675# maximum flexibilty in controlling documentation building. 9676# Refer to: 9677# XORG_WITH_XMLTO --with-xmlto 9678# XORG_WITH_ASCIIDOC --with-asciidoc 9679# XORG_WITH_DOXYGEN --with-doxygen 9680# XORG_WITH_FOP --with-fop 9681# XORG_WITH_GROFF --with-groff 9682# XORG_WITH_PS2PDF --with-ps2pdf 9683# 9684# Interface to module: 9685# ENABLE_SPECS: used in makefiles to conditionally generate specs 9686# --enable-specs: 'yes' user instructs the module to generate specs 9687# 'no' user instructs the module not to generate specs 9688# parm1: specify the default value, yes or no. 9689# 9690AC_DEFUN([XORG_ENABLE_SPECS],[ 9691m4_define([spec_default], m4_default([$1], [yes])) 9692AC_ARG_ENABLE(specs, 9693 AS_HELP_STRING([--enable-specs], 9694 [Enable building the specs (default: ]spec_default[)]), 9695 [build_specs=$enableval], [build_specs=]spec_default) 9696m4_undefine([spec_default]) 9697AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9698AC_MSG_CHECKING([whether to build functional specifications]) 9699AC_MSG_RESULT([$build_specs]) 9700]) # XORG_ENABLE_SPECS 9701 9702# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9703# ---------------------------------------------- 9704# Minimum version: 1.13.0 9705# 9706# This macro enables a builder to enable/disable unit testing 9707# It makes no assumption about the test cases implementation 9708# Test cases may or may not use Automake "Support for test suites" 9709# They may or may not use the software utility library GLib 9710# 9711# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9712# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9713# The variable enable_unit_tests is used by other macros in this file. 9714# 9715# Interface to module: 9716# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9717# enable_unit_tests: used in configure.ac for additional configuration 9718# --enable-unit-tests: 'yes' user instructs the module to build tests 9719# 'no' user instructs the module not to build tests 9720# parm1: specify the default value, yes or no. 9721# 9722AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9723AC_BEFORE([$0], [XORG_WITH_GLIB]) 9724AC_BEFORE([$0], [XORG_LD_WRAP]) 9725AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9726m4_define([_defopt], m4_default([$1], [auto])) 9727AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9728 [Enable building unit test cases (default: ]_defopt[)]), 9729 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9730m4_undefine([_defopt]) 9731AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9732AC_MSG_CHECKING([whether to build unit test cases]) 9733AC_MSG_RESULT([$enable_unit_tests]) 9734]) # XORG_ENABLE_UNIT_TESTS 9735 9736# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9737# ------------------------------------------------------ 9738# Minimum version: 1.17.0 9739# 9740# This macro enables a builder to enable/disable integration testing 9741# It makes no assumption about the test cases' implementation 9742# Test cases may or may not use Automake "Support for test suites" 9743# 9744# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9745# usually requires less dependencies and may be built and run under less 9746# stringent environments than integration tests. 9747# 9748# Interface to module: 9749# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9750# enable_integration_tests: used in configure.ac for additional configuration 9751# --enable-integration-tests: 'yes' user instructs the module to build tests 9752# 'no' user instructs the module not to build tests 9753# parm1: specify the default value, yes or no. 9754# 9755AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9756AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9757m4_define([_defopt], m4_default([$1], [auto])) 9758AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9759 [Enable building integration test cases (default: ]_defopt[)]), 9760 [enable_integration_tests=$enableval], 9761 [enable_integration_tests=]_defopt) 9762m4_undefine([_defopt]) 9763AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9764 [test "x$enable_integration_tests" != xno]) 9765AC_MSG_CHECKING([whether to build unit test cases]) 9766AC_MSG_RESULT([$enable_integration_tests]) 9767]) # XORG_ENABLE_INTEGRATION_TESTS 9768 9769# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9770# ---------------------------------------- 9771# Minimum version: 1.13.0 9772# 9773# GLib is a library which provides advanced data structures and functions. 9774# This macro enables a module to test for the presence of Glib. 9775# 9776# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9777# Otherwise the value of $enable_unit_tests is blank. 9778# 9779# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9780# test support usually requires less dependencies and may be built and run under 9781# less stringent environments than integration tests. 9782# 9783# Interface to module: 9784# HAVE_GLIB: used in makefiles to conditionally build targets 9785# with_glib: used in configure.ac to know if GLib has been found 9786# --with-glib: 'yes' user instructs the module to use glib 9787# 'no' user instructs the module not to use glib 9788# 9789AC_DEFUN([XORG_WITH_GLIB],[ 9790AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9791m4_define([_defopt], m4_default([$2], [auto])) 9792AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9793 [Use GLib library for unit testing (default: ]_defopt[)]), 9794 [with_glib=$withval], [with_glib=]_defopt) 9795m4_undefine([_defopt]) 9796 9797have_glib=no 9798# Do not probe GLib if user explicitly disabled unit testing 9799if test "x$enable_unit_tests" != x"no"; then 9800 # Do not probe GLib if user explicitly disabled it 9801 if test "x$with_glib" != x"no"; then 9802 m4_ifval( 9803 [$1], 9804 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9805 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9806 ) 9807 fi 9808fi 9809 9810# Not having GLib when unit testing has been explicitly requested is an error 9811if test "x$enable_unit_tests" = x"yes"; then 9812 if test "x$have_glib" = x"no"; then 9813 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9814 fi 9815fi 9816 9817# Having unit testing disabled when GLib has been explicitly requested is an error 9818if test "x$enable_unit_tests" = x"no"; then 9819 if test "x$with_glib" = x"yes"; then 9820 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9821 fi 9822fi 9823 9824# Not having GLib when it has been explicitly requested is an error 9825if test "x$with_glib" = x"yes"; then 9826 if test "x$have_glib" = x"no"; then 9827 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9828 fi 9829fi 9830 9831AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9832]) # XORG_WITH_GLIB 9833 9834# XORG_LD_WRAP([required|optional]) 9835# --------------------------------- 9836# Minimum version: 1.13.0 9837# 9838# Check if linker supports -wrap, passed via compiler flags 9839# 9840# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9841# Otherwise the value of $enable_unit_tests is blank. 9842# 9843# Argument added in 1.16.0 - default is "required", to match existing behavior 9844# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9845# available, an argument of "optional" allows use when some unit tests require 9846# ld -wrap and others do not. 9847# 9848AC_DEFUN([XORG_LD_WRAP],[ 9849XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9850 [AC_LANG_PROGRAM([#include <stdlib.h> 9851 void __wrap_exit(int status) { return; }], 9852 [exit(0);])]) 9853# Not having ld wrap when unit testing has been explicitly requested is an error 9854if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9855 if test "x$have_ld_wrap" = x"no"; then 9856 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9857 fi 9858fi 9859AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9860# 9861]) # XORG_LD_WRAP 9862 9863# XORG_CHECK_LINKER_FLAGS 9864# ----------------------- 9865# SYNOPSIS 9866# 9867# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9868# 9869# DESCRIPTION 9870# 9871# Check whether the given linker FLAGS work with the current language's 9872# linker, or whether they give an error. 9873# 9874# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9875# success/failure. 9876# 9877# PROGRAM-SOURCE is the program source to link with, if needed 9878# 9879# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9880# 9881# LICENSE 9882# 9883# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9884# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9885# Copyright (c) 2009 Matteo Frigo 9886# 9887# This program is free software: you can redistribute it and/or modify it 9888# under the terms of the GNU General Public License as published by the 9889# Free Software Foundation, either version 3 of the License, or (at your 9890# option) any later version. 9891# 9892# This program is distributed in the hope that it will be useful, but 9893# WITHOUT ANY WARRANTY; without even the implied warranty of 9894# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9895# Public License for more details. 9896# 9897# You should have received a copy of the GNU General Public License along 9898# with this program. If not, see <http://www.gnu.org/licenses/>. 9899# 9900# As a special exception, the respective Autoconf Macro's copyright owner 9901# gives unlimited permission to copy, distribute and modify the configure 9902# scripts that are the output of Autoconf when processing the Macro. You 9903# need not follow the terms of the GNU General Public License when using 9904# or distributing such scripts, even though portions of the text of the 9905# Macro appear in them. The GNU General Public License (GPL) does govern 9906# all other use of the material that constitutes the Autoconf Macro. 9907# 9908# This special exception to the GPL applies to versions of the Autoconf 9909# Macro released by the Autoconf Archive. When you make and distribute a 9910# modified version of the Autoconf Macro, you may extend this special 9911# exception to the GPL to apply to your modified version as well.# 9912AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 9913[AC_MSG_CHECKING([whether the linker accepts $1]) 9914dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 9915AS_LITERAL_IF([$1], 9916 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 9917 ax_save_FLAGS=$LDFLAGS 9918 LDFLAGS="$1" 9919 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 9920 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 9921 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 9922 LDFLAGS=$ax_save_FLAGS])], 9923 [ax_save_FLAGS=$LDFLAGS 9924 LDFLAGS="$1" 9925 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 9926 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 9927 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 9928 LDFLAGS=$ax_save_FLAGS]) 9929eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 9930AC_MSG_RESULT($xorg_check_linker_flags) 9931if test "x$xorg_check_linker_flags" = xyes; then 9932 m4_default([$2], :) 9933else 9934 m4_default([$3], :) 9935fi 9936]) # XORG_CHECK_LINKER_FLAGS 9937 9938# XORG_MEMORY_CHECK_FLAGS 9939# ----------------------- 9940# Minimum version: 1.16.0 9941# 9942# This macro attempts to find appropriate memory checking functionality 9943# for various platforms which unit testing code may use to catch various 9944# forms of memory allocation and access errors in testing. 9945# 9946# Interface to module: 9947# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 9948# Usually added to TESTS_ENVIRONMENT in Makefile.am 9949# 9950# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 9951# 9952AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 9953 9954AC_REQUIRE([AC_CANONICAL_HOST]) 9955AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 9956 [Environment variables to enable memory checking in tests]) 9957 9958# Check for different types of support on different platforms 9959case $host_os in 9960 solaris*) 9961 AC_CHECK_LIB([umem], [umem_alloc], 9962 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 9963 ;; 9964 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 9965 # both directly and inverted, so should not be 0 or 255. 9966 malloc_debug_env='MALLOC_PERTURB_=15' 9967 ;; 9968 darwin*) 9969 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 9970 ;; 9971 *bsd*) 9972 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 9973 ;; 9974esac 9975 9976# User supplied flags override default flags 9977if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 9978 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 9979fi 9980 9981AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 9982]) # XORG_WITH_LINT 9983 9984# XORG_CHECK_MALLOC_ZERO 9985# ---------------------- 9986# Minimum version: 1.0.0 9987# 9988# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9989# malloc(0) returns NULL. Packages should add one of these cflags to 9990# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9991AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9992AC_ARG_ENABLE(malloc0returnsnull, 9993 AS_HELP_STRING([--enable-malloc0returnsnull], 9994 [malloc(0) returns NULL (default: auto)]), 9995 [MALLOC_ZERO_RETURNS_NULL=$enableval], 9996 [MALLOC_ZERO_RETURNS_NULL=auto]) 9997 9998AC_MSG_CHECKING([whether malloc(0) returns NULL]) 9999if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10000 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10001#include <stdlib.h> 10002],[ 10003 char *m0, *r0, *c0, *p; 10004 m0 = malloc(0); 10005 p = malloc(10); 10006 r0 = realloc(p,0); 10007 c0 = calloc(0,10); 10008 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10009])], 10010 [MALLOC_ZERO_RETURNS_NULL=yes], 10011 [MALLOC_ZERO_RETURNS_NULL=no], 10012 [MALLOC_ZERO_RETURNS_NULL=yes]) 10013fi 10014AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10015 10016if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10017 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10018 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10019 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10020else 10021 MALLOC_ZERO_CFLAGS="" 10022 XMALLOC_ZERO_CFLAGS="" 10023 XTMALLOC_ZERO_CFLAGS="" 10024fi 10025 10026AC_SUBST([MALLOC_ZERO_CFLAGS]) 10027AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10028AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10029]) # XORG_CHECK_MALLOC_ZERO 10030 10031# XORG_WITH_LINT() 10032# ---------------- 10033# Minimum version: 1.1.0 10034# 10035# This macro enables the use of a tool that flags some suspicious and 10036# non-portable constructs (likely to be bugs) in C language source code. 10037# It will attempt to locate the tool and use appropriate options. 10038# There are various lint type tools on different platforms. 10039# 10040# Interface to module: 10041# LINT: returns the path to the tool found on the platform 10042# or the value set to LINT on the configure cmd line 10043# also an Automake conditional 10044# LINT_FLAGS: an Automake variable with appropriate flags 10045# 10046# --with-lint: 'yes' user instructs the module to use lint 10047# 'no' user instructs the module not to use lint (default) 10048# 10049# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10050# If the user sets the value of LINT_FLAGS, they are used verbatim. 10051# 10052AC_DEFUN([XORG_WITH_LINT],[ 10053 10054AC_ARG_VAR([LINT], [Path to a lint-style command]) 10055AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10056AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10057 [Use a lint-style source code checker (default: disabled)])], 10058 [use_lint=$withval], [use_lint=no]) 10059 10060# Obtain platform specific info like program name and options 10061# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10062case $host_os in 10063 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10064 lint_name=splint 10065 lint_options="-badflag" 10066 ;; 10067 *freebsd* | *netbsd*) 10068 lint_name=lint 10069 lint_options="-u -b" 10070 ;; 10071 *solaris*) 10072 lint_name=lint 10073 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10074 ;; 10075esac 10076 10077# Test for the presence of the program (either guessed by the code or spelled out by the user) 10078if test "x$use_lint" = x"yes" ; then 10079 AC_PATH_PROG([LINT], [$lint_name]) 10080 if test "x$LINT" = "x"; then 10081 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10082 fi 10083elif test "x$use_lint" = x"no" ; then 10084 if test "x$LINT" != "x"; then 10085 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10086 fi 10087else 10088 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10089fi 10090 10091# User supplied flags override default flags 10092if test "x$LINT_FLAGS" != "x"; then 10093 lint_options=$LINT_FLAGS 10094fi 10095 10096AC_SUBST([LINT_FLAGS],[$lint_options]) 10097AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10098 10099]) # XORG_WITH_LINT 10100 10101# XORG_LINT_LIBRARY(LIBNAME) 10102# -------------------------- 10103# Minimum version: 1.1.0 10104# 10105# Sets up flags for building lint libraries for checking programs that call 10106# functions in the library. 10107# 10108# Interface to module: 10109# LINTLIB - Automake variable with the name of lint library file to make 10110# MAKE_LINT_LIB - Automake conditional 10111# 10112# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10113# - 'no' user instructs the module not to create a lint library (default) 10114 10115AC_DEFUN([XORG_LINT_LIBRARY],[ 10116AC_REQUIRE([XORG_WITH_LINT]) 10117AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10118 [Create lint library (default: disabled)])], 10119 [make_lint_lib=$enableval], [make_lint_lib=no]) 10120 10121if test "x$make_lint_lib" = x"yes" ; then 10122 LINTLIB=llib-l$1.ln 10123 if test "x$LINT" = "x"; then 10124 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10125 fi 10126elif test "x$make_lint_lib" != x"no" ; then 10127 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10128fi 10129 10130AC_SUBST(LINTLIB) 10131AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10132 10133]) # XORG_LINT_LIBRARY 10134 10135# XORG_COMPILER_BRAND 10136# ------------------- 10137# Minimum version: 1.14.0 10138# 10139# Checks for various brands of compilers and sets flags as appropriate: 10140# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10141# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10142# clang compiler - sets CLANGCC to "yes" 10143# Intel compiler - sets INTELCC to "yes" 10144# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10145# 10146AC_DEFUN([XORG_COMPILER_BRAND], [ 10147AC_LANG_CASE( 10148 [C], [ 10149 AC_REQUIRE([AC_PROG_CC_C99]) 10150 ], 10151 [C++], [ 10152 AC_REQUIRE([AC_PROG_CXX]) 10153 ] 10154) 10155AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10156AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10157AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10158]) # XORG_COMPILER_BRAND 10159 10160# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10161# --------------- 10162# Minimum version: 1.16.0 10163# 10164# Test if the compiler works when passed the given flag as a command line argument. 10165# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10166# next flag in the list until there are no more options. 10167# 10168# Note that this does not guarantee that the compiler supports the flag as some 10169# compilers will simply ignore arguments that they do not understand, but we do 10170# attempt to weed out false positives by using -Werror=unknown-warning-option and 10171# -Werror=unused-command-line-argument 10172# 10173AC_DEFUN([XORG_TESTSET_CFLAG], [ 10174m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10175m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10176 10177AC_LANG_COMPILER_REQUIRE 10178 10179AC_LANG_CASE( 10180 [C], [ 10181 AC_REQUIRE([AC_PROG_CC_C99]) 10182 define([PREFIX], [C]) 10183 define([CACHE_PREFIX], [cc]) 10184 define([COMPILER], [$CC]) 10185 ], 10186 [C++], [ 10187 define([PREFIX], [CXX]) 10188 define([CACHE_PREFIX], [cxx]) 10189 define([COMPILER], [$CXX]) 10190 ] 10191) 10192 10193[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10194 10195if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10196 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10197 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10198 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10199 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10200 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10201 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10202 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10203 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10204fi 10205 10206if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10207 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10208 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10209 fi 10210 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10211 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10212 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10213 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10214 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10215 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10216 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10217 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10218fi 10219 10220found="no" 10221m4_foreach([flag], m4_cdr($@), [ 10222 if test $found = "no" ; then 10223 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10224 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10225 fi 10226 10227 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10228 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10229 fi 10230 10231 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10232 10233dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10234 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10235 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10236 AC_CACHE_VAL($cacheid, 10237 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10238 [eval $cacheid=yes], 10239 [eval $cacheid=no])]) 10240 10241 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10242 10243 eval supported=\$$cacheid 10244 AC_MSG_RESULT([$supported]) 10245 if test "$supported" = "yes" ; then 10246 $1="$$1 ]flag[" 10247 found="yes" 10248 fi 10249 fi 10250]) 10251]) # XORG_TESTSET_CFLAG 10252 10253# XORG_COMPILER_FLAGS 10254# --------------- 10255# Minimum version: 1.16.0 10256# 10257# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10258# arguments supported by the selected compiler which do NOT alter the generated 10259# code. These arguments will cause the compiler to print various warnings 10260# during compilation AND turn a conservative set of warnings into errors. 10261# 10262# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10263# future versions of util-macros as options are added to new compilers. 10264# 10265AC_DEFUN([XORG_COMPILER_FLAGS], [ 10266AC_REQUIRE([XORG_COMPILER_BRAND]) 10267 10268AC_ARG_ENABLE(selective-werror, 10269 AS_HELP_STRING([--disable-selective-werror], 10270 [Turn off selective compiler errors. (default: enabled)]), 10271 [SELECTIVE_WERROR=$enableval], 10272 [SELECTIVE_WERROR=yes]) 10273 10274AC_LANG_CASE( 10275 [C], [ 10276 define([PREFIX], [C]) 10277 ], 10278 [C++], [ 10279 define([PREFIX], [CXX]) 10280 ] 10281) 10282# -v is too short to test reliably with XORG_TESTSET_CFLAG 10283if test "x$SUNCC" = "xyes"; then 10284 [BASE_]PREFIX[FLAGS]="-v" 10285else 10286 [BASE_]PREFIX[FLAGS]="" 10287fi 10288 10289# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10290XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10291XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10292XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10293XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10294 10295AC_LANG_CASE( 10296 [C], [ 10297 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10298 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10299 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10300 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10301 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10302 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10303 ] 10304) 10305 10306# This chunk adds additional warnings that could catch undesired effects. 10307XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10308XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10309XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10310XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10311XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10312XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10313XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10314 10315# These are currently disabled because they are noisy. They will be enabled 10316# in the future once the codebase is sufficiently modernized to silence 10317# them. For now, I don't want them to drown out the other warnings. 10318# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10319# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10320# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10321 10322# Turn some warnings into errors, so we don't accidently get successful builds 10323# when there are problems that should be fixed. 10324 10325if test "x$SELECTIVE_WERROR" = "xyes" ; then 10326XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10327XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10328XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10329XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10330XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10331XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10332XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10333XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10334XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10335XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10336XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10337XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10338XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10339else 10340AC_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]) 10341XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10342XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10343XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10344XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10345XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10346XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10347XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10348XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10349XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10350XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10351XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10352XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10353XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10354fi 10355 10356AC_SUBST([BASE_]PREFIX[FLAGS]) 10357]) # XORG_COMPILER_FLAGS 10358 10359# XORG_CWARNFLAGS 10360# --------------- 10361# Minimum version: 1.2.0 10362# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10363# 10364# Defines CWARNFLAGS to enable C compiler warnings. 10365# 10366# This function is deprecated because it defines -fno-strict-aliasing 10367# which alters the code generated by the compiler. If -fno-strict-aliasing 10368# is needed, then it should be added explicitly in the module when 10369# it is updated to use BASE_CFLAGS. 10370# 10371AC_DEFUN([XORG_CWARNFLAGS], [ 10372AC_REQUIRE([XORG_COMPILER_FLAGS]) 10373AC_REQUIRE([XORG_COMPILER_BRAND]) 10374AC_LANG_CASE( 10375 [C], [ 10376 CWARNFLAGS="$BASE_CFLAGS" 10377 if test "x$GCC" = xyes ; then 10378 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10379 fi 10380 AC_SUBST(CWARNFLAGS) 10381 ] 10382) 10383]) # XORG_CWARNFLAGS 10384 10385# XORG_STRICT_OPTION 10386# ----------------------- 10387# Minimum version: 1.3.0 10388# 10389# Add configure option to enable strict compilation flags, such as treating 10390# warnings as fatal errors. 10391# If --enable-strict-compilation is passed to configure, adds strict flags to 10392# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10393# 10394# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10395# when strict compilation is unconditionally desired. 10396AC_DEFUN([XORG_STRICT_OPTION], [ 10397AC_REQUIRE([XORG_CWARNFLAGS]) 10398AC_REQUIRE([XORG_COMPILER_FLAGS]) 10399 10400AC_ARG_ENABLE(strict-compilation, 10401 AS_HELP_STRING([--enable-strict-compilation], 10402 [Enable all warnings from compiler and make them errors (default: disabled)]), 10403 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10404 10405AC_LANG_CASE( 10406 [C], [ 10407 define([PREFIX], [C]) 10408 ], 10409 [C++], [ 10410 define([PREFIX], [CXX]) 10411 ] 10412) 10413 10414[STRICT_]PREFIX[FLAGS]="" 10415XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10416XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10417 10418# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10419# activate it with -Werror, so we add it here explicitly. 10420XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10421 10422if test "x$STRICT_COMPILE" = "xyes"; then 10423 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10424 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10425fi 10426AC_SUBST([STRICT_]PREFIX[FLAGS]) 10427AC_SUBST([BASE_]PREFIX[FLAGS]) 10428AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10429]) # XORG_STRICT_OPTION 10430 10431# XORG_DEFAULT_OPTIONS 10432# -------------------- 10433# Minimum version: 1.3.0 10434# 10435# Defines default options for X.Org modules. 10436# 10437AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10438AC_REQUIRE([AC_PROG_INSTALL]) 10439XORG_COMPILER_FLAGS 10440XORG_CWARNFLAGS 10441XORG_STRICT_OPTION 10442XORG_RELEASE_VERSION 10443XORG_CHANGELOG 10444XORG_INSTALL 10445XORG_MANPAGE_SECTIONS 10446m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10447 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10448]) # XORG_DEFAULT_OPTIONS 10449 10450# XORG_INSTALL() 10451# ---------------- 10452# Minimum version: 1.4.0 10453# 10454# Defines the variable INSTALL_CMD as the command to copy 10455# INSTALL from $prefix/share/util-macros. 10456# 10457AC_DEFUN([XORG_INSTALL], [ 10458AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10459macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10460INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10461mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10462|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10463echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10464AC_SUBST([INSTALL_CMD]) 10465]) # XORG_INSTALL 10466dnl Copyright 2005 Red Hat, Inc 10467dnl 10468dnl Permission to use, copy, modify, distribute, and sell this software and its 10469dnl documentation for any purpose is hereby granted without fee, provided that 10470dnl the above copyright notice appear in all copies and that both that 10471dnl copyright notice and this permission notice appear in supporting 10472dnl documentation. 10473dnl 10474dnl The above copyright notice and this permission notice shall be included 10475dnl in all copies or substantial portions of the Software. 10476dnl 10477dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10478dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10479dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10480dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10481dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10482dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10483dnl OTHER DEALINGS IN THE SOFTWARE. 10484dnl 10485dnl Except as contained in this notice, the name of the copyright holders shall 10486dnl not be used in advertising or otherwise to promote the sale, use or 10487dnl other dealings in this Software without prior written authorization 10488dnl from the copyright holders. 10489dnl 10490 10491# XORG_RELEASE_VERSION 10492# -------------------- 10493# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10494 10495AC_DEFUN([XORG_RELEASE_VERSION],[ 10496 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10497 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10498 [Major version of this package]) 10499 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10500 if test "x$PVM" = "x"; then 10501 PVM="0" 10502 fi 10503 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10504 [$PVM], 10505 [Minor version of this package]) 10506 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10507 if test "x$PVP" = "x"; then 10508 PVP="0" 10509 fi 10510 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10511 [$PVP], 10512 [Patch version of this package]) 10513]) 10514 10515# XORG_CHANGELOG() 10516# ---------------- 10517# Minimum version: 1.2.0 10518# 10519# Defines the variable CHANGELOG_CMD as the command to generate 10520# ChangeLog from git. 10521# 10522# 10523AC_DEFUN([XORG_CHANGELOG], [ 10524CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10525mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10526|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10527echo 'git directory not found: installing possibly empty changelog.' >&2)" 10528AC_SUBST([CHANGELOG_CMD]) 10529]) # XORG_CHANGELOG 10530 10531# Copyright (C) 2002-2013 Free Software Foundation, Inc. 10532# 10533# This file is free software; the Free Software Foundation 10534# gives unlimited permission to copy and/or distribute it, 10535# with or without modifications, as long as this notice is preserved. 10536 10537# AM_AUTOMAKE_VERSION(VERSION) 10538# ---------------------------- 10539# Automake X.Y traces this macro to ensure aclocal.m4 has been 10540# generated from the m4 files accompanying Automake X.Y. 10541# (This private macro should not be called outside this file.) 10542AC_DEFUN([AM_AUTOMAKE_VERSION], 10543[am__api_version='1.13' 10544dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10545dnl require some minimum version. Point them to the right macro. 10546m4_if([$1], [1.13.4], [], 10547 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10548]) 10549 10550# _AM_AUTOCONF_VERSION(VERSION) 10551# ----------------------------- 10552# aclocal traces this macro to find the Autoconf version. 10553# This is a private macro too. Using m4_define simplifies 10554# the logic in aclocal, which can simply ignore this definition. 10555m4_define([_AM_AUTOCONF_VERSION], []) 10556 10557# AM_SET_CURRENT_AUTOMAKE_VERSION 10558# ------------------------------- 10559# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10560# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10561AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10562[AM_AUTOMAKE_VERSION([1.13.4])dnl 10563m4_ifndef([AC_AUTOCONF_VERSION], 10564 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10565_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10566 10567# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10568 10569# Copyright (C) 2001-2013 Free Software Foundation, Inc. 10570# 10571# This file is free software; the Free Software Foundation 10572# gives unlimited permission to copy and/or distribute it, 10573# with or without modifications, as long as this notice is preserved. 10574 10575# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10576# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10577# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 10578# 10579# Of course, Automake must honor this variable whenever it calls a 10580# tool from the auxiliary directory. The problem is that $srcdir (and 10581# therefore $ac_aux_dir as well) can be either absolute or relative, 10582# depending on how configure is run. This is pretty annoying, since 10583# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10584# source directory, any form will work fine, but in subdirectories a 10585# relative path needs to be adjusted first. 10586# 10587# $ac_aux_dir/missing 10588# fails when called from a subdirectory if $ac_aux_dir is relative 10589# $top_srcdir/$ac_aux_dir/missing 10590# fails if $ac_aux_dir is absolute, 10591# fails when called from a subdirectory in a VPATH build with 10592# a relative $ac_aux_dir 10593# 10594# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10595# are both prefixed by $srcdir. In an in-source build this is usually 10596# harmless because $srcdir is '.', but things will broke when you 10597# start a VPATH build or use an absolute $srcdir. 10598# 10599# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10600# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10601# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10602# and then we would define $MISSING as 10603# MISSING="\${SHELL} $am_aux_dir/missing" 10604# This will work as long as MISSING is not called from configure, because 10605# unfortunately $(top_srcdir) has no meaning in configure. 10606# However there are other variables, like CC, which are often used in 10607# configure, and could therefore not use this "fixed" $ac_aux_dir. 10608# 10609# Another solution, used here, is to always expand $ac_aux_dir to an 10610# absolute PATH. The drawback is that using absolute paths prevent a 10611# configured tree to be moved without reconfiguration. 10612 10613AC_DEFUN([AM_AUX_DIR_EXPAND], 10614[dnl Rely on autoconf to set up CDPATH properly. 10615AC_PREREQ([2.50])dnl 10616# expand $ac_aux_dir to an absolute path 10617am_aux_dir=`cd $ac_aux_dir && pwd` 10618]) 10619 10620# AM_CONDITIONAL -*- Autoconf -*- 10621 10622# Copyright (C) 1997-2013 Free Software Foundation, Inc. 10623# 10624# This file is free software; the Free Software Foundation 10625# gives unlimited permission to copy and/or distribute it, 10626# with or without modifications, as long as this notice is preserved. 10627 10628# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10629# ------------------------------------- 10630# Define a conditional. 10631AC_DEFUN([AM_CONDITIONAL], 10632[AC_PREREQ([2.52])dnl 10633 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10634 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10635AC_SUBST([$1_TRUE])dnl 10636AC_SUBST([$1_FALSE])dnl 10637_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10638_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10639m4_define([_AM_COND_VALUE_$1], [$2])dnl 10640if $2; then 10641 $1_TRUE= 10642 $1_FALSE='#' 10643else 10644 $1_TRUE='#' 10645 $1_FALSE= 10646fi 10647AC_CONFIG_COMMANDS_PRE( 10648[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10649 AC_MSG_ERROR([[conditional "$1" was never defined. 10650Usually this means the macro was only invoked conditionally.]]) 10651fi])]) 10652 10653# Copyright (C) 1999-2013 Free Software Foundation, Inc. 10654# 10655# This file is free software; the Free Software Foundation 10656# gives unlimited permission to copy and/or distribute it, 10657# with or without modifications, as long as this notice is preserved. 10658 10659 10660# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 10661# written in clear, in which case automake, when reading aclocal.m4, 10662# will think it sees a *use*, and therefore will trigger all it's 10663# C support machinery. Also note that it means that autoscan, seeing 10664# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10665 10666 10667# _AM_DEPENDENCIES(NAME) 10668# ---------------------- 10669# See how the compiler implements dependency checking. 10670# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 10671# We try a few techniques and use that to set a single cache variable. 10672# 10673# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10674# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10675# dependency, and given that the user is not expected to run this macro, 10676# just rely on AC_PROG_CC. 10677AC_DEFUN([_AM_DEPENDENCIES], 10678[AC_REQUIRE([AM_SET_DEPDIR])dnl 10679AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10680AC_REQUIRE([AM_MAKE_INCLUDE])dnl 10681AC_REQUIRE([AM_DEP_TRACK])dnl 10682 10683m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10684 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10685 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10686 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10687 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10688 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10689 [depcc="$$1" am_compiler_list=]) 10690 10691AC_CACHE_CHECK([dependency style of $depcc], 10692 [am_cv_$1_dependencies_compiler_type], 10693[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10694 # We make a subdir and do the tests there. Otherwise we can end up 10695 # making bogus files that we don't know about and never remove. For 10696 # instance it was reported that on HP-UX the gcc test will end up 10697 # making a dummy file named 'D' -- because '-MD' means "put the output 10698 # in D". 10699 rm -rf conftest.dir 10700 mkdir conftest.dir 10701 # Copy depcomp to subdir because otherwise we won't find it if we're 10702 # using a relative directory. 10703 cp "$am_depcomp" conftest.dir 10704 cd conftest.dir 10705 # We will build objects and dependencies in a subdirectory because 10706 # it helps to detect inapplicable dependency modes. For instance 10707 # both Tru64's cc and ICC support -MD to output dependencies as a 10708 # side effect of compilation, but ICC will put the dependencies in 10709 # the current directory while Tru64 will put them in the object 10710 # directory. 10711 mkdir sub 10712 10713 am_cv_$1_dependencies_compiler_type=none 10714 if test "$am_compiler_list" = ""; then 10715 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10716 fi 10717 am__universal=false 10718 m4_case([$1], [CC], 10719 [case " $depcc " in #( 10720 *\ -arch\ *\ -arch\ *) am__universal=true ;; 10721 esac], 10722 [CXX], 10723 [case " $depcc " in #( 10724 *\ -arch\ *\ -arch\ *) am__universal=true ;; 10725 esac]) 10726 10727 for depmode in $am_compiler_list; do 10728 # Setup a source with many dependencies, because some compilers 10729 # like to wrap large dependency lists on column 80 (with \), and 10730 # we should not choose a depcomp mode which is confused by this. 10731 # 10732 # We need to recreate these files for each test, as the compiler may 10733 # overwrite some of them when testing with obscure command lines. 10734 # This happens at least with the AIX C compiler. 10735 : > sub/conftest.c 10736 for i in 1 2 3 4 5 6; do 10737 echo '#include "conftst'$i'.h"' >> sub/conftest.c 10738 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10739 # Solaris 10 /bin/sh. 10740 echo '/* dummy */' > sub/conftst$i.h 10741 done 10742 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10743 10744 # We check with '-c' and '-o' for the sake of the "dashmstdout" 10745 # mode. It turns out that the SunPro C++ compiler does not properly 10746 # handle '-M -o', and we need to detect this. Also, some Intel 10747 # versions had trouble with output in subdirs. 10748 am__obj=sub/conftest.${OBJEXT-o} 10749 am__minus_obj="-o $am__obj" 10750 case $depmode in 10751 gcc) 10752 # This depmode causes a compiler race in universal mode. 10753 test "$am__universal" = false || continue 10754 ;; 10755 nosideeffect) 10756 # After this tag, mechanisms are not by side-effect, so they'll 10757 # only be used when explicitly requested. 10758 if test "x$enable_dependency_tracking" = xyes; then 10759 continue 10760 else 10761 break 10762 fi 10763 ;; 10764 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10765 # This compiler won't grok '-c -o', but also, the minuso test has 10766 # not run yet. These depmodes are late enough in the game, and 10767 # so weak that their functioning should not be impacted. 10768 am__obj=conftest.${OBJEXT-o} 10769 am__minus_obj= 10770 ;; 10771 none) break ;; 10772 esac 10773 if depmode=$depmode \ 10774 source=sub/conftest.c object=$am__obj \ 10775 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10776 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10777 >/dev/null 2>conftest.err && 10778 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10779 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10780 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10781 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10782 # icc doesn't choke on unknown options, it will just issue warnings 10783 # or remarks (even with -Werror). So we grep stderr for any message 10784 # that says an option was ignored or not supported. 10785 # When given -MP, icc 7.0 and 7.1 complain thusly: 10786 # icc: Command line warning: ignoring option '-M'; no argument required 10787 # The diagnosis changed in icc 8.0: 10788 # icc: Command line remark: option '-MP' not supported 10789 if (grep 'ignoring option' conftest.err || 10790 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10791 am_cv_$1_dependencies_compiler_type=$depmode 10792 break 10793 fi 10794 fi 10795 done 10796 10797 cd .. 10798 rm -rf conftest.dir 10799else 10800 am_cv_$1_dependencies_compiler_type=none 10801fi 10802]) 10803AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10804AM_CONDITIONAL([am__fastdep$1], [ 10805 test "x$enable_dependency_tracking" != xno \ 10806 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10807]) 10808 10809 10810# AM_SET_DEPDIR 10811# ------------- 10812# Choose a directory name for dependency files. 10813# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 10814AC_DEFUN([AM_SET_DEPDIR], 10815[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10816AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10817]) 10818 10819 10820# AM_DEP_TRACK 10821# ------------ 10822AC_DEFUN([AM_DEP_TRACK], 10823[AC_ARG_ENABLE([dependency-tracking], [dnl 10824AS_HELP_STRING( 10825 [--enable-dependency-tracking], 10826 [do not reject slow dependency extractors]) 10827AS_HELP_STRING( 10828 [--disable-dependency-tracking], 10829 [speeds up one-time build])]) 10830if test "x$enable_dependency_tracking" != xno; then 10831 am_depcomp="$ac_aux_dir/depcomp" 10832 AMDEPBACKSLASH='\' 10833 am__nodep='_no' 10834fi 10835AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10836AC_SUBST([AMDEPBACKSLASH])dnl 10837_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10838AC_SUBST([am__nodep])dnl 10839_AM_SUBST_NOTMAKE([am__nodep])dnl 10840]) 10841 10842# Generate code to set up dependency tracking. -*- Autoconf -*- 10843 10844# Copyright (C) 1999-2013 Free Software Foundation, Inc. 10845# 10846# This file is free software; the Free Software Foundation 10847# gives unlimited permission to copy and/or distribute it, 10848# with or without modifications, as long as this notice is preserved. 10849 10850 10851# _AM_OUTPUT_DEPENDENCY_COMMANDS 10852# ------------------------------ 10853AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 10854[{ 10855 # Older Autoconf quotes --file arguments for eval, but not when files 10856 # are listed without --file. Let's play safe and only enable the eval 10857 # if we detect the quoting. 10858 case $CONFIG_FILES in 10859 *\'*) eval set x "$CONFIG_FILES" ;; 10860 *) set x $CONFIG_FILES ;; 10861 esac 10862 shift 10863 for mf 10864 do 10865 # Strip MF so we end up with the name of the file. 10866 mf=`echo "$mf" | sed -e 's/:.*$//'` 10867 # Check whether this is an Automake generated Makefile or not. 10868 # We used to match only the files named 'Makefile.in', but 10869 # some people rename them; so instead we look at the file content. 10870 # Grep'ing the first line is not enough: some people post-process 10871 # each Makefile.in and add a new line on top of each file to say so. 10872 # Grep'ing the whole file is not good either: AIX grep has a line 10873 # limit of 2048, but all sed's we know have understand at least 4000. 10874 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 10875 dirpart=`AS_DIRNAME("$mf")` 10876 else 10877 continue 10878 fi 10879 # Extract the definition of DEPDIR, am__include, and am__quote 10880 # from the Makefile without running 'make'. 10881 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 10882 test -z "$DEPDIR" && continue 10883 am__include=`sed -n 's/^am__include = //p' < "$mf"` 10884 test -z "$am__include" && continue 10885 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 10886 # Find all dependency output files, they are included files with 10887 # $(DEPDIR) in their names. We invoke sed twice because it is the 10888 # simplest approach to changing $(DEPDIR) to its actual value in the 10889 # expansion. 10890 for file in `sed -n " 10891 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 10892 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 10893 # Make sure the directory exists. 10894 test -f "$dirpart/$file" && continue 10895 fdir=`AS_DIRNAME(["$file"])` 10896 AS_MKDIR_P([$dirpart/$fdir]) 10897 # echo "creating $dirpart/$file" 10898 echo '# dummy' > "$dirpart/$file" 10899 done 10900 done 10901} 10902])# _AM_OUTPUT_DEPENDENCY_COMMANDS 10903 10904 10905# AM_OUTPUT_DEPENDENCY_COMMANDS 10906# ----------------------------- 10907# This macro should only be invoked once -- use via AC_REQUIRE. 10908# 10909# This code is only required when automatic dependency tracking 10910# is enabled. FIXME. This creates each '.P' file that we will 10911# need in order to bootstrap the dependency handling code. 10912AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 10913[AC_CONFIG_COMMANDS([depfiles], 10914 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 10915 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 10916]) 10917 10918# Do all the work for Automake. -*- Autoconf -*- 10919 10920# Copyright (C) 1996-2013 Free Software Foundation, Inc. 10921# 10922# This file is free software; the Free Software Foundation 10923# gives unlimited permission to copy and/or distribute it, 10924# with or without modifications, as long as this notice is preserved. 10925 10926# This macro actually does too much. Some checks are only needed if 10927# your package does certain things. But this isn't really a big deal. 10928 10929# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 10930# AM_INIT_AUTOMAKE([OPTIONS]) 10931# ----------------------------------------------- 10932# The call with PACKAGE and VERSION arguments is the old style 10933# call (pre autoconf-2.50), which is being phased out. PACKAGE 10934# and VERSION should now be passed to AC_INIT and removed from 10935# the call to AM_INIT_AUTOMAKE. 10936# We support both call styles for the transition. After 10937# the next Automake release, Autoconf can make the AC_INIT 10938# arguments mandatory, and then we can depend on a new Autoconf 10939# release and drop the old call support. 10940AC_DEFUN([AM_INIT_AUTOMAKE], 10941[AC_PREREQ([2.65])dnl 10942dnl Autoconf wants to disallow AM_ names. We explicitly allow 10943dnl the ones we care about. 10944m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 10945AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 10946AC_REQUIRE([AC_PROG_INSTALL])dnl 10947if test "`cd $srcdir && pwd`" != "`pwd`"; then 10948 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 10949 # is not polluted with repeated "-I." 10950 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 10951 # test to see if srcdir already configured 10952 if test -f $srcdir/config.status; then 10953 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 10954 fi 10955fi 10956 10957# test whether we have cygpath 10958if test -z "$CYGPATH_W"; then 10959 if (cygpath --version) >/dev/null 2>/dev/null; then 10960 CYGPATH_W='cygpath -w' 10961 else 10962 CYGPATH_W=echo 10963 fi 10964fi 10965AC_SUBST([CYGPATH_W]) 10966 10967# Define the identity of the package. 10968dnl Distinguish between old-style and new-style calls. 10969m4_ifval([$2], 10970[AC_DIAGNOSE([obsolete], 10971 [$0: two- and three-arguments forms are deprecated.]) 10972m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 10973 AC_SUBST([PACKAGE], [$1])dnl 10974 AC_SUBST([VERSION], [$2])], 10975[_AM_SET_OPTIONS([$1])dnl 10976dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 10977m4_if( 10978 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 10979 [ok:ok],, 10980 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 10981 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 10982 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 10983 10984_AM_IF_OPTION([no-define],, 10985[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 10986 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 10987 10988# Some tools Automake needs. 10989AC_REQUIRE([AM_SANITY_CHECK])dnl 10990AC_REQUIRE([AC_ARG_PROGRAM])dnl 10991AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 10992AM_MISSING_PROG([AUTOCONF], [autoconf]) 10993AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 10994AM_MISSING_PROG([AUTOHEADER], [autoheader]) 10995AM_MISSING_PROG([MAKEINFO], [makeinfo]) 10996AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10997AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 10998AC_REQUIRE([AC_PROG_MKDIR_P])dnl 10999# For better backward compatibility. To be removed once Automake 1.9.x 11000# dies out for good. For more background, see: 11001# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11002# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11003AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11004# We need awk for the "check" target. The system "awk" is bad on 11005# some platforms. 11006AC_REQUIRE([AC_PROG_AWK])dnl 11007AC_REQUIRE([AC_PROG_MAKE_SET])dnl 11008AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11009_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11010 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11011 [_AM_PROG_TAR([v7])])]) 11012_AM_IF_OPTION([no-dependencies],, 11013[AC_PROVIDE_IFELSE([AC_PROG_CC], 11014 [_AM_DEPENDENCIES([CC])], 11015 [m4_define([AC_PROG_CC], 11016 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11017AC_PROVIDE_IFELSE([AC_PROG_CXX], 11018 [_AM_DEPENDENCIES([CXX])], 11019 [m4_define([AC_PROG_CXX], 11020 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11021AC_PROVIDE_IFELSE([AC_PROG_OBJC], 11022 [_AM_DEPENDENCIES([OBJC])], 11023 [m4_define([AC_PROG_OBJC], 11024 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11025AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11026 [_AM_DEPENDENCIES([OBJCXX])], 11027 [m4_define([AC_PROG_OBJCXX], 11028 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11029]) 11030AC_REQUIRE([AM_SILENT_RULES])dnl 11031dnl The testsuite driver may need to know about EXEEXT, so add the 11032dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11033dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11034AC_CONFIG_COMMANDS_PRE(dnl 11035[m4_provide_if([_AM_COMPILER_EXEEXT], 11036 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11037]) 11038 11039dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11040dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11041dnl mangled by Autoconf and run in a shell conditional statement. 11042m4_define([_AC_COMPILER_EXEEXT], 11043m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11044 11045 11046# When config.status generates a header, we must update the stamp-h file. 11047# This file resides in the same directory as the config header 11048# that is generated. The stamp files are numbered to have different names. 11049 11050# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11051# loop where config.status creates the headers, so we can generate 11052# our stamp files there. 11053AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11054[# Compute $1's index in $config_headers. 11055_am_arg=$1 11056_am_stamp_count=1 11057for _am_header in $config_headers :; do 11058 case $_am_header in 11059 $_am_arg | $_am_arg:* ) 11060 break ;; 11061 * ) 11062 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11063 esac 11064done 11065echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11066 11067# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11068# 11069# This file is free software; the Free Software Foundation 11070# gives unlimited permission to copy and/or distribute it, 11071# with or without modifications, as long as this notice is preserved. 11072 11073# AM_PROG_INSTALL_SH 11074# ------------------ 11075# Define $install_sh. 11076AC_DEFUN([AM_PROG_INSTALL_SH], 11077[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11078if test x"${install_sh}" != xset; then 11079 case $am_aux_dir in 11080 *\ * | *\ *) 11081 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11082 *) 11083 install_sh="\${SHELL} $am_aux_dir/install-sh" 11084 esac 11085fi 11086AC_SUBST([install_sh])]) 11087 11088# Copyright (C) 2003-2013 Free Software Foundation, Inc. 11089# 11090# This file is free software; the Free Software Foundation 11091# gives unlimited permission to copy and/or distribute it, 11092# with or without modifications, as long as this notice is preserved. 11093 11094# Check whether the underlying file-system supports filenames 11095# with a leading dot. For instance MS-DOS doesn't. 11096AC_DEFUN([AM_SET_LEADING_DOT], 11097[rm -rf .tst 2>/dev/null 11098mkdir .tst 2>/dev/null 11099if test -d .tst; then 11100 am__leading_dot=. 11101else 11102 am__leading_dot=_ 11103fi 11104rmdir .tst 2>/dev/null 11105AC_SUBST([am__leading_dot])]) 11106 11107# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11108# From Jim Meyering 11109 11110# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11111# 11112# This file is free software; the Free Software Foundation 11113# gives unlimited permission to copy and/or distribute it, 11114# with or without modifications, as long as this notice is preserved. 11115 11116# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11117# ---------------------------------- 11118# Control maintainer-specific portions of Makefiles. 11119# Default is to disable them, unless 'enable' is passed literally. 11120# For symmetry, 'disable' may be passed as well. Anyway, the user 11121# can override the default with the --enable/--disable switch. 11122AC_DEFUN([AM_MAINTAINER_MODE], 11123[m4_case(m4_default([$1], [disable]), 11124 [enable], [m4_define([am_maintainer_other], [disable])], 11125 [disable], [m4_define([am_maintainer_other], [enable])], 11126 [m4_define([am_maintainer_other], [enable]) 11127 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11128AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11129 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11130 AC_ARG_ENABLE([maintainer-mode], 11131 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11132 am_maintainer_other[ make rules and dependencies not useful 11133 (and sometimes confusing) to the casual installer])], 11134 [USE_MAINTAINER_MODE=$enableval], 11135 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11136 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11137 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11138 MAINT=$MAINTAINER_MODE_TRUE 11139 AC_SUBST([MAINT])dnl 11140] 11141) 11142 11143# Check to see how 'make' treats includes. -*- Autoconf -*- 11144 11145# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11146# 11147# This file is free software; the Free Software Foundation 11148# gives unlimited permission to copy and/or distribute it, 11149# with or without modifications, as long as this notice is preserved. 11150 11151# AM_MAKE_INCLUDE() 11152# ----------------- 11153# Check to see how make treats includes. 11154AC_DEFUN([AM_MAKE_INCLUDE], 11155[am_make=${MAKE-make} 11156cat > confinc << 'END' 11157am__doit: 11158 @echo this is the am__doit target 11159.PHONY: am__doit 11160END 11161# If we don't find an include directive, just comment out the code. 11162AC_MSG_CHECKING([for style of include used by $am_make]) 11163am__include="#" 11164am__quote= 11165_am_result=none 11166# First try GNU make style include. 11167echo "include confinc" > confmf 11168# Ignore all kinds of additional output from 'make'. 11169case `$am_make -s -f confmf 2> /dev/null` in #( 11170*the\ am__doit\ target*) 11171 am__include=include 11172 am__quote= 11173 _am_result=GNU 11174 ;; 11175esac 11176# Now try BSD make style include. 11177if test "$am__include" = "#"; then 11178 echo '.include "confinc"' > confmf 11179 case `$am_make -s -f confmf 2> /dev/null` in #( 11180 *the\ am__doit\ target*) 11181 am__include=.include 11182 am__quote="\"" 11183 _am_result=BSD 11184 ;; 11185 esac 11186fi 11187AC_SUBST([am__include]) 11188AC_SUBST([am__quote]) 11189AC_MSG_RESULT([$_am_result]) 11190rm -f confinc confmf 11191]) 11192 11193# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11194 11195# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11196# 11197# This file is free software; the Free Software Foundation 11198# gives unlimited permission to copy and/or distribute it, 11199# with or without modifications, as long as this notice is preserved. 11200 11201# AM_MISSING_PROG(NAME, PROGRAM) 11202# ------------------------------ 11203AC_DEFUN([AM_MISSING_PROG], 11204[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11205$1=${$1-"${am_missing_run}$2"} 11206AC_SUBST($1)]) 11207 11208# AM_MISSING_HAS_RUN 11209# ------------------ 11210# Define MISSING if not defined so far and test if it is modern enough. 11211# If it is, set am_missing_run to use it, otherwise, to nothing. 11212AC_DEFUN([AM_MISSING_HAS_RUN], 11213[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11214AC_REQUIRE_AUX_FILE([missing])dnl 11215if test x"${MISSING+set}" != xset; then 11216 case $am_aux_dir in 11217 *\ * | *\ *) 11218 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11219 *) 11220 MISSING="\${SHELL} $am_aux_dir/missing" ;; 11221 esac 11222fi 11223# Use eval to expand $SHELL 11224if eval "$MISSING --is-lightweight"; then 11225 am_missing_run="$MISSING " 11226else 11227 am_missing_run= 11228 AC_MSG_WARN(['missing' script is too old or missing]) 11229fi 11230]) 11231 11232# Helper functions for option handling. -*- Autoconf -*- 11233 11234# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11235# 11236# This file is free software; the Free Software Foundation 11237# gives unlimited permission to copy and/or distribute it, 11238# with or without modifications, as long as this notice is preserved. 11239 11240# _AM_MANGLE_OPTION(NAME) 11241# ----------------------- 11242AC_DEFUN([_AM_MANGLE_OPTION], 11243[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11244 11245# _AM_SET_OPTION(NAME) 11246# -------------------- 11247# Set option NAME. Presently that only means defining a flag for this option. 11248AC_DEFUN([_AM_SET_OPTION], 11249[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11250 11251# _AM_SET_OPTIONS(OPTIONS) 11252# ------------------------ 11253# OPTIONS is a space-separated list of Automake options. 11254AC_DEFUN([_AM_SET_OPTIONS], 11255[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11256 11257# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11258# ------------------------------------------- 11259# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11260AC_DEFUN([_AM_IF_OPTION], 11261[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11262 11263# Check to make sure that the build environment is sane. -*- Autoconf -*- 11264 11265# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11266# 11267# This file is free software; the Free Software Foundation 11268# gives unlimited permission to copy and/or distribute it, 11269# with or without modifications, as long as this notice is preserved. 11270 11271# AM_SANITY_CHECK 11272# --------------- 11273AC_DEFUN([AM_SANITY_CHECK], 11274[AC_MSG_CHECKING([whether build environment is sane]) 11275# Reject unsafe characters in $srcdir or the absolute working directory 11276# name. Accept space and tab only in the latter. 11277am_lf=' 11278' 11279case `pwd` in 11280 *[[\\\"\#\$\&\'\`$am_lf]]*) 11281 AC_MSG_ERROR([unsafe absolute working directory name]);; 11282esac 11283case $srcdir in 11284 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11285 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 11286esac 11287 11288# Do 'set' in a subshell so we don't clobber the current shell's 11289# arguments. Must try -L first in case configure is actually a 11290# symlink; some systems play weird games with the mod time of symlinks 11291# (eg FreeBSD returns the mod time of the symlink's containing 11292# directory). 11293if ( 11294 am_has_slept=no 11295 for am_try in 1 2; do 11296 echo "timestamp, slept: $am_has_slept" > conftest.file 11297 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11298 if test "$[*]" = "X"; then 11299 # -L didn't work. 11300 set X `ls -t "$srcdir/configure" conftest.file` 11301 fi 11302 if test "$[*]" != "X $srcdir/configure conftest.file" \ 11303 && test "$[*]" != "X conftest.file $srcdir/configure"; then 11304 11305 # If neither matched, then we have a broken ls. This can happen 11306 # if, for instance, CONFIG_SHELL is bash and it inherits a 11307 # broken ls alias from the environment. This has actually 11308 # happened. Such a system could not be considered "sane". 11309 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11310 alias in your environment]) 11311 fi 11312 if test "$[2]" = conftest.file || test $am_try -eq 2; then 11313 break 11314 fi 11315 # Just in case. 11316 sleep 1 11317 am_has_slept=yes 11318 done 11319 test "$[2]" = conftest.file 11320 ) 11321then 11322 # Ok. 11323 : 11324else 11325 AC_MSG_ERROR([newly created file is older than distributed files! 11326Check your system clock]) 11327fi 11328AC_MSG_RESULT([yes]) 11329# If we didn't sleep, we still need to ensure time stamps of config.status and 11330# generated files are strictly newer. 11331am_sleep_pid= 11332if grep 'slept: no' conftest.file >/dev/null 2>&1; then 11333 ( sleep 1 ) & 11334 am_sleep_pid=$! 11335fi 11336AC_CONFIG_COMMANDS_PRE( 11337 [AC_MSG_CHECKING([that generated files are newer than configure]) 11338 if test -n "$am_sleep_pid"; then 11339 # Hide warnings about reused PIDs. 11340 wait $am_sleep_pid 2>/dev/null 11341 fi 11342 AC_MSG_RESULT([done])]) 11343rm -f conftest.file 11344]) 11345 11346# Copyright (C) 2009-2013 Free Software Foundation, Inc. 11347# 11348# This file is free software; the Free Software Foundation 11349# gives unlimited permission to copy and/or distribute it, 11350# with or without modifications, as long as this notice is preserved. 11351 11352# AM_SILENT_RULES([DEFAULT]) 11353# -------------------------- 11354# Enable less verbose build rules; with the default set to DEFAULT 11355# ("yes" being less verbose, "no" or empty being verbose). 11356AC_DEFUN([AM_SILENT_RULES], 11357[AC_ARG_ENABLE([silent-rules], [dnl 11358AS_HELP_STRING( 11359 [--enable-silent-rules], 11360 [less verbose build output (undo: "make V=1")]) 11361AS_HELP_STRING( 11362 [--disable-silent-rules], 11363 [verbose build output (undo: "make V=0")])dnl 11364]) 11365case $enable_silent_rules in @%:@ ((( 11366 yes) AM_DEFAULT_VERBOSITY=0;; 11367 no) AM_DEFAULT_VERBOSITY=1;; 11368 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11369esac 11370dnl 11371dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11372dnl do not support nested variable expansions. 11373dnl See automake bug#9928 and bug#10237. 11374am_make=${MAKE-make} 11375AC_CACHE_CHECK([whether $am_make supports nested variables], 11376 [am_cv_make_support_nested_variables], 11377 [if AS_ECHO([['TRUE=$(BAR$(V)) 11378BAR0=false 11379BAR1=true 11380V=1 11381am__doit: 11382 @$(TRUE) 11383.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11384 am_cv_make_support_nested_variables=yes 11385else 11386 am_cv_make_support_nested_variables=no 11387fi]) 11388if test $am_cv_make_support_nested_variables = yes; then 11389 dnl Using '$V' instead of '$(V)' breaks IRIX make. 11390 AM_V='$(V)' 11391 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11392else 11393 AM_V=$AM_DEFAULT_VERBOSITY 11394 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11395fi 11396AC_SUBST([AM_V])dnl 11397AM_SUBST_NOTMAKE([AM_V])dnl 11398AC_SUBST([AM_DEFAULT_V])dnl 11399AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11400AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11401AM_BACKSLASH='\' 11402AC_SUBST([AM_BACKSLASH])dnl 11403_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11404]) 11405 11406# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11407# 11408# This file is free software; the Free Software Foundation 11409# gives unlimited permission to copy and/or distribute it, 11410# with or without modifications, as long as this notice is preserved. 11411 11412# AM_PROG_INSTALL_STRIP 11413# --------------------- 11414# One issue with vendor 'install' (even GNU) is that you can't 11415# specify the program used to strip binaries. This is especially 11416# annoying in cross-compiling environments, where the build's strip 11417# is unlikely to handle the host's binaries. 11418# Fortunately install-sh will honor a STRIPPROG variable, so we 11419# always use install-sh in "make install-strip", and initialize 11420# STRIPPROG with the value of the STRIP variable (set by the user). 11421AC_DEFUN([AM_PROG_INSTALL_STRIP], 11422[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11423# Installed binaries are usually stripped using 'strip' when the user 11424# run "make install-strip". However 'strip' might not be the right 11425# tool to use in cross-compilation environments, therefore Automake 11426# will honor the 'STRIP' environment variable to overrule this program. 11427dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 11428if test "$cross_compiling" != no; then 11429 AC_CHECK_TOOL([STRIP], [strip], :) 11430fi 11431INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11432AC_SUBST([INSTALL_STRIP_PROGRAM])]) 11433 11434# Copyright (C) 2006-2013 Free Software Foundation, Inc. 11435# 11436# This file is free software; the Free Software Foundation 11437# gives unlimited permission to copy and/or distribute it, 11438# with or without modifications, as long as this notice is preserved. 11439 11440# _AM_SUBST_NOTMAKE(VARIABLE) 11441# --------------------------- 11442# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11443# This macro is traced by Automake. 11444AC_DEFUN([_AM_SUBST_NOTMAKE]) 11445 11446# AM_SUBST_NOTMAKE(VARIABLE) 11447# -------------------------- 11448# Public sister of _AM_SUBST_NOTMAKE. 11449AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 11450 11451# Check how to create a tarball. -*- Autoconf -*- 11452 11453# Copyright (C) 2004-2013 Free Software Foundation, Inc. 11454# 11455# This file is free software; the Free Software Foundation 11456# gives unlimited permission to copy and/or distribute it, 11457# with or without modifications, as long as this notice is preserved. 11458 11459# _AM_PROG_TAR(FORMAT) 11460# -------------------- 11461# Check how to create a tarball in format FORMAT. 11462# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11463# 11464# Substitute a variable $(am__tar) that is a command 11465# writing to stdout a FORMAT-tarball containing the directory 11466# $tardir. 11467# tardir=directory && $(am__tar) > result.tar 11468# 11469# Substitute a variable $(am__untar) that extract such 11470# a tarball read from stdin. 11471# $(am__untar) < result.tar 11472# 11473AC_DEFUN([_AM_PROG_TAR], 11474[# Always define AMTAR for backward compatibility. Yes, it's still used 11475# in the wild :-( We should find a proper way to deprecate it ... 11476AC_SUBST([AMTAR], ['$${TAR-tar}']) 11477 11478# We'll loop over all known methods to create a tar archive until one works. 11479_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11480 11481m4_if([$1], [v7], 11482 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11483 11484 [m4_case([$1], 11485 [ustar], 11486 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11487 # There is notably a 21 bits limit for the UID and the GID. In fact, 11488 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11489 # and bug#13588). 11490 am_max_uid=2097151 # 2^21 - 1 11491 am_max_gid=$am_max_uid 11492 # The $UID and $GID variables are not portable, so we need to resort 11493 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11494 # below are definitely unexpected, so allow the users to see them 11495 # (that is, avoid stderr redirection). 11496 am_uid=`id -u || echo unknown` 11497 am_gid=`id -g || echo unknown` 11498 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11499 if test $am_uid -le $am_max_uid; then 11500 AC_MSG_RESULT([yes]) 11501 else 11502 AC_MSG_RESULT([no]) 11503 _am_tools=none 11504 fi 11505 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11506 if test $am_gid -le $am_max_gid; then 11507 AC_MSG_RESULT([yes]) 11508 else 11509 AC_MSG_RESULT([no]) 11510 _am_tools=none 11511 fi], 11512 11513 [pax], 11514 [], 11515 11516 [m4_fatal([Unknown tar format])]) 11517 11518 AC_MSG_CHECKING([how to create a $1 tar archive]) 11519 11520 # Go ahead even if we have the value already cached. We do so because we 11521 # need to set the values for the 'am__tar' and 'am__untar' variables. 11522 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11523 11524 for _am_tool in $_am_tools; do 11525 case $_am_tool in 11526 gnutar) 11527 for _am_tar in tar gnutar gtar; do 11528 AM_RUN_LOG([$_am_tar --version]) && break 11529 done 11530 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11531 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11532 am__untar="$_am_tar -xf -" 11533 ;; 11534 plaintar) 11535 # Must skip GNU tar: if it does not support --format= it doesn't create 11536 # ustar tarball either. 11537 (tar --version) >/dev/null 2>&1 && continue 11538 am__tar='tar chf - "$$tardir"' 11539 am__tar_='tar chf - "$tardir"' 11540 am__untar='tar xf -' 11541 ;; 11542 pax) 11543 am__tar='pax -L -x $1 -w "$$tardir"' 11544 am__tar_='pax -L -x $1 -w "$tardir"' 11545 am__untar='pax -r' 11546 ;; 11547 cpio) 11548 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11549 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11550 am__untar='cpio -i -H $1 -d' 11551 ;; 11552 none) 11553 am__tar=false 11554 am__tar_=false 11555 am__untar=false 11556 ;; 11557 esac 11558 11559 # If the value was cached, stop now. We just wanted to have am__tar 11560 # and am__untar set. 11561 test -n "${am_cv_prog_tar_$1}" && break 11562 11563 # tar/untar a dummy directory, and stop if the command works. 11564 rm -rf conftest.dir 11565 mkdir conftest.dir 11566 echo GrepMe > conftest.dir/file 11567 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11568 rm -rf conftest.dir 11569 if test -s conftest.tar; then 11570 AM_RUN_LOG([$am__untar <conftest.tar]) 11571 AM_RUN_LOG([cat conftest.dir/file]) 11572 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11573 fi 11574 done 11575 rm -rf conftest.dir 11576 11577 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11578 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11579 11580AC_SUBST([am__tar]) 11581AC_SUBST([am__untar]) 11582]) # _AM_PROG_TAR 11583 11584