aclocal.m4 revision 52fd71cd
1# generated automatically by aclocal 1.15 -*- Autoconf -*- 2 3# Copyright (C) 1996-2014 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 23dnl fontutil.m4. Generated from fontutil.m4.in by configure. 24dnl 25dnl This file comes from X.Org's font-util 1.3.1 26dnl 27dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 28dnl 29dnl Permission is hereby granted, free of charge, to any person obtaining a 30dnl copy of this software and associated documentation files (the "Software"), 31dnl to deal in the Software without restriction, including without limitation 32dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 33dnl and/or sell copies of the Software, and to permit persons to whom the 34dnl Software is furnished to do so, subject to the following conditions: 35dnl 36dnl The above copyright notice and this permission notice (including the next 37dnl paragraph) shall be included in all copies or substantial portions of the 38dnl Software. 39dnl 40dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 43dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 45dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 46dnl DEALINGS IN THE SOFTWARE. 47dnl 48dnl -------------------------------------------------------------------- 49dnl 50dnl Copyright 2005 Red Hat, Inc 51dnl 52dnl Permission to use, copy, modify, distribute, and sell this software and its 53dnl documentation for any purpose is hereby granted without fee, provided that 54dnl the above copyright notice appear in all copies and that both that 55dnl copyright notice and this permission notice appear in supporting 56dnl documentation. 57dnl 58dnl The above copyright notice and this permission notice shall be included 59dnl in all copies or substantial portions of the Software. 60dnl 61dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 62dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 63dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 64dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 65dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 66dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 67dnl OTHER DEALINGS IN THE SOFTWARE. 68dnl 69dnl Except as contained in this notice, the name of the copyright holders shall 70dnl not be used in advertising or otherwise to promote the sale, use or 71dnl other dealings in this Software without prior written authorization 72dnl from the copyright holders. 73 74# XORG_FONT_MACROS_VERSION(required-version) 75# ------------------------------------------ 76# Minimum version: 1.1.0 77# 78# If you're using a macro added in Version 1.1 or newer, include this in 79# your configure.ac with the minimum required version, such as: 80# XORG_FONT_MACROS_VERSION(1.1) 81# 82# To ensure that this macro is defined, also add: 83# m4_ifndef([XORG_FONT_MACROS_VERSION], 84# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) 85# 86# 87# See the "minimum version" comment for each macro you use to see what 88# version you require. 89m4_defun([XORG_FONT_MACROS_VERSION],[ 90m4_define([vers_have], [1.3.1]) 91m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 92m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 93m4_if(m4_cmp(maj_have, maj_needed), 0,, 94 [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) 95m4_if(m4_version_compare(vers_have, [$1]), -1, 96 [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) 97m4_undefine([vers_have]) 98m4_undefine([maj_have]) 99m4_undefine([maj_needed]) 100]) # XORG_FONT_MACROS_VERSION 101 102# XORG_FONT_CHECK_{maps}() 103# ------------------------ 104# Minimum version: 1.0.0 105# These macros add --enable/disable-{maps} where {maps} are ISO8859-*, 106# JISX0201 or KOI8_R. By default, they are all enabled. 107 108AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) 109AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) 110AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) 111AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) 112AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) 113AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) 114AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) 115AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) 116AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) 117AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) 118AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) 119AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) 120AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) 121AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) 122AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) 123AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) 124AC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) 125AC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) 126 127# XORG_FONT_CHECK_ENCODING(encoding) 128# ---------------------------------- 129# Minimum version: 1.1.0 130# This macro adds --enable/disable-<encoding>, enabled by default. 131# It replaced individual copies of this code in the above macros in 1.1. 132# Currently assumes encoding names will be all upper-case - add m4_toupper 133# calls if this is not true in the future. 134 135AC_DEFUN([XORG_FONT_CHECK_ENCODING],[ 136 AC_ARG_ENABLE(m4_tolower($1), 137 AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), 138 [Build $1 fonts (default: yes)]), 139 [AS_TR_SH($1)=$enableval]) 140 AC_MSG_CHECKING([whether to build $1 fonts]) 141 AC_MSG_RESULT($[AS_TR_SH($1)]) 142 AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) 143]) # XORG_FONT_CHECK_ENCODING 144 145# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) 146# ----------------------------------------------------- 147# Minimum version: 1.1.0 148# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. 149# Add a shorthand --enable/disable-all-encodings option. 150 151AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ 152 AC_ARG_ENABLE([all-encodings], 153 AS_HELP_STRING([--disable-all-encodings], 154 [Disable building of all font encodings]), 155 [m4_foreach_w([enc], [$1], [ 156 AS_TR_SH(enc)=$enableval 157 ])], 158 [m4_foreach_w([enc], [$1], [ 159 AS_TR_SH(enc)=yes 160 ])]) 161 m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) 162]) # XORG_FONT_CHECK_ENCODING_LIST 163 164# XORG_FONT_REQUIRED_PROG(VARNAME, progname) 165# ------------------------------------------ 166# Minimum version: 1.1.0 167# 168# Simple wrapper around AC_PATH_PROG that errors if not found 169# 170 171AC_DEFUN([XORG_FONT_REQUIRED_PROG],[ 172 AC_PATH_PROG($1, $2) 173 if test x"$$1" = x; then 174 AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) 175 fi 176]) 177 178 179# XORG_FONT_FCCACHE() 180# ------------------- 181# Minimum version: 1.1.0 182# 183# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found 184# Set RUN_FCCACHE to a rule suitable for substituting into a makefile 185# to run fc-cache if found and not installing to $DESTDIR and not 186# cross-compiling 187# 188# fc-cache is optional, not required, and should be skipped when making 189# packages (installing to $DESTDIR) or cross-compiling 190# 191AC_DEFUN([XORG_FONT_FCCACHE],[ 192 AC_PATH_PROG(FCCACHE, fc-cache) 193 FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' 194 if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then 195 RUN_FCCACHE="${FCCACHE_WARN}" 196 else 197 RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' 198 RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" 199 fi 200 AC_SUBST([RUN_FCCACHE]) 201]) 202 203# XORG_FONT_MKFONTDIR() 204# ------------------- 205# Minimum version: 1.3.0 206# 207# Set MKFONTDIR to path to mkfontdir. 208# 209# If cross-compiling, and if mkdir is not found, use a shell command 210# which warns mkfontdir needs to be run on the target 211# 212# If not cross-compiling, mkfontdir must be found 213# 214AC_DEFUN([XORG_FONT_MKFONTDIR],[ 215 if test x"$cross_compiling" != x"no" ; then 216 AC_PATH_PROG(MKFONTDIR, mkfontdir, "") 217 MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"' 218 219 if test x"$MKFONTDIR" = x; then 220 MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'" 221 fi 222 else 223 XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) 224 fi 225 226 AC_SUBST([MKFONTDIR]) 227]) 228 229# XORG_FONT_COMMON_UTILS() 230# ------------------------ 231# Minimum version: 1.1.0 232# 233# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types 234 235AC_DEFUN([XORG_FONT_COMMON_UTILS],[ 236 XORG_FONT_FCCACHE 237 XORG_FONT_MKFONTDIR 238]) 239 240# XORG_FONT_SCALED_UTILS() 241# ------------------------ 242# Minimum version: 1.1.0 243# 244# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts 245# (TrueType, OpenType, Type1) 246 247AC_DEFUN([XORG_FONT_SCALED_UTILS],[ 248 XORG_FONT_COMMON_UTILS 249 XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) 250]) 251 252# XORG_FONT_BDF_UTILS() 253# --------------------- 254# Minimum version: 1.1.0 255# 256# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts 257# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the 258# PCF output files created by bdftopcf 259 260AC_DEFUN([XORG_FONT_BDF_UTILS],[ 261 XORG_FONT_COMMON_UTILS 262 XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) 263 XORG_FONT_CHECK_COMPRESSION 264]) 265 266# XORG_FONT_CHECK_COMPRESSION() 267# ----------------------------- 268# Minimum version: 1.1.0 269# 270# Offer a --with-compression flag to control what compression method is 271# used for pcf font files. Offers all the methods currently supported 272# by libXfont, including no compression. 273 274AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ 275 AC_MSG_CHECKING([font compression method]) 276 AC_ARG_WITH(compression, 277 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>], 278 [compression method to use on pcf fonts])], 279 [compression="$withval"], [compression="yes"]) 280 if test x"$compression" = "xyes" ; then 281 compression="gzip" 282 fi 283 AC_MSG_RESULT([${compression}]) 284 case ${compression} in 285 *compress) COMPRESS_SUFFIX=".Z" ;; 286 *gzip) COMPRESS_SUFFIX=".gz" ;; 287 *bzip2) COMPRESS_SUFFIX=".bz2" ;; 288 no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; 289 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; 290 esac 291 if test x"$COMPRESS_SUFFIX" != "x" ; then 292 XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) 293 fi 294 AC_SUBST([COMPRESS_SUFFIX]) 295]) 296 297# XORG_FONT_UCS2ANY() 298# ------------------- 299# Minimum version: 1.1.0 300# 301# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting 302# Unicode-encoded BDF format bitmap fonts into subsets for older encodings. 303# Also call pkg-config to find the directory with the encoding files needed 304# by ucs2any, and export it as MAPFILES_PATH to the Makefiles 305 306AC_DEFUN([XORG_FONT_UCS2ANY],[ 307 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 308 XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) 309 PKG_CHECK_MODULES(MAPS, [fontutil]) 310 AC_MSG_CHECKING([for ucs2any encoding data files]) 311 MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil` 312 AC_SUBST(MAPFILES_PATH) 313 AC_MSG_RESULT([${MAPFILES_PATH}]) 314]) 315 316 317 318# XORG_FONT_FC_CONFDIR() 319# -------------------- 320# Minimum version: 1.2.0 321# 322# Sets FC_CONFDIR to the fontconfig config directory 323# (which should be --with-confdir=... when building fontconfig) 324# found from: 325# --with-fc-confdir=... 326# pkg-config --variable=confdir fontconfig 327# ${sysconfdir}/fonts 328 329AC_DEFUN([XORG_FONT_FC_CONFDIR],[ 330 dnl Ensure $PKG_CONFIG is set first 331 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 332 333 AC_MSG_CHECKING([for fontconfig's configuration directory]) 334 AC_ARG_WITH(fc-confdir, 335 AS_HELP_STRING([--with-fc-confdir=DIR], 336 [Path to fontconfig's configuration directory]), 337 [FC_CONFDIR="$withval"]) 338 # if --with-fc-confdir was not specified 339 if test "x${FC_CONFDIR}" = "x"; then 340 FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` 341 fi 342 # ...and if pkg-config didn't find confdir in fontconfig.pc... 343 if test "x${FC_CONFDIR}" = "x"; then 344 FC_CONFDIR="${sysconfdir}/fonts" 345 fi 346 AC_SUBST(FC_CONFDIR) 347 AC_MSG_RESULT([${FC_CONFDIR}]) 348]) 349 350 351 352# XORG_FONTROOTDIR() 353# -------------------- 354# Minimum version: 1.1.0 355# 356# Sets FONTROOTDIR to the root directory for font files. Uses the first 357# found from: 358# --with-fontrootdir 359# pkg-config --variable=fontrootdir fontutil 360# ${datadir}/fonts/X11 361 362AC_DEFUN([XORG_FONTROOTDIR],[ 363 dnl Ensure $PKG_CONFIG is set first 364 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 365 366 AC_MSG_CHECKING([for root directory for font files]) 367 AC_ARG_WITH(fontrootdir, 368 AS_HELP_STRING([--with-fontrootdir=DIR], 369 [Path to root directory for font files]), 370 [FONTROOTDIR="$withval"]) 371 # if --with-fontrootdir not specified... 372 if test "x${FONTROOTDIR}" = "x"; then 373 FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` 374 fi 375 # ...and if pkg-config didn't find fontdir in fontutil.pc... 376 if test "x${FONTROOTDIR}" = "x"; then 377 FONTROOTDIR="${datadir}/fonts/X11" 378 fi 379 AC_SUBST(FONTROOTDIR) 380 AC_MSG_RESULT([${FONTROOTDIR}]) 381]) 382 383# XORG_FONTSUBDIR(variable, flag, subdir) 384# --------------------------------------- 385# Minimum version: 1.1.0 386# 387# Offer a --with-<flag> flag to control directory for font installation 388# Default is the specified <subdir> of the font root directory. 389# Sets <variable> to the selected directory 390 391AC_DEFUN([XORG_FONTSUBDIR],[ 392 AC_REQUIRE([XORG_FONTROOTDIR]) 393 394 AC_MSG_CHECKING([for directory for $3 files]) 395 AC_ARG_WITH($2, 396 [AS_HELP_STRING([--with-$2=DIR], 397 [Path to $3 files [FONTROOTDIR/$3]])], 398 [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) 399 AC_SUBST($1) 400 AC_MSG_RESULT([${$1}]) 401]) # XORG_FONTSUBDIR 402 403# XORG_FONTDIR(subdir) 404# -------------------- 405# Minimum version: 1.1.0 406# 407# Offer a --with-fontdir flag to control directory for font installation 408# Default is the specified subdir of the font root directory. 409# Sets FONTDIR to the selected directory 410 411AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) 412 413# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 414# 415# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 416# Written by Gordon Matzigkeit, 1996 417# 418# This file is free software; the Free Software Foundation gives 419# unlimited permission to copy and/or distribute it, with or without 420# modifications, as long as this notice is preserved. 421 422m4_define([_LT_COPYING], [dnl 423# Copyright (C) 2014 Free Software Foundation, Inc. 424# This is free software; see the source for copying conditions. There is NO 425# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 426 427# GNU Libtool is free software; you can redistribute it and/or modify 428# it under the terms of the GNU General Public License as published by 429# the Free Software Foundation; either version 2 of of the License, or 430# (at your option) any later version. 431# 432# As a special exception to the GNU General Public License, if you 433# distribute this file as part of a program or library that is built 434# using GNU Libtool, you may include this file under the same 435# distribution terms that you use for the rest of that program. 436# 437# GNU Libtool is distributed in the hope that it will be useful, but 438# WITHOUT ANY WARRANTY; without even the implied warranty of 439# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 440# GNU General Public License for more details. 441# 442# You should have received a copy of the GNU General Public License 443# along with this program. If not, see <http://www.gnu.org/licenses/>. 444]) 445 446# serial 58 LT_INIT 447 448 449# LT_PREREQ(VERSION) 450# ------------------ 451# Complain and exit if this libtool version is less that VERSION. 452m4_defun([LT_PREREQ], 453[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 454 [m4_default([$3], 455 [m4_fatal([Libtool version $1 or higher is required], 456 63)])], 457 [$2])]) 458 459 460# _LT_CHECK_BUILDDIR 461# ------------------ 462# Complain if the absolute build directory name contains unusual characters 463m4_defun([_LT_CHECK_BUILDDIR], 464[case `pwd` in 465 *\ * | *\ *) 466 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 467esac 468]) 469 470 471# LT_INIT([OPTIONS]) 472# ------------------ 473AC_DEFUN([LT_INIT], 474[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 475AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 476AC_BEFORE([$0], [LT_LANG])dnl 477AC_BEFORE([$0], [LT_OUTPUT])dnl 478AC_BEFORE([$0], [LTDL_INIT])dnl 479m4_require([_LT_CHECK_BUILDDIR])dnl 480 481dnl Autoconf doesn't catch unexpanded LT_ macros by default: 482m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 483m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 484dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 485dnl unless we require an AC_DEFUNed macro: 486AC_REQUIRE([LTOPTIONS_VERSION])dnl 487AC_REQUIRE([LTSUGAR_VERSION])dnl 488AC_REQUIRE([LTVERSION_VERSION])dnl 489AC_REQUIRE([LTOBSOLETE_VERSION])dnl 490m4_require([_LT_PROG_LTMAIN])dnl 491 492_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 493 494dnl Parse OPTIONS 495_LT_SET_OPTIONS([$0], [$1]) 496 497# This can be used to rebuild libtool when needed 498LIBTOOL_DEPS=$ltmain 499 500# Always use our own libtool. 501LIBTOOL='$(SHELL) $(top_builddir)/libtool' 502AC_SUBST(LIBTOOL)dnl 503 504_LT_SETUP 505 506# Only expand once: 507m4_define([LT_INIT]) 508])# LT_INIT 509 510# Old names: 511AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 512AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 513dnl aclocal-1.4 backwards compatibility: 514dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 515dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 516 517 518# _LT_PREPARE_CC_BASENAME 519# ----------------------- 520m4_defun([_LT_PREPARE_CC_BASENAME], [ 521# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 522func_cc_basename () 523{ 524 for cc_temp in @S|@*""; do 525 case $cc_temp in 526 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 527 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 528 \-*) ;; 529 *) break;; 530 esac 531 done 532 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 533} 534])# _LT_PREPARE_CC_BASENAME 535 536 537# _LT_CC_BASENAME(CC) 538# ------------------- 539# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 540# but that macro is also expanded into generated libtool script, which 541# arranges for $SED and $ECHO to be set by different means. 542m4_defun([_LT_CC_BASENAME], 543[m4_require([_LT_PREPARE_CC_BASENAME])dnl 544AC_REQUIRE([_LT_DECL_SED])dnl 545AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 546func_cc_basename $1 547cc_basename=$func_cc_basename_result 548]) 549 550 551# _LT_FILEUTILS_DEFAULTS 552# ---------------------- 553# It is okay to use these file commands and assume they have been set 554# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 555m4_defun([_LT_FILEUTILS_DEFAULTS], 556[: ${CP="cp -f"} 557: ${MV="mv -f"} 558: ${RM="rm -f"} 559])# _LT_FILEUTILS_DEFAULTS 560 561 562# _LT_SETUP 563# --------- 564m4_defun([_LT_SETUP], 565[AC_REQUIRE([AC_CANONICAL_HOST])dnl 566AC_REQUIRE([AC_CANONICAL_BUILD])dnl 567AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 568AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 569 570_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 571dnl 572_LT_DECL([], [host_alias], [0], [The host system])dnl 573_LT_DECL([], [host], [0])dnl 574_LT_DECL([], [host_os], [0])dnl 575dnl 576_LT_DECL([], [build_alias], [0], [The build system])dnl 577_LT_DECL([], [build], [0])dnl 578_LT_DECL([], [build_os], [0])dnl 579dnl 580AC_REQUIRE([AC_PROG_CC])dnl 581AC_REQUIRE([LT_PATH_LD])dnl 582AC_REQUIRE([LT_PATH_NM])dnl 583dnl 584AC_REQUIRE([AC_PROG_LN_S])dnl 585test -z "$LN_S" && LN_S="ln -s" 586_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 587dnl 588AC_REQUIRE([LT_CMD_MAX_LEN])dnl 589_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 590_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 591dnl 592m4_require([_LT_FILEUTILS_DEFAULTS])dnl 593m4_require([_LT_CHECK_SHELL_FEATURES])dnl 594m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 595m4_require([_LT_CMD_RELOAD])dnl 596m4_require([_LT_CHECK_MAGIC_METHOD])dnl 597m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 598m4_require([_LT_CMD_OLD_ARCHIVE])dnl 599m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 600m4_require([_LT_WITH_SYSROOT])dnl 601m4_require([_LT_CMD_TRUNCATE])dnl 602 603_LT_CONFIG_LIBTOOL_INIT([ 604# See if we are running on zsh, and set the options that allow our 605# commands through without removal of \ escapes INIT. 606if test -n "\${ZSH_VERSION+set}"; then 607 setopt NO_GLOB_SUBST 608fi 609]) 610if test -n "${ZSH_VERSION+set}"; then 611 setopt NO_GLOB_SUBST 612fi 613 614_LT_CHECK_OBJDIR 615 616m4_require([_LT_TAG_COMPILER])dnl 617 618case $host_os in 619aix3*) 620 # AIX sometimes has problems with the GCC collect2 program. For some 621 # reason, if we set the COLLECT_NAMES environment variable, the problems 622 # vanish in a puff of smoke. 623 if test set != "${COLLECT_NAMES+set}"; then 624 COLLECT_NAMES= 625 export COLLECT_NAMES 626 fi 627 ;; 628esac 629 630# Global variables: 631ofile=libtool 632can_build_shared=yes 633 634# All known linkers require a '.a' archive for static linking (except MSVC, 635# which needs '.lib'). 636libext=a 637 638with_gnu_ld=$lt_cv_prog_gnu_ld 639 640old_CC=$CC 641old_CFLAGS=$CFLAGS 642 643# Set sane defaults for various variables 644test -z "$CC" && CC=cc 645test -z "$LTCC" && LTCC=$CC 646test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 647test -z "$LD" && LD=ld 648test -z "$ac_objext" && ac_objext=o 649 650_LT_CC_BASENAME([$compiler]) 651 652# Only perform the check for file, if the check method requires it 653test -z "$MAGIC_CMD" && MAGIC_CMD=file 654case $deplibs_check_method in 655file_magic*) 656 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 657 _LT_PATH_MAGIC 658 fi 659 ;; 660esac 661 662# Use C for the default configuration in the libtool script 663LT_SUPPORTED_TAG([CC]) 664_LT_LANG_C_CONFIG 665_LT_LANG_DEFAULT_CONFIG 666_LT_CONFIG_COMMANDS 667])# _LT_SETUP 668 669 670# _LT_PREPARE_SED_QUOTE_VARS 671# -------------------------- 672# Define a few sed substitution that help us do robust quoting. 673m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 674[# Backslashify metacharacters that are still active within 675# double-quoted strings. 676sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 677 678# Same as above, but do not quote variable references. 679double_quote_subst='s/\([["`\\]]\)/\\\1/g' 680 681# Sed substitution to delay expansion of an escaped shell variable in a 682# double_quote_subst'ed string. 683delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 684 685# Sed substitution to delay expansion of an escaped single quote. 686delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 687 688# Sed substitution to avoid accidental globbing in evaled expressions 689no_glob_subst='s/\*/\\\*/g' 690]) 691 692# _LT_PROG_LTMAIN 693# --------------- 694# Note that this code is called both from 'configure', and 'config.status' 695# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 696# 'config.status' has no value for ac_aux_dir unless we are using Automake, 697# so we pass a copy along to make sure it has a sensible value anyway. 698m4_defun([_LT_PROG_LTMAIN], 699[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 700_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 701ltmain=$ac_aux_dir/ltmain.sh 702])# _LT_PROG_LTMAIN 703 704 705 706# So that we can recreate a full libtool script including additional 707# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 708# in macros and then make a single call at the end using the 'libtool' 709# label. 710 711 712# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 713# ---------------------------------------- 714# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 715m4_define([_LT_CONFIG_LIBTOOL_INIT], 716[m4_ifval([$1], 717 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 718 [$1 719])])]) 720 721# Initialize. 722m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 723 724 725# _LT_CONFIG_LIBTOOL([COMMANDS]) 726# ------------------------------ 727# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 728m4_define([_LT_CONFIG_LIBTOOL], 729[m4_ifval([$1], 730 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 731 [$1 732])])]) 733 734# Initialize. 735m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 736 737 738# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 739# ----------------------------------------------------- 740m4_defun([_LT_CONFIG_SAVE_COMMANDS], 741[_LT_CONFIG_LIBTOOL([$1]) 742_LT_CONFIG_LIBTOOL_INIT([$2]) 743]) 744 745 746# _LT_FORMAT_COMMENT([COMMENT]) 747# ----------------------------- 748# Add leading comment marks to the start of each line, and a trailing 749# full-stop to the whole comment if one is not present already. 750m4_define([_LT_FORMAT_COMMENT], 751[m4_ifval([$1], [ 752m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 753 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 754)]) 755 756 757 758 759 760# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 761# ------------------------------------------------------------------- 762# CONFIGNAME is the name given to the value in the libtool script. 763# VARNAME is the (base) name used in the configure script. 764# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 765# VARNAME. Any other value will be used directly. 766m4_define([_LT_DECL], 767[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 768 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 769 [m4_ifval([$1], [$1], [$2])]) 770 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 771 m4_ifval([$4], 772 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 773 lt_dict_add_subkey([lt_decl_dict], [$2], 774 [tagged?], [m4_ifval([$5], [yes], [no])])]) 775]) 776 777 778# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 779# -------------------------------------------------------- 780m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 781 782 783# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 784# ------------------------------------------------ 785m4_define([lt_decl_tag_varnames], 786[_lt_decl_filter([tagged?], [yes], $@)]) 787 788 789# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 790# --------------------------------------------------------- 791m4_define([_lt_decl_filter], 792[m4_case([$#], 793 [0], [m4_fatal([$0: too few arguments: $#])], 794 [1], [m4_fatal([$0: too few arguments: $#: $1])], 795 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 796 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 797 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 798]) 799 800 801# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 802# -------------------------------------------------- 803m4_define([lt_decl_quote_varnames], 804[_lt_decl_filter([value], [1], $@)]) 805 806 807# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 808# --------------------------------------------------- 809m4_define([lt_decl_dquote_varnames], 810[_lt_decl_filter([value], [2], $@)]) 811 812 813# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 814# --------------------------------------------------- 815m4_define([lt_decl_varnames_tagged], 816[m4_assert([$# <= 2])dnl 817_$0(m4_quote(m4_default([$1], [[, ]])), 818 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 819 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 820m4_define([_lt_decl_varnames_tagged], 821[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 822 823 824# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 825# ------------------------------------------------ 826m4_define([lt_decl_all_varnames], 827[_$0(m4_quote(m4_default([$1], [[, ]])), 828 m4_if([$2], [], 829 m4_quote(lt_decl_varnames), 830 m4_quote(m4_shift($@))))[]dnl 831]) 832m4_define([_lt_decl_all_varnames], 833[lt_join($@, lt_decl_varnames_tagged([$1], 834 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 835]) 836 837 838# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 839# ------------------------------------ 840# Quote a variable value, and forward it to 'config.status' so that its 841# declaration there will have the same value as in 'configure'. VARNAME 842# must have a single quote delimited value for this to work. 843m4_define([_LT_CONFIG_STATUS_DECLARE], 844[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 845 846 847# _LT_CONFIG_STATUS_DECLARATIONS 848# ------------------------------ 849# We delimit libtool config variables with single quotes, so when 850# we write them to config.status, we have to be sure to quote all 851# embedded single quotes properly. In configure, this macro expands 852# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 853# 854# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 855m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 856[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 857 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 858 859 860# _LT_LIBTOOL_TAGS 861# ---------------- 862# Output comment and list of tags supported by the script 863m4_defun([_LT_LIBTOOL_TAGS], 864[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 865available_tags='_LT_TAGS'dnl 866]) 867 868 869# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 870# ----------------------------------- 871# Extract the dictionary values for VARNAME (optionally with TAG) and 872# expand to a commented shell variable setting: 873# 874# # Some comment about what VAR is for. 875# visible_name=$lt_internal_name 876m4_define([_LT_LIBTOOL_DECLARE], 877[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 878 [description])))[]dnl 879m4_pushdef([_libtool_name], 880 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 881m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 882 [0], [_libtool_name=[$]$1], 883 [1], [_libtool_name=$lt_[]$1], 884 [2], [_libtool_name=$lt_[]$1], 885 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 886m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 887]) 888 889 890# _LT_LIBTOOL_CONFIG_VARS 891# ----------------------- 892# Produce commented declarations of non-tagged libtool config variables 893# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 894# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 895# section) are produced by _LT_LIBTOOL_TAG_VARS. 896m4_defun([_LT_LIBTOOL_CONFIG_VARS], 897[m4_foreach([_lt_var], 898 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 899 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 900 901 902# _LT_LIBTOOL_TAG_VARS(TAG) 903# ------------------------- 904m4_define([_LT_LIBTOOL_TAG_VARS], 905[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 906 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 907 908 909# _LT_TAGVAR(VARNAME, [TAGNAME]) 910# ------------------------------ 911m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 912 913 914# _LT_CONFIG_COMMANDS 915# ------------------- 916# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 917# variables for single and double quote escaping we saved from calls 918# to _LT_DECL, we can put quote escaped variables declarations 919# into 'config.status', and then the shell code to quote escape them in 920# for loops in 'config.status'. Finally, any additional code accumulated 921# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 922m4_defun([_LT_CONFIG_COMMANDS], 923[AC_PROVIDE_IFELSE([LT_OUTPUT], 924 dnl If the libtool generation code has been placed in $CONFIG_LT, 925 dnl instead of duplicating it all over again into config.status, 926 dnl then we will have config.status run $CONFIG_LT later, so it 927 dnl needs to know what name is stored there: 928 [AC_CONFIG_COMMANDS([libtool], 929 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 930 dnl If the libtool generation code is destined for config.status, 931 dnl expand the accumulated commands and init code now: 932 [AC_CONFIG_COMMANDS([libtool], 933 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 934])#_LT_CONFIG_COMMANDS 935 936 937# Initialize. 938m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 939[ 940 941# The HP-UX ksh and POSIX shell print the target directory to stdout 942# if CDPATH is set. 943(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 944 945sed_quote_subst='$sed_quote_subst' 946double_quote_subst='$double_quote_subst' 947delay_variable_subst='$delay_variable_subst' 948_LT_CONFIG_STATUS_DECLARATIONS 949LTCC='$LTCC' 950LTCFLAGS='$LTCFLAGS' 951compiler='$compiler_DEFAULT' 952 953# A function that is used when there is no print builtin or printf. 954func_fallback_echo () 955{ 956 eval 'cat <<_LTECHO_EOF 957\$[]1 958_LTECHO_EOF' 959} 960 961# Quote evaled strings. 962for var in lt_decl_all_varnames([[ \ 963]], lt_decl_quote_varnames); do 964 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 965 *[[\\\\\\\`\\"\\\$]]*) 966 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 967 ;; 968 *) 969 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 970 ;; 971 esac 972done 973 974# Double-quote double-evaled strings. 975for var in lt_decl_all_varnames([[ \ 976]], lt_decl_dquote_varnames); do 977 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 978 *[[\\\\\\\`\\"\\\$]]*) 979 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 980 ;; 981 *) 982 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 983 ;; 984 esac 985done 986 987_LT_OUTPUT_LIBTOOL_INIT 988]) 989 990# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 991# ------------------------------------ 992# Generate a child script FILE with all initialization necessary to 993# reuse the environment learned by the parent script, and make the 994# file executable. If COMMENT is supplied, it is inserted after the 995# '#!' sequence but before initialization text begins. After this 996# macro, additional text can be appended to FILE to form the body of 997# the child script. The macro ends with non-zero status if the 998# file could not be fully written (such as if the disk is full). 999m4_ifdef([AS_INIT_GENERATED], 1000[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1001[m4_defun([_LT_GENERATED_FILE_INIT], 1002[m4_require([AS_PREPARE])]dnl 1003[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1004[lt_write_fail=0 1005cat >$1 <<_ASEOF || lt_write_fail=1 1006#! $SHELL 1007# Generated by $as_me. 1008$2 1009SHELL=\${CONFIG_SHELL-$SHELL} 1010export SHELL 1011_ASEOF 1012cat >>$1 <<\_ASEOF || lt_write_fail=1 1013AS_SHELL_SANITIZE 1014_AS_PREPARE 1015exec AS_MESSAGE_FD>&1 1016_ASEOF 1017test 0 = "$lt_write_fail" && chmod +x $1[]dnl 1018m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1019 1020# LT_OUTPUT 1021# --------- 1022# This macro allows early generation of the libtool script (before 1023# AC_OUTPUT is called), incase it is used in configure for compilation 1024# tests. 1025AC_DEFUN([LT_OUTPUT], 1026[: ${CONFIG_LT=./config.lt} 1027AC_MSG_NOTICE([creating $CONFIG_LT]) 1028_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1029[# Run this file to recreate a libtool stub with the current configuration.]) 1030 1031cat >>"$CONFIG_LT" <<\_LTEOF 1032lt_cl_silent=false 1033exec AS_MESSAGE_LOG_FD>>config.log 1034{ 1035 echo 1036 AS_BOX([Running $as_me.]) 1037} >&AS_MESSAGE_LOG_FD 1038 1039lt_cl_help="\ 1040'$as_me' creates a local libtool stub from the current configuration, 1041for use in further configure time tests before the real libtool is 1042generated. 1043 1044Usage: $[0] [[OPTIONS]] 1045 1046 -h, --help print this help, then exit 1047 -V, --version print version number, then exit 1048 -q, --quiet do not print progress messages 1049 -d, --debug don't remove temporary files 1050 1051Report bugs to <bug-libtool@gnu.org>." 1052 1053lt_cl_version="\ 1054m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1055m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1056configured by $[0], generated by m4_PACKAGE_STRING. 1057 1058Copyright (C) 2011 Free Software Foundation, Inc. 1059This config.lt script is free software; the Free Software Foundation 1060gives unlimited permision to copy, distribute and modify it." 1061 1062while test 0 != $[#] 1063do 1064 case $[1] in 1065 --version | --v* | -V ) 1066 echo "$lt_cl_version"; exit 0 ;; 1067 --help | --h* | -h ) 1068 echo "$lt_cl_help"; exit 0 ;; 1069 --debug | --d* | -d ) 1070 debug=: ;; 1071 --quiet | --q* | --silent | --s* | -q ) 1072 lt_cl_silent=: ;; 1073 1074 -*) AC_MSG_ERROR([unrecognized option: $[1] 1075Try '$[0] --help' for more information.]) ;; 1076 1077 *) AC_MSG_ERROR([unrecognized argument: $[1] 1078Try '$[0] --help' for more information.]) ;; 1079 esac 1080 shift 1081done 1082 1083if $lt_cl_silent; then 1084 exec AS_MESSAGE_FD>/dev/null 1085fi 1086_LTEOF 1087 1088cat >>"$CONFIG_LT" <<_LTEOF 1089_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1090_LTEOF 1091 1092cat >>"$CONFIG_LT" <<\_LTEOF 1093AC_MSG_NOTICE([creating $ofile]) 1094_LT_OUTPUT_LIBTOOL_COMMANDS 1095AS_EXIT(0) 1096_LTEOF 1097chmod +x "$CONFIG_LT" 1098 1099# configure is writing to config.log, but config.lt does its own redirection, 1100# appending to config.log, which fails on DOS, as config.log is still kept 1101# open by configure. Here we exec the FD to /dev/null, effectively closing 1102# config.log, so it can be properly (re)opened and appended to by config.lt. 1103lt_cl_success=: 1104test yes = "$silent" && 1105 lt_config_lt_args="$lt_config_lt_args --quiet" 1106exec AS_MESSAGE_LOG_FD>/dev/null 1107$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1108exec AS_MESSAGE_LOG_FD>>config.log 1109$lt_cl_success || AS_EXIT(1) 1110])# LT_OUTPUT 1111 1112 1113# _LT_CONFIG(TAG) 1114# --------------- 1115# If TAG is the built-in tag, create an initial libtool script with a 1116# default configuration from the untagged config vars. Otherwise add code 1117# to config.status for appending the configuration named by TAG from the 1118# matching tagged config vars. 1119m4_defun([_LT_CONFIG], 1120[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1121_LT_CONFIG_SAVE_COMMANDS([ 1122 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1123 m4_if(_LT_TAG, [C], [ 1124 # See if we are running on zsh, and set the options that allow our 1125 # commands through without removal of \ escapes. 1126 if test -n "${ZSH_VERSION+set}"; then 1127 setopt NO_GLOB_SUBST 1128 fi 1129 1130 cfgfile=${ofile}T 1131 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1132 $RM "$cfgfile" 1133 1134 cat <<_LT_EOF >> "$cfgfile" 1135#! $SHELL 1136# Generated automatically by $as_me ($PACKAGE) $VERSION 1137# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1138# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1139 1140# Provide generalized library-building support services. 1141# Written by Gordon Matzigkeit, 1996 1142 1143_LT_COPYING 1144_LT_LIBTOOL_TAGS 1145 1146# Configured defaults for sys_lib_dlsearch_path munging. 1147: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 1148 1149# ### BEGIN LIBTOOL CONFIG 1150_LT_LIBTOOL_CONFIG_VARS 1151_LT_LIBTOOL_TAG_VARS 1152# ### END LIBTOOL CONFIG 1153 1154_LT_EOF 1155 1156 cat <<'_LT_EOF' >> "$cfgfile" 1157 1158# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 1159 1160_LT_PREPARE_MUNGE_PATH_LIST 1161_LT_PREPARE_CC_BASENAME 1162 1163# ### END FUNCTIONS SHARED WITH CONFIGURE 1164 1165_LT_EOF 1166 1167 case $host_os in 1168 aix3*) 1169 cat <<\_LT_EOF >> "$cfgfile" 1170# AIX sometimes has problems with the GCC collect2 program. For some 1171# reason, if we set the COLLECT_NAMES environment variable, the problems 1172# vanish in a puff of smoke. 1173if test set != "${COLLECT_NAMES+set}"; then 1174 COLLECT_NAMES= 1175 export COLLECT_NAMES 1176fi 1177_LT_EOF 1178 ;; 1179 esac 1180 1181 _LT_PROG_LTMAIN 1182 1183 # We use sed instead of cat because bash on DJGPP gets confused if 1184 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1185 # text mode, it properly converts lines to CR/LF. This bash problem 1186 # is reportedly fixed, but why not run on old versions too? 1187 sed '$q' "$ltmain" >> "$cfgfile" \ 1188 || (rm -f "$cfgfile"; exit 1) 1189 1190 mv -f "$cfgfile" "$ofile" || 1191 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1192 chmod +x "$ofile" 1193], 1194[cat <<_LT_EOF >> "$ofile" 1195 1196dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1197dnl in a comment (ie after a #). 1198# ### BEGIN LIBTOOL TAG CONFIG: $1 1199_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1200# ### END LIBTOOL TAG CONFIG: $1 1201_LT_EOF 1202])dnl /m4_if 1203], 1204[m4_if([$1], [], [ 1205 PACKAGE='$PACKAGE' 1206 VERSION='$VERSION' 1207 RM='$RM' 1208 ofile='$ofile'], []) 1209])dnl /_LT_CONFIG_SAVE_COMMANDS 1210])# _LT_CONFIG 1211 1212 1213# LT_SUPPORTED_TAG(TAG) 1214# --------------------- 1215# Trace this macro to discover what tags are supported by the libtool 1216# --tag option, using: 1217# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1218AC_DEFUN([LT_SUPPORTED_TAG], []) 1219 1220 1221# C support is built-in for now 1222m4_define([_LT_LANG_C_enabled], []) 1223m4_define([_LT_TAGS], []) 1224 1225 1226# LT_LANG(LANG) 1227# ------------- 1228# Enable libtool support for the given language if not already enabled. 1229AC_DEFUN([LT_LANG], 1230[AC_BEFORE([$0], [LT_OUTPUT])dnl 1231m4_case([$1], 1232 [C], [_LT_LANG(C)], 1233 [C++], [_LT_LANG(CXX)], 1234 [Go], [_LT_LANG(GO)], 1235 [Java], [_LT_LANG(GCJ)], 1236 [Fortran 77], [_LT_LANG(F77)], 1237 [Fortran], [_LT_LANG(FC)], 1238 [Windows Resource], [_LT_LANG(RC)], 1239 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1240 [_LT_LANG($1)], 1241 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1242])# LT_LANG 1243 1244 1245# _LT_LANG(LANGNAME) 1246# ------------------ 1247m4_defun([_LT_LANG], 1248[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1249 [LT_SUPPORTED_TAG([$1])dnl 1250 m4_append([_LT_TAGS], [$1 ])dnl 1251 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1252 _LT_LANG_$1_CONFIG($1)])dnl 1253])# _LT_LANG 1254 1255 1256m4_ifndef([AC_PROG_GO], [ 1257# NOTE: This macro has been submitted for inclusion into # 1258# GNU Autoconf as AC_PROG_GO. When it is available in # 1259# a released version of Autoconf we should remove this # 1260# macro and use it instead. # 1261m4_defun([AC_PROG_GO], 1262[AC_LANG_PUSH(Go)dnl 1263AC_ARG_VAR([GOC], [Go compiler command])dnl 1264AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1265_AC_ARG_VAR_LDFLAGS()dnl 1266AC_CHECK_TOOL(GOC, gccgo) 1267if test -z "$GOC"; then 1268 if test -n "$ac_tool_prefix"; then 1269 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1270 fi 1271fi 1272if test -z "$GOC"; then 1273 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1274fi 1275])#m4_defun 1276])#m4_ifndef 1277 1278 1279# _LT_LANG_DEFAULT_CONFIG 1280# ----------------------- 1281m4_defun([_LT_LANG_DEFAULT_CONFIG], 1282[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1283 [LT_LANG(CXX)], 1284 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1285 1286AC_PROVIDE_IFELSE([AC_PROG_F77], 1287 [LT_LANG(F77)], 1288 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1289 1290AC_PROVIDE_IFELSE([AC_PROG_FC], 1291 [LT_LANG(FC)], 1292 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1293 1294dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 1295dnl pulling things in needlessly. 1296AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1297 [LT_LANG(GCJ)], 1298 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1299 [LT_LANG(GCJ)], 1300 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 1301 [LT_LANG(GCJ)], 1302 [m4_ifdef([AC_PROG_GCJ], 1303 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 1304 m4_ifdef([A][M_PROG_GCJ], 1305 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 1306 m4_ifdef([LT_PROG_GCJ], 1307 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1308 1309AC_PROVIDE_IFELSE([AC_PROG_GO], 1310 [LT_LANG(GO)], 1311 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1312 1313AC_PROVIDE_IFELSE([LT_PROG_RC], 1314 [LT_LANG(RC)], 1315 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 1316])# _LT_LANG_DEFAULT_CONFIG 1317 1318# Obsolete macros: 1319AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 1320AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 1321AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 1322AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 1323AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1324dnl aclocal-1.4 backwards compatibility: 1325dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 1326dnl AC_DEFUN([AC_LIBTOOL_F77], []) 1327dnl AC_DEFUN([AC_LIBTOOL_FC], []) 1328dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 1329dnl AC_DEFUN([AC_LIBTOOL_RC], []) 1330 1331 1332# _LT_TAG_COMPILER 1333# ---------------- 1334m4_defun([_LT_TAG_COMPILER], 1335[AC_REQUIRE([AC_PROG_CC])dnl 1336 1337_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 1338_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 1339_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 1340_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1341 1342# If no C compiler was specified, use CC. 1343LTCC=${LTCC-"$CC"} 1344 1345# If no C compiler flags were specified, use CFLAGS. 1346LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1347 1348# Allow CC to be a program name with arguments. 1349compiler=$CC 1350])# _LT_TAG_COMPILER 1351 1352 1353# _LT_COMPILER_BOILERPLATE 1354# ------------------------ 1355# Check for compiler boilerplate output or warnings with 1356# the simple compiler test code. 1357m4_defun([_LT_COMPILER_BOILERPLATE], 1358[m4_require([_LT_DECL_SED])dnl 1359ac_outfile=conftest.$ac_objext 1360echo "$lt_simple_compile_test_code" >conftest.$ac_ext 1361eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1362_lt_compiler_boilerplate=`cat conftest.err` 1363$RM conftest* 1364])# _LT_COMPILER_BOILERPLATE 1365 1366 1367# _LT_LINKER_BOILERPLATE 1368# ---------------------- 1369# Check for linker boilerplate output or warnings with 1370# the simple link test code. 1371m4_defun([_LT_LINKER_BOILERPLATE], 1372[m4_require([_LT_DECL_SED])dnl 1373ac_outfile=conftest.$ac_objext 1374echo "$lt_simple_link_test_code" >conftest.$ac_ext 1375eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1376_lt_linker_boilerplate=`cat conftest.err` 1377$RM -r conftest* 1378])# _LT_LINKER_BOILERPLATE 1379 1380# _LT_REQUIRED_DARWIN_CHECKS 1381# ------------------------- 1382m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1383 case $host_os in 1384 rhapsody* | darwin*) 1385 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 1386 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 1387 AC_CHECK_TOOL([LIPO], [lipo], [:]) 1388 AC_CHECK_TOOL([OTOOL], [otool], [:]) 1389 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1390 _LT_DECL([], [DSYMUTIL], [1], 1391 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1392 _LT_DECL([], [NMEDIT], [1], 1393 [Tool to change global to local symbols on Mac OS X]) 1394 _LT_DECL([], [LIPO], [1], 1395 [Tool to manipulate fat objects and archives on Mac OS X]) 1396 _LT_DECL([], [OTOOL], [1], 1397 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1398 _LT_DECL([], [OTOOL64], [1], 1399 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1400 1401 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1402 [lt_cv_apple_cc_single_mod=no 1403 if test -z "$LT_MULTI_MODULE"; then 1404 # By default we will add the -single_module flag. You can override 1405 # by either setting the environment variable LT_MULTI_MODULE 1406 # non-empty at configure time, or by adding -multi_module to the 1407 # link flags. 1408 rm -rf libconftest.dylib* 1409 echo "int foo(void){return 1;}" > conftest.c 1410 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1411-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1412 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1413 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1414 _lt_result=$? 1415 # If there is a non-empty error log, and "single_module" 1416 # appears in it, assume the flag caused a linker warning 1417 if test -s conftest.err && $GREP single_module conftest.err; then 1418 cat conftest.err >&AS_MESSAGE_LOG_FD 1419 # Otherwise, if the output was created with a 0 exit code from 1420 # the compiler, it worked. 1421 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1422 lt_cv_apple_cc_single_mod=yes 1423 else 1424 cat conftest.err >&AS_MESSAGE_LOG_FD 1425 fi 1426 rm -rf libconftest.dylib* 1427 rm -f conftest.* 1428 fi]) 1429 1430 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1431 [lt_cv_ld_exported_symbols_list], 1432 [lt_cv_ld_exported_symbols_list=no 1433 save_LDFLAGS=$LDFLAGS 1434 echo "_main" > conftest.sym 1435 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1436 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1437 [lt_cv_ld_exported_symbols_list=yes], 1438 [lt_cv_ld_exported_symbols_list=no]) 1439 LDFLAGS=$save_LDFLAGS 1440 ]) 1441 1442 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1443 [lt_cv_ld_force_load=no 1444 cat > conftest.c << _LT_EOF 1445int forced_loaded() { return 2;} 1446_LT_EOF 1447 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1448 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1449 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1450 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1451 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1452 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1453 cat > conftest.c << _LT_EOF 1454int main() { return 0;} 1455_LT_EOF 1456 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1457 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1458 _lt_result=$? 1459 if test -s conftest.err && $GREP force_load conftest.err; then 1460 cat conftest.err >&AS_MESSAGE_LOG_FD 1461 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1462 lt_cv_ld_force_load=yes 1463 else 1464 cat conftest.err >&AS_MESSAGE_LOG_FD 1465 fi 1466 rm -f conftest.err libconftest.a conftest conftest.c 1467 rm -rf conftest.dSYM 1468 ]) 1469 case $host_os in 1470 rhapsody* | darwin1.[[012]]) 1471 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1472 darwin1.*) 1473 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1474 darwin*) # darwin 5.x on 1475 # if running on 10.5 or later, the deployment target defaults 1476 # to the OS version, if on x86, and 10.4, the deployment 1477 # target defaults to 10.4. Don't you love it? 1478 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1479 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1480 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1481 10.[[012]][[,.]]*) 1482 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1483 10.*) 1484 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1485 esac 1486 ;; 1487 esac 1488 if test yes = "$lt_cv_apple_cc_single_mod"; then 1489 _lt_dar_single_mod='$single_module' 1490 fi 1491 if test yes = "$lt_cv_ld_exported_symbols_list"; then 1492 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1493 else 1494 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1495 fi 1496 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1497 _lt_dsymutil='~$DSYMUTIL $lib || :' 1498 else 1499 _lt_dsymutil= 1500 fi 1501 ;; 1502 esac 1503]) 1504 1505 1506# _LT_DARWIN_LINKER_FEATURES([TAG]) 1507# --------------------------------- 1508# Checks for linker and compiler features on darwin 1509m4_defun([_LT_DARWIN_LINKER_FEATURES], 1510[ 1511 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1512 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1513 _LT_TAGVAR(hardcode_direct, $1)=no 1514 _LT_TAGVAR(hardcode_automatic, $1)=yes 1515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1516 if test yes = "$lt_cv_ld_force_load"; then 1517 _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\"`' 1518 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1519 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1520 else 1521 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1522 fi 1523 _LT_TAGVAR(link_all_deplibs, $1)=yes 1524 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1525 case $cc_basename in 1526 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1527 *) _lt_dar_can_shared=$GCC ;; 1528 esac 1529 if test yes = "$_lt_dar_can_shared"; then 1530 output_verbose_link_cmd=func_echo_all 1531 _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" 1532 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1533 _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" 1534 _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" 1535 m4_if([$1], [CXX], 1536[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1537 _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" 1538 _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" 1539 fi 1540],[]) 1541 else 1542 _LT_TAGVAR(ld_shlibs, $1)=no 1543 fi 1544]) 1545 1546# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1547# ---------------------------------- 1548# Links a minimal program and checks the executable 1549# for the system default hardcoded library path. In most cases, 1550# this is /usr/lib:/lib, but when the MPI compilers are used 1551# the location of the communication and MPI libs are included too. 1552# If we don't find anything, use the default library path according 1553# to the aix ld manual. 1554# Store the results from the different compilers for each TAGNAME. 1555# Allow to override them for all tags through lt_cv_aix_libpath. 1556m4_defun([_LT_SYS_MODULE_PATH_AIX], 1557[m4_require([_LT_DECL_SED])dnl 1558if test set = "${lt_cv_aix_libpath+set}"; then 1559 aix_libpath=$lt_cv_aix_libpath 1560else 1561 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1562 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1563 lt_aix_libpath_sed='[ 1564 /Import File Strings/,/^$/ { 1565 /^0/ { 1566 s/^0 *\([^ ]*\) *$/\1/ 1567 p 1568 } 1569 }]' 1570 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1571 # Check for a 64-bit object if we didn't find anything. 1572 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1573 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1574 fi],[]) 1575 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1576 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1577 fi 1578 ]) 1579 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1580fi 1581])# _LT_SYS_MODULE_PATH_AIX 1582 1583 1584# _LT_SHELL_INIT(ARG) 1585# ------------------- 1586m4_define([_LT_SHELL_INIT], 1587[m4_divert_text([M4SH-INIT], [$1 1588])])# _LT_SHELL_INIT 1589 1590 1591 1592# _LT_PROG_ECHO_BACKSLASH 1593# ----------------------- 1594# Find how we can fake an echo command that does not interpret backslash. 1595# In particular, with Autoconf 2.60 or later we add some code to the start 1596# of the generated configure script that will find a shell with a builtin 1597# printf (that we can use as an echo command). 1598m4_defun([_LT_PROG_ECHO_BACKSLASH], 1599[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1600ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1601ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1602 1603AC_MSG_CHECKING([how to print strings]) 1604# Test print first, because it will be a builtin if present. 1605if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1606 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1607 ECHO='print -r --' 1608elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1609 ECHO='printf %s\n' 1610else 1611 # Use this function as a fallback that always works. 1612 func_fallback_echo () 1613 { 1614 eval 'cat <<_LTECHO_EOF 1615$[]1 1616_LTECHO_EOF' 1617 } 1618 ECHO='func_fallback_echo' 1619fi 1620 1621# func_echo_all arg... 1622# Invoke $ECHO with all args, space-separated. 1623func_echo_all () 1624{ 1625 $ECHO "$*" 1626} 1627 1628case $ECHO in 1629 printf*) AC_MSG_RESULT([printf]) ;; 1630 print*) AC_MSG_RESULT([print -r]) ;; 1631 *) AC_MSG_RESULT([cat]) ;; 1632esac 1633 1634m4_ifdef([_AS_DETECT_SUGGESTED], 1635[_AS_DETECT_SUGGESTED([ 1636 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1637 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1638 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1639 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1640 PATH=/empty FPATH=/empty; export PATH FPATH 1641 test "X`printf %s $ECHO`" = "X$ECHO" \ 1642 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1643 1644_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1645_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1646])# _LT_PROG_ECHO_BACKSLASH 1647 1648 1649# _LT_WITH_SYSROOT 1650# ---------------- 1651AC_DEFUN([_LT_WITH_SYSROOT], 1652[AC_MSG_CHECKING([for sysroot]) 1653AC_ARG_WITH([sysroot], 1654[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1655 [Search for dependent libraries within DIR (or the compiler's sysroot 1656 if not specified).])], 1657[], [with_sysroot=no]) 1658 1659dnl lt_sysroot will always be passed unquoted. We quote it here 1660dnl in case the user passed a directory name. 1661lt_sysroot= 1662case $with_sysroot in #( 1663 yes) 1664 if test yes = "$GCC"; then 1665 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1666 fi 1667 ;; #( 1668 /*) 1669 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1670 ;; #( 1671 no|'') 1672 ;; #( 1673 *) 1674 AC_MSG_RESULT([$with_sysroot]) 1675 AC_MSG_ERROR([The sysroot must be an absolute path.]) 1676 ;; 1677esac 1678 1679 AC_MSG_RESULT([${lt_sysroot:-no}]) 1680_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1681[dependent libraries, and where our libraries should be installed.])]) 1682 1683# _LT_ENABLE_LOCK 1684# --------------- 1685m4_defun([_LT_ENABLE_LOCK], 1686[AC_ARG_ENABLE([libtool-lock], 1687 [AS_HELP_STRING([--disable-libtool-lock], 1688 [avoid locking (might break parallel builds)])]) 1689test no = "$enable_libtool_lock" || enable_libtool_lock=yes 1690 1691# Some flags need to be propagated to the compiler or linker for good 1692# libtool support. 1693case $host in 1694ia64-*-hpux*) 1695 # Find out what ABI is being produced by ac_compile, and set mode 1696 # options accordingly. 1697 echo 'int i;' > conftest.$ac_ext 1698 if AC_TRY_EVAL(ac_compile); then 1699 case `/usr/bin/file conftest.$ac_objext` in 1700 *ELF-32*) 1701 HPUX_IA64_MODE=32 1702 ;; 1703 *ELF-64*) 1704 HPUX_IA64_MODE=64 1705 ;; 1706 esac 1707 fi 1708 rm -rf conftest* 1709 ;; 1710*-*-irix6*) 1711 # Find out what ABI is being produced by ac_compile, and set linker 1712 # options accordingly. 1713 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1714 if AC_TRY_EVAL(ac_compile); then 1715 if test yes = "$lt_cv_prog_gnu_ld"; then 1716 case `/usr/bin/file conftest.$ac_objext` in 1717 *32-bit*) 1718 LD="${LD-ld} -melf32bsmip" 1719 ;; 1720 *N32*) 1721 LD="${LD-ld} -melf32bmipn32" 1722 ;; 1723 *64-bit*) 1724 LD="${LD-ld} -melf64bmip" 1725 ;; 1726 esac 1727 else 1728 case `/usr/bin/file conftest.$ac_objext` in 1729 *32-bit*) 1730 LD="${LD-ld} -32" 1731 ;; 1732 *N32*) 1733 LD="${LD-ld} -n32" 1734 ;; 1735 *64-bit*) 1736 LD="${LD-ld} -64" 1737 ;; 1738 esac 1739 fi 1740 fi 1741 rm -rf conftest* 1742 ;; 1743 1744mips64*-*linux*) 1745 # Find out what ABI is being produced by ac_compile, and set linker 1746 # options accordingly. 1747 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1748 if AC_TRY_EVAL(ac_compile); then 1749 emul=elf 1750 case `/usr/bin/file conftest.$ac_objext` in 1751 *32-bit*) 1752 emul="${emul}32" 1753 ;; 1754 *64-bit*) 1755 emul="${emul}64" 1756 ;; 1757 esac 1758 case `/usr/bin/file conftest.$ac_objext` in 1759 *MSB*) 1760 emul="${emul}btsmip" 1761 ;; 1762 *LSB*) 1763 emul="${emul}ltsmip" 1764 ;; 1765 esac 1766 case `/usr/bin/file conftest.$ac_objext` in 1767 *N32*) 1768 emul="${emul}n32" 1769 ;; 1770 esac 1771 LD="${LD-ld} -m $emul" 1772 fi 1773 rm -rf conftest* 1774 ;; 1775 1776x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1777s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1778 # Find out what ABI is being produced by ac_compile, and set linker 1779 # options accordingly. Note that the listed cases only cover the 1780 # situations where additional linker options are needed (such as when 1781 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1782 # vice versa); the common cases where no linker options are needed do 1783 # not appear in the list. 1784 echo 'int i;' > conftest.$ac_ext 1785 if AC_TRY_EVAL(ac_compile); then 1786 case `/usr/bin/file conftest.o` in 1787 *32-bit*) 1788 case $host in 1789 x86_64-*kfreebsd*-gnu) 1790 LD="${LD-ld} -m elf_i386_fbsd" 1791 ;; 1792 x86_64-*linux*) 1793 case `/usr/bin/file conftest.o` in 1794 *x86-64*) 1795 LD="${LD-ld} -m elf32_x86_64" 1796 ;; 1797 *) 1798 LD="${LD-ld} -m elf_i386" 1799 ;; 1800 esac 1801 ;; 1802 powerpc64le-*linux*) 1803 LD="${LD-ld} -m elf32lppclinux" 1804 ;; 1805 powerpc64-*linux*) 1806 LD="${LD-ld} -m elf32ppclinux" 1807 ;; 1808 s390x-*linux*) 1809 LD="${LD-ld} -m elf_s390" 1810 ;; 1811 sparc64-*linux*) 1812 LD="${LD-ld} -m elf32_sparc" 1813 ;; 1814 esac 1815 ;; 1816 *64-bit*) 1817 case $host in 1818 x86_64-*kfreebsd*-gnu) 1819 LD="${LD-ld} -m elf_x86_64_fbsd" 1820 ;; 1821 x86_64-*linux*) 1822 LD="${LD-ld} -m elf_x86_64" 1823 ;; 1824 powerpcle-*linux*) 1825 LD="${LD-ld} -m elf64lppc" 1826 ;; 1827 powerpc-*linux*) 1828 LD="${LD-ld} -m elf64ppc" 1829 ;; 1830 s390*-*linux*|s390*-*tpf*) 1831 LD="${LD-ld} -m elf64_s390" 1832 ;; 1833 sparc*-*linux*) 1834 LD="${LD-ld} -m elf64_sparc" 1835 ;; 1836 esac 1837 ;; 1838 esac 1839 fi 1840 rm -rf conftest* 1841 ;; 1842 1843*-*-sco3.2v5*) 1844 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1845 SAVE_CFLAGS=$CFLAGS 1846 CFLAGS="$CFLAGS -belf" 1847 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1848 [AC_LANG_PUSH(C) 1849 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1850 AC_LANG_POP]) 1851 if test yes != "$lt_cv_cc_needs_belf"; then 1852 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1853 CFLAGS=$SAVE_CFLAGS 1854 fi 1855 ;; 1856*-*solaris*) 1857 # Find out what ABI is being produced by ac_compile, and set linker 1858 # options accordingly. 1859 echo 'int i;' > conftest.$ac_ext 1860 if AC_TRY_EVAL(ac_compile); then 1861 case `/usr/bin/file conftest.o` in 1862 *64-bit*) 1863 case $lt_cv_prog_gnu_ld in 1864 yes*) 1865 case $host in 1866 i?86-*-solaris*|x86_64-*-solaris*) 1867 LD="${LD-ld} -m elf_x86_64" 1868 ;; 1869 sparc*-*-solaris*) 1870 LD="${LD-ld} -m elf64_sparc" 1871 ;; 1872 esac 1873 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1874 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1875 LD=${LD-ld}_sol2 1876 fi 1877 ;; 1878 *) 1879 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1880 LD="${LD-ld} -64" 1881 fi 1882 ;; 1883 esac 1884 ;; 1885 esac 1886 fi 1887 rm -rf conftest* 1888 ;; 1889esac 1890 1891need_locks=$enable_libtool_lock 1892])# _LT_ENABLE_LOCK 1893 1894 1895# _LT_PROG_AR 1896# ----------- 1897m4_defun([_LT_PROG_AR], 1898[AC_CHECK_TOOLS(AR, [ar], false) 1899: ${AR=ar} 1900: ${AR_FLAGS=cru} 1901_LT_DECL([], [AR], [1], [The archiver]) 1902_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1903 1904AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1905 [lt_cv_ar_at_file=no 1906 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1907 [echo conftest.$ac_objext > conftest.lst 1908 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1909 AC_TRY_EVAL([lt_ar_try]) 1910 if test 0 -eq "$ac_status"; then 1911 # Ensure the archiver fails upon bogus file names. 1912 rm -f conftest.$ac_objext libconftest.a 1913 AC_TRY_EVAL([lt_ar_try]) 1914 if test 0 -ne "$ac_status"; then 1915 lt_cv_ar_at_file=@ 1916 fi 1917 fi 1918 rm -f conftest.* libconftest.a 1919 ]) 1920 ]) 1921 1922if test no = "$lt_cv_ar_at_file"; then 1923 archiver_list_spec= 1924else 1925 archiver_list_spec=$lt_cv_ar_at_file 1926fi 1927_LT_DECL([], [archiver_list_spec], [1], 1928 [How to feed a file listing to the archiver]) 1929])# _LT_PROG_AR 1930 1931 1932# _LT_CMD_OLD_ARCHIVE 1933# ------------------- 1934m4_defun([_LT_CMD_OLD_ARCHIVE], 1935[_LT_PROG_AR 1936 1937AC_CHECK_TOOL(STRIP, strip, :) 1938test -z "$STRIP" && STRIP=: 1939_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1940 1941AC_CHECK_TOOL(RANLIB, ranlib, :) 1942test -z "$RANLIB" && RANLIB=: 1943_LT_DECL([], [RANLIB], [1], 1944 [Commands used to install an old-style archive]) 1945 1946# Determine commands to create old-style static archives. 1947old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1948old_postinstall_cmds='chmod 644 $oldlib' 1949old_postuninstall_cmds= 1950 1951if test -n "$RANLIB"; then 1952 case $host_os in 1953 bitrig* | openbsd*) 1954 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1955 ;; 1956 *) 1957 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1958 ;; 1959 esac 1960 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1961fi 1962 1963case $host_os in 1964 darwin*) 1965 lock_old_archive_extraction=yes ;; 1966 *) 1967 lock_old_archive_extraction=no ;; 1968esac 1969_LT_DECL([], [old_postinstall_cmds], [2]) 1970_LT_DECL([], [old_postuninstall_cmds], [2]) 1971_LT_TAGDECL([], [old_archive_cmds], [2], 1972 [Commands used to build an old-style archive]) 1973_LT_DECL([], [lock_old_archive_extraction], [0], 1974 [Whether to use a lock for old archive extraction]) 1975])# _LT_CMD_OLD_ARCHIVE 1976 1977 1978# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1979# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1980# ---------------------------------------------------------------- 1981# Check whether the given compiler option works 1982AC_DEFUN([_LT_COMPILER_OPTION], 1983[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1984m4_require([_LT_DECL_SED])dnl 1985AC_CACHE_CHECK([$1], [$2], 1986 [$2=no 1987 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1988 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1989 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1990 # Insert the option either (1) after the last *FLAGS variable, or 1991 # (2) before a word containing "conftest.", or (3) at the end. 1992 # Note that $ac_compile itself does not contain backslashes and begins 1993 # with a dollar sign (not a hyphen), so the echo should work correctly. 1994 # The option is referenced via a variable to avoid confusing sed. 1995 lt_compile=`echo "$ac_compile" | $SED \ 1996 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1997 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1998 -e 's:$: $lt_compiler_flag:'` 1999 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2000 (eval "$lt_compile" 2>conftest.err) 2001 ac_status=$? 2002 cat conftest.err >&AS_MESSAGE_LOG_FD 2003 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2004 if (exit $ac_status) && test -s "$ac_outfile"; then 2005 # The compiler can only warn and ignore the option if not recognized 2006 # So say no if there are warnings other than the usual output. 2007 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2008 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2009 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2010 $2=yes 2011 fi 2012 fi 2013 $RM conftest* 2014]) 2015 2016if test yes = "[$]$2"; then 2017 m4_if([$5], , :, [$5]) 2018else 2019 m4_if([$6], , :, [$6]) 2020fi 2021])# _LT_COMPILER_OPTION 2022 2023# Old name: 2024AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2025dnl aclocal-1.4 backwards compatibility: 2026dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2027 2028 2029# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2030# [ACTION-SUCCESS], [ACTION-FAILURE]) 2031# ---------------------------------------------------- 2032# Check whether the given linker option works 2033AC_DEFUN([_LT_LINKER_OPTION], 2034[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2035m4_require([_LT_DECL_SED])dnl 2036AC_CACHE_CHECK([$1], [$2], 2037 [$2=no 2038 save_LDFLAGS=$LDFLAGS 2039 LDFLAGS="$LDFLAGS $3" 2040 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2041 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2042 # The linker can only warn and ignore the option if not recognized 2043 # So say no if there are warnings 2044 if test -s conftest.err; then 2045 # Append any errors to the config.log. 2046 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2047 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2048 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2049 if diff conftest.exp conftest.er2 >/dev/null; then 2050 $2=yes 2051 fi 2052 else 2053 $2=yes 2054 fi 2055 fi 2056 $RM -r conftest* 2057 LDFLAGS=$save_LDFLAGS 2058]) 2059 2060if test yes = "[$]$2"; then 2061 m4_if([$4], , :, [$4]) 2062else 2063 m4_if([$5], , :, [$5]) 2064fi 2065])# _LT_LINKER_OPTION 2066 2067# Old name: 2068AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2069dnl aclocal-1.4 backwards compatibility: 2070dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2071 2072 2073# LT_CMD_MAX_LEN 2074#--------------- 2075AC_DEFUN([LT_CMD_MAX_LEN], 2076[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2077# find the maximum length of command line arguments 2078AC_MSG_CHECKING([the maximum length of command line arguments]) 2079AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2080 i=0 2081 teststring=ABCD 2082 2083 case $build_os in 2084 msdosdjgpp*) 2085 # On DJGPP, this test can blow up pretty badly due to problems in libc 2086 # (any single argument exceeding 2000 bytes causes a buffer overrun 2087 # during glob expansion). Even if it were fixed, the result of this 2088 # check would be larger than it should be. 2089 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2090 ;; 2091 2092 gnu*) 2093 # Under GNU Hurd, this test is not required because there is 2094 # no limit to the length of command line arguments. 2095 # Libtool will interpret -1 as no limit whatsoever 2096 lt_cv_sys_max_cmd_len=-1; 2097 ;; 2098 2099 cygwin* | mingw* | cegcc*) 2100 # On Win9x/ME, this test blows up -- it succeeds, but takes 2101 # about 5 minutes as the teststring grows exponentially. 2102 # Worse, since 9x/ME are not pre-emptively multitasking, 2103 # you end up with a "frozen" computer, even though with patience 2104 # the test eventually succeeds (with a max line length of 256k). 2105 # Instead, let's just punt: use the minimum linelength reported by 2106 # all of the supported platforms: 8192 (on NT/2K/XP). 2107 lt_cv_sys_max_cmd_len=8192; 2108 ;; 2109 2110 mint*) 2111 # On MiNT this can take a long time and run out of memory. 2112 lt_cv_sys_max_cmd_len=8192; 2113 ;; 2114 2115 amigaos*) 2116 # On AmigaOS with pdksh, this test takes hours, literally. 2117 # So we just punt and use a minimum line length of 8192. 2118 lt_cv_sys_max_cmd_len=8192; 2119 ;; 2120 2121 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 2122 # This has been around since 386BSD, at least. Likely further. 2123 if test -x /sbin/sysctl; then 2124 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2125 elif test -x /usr/sbin/sysctl; then 2126 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2127 else 2128 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2129 fi 2130 # And add a safety zone 2131 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2132 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2133 ;; 2134 2135 interix*) 2136 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2137 lt_cv_sys_max_cmd_len=196608 2138 ;; 2139 2140 os2*) 2141 # The test takes a long time on OS/2. 2142 lt_cv_sys_max_cmd_len=8192 2143 ;; 2144 2145 osf*) 2146 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2147 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2148 # nice to cause kernel panics so lets avoid the loop below. 2149 # First set a reasonable default. 2150 lt_cv_sys_max_cmd_len=16384 2151 # 2152 if test -x /sbin/sysconfig; then 2153 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2154 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2155 esac 2156 fi 2157 ;; 2158 sco3.2v5*) 2159 lt_cv_sys_max_cmd_len=102400 2160 ;; 2161 sysv5* | sco5v6* | sysv4.2uw2*) 2162 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2163 if test -n "$kargmax"; then 2164 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2165 else 2166 lt_cv_sys_max_cmd_len=32768 2167 fi 2168 ;; 2169 *) 2170 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2171 if test -n "$lt_cv_sys_max_cmd_len" && \ 2172 test undefined != "$lt_cv_sys_max_cmd_len"; then 2173 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2174 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2175 else 2176 # Make teststring a little bigger before we do anything with it. 2177 # a 1K string should be a reasonable start. 2178 for i in 1 2 3 4 5 6 7 8; do 2179 teststring=$teststring$teststring 2180 done 2181 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2182 # If test is not a shell built-in, we'll probably end up computing a 2183 # maximum length that is only half of the actual maximum length, but 2184 # we can't tell. 2185 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 2186 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2187 test 17 != "$i" # 1/2 MB should be enough 2188 do 2189 i=`expr $i + 1` 2190 teststring=$teststring$teststring 2191 done 2192 # Only check the string length outside the loop. 2193 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2194 teststring= 2195 # Add a significant safety factor because C++ compilers can tack on 2196 # massive amounts of additional arguments before passing them to the 2197 # linker. It appears as though 1/2 is a usable value. 2198 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2199 fi 2200 ;; 2201 esac 2202]) 2203if test -n "$lt_cv_sys_max_cmd_len"; then 2204 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2205else 2206 AC_MSG_RESULT(none) 2207fi 2208max_cmd_len=$lt_cv_sys_max_cmd_len 2209_LT_DECL([], [max_cmd_len], [0], 2210 [What is the maximum length of a command?]) 2211])# LT_CMD_MAX_LEN 2212 2213# Old name: 2214AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2215dnl aclocal-1.4 backwards compatibility: 2216dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2217 2218 2219# _LT_HEADER_DLFCN 2220# ---------------- 2221m4_defun([_LT_HEADER_DLFCN], 2222[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2223])# _LT_HEADER_DLFCN 2224 2225 2226# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2227# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2228# ---------------------------------------------------------------- 2229m4_defun([_LT_TRY_DLOPEN_SELF], 2230[m4_require([_LT_HEADER_DLFCN])dnl 2231if test yes = "$cross_compiling"; then : 2232 [$4] 2233else 2234 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2235 lt_status=$lt_dlunknown 2236 cat > conftest.$ac_ext <<_LT_EOF 2237[#line $LINENO "configure" 2238#include "confdefs.h" 2239 2240#if HAVE_DLFCN_H 2241#include <dlfcn.h> 2242#endif 2243 2244#include <stdio.h> 2245 2246#ifdef RTLD_GLOBAL 2247# define LT_DLGLOBAL RTLD_GLOBAL 2248#else 2249# ifdef DL_GLOBAL 2250# define LT_DLGLOBAL DL_GLOBAL 2251# else 2252# define LT_DLGLOBAL 0 2253# endif 2254#endif 2255 2256/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2257 find out it does not work in some platform. */ 2258#ifndef LT_DLLAZY_OR_NOW 2259# ifdef RTLD_LAZY 2260# define LT_DLLAZY_OR_NOW RTLD_LAZY 2261# else 2262# ifdef DL_LAZY 2263# define LT_DLLAZY_OR_NOW DL_LAZY 2264# else 2265# ifdef RTLD_NOW 2266# define LT_DLLAZY_OR_NOW RTLD_NOW 2267# else 2268# ifdef DL_NOW 2269# define LT_DLLAZY_OR_NOW DL_NOW 2270# else 2271# define LT_DLLAZY_OR_NOW 0 2272# endif 2273# endif 2274# endif 2275# endif 2276#endif 2277 2278/* When -fvisibility=hidden is used, assume the code has been annotated 2279 correspondingly for the symbols needed. */ 2280#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2281int fnord () __attribute__((visibility("default"))); 2282#endif 2283 2284int fnord () { return 42; } 2285int main () 2286{ 2287 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2288 int status = $lt_dlunknown; 2289 2290 if (self) 2291 { 2292 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2293 else 2294 { 2295 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2296 else puts (dlerror ()); 2297 } 2298 /* dlclose (self); */ 2299 } 2300 else 2301 puts (dlerror ()); 2302 2303 return status; 2304}] 2305_LT_EOF 2306 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 2307 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2308 lt_status=$? 2309 case x$lt_status in 2310 x$lt_dlno_uscore) $1 ;; 2311 x$lt_dlneed_uscore) $2 ;; 2312 x$lt_dlunknown|x*) $3 ;; 2313 esac 2314 else : 2315 # compilation failed 2316 $3 2317 fi 2318fi 2319rm -fr conftest* 2320])# _LT_TRY_DLOPEN_SELF 2321 2322 2323# LT_SYS_DLOPEN_SELF 2324# ------------------ 2325AC_DEFUN([LT_SYS_DLOPEN_SELF], 2326[m4_require([_LT_HEADER_DLFCN])dnl 2327if test yes != "$enable_dlopen"; then 2328 enable_dlopen=unknown 2329 enable_dlopen_self=unknown 2330 enable_dlopen_self_static=unknown 2331else 2332 lt_cv_dlopen=no 2333 lt_cv_dlopen_libs= 2334 2335 case $host_os in 2336 beos*) 2337 lt_cv_dlopen=load_add_on 2338 lt_cv_dlopen_libs= 2339 lt_cv_dlopen_self=yes 2340 ;; 2341 2342 mingw* | pw32* | cegcc*) 2343 lt_cv_dlopen=LoadLibrary 2344 lt_cv_dlopen_libs= 2345 ;; 2346 2347 cygwin*) 2348 lt_cv_dlopen=dlopen 2349 lt_cv_dlopen_libs= 2350 ;; 2351 2352 darwin*) 2353 # if libdl is installed we need to link against it 2354 AC_CHECK_LIB([dl], [dlopen], 2355 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 2356 lt_cv_dlopen=dyld 2357 lt_cv_dlopen_libs= 2358 lt_cv_dlopen_self=yes 2359 ]) 2360 ;; 2361 2362 tpf*) 2363 # Don't try to run any link tests for TPF. We know it's impossible 2364 # because TPF is a cross-compiler, and we know how we open DSOs. 2365 lt_cv_dlopen=dlopen 2366 lt_cv_dlopen_libs= 2367 lt_cv_dlopen_self=no 2368 ;; 2369 2370 *) 2371 AC_CHECK_FUNC([shl_load], 2372 [lt_cv_dlopen=shl_load], 2373 [AC_CHECK_LIB([dld], [shl_load], 2374 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 2375 [AC_CHECK_FUNC([dlopen], 2376 [lt_cv_dlopen=dlopen], 2377 [AC_CHECK_LIB([dl], [dlopen], 2378 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 2379 [AC_CHECK_LIB([svld], [dlopen], 2380 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2381 [AC_CHECK_LIB([dld], [dld_link], 2382 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2383 ]) 2384 ]) 2385 ]) 2386 ]) 2387 ]) 2388 ;; 2389 esac 2390 2391 if test no = "$lt_cv_dlopen"; then 2392 enable_dlopen=no 2393 else 2394 enable_dlopen=yes 2395 fi 2396 2397 case $lt_cv_dlopen in 2398 dlopen) 2399 save_CPPFLAGS=$CPPFLAGS 2400 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2401 2402 save_LDFLAGS=$LDFLAGS 2403 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2404 2405 save_LIBS=$LIBS 2406 LIBS="$lt_cv_dlopen_libs $LIBS" 2407 2408 AC_CACHE_CHECK([whether a program can dlopen itself], 2409 lt_cv_dlopen_self, [dnl 2410 _LT_TRY_DLOPEN_SELF( 2411 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2412 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2413 ]) 2414 2415 if test yes = "$lt_cv_dlopen_self"; then 2416 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2417 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2418 lt_cv_dlopen_self_static, [dnl 2419 _LT_TRY_DLOPEN_SELF( 2420 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2421 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2422 ]) 2423 fi 2424 2425 CPPFLAGS=$save_CPPFLAGS 2426 LDFLAGS=$save_LDFLAGS 2427 LIBS=$save_LIBS 2428 ;; 2429 esac 2430 2431 case $lt_cv_dlopen_self in 2432 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2433 *) enable_dlopen_self=unknown ;; 2434 esac 2435 2436 case $lt_cv_dlopen_self_static in 2437 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2438 *) enable_dlopen_self_static=unknown ;; 2439 esac 2440fi 2441_LT_DECL([dlopen_support], [enable_dlopen], [0], 2442 [Whether dlopen is supported]) 2443_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2444 [Whether dlopen of programs is supported]) 2445_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2446 [Whether dlopen of statically linked programs is supported]) 2447])# LT_SYS_DLOPEN_SELF 2448 2449# Old name: 2450AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2451dnl aclocal-1.4 backwards compatibility: 2452dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2453 2454 2455# _LT_COMPILER_C_O([TAGNAME]) 2456# --------------------------- 2457# Check to see if options -c and -o are simultaneously supported by compiler. 2458# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2459m4_defun([_LT_COMPILER_C_O], 2460[m4_require([_LT_DECL_SED])dnl 2461m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2462m4_require([_LT_TAG_COMPILER])dnl 2463AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2464 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2465 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2466 $RM -r conftest 2>/dev/null 2467 mkdir conftest 2468 cd conftest 2469 mkdir out 2470 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2471 2472 lt_compiler_flag="-o out/conftest2.$ac_objext" 2473 # Insert the option either (1) after the last *FLAGS variable, or 2474 # (2) before a word containing "conftest.", or (3) at the end. 2475 # Note that $ac_compile itself does not contain backslashes and begins 2476 # with a dollar sign (not a hyphen), so the echo should work correctly. 2477 lt_compile=`echo "$ac_compile" | $SED \ 2478 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2479 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2480 -e 's:$: $lt_compiler_flag:'` 2481 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2482 (eval "$lt_compile" 2>out/conftest.err) 2483 ac_status=$? 2484 cat out/conftest.err >&AS_MESSAGE_LOG_FD 2485 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2486 if (exit $ac_status) && test -s out/conftest2.$ac_objext 2487 then 2488 # The compiler can only warn and ignore the option if not recognized 2489 # So say no if there are warnings 2490 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2491 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2492 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2493 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2494 fi 2495 fi 2496 chmod u+w . 2>&AS_MESSAGE_LOG_FD 2497 $RM conftest* 2498 # SGI C++ compiler will create directory out/ii_files/ for 2499 # template instantiation 2500 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2501 $RM out/* && rmdir out 2502 cd .. 2503 $RM -r conftest 2504 $RM conftest* 2505]) 2506_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2507 [Does compiler simultaneously support -c and -o options?]) 2508])# _LT_COMPILER_C_O 2509 2510 2511# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2512# ---------------------------------- 2513# Check to see if we can do hard links to lock some files if needed 2514m4_defun([_LT_COMPILER_FILE_LOCKS], 2515[m4_require([_LT_ENABLE_LOCK])dnl 2516m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2517_LT_COMPILER_C_O([$1]) 2518 2519hard_links=nottested 2520if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2521 # do not overwrite the value of need_locks provided by the user 2522 AC_MSG_CHECKING([if we can lock with hard links]) 2523 hard_links=yes 2524 $RM conftest* 2525 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2526 touch conftest.a 2527 ln conftest.a conftest.b 2>&5 || hard_links=no 2528 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2529 AC_MSG_RESULT([$hard_links]) 2530 if test no = "$hard_links"; then 2531 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2532 need_locks=warn 2533 fi 2534else 2535 need_locks=no 2536fi 2537_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2538])# _LT_COMPILER_FILE_LOCKS 2539 2540 2541# _LT_CHECK_OBJDIR 2542# ---------------- 2543m4_defun([_LT_CHECK_OBJDIR], 2544[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2545[rm -f .libs 2>/dev/null 2546mkdir .libs 2>/dev/null 2547if test -d .libs; then 2548 lt_cv_objdir=.libs 2549else 2550 # MS-DOS does not allow filenames that begin with a dot. 2551 lt_cv_objdir=_libs 2552fi 2553rmdir .libs 2>/dev/null]) 2554objdir=$lt_cv_objdir 2555_LT_DECL([], [objdir], [0], 2556 [The name of the directory that contains temporary libtool files])dnl 2557m4_pattern_allow([LT_OBJDIR])dnl 2558AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2559 [Define to the sub-directory where libtool stores uninstalled libraries.]) 2560])# _LT_CHECK_OBJDIR 2561 2562 2563# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2564# -------------------------------------- 2565# Check hardcoding attributes. 2566m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2567[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2568_LT_TAGVAR(hardcode_action, $1)= 2569if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2570 test -n "$_LT_TAGVAR(runpath_var, $1)" || 2571 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2572 2573 # We can hardcode non-existent directories. 2574 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2575 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2576 # have to relink, otherwise we might link with an installed library 2577 # when we should be linking with a yet-to-be-installed one 2578 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2579 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2580 # Linking always hardcodes the temporary library directory. 2581 _LT_TAGVAR(hardcode_action, $1)=relink 2582 else 2583 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2584 _LT_TAGVAR(hardcode_action, $1)=immediate 2585 fi 2586else 2587 # We cannot hardcode anything, or else we can only hardcode existing 2588 # directories. 2589 _LT_TAGVAR(hardcode_action, $1)=unsupported 2590fi 2591AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2592 2593if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2594 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2595 # Fast installation is not supported 2596 enable_fast_install=no 2597elif test yes = "$shlibpath_overrides_runpath" || 2598 test no = "$enable_shared"; then 2599 # Fast installation is not necessary 2600 enable_fast_install=needless 2601fi 2602_LT_TAGDECL([], [hardcode_action], [0], 2603 [How to hardcode a shared library path into an executable]) 2604])# _LT_LINKER_HARDCODE_LIBPATH 2605 2606 2607# _LT_CMD_STRIPLIB 2608# ---------------- 2609m4_defun([_LT_CMD_STRIPLIB], 2610[m4_require([_LT_DECL_EGREP]) 2611striplib= 2612old_striplib= 2613AC_MSG_CHECKING([whether stripping libraries is possible]) 2614if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2615 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2616 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2617 AC_MSG_RESULT([yes]) 2618else 2619# FIXME - insert some real tests, host_os isn't really good enough 2620 case $host_os in 2621 darwin*) 2622 if test -n "$STRIP"; then 2623 striplib="$STRIP -x" 2624 old_striplib="$STRIP -S" 2625 AC_MSG_RESULT([yes]) 2626 else 2627 AC_MSG_RESULT([no]) 2628 fi 2629 ;; 2630 *) 2631 AC_MSG_RESULT([no]) 2632 ;; 2633 esac 2634fi 2635_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2636_LT_DECL([], [striplib], [1]) 2637])# _LT_CMD_STRIPLIB 2638 2639 2640# _LT_PREPARE_MUNGE_PATH_LIST 2641# --------------------------- 2642# Make sure func_munge_path_list() is defined correctly. 2643m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2644[[# func_munge_path_list VARIABLE PATH 2645# ----------------------------------- 2646# VARIABLE is name of variable containing _space_ separated list of 2647# directories to be munged by the contents of PATH, which is string 2648# having a format: 2649# "DIR[:DIR]:" 2650# string "DIR[ DIR]" will be prepended to VARIABLE 2651# ":DIR[:DIR]" 2652# string "DIR[ DIR]" will be appended to VARIABLE 2653# "DIRP[:DIRP]::[DIRA:]DIRA" 2654# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2655# "DIRA[ DIRA]" will be appended to VARIABLE 2656# "DIR[:DIR]" 2657# VARIABLE will be replaced by "DIR[ DIR]" 2658func_munge_path_list () 2659{ 2660 case x@S|@2 in 2661 x) 2662 ;; 2663 *:) 2664 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2665 ;; 2666 x:*) 2667 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2668 ;; 2669 *::*) 2670 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2671 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2672 ;; 2673 *) 2674 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2675 ;; 2676 esac 2677} 2678]])# _LT_PREPARE_PATH_LIST 2679 2680 2681# _LT_SYS_DYNAMIC_LINKER([TAG]) 2682# ----------------------------- 2683# PORTME Fill in your ld.so characteristics 2684m4_defun([_LT_SYS_DYNAMIC_LINKER], 2685[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2686m4_require([_LT_DECL_EGREP])dnl 2687m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2688m4_require([_LT_DECL_OBJDUMP])dnl 2689m4_require([_LT_DECL_SED])dnl 2690m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2691m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2692AC_MSG_CHECKING([dynamic linker characteristics]) 2693m4_if([$1], 2694 [], [ 2695if test yes = "$GCC"; then 2696 case $host_os in 2697 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2698 *) lt_awk_arg='/^libraries:/' ;; 2699 esac 2700 case $host_os in 2701 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2702 *) lt_sed_strip_eq='s|=/|/|g' ;; 2703 esac 2704 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2705 case $lt_search_path_spec in 2706 *\;*) 2707 # if the path contains ";" then we assume it to be the separator 2708 # otherwise default to the standard path separator (i.e. ":") - it is 2709 # assumed that no part of a normal pathname contains ";" but that should 2710 # okay in the real world where ";" in dirpaths is itself problematic. 2711 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2712 ;; 2713 *) 2714 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2715 ;; 2716 esac 2717 # Ok, now we have the path, separated by spaces, we can step through it 2718 # and add multilib dir if necessary... 2719 lt_tmp_lt_search_path_spec= 2720 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2721 # ...but if some path component already ends with the multilib dir we assume 2722 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2723 case "$lt_multi_os_dir; $lt_search_path_spec " in 2724 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2725 lt_multi_os_dir= 2726 ;; 2727 esac 2728 for lt_sys_path in $lt_search_path_spec; do 2729 if test -d "$lt_sys_path$lt_multi_os_dir"; then 2730 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2731 elif test -n "$lt_multi_os_dir"; then 2732 test -d "$lt_sys_path" && \ 2733 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2734 fi 2735 done 2736 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2737BEGIN {RS = " "; FS = "/|\n";} { 2738 lt_foo = ""; 2739 lt_count = 0; 2740 for (lt_i = NF; lt_i > 0; lt_i--) { 2741 if ($lt_i != "" && $lt_i != ".") { 2742 if ($lt_i == "..") { 2743 lt_count++; 2744 } else { 2745 if (lt_count == 0) { 2746 lt_foo = "/" $lt_i lt_foo; 2747 } else { 2748 lt_count--; 2749 } 2750 } 2751 } 2752 } 2753 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2754 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2755}'` 2756 # AWK program above erroneously prepends '/' to C:/dos/paths 2757 # for these hosts. 2758 case $host_os in 2759 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2760 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2761 esac 2762 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2763else 2764 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2765fi]) 2766library_names_spec= 2767libname_spec='lib$name' 2768soname_spec= 2769shrext_cmds=.so 2770postinstall_cmds= 2771postuninstall_cmds= 2772finish_cmds= 2773finish_eval= 2774shlibpath_var= 2775shlibpath_overrides_runpath=unknown 2776version_type=none 2777dynamic_linker="$host_os ld.so" 2778sys_lib_dlsearch_path_spec="/lib /usr/lib" 2779need_lib_prefix=unknown 2780hardcode_into_libs=no 2781 2782# when you set need_version to no, make sure it does not cause -set_version 2783# flags to be left without arguments 2784need_version=unknown 2785 2786AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2787[User-defined run-time library search path.]) 2788 2789case $host_os in 2790aix3*) 2791 version_type=linux # correct to gnu/linux during the next big refactor 2792 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2793 shlibpath_var=LIBPATH 2794 2795 # AIX 3 has no versioning support, so we append a major version to the name. 2796 soname_spec='$libname$release$shared_ext$major' 2797 ;; 2798 2799aix[[4-9]]*) 2800 version_type=linux # correct to gnu/linux during the next big refactor 2801 need_lib_prefix=no 2802 need_version=no 2803 hardcode_into_libs=yes 2804 if test ia64 = "$host_cpu"; then 2805 # AIX 5 supports IA64 2806 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2807 shlibpath_var=LD_LIBRARY_PATH 2808 else 2809 # With GCC up to 2.95.x, collect2 would create an import file 2810 # for dependence libraries. The import file would start with 2811 # the line '#! .'. This would cause the generated library to 2812 # depend on '.', always an invalid library. This was fixed in 2813 # development snapshots of GCC prior to 3.0. 2814 case $host_os in 2815 aix4 | aix4.[[01]] | aix4.[[01]].*) 2816 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2817 echo ' yes ' 2818 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2819 : 2820 else 2821 can_build_shared=no 2822 fi 2823 ;; 2824 esac 2825 # Using Import Files as archive members, it is possible to support 2826 # filename-based versioning of shared library archives on AIX. While 2827 # this would work for both with and without runtime linking, it will 2828 # prevent static linking of such archives. So we do filename-based 2829 # shared library versioning with .so extension only, which is used 2830 # when both runtime linking and shared linking is enabled. 2831 # Unfortunately, runtime linking may impact performance, so we do 2832 # not want this to be the default eventually. Also, we use the 2833 # versioned .so libs for executables only if there is the -brtl 2834 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2835 # To allow for filename-based versioning support, we need to create 2836 # libNAME.so.V as an archive file, containing: 2837 # *) an Import File, referring to the versioned filename of the 2838 # archive as well as the shared archive member, telling the 2839 # bitwidth (32 or 64) of that shared object, and providing the 2840 # list of exported symbols of that shared object, eventually 2841 # decorated with the 'weak' keyword 2842 # *) the shared object with the F_LOADONLY flag set, to really avoid 2843 # it being seen by the linker. 2844 # At run time we better use the real file rather than another symlink, 2845 # but for link time we create the symlink libNAME.so -> libNAME.so.V 2846 2847 case $with_aix_soname,$aix_use_runtimelinking in 2848 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2849 # soname into executable. Probably we can add versioning support to 2850 # collect2, so additional links can be useful in future. 2851 aix,yes) # traditional libtool 2852 dynamic_linker='AIX unversionable lib.so' 2853 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2854 # instead of lib<name>.a to let people know that these are not 2855 # typical AIX shared libraries. 2856 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2857 ;; 2858 aix,no) # traditional AIX only 2859 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2860 # We preserve .a as extension for shared libraries through AIX4.2 2861 # and later when we are not doing run time linking. 2862 library_names_spec='$libname$release.a $libname.a' 2863 soname_spec='$libname$release$shared_ext$major' 2864 ;; 2865 svr4,*) # full svr4 only 2866 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2867 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2868 # We do not specify a path in Import Files, so LIBPATH fires. 2869 shlibpath_overrides_runpath=yes 2870 ;; 2871 *,yes) # both, prefer svr4 2872 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2873 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2874 # unpreferred sharedlib libNAME.a needs extra handling 2875 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2876 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2877 # We do not specify a path in Import Files, so LIBPATH fires. 2878 shlibpath_overrides_runpath=yes 2879 ;; 2880 *,no) # both, prefer aix 2881 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2882 library_names_spec='$libname$release.a $libname.a' 2883 soname_spec='$libname$release$shared_ext$major' 2884 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2885 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2886 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2887 ;; 2888 esac 2889 shlibpath_var=LIBPATH 2890 fi 2891 ;; 2892 2893amigaos*) 2894 case $host_cpu in 2895 powerpc) 2896 # Since July 2007 AmigaOS4 officially supports .so libraries. 2897 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2898 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2899 ;; 2900 m68k) 2901 library_names_spec='$libname.ixlibrary $libname.a' 2902 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2903 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2904 ;; 2905 esac 2906 ;; 2907 2908beos*) 2909 library_names_spec='$libname$shared_ext' 2910 dynamic_linker="$host_os ld.so" 2911 shlibpath_var=LIBRARY_PATH 2912 ;; 2913 2914bsdi[[45]]*) 2915 version_type=linux # correct to gnu/linux during the next big refactor 2916 need_version=no 2917 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2918 soname_spec='$libname$release$shared_ext$major' 2919 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2920 shlibpath_var=LD_LIBRARY_PATH 2921 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2922 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2923 # the default ld.so.conf also contains /usr/contrib/lib and 2924 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2925 # libtool to hard-code these into programs 2926 ;; 2927 2928cygwin* | mingw* | pw32* | cegcc*) 2929 version_type=windows 2930 shrext_cmds=.dll 2931 need_version=no 2932 need_lib_prefix=no 2933 2934 case $GCC,$cc_basename in 2935 yes,*) 2936 # gcc 2937 library_names_spec='$libname.dll.a' 2938 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2939 postinstall_cmds='base_file=`basename \$file`~ 2940 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2941 dldir=$destdir/`dirname \$dlpath`~ 2942 test -d \$dldir || mkdir -p \$dldir~ 2943 $install_prog $dir/$dlname \$dldir/$dlname~ 2944 chmod a+x \$dldir/$dlname~ 2945 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2946 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2947 fi' 2948 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2949 dlpath=$dir/\$dldll~ 2950 $RM \$dlpath' 2951 shlibpath_overrides_runpath=yes 2952 2953 case $host_os in 2954 cygwin*) 2955 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2956 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2957m4_if([$1], [],[ 2958 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2959 ;; 2960 mingw* | cegcc*) 2961 # MinGW DLLs use traditional 'lib' prefix 2962 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2963 ;; 2964 pw32*) 2965 # pw32 DLLs use 'pw' prefix rather than 'lib' 2966 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2967 ;; 2968 esac 2969 dynamic_linker='Win32 ld.exe' 2970 ;; 2971 2972 *,cl*) 2973 # Native MSVC 2974 libname_spec='$name' 2975 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2976 library_names_spec='$libname.dll.lib' 2977 2978 case $build_os in 2979 mingw*) 2980 sys_lib_search_path_spec= 2981 lt_save_ifs=$IFS 2982 IFS=';' 2983 for lt_path in $LIB 2984 do 2985 IFS=$lt_save_ifs 2986 # Let DOS variable expansion print the short 8.3 style file name. 2987 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2988 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2989 done 2990 IFS=$lt_save_ifs 2991 # Convert to MSYS style. 2992 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2993 ;; 2994 cygwin*) 2995 # Convert to unix form, then to dos form, then back to unix form 2996 # but this time dos style (no spaces!) so that the unix form looks 2997 # like /cygdrive/c/PROGRA~1:/cygdr... 2998 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2999 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3000 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3001 ;; 3002 *) 3003 sys_lib_search_path_spec=$LIB 3004 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3005 # It is most probably a Windows format PATH. 3006 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3007 else 3008 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3009 fi 3010 # FIXME: find the short name or the path components, as spaces are 3011 # common. (e.g. "Program Files" -> "PROGRA~1") 3012 ;; 3013 esac 3014 3015 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3016 postinstall_cmds='base_file=`basename \$file`~ 3017 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 3018 dldir=$destdir/`dirname \$dlpath`~ 3019 test -d \$dldir || mkdir -p \$dldir~ 3020 $install_prog $dir/$dlname \$dldir/$dlname' 3021 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3022 dlpath=$dir/\$dldll~ 3023 $RM \$dlpath' 3024 shlibpath_overrides_runpath=yes 3025 dynamic_linker='Win32 link.exe' 3026 ;; 3027 3028 *) 3029 # Assume MSVC wrapper 3030 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 3031 dynamic_linker='Win32 ld.exe' 3032 ;; 3033 esac 3034 # FIXME: first we should search . and the directory the executable is in 3035 shlibpath_var=PATH 3036 ;; 3037 3038darwin* | rhapsody*) 3039 dynamic_linker="$host_os dyld" 3040 version_type=darwin 3041 need_lib_prefix=no 3042 need_version=no 3043 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 3044 soname_spec='$libname$release$major$shared_ext' 3045 shlibpath_overrides_runpath=yes 3046 shlibpath_var=DYLD_LIBRARY_PATH 3047 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3048m4_if([$1], [],[ 3049 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3050 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3051 ;; 3052 3053dgux*) 3054 version_type=linux # correct to gnu/linux during the next big refactor 3055 need_lib_prefix=no 3056 need_version=no 3057 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3058 soname_spec='$libname$release$shared_ext$major' 3059 shlibpath_var=LD_LIBRARY_PATH 3060 ;; 3061 3062freebsd* | dragonfly*) 3063 # DragonFly does not have aout. When/if they implement a new 3064 # versioning mechanism, adjust this. 3065 if test -x /usr/bin/objformat; then 3066 objformat=`/usr/bin/objformat` 3067 else 3068 case $host_os in 3069 freebsd[[23]].*) objformat=aout ;; 3070 *) objformat=elf ;; 3071 esac 3072 fi 3073 version_type=freebsd-$objformat 3074 case $version_type in 3075 freebsd-elf*) 3076 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3077 soname_spec='$libname$release$shared_ext$major' 3078 need_version=no 3079 need_lib_prefix=no 3080 ;; 3081 freebsd-*) 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3083 need_version=yes 3084 ;; 3085 esac 3086 shlibpath_var=LD_LIBRARY_PATH 3087 case $host_os in 3088 freebsd2.*) 3089 shlibpath_overrides_runpath=yes 3090 ;; 3091 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3092 shlibpath_overrides_runpath=yes 3093 hardcode_into_libs=yes 3094 ;; 3095 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3096 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3097 shlibpath_overrides_runpath=no 3098 hardcode_into_libs=yes 3099 ;; 3100 *) # from 4.6 on, and DragonFly 3101 shlibpath_overrides_runpath=yes 3102 hardcode_into_libs=yes 3103 ;; 3104 esac 3105 ;; 3106 3107haiku*) 3108 version_type=linux # correct to gnu/linux during the next big refactor 3109 need_lib_prefix=no 3110 need_version=no 3111 dynamic_linker="$host_os runtime_loader" 3112 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3113 soname_spec='$libname$release$shared_ext$major' 3114 shlibpath_var=LIBRARY_PATH 3115 shlibpath_overrides_runpath=no 3116 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3117 hardcode_into_libs=yes 3118 ;; 3119 3120hpux9* | hpux10* | hpux11*) 3121 # Give a soname corresponding to the major version so that dld.sl refuses to 3122 # link against other versions. 3123 version_type=sunos 3124 need_lib_prefix=no 3125 need_version=no 3126 case $host_cpu in 3127 ia64*) 3128 shrext_cmds='.so' 3129 hardcode_into_libs=yes 3130 dynamic_linker="$host_os dld.so" 3131 shlibpath_var=LD_LIBRARY_PATH 3132 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3133 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3134 soname_spec='$libname$release$shared_ext$major' 3135 if test 32 = "$HPUX_IA64_MODE"; then 3136 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3137 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 3138 else 3139 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3140 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 3141 fi 3142 ;; 3143 hppa*64*) 3144 shrext_cmds='.sl' 3145 hardcode_into_libs=yes 3146 dynamic_linker="$host_os dld.sl" 3147 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3148 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3149 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3150 soname_spec='$libname$release$shared_ext$major' 3151 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3152 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3153 ;; 3154 *) 3155 shrext_cmds='.sl' 3156 dynamic_linker="$host_os dld.sl" 3157 shlibpath_var=SHLIB_PATH 3158 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3159 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3160 soname_spec='$libname$release$shared_ext$major' 3161 ;; 3162 esac 3163 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3164 postinstall_cmds='chmod 555 $lib' 3165 # or fails outright, so override atomically: 3166 install_override_mode=555 3167 ;; 3168 3169interix[[3-9]]*) 3170 version_type=linux # correct to gnu/linux during the next big refactor 3171 need_lib_prefix=no 3172 need_version=no 3173 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3174 soname_spec='$libname$release$shared_ext$major' 3175 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3176 shlibpath_var=LD_LIBRARY_PATH 3177 shlibpath_overrides_runpath=no 3178 hardcode_into_libs=yes 3179 ;; 3180 3181irix5* | irix6* | nonstopux*) 3182 case $host_os in 3183 nonstopux*) version_type=nonstopux ;; 3184 *) 3185 if test yes = "$lt_cv_prog_gnu_ld"; then 3186 version_type=linux # correct to gnu/linux during the next big refactor 3187 else 3188 version_type=irix 3189 fi ;; 3190 esac 3191 need_lib_prefix=no 3192 need_version=no 3193 soname_spec='$libname$release$shared_ext$major' 3194 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 3195 case $host_os in 3196 irix5* | nonstopux*) 3197 libsuff= shlibsuff= 3198 ;; 3199 *) 3200 case $LD in # libtool.m4 will add one of these switches to LD 3201 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3202 libsuff= shlibsuff= libmagic=32-bit;; 3203 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3204 libsuff=32 shlibsuff=N32 libmagic=N32;; 3205 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3206 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3207 *) libsuff= shlibsuff= libmagic=never-match;; 3208 esac 3209 ;; 3210 esac 3211 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3212 shlibpath_overrides_runpath=no 3213 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 3214 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 3215 hardcode_into_libs=yes 3216 ;; 3217 3218# No shared lib support for Linux oldld, aout, or coff. 3219linux*oldld* | linux*aout* | linux*coff*) 3220 dynamic_linker=no 3221 ;; 3222 3223linux*android*) 3224 version_type=none # Android doesn't support versioned libraries. 3225 need_lib_prefix=no 3226 need_version=no 3227 library_names_spec='$libname$release$shared_ext' 3228 soname_spec='$libname$release$shared_ext' 3229 finish_cmds= 3230 shlibpath_var=LD_LIBRARY_PATH 3231 shlibpath_overrides_runpath=yes 3232 3233 # This implies no fast_install, which is unacceptable. 3234 # Some rework will be needed to allow for fast_install 3235 # before this can be enabled. 3236 hardcode_into_libs=yes 3237 3238 dynamic_linker='Android linker' 3239 # Don't embed -rpath directories since the linker doesn't support them. 3240 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3241 ;; 3242 3243# This must be glibc/ELF. 3244linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3245 version_type=linux # correct to gnu/linux during the next big refactor 3246 need_lib_prefix=no 3247 need_version=no 3248 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3249 soname_spec='$libname$release$shared_ext$major' 3250 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3251 shlibpath_var=LD_LIBRARY_PATH 3252 shlibpath_overrides_runpath=no 3253 3254 # Some binutils ld are patched to set DT_RUNPATH 3255 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3256 [lt_cv_shlibpath_overrides_runpath=no 3257 save_LDFLAGS=$LDFLAGS 3258 save_libdir=$libdir 3259 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3260 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3261 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3262 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3263 [lt_cv_shlibpath_overrides_runpath=yes])]) 3264 LDFLAGS=$save_LDFLAGS 3265 libdir=$save_libdir 3266 ]) 3267 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3268 3269 # This implies no fast_install, which is unacceptable. 3270 # Some rework will be needed to allow for fast_install 3271 # before this can be enabled. 3272 hardcode_into_libs=yes 3273 3274 # Ideally, we could use ldconfig to report *all* directores which are 3275 # searched for libraries, however this is still not possible. Aside from not 3276 # being certain /sbin/ldconfig is available, command 3277 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 3278 # even though it is searched at run-time. Try to do the best guess by 3279 # appending ld.so.conf contents (and includes) to the search path. 3280 if test -f /etc/ld.so.conf; then 3281 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' ' '` 3282 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3283 fi 3284 3285 # We used to test for /lib/ld.so.1 and disable shared libraries on 3286 # powerpc, because MkLinux only supported shared libraries with the 3287 # GNU dynamic linker. Since this was broken with cross compilers, 3288 # most powerpc-linux boxes support dynamic linking these days and 3289 # people can always --disable-shared, the test was removed, and we 3290 # assume the GNU/Linux dynamic linker is in use. 3291 dynamic_linker='GNU/Linux ld.so' 3292 ;; 3293 3294netbsd*) 3295 version_type=sunos 3296 need_lib_prefix=no 3297 need_version=no 3298 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3299 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3300 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3301 dynamic_linker='NetBSD (a.out) ld.so' 3302 else 3303 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3304 soname_spec='$libname$release$shared_ext$major' 3305 dynamic_linker='NetBSD ld.elf_so' 3306 fi 3307 shlibpath_var=LD_LIBRARY_PATH 3308 shlibpath_overrides_runpath=yes 3309 hardcode_into_libs=yes 3310 ;; 3311 3312newsos6) 3313 version_type=linux # correct to gnu/linux during the next big refactor 3314 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3315 shlibpath_var=LD_LIBRARY_PATH 3316 shlibpath_overrides_runpath=yes 3317 ;; 3318 3319*nto* | *qnx*) 3320 version_type=qnx 3321 need_lib_prefix=no 3322 need_version=no 3323 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3324 soname_spec='$libname$release$shared_ext$major' 3325 shlibpath_var=LD_LIBRARY_PATH 3326 shlibpath_overrides_runpath=no 3327 hardcode_into_libs=yes 3328 dynamic_linker='ldqnx.so' 3329 ;; 3330 3331openbsd* | bitrig*) 3332 version_type=sunos 3333 sys_lib_dlsearch_path_spec=/usr/lib 3334 need_lib_prefix=no 3335 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3336 need_version=no 3337 else 3338 need_version=yes 3339 fi 3340 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3341 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3342 shlibpath_var=LD_LIBRARY_PATH 3343 shlibpath_overrides_runpath=yes 3344 ;; 3345 3346os2*) 3347 libname_spec='$name' 3348 version_type=windows 3349 shrext_cmds=.dll 3350 need_version=no 3351 need_lib_prefix=no 3352 # OS/2 can only load a DLL with a base name of 8 characters or less. 3353 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 3354 v=$($ECHO $release$versuffix | tr -d .-); 3355 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 3356 $ECHO $n$v`$shared_ext' 3357 library_names_spec='${libname}_dll.$libext' 3358 dynamic_linker='OS/2 ld.exe' 3359 shlibpath_var=BEGINLIBPATH 3360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3361 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3362 postinstall_cmds='base_file=`basename \$file`~ 3363 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 3364 dldir=$destdir/`dirname \$dlpath`~ 3365 test -d \$dldir || mkdir -p \$dldir~ 3366 $install_prog $dir/$dlname \$dldir/$dlname~ 3367 chmod a+x \$dldir/$dlname~ 3368 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3369 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3370 fi' 3371 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3372 dlpath=$dir/\$dldll~ 3373 $RM \$dlpath' 3374 ;; 3375 3376osf3* | osf4* | osf5*) 3377 version_type=osf 3378 need_lib_prefix=no 3379 need_version=no 3380 soname_spec='$libname$release$shared_ext$major' 3381 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3382 shlibpath_var=LD_LIBRARY_PATH 3383 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3384 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3385 ;; 3386 3387rdos*) 3388 dynamic_linker=no 3389 ;; 3390 3391solaris*) 3392 version_type=linux # correct to gnu/linux during the next big refactor 3393 need_lib_prefix=no 3394 need_version=no 3395 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3396 soname_spec='$libname$release$shared_ext$major' 3397 shlibpath_var=LD_LIBRARY_PATH 3398 shlibpath_overrides_runpath=yes 3399 hardcode_into_libs=yes 3400 # ldd complains unless libraries are executable 3401 postinstall_cmds='chmod +x $lib' 3402 ;; 3403 3404sunos4*) 3405 version_type=sunos 3406 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3407 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3408 shlibpath_var=LD_LIBRARY_PATH 3409 shlibpath_overrides_runpath=yes 3410 if test yes = "$with_gnu_ld"; then 3411 need_lib_prefix=no 3412 fi 3413 need_version=yes 3414 ;; 3415 3416sysv4 | sysv4.3*) 3417 version_type=linux # correct to gnu/linux during the next big refactor 3418 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3419 soname_spec='$libname$release$shared_ext$major' 3420 shlibpath_var=LD_LIBRARY_PATH 3421 case $host_vendor in 3422 sni) 3423 shlibpath_overrides_runpath=no 3424 need_lib_prefix=no 3425 runpath_var=LD_RUN_PATH 3426 ;; 3427 siemens) 3428 need_lib_prefix=no 3429 ;; 3430 motorola) 3431 need_lib_prefix=no 3432 need_version=no 3433 shlibpath_overrides_runpath=no 3434 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3435 ;; 3436 esac 3437 ;; 3438 3439sysv4*MP*) 3440 if test -d /usr/nec; then 3441 version_type=linux # correct to gnu/linux during the next big refactor 3442 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3443 soname_spec='$libname$shared_ext.$major' 3444 shlibpath_var=LD_LIBRARY_PATH 3445 fi 3446 ;; 3447 3448sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3449 version_type=sco 3450 need_lib_prefix=no 3451 need_version=no 3452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3453 soname_spec='$libname$release$shared_ext$major' 3454 shlibpath_var=LD_LIBRARY_PATH 3455 shlibpath_overrides_runpath=yes 3456 hardcode_into_libs=yes 3457 if test yes = "$with_gnu_ld"; then 3458 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3459 else 3460 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3461 case $host_os in 3462 sco3.2v5*) 3463 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3464 ;; 3465 esac 3466 fi 3467 sys_lib_dlsearch_path_spec='/usr/lib' 3468 ;; 3469 3470tpf*) 3471 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3472 version_type=linux # correct to gnu/linux during the next big refactor 3473 need_lib_prefix=no 3474 need_version=no 3475 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3476 shlibpath_var=LD_LIBRARY_PATH 3477 shlibpath_overrides_runpath=no 3478 hardcode_into_libs=yes 3479 ;; 3480 3481uts4*) 3482 version_type=linux # correct to gnu/linux during the next big refactor 3483 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3484 soname_spec='$libname$release$shared_ext$major' 3485 shlibpath_var=LD_LIBRARY_PATH 3486 ;; 3487 3488*) 3489 dynamic_linker=no 3490 ;; 3491esac 3492AC_MSG_RESULT([$dynamic_linker]) 3493test no = "$dynamic_linker" && can_build_shared=no 3494 3495variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3496if test yes = "$GCC"; then 3497 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3498fi 3499 3500if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3501 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3502fi 3503 3504if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3505 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3506fi 3507 3508# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3509configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3510 3511# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3512func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3513 3514# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3515configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3516 3517_LT_DECL([], [variables_saved_for_relink], [1], 3518 [Variables whose values should be saved in libtool wrapper scripts and 3519 restored at link time]) 3520_LT_DECL([], [need_lib_prefix], [0], 3521 [Do we need the "lib" prefix for modules?]) 3522_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3523_LT_DECL([], [version_type], [0], [Library versioning type]) 3524_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3525_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3526_LT_DECL([], [shlibpath_overrides_runpath], [0], 3527 [Is shlibpath searched before the hard-coded library search path?]) 3528_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3529_LT_DECL([], [library_names_spec], [1], 3530 [[List of archive names. First name is the real one, the rest are links. 3531 The last name is the one that the linker finds with -lNAME]]) 3532_LT_DECL([], [soname_spec], [1], 3533 [[The coded name of the library, if different from the real name]]) 3534_LT_DECL([], [install_override_mode], [1], 3535 [Permission mode override for installation of shared libraries]) 3536_LT_DECL([], [postinstall_cmds], [2], 3537 [Command to use after installation of a shared archive]) 3538_LT_DECL([], [postuninstall_cmds], [2], 3539 [Command to use after uninstallation of a shared archive]) 3540_LT_DECL([], [finish_cmds], [2], 3541 [Commands used to finish a libtool library installation in a directory]) 3542_LT_DECL([], [finish_eval], [1], 3543 [[As "finish_cmds", except a single script fragment to be evaled but 3544 not shown]]) 3545_LT_DECL([], [hardcode_into_libs], [0], 3546 [Whether we should hardcode library paths into libraries]) 3547_LT_DECL([], [sys_lib_search_path_spec], [2], 3548 [Compile-time system search path for libraries]) 3549_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3550 [Detected run-time system search path for libraries]) 3551_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3552 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3553])# _LT_SYS_DYNAMIC_LINKER 3554 3555 3556# _LT_PATH_TOOL_PREFIX(TOOL) 3557# -------------------------- 3558# find a file program that can recognize shared library 3559AC_DEFUN([_LT_PATH_TOOL_PREFIX], 3560[m4_require([_LT_DECL_EGREP])dnl 3561AC_MSG_CHECKING([for $1]) 3562AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3563[case $MAGIC_CMD in 3564[[\\/*] | ?:[\\/]*]) 3565 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3566 ;; 3567*) 3568 lt_save_MAGIC_CMD=$MAGIC_CMD 3569 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3570dnl $ac_dummy forces splitting on constant user-supplied paths. 3571dnl POSIX.2 word splitting is done only on the output of word expansions, 3572dnl not every word. This closes a longstanding sh security hole. 3573 ac_dummy="m4_if([$2], , $PATH, [$2])" 3574 for ac_dir in $ac_dummy; do 3575 IFS=$lt_save_ifs 3576 test -z "$ac_dir" && ac_dir=. 3577 if test -f "$ac_dir/$1"; then 3578 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3579 if test -n "$file_magic_test_file"; then 3580 case $deplibs_check_method in 3581 "file_magic "*) 3582 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3583 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3584 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3585 $EGREP "$file_magic_regex" > /dev/null; then 3586 : 3587 else 3588 cat <<_LT_EOF 1>&2 3589 3590*** Warning: the command libtool uses to detect shared libraries, 3591*** $file_magic_cmd, produces output that libtool cannot recognize. 3592*** The result is that libtool may fail to recognize shared libraries 3593*** as such. This will affect the creation of libtool libraries that 3594*** depend on shared libraries, but programs linked with such libtool 3595*** libraries will work regardless of this problem. Nevertheless, you 3596*** may want to report the problem to your system manager and/or to 3597*** bug-libtool@gnu.org 3598 3599_LT_EOF 3600 fi ;; 3601 esac 3602 fi 3603 break 3604 fi 3605 done 3606 IFS=$lt_save_ifs 3607 MAGIC_CMD=$lt_save_MAGIC_CMD 3608 ;; 3609esac]) 3610MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3611if test -n "$MAGIC_CMD"; then 3612 AC_MSG_RESULT($MAGIC_CMD) 3613else 3614 AC_MSG_RESULT(no) 3615fi 3616_LT_DECL([], [MAGIC_CMD], [0], 3617 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3618])# _LT_PATH_TOOL_PREFIX 3619 3620# Old name: 3621AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3622dnl aclocal-1.4 backwards compatibility: 3623dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3624 3625 3626# _LT_PATH_MAGIC 3627# -------------- 3628# find a file program that can recognize a shared library 3629m4_defun([_LT_PATH_MAGIC], 3630[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3631if test -z "$lt_cv_path_MAGIC_CMD"; then 3632 if test -n "$ac_tool_prefix"; then 3633 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3634 else 3635 MAGIC_CMD=: 3636 fi 3637fi 3638])# _LT_PATH_MAGIC 3639 3640 3641# LT_PATH_LD 3642# ---------- 3643# find the pathname to the GNU or non-GNU linker 3644AC_DEFUN([LT_PATH_LD], 3645[AC_REQUIRE([AC_PROG_CC])dnl 3646AC_REQUIRE([AC_CANONICAL_HOST])dnl 3647AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3648m4_require([_LT_DECL_SED])dnl 3649m4_require([_LT_DECL_EGREP])dnl 3650m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3651 3652AC_ARG_WITH([gnu-ld], 3653 [AS_HELP_STRING([--with-gnu-ld], 3654 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3655 [test no = "$withval" || with_gnu_ld=yes], 3656 [with_gnu_ld=no])dnl 3657 3658ac_prog=ld 3659if test yes = "$GCC"; then 3660 # Check if gcc -print-prog-name=ld gives a path. 3661 AC_MSG_CHECKING([for ld used by $CC]) 3662 case $host in 3663 *-*-mingw*) 3664 # gcc leaves a trailing carriage return, which upsets mingw 3665 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3666 *) 3667 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3668 esac 3669 case $ac_prog in 3670 # Accept absolute paths. 3671 [[\\/]]* | ?:[[\\/]]*) 3672 re_direlt='/[[^/]][[^/]]*/\.\./' 3673 # Canonicalize the pathname of ld 3674 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3675 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3676 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3677 done 3678 test -z "$LD" && LD=$ac_prog 3679 ;; 3680 "") 3681 # If it fails, then pretend we aren't using GCC. 3682 ac_prog=ld 3683 ;; 3684 *) 3685 # If it is relative, then search for the first ld in PATH. 3686 with_gnu_ld=unknown 3687 ;; 3688 esac 3689elif test yes = "$with_gnu_ld"; then 3690 AC_MSG_CHECKING([for GNU ld]) 3691else 3692 AC_MSG_CHECKING([for non-GNU ld]) 3693fi 3694AC_CACHE_VAL(lt_cv_path_LD, 3695[if test -z "$LD"; then 3696 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3697 for ac_dir in $PATH; do 3698 IFS=$lt_save_ifs 3699 test -z "$ac_dir" && ac_dir=. 3700 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3701 lt_cv_path_LD=$ac_dir/$ac_prog 3702 # Check to see if the program is GNU ld. I'd rather use --version, 3703 # but apparently some variants of GNU ld only accept -v. 3704 # Break only if it was the GNU/non-GNU ld that we prefer. 3705 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3706 *GNU* | *'with BFD'*) 3707 test no != "$with_gnu_ld" && break 3708 ;; 3709 *) 3710 test yes != "$with_gnu_ld" && break 3711 ;; 3712 esac 3713 fi 3714 done 3715 IFS=$lt_save_ifs 3716else 3717 lt_cv_path_LD=$LD # Let the user override the test with a path. 3718fi]) 3719LD=$lt_cv_path_LD 3720if test -n "$LD"; then 3721 AC_MSG_RESULT($LD) 3722else 3723 AC_MSG_RESULT(no) 3724fi 3725test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3726_LT_PATH_LD_GNU 3727AC_SUBST([LD]) 3728 3729_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3730])# LT_PATH_LD 3731 3732# Old names: 3733AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3734AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3735dnl aclocal-1.4 backwards compatibility: 3736dnl AC_DEFUN([AM_PROG_LD], []) 3737dnl AC_DEFUN([AC_PROG_LD], []) 3738 3739 3740# _LT_PATH_LD_GNU 3741#- -------------- 3742m4_defun([_LT_PATH_LD_GNU], 3743[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3744[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3745case `$LD -v 2>&1 </dev/null` in 3746*GNU* | *'with BFD'*) 3747 lt_cv_prog_gnu_ld=yes 3748 ;; 3749*) 3750 lt_cv_prog_gnu_ld=no 3751 ;; 3752esac]) 3753with_gnu_ld=$lt_cv_prog_gnu_ld 3754])# _LT_PATH_LD_GNU 3755 3756 3757# _LT_CMD_RELOAD 3758# -------------- 3759# find reload flag for linker 3760# -- PORTME Some linkers may need a different reload flag. 3761m4_defun([_LT_CMD_RELOAD], 3762[AC_CACHE_CHECK([for $LD option to reload object files], 3763 lt_cv_ld_reload_flag, 3764 [lt_cv_ld_reload_flag='-r']) 3765reload_flag=$lt_cv_ld_reload_flag 3766case $reload_flag in 3767"" | " "*) ;; 3768*) reload_flag=" $reload_flag" ;; 3769esac 3770reload_cmds='$LD$reload_flag -o $output$reload_objs' 3771case $host_os in 3772 cygwin* | mingw* | pw32* | cegcc*) 3773 if test yes != "$GCC"; then 3774 reload_cmds=false 3775 fi 3776 ;; 3777 darwin*) 3778 if test yes = "$GCC"; then 3779 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3780 else 3781 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3782 fi 3783 ;; 3784esac 3785_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3786_LT_TAGDECL([], [reload_cmds], [2])dnl 3787])# _LT_CMD_RELOAD 3788 3789 3790# _LT_PATH_DD 3791# ----------- 3792# find a working dd 3793m4_defun([_LT_PATH_DD], 3794[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3795[printf 0123456789abcdef0123456789abcdef >conftest.i 3796cat conftest.i conftest.i >conftest2.i 3797: ${lt_DD:=$DD} 3798AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3799[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3800 cmp -s conftest.i conftest.out \ 3801 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3802fi]) 3803rm -f conftest.i conftest2.i conftest.out]) 3804])# _LT_PATH_DD 3805 3806 3807# _LT_CMD_TRUNCATE 3808# ---------------- 3809# find command to truncate a binary pipe 3810m4_defun([_LT_CMD_TRUNCATE], 3811[m4_require([_LT_PATH_DD]) 3812AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3813[printf 0123456789abcdef0123456789abcdef >conftest.i 3814cat conftest.i conftest.i >conftest2.i 3815lt_cv_truncate_bin= 3816if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3817 cmp -s conftest.i conftest.out \ 3818 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3819fi 3820rm -f conftest.i conftest2.i conftest.out 3821test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3822_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3823 [Command to truncate a binary pipe]) 3824])# _LT_CMD_TRUNCATE 3825 3826 3827# _LT_CHECK_MAGIC_METHOD 3828# ---------------------- 3829# how to check for library dependencies 3830# -- PORTME fill in with the dynamic library characteristics 3831m4_defun([_LT_CHECK_MAGIC_METHOD], 3832[m4_require([_LT_DECL_EGREP]) 3833m4_require([_LT_DECL_OBJDUMP]) 3834AC_CACHE_CHECK([how to recognize dependent libraries], 3835lt_cv_deplibs_check_method, 3836[lt_cv_file_magic_cmd='$MAGIC_CMD' 3837lt_cv_file_magic_test_file= 3838lt_cv_deplibs_check_method='unknown' 3839# Need to set the preceding variable on all platforms that support 3840# interlibrary dependencies. 3841# 'none' -- dependencies not supported. 3842# 'unknown' -- same as none, but documents that we really don't know. 3843# 'pass_all' -- all dependencies passed with no checks. 3844# 'test_compile' -- check by making test program. 3845# 'file_magic [[regex]]' -- check by looking for files in library path 3846# that responds to the $file_magic_cmd with a given extended regex. 3847# If you have 'file' or equivalent on your system and you're not sure 3848# whether 'pass_all' will *always* work, you probably want this one. 3849 3850case $host_os in 3851aix[[4-9]]*) 3852 lt_cv_deplibs_check_method=pass_all 3853 ;; 3854 3855beos*) 3856 lt_cv_deplibs_check_method=pass_all 3857 ;; 3858 3859bsdi[[45]]*) 3860 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3861 lt_cv_file_magic_cmd='/usr/bin/file -L' 3862 lt_cv_file_magic_test_file=/shlib/libc.so 3863 ;; 3864 3865cygwin*) 3866 # func_win32_libid is a shell function defined in ltmain.sh 3867 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3868 lt_cv_file_magic_cmd='func_win32_libid' 3869 ;; 3870 3871mingw* | pw32*) 3872 # Base MSYS/MinGW do not provide the 'file' command needed by 3873 # func_win32_libid shell function, so use a weaker test based on 'objdump', 3874 # unless we find 'file', for example because we are cross-compiling. 3875 if ( file / ) >/dev/null 2>&1; then 3876 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3877 lt_cv_file_magic_cmd='func_win32_libid' 3878 else 3879 # Keep this pattern in sync with the one in func_win32_libid. 3880 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3881 lt_cv_file_magic_cmd='$OBJDUMP -f' 3882 fi 3883 ;; 3884 3885cegcc*) 3886 # use the weaker test based on 'objdump'. See mingw*. 3887 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3888 lt_cv_file_magic_cmd='$OBJDUMP -f' 3889 ;; 3890 3891darwin* | rhapsody*) 3892 lt_cv_deplibs_check_method=pass_all 3893 ;; 3894 3895freebsd* | dragonfly*) 3896 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3897 case $host_cpu in 3898 i*86 ) 3899 # Not sure whether the presence of OpenBSD here was a mistake. 3900 # Let's accept both of them until this is cleared up. 3901 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3902 lt_cv_file_magic_cmd=/usr/bin/file 3903 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3904 ;; 3905 esac 3906 else 3907 lt_cv_deplibs_check_method=pass_all 3908 fi 3909 ;; 3910 3911haiku*) 3912 lt_cv_deplibs_check_method=pass_all 3913 ;; 3914 3915hpux10.20* | hpux11*) 3916 lt_cv_file_magic_cmd=/usr/bin/file 3917 case $host_cpu in 3918 ia64*) 3919 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3920 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3921 ;; 3922 hppa*64*) 3923 [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]'] 3924 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3925 ;; 3926 *) 3927 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3928 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3929 ;; 3930 esac 3931 ;; 3932 3933interix[[3-9]]*) 3934 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3935 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3936 ;; 3937 3938irix5* | irix6* | nonstopux*) 3939 case $LD in 3940 *-32|*"-32 ") libmagic=32-bit;; 3941 *-n32|*"-n32 ") libmagic=N32;; 3942 *-64|*"-64 ") libmagic=64-bit;; 3943 *) libmagic=never-match;; 3944 esac 3945 lt_cv_deplibs_check_method=pass_all 3946 ;; 3947 3948# This must be glibc/ELF. 3949linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3950 lt_cv_deplibs_check_method=pass_all 3951 ;; 3952 3953netbsd*) 3954 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3955 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3956 else 3957 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3958 fi 3959 ;; 3960 3961newos6*) 3962 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3963 lt_cv_file_magic_cmd=/usr/bin/file 3964 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3965 ;; 3966 3967*nto* | *qnx*) 3968 lt_cv_deplibs_check_method=pass_all 3969 ;; 3970 3971openbsd* | bitrig*) 3972 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3973 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3974 else 3975 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3976 fi 3977 ;; 3978 3979osf3* | osf4* | osf5*) 3980 lt_cv_deplibs_check_method=pass_all 3981 ;; 3982 3983rdos*) 3984 lt_cv_deplibs_check_method=pass_all 3985 ;; 3986 3987solaris*) 3988 lt_cv_deplibs_check_method=pass_all 3989 ;; 3990 3991sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3992 lt_cv_deplibs_check_method=pass_all 3993 ;; 3994 3995sysv4 | sysv4.3*) 3996 case $host_vendor in 3997 motorola) 3998 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]]' 3999 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4000 ;; 4001 ncr) 4002 lt_cv_deplibs_check_method=pass_all 4003 ;; 4004 sequent) 4005 lt_cv_file_magic_cmd='/bin/file' 4006 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4007 ;; 4008 sni) 4009 lt_cv_file_magic_cmd='/bin/file' 4010 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4011 lt_cv_file_magic_test_file=/lib/libc.so 4012 ;; 4013 siemens) 4014 lt_cv_deplibs_check_method=pass_all 4015 ;; 4016 pc) 4017 lt_cv_deplibs_check_method=pass_all 4018 ;; 4019 esac 4020 ;; 4021 4022tpf*) 4023 lt_cv_deplibs_check_method=pass_all 4024 ;; 4025os2*) 4026 lt_cv_deplibs_check_method=pass_all 4027 ;; 4028esac 4029]) 4030 4031file_magic_glob= 4032want_nocaseglob=no 4033if test "$build" = "$host"; then 4034 case $host_os in 4035 mingw* | pw32*) 4036 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4037 want_nocaseglob=yes 4038 else 4039 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4040 fi 4041 ;; 4042 esac 4043fi 4044 4045file_magic_cmd=$lt_cv_file_magic_cmd 4046deplibs_check_method=$lt_cv_deplibs_check_method 4047test -z "$deplibs_check_method" && deplibs_check_method=unknown 4048 4049_LT_DECL([], [deplibs_check_method], [1], 4050 [Method to check whether dependent libraries are shared objects]) 4051_LT_DECL([], [file_magic_cmd], [1], 4052 [Command to use when deplibs_check_method = "file_magic"]) 4053_LT_DECL([], [file_magic_glob], [1], 4054 [How to find potential files when deplibs_check_method = "file_magic"]) 4055_LT_DECL([], [want_nocaseglob], [1], 4056 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4057])# _LT_CHECK_MAGIC_METHOD 4058 4059 4060# LT_PATH_NM 4061# ---------- 4062# find the pathname to a BSD- or MS-compatible name lister 4063AC_DEFUN([LT_PATH_NM], 4064[AC_REQUIRE([AC_PROG_CC])dnl 4065AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4066[if test -n "$NM"; then 4067 # Let the user override the test. 4068 lt_cv_path_NM=$NM 4069else 4070 lt_nm_to_check=${ac_tool_prefix}nm 4071 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4072 lt_nm_to_check="$lt_nm_to_check nm" 4073 fi 4074 for lt_tmp_nm in $lt_nm_to_check; do 4075 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 4076 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4077 IFS=$lt_save_ifs 4078 test -z "$ac_dir" && ac_dir=. 4079 tmp_nm=$ac_dir/$lt_tmp_nm 4080 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 4081 # Check to see if the nm accepts a BSD-compat flag. 4082 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 4083 # nm: unknown option "B" ignored 4084 # Tru64's nm complains that /dev/null is an invalid object file 4085 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 4086 case $build_os in 4087 mingw*) lt_bad_file=conftest.nm/nofile ;; 4088 *) lt_bad_file=/dev/null ;; 4089 esac 4090 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 4091 *$lt_bad_file* | *'Invalid file or object type'*) 4092 lt_cv_path_NM="$tmp_nm -B" 4093 break 2 4094 ;; 4095 *) 4096 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4097 */dev/null*) 4098 lt_cv_path_NM="$tmp_nm -p" 4099 break 2 4100 ;; 4101 *) 4102 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4103 continue # so that we can try to find one that supports BSD flags 4104 ;; 4105 esac 4106 ;; 4107 esac 4108 fi 4109 done 4110 IFS=$lt_save_ifs 4111 done 4112 : ${lt_cv_path_NM=no} 4113fi]) 4114if test no != "$lt_cv_path_NM"; then 4115 NM=$lt_cv_path_NM 4116else 4117 # Didn't find any BSD compatible name lister, look for dumpbin. 4118 if test -n "$DUMPBIN"; then : 4119 # Let the user override the test. 4120 else 4121 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4122 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 4123 *COFF*) 4124 DUMPBIN="$DUMPBIN -symbols -headers" 4125 ;; 4126 *) 4127 DUMPBIN=: 4128 ;; 4129 esac 4130 fi 4131 AC_SUBST([DUMPBIN]) 4132 if test : != "$DUMPBIN"; then 4133 NM=$DUMPBIN 4134 fi 4135fi 4136test -z "$NM" && NM=nm 4137AC_SUBST([NM]) 4138_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4139 4140AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4141 [lt_cv_nm_interface="BSD nm" 4142 echo "int some_variable = 0;" > conftest.$ac_ext 4143 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4144 (eval "$ac_compile" 2>conftest.err) 4145 cat conftest.err >&AS_MESSAGE_LOG_FD 4146 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4147 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4148 cat conftest.err >&AS_MESSAGE_LOG_FD 4149 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4150 cat conftest.out >&AS_MESSAGE_LOG_FD 4151 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4152 lt_cv_nm_interface="MS dumpbin" 4153 fi 4154 rm -f conftest*]) 4155])# LT_PATH_NM 4156 4157# Old names: 4158AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4159AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4160dnl aclocal-1.4 backwards compatibility: 4161dnl AC_DEFUN([AM_PROG_NM], []) 4162dnl AC_DEFUN([AC_PROG_NM], []) 4163 4164# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4165# -------------------------------- 4166# how to determine the name of the shared library 4167# associated with a specific link library. 4168# -- PORTME fill in with the dynamic library characteristics 4169m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4170[m4_require([_LT_DECL_EGREP]) 4171m4_require([_LT_DECL_OBJDUMP]) 4172m4_require([_LT_DECL_DLLTOOL]) 4173AC_CACHE_CHECK([how to associate runtime and link libraries], 4174lt_cv_sharedlib_from_linklib_cmd, 4175[lt_cv_sharedlib_from_linklib_cmd='unknown' 4176 4177case $host_os in 4178cygwin* | mingw* | pw32* | cegcc*) 4179 # two different shell functions defined in ltmain.sh; 4180 # decide which one to use based on capabilities of $DLLTOOL 4181 case `$DLLTOOL --help 2>&1` in 4182 *--identify-strict*) 4183 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4184 ;; 4185 *) 4186 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4187 ;; 4188 esac 4189 ;; 4190*) 4191 # fallback: assume linklib IS sharedlib 4192 lt_cv_sharedlib_from_linklib_cmd=$ECHO 4193 ;; 4194esac 4195]) 4196sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4197test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4198 4199_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4200 [Command to associate shared and link libraries]) 4201])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4202 4203 4204# _LT_PATH_MANIFEST_TOOL 4205# ---------------------- 4206# locate the manifest tool 4207m4_defun([_LT_PATH_MANIFEST_TOOL], 4208[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4209test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4210AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4211 [lt_cv_path_mainfest_tool=no 4212 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4213 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4214 cat conftest.err >&AS_MESSAGE_LOG_FD 4215 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4216 lt_cv_path_mainfest_tool=yes 4217 fi 4218 rm -f conftest*]) 4219if test yes != "$lt_cv_path_mainfest_tool"; then 4220 MANIFEST_TOOL=: 4221fi 4222_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4223])# _LT_PATH_MANIFEST_TOOL 4224 4225 4226# _LT_DLL_DEF_P([FILE]) 4227# --------------------- 4228# True iff FILE is a Windows DLL '.def' file. 4229# Keep in sync with func_dll_def_p in the libtool script 4230AC_DEFUN([_LT_DLL_DEF_P], 4231[dnl 4232 test DEF = "`$SED -n dnl 4233 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 4234 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 4235 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 4236 -e q dnl Only consider the first "real" line 4237 $1`" dnl 4238])# _LT_DLL_DEF_P 4239 4240 4241# LT_LIB_M 4242# -------- 4243# check for math library 4244AC_DEFUN([LT_LIB_M], 4245[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4246LIBM= 4247case $host in 4248*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4249 # These system don't have libm, or don't need it 4250 ;; 4251*-ncr-sysv4.3*) 4252 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 4253 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4254 ;; 4255*) 4256 AC_CHECK_LIB(m, cos, LIBM=-lm) 4257 ;; 4258esac 4259AC_SUBST([LIBM]) 4260])# LT_LIB_M 4261 4262# Old name: 4263AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4264dnl aclocal-1.4 backwards compatibility: 4265dnl AC_DEFUN([AC_CHECK_LIBM], []) 4266 4267 4268# _LT_COMPILER_NO_RTTI([TAGNAME]) 4269# ------------------------------- 4270m4_defun([_LT_COMPILER_NO_RTTI], 4271[m4_require([_LT_TAG_COMPILER])dnl 4272 4273_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4274 4275if test yes = "$GCC"; then 4276 case $cc_basename in 4277 nvcc*) 4278 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4279 *) 4280 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4281 esac 4282 4283 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4284 lt_cv_prog_compiler_rtti_exceptions, 4285 [-fno-rtti -fno-exceptions], [], 4286 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4287fi 4288_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4289 [Compiler flag to turn off builtin functions]) 4290])# _LT_COMPILER_NO_RTTI 4291 4292 4293# _LT_CMD_GLOBAL_SYMBOLS 4294# ---------------------- 4295m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4296[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4297AC_REQUIRE([AC_PROG_CC])dnl 4298AC_REQUIRE([AC_PROG_AWK])dnl 4299AC_REQUIRE([LT_PATH_NM])dnl 4300AC_REQUIRE([LT_PATH_LD])dnl 4301m4_require([_LT_DECL_SED])dnl 4302m4_require([_LT_DECL_EGREP])dnl 4303m4_require([_LT_TAG_COMPILER])dnl 4304 4305# Check for command to grab the raw symbol name followed by C symbol from nm. 4306AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4307AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4308[ 4309# These are sane defaults that work on at least a few old systems. 4310# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4311 4312# Character class describing NM global symbol codes. 4313symcode='[[BCDEGRST]]' 4314 4315# Regexp to match symbols that can be accessed directly from C. 4316sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4317 4318# Define system-specific variables. 4319case $host_os in 4320aix*) 4321 symcode='[[BCDT]]' 4322 ;; 4323cygwin* | mingw* | pw32* | cegcc*) 4324 symcode='[[ABCDGISTW]]' 4325 ;; 4326hpux*) 4327 if test ia64 = "$host_cpu"; then 4328 symcode='[[ABCDEGRST]]' 4329 fi 4330 ;; 4331irix* | nonstopux*) 4332 symcode='[[BCDEGRST]]' 4333 ;; 4334osf*) 4335 symcode='[[BCDEGQRST]]' 4336 ;; 4337solaris*) 4338 symcode='[[BDRT]]' 4339 ;; 4340sco3.2v5*) 4341 symcode='[[DT]]' 4342 ;; 4343sysv4.2uw2*) 4344 symcode='[[DT]]' 4345 ;; 4346sysv5* | sco5v6* | unixware* | OpenUNIX*) 4347 symcode='[[ABDT]]' 4348 ;; 4349sysv4) 4350 symcode='[[DFNSTU]]' 4351 ;; 4352esac 4353 4354# If we're using GNU nm, then use its standard symbol codes. 4355case `$NM -V 2>&1` in 4356*GNU* | *'with BFD'*) 4357 symcode='[[ABCDGIRSTW]]' ;; 4358esac 4359 4360if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4361 # Gets list of data symbols to import. 4362 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 4363 # Adjust the below global symbol transforms to fixup imported variables. 4364 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 4365 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 4366 lt_c_name_lib_hook="\ 4367 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4368 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4369else 4370 # Disable hooks by default. 4371 lt_cv_sys_global_symbol_to_import= 4372 lt_cdecl_hook= 4373 lt_c_name_hook= 4374 lt_c_name_lib_hook= 4375fi 4376 4377# Transform an extracted symbol line into a proper C declaration. 4378# Some systems (esp. on ia64) link data and code symbols differently, 4379# so use this general approach. 4380lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4381$lt_cdecl_hook\ 4382" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4383" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4384 4385# Transform an extracted symbol line into symbol name and symbol address 4386lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4387$lt_c_name_hook\ 4388" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4389" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4390 4391# Transform an extracted symbol line into symbol name with lib prefix and 4392# symbol address. 4393lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4394$lt_c_name_lib_hook\ 4395" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4396" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4397" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4398 4399# Handle CRLF in mingw tool chain 4400opt_cr= 4401case $build_os in 4402mingw*) 4403 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4404 ;; 4405esac 4406 4407# Try without a prefix underscore, then with it. 4408for ac_symprfx in "" "_"; do 4409 4410 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4411 symxfrm="\\1 $ac_symprfx\\2 \\2" 4412 4413 # Write the raw and C identifiers. 4414 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4415 # Fake it for dumpbin and say T for any non-static function, 4416 # D for any global variable and I for any imported variable. 4417 # Also find C++ and __fastcall symbols from MSVC++, 4418 # which start with @ or ?. 4419 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4420" {last_section=section; section=\$ 3};"\ 4421" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4422" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4423" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4424" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4425" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4426" \$ 0!~/External *\|/{next};"\ 4427" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4428" {if(hide[section]) next};"\ 4429" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4430" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4431" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4432" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4433" ' prfx=^$ac_symprfx]" 4434 else 4435 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4436 fi 4437 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4438 4439 # Check to see that the pipe works correctly. 4440 pipe_works=no 4441 4442 rm -f conftest* 4443 cat > conftest.$ac_ext <<_LT_EOF 4444#ifdef __cplusplus 4445extern "C" { 4446#endif 4447char nm_test_var; 4448void nm_test_func(void); 4449void nm_test_func(void){} 4450#ifdef __cplusplus 4451} 4452#endif 4453int main(){nm_test_var='a';nm_test_func();return(0);} 4454_LT_EOF 4455 4456 if AC_TRY_EVAL(ac_compile); then 4457 # Now try to grab the symbols. 4458 nlist=conftest.nm 4459 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4460 # Try sorting and uniquifying the output. 4461 if sort "$nlist" | uniq > "$nlist"T; then 4462 mv -f "$nlist"T "$nlist" 4463 else 4464 rm -f "$nlist"T 4465 fi 4466 4467 # Make sure that we snagged all the symbols we need. 4468 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4469 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4470 cat <<_LT_EOF > conftest.$ac_ext 4471/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4472#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4473/* DATA imports from DLLs on WIN32 can't be const, because runtime 4474 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4475# define LT@&t@_DLSYM_CONST 4476#elif defined __osf__ 4477/* This system does not cope well with relocations in const data. */ 4478# define LT@&t@_DLSYM_CONST 4479#else 4480# define LT@&t@_DLSYM_CONST const 4481#endif 4482 4483#ifdef __cplusplus 4484extern "C" { 4485#endif 4486 4487_LT_EOF 4488 # Now generate the symbol file. 4489 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4490 4491 cat <<_LT_EOF >> conftest.$ac_ext 4492 4493/* The mapping between symbol names and symbols. */ 4494LT@&t@_DLSYM_CONST struct { 4495 const char *name; 4496 void *address; 4497} 4498lt__PROGRAM__LTX_preloaded_symbols[[]] = 4499{ 4500 { "@PROGRAM@", (void *) 0 }, 4501_LT_EOF 4502 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4503 cat <<\_LT_EOF >> conftest.$ac_ext 4504 {0, (void *) 0} 4505}; 4506 4507/* This works around a problem in FreeBSD linker */ 4508#ifdef FREEBSD_WORKAROUND 4509static const void *lt_preloaded_setup() { 4510 return lt__PROGRAM__LTX_preloaded_symbols; 4511} 4512#endif 4513 4514#ifdef __cplusplus 4515} 4516#endif 4517_LT_EOF 4518 # Now try linking the two files. 4519 mv conftest.$ac_objext conftstm.$ac_objext 4520 lt_globsym_save_LIBS=$LIBS 4521 lt_globsym_save_CFLAGS=$CFLAGS 4522 LIBS=conftstm.$ac_objext 4523 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4524 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4525 pipe_works=yes 4526 fi 4527 LIBS=$lt_globsym_save_LIBS 4528 CFLAGS=$lt_globsym_save_CFLAGS 4529 else 4530 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4531 fi 4532 else 4533 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4534 fi 4535 else 4536 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4537 fi 4538 else 4539 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4540 cat conftest.$ac_ext >&5 4541 fi 4542 rm -rf conftest* conftst* 4543 4544 # Do not use the global_symbol_pipe unless it works. 4545 if test yes = "$pipe_works"; then 4546 break 4547 else 4548 lt_cv_sys_global_symbol_pipe= 4549 fi 4550done 4551]) 4552if test -z "$lt_cv_sys_global_symbol_pipe"; then 4553 lt_cv_sys_global_symbol_to_cdecl= 4554fi 4555if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4556 AC_MSG_RESULT(failed) 4557else 4558 AC_MSG_RESULT(ok) 4559fi 4560 4561# Response file support. 4562if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4563 nm_file_list_spec='@' 4564elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4565 nm_file_list_spec='@' 4566fi 4567 4568_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4569 [Take the output of nm and produce a listing of raw symbols and C names]) 4570_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4571 [Transform the output of nm in a proper C declaration]) 4572_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4573 [Transform the output of nm into a list of symbols to manually relocate]) 4574_LT_DECL([global_symbol_to_c_name_address], 4575 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4576 [Transform the output of nm in a C name address pair]) 4577_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4578 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4579 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4580_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4581 [The name lister interface]) 4582_LT_DECL([], [nm_file_list_spec], [1], 4583 [Specify filename containing input files for $NM]) 4584]) # _LT_CMD_GLOBAL_SYMBOLS 4585 4586 4587# _LT_COMPILER_PIC([TAGNAME]) 4588# --------------------------- 4589m4_defun([_LT_COMPILER_PIC], 4590[m4_require([_LT_TAG_COMPILER])dnl 4591_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4592_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4593_LT_TAGVAR(lt_prog_compiler_static, $1)= 4594 4595m4_if([$1], [CXX], [ 4596 # C++ specific cases for pic, static, wl, etc. 4597 if test yes = "$GXX"; then 4598 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4599 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4600 4601 case $host_os in 4602 aix*) 4603 # All AIX code is PIC. 4604 if test ia64 = "$host_cpu"; then 4605 # AIX 5 now supports IA64 processor 4606 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4607 fi 4608 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4609 ;; 4610 4611 amigaos*) 4612 case $host_cpu in 4613 powerpc) 4614 # see comment about AmigaOS4 .so support 4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4616 ;; 4617 m68k) 4618 # FIXME: we need at least 68020 code to build shared libraries, but 4619 # adding the '-m68020' flag to GCC prevents building anything better, 4620 # like '-m68040'. 4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4622 ;; 4623 esac 4624 ;; 4625 4626 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4627 # PIC is the default for these OSes. 4628 ;; 4629 mingw* | cygwin* | os2* | pw32* | cegcc*) 4630 # This hack is so that the source file can tell whether it is being 4631 # built for inclusion in a dll (and should export symbols for example). 4632 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4633 # (--disable-auto-import) libraries 4634 m4_if([$1], [GCJ], [], 4635 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4636 case $host_os in 4637 os2*) 4638 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4639 ;; 4640 esac 4641 ;; 4642 darwin* | rhapsody*) 4643 # PIC is the default on this platform 4644 # Common symbols not allowed in MH_DYLIB files 4645 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4646 ;; 4647 *djgpp*) 4648 # DJGPP does not support shared libraries at all 4649 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4650 ;; 4651 haiku*) 4652 # PIC is the default for Haiku. 4653 # The "-static" flag exists, but is broken. 4654 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4655 ;; 4656 interix[[3-9]]*) 4657 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4658 # Instead, we relocate shared libraries at runtime. 4659 ;; 4660 sysv4*MP*) 4661 if test -d /usr/nec; then 4662 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4663 fi 4664 ;; 4665 hpux*) 4666 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4667 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4668 # sets the default TLS model and affects inlining. 4669 case $host_cpu in 4670 hppa*64*) 4671 ;; 4672 *) 4673 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4674 ;; 4675 esac 4676 ;; 4677 *qnx* | *nto*) 4678 # QNX uses GNU C++, but need to define -shared option too, otherwise 4679 # it will coredump. 4680 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4681 ;; 4682 *) 4683 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4684 ;; 4685 esac 4686 else 4687 case $host_os in 4688 aix[[4-9]]*) 4689 # All AIX code is PIC. 4690 if test ia64 = "$host_cpu"; then 4691 # AIX 5 now supports IA64 processor 4692 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4693 else 4694 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4695 fi 4696 ;; 4697 chorus*) 4698 case $cc_basename in 4699 cxch68*) 4700 # Green Hills C++ Compiler 4701 # _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" 4702 ;; 4703 esac 4704 ;; 4705 mingw* | cygwin* | os2* | pw32* | cegcc*) 4706 # This hack is so that the source file can tell whether it is being 4707 # built for inclusion in a dll (and should export symbols for example). 4708 m4_if([$1], [GCJ], [], 4709 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4710 ;; 4711 dgux*) 4712 case $cc_basename in 4713 ec++*) 4714 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4715 ;; 4716 ghcx*) 4717 # Green Hills C++ Compiler 4718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4719 ;; 4720 *) 4721 ;; 4722 esac 4723 ;; 4724 freebsd* | dragonfly*) 4725 # FreeBSD uses GNU C++ 4726 ;; 4727 hpux9* | hpux10* | hpux11*) 4728 case $cc_basename in 4729 CC*) 4730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4732 if test ia64 != "$host_cpu"; then 4733 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4734 fi 4735 ;; 4736 aCC*) 4737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4738 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4739 case $host_cpu in 4740 hppa*64*|ia64*) 4741 # +Z the default 4742 ;; 4743 *) 4744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4745 ;; 4746 esac 4747 ;; 4748 *) 4749 ;; 4750 esac 4751 ;; 4752 interix*) 4753 # This is c89, which is MS Visual C++ (no shared libs) 4754 # Anyone wants to do a port? 4755 ;; 4756 irix5* | irix6* | nonstopux*) 4757 case $cc_basename in 4758 CC*) 4759 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4761 # CC pic flag -KPIC is the default. 4762 ;; 4763 *) 4764 ;; 4765 esac 4766 ;; 4767 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4768 case $cc_basename in 4769 KCC*) 4770 # KAI C++ Compiler 4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4772 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4773 ;; 4774 ecpc* ) 4775 # old Intel C++ for x86_64, which still supported -KPIC. 4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4779 ;; 4780 icpc* ) 4781 # Intel C++, used to be incompatible with GCC. 4782 # ICC 10 doesn't accept -KPIC any more. 4783 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4786 ;; 4787 pgCC* | pgcpp*) 4788 # Portland Group C++ compiler 4789 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4791 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4792 ;; 4793 cxx*) 4794 # Compaq C++ 4795 # Make sure the PIC flag is empty. It appears that all Alpha 4796 # Linux and Compaq Tru64 Unix objects are PIC. 4797 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4798 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4799 ;; 4800 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4801 # IBM XL 8.0, 9.0 on PPC and BlueGene 4802 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4803 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4804 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4805 ;; 4806 *) 4807 case `$CC -V 2>&1 | sed 5q` in 4808 *Sun\ C*) 4809 # Sun C++ 5.9 4810 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4811 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4812 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4813 ;; 4814 esac 4815 ;; 4816 esac 4817 ;; 4818 lynxos*) 4819 ;; 4820 m88k*) 4821 ;; 4822 mvs*) 4823 case $cc_basename in 4824 cxx*) 4825 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4826 ;; 4827 *) 4828 ;; 4829 esac 4830 ;; 4831 netbsd*) 4832 ;; 4833 *qnx* | *nto*) 4834 # QNX uses GNU C++, but need to define -shared option too, otherwise 4835 # it will coredump. 4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4837 ;; 4838 osf3* | osf4* | osf5*) 4839 case $cc_basename in 4840 KCC*) 4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4842 ;; 4843 RCC*) 4844 # Rational C++ 2.4.1 4845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4846 ;; 4847 cxx*) 4848 # Digital/Compaq C++ 4849 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4850 # Make sure the PIC flag is empty. It appears that all Alpha 4851 # Linux and Compaq Tru64 Unix objects are PIC. 4852 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4854 ;; 4855 *) 4856 ;; 4857 esac 4858 ;; 4859 psos*) 4860 ;; 4861 solaris*) 4862 case $cc_basename in 4863 CC* | sunCC*) 4864 # Sun C++ 4.2, 5.x and Centerline C++ 4865 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4866 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4867 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4868 ;; 4869 gcx*) 4870 # Green Hills C++ Compiler 4871 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4872 ;; 4873 *) 4874 ;; 4875 esac 4876 ;; 4877 sunos4*) 4878 case $cc_basename in 4879 CC*) 4880 # Sun C++ 4.x 4881 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4882 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4883 ;; 4884 lcc*) 4885 # Lucid 4886 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4887 ;; 4888 *) 4889 ;; 4890 esac 4891 ;; 4892 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4893 case $cc_basename in 4894 CC*) 4895 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4896 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4897 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4898 ;; 4899 esac 4900 ;; 4901 tandem*) 4902 case $cc_basename in 4903 NCC*) 4904 # NonStop-UX NCC 3.20 4905 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4906 ;; 4907 *) 4908 ;; 4909 esac 4910 ;; 4911 vxworks*) 4912 ;; 4913 *) 4914 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4915 ;; 4916 esac 4917 fi 4918], 4919[ 4920 if test yes = "$GCC"; then 4921 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4922 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4923 4924 case $host_os in 4925 aix*) 4926 # All AIX code is PIC. 4927 if test ia64 = "$host_cpu"; then 4928 # AIX 5 now supports IA64 processor 4929 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4930 fi 4931 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4932 ;; 4933 4934 amigaos*) 4935 case $host_cpu in 4936 powerpc) 4937 # see comment about AmigaOS4 .so support 4938 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4939 ;; 4940 m68k) 4941 # FIXME: we need at least 68020 code to build shared libraries, but 4942 # adding the '-m68020' flag to GCC prevents building anything better, 4943 # like '-m68040'. 4944 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4945 ;; 4946 esac 4947 ;; 4948 4949 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4950 # PIC is the default for these OSes. 4951 ;; 4952 4953 mingw* | cygwin* | pw32* | os2* | cegcc*) 4954 # This hack is so that the source file can tell whether it is being 4955 # built for inclusion in a dll (and should export symbols for example). 4956 # Although the cygwin gcc ignores -fPIC, still need this for old-style 4957 # (--disable-auto-import) libraries 4958 m4_if([$1], [GCJ], [], 4959 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4960 case $host_os in 4961 os2*) 4962 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4963 ;; 4964 esac 4965 ;; 4966 4967 darwin* | rhapsody*) 4968 # PIC is the default on this platform 4969 # Common symbols not allowed in MH_DYLIB files 4970 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4971 ;; 4972 4973 haiku*) 4974 # PIC is the default for Haiku. 4975 # The "-static" flag exists, but is broken. 4976 _LT_TAGVAR(lt_prog_compiler_static, $1)= 4977 ;; 4978 4979 hpux*) 4980 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4981 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4982 # sets the default TLS model and affects inlining. 4983 case $host_cpu in 4984 hppa*64*) 4985 # +Z the default 4986 ;; 4987 *) 4988 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4989 ;; 4990 esac 4991 ;; 4992 4993 interix[[3-9]]*) 4994 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4995 # Instead, we relocate shared libraries at runtime. 4996 ;; 4997 4998 msdosdjgpp*) 4999 # Just because we use GCC doesn't mean we suddenly get shared libraries 5000 # on systems that don't support them. 5001 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5002 enable_shared=no 5003 ;; 5004 5005 *nto* | *qnx*) 5006 # QNX uses GNU C++, but need to define -shared option too, otherwise 5007 # it will coredump. 5008 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5009 ;; 5010 5011 sysv4*MP*) 5012 if test -d /usr/nec; then 5013 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5014 fi 5015 ;; 5016 5017 *) 5018 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5019 ;; 5020 esac 5021 5022 case $cc_basename in 5023 nvcc*) # Cuda Compiler Driver 2.2 5024 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5025 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5026 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5027 fi 5028 ;; 5029 esac 5030 else 5031 # PORTME Check for flag to pass linker flags through the system compiler. 5032 case $host_os in 5033 aix*) 5034 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5035 if test ia64 = "$host_cpu"; then 5036 # AIX 5 now supports IA64 processor 5037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5038 else 5039 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5040 fi 5041 ;; 5042 5043 darwin* | rhapsody*) 5044 # PIC is the default on this platform 5045 # Common symbols not allowed in MH_DYLIB files 5046 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5047 case $cc_basename in 5048 nagfor*) 5049 # NAG Fortran compiler 5050 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5052 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5053 ;; 5054 esac 5055 ;; 5056 5057 mingw* | cygwin* | pw32* | os2* | cegcc*) 5058 # This hack is so that the source file can tell whether it is being 5059 # built for inclusion in a dll (and should export symbols for example). 5060 m4_if([$1], [GCJ], [], 5061 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5062 case $host_os in 5063 os2*) 5064 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 5065 ;; 5066 esac 5067 ;; 5068 5069 hpux9* | hpux10* | hpux11*) 5070 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5071 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5072 # not for PA HP-UX. 5073 case $host_cpu in 5074 hppa*64*|ia64*) 5075 # +Z the default 5076 ;; 5077 *) 5078 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5079 ;; 5080 esac 5081 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5082 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 5083 ;; 5084 5085 irix5* | irix6* | nonstopux*) 5086 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5087 # PIC (with -KPIC) is the default. 5088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5089 ;; 5090 5091 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 5092 case $cc_basename in 5093 # old Intel for x86_64, which still supported -KPIC. 5094 ecc*) 5095 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5096 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5097 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5098 ;; 5099 # icc used to be incompatible with GCC. 5100 # ICC 10 doesn't accept -KPIC any more. 5101 icc* | ifort*) 5102 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5103 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5104 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5105 ;; 5106 # Lahey Fortran 8.1. 5107 lf95*) 5108 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5110 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5111 ;; 5112 nagfor*) 5113 # NAG Fortran compiler 5114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5115 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5116 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5117 ;; 5118 tcc*) 5119 # Fabrice Bellard et al's Tiny C Compiler 5120 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5122 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5123 ;; 5124 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5125 # Portland Group compilers (*not* the Pentium gcc compiler, 5126 # which looks to be a dead project) 5127 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5128 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5129 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5130 ;; 5131 ccc*) 5132 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5133 # All Alpha code is PIC. 5134 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5135 ;; 5136 xl* | bgxl* | bgf* | mpixl*) 5137 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5138 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5139 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5140 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5141 ;; 5142 *) 5143 case `$CC -V 2>&1 | sed 5q` in 5144 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5145 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5146 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5147 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5148 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5149 ;; 5150 *Sun\ F* | *Sun*Fortran*) 5151 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5152 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5153 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5154 ;; 5155 *Sun\ C*) 5156 # Sun C 5.9 5157 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5158 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5159 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5160 ;; 5161 *Intel*\ [[CF]]*Compiler*) 5162 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5163 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5165 ;; 5166 *Portland\ Group*) 5167 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5169 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5170 ;; 5171 esac 5172 ;; 5173 esac 5174 ;; 5175 5176 newsos6) 5177 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5178 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5179 ;; 5180 5181 *nto* | *qnx*) 5182 # QNX uses GNU C++, but need to define -shared option too, otherwise 5183 # it will coredump. 5184 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5185 ;; 5186 5187 osf3* | osf4* | osf5*) 5188 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5189 # All OSF/1 code is PIC. 5190 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5191 ;; 5192 5193 rdos*) 5194 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5195 ;; 5196 5197 solaris*) 5198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5200 case $cc_basename in 5201 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5202 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5203 *) 5204 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5205 esac 5206 ;; 5207 5208 sunos4*) 5209 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5210 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5211 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5212 ;; 5213 5214 sysv4 | sysv4.2uw2* | sysv4.3*) 5215 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5216 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5217 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5218 ;; 5219 5220 sysv4*MP*) 5221 if test -d /usr/nec; then 5222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5223 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5224 fi 5225 ;; 5226 5227 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5228 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5229 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5230 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5231 ;; 5232 5233 unicos*) 5234 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5235 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5236 ;; 5237 5238 uts4*) 5239 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5240 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5241 ;; 5242 5243 *) 5244 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5245 ;; 5246 esac 5247 fi 5248]) 5249case $host_os in 5250 # For platforms that do not support PIC, -DPIC is meaningless: 5251 *djgpp*) 5252 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5253 ;; 5254 *) 5255 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5256 ;; 5257esac 5258 5259AC_CACHE_CHECK([for $compiler option to produce PIC], 5260 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5261 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5262_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5263 5264# 5265# Check to make sure the PIC flag actually works. 5266# 5267if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5268 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5269 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5270 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5271 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5272 "" | " "*) ;; 5273 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5274 esac], 5275 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5276 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5277fi 5278_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5279 [Additional compiler flags for building library objects]) 5280 5281_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5282 [How to pass a linker flag through the compiler]) 5283# 5284# Check to make sure the static flag actually works. 5285# 5286wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5287_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5288 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5289 $lt_tmp_static_flag, 5290 [], 5291 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5292_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5293 [Compiler flag to prevent dynamic linking]) 5294])# _LT_COMPILER_PIC 5295 5296 5297# _LT_LINKER_SHLIBS([TAGNAME]) 5298# ---------------------------- 5299# See if the linker supports building shared libraries. 5300m4_defun([_LT_LINKER_SHLIBS], 5301[AC_REQUIRE([LT_PATH_LD])dnl 5302AC_REQUIRE([LT_PATH_NM])dnl 5303m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5304m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5305m4_require([_LT_DECL_EGREP])dnl 5306m4_require([_LT_DECL_SED])dnl 5307m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5308m4_require([_LT_TAG_COMPILER])dnl 5309AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5310m4_if([$1], [CXX], [ 5311 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5312 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5313 case $host_os in 5314 aix[[4-9]]*) 5315 # If we're using GNU nm, then we don't want the "-C" option. 5316 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5317 # Without the "-l" option, or with the "-B" option, AIX nm treats 5318 # weak defined symbols like other global defined symbols, whereas 5319 # GNU nm marks them as "W". 5320 # While the 'weak' keyword is ignored in the Export File, we need 5321 # it in the Import File for the 'aix-soname' feature, so we have 5322 # to replace the "-B" option with "-P" for AIX nm. 5323 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5324 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5325 else 5326 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5327 fi 5328 ;; 5329 pw32*) 5330 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 5331 ;; 5332 cygwin* | mingw* | cegcc*) 5333 case $cc_basename in 5334 cl*) 5335 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5336 ;; 5337 *) 5338 _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' 5339 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5340 ;; 5341 esac 5342 ;; 5343 *) 5344 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5345 ;; 5346 esac 5347], [ 5348 runpath_var= 5349 _LT_TAGVAR(allow_undefined_flag, $1)= 5350 _LT_TAGVAR(always_export_symbols, $1)=no 5351 _LT_TAGVAR(archive_cmds, $1)= 5352 _LT_TAGVAR(archive_expsym_cmds, $1)= 5353 _LT_TAGVAR(compiler_needs_object, $1)=no 5354 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5355 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5356 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5357 _LT_TAGVAR(hardcode_automatic, $1)=no 5358 _LT_TAGVAR(hardcode_direct, $1)=no 5359 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5361 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5362 _LT_TAGVAR(hardcode_minus_L, $1)=no 5363 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5364 _LT_TAGVAR(inherit_rpath, $1)=no 5365 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5366 _LT_TAGVAR(module_cmds, $1)= 5367 _LT_TAGVAR(module_expsym_cmds, $1)= 5368 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5369 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5370 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5371 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5372 # include_expsyms should be a list of space-separated symbols to be *always* 5373 # included in the symbol list 5374 _LT_TAGVAR(include_expsyms, $1)= 5375 # exclude_expsyms can be an extended regexp of symbols to exclude 5376 # it will be wrapped by ' (' and ')$', so one must not match beginning or 5377 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5378 # as well as any symbol that contains 'd'. 5379 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5380 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5381 # platforms (ab)use it in PIC code, but their linkers get confused if 5382 # the symbol is explicitly referenced. Since portable code cannot 5383 # rely on this symbol name, it's probably fine to never include it in 5384 # preloaded symbol tables. 5385 # Exclude shared library initialization/finalization symbols. 5386dnl Note also adjust exclude_expsyms for C++ above. 5387 extract_expsyms_cmds= 5388 5389 case $host_os in 5390 cygwin* | mingw* | pw32* | cegcc*) 5391 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5392 # When not using gcc, we currently assume that we are using 5393 # Microsoft Visual C++. 5394 if test yes != "$GCC"; then 5395 with_gnu_ld=no 5396 fi 5397 ;; 5398 interix*) 5399 # we just hope/assume this is gcc and not c89 (= MSVC++) 5400 with_gnu_ld=yes 5401 ;; 5402 openbsd* | bitrig*) 5403 with_gnu_ld=no 5404 ;; 5405 esac 5406 5407 _LT_TAGVAR(ld_shlibs, $1)=yes 5408 5409 # On some targets, GNU ld is compatible enough with the native linker 5410 # that we're better off using the native interface for both. 5411 lt_use_gnu_ld_interface=no 5412 if test yes = "$with_gnu_ld"; then 5413 case $host_os in 5414 aix*) 5415 # The AIX port of GNU ld has always aspired to compatibility 5416 # with the native linker. However, as the warning in the GNU ld 5417 # block says, versions before 2.19.5* couldn't really create working 5418 # shared libraries, regardless of the interface used. 5419 case `$LD -v 2>&1` in 5420 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5421 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5422 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5423 *) 5424 lt_use_gnu_ld_interface=yes 5425 ;; 5426 esac 5427 ;; 5428 *) 5429 lt_use_gnu_ld_interface=yes 5430 ;; 5431 esac 5432 fi 5433 5434 if test yes = "$lt_use_gnu_ld_interface"; then 5435 # If archive_cmds runs LD, not CC, wlarc should be empty 5436 wlarc='$wl' 5437 5438 # Set some defaults for GNU ld with shared library support. These 5439 # are reset later if shared libraries are not supported. Putting them 5440 # here allows them to be overridden if necessary. 5441 runpath_var=LD_RUN_PATH 5442 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5443 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5444 # ancient GNU ld didn't support --whole-archive et. al. 5445 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5446 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5447 else 5448 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5449 fi 5450 supports_anon_versioning=no 5451 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5452 *GNU\ gold*) supports_anon_versioning=yes ;; 5453 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5454 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5455 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5456 *\ 2.11.*) ;; # other 2.11 versions 5457 *) supports_anon_versioning=yes ;; 5458 esac 5459 5460 # See if GNU ld supports shared libraries. 5461 case $host_os in 5462 aix[[3-9]]*) 5463 # On AIX/PPC, the GNU linker is very broken 5464 if test ia64 != "$host_cpu"; then 5465 _LT_TAGVAR(ld_shlibs, $1)=no 5466 cat <<_LT_EOF 1>&2 5467 5468*** Warning: the GNU linker, at least up to release 2.19, is reported 5469*** to be unable to reliably create shared libraries on AIX. 5470*** Therefore, libtool is disabling shared libraries support. If you 5471*** really care for shared libraries, you may want to install binutils 5472*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5473*** You will then need to restart the configuration process. 5474 5475_LT_EOF 5476 fi 5477 ;; 5478 5479 amigaos*) 5480 case $host_cpu in 5481 powerpc) 5482 # see comment about AmigaOS4 .so support 5483 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5484 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5485 ;; 5486 m68k) 5487 _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)' 5488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5489 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5490 ;; 5491 esac 5492 ;; 5493 5494 beos*) 5495 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5496 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5497 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5498 # support --undefined. This deserves some investigation. FIXME 5499 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5500 else 5501 _LT_TAGVAR(ld_shlibs, $1)=no 5502 fi 5503 ;; 5504 5505 cygwin* | mingw* | pw32* | cegcc*) 5506 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5507 # as there is no search path for DLLs. 5508 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5509 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5510 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5511 _LT_TAGVAR(always_export_symbols, $1)=no 5512 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5513 _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' 5514 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5515 5516 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5517 _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' 5518 # If the export-symbols file already is a .def file, use it as 5519 # is; otherwise, prepend EXPORTS... 5520 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5521 cp $export_symbols $output_objdir/$soname.def; 5522 else 5523 echo EXPORTS > $output_objdir/$soname.def; 5524 cat $export_symbols >> $output_objdir/$soname.def; 5525 fi~ 5526 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5527 else 5528 _LT_TAGVAR(ld_shlibs, $1)=no 5529 fi 5530 ;; 5531 5532 haiku*) 5533 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5534 _LT_TAGVAR(link_all_deplibs, $1)=yes 5535 ;; 5536 5537 os2*) 5538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5539 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5540 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5541 shrext_cmds=.dll 5542 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5543 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5544 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5545 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5546 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5547 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5548 emximp -o $lib $output_objdir/$libname.def' 5549 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5550 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5551 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5552 $ECHO EXPORTS >> $output_objdir/$libname.def~ 5553 prefix_cmds="$SED"~ 5554 if test EXPORTS = "`$SED 1q $export_symbols`"; then 5555 prefix_cmds="$prefix_cmds -e 1d"; 5556 fi~ 5557 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5558 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5559 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5560 emximp -o $lib $output_objdir/$libname.def' 5561 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5562 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5563 ;; 5564 5565 interix[[3-9]]*) 5566 _LT_TAGVAR(hardcode_direct, $1)=no 5567 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5569 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5570 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5571 # Instead, shared libraries are loaded at an image base (0x10000000 by 5572 # default) and relocated if they conflict, which is a slow very memory 5573 # consuming and fragmenting process. To avoid this, we pick a random, 5574 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5575 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5576 _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' 5577 _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' 5578 ;; 5579 5580 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5581 tmp_diet=no 5582 if test linux-dietlibc = "$host_os"; then 5583 case $cc_basename in 5584 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5585 esac 5586 fi 5587 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5588 && test no = "$tmp_diet" 5589 then 5590 tmp_addflag=' $pic_flag' 5591 tmp_sharedflag='-shared' 5592 case $cc_basename,$host_cpu in 5593 pgcc*) # Portland Group C compiler 5594 _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' 5595 tmp_addflag=' $pic_flag' 5596 ;; 5597 pgf77* | pgf90* | pgf95* | pgfortran*) 5598 # Portland Group f77 and f90 compilers 5599 _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' 5600 tmp_addflag=' $pic_flag -Mnomain' ;; 5601 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5602 tmp_addflag=' -i_dynamic' ;; 5603 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5604 tmp_addflag=' -i_dynamic -nofor_main' ;; 5605 ifc* | ifort*) # Intel Fortran compiler 5606 tmp_addflag=' -nofor_main' ;; 5607 lf95*) # Lahey Fortran 8.1 5608 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5609 tmp_sharedflag='--shared' ;; 5610 nagfor*) # NAGFOR 5.3 5611 tmp_sharedflag='-Wl,-shared' ;; 5612 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5613 tmp_sharedflag='-qmkshrobj' 5614 tmp_addflag= ;; 5615 nvcc*) # Cuda Compiler Driver 2.2 5616 _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' 5617 _LT_TAGVAR(compiler_needs_object, $1)=yes 5618 ;; 5619 esac 5620 case `$CC -V 2>&1 | sed 5q` in 5621 *Sun\ C*) # Sun C 5.9 5622 _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' 5623 _LT_TAGVAR(compiler_needs_object, $1)=yes 5624 tmp_sharedflag='-G' ;; 5625 *Sun\ F*) # Sun Fortran 8.3 5626 tmp_sharedflag='-G' ;; 5627 esac 5628 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5629 5630 if test yes = "$supports_anon_versioning"; then 5631 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5632 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5633 echo "local: *; };" >> $output_objdir/$libname.ver~ 5634 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5635 fi 5636 5637 case $cc_basename in 5638 tcc*) 5639 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5640 ;; 5641 xlf* | bgf* | bgxlf* | mpixlf*) 5642 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5643 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5645 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5646 if test yes = "$supports_anon_versioning"; then 5647 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5648 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5649 echo "local: *; };" >> $output_objdir/$libname.ver~ 5650 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5651 fi 5652 ;; 5653 esac 5654 else 5655 _LT_TAGVAR(ld_shlibs, $1)=no 5656 fi 5657 ;; 5658 5659 netbsd*) 5660 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5661 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5662 wlarc= 5663 else 5664 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5665 _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' 5666 fi 5667 ;; 5668 5669 solaris*) 5670 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5671 _LT_TAGVAR(ld_shlibs, $1)=no 5672 cat <<_LT_EOF 1>&2 5673 5674*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5675*** create shared libraries on Solaris systems. Therefore, libtool 5676*** is disabling shared libraries support. We urge you to upgrade GNU 5677*** binutils to release 2.9.1 or newer. Another option is to modify 5678*** your PATH or compiler configuration so that the native linker is 5679*** used, and then restart. 5680 5681_LT_EOF 5682 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5683 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5684 _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' 5685 else 5686 _LT_TAGVAR(ld_shlibs, $1)=no 5687 fi 5688 ;; 5689 5690 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5691 case `$LD -v 2>&1` in 5692 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5693 _LT_TAGVAR(ld_shlibs, $1)=no 5694 cat <<_LT_EOF 1>&2 5695 5696*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5697*** reliably create shared libraries on SCO systems. Therefore, libtool 5698*** is disabling shared libraries support. We urge you to upgrade GNU 5699*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5700*** your PATH or compiler configuration so that the native linker is 5701*** used, and then restart. 5702 5703_LT_EOF 5704 ;; 5705 *) 5706 # For security reasons, it is highly recommended that you always 5707 # use absolute paths for naming shared libraries, and exclude the 5708 # DT_RUNPATH tag from executables and libraries. But doing so 5709 # requires that you compile everything twice, which is a pain. 5710 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5712 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5713 _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' 5714 else 5715 _LT_TAGVAR(ld_shlibs, $1)=no 5716 fi 5717 ;; 5718 esac 5719 ;; 5720 5721 sunos4*) 5722 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5723 wlarc= 5724 _LT_TAGVAR(hardcode_direct, $1)=yes 5725 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5726 ;; 5727 5728 *) 5729 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5731 _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' 5732 else 5733 _LT_TAGVAR(ld_shlibs, $1)=no 5734 fi 5735 ;; 5736 esac 5737 5738 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5739 runpath_var= 5740 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5741 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5742 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5743 fi 5744 else 5745 # PORTME fill in a description of your system's linker (not GNU ld) 5746 case $host_os in 5747 aix3*) 5748 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5749 _LT_TAGVAR(always_export_symbols, $1)=yes 5750 _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' 5751 # Note: this linker hardcodes the directories in LIBPATH if there 5752 # are no directories specified by -L. 5753 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5754 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5755 # Neither direct hardcoding nor static linking is supported with a 5756 # broken collect2. 5757 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5758 fi 5759 ;; 5760 5761 aix[[4-9]]*) 5762 if test ia64 = "$host_cpu"; then 5763 # On IA64, the linker does run time linking by default, so we don't 5764 # have to do anything special. 5765 aix_use_runtimelinking=no 5766 exp_sym_flag='-Bexport' 5767 no_entry_flag= 5768 else 5769 # If we're using GNU nm, then we don't want the "-C" option. 5770 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5771 # Without the "-l" option, or with the "-B" option, AIX nm treats 5772 # weak defined symbols like other global defined symbols, whereas 5773 # GNU nm marks them as "W". 5774 # While the 'weak' keyword is ignored in the Export File, we need 5775 # it in the Import File for the 'aix-soname' feature, so we have 5776 # to replace the "-B" option with "-P" for AIX nm. 5777 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5778 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5779 else 5780 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5781 fi 5782 aix_use_runtimelinking=no 5783 5784 # Test if we are trying to use run time linking or normal 5785 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5786 # have runtime linking enabled, and use it for executables. 5787 # For shared libraries, we enable/disable runtime linking 5788 # depending on the kind of the shared library created - 5789 # when "with_aix_soname,aix_use_runtimelinking" is: 5790 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5791 # "aix,yes" lib.so shared, rtl:yes, for executables 5792 # lib.a static archive 5793 # "both,no" lib.so.V(shr.o) shared, rtl:yes 5794 # lib.a(lib.so.V) shared, rtl:no, for executables 5795 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5796 # lib.a(lib.so.V) shared, rtl:no 5797 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5798 # lib.a static archive 5799 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5800 for ld_flag in $LDFLAGS; do 5801 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5802 aix_use_runtimelinking=yes 5803 break 5804 fi 5805 done 5806 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5807 # With aix-soname=svr4, we create the lib.so.V shared archives only, 5808 # so we don't have lib.a shared libs to link our executables. 5809 # We have to force runtime linking in this case. 5810 aix_use_runtimelinking=yes 5811 LDFLAGS="$LDFLAGS -Wl,-brtl" 5812 fi 5813 ;; 5814 esac 5815 5816 exp_sym_flag='-bexport' 5817 no_entry_flag='-bnoentry' 5818 fi 5819 5820 # When large executables or shared objects are built, AIX ld can 5821 # have problems creating the table of contents. If linking a library 5822 # or program results in "error TOC overflow" add -mminimal-toc to 5823 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5824 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5825 5826 _LT_TAGVAR(archive_cmds, $1)='' 5827 _LT_TAGVAR(hardcode_direct, $1)=yes 5828 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5829 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5830 _LT_TAGVAR(link_all_deplibs, $1)=yes 5831 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5832 case $with_aix_soname,$aix_use_runtimelinking in 5833 aix,*) ;; # traditional, no import file 5834 svr4,* | *,yes) # use import file 5835 # The Import File defines what to hardcode. 5836 _LT_TAGVAR(hardcode_direct, $1)=no 5837 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5838 ;; 5839 esac 5840 5841 if test yes = "$GCC"; then 5842 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5843 # We only want to do this on AIX 4.2 and lower, the check 5844 # below for broken collect2 doesn't work under 4.3+ 5845 collect2name=`$CC -print-prog-name=collect2` 5846 if test -f "$collect2name" && 5847 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5848 then 5849 # We have reworked collect2 5850 : 5851 else 5852 # We have old collect2 5853 _LT_TAGVAR(hardcode_direct, $1)=unsupported 5854 # It fails to find uninstalled libraries when the uninstalled 5855 # path is not listed in the libpath. Setting hardcode_minus_L 5856 # to unsupported forces relinking 5857 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5859 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5860 fi 5861 ;; 5862 esac 5863 shared_flag='-shared' 5864 if test yes = "$aix_use_runtimelinking"; then 5865 shared_flag="$shared_flag "'$wl-G' 5866 fi 5867 # Need to ensure runtime linking is disabled for the traditional 5868 # shared library, or the linker may eventually find shared libraries 5869 # /with/ Import File - we do not want to mix them. 5870 shared_flag_aix='-shared' 5871 shared_flag_svr4='-shared $wl-G' 5872 else 5873 # not using gcc 5874 if test ia64 = "$host_cpu"; then 5875 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5876 # chokes on -Wl,-G. The following line is correct: 5877 shared_flag='-G' 5878 else 5879 if test yes = "$aix_use_runtimelinking"; then 5880 shared_flag='$wl-G' 5881 else 5882 shared_flag='$wl-bM:SRE' 5883 fi 5884 shared_flag_aix='$wl-bM:SRE' 5885 shared_flag_svr4='$wl-G' 5886 fi 5887 fi 5888 5889 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5890 # It seems that -bexpall does not export symbols beginning with 5891 # underscore (_), so it is better to generate a list of symbols to export. 5892 _LT_TAGVAR(always_export_symbols, $1)=yes 5893 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5894 # Warning - without using the other runtime loading flags (-brtl), 5895 # -berok will link without error, but may produce a broken library. 5896 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5897 # Determine the default libpath from the value encoded in an 5898 # empty executable. 5899 _LT_SYS_MODULE_PATH_AIX([$1]) 5900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5901 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 5902 else 5903 if test ia64 = "$host_cpu"; then 5904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5905 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5906 _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" 5907 else 5908 # Determine the default libpath from the value encoded in an 5909 # empty executable. 5910 _LT_SYS_MODULE_PATH_AIX([$1]) 5911 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5912 # Warning - without using the other run time loading flags, 5913 # -berok will link without error, but may produce a broken library. 5914 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5915 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5916 if test yes = "$with_gnu_ld"; then 5917 # We only use this code for GNU lds that support --whole-archive. 5918 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5919 else 5920 # Exported symbols can be pulled into shared objects from archives 5921 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5922 fi 5923 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5924 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5925 # -brtl affects multiple linker settings, -berok does not and is overridden later 5926 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5927 if test svr4 != "$with_aix_soname"; then 5928 # This is similar to how AIX traditionally builds its shared libraries. 5929 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5930 fi 5931 if test aix != "$with_aix_soname"; then 5932 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5933 else 5934 # used by -dlpreopen to get the symbols 5935 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5936 fi 5937 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5938 fi 5939 fi 5940 ;; 5941 5942 amigaos*) 5943 case $host_cpu in 5944 powerpc) 5945 # see comment about AmigaOS4 .so support 5946 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5947 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5948 ;; 5949 m68k) 5950 _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)' 5951 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5952 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5953 ;; 5954 esac 5955 ;; 5956 5957 bsdi[[45]]*) 5958 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5959 ;; 5960 5961 cygwin* | mingw* | pw32* | cegcc*) 5962 # When not using gcc, we currently assume that we are using 5963 # Microsoft Visual C++. 5964 # hardcode_libdir_flag_spec is actually meaningless, as there is 5965 # no search path for DLLs. 5966 case $cc_basename in 5967 cl*) 5968 # Native MSVC 5969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5970 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5971 _LT_TAGVAR(always_export_symbols, $1)=yes 5972 _LT_TAGVAR(file_list_spec, $1)='@' 5973 # Tell ltmain to make .lib files, not .a files. 5974 libext=lib 5975 # Tell ltmain to make .dll files, not .so files. 5976 shrext_cmds=.dll 5977 # FIXME: Setting linknames here is a bad hack. 5978 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5979 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5980 cp "$export_symbols" "$output_objdir/$soname.def"; 5981 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5982 else 5983 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5984 fi~ 5985 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5986 linknames=' 5987 # The linker will not automatically build a static lib if we build a DLL. 5988 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5989 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5990 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5991 _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' 5992 # Don't use ranlib 5993 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5994 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5995 lt_tool_outputfile="@TOOL_OUTPUT@"~ 5996 case $lt_outputfile in 5997 *.exe|*.EXE) ;; 5998 *) 5999 lt_outputfile=$lt_outputfile.exe 6000 lt_tool_outputfile=$lt_tool_outputfile.exe 6001 ;; 6002 esac~ 6003 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6004 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6005 $RM "$lt_outputfile.manifest"; 6006 fi' 6007 ;; 6008 *) 6009 # Assume MSVC wrapper 6010 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6011 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6012 # Tell ltmain to make .lib files, not .a files. 6013 libext=lib 6014 # Tell ltmain to make .dll files, not .so files. 6015 shrext_cmds=.dll 6016 # FIXME: Setting linknames here is a bad hack. 6017 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6018 # The linker will automatically build a .lib file if we build a DLL. 6019 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6020 # FIXME: Should let the user specify the lib program. 6021 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6022 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6023 ;; 6024 esac 6025 ;; 6026 6027 darwin* | rhapsody*) 6028 _LT_DARWIN_LINKER_FEATURES($1) 6029 ;; 6030 6031 dgux*) 6032 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6035 ;; 6036 6037 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6038 # support. Future versions do this automatically, but an explicit c++rt0.o 6039 # does not break anything, and helps significantly (at the cost of a little 6040 # extra space). 6041 freebsd2.2*) 6042 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6044 _LT_TAGVAR(hardcode_direct, $1)=yes 6045 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6046 ;; 6047 6048 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6049 freebsd2.*) 6050 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6051 _LT_TAGVAR(hardcode_direct, $1)=yes 6052 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6054 ;; 6055 6056 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6057 freebsd* | dragonfly*) 6058 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6059 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6060 _LT_TAGVAR(hardcode_direct, $1)=yes 6061 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6062 ;; 6063 6064 hpux9*) 6065 if test yes = "$GCC"; then 6066 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6067 else 6068 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6069 fi 6070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6071 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6072 _LT_TAGVAR(hardcode_direct, $1)=yes 6073 6074 # hardcode_minus_L: Not really in the search PATH, 6075 # but as the default location of the library. 6076 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6077 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6078 ;; 6079 6080 hpux10*) 6081 if test yes,no = "$GCC,$with_gnu_ld"; then 6082 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6083 else 6084 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6085 fi 6086 if test no = "$with_gnu_ld"; then 6087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6088 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6089 _LT_TAGVAR(hardcode_direct, $1)=yes 6090 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6091 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6092 # hardcode_minus_L: Not really in the search PATH, 6093 # but as the default location of the library. 6094 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6095 fi 6096 ;; 6097 6098 hpux11*) 6099 if test yes,no = "$GCC,$with_gnu_ld"; then 6100 case $host_cpu in 6101 hppa*64*) 6102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 6103 ;; 6104 ia64*) 6105 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6106 ;; 6107 *) 6108 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6109 ;; 6110 esac 6111 else 6112 case $host_cpu in 6113 hppa*64*) 6114 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 6115 ;; 6116 ia64*) 6117 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6118 ;; 6119 *) 6120 m4_if($1, [], [ 6121 # Older versions of the 11.00 compiler do not understand -b yet 6122 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6123 _LT_LINKER_OPTION([if $CC understands -b], 6124 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6125 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6126 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6127 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6128 ;; 6129 esac 6130 fi 6131 if test no = "$with_gnu_ld"; then 6132 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6133 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6134 6135 case $host_cpu in 6136 hppa*64*|ia64*) 6137 _LT_TAGVAR(hardcode_direct, $1)=no 6138 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6139 ;; 6140 *) 6141 _LT_TAGVAR(hardcode_direct, $1)=yes 6142 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6143 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6144 6145 # hardcode_minus_L: Not really in the search PATH, 6146 # but as the default location of the library. 6147 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6148 ;; 6149 esac 6150 fi 6151 ;; 6152 6153 irix5* | irix6* | nonstopux*) 6154 if test yes = "$GCC"; then 6155 _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' 6156 # Try to use the -exported_symbol ld option, if it does not 6157 # work, assume that -exports_file does not work either and 6158 # implicitly export all symbols. 6159 # This should be the same for all languages, so no per-tag cache variable. 6160 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6161 [lt_cv_irix_exported_symbol], 6162 [save_LDFLAGS=$LDFLAGS 6163 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 6164 AC_LINK_IFELSE( 6165 [AC_LANG_SOURCE( 6166 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6167 [C++], [[int foo (void) { return 0; }]], 6168 [Fortran 77], [[ 6169 subroutine foo 6170 end]], 6171 [Fortran], [[ 6172 subroutine foo 6173 end]])])], 6174 [lt_cv_irix_exported_symbol=yes], 6175 [lt_cv_irix_exported_symbol=no]) 6176 LDFLAGS=$save_LDFLAGS]) 6177 if test yes = "$lt_cv_irix_exported_symbol"; then 6178 _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' 6179 fi 6180 else 6181 _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' 6182 _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' 6183 fi 6184 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6186 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6187 _LT_TAGVAR(inherit_rpath, $1)=yes 6188 _LT_TAGVAR(link_all_deplibs, $1)=yes 6189 ;; 6190 6191 linux*) 6192 case $cc_basename in 6193 tcc*) 6194 # Fabrice Bellard et al's Tiny C Compiler 6195 _LT_TAGVAR(ld_shlibs, $1)=yes 6196 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6197 ;; 6198 esac 6199 ;; 6200 6201 netbsd*) 6202 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6203 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6204 else 6205 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6206 fi 6207 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6208 _LT_TAGVAR(hardcode_direct, $1)=yes 6209 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6210 ;; 6211 6212 newsos6) 6213 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6214 _LT_TAGVAR(hardcode_direct, $1)=yes 6215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6216 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6217 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6218 ;; 6219 6220 *nto* | *qnx*) 6221 ;; 6222 6223 openbsd* | bitrig*) 6224 if test -f /usr/libexec/ld.so; then 6225 _LT_TAGVAR(hardcode_direct, $1)=yes 6226 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6227 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6228 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6229 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6230 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 6231 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6232 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6233 else 6234 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6236 fi 6237 else 6238 _LT_TAGVAR(ld_shlibs, $1)=no 6239 fi 6240 ;; 6241 6242 os2*) 6243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6244 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6245 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6246 shrext_cmds=.dll 6247 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6248 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6249 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6250 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6251 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6252 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6253 emximp -o $lib $output_objdir/$libname.def' 6254 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6255 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6256 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6257 $ECHO EXPORTS >> $output_objdir/$libname.def~ 6258 prefix_cmds="$SED"~ 6259 if test EXPORTS = "`$SED 1q $export_symbols`"; then 6260 prefix_cmds="$prefix_cmds -e 1d"; 6261 fi~ 6262 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6263 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6264 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6265 emximp -o $lib $output_objdir/$libname.def' 6266 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6267 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6268 ;; 6269 6270 osf3*) 6271 if test yes = "$GCC"; then 6272 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6273 _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' 6274 else 6275 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6276 _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' 6277 fi 6278 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6279 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6280 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6281 ;; 6282 6283 osf4* | osf5*) # as osf3* with the addition of -msym flag 6284 if test yes = "$GCC"; then 6285 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6286 _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' 6287 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6288 else 6289 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6290 _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' 6291 _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~ 6292 $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' 6293 6294 # Both c and cxx compiler support -rpath directly 6295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6296 fi 6297 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6298 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6299 ;; 6300 6301 solaris*) 6302 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6303 if test yes = "$GCC"; then 6304 wlarc='$wl' 6305 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 6306 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6307 $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' 6308 else 6309 case `$CC -V 2>&1` in 6310 *"Compilers 5.0"*) 6311 wlarc='' 6312 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 6313 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6314 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6315 ;; 6316 *) 6317 wlarc='$wl' 6318 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6319 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6320 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6321 ;; 6322 esac 6323 fi 6324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6325 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6326 case $host_os in 6327 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6328 *) 6329 # The compiler driver will combine and reorder linker options, 6330 # but understands '-z linker_flag'. GCC discards it without '$wl', 6331 # but is careful enough not to reorder. 6332 # Supported since Solaris 2.6 (maybe 2.5.1?) 6333 if test yes = "$GCC"; then 6334 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 6335 else 6336 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6337 fi 6338 ;; 6339 esac 6340 _LT_TAGVAR(link_all_deplibs, $1)=yes 6341 ;; 6342 6343 sunos4*) 6344 if test sequent = "$host_vendor"; then 6345 # Use $CC to link under sequent, because it throws in some extra .o 6346 # files that make .init and .fini sections work. 6347 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6348 else 6349 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6350 fi 6351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6352 _LT_TAGVAR(hardcode_direct, $1)=yes 6353 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6354 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6355 ;; 6356 6357 sysv4) 6358 case $host_vendor in 6359 sni) 6360 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6361 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6362 ;; 6363 siemens) 6364 ## LD is ld it makes a PLAMLIB 6365 ## CC just makes a GrossModule. 6366 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6367 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6368 _LT_TAGVAR(hardcode_direct, $1)=no 6369 ;; 6370 motorola) 6371 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6372 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6373 ;; 6374 esac 6375 runpath_var='LD_RUN_PATH' 6376 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6377 ;; 6378 6379 sysv4.3*) 6380 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6382 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6383 ;; 6384 6385 sysv4*MP*) 6386 if test -d /usr/nec; then 6387 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6389 runpath_var=LD_RUN_PATH 6390 hardcode_runpath_var=yes 6391 _LT_TAGVAR(ld_shlibs, $1)=yes 6392 fi 6393 ;; 6394 6395 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6396 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6397 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6398 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6399 runpath_var='LD_RUN_PATH' 6400 6401 if test yes = "$GCC"; then 6402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6403 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404 else 6405 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6406 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407 fi 6408 ;; 6409 6410 sysv5* | sco3.2v5* | sco5v6*) 6411 # Note: We CANNOT use -z defs as we might desire, because we do not 6412 # link with -lc, and that would cause any symbols used from libc to 6413 # always be unresolved, which means just about no library would 6414 # ever link correctly. If we're not using GNU ld we use -z text 6415 # though, which does catch some bad symbols but isn't as heavy-handed 6416 # as -z defs. 6417 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6418 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6419 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6420 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6421 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6422 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6423 _LT_TAGVAR(link_all_deplibs, $1)=yes 6424 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6425 runpath_var='LD_RUN_PATH' 6426 6427 if test yes = "$GCC"; then 6428 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6429 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6430 else 6431 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6432 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6433 fi 6434 ;; 6435 6436 uts4*) 6437 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6438 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6439 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6440 ;; 6441 6442 *) 6443 _LT_TAGVAR(ld_shlibs, $1)=no 6444 ;; 6445 esac 6446 6447 if test sni = "$host_vendor"; then 6448 case $host in 6449 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6450 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6451 ;; 6452 esac 6453 fi 6454 fi 6455]) 6456AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6457test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6458 6459_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6460 6461_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6462_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6463_LT_DECL([], [extract_expsyms_cmds], [2], 6464 [The commands to extract the exported symbol list from a shared archive]) 6465 6466# 6467# Do we need to explicitly link libc? 6468# 6469case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6470x|xyes) 6471 # Assume -lc should be added 6472 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6473 6474 if test yes,yes = "$GCC,$enable_shared"; then 6475 case $_LT_TAGVAR(archive_cmds, $1) in 6476 *'~'*) 6477 # FIXME: we may have to deal with multi-command sequences. 6478 ;; 6479 '$CC '*) 6480 # Test whether the compiler implicitly links with -lc since on some 6481 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6482 # to ld, don't add -lc before -lgcc. 6483 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6484 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6485 [$RM conftest* 6486 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6487 6488 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6489 soname=conftest 6490 lib=conftest 6491 libobjs=conftest.$ac_objext 6492 deplibs= 6493 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6494 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6495 compiler_flags=-v 6496 linker_flags=-v 6497 verstring= 6498 output_objdir=. 6499 libname=conftest 6500 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6501 _LT_TAGVAR(allow_undefined_flag, $1)= 6502 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6503 then 6504 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6505 else 6506 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6507 fi 6508 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6509 else 6510 cat conftest.err 1>&5 6511 fi 6512 $RM conftest* 6513 ]) 6514 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6515 ;; 6516 esac 6517 fi 6518 ;; 6519esac 6520 6521_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6522 [Whether or not to add -lc for building shared libraries]) 6523_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6524 [enable_shared_with_static_runtimes], [0], 6525 [Whether or not to disallow shared libs when runtime libs are static]) 6526_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6527 [Compiler flag to allow reflexive dlopens]) 6528_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6529 [Compiler flag to generate shared objects directly from archives]) 6530_LT_TAGDECL([], [compiler_needs_object], [1], 6531 [Whether the compiler copes with passing no objects directly]) 6532_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6533 [Create an old-style archive from a shared archive]) 6534_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6535 [Create a temporary old-style archive to link instead of a shared archive]) 6536_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6537_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6538_LT_TAGDECL([], [module_cmds], [2], 6539 [Commands used to build a loadable module if different from building 6540 a shared archive.]) 6541_LT_TAGDECL([], [module_expsym_cmds], [2]) 6542_LT_TAGDECL([], [with_gnu_ld], [1], 6543 [Whether we are building with GNU ld or not]) 6544_LT_TAGDECL([], [allow_undefined_flag], [1], 6545 [Flag that allows shared libraries with undefined symbols to be built]) 6546_LT_TAGDECL([], [no_undefined_flag], [1], 6547 [Flag that enforces no undefined symbols]) 6548_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6549 [Flag to hardcode $libdir into a binary during linking. 6550 This must work even if $libdir does not exist]) 6551_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6552 [Whether we need a single "-rpath" flag with a separated argument]) 6553_LT_TAGDECL([], [hardcode_direct], [0], 6554 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6555 DIR into the resulting binary]) 6556_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6557 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6558 DIR into the resulting binary and the resulting library dependency is 6559 "absolute", i.e impossible to change by setting $shlibpath_var if the 6560 library is relocated]) 6561_LT_TAGDECL([], [hardcode_minus_L], [0], 6562 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6563 into the resulting binary]) 6564_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6565 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6566 into the resulting binary]) 6567_LT_TAGDECL([], [hardcode_automatic], [0], 6568 [Set to "yes" if building a shared library automatically hardcodes DIR 6569 into the library and all subsequent libraries and executables linked 6570 against it]) 6571_LT_TAGDECL([], [inherit_rpath], [0], 6572 [Set to yes if linker adds runtime paths of dependent libraries 6573 to runtime path list]) 6574_LT_TAGDECL([], [link_all_deplibs], [0], 6575 [Whether libtool must link a program against all its dependency libraries]) 6576_LT_TAGDECL([], [always_export_symbols], [0], 6577 [Set to "yes" if exported symbols are required]) 6578_LT_TAGDECL([], [export_symbols_cmds], [2], 6579 [The commands to list exported symbols]) 6580_LT_TAGDECL([], [exclude_expsyms], [1], 6581 [Symbols that should not be listed in the preloaded symbols]) 6582_LT_TAGDECL([], [include_expsyms], [1], 6583 [Symbols that must always be exported]) 6584_LT_TAGDECL([], [prelink_cmds], [2], 6585 [Commands necessary for linking programs (against libraries) with templates]) 6586_LT_TAGDECL([], [postlink_cmds], [2], 6587 [Commands necessary for finishing linking programs]) 6588_LT_TAGDECL([], [file_list_spec], [1], 6589 [Specify filename containing input files]) 6590dnl FIXME: Not yet implemented 6591dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6592dnl [Compiler flag to generate thread safe objects]) 6593])# _LT_LINKER_SHLIBS 6594 6595 6596# _LT_LANG_C_CONFIG([TAG]) 6597# ------------------------ 6598# Ensure that the configuration variables for a C compiler are suitably 6599# defined. These variables are subsequently used by _LT_CONFIG to write 6600# the compiler configuration to 'libtool'. 6601m4_defun([_LT_LANG_C_CONFIG], 6602[m4_require([_LT_DECL_EGREP])dnl 6603lt_save_CC=$CC 6604AC_LANG_PUSH(C) 6605 6606# Source file extension for C test sources. 6607ac_ext=c 6608 6609# Object file extension for compiled C test sources. 6610objext=o 6611_LT_TAGVAR(objext, $1)=$objext 6612 6613# Code to be used in simple compile tests 6614lt_simple_compile_test_code="int some_variable = 0;" 6615 6616# Code to be used in simple link tests 6617lt_simple_link_test_code='int main(){return(0);}' 6618 6619_LT_TAG_COMPILER 6620# Save the default compiler, since it gets overwritten when the other 6621# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6622compiler_DEFAULT=$CC 6623 6624# save warnings/boilerplate of simple test code 6625_LT_COMPILER_BOILERPLATE 6626_LT_LINKER_BOILERPLATE 6627 6628if test -n "$compiler"; then 6629 _LT_COMPILER_NO_RTTI($1) 6630 _LT_COMPILER_PIC($1) 6631 _LT_COMPILER_C_O($1) 6632 _LT_COMPILER_FILE_LOCKS($1) 6633 _LT_LINKER_SHLIBS($1) 6634 _LT_SYS_DYNAMIC_LINKER($1) 6635 _LT_LINKER_HARDCODE_LIBPATH($1) 6636 LT_SYS_DLOPEN_SELF 6637 _LT_CMD_STRIPLIB 6638 6639 # Report what library types will actually be built 6640 AC_MSG_CHECKING([if libtool supports shared libraries]) 6641 AC_MSG_RESULT([$can_build_shared]) 6642 6643 AC_MSG_CHECKING([whether to build shared libraries]) 6644 test no = "$can_build_shared" && enable_shared=no 6645 6646 # On AIX, shared libraries and static libraries use the same namespace, and 6647 # are all built from PIC. 6648 case $host_os in 6649 aix3*) 6650 test yes = "$enable_shared" && enable_static=no 6651 if test -n "$RANLIB"; then 6652 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6653 postinstall_cmds='$RANLIB $lib' 6654 fi 6655 ;; 6656 6657 aix[[4-9]]*) 6658 if test ia64 != "$host_cpu"; then 6659 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6660 yes,aix,yes) ;; # shared object as lib.so file only 6661 yes,svr4,*) ;; # shared object as lib.so archive member only 6662 yes,*) enable_static=no ;; # shared object in lib.a archive as well 6663 esac 6664 fi 6665 ;; 6666 esac 6667 AC_MSG_RESULT([$enable_shared]) 6668 6669 AC_MSG_CHECKING([whether to build static libraries]) 6670 # Make sure either enable_shared or enable_static is yes. 6671 test yes = "$enable_shared" || enable_static=yes 6672 AC_MSG_RESULT([$enable_static]) 6673 6674 _LT_CONFIG($1) 6675fi 6676AC_LANG_POP 6677CC=$lt_save_CC 6678])# _LT_LANG_C_CONFIG 6679 6680 6681# _LT_LANG_CXX_CONFIG([TAG]) 6682# -------------------------- 6683# Ensure that the configuration variables for a C++ compiler are suitably 6684# defined. These variables are subsequently used by _LT_CONFIG to write 6685# the compiler configuration to 'libtool'. 6686m4_defun([_LT_LANG_CXX_CONFIG], 6687[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6688m4_require([_LT_DECL_EGREP])dnl 6689m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6690if test -n "$CXX" && ( test no != "$CXX" && 6691 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6692 (test g++ != "$CXX"))); then 6693 AC_PROG_CXXCPP 6694else 6695 _lt_caught_CXX_error=yes 6696fi 6697 6698AC_LANG_PUSH(C++) 6699_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6700_LT_TAGVAR(allow_undefined_flag, $1)= 6701_LT_TAGVAR(always_export_symbols, $1)=no 6702_LT_TAGVAR(archive_expsym_cmds, $1)= 6703_LT_TAGVAR(compiler_needs_object, $1)=no 6704_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6705_LT_TAGVAR(hardcode_direct, $1)=no 6706_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6707_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6708_LT_TAGVAR(hardcode_libdir_separator, $1)= 6709_LT_TAGVAR(hardcode_minus_L, $1)=no 6710_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6711_LT_TAGVAR(hardcode_automatic, $1)=no 6712_LT_TAGVAR(inherit_rpath, $1)=no 6713_LT_TAGVAR(module_cmds, $1)= 6714_LT_TAGVAR(module_expsym_cmds, $1)= 6715_LT_TAGVAR(link_all_deplibs, $1)=unknown 6716_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6717_LT_TAGVAR(reload_flag, $1)=$reload_flag 6718_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6719_LT_TAGVAR(no_undefined_flag, $1)= 6720_LT_TAGVAR(whole_archive_flag_spec, $1)= 6721_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6722 6723# Source file extension for C++ test sources. 6724ac_ext=cpp 6725 6726# Object file extension for compiled C++ test sources. 6727objext=o 6728_LT_TAGVAR(objext, $1)=$objext 6729 6730# No sense in running all these tests if we already determined that 6731# the CXX compiler isn't working. Some variables (like enable_shared) 6732# are currently assumed to apply to all compilers on this platform, 6733# and will be corrupted by setting them based on a non-working compiler. 6734if test yes != "$_lt_caught_CXX_error"; then 6735 # Code to be used in simple compile tests 6736 lt_simple_compile_test_code="int some_variable = 0;" 6737 6738 # Code to be used in simple link tests 6739 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6740 6741 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6742 _LT_TAG_COMPILER 6743 6744 # save warnings/boilerplate of simple test code 6745 _LT_COMPILER_BOILERPLATE 6746 _LT_LINKER_BOILERPLATE 6747 6748 # Allow CC to be a program name with arguments. 6749 lt_save_CC=$CC 6750 lt_save_CFLAGS=$CFLAGS 6751 lt_save_LD=$LD 6752 lt_save_GCC=$GCC 6753 GCC=$GXX 6754 lt_save_with_gnu_ld=$with_gnu_ld 6755 lt_save_path_LD=$lt_cv_path_LD 6756 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6757 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6758 else 6759 $as_unset lt_cv_prog_gnu_ld 6760 fi 6761 if test -n "${lt_cv_path_LDCXX+set}"; then 6762 lt_cv_path_LD=$lt_cv_path_LDCXX 6763 else 6764 $as_unset lt_cv_path_LD 6765 fi 6766 test -z "${LDCXX+set}" || LD=$LDCXX 6767 CC=${CXX-"c++"} 6768 CFLAGS=$CXXFLAGS 6769 compiler=$CC 6770 _LT_TAGVAR(compiler, $1)=$CC 6771 _LT_CC_BASENAME([$compiler]) 6772 6773 if test -n "$compiler"; then 6774 # We don't want -fno-exception when compiling C++ code, so set the 6775 # no_builtin_flag separately 6776 if test yes = "$GXX"; then 6777 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6778 else 6779 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6780 fi 6781 6782 if test yes = "$GXX"; then 6783 # Set up default GNU C++ configuration 6784 6785 LT_PATH_LD 6786 6787 # Check if GNU C++ uses GNU ld as the underlying linker, since the 6788 # archiving commands below assume that GNU ld is being used. 6789 if test yes = "$with_gnu_ld"; then 6790 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6791 _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' 6792 6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6794 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6795 6796 # If archive_cmds runs LD, not CC, wlarc should be empty 6797 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6798 # investigate it a little bit more. (MM) 6799 wlarc='$wl' 6800 6801 # ancient GNU ld didn't support --whole-archive et. al. 6802 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6803 $GREP 'no-whole-archive' > /dev/null; then 6804 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6805 else 6806 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6807 fi 6808 else 6809 with_gnu_ld=no 6810 wlarc= 6811 6812 # A generic and very simple default shared library creation 6813 # command for GNU C++ for the case where it uses the native 6814 # linker, instead of GNU ld. If possible, this setting should 6815 # overridden to take advantage of the native linker features on 6816 # the platform it is being used on. 6817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6818 fi 6819 6820 # Commands to make compiler produce verbose output that lists 6821 # what "hidden" libraries, object files and flags are used when 6822 # linking a shared library. 6823 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6824 6825 else 6826 GXX=no 6827 with_gnu_ld=no 6828 wlarc= 6829 fi 6830 6831 # PORTME: fill in a description of your system's C++ link characteristics 6832 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6833 _LT_TAGVAR(ld_shlibs, $1)=yes 6834 case $host_os in 6835 aix3*) 6836 # FIXME: insert proper C++ library support 6837 _LT_TAGVAR(ld_shlibs, $1)=no 6838 ;; 6839 aix[[4-9]]*) 6840 if test ia64 = "$host_cpu"; then 6841 # On IA64, the linker does run time linking by default, so we don't 6842 # have to do anything special. 6843 aix_use_runtimelinking=no 6844 exp_sym_flag='-Bexport' 6845 no_entry_flag= 6846 else 6847 aix_use_runtimelinking=no 6848 6849 # Test if we are trying to use run time linking or normal 6850 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6851 # have runtime linking enabled, and use it for executables. 6852 # For shared libraries, we enable/disable runtime linking 6853 # depending on the kind of the shared library created - 6854 # when "with_aix_soname,aix_use_runtimelinking" is: 6855 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6856 # "aix,yes" lib.so shared, rtl:yes, for executables 6857 # lib.a static archive 6858 # "both,no" lib.so.V(shr.o) shared, rtl:yes 6859 # lib.a(lib.so.V) shared, rtl:no, for executables 6860 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6861 # lib.a(lib.so.V) shared, rtl:no 6862 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6863 # lib.a static archive 6864 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6865 for ld_flag in $LDFLAGS; do 6866 case $ld_flag in 6867 *-brtl*) 6868 aix_use_runtimelinking=yes 6869 break 6870 ;; 6871 esac 6872 done 6873 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6874 # With aix-soname=svr4, we create the lib.so.V shared archives only, 6875 # so we don't have lib.a shared libs to link our executables. 6876 # We have to force runtime linking in this case. 6877 aix_use_runtimelinking=yes 6878 LDFLAGS="$LDFLAGS -Wl,-brtl" 6879 fi 6880 ;; 6881 esac 6882 6883 exp_sym_flag='-bexport' 6884 no_entry_flag='-bnoentry' 6885 fi 6886 6887 # When large executables or shared objects are built, AIX ld can 6888 # have problems creating the table of contents. If linking a library 6889 # or program results in "error TOC overflow" add -mminimal-toc to 6890 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6891 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6892 6893 _LT_TAGVAR(archive_cmds, $1)='' 6894 _LT_TAGVAR(hardcode_direct, $1)=yes 6895 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6896 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6897 _LT_TAGVAR(link_all_deplibs, $1)=yes 6898 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6899 case $with_aix_soname,$aix_use_runtimelinking in 6900 aix,*) ;; # no import file 6901 svr4,* | *,yes) # use import file 6902 # The Import File defines what to hardcode. 6903 _LT_TAGVAR(hardcode_direct, $1)=no 6904 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6905 ;; 6906 esac 6907 6908 if test yes = "$GXX"; then 6909 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6910 # We only want to do this on AIX 4.2 and lower, the check 6911 # below for broken collect2 doesn't work under 4.3+ 6912 collect2name=`$CC -print-prog-name=collect2` 6913 if test -f "$collect2name" && 6914 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6915 then 6916 # We have reworked collect2 6917 : 6918 else 6919 # We have old collect2 6920 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6921 # It fails to find uninstalled libraries when the uninstalled 6922 # path is not listed in the libpath. Setting hardcode_minus_L 6923 # to unsupported forces relinking 6924 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6926 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6927 fi 6928 esac 6929 shared_flag='-shared' 6930 if test yes = "$aix_use_runtimelinking"; then 6931 shared_flag=$shared_flag' $wl-G' 6932 fi 6933 # Need to ensure runtime linking is disabled for the traditional 6934 # shared library, or the linker may eventually find shared libraries 6935 # /with/ Import File - we do not want to mix them. 6936 shared_flag_aix='-shared' 6937 shared_flag_svr4='-shared $wl-G' 6938 else 6939 # not using gcc 6940 if test ia64 = "$host_cpu"; then 6941 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6942 # chokes on -Wl,-G. The following line is correct: 6943 shared_flag='-G' 6944 else 6945 if test yes = "$aix_use_runtimelinking"; then 6946 shared_flag='$wl-G' 6947 else 6948 shared_flag='$wl-bM:SRE' 6949 fi 6950 shared_flag_aix='$wl-bM:SRE' 6951 shared_flag_svr4='$wl-G' 6952 fi 6953 fi 6954 6955 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6956 # It seems that -bexpall does not export symbols beginning with 6957 # underscore (_), so it is better to generate a list of symbols to 6958 # export. 6959 _LT_TAGVAR(always_export_symbols, $1)=yes 6960 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6961 # Warning - without using the other runtime loading flags (-brtl), 6962 # -berok will link without error, but may produce a broken library. 6963 # The "-G" linker flag allows undefined symbols. 6964 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6965 # Determine the default libpath from the value encoded in an empty 6966 # executable. 6967 _LT_SYS_MODULE_PATH_AIX([$1]) 6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6969 6970 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 6971 else 6972 if test ia64 = "$host_cpu"; then 6973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6974 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6975 _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" 6976 else 6977 # Determine the default libpath from the value encoded in an 6978 # empty executable. 6979 _LT_SYS_MODULE_PATH_AIX([$1]) 6980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6981 # Warning - without using the other run time loading flags, 6982 # -berok will link without error, but may produce a broken library. 6983 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6984 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6985 if test yes = "$with_gnu_ld"; then 6986 # We only use this code for GNU lds that support --whole-archive. 6987 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6988 else 6989 # Exported symbols can be pulled into shared objects from archives 6990 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6991 fi 6992 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6993 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6994 # -brtl affects multiple linker settings, -berok does not and is overridden later 6995 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6996 if test svr4 != "$with_aix_soname"; then 6997 # This is similar to how AIX traditionally builds its shared 6998 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6999 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 7000 fi 7001 if test aix != "$with_aix_soname"; then 7002 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 7003 else 7004 # used by -dlpreopen to get the symbols 7005 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 7006 fi 7007 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 7008 fi 7009 fi 7010 ;; 7011 7012 beos*) 7013 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7014 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7015 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7016 # support --undefined. This deserves some investigation. FIXME 7017 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7018 else 7019 _LT_TAGVAR(ld_shlibs, $1)=no 7020 fi 7021 ;; 7022 7023 chorus*) 7024 case $cc_basename in 7025 *) 7026 # FIXME: insert proper C++ library support 7027 _LT_TAGVAR(ld_shlibs, $1)=no 7028 ;; 7029 esac 7030 ;; 7031 7032 cygwin* | mingw* | pw32* | cegcc*) 7033 case $GXX,$cc_basename in 7034 ,cl* | no,cl*) 7035 # Native MSVC 7036 # hardcode_libdir_flag_spec is actually meaningless, as there is 7037 # no search path for DLLs. 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7039 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7040 _LT_TAGVAR(always_export_symbols, $1)=yes 7041 _LT_TAGVAR(file_list_spec, $1)='@' 7042 # Tell ltmain to make .lib files, not .a files. 7043 libext=lib 7044 # Tell ltmain to make .dll files, not .so files. 7045 shrext_cmds=.dll 7046 # FIXME: Setting linknames here is a bad hack. 7047 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 7048 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 7049 cp "$export_symbols" "$output_objdir/$soname.def"; 7050 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 7051 else 7052 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 7053 fi~ 7054 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7055 linknames=' 7056 # The linker will not automatically build a static lib if we build a DLL. 7057 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7058 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7059 # Don't use ranlib 7060 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7061 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7062 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7063 case $lt_outputfile in 7064 *.exe|*.EXE) ;; 7065 *) 7066 lt_outputfile=$lt_outputfile.exe 7067 lt_tool_outputfile=$lt_tool_outputfile.exe 7068 ;; 7069 esac~ 7070 func_to_tool_file "$lt_outputfile"~ 7071 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 7072 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7073 $RM "$lt_outputfile.manifest"; 7074 fi' 7075 ;; 7076 *) 7077 # g++ 7078 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7079 # as there is no search path for DLLs. 7080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7081 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 7082 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7083 _LT_TAGVAR(always_export_symbols, $1)=no 7084 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7085 7086 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7087 _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' 7088 # If the export-symbols file already is a .def file, use it as 7089 # is; otherwise, prepend EXPORTS... 7090 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 7091 cp $export_symbols $output_objdir/$soname.def; 7092 else 7093 echo EXPORTS > $output_objdir/$soname.def; 7094 cat $export_symbols >> $output_objdir/$soname.def; 7095 fi~ 7096 $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' 7097 else 7098 _LT_TAGVAR(ld_shlibs, $1)=no 7099 fi 7100 ;; 7101 esac 7102 ;; 7103 darwin* | rhapsody*) 7104 _LT_DARWIN_LINKER_FEATURES($1) 7105 ;; 7106 7107 os2*) 7108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7109 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7110 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7111 shrext_cmds=.dll 7112 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 7113 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 7114 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 7115 $ECHO EXPORTS >> $output_objdir/$libname.def~ 7116 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 7117 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 7118 emximp -o $lib $output_objdir/$libname.def' 7119 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 7120 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 7121 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 7122 $ECHO EXPORTS >> $output_objdir/$libname.def~ 7123 prefix_cmds="$SED"~ 7124 if test EXPORTS = "`$SED 1q $export_symbols`"; then 7125 prefix_cmds="$prefix_cmds -e 1d"; 7126 fi~ 7127 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 7128 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 7129 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 7130 emximp -o $lib $output_objdir/$libname.def' 7131 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 7132 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7133 ;; 7134 7135 dgux*) 7136 case $cc_basename in 7137 ec++*) 7138 # FIXME: insert proper C++ library support 7139 _LT_TAGVAR(ld_shlibs, $1)=no 7140 ;; 7141 ghcx*) 7142 # Green Hills C++ Compiler 7143 # FIXME: insert proper C++ library support 7144 _LT_TAGVAR(ld_shlibs, $1)=no 7145 ;; 7146 *) 7147 # FIXME: insert proper C++ library support 7148 _LT_TAGVAR(ld_shlibs, $1)=no 7149 ;; 7150 esac 7151 ;; 7152 7153 freebsd2.*) 7154 # C++ shared libraries reported to be fairly broken before 7155 # switch to ELF 7156 _LT_TAGVAR(ld_shlibs, $1)=no 7157 ;; 7158 7159 freebsd-elf*) 7160 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7161 ;; 7162 7163 freebsd* | dragonfly*) 7164 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7165 # conventions 7166 _LT_TAGVAR(ld_shlibs, $1)=yes 7167 ;; 7168 7169 haiku*) 7170 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7171 _LT_TAGVAR(link_all_deplibs, $1)=yes 7172 ;; 7173 7174 hpux9*) 7175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 7176 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7177 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7178 _LT_TAGVAR(hardcode_direct, $1)=yes 7179 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7180 # but as the default 7181 # location of the library. 7182 7183 case $cc_basename in 7184 CC*) 7185 # FIXME: insert proper C++ library support 7186 _LT_TAGVAR(ld_shlibs, $1)=no 7187 ;; 7188 aCC*) 7189 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 7190 # Commands to make compiler produce verbose output that lists 7191 # what "hidden" libraries, object files and flags are used when 7192 # linking a shared library. 7193 # 7194 # There doesn't appear to be a way to prevent this compiler from 7195 # explicitly linking system object files so we need to strip them 7196 # from the output so that they don't get included in the library 7197 # dependencies. 7198 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"' 7199 ;; 7200 *) 7201 if test yes = "$GXX"; then 7202 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 7203 else 7204 # FIXME: insert proper C++ library support 7205 _LT_TAGVAR(ld_shlibs, $1)=no 7206 fi 7207 ;; 7208 esac 7209 ;; 7210 7211 hpux10*|hpux11*) 7212 if test no = "$with_gnu_ld"; then 7213 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 7214 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7215 7216 case $host_cpu in 7217 hppa*64*|ia64*) 7218 ;; 7219 *) 7220 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7221 ;; 7222 esac 7223 fi 7224 case $host_cpu in 7225 hppa*64*|ia64*) 7226 _LT_TAGVAR(hardcode_direct, $1)=no 7227 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7228 ;; 7229 *) 7230 _LT_TAGVAR(hardcode_direct, $1)=yes 7231 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7232 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7233 # but as the default 7234 # location of the library. 7235 ;; 7236 esac 7237 7238 case $cc_basename in 7239 CC*) 7240 # FIXME: insert proper C++ library support 7241 _LT_TAGVAR(ld_shlibs, $1)=no 7242 ;; 7243 aCC*) 7244 case $host_cpu in 7245 hppa*64*) 7246 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7247 ;; 7248 ia64*) 7249 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7250 ;; 7251 *) 7252 _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' 7253 ;; 7254 esac 7255 # Commands to make compiler produce verbose output that lists 7256 # what "hidden" libraries, object files and flags are used when 7257 # linking a shared library. 7258 # 7259 # There doesn't appear to be a way to prevent this compiler from 7260 # explicitly linking system object files so we need to strip them 7261 # from the output so that they don't get included in the library 7262 # dependencies. 7263 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"' 7264 ;; 7265 *) 7266 if test yes = "$GXX"; then 7267 if test no = "$with_gnu_ld"; then 7268 case $host_cpu in 7269 hppa*64*) 7270 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7271 ;; 7272 ia64*) 7273 _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' 7274 ;; 7275 *) 7276 _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' 7277 ;; 7278 esac 7279 fi 7280 else 7281 # FIXME: insert proper C++ library support 7282 _LT_TAGVAR(ld_shlibs, $1)=no 7283 fi 7284 ;; 7285 esac 7286 ;; 7287 7288 interix[[3-9]]*) 7289 _LT_TAGVAR(hardcode_direct, $1)=no 7290 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7292 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7293 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7294 # Instead, shared libraries are loaded at an image base (0x10000000 by 7295 # default) and relocated if they conflict, which is a slow very memory 7296 # consuming and fragmenting process. To avoid this, we pick a random, 7297 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7298 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7299 _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' 7300 _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' 7301 ;; 7302 irix5* | irix6*) 7303 case $cc_basename in 7304 CC*) 7305 # SGI C++ 7306 _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' 7307 7308 # Archives containing C++ object files must be created using 7309 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7310 # necessary to make sure instantiated templates are included 7311 # in the archive. 7312 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7313 ;; 7314 *) 7315 if test yes = "$GXX"; then 7316 if test no = "$with_gnu_ld"; then 7317 _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' 7318 else 7319 _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' 7320 fi 7321 fi 7322 _LT_TAGVAR(link_all_deplibs, $1)=yes 7323 ;; 7324 esac 7325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7326 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7327 _LT_TAGVAR(inherit_rpath, $1)=yes 7328 ;; 7329 7330 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7331 case $cc_basename in 7332 KCC*) 7333 # Kuck and Associates, Inc. (KAI) C++ Compiler 7334 7335 # KCC will only create a shared library if the output file 7336 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7337 # to its proper name (with version) after linking. 7338 _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' 7339 _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' 7340 # Commands to make compiler produce verbose output that lists 7341 # what "hidden" libraries, object files and flags are used when 7342 # linking a shared library. 7343 # 7344 # There doesn't appear to be a way to prevent this compiler from 7345 # explicitly linking system object files so we need to strip them 7346 # from the output so that they don't get included in the library 7347 # dependencies. 7348 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"' 7349 7350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7351 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7352 7353 # Archives containing C++ object files must be created using 7354 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7355 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7356 ;; 7357 icpc* | ecpc* ) 7358 # Intel C++ 7359 with_gnu_ld=yes 7360 # version 8.0 and above of icpc choke on multiply defined symbols 7361 # if we add $predep_objects and $postdep_objects, however 7.1 and 7362 # earlier do not add the objects themselves. 7363 case `$CC -V 2>&1` in 7364 *"Version 7."*) 7365 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7366 _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' 7367 ;; 7368 *) # Version 8.0 or newer 7369 tmp_idyn= 7370 case $host_cpu in 7371 ia64*) tmp_idyn=' -i_dynamic';; 7372 esac 7373 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7374 _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' 7375 ;; 7376 esac 7377 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7378 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7379 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7380 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7381 ;; 7382 pgCC* | pgcpp*) 7383 # Portland Group C++ compiler 7384 case `$CC -V` in 7385 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7386 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7387 rm -rf $tpldir~ 7388 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7389 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7390 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7391 rm -rf $tpldir~ 7392 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7393 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7394 $RANLIB $oldlib' 7395 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7396 rm -rf $tpldir~ 7397 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7398 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7399 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7400 rm -rf $tpldir~ 7401 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7402 $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' 7403 ;; 7404 *) # Version 6 and above use weak symbols 7405 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7406 _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' 7407 ;; 7408 esac 7409 7410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7411 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7412 _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' 7413 ;; 7414 cxx*) 7415 # Compaq C++ 7416 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7417 _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' 7418 7419 runpath_var=LD_RUN_PATH 7420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7421 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7422 7423 # Commands to make compiler produce verbose output that lists 7424 # what "hidden" libraries, object files and flags are used when 7425 # linking a shared library. 7426 # 7427 # There doesn't appear to be a way to prevent this compiler from 7428 # explicitly linking system object files so we need to strip them 7429 # from the output so that they don't get included in the library 7430 # dependencies. 7431 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' 7432 ;; 7433 xl* | mpixl* | bgxl*) 7434 # IBM XL 8.0 on PPC, with GNU ld 7435 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7436 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7437 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7438 if test yes = "$supports_anon_versioning"; then 7439 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7440 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7441 echo "local: *; };" >> $output_objdir/$libname.ver~ 7442 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7443 fi 7444 ;; 7445 *) 7446 case `$CC -V 2>&1 | sed 5q` in 7447 *Sun\ C*) 7448 # Sun C++ 5.9 7449 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7450 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7451 _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' 7452 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7453 _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' 7454 _LT_TAGVAR(compiler_needs_object, $1)=yes 7455 7456 # Not sure whether something based on 7457 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7458 # would be better. 7459 output_verbose_link_cmd='func_echo_all' 7460 7461 # Archives containing C++ object files must be created using 7462 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7463 # necessary to make sure instantiated templates are included 7464 # in the archive. 7465 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7466 ;; 7467 esac 7468 ;; 7469 esac 7470 ;; 7471 7472 lynxos*) 7473 # FIXME: insert proper C++ library support 7474 _LT_TAGVAR(ld_shlibs, $1)=no 7475 ;; 7476 7477 m88k*) 7478 # FIXME: insert proper C++ library support 7479 _LT_TAGVAR(ld_shlibs, $1)=no 7480 ;; 7481 7482 mvs*) 7483 case $cc_basename in 7484 cxx*) 7485 # FIXME: insert proper C++ library support 7486 _LT_TAGVAR(ld_shlibs, $1)=no 7487 ;; 7488 *) 7489 # FIXME: insert proper C++ library support 7490 _LT_TAGVAR(ld_shlibs, $1)=no 7491 ;; 7492 esac 7493 ;; 7494 7495 netbsd*) 7496 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7497 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7498 wlarc= 7499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7500 _LT_TAGVAR(hardcode_direct, $1)=yes 7501 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7502 fi 7503 # Workaround some broken pre-1.5 toolchains 7504 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7505 ;; 7506 7507 *nto* | *qnx*) 7508 _LT_TAGVAR(ld_shlibs, $1)=yes 7509 ;; 7510 7511 openbsd* | bitrig*) 7512 if test -f /usr/libexec/ld.so; then 7513 _LT_TAGVAR(hardcode_direct, $1)=yes 7514 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7515 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7516 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7518 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7519 _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' 7520 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7521 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7522 fi 7523 output_verbose_link_cmd=func_echo_all 7524 else 7525 _LT_TAGVAR(ld_shlibs, $1)=no 7526 fi 7527 ;; 7528 7529 osf3* | osf4* | osf5*) 7530 case $cc_basename in 7531 KCC*) 7532 # Kuck and Associates, Inc. (KAI) C++ Compiler 7533 7534 # KCC will only create a shared library if the output file 7535 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7536 # to its proper name (with version) after linking. 7537 _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' 7538 7539 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7540 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7541 7542 # Archives containing C++ object files must be created using 7543 # the KAI C++ compiler. 7544 case $host in 7545 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7546 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7547 esac 7548 ;; 7549 RCC*) 7550 # Rational C++ 2.4.1 7551 # FIXME: insert proper C++ library support 7552 _LT_TAGVAR(ld_shlibs, $1)=no 7553 ;; 7554 cxx*) 7555 case $host in 7556 osf3*) 7557 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7558 _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' 7559 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7560 ;; 7561 *) 7562 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7563 _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' 7564 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7565 echo "-hidden">> $lib.exp~ 7566 $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~ 7567 $RM $lib.exp' 7568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7569 ;; 7570 esac 7571 7572 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7573 7574 # Commands to make compiler produce verbose output that lists 7575 # what "hidden" libraries, object files and flags are used when 7576 # linking a shared library. 7577 # 7578 # There doesn't appear to be a way to prevent this compiler from 7579 # explicitly linking system object files so we need to strip them 7580 # from the output so that they don't get included in the library 7581 # dependencies. 7582 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"' 7583 ;; 7584 *) 7585 if test yes,no = "$GXX,$with_gnu_ld"; then 7586 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7587 case $host in 7588 osf3*) 7589 _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' 7590 ;; 7591 *) 7592 _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' 7593 ;; 7594 esac 7595 7596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7597 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7598 7599 # Commands to make compiler produce verbose output that lists 7600 # what "hidden" libraries, object files and flags are used when 7601 # linking a shared library. 7602 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7603 7604 else 7605 # FIXME: insert proper C++ library support 7606 _LT_TAGVAR(ld_shlibs, $1)=no 7607 fi 7608 ;; 7609 esac 7610 ;; 7611 7612 psos*) 7613 # FIXME: insert proper C++ library support 7614 _LT_TAGVAR(ld_shlibs, $1)=no 7615 ;; 7616 7617 sunos4*) 7618 case $cc_basename in 7619 CC*) 7620 # Sun C++ 4.x 7621 # FIXME: insert proper C++ library support 7622 _LT_TAGVAR(ld_shlibs, $1)=no 7623 ;; 7624 lcc*) 7625 # Lucid 7626 # FIXME: insert proper C++ library support 7627 _LT_TAGVAR(ld_shlibs, $1)=no 7628 ;; 7629 *) 7630 # FIXME: insert proper C++ library support 7631 _LT_TAGVAR(ld_shlibs, $1)=no 7632 ;; 7633 esac 7634 ;; 7635 7636 solaris*) 7637 case $cc_basename in 7638 CC* | sunCC*) 7639 # Sun C++ 4.2, 5.x and Centerline C++ 7640 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7641 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7642 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7643 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7644 $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' 7645 7646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7648 case $host_os in 7649 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7650 *) 7651 # The compiler driver will combine and reorder linker options, 7652 # but understands '-z linker_flag'. 7653 # Supported since Solaris 2.6 (maybe 2.5.1?) 7654 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7655 ;; 7656 esac 7657 _LT_TAGVAR(link_all_deplibs, $1)=yes 7658 7659 output_verbose_link_cmd='func_echo_all' 7660 7661 # Archives containing C++ object files must be created using 7662 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7663 # necessary to make sure instantiated templates are included 7664 # in the archive. 7665 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7666 ;; 7667 gcx*) 7668 # Green Hills C++ Compiler 7669 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7670 7671 # The C++ compiler must be used to create the archive. 7672 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7673 ;; 7674 *) 7675 # GNU C++ compiler with Solaris linker 7676 if test yes,no = "$GXX,$with_gnu_ld"; then 7677 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7678 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7679 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7680 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7681 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7682 7683 # Commands to make compiler produce verbose output that lists 7684 # what "hidden" libraries, object files and flags are used when 7685 # linking a shared library. 7686 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7687 else 7688 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7689 # platform. 7690 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7691 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7692 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7693 7694 # Commands to make compiler produce verbose output that lists 7695 # what "hidden" libraries, object files and flags are used when 7696 # linking a shared library. 7697 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7698 fi 7699 7700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7701 case $host_os in 7702 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7703 *) 7704 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7705 ;; 7706 esac 7707 fi 7708 ;; 7709 esac 7710 ;; 7711 7712 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7713 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7714 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7716 runpath_var='LD_RUN_PATH' 7717 7718 case $cc_basename in 7719 CC*) 7720 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7721 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7722 ;; 7723 *) 7724 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7725 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7726 ;; 7727 esac 7728 ;; 7729 7730 sysv5* | sco3.2v5* | sco5v6*) 7731 # Note: We CANNOT use -z defs as we might desire, because we do not 7732 # link with -lc, and that would cause any symbols used from libc to 7733 # always be unresolved, which means just about no library would 7734 # ever link correctly. If we're not using GNU ld we use -z text 7735 # though, which does catch some bad symbols but isn't as heavy-handed 7736 # as -z defs. 7737 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7738 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7739 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7740 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7742 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7743 _LT_TAGVAR(link_all_deplibs, $1)=yes 7744 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7745 runpath_var='LD_RUN_PATH' 7746 7747 case $cc_basename in 7748 CC*) 7749 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7750 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7751 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7752 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7753 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7754 '"$_LT_TAGVAR(reload_cmds, $1)" 7755 ;; 7756 *) 7757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7758 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7759 ;; 7760 esac 7761 ;; 7762 7763 tandem*) 7764 case $cc_basename in 7765 NCC*) 7766 # NonStop-UX NCC 3.20 7767 # FIXME: insert proper C++ library support 7768 _LT_TAGVAR(ld_shlibs, $1)=no 7769 ;; 7770 *) 7771 # FIXME: insert proper C++ library support 7772 _LT_TAGVAR(ld_shlibs, $1)=no 7773 ;; 7774 esac 7775 ;; 7776 7777 vxworks*) 7778 # FIXME: insert proper C++ library support 7779 _LT_TAGVAR(ld_shlibs, $1)=no 7780 ;; 7781 7782 *) 7783 # FIXME: insert proper C++ library support 7784 _LT_TAGVAR(ld_shlibs, $1)=no 7785 ;; 7786 esac 7787 7788 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7789 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7790 7791 _LT_TAGVAR(GCC, $1)=$GXX 7792 _LT_TAGVAR(LD, $1)=$LD 7793 7794 ## CAVEAT EMPTOR: 7795 ## There is no encapsulation within the following macros, do not change 7796 ## the running order or otherwise move them around unless you know exactly 7797 ## what you are doing... 7798 _LT_SYS_HIDDEN_LIBDEPS($1) 7799 _LT_COMPILER_PIC($1) 7800 _LT_COMPILER_C_O($1) 7801 _LT_COMPILER_FILE_LOCKS($1) 7802 _LT_LINKER_SHLIBS($1) 7803 _LT_SYS_DYNAMIC_LINKER($1) 7804 _LT_LINKER_HARDCODE_LIBPATH($1) 7805 7806 _LT_CONFIG($1) 7807 fi # test -n "$compiler" 7808 7809 CC=$lt_save_CC 7810 CFLAGS=$lt_save_CFLAGS 7811 LDCXX=$LD 7812 LD=$lt_save_LD 7813 GCC=$lt_save_GCC 7814 with_gnu_ld=$lt_save_with_gnu_ld 7815 lt_cv_path_LDCXX=$lt_cv_path_LD 7816 lt_cv_path_LD=$lt_save_path_LD 7817 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7818 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7819fi # test yes != "$_lt_caught_CXX_error" 7820 7821AC_LANG_POP 7822])# _LT_LANG_CXX_CONFIG 7823 7824 7825# _LT_FUNC_STRIPNAME_CNF 7826# ---------------------- 7827# func_stripname_cnf prefix suffix name 7828# strip PREFIX and SUFFIX off of NAME. 7829# PREFIX and SUFFIX must not contain globbing or regex special 7830# characters, hashes, percent signs, but SUFFIX may contain a leading 7831# dot (in which case that matches only a dot). 7832# 7833# This function is identical to the (non-XSI) version of func_stripname, 7834# except this one can be used by m4 code that may be executed by configure, 7835# rather than the libtool script. 7836m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7837AC_REQUIRE([_LT_DECL_SED]) 7838AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7839func_stripname_cnf () 7840{ 7841 case @S|@2 in 7842 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7843 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7844 esac 7845} # func_stripname_cnf 7846])# _LT_FUNC_STRIPNAME_CNF 7847 7848 7849# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7850# --------------------------------- 7851# Figure out "hidden" library dependencies from verbose 7852# compiler output when linking a shared library. 7853# Parse the compiler output and extract the necessary 7854# objects, libraries and library flags. 7855m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7856[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7857AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7858# Dependencies to place before and after the object being linked: 7859_LT_TAGVAR(predep_objects, $1)= 7860_LT_TAGVAR(postdep_objects, $1)= 7861_LT_TAGVAR(predeps, $1)= 7862_LT_TAGVAR(postdeps, $1)= 7863_LT_TAGVAR(compiler_lib_search_path, $1)= 7864 7865dnl we can't use the lt_simple_compile_test_code here, 7866dnl because it contains code intended for an executable, 7867dnl not a library. It's possible we should let each 7868dnl tag define a new lt_????_link_test_code variable, 7869dnl but it's only used here... 7870m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7871int a; 7872void foo (void) { a = 0; } 7873_LT_EOF 7874], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7875class Foo 7876{ 7877public: 7878 Foo (void) { a = 0; } 7879private: 7880 int a; 7881}; 7882_LT_EOF 7883], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7884 subroutine foo 7885 implicit none 7886 integer*4 a 7887 a=0 7888 return 7889 end 7890_LT_EOF 7891], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7892 subroutine foo 7893 implicit none 7894 integer a 7895 a=0 7896 return 7897 end 7898_LT_EOF 7899], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7900public class foo { 7901 private int a; 7902 public void bar (void) { 7903 a = 0; 7904 } 7905}; 7906_LT_EOF 7907], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7908package foo 7909func foo() { 7910} 7911_LT_EOF 7912]) 7913 7914_lt_libdeps_save_CFLAGS=$CFLAGS 7915case "$CC $CFLAGS " in #( 7916*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7917*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7918*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7919esac 7920 7921dnl Parse the compiler output and extract the necessary 7922dnl objects, libraries and library flags. 7923if AC_TRY_EVAL(ac_compile); then 7924 # Parse the compiler output and extract the necessary 7925 # objects, libraries and library flags. 7926 7927 # Sentinel used to keep track of whether or not we are before 7928 # the conftest object file. 7929 pre_test_object_deps_done=no 7930 7931 for p in `eval "$output_verbose_link_cmd"`; do 7932 case $prev$p in 7933 7934 -L* | -R* | -l*) 7935 # Some compilers place space between "-{L,R}" and the path. 7936 # Remove the space. 7937 if test x-L = "$p" || 7938 test x-R = "$p"; then 7939 prev=$p 7940 continue 7941 fi 7942 7943 # Expand the sysroot to ease extracting the directories later. 7944 if test -z "$prev"; then 7945 case $p in 7946 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7947 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7948 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7949 esac 7950 fi 7951 case $p in 7952 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7953 esac 7954 if test no = "$pre_test_object_deps_done"; then 7955 case $prev in 7956 -L | -R) 7957 # Internal compiler library paths should come after those 7958 # provided the user. The postdeps already come after the 7959 # user supplied libs so there is no need to process them. 7960 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7961 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7962 else 7963 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7964 fi 7965 ;; 7966 # The "-l" case would never come before the object being 7967 # linked, so don't bother handling this case. 7968 esac 7969 else 7970 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7971 _LT_TAGVAR(postdeps, $1)=$prev$p 7972 else 7973 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7974 fi 7975 fi 7976 prev= 7977 ;; 7978 7979 *.lto.$objext) ;; # Ignore GCC LTO objects 7980 *.$objext) 7981 # This assumes that the test object file only shows up 7982 # once in the compiler output. 7983 if test "$p" = "conftest.$objext"; then 7984 pre_test_object_deps_done=yes 7985 continue 7986 fi 7987 7988 if test no = "$pre_test_object_deps_done"; then 7989 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7990 _LT_TAGVAR(predep_objects, $1)=$p 7991 else 7992 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7993 fi 7994 else 7995 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7996 _LT_TAGVAR(postdep_objects, $1)=$p 7997 else 7998 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7999 fi 8000 fi 8001 ;; 8002 8003 *) ;; # Ignore the rest. 8004 8005 esac 8006 done 8007 8008 # Clean up. 8009 rm -f a.out a.exe 8010else 8011 echo "libtool.m4: error: problem compiling $1 test program" 8012fi 8013 8014$RM -f confest.$objext 8015CFLAGS=$_lt_libdeps_save_CFLAGS 8016 8017# PORTME: override above test on systems where it is broken 8018m4_if([$1], [CXX], 8019[case $host_os in 8020interix[[3-9]]*) 8021 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8022 # hack all around it, let's just trust "g++" to DTRT. 8023 _LT_TAGVAR(predep_objects,$1)= 8024 _LT_TAGVAR(postdep_objects,$1)= 8025 _LT_TAGVAR(postdeps,$1)= 8026 ;; 8027esac 8028]) 8029 8030case " $_LT_TAGVAR(postdeps, $1) " in 8031*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8032esac 8033 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8034if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8035 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 8036fi 8037_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8038 [The directories searched by this compiler when creating a shared library]) 8039_LT_TAGDECL([], [predep_objects], [1], 8040 [Dependencies to place before and after the objects being linked to 8041 create a shared library]) 8042_LT_TAGDECL([], [postdep_objects], [1]) 8043_LT_TAGDECL([], [predeps], [1]) 8044_LT_TAGDECL([], [postdeps], [1]) 8045_LT_TAGDECL([], [compiler_lib_search_path], [1], 8046 [The library search path used internally by the compiler when linking 8047 a shared library]) 8048])# _LT_SYS_HIDDEN_LIBDEPS 8049 8050 8051# _LT_LANG_F77_CONFIG([TAG]) 8052# -------------------------- 8053# Ensure that the configuration variables for a Fortran 77 compiler are 8054# suitably defined. These variables are subsequently used by _LT_CONFIG 8055# to write the compiler configuration to 'libtool'. 8056m4_defun([_LT_LANG_F77_CONFIG], 8057[AC_LANG_PUSH(Fortran 77) 8058if test -z "$F77" || test no = "$F77"; then 8059 _lt_disable_F77=yes 8060fi 8061 8062_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8063_LT_TAGVAR(allow_undefined_flag, $1)= 8064_LT_TAGVAR(always_export_symbols, $1)=no 8065_LT_TAGVAR(archive_expsym_cmds, $1)= 8066_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8067_LT_TAGVAR(hardcode_direct, $1)=no 8068_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8069_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8070_LT_TAGVAR(hardcode_libdir_separator, $1)= 8071_LT_TAGVAR(hardcode_minus_L, $1)=no 8072_LT_TAGVAR(hardcode_automatic, $1)=no 8073_LT_TAGVAR(inherit_rpath, $1)=no 8074_LT_TAGVAR(module_cmds, $1)= 8075_LT_TAGVAR(module_expsym_cmds, $1)= 8076_LT_TAGVAR(link_all_deplibs, $1)=unknown 8077_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8078_LT_TAGVAR(reload_flag, $1)=$reload_flag 8079_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8080_LT_TAGVAR(no_undefined_flag, $1)= 8081_LT_TAGVAR(whole_archive_flag_spec, $1)= 8082_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8083 8084# Source file extension for f77 test sources. 8085ac_ext=f 8086 8087# Object file extension for compiled f77 test sources. 8088objext=o 8089_LT_TAGVAR(objext, $1)=$objext 8090 8091# No sense in running all these tests if we already determined that 8092# the F77 compiler isn't working. Some variables (like enable_shared) 8093# are currently assumed to apply to all compilers on this platform, 8094# and will be corrupted by setting them based on a non-working compiler. 8095if test yes != "$_lt_disable_F77"; then 8096 # Code to be used in simple compile tests 8097 lt_simple_compile_test_code="\ 8098 subroutine t 8099 return 8100 end 8101" 8102 8103 # Code to be used in simple link tests 8104 lt_simple_link_test_code="\ 8105 program t 8106 end 8107" 8108 8109 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8110 _LT_TAG_COMPILER 8111 8112 # save warnings/boilerplate of simple test code 8113 _LT_COMPILER_BOILERPLATE 8114 _LT_LINKER_BOILERPLATE 8115 8116 # Allow CC to be a program name with arguments. 8117 lt_save_CC=$CC 8118 lt_save_GCC=$GCC 8119 lt_save_CFLAGS=$CFLAGS 8120 CC=${F77-"f77"} 8121 CFLAGS=$FFLAGS 8122 compiler=$CC 8123 _LT_TAGVAR(compiler, $1)=$CC 8124 _LT_CC_BASENAME([$compiler]) 8125 GCC=$G77 8126 if test -n "$compiler"; then 8127 AC_MSG_CHECKING([if libtool supports shared libraries]) 8128 AC_MSG_RESULT([$can_build_shared]) 8129 8130 AC_MSG_CHECKING([whether to build shared libraries]) 8131 test no = "$can_build_shared" && enable_shared=no 8132 8133 # On AIX, shared libraries and static libraries use the same namespace, and 8134 # are all built from PIC. 8135 case $host_os in 8136 aix3*) 8137 test yes = "$enable_shared" && enable_static=no 8138 if test -n "$RANLIB"; then 8139 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8140 postinstall_cmds='$RANLIB $lib' 8141 fi 8142 ;; 8143 aix[[4-9]]*) 8144 if test ia64 != "$host_cpu"; then 8145 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 8146 yes,aix,yes) ;; # shared object as lib.so file only 8147 yes,svr4,*) ;; # shared object as lib.so archive member only 8148 yes,*) enable_static=no ;; # shared object in lib.a archive as well 8149 esac 8150 fi 8151 ;; 8152 esac 8153 AC_MSG_RESULT([$enable_shared]) 8154 8155 AC_MSG_CHECKING([whether to build static libraries]) 8156 # Make sure either enable_shared or enable_static is yes. 8157 test yes = "$enable_shared" || enable_static=yes 8158 AC_MSG_RESULT([$enable_static]) 8159 8160 _LT_TAGVAR(GCC, $1)=$G77 8161 _LT_TAGVAR(LD, $1)=$LD 8162 8163 ## CAVEAT EMPTOR: 8164 ## There is no encapsulation within the following macros, do not change 8165 ## the running order or otherwise move them around unless you know exactly 8166 ## what you are doing... 8167 _LT_COMPILER_PIC($1) 8168 _LT_COMPILER_C_O($1) 8169 _LT_COMPILER_FILE_LOCKS($1) 8170 _LT_LINKER_SHLIBS($1) 8171 _LT_SYS_DYNAMIC_LINKER($1) 8172 _LT_LINKER_HARDCODE_LIBPATH($1) 8173 8174 _LT_CONFIG($1) 8175 fi # test -n "$compiler" 8176 8177 GCC=$lt_save_GCC 8178 CC=$lt_save_CC 8179 CFLAGS=$lt_save_CFLAGS 8180fi # test yes != "$_lt_disable_F77" 8181 8182AC_LANG_POP 8183])# _LT_LANG_F77_CONFIG 8184 8185 8186# _LT_LANG_FC_CONFIG([TAG]) 8187# ------------------------- 8188# Ensure that the configuration variables for a Fortran compiler are 8189# suitably defined. These variables are subsequently used by _LT_CONFIG 8190# to write the compiler configuration to 'libtool'. 8191m4_defun([_LT_LANG_FC_CONFIG], 8192[AC_LANG_PUSH(Fortran) 8193 8194if test -z "$FC" || test no = "$FC"; then 8195 _lt_disable_FC=yes 8196fi 8197 8198_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8199_LT_TAGVAR(allow_undefined_flag, $1)= 8200_LT_TAGVAR(always_export_symbols, $1)=no 8201_LT_TAGVAR(archive_expsym_cmds, $1)= 8202_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8203_LT_TAGVAR(hardcode_direct, $1)=no 8204_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8205_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8206_LT_TAGVAR(hardcode_libdir_separator, $1)= 8207_LT_TAGVAR(hardcode_minus_L, $1)=no 8208_LT_TAGVAR(hardcode_automatic, $1)=no 8209_LT_TAGVAR(inherit_rpath, $1)=no 8210_LT_TAGVAR(module_cmds, $1)= 8211_LT_TAGVAR(module_expsym_cmds, $1)= 8212_LT_TAGVAR(link_all_deplibs, $1)=unknown 8213_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8214_LT_TAGVAR(reload_flag, $1)=$reload_flag 8215_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8216_LT_TAGVAR(no_undefined_flag, $1)= 8217_LT_TAGVAR(whole_archive_flag_spec, $1)= 8218_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8219 8220# Source file extension for fc test sources. 8221ac_ext=${ac_fc_srcext-f} 8222 8223# Object file extension for compiled fc test sources. 8224objext=o 8225_LT_TAGVAR(objext, $1)=$objext 8226 8227# No sense in running all these tests if we already determined that 8228# the FC compiler isn't working. Some variables (like enable_shared) 8229# are currently assumed to apply to all compilers on this platform, 8230# and will be corrupted by setting them based on a non-working compiler. 8231if test yes != "$_lt_disable_FC"; then 8232 # Code to be used in simple compile tests 8233 lt_simple_compile_test_code="\ 8234 subroutine t 8235 return 8236 end 8237" 8238 8239 # Code to be used in simple link tests 8240 lt_simple_link_test_code="\ 8241 program t 8242 end 8243" 8244 8245 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8246 _LT_TAG_COMPILER 8247 8248 # save warnings/boilerplate of simple test code 8249 _LT_COMPILER_BOILERPLATE 8250 _LT_LINKER_BOILERPLATE 8251 8252 # Allow CC to be a program name with arguments. 8253 lt_save_CC=$CC 8254 lt_save_GCC=$GCC 8255 lt_save_CFLAGS=$CFLAGS 8256 CC=${FC-"f95"} 8257 CFLAGS=$FCFLAGS 8258 compiler=$CC 8259 GCC=$ac_cv_fc_compiler_gnu 8260 8261 _LT_TAGVAR(compiler, $1)=$CC 8262 _LT_CC_BASENAME([$compiler]) 8263 8264 if test -n "$compiler"; then 8265 AC_MSG_CHECKING([if libtool supports shared libraries]) 8266 AC_MSG_RESULT([$can_build_shared]) 8267 8268 AC_MSG_CHECKING([whether to build shared libraries]) 8269 test no = "$can_build_shared" && enable_shared=no 8270 8271 # On AIX, shared libraries and static libraries use the same namespace, and 8272 # are all built from PIC. 8273 case $host_os in 8274 aix3*) 8275 test yes = "$enable_shared" && enable_static=no 8276 if test -n "$RANLIB"; then 8277 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8278 postinstall_cmds='$RANLIB $lib' 8279 fi 8280 ;; 8281 aix[[4-9]]*) 8282 if test ia64 != "$host_cpu"; then 8283 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 8284 yes,aix,yes) ;; # shared object as lib.so file only 8285 yes,svr4,*) ;; # shared object as lib.so archive member only 8286 yes,*) enable_static=no ;; # shared object in lib.a archive as well 8287 esac 8288 fi 8289 ;; 8290 esac 8291 AC_MSG_RESULT([$enable_shared]) 8292 8293 AC_MSG_CHECKING([whether to build static libraries]) 8294 # Make sure either enable_shared or enable_static is yes. 8295 test yes = "$enable_shared" || enable_static=yes 8296 AC_MSG_RESULT([$enable_static]) 8297 8298 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 8299 _LT_TAGVAR(LD, $1)=$LD 8300 8301 ## CAVEAT EMPTOR: 8302 ## There is no encapsulation within the following macros, do not change 8303 ## the running order or otherwise move them around unless you know exactly 8304 ## what you are doing... 8305 _LT_SYS_HIDDEN_LIBDEPS($1) 8306 _LT_COMPILER_PIC($1) 8307 _LT_COMPILER_C_O($1) 8308 _LT_COMPILER_FILE_LOCKS($1) 8309 _LT_LINKER_SHLIBS($1) 8310 _LT_SYS_DYNAMIC_LINKER($1) 8311 _LT_LINKER_HARDCODE_LIBPATH($1) 8312 8313 _LT_CONFIG($1) 8314 fi # test -n "$compiler" 8315 8316 GCC=$lt_save_GCC 8317 CC=$lt_save_CC 8318 CFLAGS=$lt_save_CFLAGS 8319fi # test yes != "$_lt_disable_FC" 8320 8321AC_LANG_POP 8322])# _LT_LANG_FC_CONFIG 8323 8324 8325# _LT_LANG_GCJ_CONFIG([TAG]) 8326# -------------------------- 8327# Ensure that the configuration variables for the GNU Java Compiler compiler 8328# are suitably defined. These variables are subsequently used by _LT_CONFIG 8329# to write the compiler configuration to 'libtool'. 8330m4_defun([_LT_LANG_GCJ_CONFIG], 8331[AC_REQUIRE([LT_PROG_GCJ])dnl 8332AC_LANG_SAVE 8333 8334# Source file extension for Java test sources. 8335ac_ext=java 8336 8337# Object file extension for compiled Java test sources. 8338objext=o 8339_LT_TAGVAR(objext, $1)=$objext 8340 8341# Code to be used in simple compile tests 8342lt_simple_compile_test_code="class foo {}" 8343 8344# Code to be used in simple link tests 8345lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8346 8347# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8348_LT_TAG_COMPILER 8349 8350# save warnings/boilerplate of simple test code 8351_LT_COMPILER_BOILERPLATE 8352_LT_LINKER_BOILERPLATE 8353 8354# Allow CC to be a program name with arguments. 8355lt_save_CC=$CC 8356lt_save_CFLAGS=$CFLAGS 8357lt_save_GCC=$GCC 8358GCC=yes 8359CC=${GCJ-"gcj"} 8360CFLAGS=$GCJFLAGS 8361compiler=$CC 8362_LT_TAGVAR(compiler, $1)=$CC 8363_LT_TAGVAR(LD, $1)=$LD 8364_LT_CC_BASENAME([$compiler]) 8365 8366# GCJ did not exist at the time GCC didn't implicitly link libc in. 8367_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8368 8369_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8370_LT_TAGVAR(reload_flag, $1)=$reload_flag 8371_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8372 8373if test -n "$compiler"; then 8374 _LT_COMPILER_NO_RTTI($1) 8375 _LT_COMPILER_PIC($1) 8376 _LT_COMPILER_C_O($1) 8377 _LT_COMPILER_FILE_LOCKS($1) 8378 _LT_LINKER_SHLIBS($1) 8379 _LT_LINKER_HARDCODE_LIBPATH($1) 8380 8381 _LT_CONFIG($1) 8382fi 8383 8384AC_LANG_RESTORE 8385 8386GCC=$lt_save_GCC 8387CC=$lt_save_CC 8388CFLAGS=$lt_save_CFLAGS 8389])# _LT_LANG_GCJ_CONFIG 8390 8391 8392# _LT_LANG_GO_CONFIG([TAG]) 8393# -------------------------- 8394# Ensure that the configuration variables for the GNU Go compiler 8395# are suitably defined. These variables are subsequently used by _LT_CONFIG 8396# to write the compiler configuration to 'libtool'. 8397m4_defun([_LT_LANG_GO_CONFIG], 8398[AC_REQUIRE([LT_PROG_GO])dnl 8399AC_LANG_SAVE 8400 8401# Source file extension for Go test sources. 8402ac_ext=go 8403 8404# Object file extension for compiled Go test sources. 8405objext=o 8406_LT_TAGVAR(objext, $1)=$objext 8407 8408# Code to be used in simple compile tests 8409lt_simple_compile_test_code="package main; func main() { }" 8410 8411# Code to be used in simple link tests 8412lt_simple_link_test_code='package main; func main() { }' 8413 8414# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8415_LT_TAG_COMPILER 8416 8417# save warnings/boilerplate of simple test code 8418_LT_COMPILER_BOILERPLATE 8419_LT_LINKER_BOILERPLATE 8420 8421# Allow CC to be a program name with arguments. 8422lt_save_CC=$CC 8423lt_save_CFLAGS=$CFLAGS 8424lt_save_GCC=$GCC 8425GCC=yes 8426CC=${GOC-"gccgo"} 8427CFLAGS=$GOFLAGS 8428compiler=$CC 8429_LT_TAGVAR(compiler, $1)=$CC 8430_LT_TAGVAR(LD, $1)=$LD 8431_LT_CC_BASENAME([$compiler]) 8432 8433# Go did not exist at the time GCC didn't implicitly link libc in. 8434_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8435 8436_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8437_LT_TAGVAR(reload_flag, $1)=$reload_flag 8438_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8439 8440if test -n "$compiler"; then 8441 _LT_COMPILER_NO_RTTI($1) 8442 _LT_COMPILER_PIC($1) 8443 _LT_COMPILER_C_O($1) 8444 _LT_COMPILER_FILE_LOCKS($1) 8445 _LT_LINKER_SHLIBS($1) 8446 _LT_LINKER_HARDCODE_LIBPATH($1) 8447 8448 _LT_CONFIG($1) 8449fi 8450 8451AC_LANG_RESTORE 8452 8453GCC=$lt_save_GCC 8454CC=$lt_save_CC 8455CFLAGS=$lt_save_CFLAGS 8456])# _LT_LANG_GO_CONFIG 8457 8458 8459# _LT_LANG_RC_CONFIG([TAG]) 8460# ------------------------- 8461# Ensure that the configuration variables for the Windows resource compiler 8462# are suitably defined. These variables are subsequently used by _LT_CONFIG 8463# to write the compiler configuration to 'libtool'. 8464m4_defun([_LT_LANG_RC_CONFIG], 8465[AC_REQUIRE([LT_PROG_RC])dnl 8466AC_LANG_SAVE 8467 8468# Source file extension for RC test sources. 8469ac_ext=rc 8470 8471# Object file extension for compiled RC test sources. 8472objext=o 8473_LT_TAGVAR(objext, $1)=$objext 8474 8475# Code to be used in simple compile tests 8476lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8477 8478# Code to be used in simple link tests 8479lt_simple_link_test_code=$lt_simple_compile_test_code 8480 8481# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8482_LT_TAG_COMPILER 8483 8484# save warnings/boilerplate of simple test code 8485_LT_COMPILER_BOILERPLATE 8486_LT_LINKER_BOILERPLATE 8487 8488# Allow CC to be a program name with arguments. 8489lt_save_CC=$CC 8490lt_save_CFLAGS=$CFLAGS 8491lt_save_GCC=$GCC 8492GCC= 8493CC=${RC-"windres"} 8494CFLAGS= 8495compiler=$CC 8496_LT_TAGVAR(compiler, $1)=$CC 8497_LT_CC_BASENAME([$compiler]) 8498_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8499 8500if test -n "$compiler"; then 8501 : 8502 _LT_CONFIG($1) 8503fi 8504 8505GCC=$lt_save_GCC 8506AC_LANG_RESTORE 8507CC=$lt_save_CC 8508CFLAGS=$lt_save_CFLAGS 8509])# _LT_LANG_RC_CONFIG 8510 8511 8512# LT_PROG_GCJ 8513# ----------- 8514AC_DEFUN([LT_PROG_GCJ], 8515[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8516 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8517 [AC_CHECK_TOOL(GCJ, gcj,) 8518 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8519 AC_SUBST(GCJFLAGS)])])[]dnl 8520]) 8521 8522# Old name: 8523AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8524dnl aclocal-1.4 backwards compatibility: 8525dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8526 8527 8528# LT_PROG_GO 8529# ---------- 8530AC_DEFUN([LT_PROG_GO], 8531[AC_CHECK_TOOL(GOC, gccgo,) 8532]) 8533 8534 8535# LT_PROG_RC 8536# ---------- 8537AC_DEFUN([LT_PROG_RC], 8538[AC_CHECK_TOOL(RC, windres,) 8539]) 8540 8541# Old name: 8542AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8543dnl aclocal-1.4 backwards compatibility: 8544dnl AC_DEFUN([LT_AC_PROG_RC], []) 8545 8546 8547# _LT_DECL_EGREP 8548# -------------- 8549# If we don't have a new enough Autoconf to choose the best grep 8550# available, choose the one first in the user's PATH. 8551m4_defun([_LT_DECL_EGREP], 8552[AC_REQUIRE([AC_PROG_EGREP])dnl 8553AC_REQUIRE([AC_PROG_FGREP])dnl 8554test -z "$GREP" && GREP=grep 8555_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8556_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8557_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8558dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8559AC_SUBST([GREP]) 8560]) 8561 8562 8563# _LT_DECL_OBJDUMP 8564# -------------- 8565# If we don't have a new enough Autoconf to choose the best objdump 8566# available, choose the one first in the user's PATH. 8567m4_defun([_LT_DECL_OBJDUMP], 8568[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8569test -z "$OBJDUMP" && OBJDUMP=objdump 8570_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8571AC_SUBST([OBJDUMP]) 8572]) 8573 8574# _LT_DECL_DLLTOOL 8575# ---------------- 8576# Ensure DLLTOOL variable is set. 8577m4_defun([_LT_DECL_DLLTOOL], 8578[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8579test -z "$DLLTOOL" && DLLTOOL=dlltool 8580_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8581AC_SUBST([DLLTOOL]) 8582]) 8583 8584# _LT_DECL_SED 8585# ------------ 8586# Check for a fully-functional sed program, that truncates 8587# as few characters as possible. Prefer GNU sed if found. 8588m4_defun([_LT_DECL_SED], 8589[AC_PROG_SED 8590test -z "$SED" && SED=sed 8591Xsed="$SED -e 1s/^X//" 8592_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8593_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8594 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8595])# _LT_DECL_SED 8596 8597m4_ifndef([AC_PROG_SED], [ 8598# NOTE: This macro has been submitted for inclusion into # 8599# GNU Autoconf as AC_PROG_SED. When it is available in # 8600# a released version of Autoconf we should remove this # 8601# macro and use it instead. # 8602 8603m4_defun([AC_PROG_SED], 8604[AC_MSG_CHECKING([for a sed that does not truncate output]) 8605AC_CACHE_VAL(lt_cv_path_SED, 8606[# Loop through the user's path and test for sed and gsed. 8607# Then use that list of sed's as ones to test for truncation. 8608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8609for as_dir in $PATH 8610do 8611 IFS=$as_save_IFS 8612 test -z "$as_dir" && as_dir=. 8613 for lt_ac_prog in sed gsed; do 8614 for ac_exec_ext in '' $ac_executable_extensions; do 8615 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8616 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8617 fi 8618 done 8619 done 8620done 8621IFS=$as_save_IFS 8622lt_ac_max=0 8623lt_ac_count=0 8624# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8625# along with /bin/sed that truncates output. 8626for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8627 test ! -f "$lt_ac_sed" && continue 8628 cat /dev/null > conftest.in 8629 lt_ac_count=0 8630 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8631 # Check for GNU sed and select it if it is found. 8632 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8633 lt_cv_path_SED=$lt_ac_sed 8634 break 8635 fi 8636 while true; do 8637 cat conftest.in conftest.in >conftest.tmp 8638 mv conftest.tmp conftest.in 8639 cp conftest.in conftest.nl 8640 echo >>conftest.nl 8641 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8642 cmp -s conftest.out conftest.nl || break 8643 # 10000 chars as input seems more than enough 8644 test 10 -lt "$lt_ac_count" && break 8645 lt_ac_count=`expr $lt_ac_count + 1` 8646 if test "$lt_ac_count" -gt "$lt_ac_max"; then 8647 lt_ac_max=$lt_ac_count 8648 lt_cv_path_SED=$lt_ac_sed 8649 fi 8650 done 8651done 8652]) 8653SED=$lt_cv_path_SED 8654AC_SUBST([SED]) 8655AC_MSG_RESULT([$SED]) 8656])#AC_PROG_SED 8657])#m4_ifndef 8658 8659# Old name: 8660AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8661dnl aclocal-1.4 backwards compatibility: 8662dnl AC_DEFUN([LT_AC_PROG_SED], []) 8663 8664 8665# _LT_CHECK_SHELL_FEATURES 8666# ------------------------ 8667# Find out whether the shell is Bourne or XSI compatible, 8668# or has some other useful features. 8669m4_defun([_LT_CHECK_SHELL_FEATURES], 8670[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8671 lt_unset=unset 8672else 8673 lt_unset=false 8674fi 8675_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8676 8677# test EBCDIC or ASCII 8678case `echo X|tr X '\101'` in 8679 A) # ASCII based system 8680 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8681 lt_SP2NL='tr \040 \012' 8682 lt_NL2SP='tr \015\012 \040\040' 8683 ;; 8684 *) # EBCDIC based system 8685 lt_SP2NL='tr \100 \n' 8686 lt_NL2SP='tr \r\n \100\100' 8687 ;; 8688esac 8689_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8690_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8691])# _LT_CHECK_SHELL_FEATURES 8692 8693 8694# _LT_PATH_CONVERSION_FUNCTIONS 8695# ----------------------------- 8696# Determine what file name conversion functions should be used by 8697# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8698# for certain cross-compile configurations and native mingw. 8699m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8700[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8701AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8702AC_MSG_CHECKING([how to convert $build file names to $host format]) 8703AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8704[case $host in 8705 *-*-mingw* ) 8706 case $build in 8707 *-*-mingw* ) # actually msys 8708 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8709 ;; 8710 *-*-cygwin* ) 8711 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8712 ;; 8713 * ) # otherwise, assume *nix 8714 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8715 ;; 8716 esac 8717 ;; 8718 *-*-cygwin* ) 8719 case $build in 8720 *-*-mingw* ) # actually msys 8721 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8722 ;; 8723 *-*-cygwin* ) 8724 lt_cv_to_host_file_cmd=func_convert_file_noop 8725 ;; 8726 * ) # otherwise, assume *nix 8727 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8728 ;; 8729 esac 8730 ;; 8731 * ) # unhandled hosts (and "normal" native builds) 8732 lt_cv_to_host_file_cmd=func_convert_file_noop 8733 ;; 8734esac 8735]) 8736to_host_file_cmd=$lt_cv_to_host_file_cmd 8737AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8738_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8739 [0], [convert $build file names to $host format])dnl 8740 8741AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8742AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8743[#assume ordinary cross tools, or native build. 8744lt_cv_to_tool_file_cmd=func_convert_file_noop 8745case $host in 8746 *-*-mingw* ) 8747 case $build in 8748 *-*-mingw* ) # actually msys 8749 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8750 ;; 8751 esac 8752 ;; 8753esac 8754]) 8755to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8756AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8757_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8758 [0], [convert $build files to toolchain format])dnl 8759])# _LT_PATH_CONVERSION_FUNCTIONS 8760 8761# Helper functions for option handling. -*- Autoconf -*- 8762# 8763# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8764# Foundation, Inc. 8765# Written by Gary V. Vaughan, 2004 8766# 8767# This file is free software; the Free Software Foundation gives 8768# unlimited permission to copy and/or distribute it, with or without 8769# modifications, as long as this notice is preserved. 8770 8771# serial 8 ltoptions.m4 8772 8773# This is to help aclocal find these macros, as it can't see m4_define. 8774AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8775 8776 8777# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8778# ------------------------------------------ 8779m4_define([_LT_MANGLE_OPTION], 8780[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8781 8782 8783# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8784# --------------------------------------- 8785# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8786# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8787# saved as a flag. 8788m4_define([_LT_SET_OPTION], 8789[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8790m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8791 _LT_MANGLE_DEFUN([$1], [$2]), 8792 [m4_warning([Unknown $1 option '$2'])])[]dnl 8793]) 8794 8795 8796# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8797# ------------------------------------------------------------ 8798# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8799m4_define([_LT_IF_OPTION], 8800[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8801 8802 8803# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8804# ------------------------------------------------------- 8805# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8806# are set. 8807m4_define([_LT_UNLESS_OPTIONS], 8808[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8809 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8810 [m4_define([$0_found])])])[]dnl 8811m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8812])[]dnl 8813]) 8814 8815 8816# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8817# ---------------------------------------- 8818# OPTION-LIST is a space-separated list of Libtool options associated 8819# with MACRO-NAME. If any OPTION has a matching handler declared with 8820# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8821# the unknown option and exit. 8822m4_defun([_LT_SET_OPTIONS], 8823[# Set options 8824m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8825 [_LT_SET_OPTION([$1], _LT_Option)]) 8826 8827m4_if([$1],[LT_INIT],[ 8828 dnl 8829 dnl Simply set some default values (i.e off) if boolean options were not 8830 dnl specified: 8831 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8832 ]) 8833 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8834 ]) 8835 dnl 8836 dnl If no reference was made to various pairs of opposing options, then 8837 dnl we run the default mode handler for the pair. For example, if neither 8838 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8839 dnl archives by default: 8840 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8841 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8842 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8843 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8844 [_LT_ENABLE_FAST_INSTALL]) 8845 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8846 [_LT_WITH_AIX_SONAME([aix])]) 8847 ]) 8848])# _LT_SET_OPTIONS 8849 8850 8851 8852# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8853# ----------------------------------------- 8854m4_define([_LT_MANGLE_DEFUN], 8855[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8856 8857 8858# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8859# ----------------------------------------------- 8860m4_define([LT_OPTION_DEFINE], 8861[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8862])# LT_OPTION_DEFINE 8863 8864 8865# dlopen 8866# ------ 8867LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8868]) 8869 8870AU_DEFUN([AC_LIBTOOL_DLOPEN], 8871[_LT_SET_OPTION([LT_INIT], [dlopen]) 8872AC_DIAGNOSE([obsolete], 8873[$0: Remove this warning and the call to _LT_SET_OPTION when you 8874put the 'dlopen' option into LT_INIT's first parameter.]) 8875]) 8876 8877dnl aclocal-1.4 backwards compatibility: 8878dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8879 8880 8881# win32-dll 8882# --------- 8883# Declare package support for building win32 dll's. 8884LT_OPTION_DEFINE([LT_INIT], [win32-dll], 8885[enable_win32_dll=yes 8886 8887case $host in 8888*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8889 AC_CHECK_TOOL(AS, as, false) 8890 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8891 AC_CHECK_TOOL(OBJDUMP, objdump, false) 8892 ;; 8893esac 8894 8895test -z "$AS" && AS=as 8896_LT_DECL([], [AS], [1], [Assembler program])dnl 8897 8898test -z "$DLLTOOL" && DLLTOOL=dlltool 8899_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8900 8901test -z "$OBJDUMP" && OBJDUMP=objdump 8902_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8903])# win32-dll 8904 8905AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8906[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8907_LT_SET_OPTION([LT_INIT], [win32-dll]) 8908AC_DIAGNOSE([obsolete], 8909[$0: Remove this warning and the call to _LT_SET_OPTION when you 8910put the 'win32-dll' option into LT_INIT's first parameter.]) 8911]) 8912 8913dnl aclocal-1.4 backwards compatibility: 8914dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8915 8916 8917# _LT_ENABLE_SHARED([DEFAULT]) 8918# ---------------------------- 8919# implement the --enable-shared flag, and supports the 'shared' and 8920# 'disable-shared' LT_INIT options. 8921# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8922m4_define([_LT_ENABLE_SHARED], 8923[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8924AC_ARG_ENABLE([shared], 8925 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8926 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8927 [p=${PACKAGE-default} 8928 case $enableval in 8929 yes) enable_shared=yes ;; 8930 no) enable_shared=no ;; 8931 *) 8932 enable_shared=no 8933 # Look at the argument we got. We use all the common list separators. 8934 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8935 for pkg in $enableval; do 8936 IFS=$lt_save_ifs 8937 if test "X$pkg" = "X$p"; then 8938 enable_shared=yes 8939 fi 8940 done 8941 IFS=$lt_save_ifs 8942 ;; 8943 esac], 8944 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8945 8946 _LT_DECL([build_libtool_libs], [enable_shared], [0], 8947 [Whether or not to build shared libraries]) 8948])# _LT_ENABLE_SHARED 8949 8950LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8951LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8952 8953# Old names: 8954AC_DEFUN([AC_ENABLE_SHARED], 8955[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8956]) 8957 8958AC_DEFUN([AC_DISABLE_SHARED], 8959[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8960]) 8961 8962AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8963AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8964 8965dnl aclocal-1.4 backwards compatibility: 8966dnl AC_DEFUN([AM_ENABLE_SHARED], []) 8967dnl AC_DEFUN([AM_DISABLE_SHARED], []) 8968 8969 8970 8971# _LT_ENABLE_STATIC([DEFAULT]) 8972# ---------------------------- 8973# implement the --enable-static flag, and support the 'static' and 8974# 'disable-static' LT_INIT options. 8975# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8976m4_define([_LT_ENABLE_STATIC], 8977[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8978AC_ARG_ENABLE([static], 8979 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8980 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8981 [p=${PACKAGE-default} 8982 case $enableval in 8983 yes) enable_static=yes ;; 8984 no) enable_static=no ;; 8985 *) 8986 enable_static=no 8987 # Look at the argument we got. We use all the common list separators. 8988 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8989 for pkg in $enableval; do 8990 IFS=$lt_save_ifs 8991 if test "X$pkg" = "X$p"; then 8992 enable_static=yes 8993 fi 8994 done 8995 IFS=$lt_save_ifs 8996 ;; 8997 esac], 8998 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8999 9000 _LT_DECL([build_old_libs], [enable_static], [0], 9001 [Whether or not to build static libraries]) 9002])# _LT_ENABLE_STATIC 9003 9004LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9005LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9006 9007# Old names: 9008AC_DEFUN([AC_ENABLE_STATIC], 9009[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9010]) 9011 9012AC_DEFUN([AC_DISABLE_STATIC], 9013[_LT_SET_OPTION([LT_INIT], [disable-static]) 9014]) 9015 9016AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9017AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9018 9019dnl aclocal-1.4 backwards compatibility: 9020dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9021dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9022 9023 9024 9025# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9026# ---------------------------------- 9027# implement the --enable-fast-install flag, and support the 'fast-install' 9028# and 'disable-fast-install' LT_INIT options. 9029# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 9030m4_define([_LT_ENABLE_FAST_INSTALL], 9031[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9032AC_ARG_ENABLE([fast-install], 9033 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9034 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9035 [p=${PACKAGE-default} 9036 case $enableval in 9037 yes) enable_fast_install=yes ;; 9038 no) enable_fast_install=no ;; 9039 *) 9040 enable_fast_install=no 9041 # Look at the argument we got. We use all the common list separators. 9042 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9043 for pkg in $enableval; do 9044 IFS=$lt_save_ifs 9045 if test "X$pkg" = "X$p"; then 9046 enable_fast_install=yes 9047 fi 9048 done 9049 IFS=$lt_save_ifs 9050 ;; 9051 esac], 9052 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9053 9054_LT_DECL([fast_install], [enable_fast_install], [0], 9055 [Whether or not to optimize for fast installation])dnl 9056])# _LT_ENABLE_FAST_INSTALL 9057 9058LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9059LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9060 9061# Old names: 9062AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9063[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9064AC_DIAGNOSE([obsolete], 9065[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9066the 'fast-install' option into LT_INIT's first parameter.]) 9067]) 9068 9069AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9070[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9071AC_DIAGNOSE([obsolete], 9072[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9073the 'disable-fast-install' option into LT_INIT's first parameter.]) 9074]) 9075 9076dnl aclocal-1.4 backwards compatibility: 9077dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9078dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9079 9080 9081# _LT_WITH_AIX_SONAME([DEFAULT]) 9082# ---------------------------------- 9083# implement the --with-aix-soname flag, and support the `aix-soname=aix' 9084# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 9085# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 9086m4_define([_LT_WITH_AIX_SONAME], 9087[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 9088shared_archive_member_spec= 9089case $host,$enable_shared in 9090power*-*-aix[[5-9]]*,yes) 9091 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 9092 AC_ARG_WITH([aix-soname], 9093 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 9094 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 9095 [case $withval in 9096 aix|svr4|both) 9097 ;; 9098 *) 9099 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 9100 ;; 9101 esac 9102 lt_cv_with_aix_soname=$with_aix_soname], 9103 [AC_CACHE_VAL([lt_cv_with_aix_soname], 9104 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 9105 with_aix_soname=$lt_cv_with_aix_soname]) 9106 AC_MSG_RESULT([$with_aix_soname]) 9107 if test aix != "$with_aix_soname"; then 9108 # For the AIX way of multilib, we name the shared archive member 9109 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 9110 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 9111 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 9112 # the AIX toolchain works better with OBJECT_MODE set (default 32). 9113 if test 64 = "${OBJECT_MODE-32}"; then 9114 shared_archive_member_spec=shr_64 9115 else 9116 shared_archive_member_spec=shr 9117 fi 9118 fi 9119 ;; 9120*) 9121 with_aix_soname=aix 9122 ;; 9123esac 9124 9125_LT_DECL([], [shared_archive_member_spec], [0], 9126 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 9127])# _LT_WITH_AIX_SONAME 9128 9129LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 9130LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 9131LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 9132 9133 9134# _LT_WITH_PIC([MODE]) 9135# -------------------- 9136# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 9137# LT_INIT options. 9138# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 9139m4_define([_LT_WITH_PIC], 9140[AC_ARG_WITH([pic], 9141 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9142 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9143 [lt_p=${PACKAGE-default} 9144 case $withval in 9145 yes|no) pic_mode=$withval ;; 9146 *) 9147 pic_mode=default 9148 # Look at the argument we got. We use all the common list separators. 9149 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9150 for lt_pkg in $withval; do 9151 IFS=$lt_save_ifs 9152 if test "X$lt_pkg" = "X$lt_p"; then 9153 pic_mode=yes 9154 fi 9155 done 9156 IFS=$lt_save_ifs 9157 ;; 9158 esac], 9159 [pic_mode=m4_default([$1], [default])]) 9160 9161_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9162])# _LT_WITH_PIC 9163 9164LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9165LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9166 9167# Old name: 9168AU_DEFUN([AC_LIBTOOL_PICMODE], 9169[_LT_SET_OPTION([LT_INIT], [pic-only]) 9170AC_DIAGNOSE([obsolete], 9171[$0: Remove this warning and the call to _LT_SET_OPTION when you 9172put the 'pic-only' option into LT_INIT's first parameter.]) 9173]) 9174 9175dnl aclocal-1.4 backwards compatibility: 9176dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9177 9178 9179m4_define([_LTDL_MODE], []) 9180LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9181 [m4_define([_LTDL_MODE], [nonrecursive])]) 9182LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9183 [m4_define([_LTDL_MODE], [recursive])]) 9184LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9185 [m4_define([_LTDL_MODE], [subproject])]) 9186 9187m4_define([_LTDL_TYPE], []) 9188LT_OPTION_DEFINE([LTDL_INIT], [installable], 9189 [m4_define([_LTDL_TYPE], [installable])]) 9190LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9191 [m4_define([_LTDL_TYPE], [convenience])]) 9192 9193# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9194# 9195# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 9196# Foundation, Inc. 9197# Written by Gary V. Vaughan, 2004 9198# 9199# This file is free software; the Free Software Foundation gives 9200# unlimited permission to copy and/or distribute it, with or without 9201# modifications, as long as this notice is preserved. 9202 9203# serial 6 ltsugar.m4 9204 9205# This is to help aclocal find these macros, as it can't see m4_define. 9206AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9207 9208 9209# lt_join(SEP, ARG1, [ARG2...]) 9210# ----------------------------- 9211# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9212# associated separator. 9213# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9214# versions in m4sugar had bugs. 9215m4_define([lt_join], 9216[m4_if([$#], [1], [], 9217 [$#], [2], [[$2]], 9218 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9219m4_define([_lt_join], 9220[m4_if([$#$2], [2], [], 9221 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9222 9223 9224# lt_car(LIST) 9225# lt_cdr(LIST) 9226# ------------ 9227# Manipulate m4 lists. 9228# These macros are necessary as long as will still need to support 9229# Autoconf-2.59, which quotes differently. 9230m4_define([lt_car], [[$1]]) 9231m4_define([lt_cdr], 9232[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9233 [$#], 1, [], 9234 [m4_dquote(m4_shift($@))])]) 9235m4_define([lt_unquote], $1) 9236 9237 9238# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9239# ------------------------------------------ 9240# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 9241# Note that neither SEPARATOR nor STRING are expanded; they are appended 9242# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9243# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9244# than defined and empty). 9245# 9246# This macro is needed until we can rely on Autoconf 2.62, since earlier 9247# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9248m4_define([lt_append], 9249[m4_define([$1], 9250 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9251 9252 9253 9254# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9255# ---------------------------------------------------------- 9256# Produce a SEP delimited list of all paired combinations of elements of 9257# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9258# has the form PREFIXmINFIXSUFFIXn. 9259# Needed until we can rely on m4_combine added in Autoconf 2.62. 9260m4_define([lt_combine], 9261[m4_if(m4_eval([$# > 3]), [1], 9262 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9263[[m4_foreach([_Lt_prefix], [$2], 9264 [m4_foreach([_Lt_suffix], 9265 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9266 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9267 9268 9269# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9270# ----------------------------------------------------------------------- 9271# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9272# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9273m4_define([lt_if_append_uniq], 9274[m4_ifdef([$1], 9275 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9276 [lt_append([$1], [$2], [$3])$4], 9277 [$5])], 9278 [lt_append([$1], [$2], [$3])$4])]) 9279 9280 9281# lt_dict_add(DICT, KEY, VALUE) 9282# ----------------------------- 9283m4_define([lt_dict_add], 9284[m4_define([$1($2)], [$3])]) 9285 9286 9287# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9288# -------------------------------------------- 9289m4_define([lt_dict_add_subkey], 9290[m4_define([$1($2:$3)], [$4])]) 9291 9292 9293# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9294# ---------------------------------- 9295m4_define([lt_dict_fetch], 9296[m4_ifval([$3], 9297 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9298 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9299 9300 9301# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9302# ----------------------------------------------------------------- 9303m4_define([lt_if_dict_fetch], 9304[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9305 [$5], 9306 [$6])]) 9307 9308 9309# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9310# -------------------------------------------------------------- 9311m4_define([lt_dict_filter], 9312[m4_if([$5], [], [], 9313 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9314 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9315 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9316]) 9317 9318# ltversion.m4 -- version numbers -*- Autoconf -*- 9319# 9320# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 9321# Written by Scott James Remnant, 2004 9322# 9323# This file is free software; the Free Software Foundation gives 9324# unlimited permission to copy and/or distribute it, with or without 9325# modifications, as long as this notice is preserved. 9326 9327# @configure_input@ 9328 9329# serial 4179 ltversion.m4 9330# This file is part of GNU Libtool 9331 9332m4_define([LT_PACKAGE_VERSION], [2.4.6]) 9333m4_define([LT_PACKAGE_REVISION], [2.4.6]) 9334 9335AC_DEFUN([LTVERSION_VERSION], 9336[macro_version='2.4.6' 9337macro_revision='2.4.6' 9338_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9339_LT_DECL(, macro_revision, 0) 9340]) 9341 9342# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9343# 9344# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 9345# Foundation, Inc. 9346# Written by Scott James Remnant, 2004. 9347# 9348# This file is free software; the Free Software Foundation gives 9349# unlimited permission to copy and/or distribute it, with or without 9350# modifications, as long as this notice is preserved. 9351 9352# serial 5 lt~obsolete.m4 9353 9354# These exist entirely to fool aclocal when bootstrapping libtool. 9355# 9356# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 9357# which have later been changed to m4_define as they aren't part of the 9358# exported API, or moved to Autoconf or Automake where they belong. 9359# 9360# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9361# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9362# using a macro with the same name in our local m4/libtool.m4 it'll 9363# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9364# and doesn't know about Autoconf macros at all.) 9365# 9366# So we provide this file, which has a silly filename so it's always 9367# included after everything else. This provides aclocal with the 9368# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9369# because those macros already exist, or will be overwritten later. 9370# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9371# 9372# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9373# Yes, that means every name once taken will need to remain here until 9374# we give up compatibility with versions before 1.7, at which point 9375# we need to keep only those names which we still refer to. 9376 9377# This is to help aclocal find these macros, as it can't see m4_define. 9378AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9379 9380m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9381m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9382m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9383m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9384m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9385m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9386m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9387m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9388m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9389m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9390m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9391m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9392m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9393m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9394m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9395m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9396m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9397m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9398m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9399m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9400m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9401m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9402m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9403m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9404m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9405m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9406m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9407m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9408m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9409m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9410m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9411m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9412m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9413m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9414m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9415m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9416m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9417m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9418m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9419m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9420m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9421m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9422m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9423m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9424m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9425m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9426m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9427m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9428m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9429m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9430m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9431m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9432m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9433m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9434m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9435m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9436m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9437m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9438m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9439m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9440m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9441 9442dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9443dnl serial 11 (pkg-config-0.29) 9444dnl 9445dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9446dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9447dnl 9448dnl This program is free software; you can redistribute it and/or modify 9449dnl it under the terms of the GNU General Public License as published by 9450dnl the Free Software Foundation; either version 2 of the License, or 9451dnl (at your option) any later version. 9452dnl 9453dnl This program is distributed in the hope that it will be useful, but 9454dnl WITHOUT ANY WARRANTY; without even the implied warranty of 9455dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9456dnl General Public License for more details. 9457dnl 9458dnl You should have received a copy of the GNU General Public License 9459dnl along with this program; if not, write to the Free Software 9460dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9461dnl 02111-1307, USA. 9462dnl 9463dnl As a special exception to the GNU General Public License, if you 9464dnl distribute this file as part of a program that contains a 9465dnl configuration script generated by Autoconf, you may include it under 9466dnl the same distribution terms that you use for the rest of that 9467dnl program. 9468 9469dnl PKG_PREREQ(MIN-VERSION) 9470dnl ----------------------- 9471dnl Since: 0.29 9472dnl 9473dnl Verify that the version of the pkg-config macros are at least 9474dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9475dnl installed version of pkg-config, this checks the developer's version 9476dnl of pkg.m4 when generating configure. 9477dnl 9478dnl To ensure that this macro is defined, also add: 9479dnl m4_ifndef([PKG_PREREQ], 9480dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9481dnl 9482dnl See the "Since" comment for each macro you use to see what version 9483dnl of the macros you require. 9484m4_defun([PKG_PREREQ], 9485[m4_define([PKG_MACROS_VERSION], [0.29]) 9486m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9487 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9488])dnl PKG_PREREQ 9489 9490dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9491dnl ---------------------------------- 9492dnl Since: 0.16 9493dnl 9494dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9495dnl first found in the path. Checks that the version of pkg-config found 9496dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9497dnl used since that's the first version where most current features of 9498dnl pkg-config existed. 9499AC_DEFUN([PKG_PROG_PKG_CONFIG], 9500[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9501m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9502m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9503AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9504AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9505AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9506 9507if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9508 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9509fi 9510if test -n "$PKG_CONFIG"; then 9511 _pkg_min_version=m4_default([$1], [0.9.0]) 9512 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9513 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9514 AC_MSG_RESULT([yes]) 9515 else 9516 AC_MSG_RESULT([no]) 9517 PKG_CONFIG="" 9518 fi 9519fi[]dnl 9520])dnl PKG_PROG_PKG_CONFIG 9521 9522dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9523dnl ------------------------------------------------------------------- 9524dnl Since: 0.18 9525dnl 9526dnl Check to see whether a particular set of modules exists. Similar to 9527dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9528dnl 9529dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9530dnl only at the first occurence in configure.ac, so if the first place 9531dnl it's called might be skipped (such as if it is within an "if", you 9532dnl have to call PKG_CHECK_EXISTS manually 9533AC_DEFUN([PKG_CHECK_EXISTS], 9534[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9535if test -n "$PKG_CONFIG" && \ 9536 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9537 m4_default([$2], [:]) 9538m4_ifvaln([$3], [else 9539 $3])dnl 9540fi]) 9541 9542dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9543dnl --------------------------------------------- 9544dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9545dnl pkg_failed based on the result. 9546m4_define([_PKG_CONFIG], 9547[if test -n "$$1"; then 9548 pkg_cv_[]$1="$$1" 9549 elif test -n "$PKG_CONFIG"; then 9550 PKG_CHECK_EXISTS([$3], 9551 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9552 test "x$?" != "x0" && pkg_failed=yes ], 9553 [pkg_failed=yes]) 9554 else 9555 pkg_failed=untried 9556fi[]dnl 9557])dnl _PKG_CONFIG 9558 9559dnl _PKG_SHORT_ERRORS_SUPPORTED 9560dnl --------------------------- 9561dnl Internal check to see if pkg-config supports short errors. 9562AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9563[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9564if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9565 _pkg_short_errors_supported=yes 9566else 9567 _pkg_short_errors_supported=no 9568fi[]dnl 9569])dnl _PKG_SHORT_ERRORS_SUPPORTED 9570 9571 9572dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9573dnl [ACTION-IF-NOT-FOUND]) 9574dnl -------------------------------------------------------------- 9575dnl Since: 0.4.0 9576dnl 9577dnl Note that if there is a possibility the first call to 9578dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9579dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9580AC_DEFUN([PKG_CHECK_MODULES], 9581[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9582AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9583AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9584 9585pkg_failed=no 9586AC_MSG_CHECKING([for $1]) 9587 9588_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9589_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9590 9591m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9592and $1[]_LIBS to avoid the need to call pkg-config. 9593See the pkg-config man page for more details.]) 9594 9595if test $pkg_failed = yes; then 9596 AC_MSG_RESULT([no]) 9597 _PKG_SHORT_ERRORS_SUPPORTED 9598 if test $_pkg_short_errors_supported = yes; then 9599 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9600 else 9601 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9602 fi 9603 # Put the nasty error message in config.log where it belongs 9604 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9605 9606 m4_default([$4], [AC_MSG_ERROR( 9607[Package requirements ($2) were not met: 9608 9609$$1_PKG_ERRORS 9610 9611Consider adjusting the PKG_CONFIG_PATH environment variable if you 9612installed software in a non-standard prefix. 9613 9614_PKG_TEXT])[]dnl 9615 ]) 9616elif test $pkg_failed = untried; then 9617 AC_MSG_RESULT([no]) 9618 m4_default([$4], [AC_MSG_FAILURE( 9619[The pkg-config script could not be found or is too old. Make sure it 9620is in your PATH or set the PKG_CONFIG environment variable to the full 9621path to pkg-config. 9622 9623_PKG_TEXT 9624 9625To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9626 ]) 9627else 9628 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9629 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9630 AC_MSG_RESULT([yes]) 9631 $3 9632fi[]dnl 9633])dnl PKG_CHECK_MODULES 9634 9635 9636dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9637dnl [ACTION-IF-NOT-FOUND]) 9638dnl --------------------------------------------------------------------- 9639dnl Since: 0.29 9640dnl 9641dnl Checks for existence of MODULES and gathers its build flags with 9642dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9643dnl and VARIABLE-PREFIX_LIBS from --libs. 9644dnl 9645dnl Note that if there is a possibility the first call to 9646dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9647dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9648dnl configure.ac. 9649AC_DEFUN([PKG_CHECK_MODULES_STATIC], 9650[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9651_save_PKG_CONFIG=$PKG_CONFIG 9652PKG_CONFIG="$PKG_CONFIG --static" 9653PKG_CHECK_MODULES($@) 9654PKG_CONFIG=$_save_PKG_CONFIG[]dnl 9655])dnl PKG_CHECK_MODULES_STATIC 9656 9657 9658dnl PKG_INSTALLDIR([DIRECTORY]) 9659dnl ------------------------- 9660dnl Since: 0.27 9661dnl 9662dnl Substitutes the variable pkgconfigdir as the location where a module 9663dnl should install pkg-config .pc files. By default the directory is 9664dnl $libdir/pkgconfig, but the default can be changed by passing 9665dnl DIRECTORY. The user can override through the --with-pkgconfigdir 9666dnl parameter. 9667AC_DEFUN([PKG_INSTALLDIR], 9668[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9669m4_pushdef([pkg_description], 9670 [pkg-config installation directory @<:@]pkg_default[@:>@]) 9671AC_ARG_WITH([pkgconfigdir], 9672 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9673 [with_pkgconfigdir=]pkg_default) 9674AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9675m4_popdef([pkg_default]) 9676m4_popdef([pkg_description]) 9677])dnl PKG_INSTALLDIR 9678 9679 9680dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9681dnl -------------------------------- 9682dnl Since: 0.27 9683dnl 9684dnl Substitutes the variable noarch_pkgconfigdir as the location where a 9685dnl module should install arch-independent pkg-config .pc files. By 9686dnl default the directory is $datadir/pkgconfig, but the default can be 9687dnl changed by passing DIRECTORY. The user can override through the 9688dnl --with-noarch-pkgconfigdir parameter. 9689AC_DEFUN([PKG_NOARCH_INSTALLDIR], 9690[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9691m4_pushdef([pkg_description], 9692 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9693AC_ARG_WITH([noarch-pkgconfigdir], 9694 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9695 [with_noarch_pkgconfigdir=]pkg_default) 9696AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9697m4_popdef([pkg_default]) 9698m4_popdef([pkg_description]) 9699])dnl PKG_NOARCH_INSTALLDIR 9700 9701 9702dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9703dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9704dnl ------------------------------------------- 9705dnl Since: 0.28 9706dnl 9707dnl Retrieves the value of the pkg-config variable for the given module. 9708AC_DEFUN([PKG_CHECK_VAR], 9709[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9710AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9711 9712_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9713AS_VAR_COPY([$1], [pkg_cv_][$1]) 9714 9715AS_VAR_IF([$1], [""], [$5], [$4])dnl 9716])dnl PKG_CHECK_VAR 9717 9718dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9719dnl 9720dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9721dnl 9722dnl Permission is hereby granted, free of charge, to any person obtaining a 9723dnl copy of this software and associated documentation files (the "Software"), 9724dnl to deal in the Software without restriction, including without limitation 9725dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9726dnl and/or sell copies of the Software, and to permit persons to whom the 9727dnl Software is furnished to do so, subject to the following conditions: 9728dnl 9729dnl The above copyright notice and this permission notice (including the next 9730dnl paragraph) shall be included in all copies or substantial portions of the 9731dnl Software. 9732dnl 9733dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9734dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9735dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9736dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9737dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9738dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9739dnl DEALINGS IN THE SOFTWARE. 9740 9741# XORG_MACROS_VERSION(required-version) 9742# ------------------------------------- 9743# Minimum version: 1.1.0 9744# 9745# If you're using a macro added in Version 1.1 or newer, include this in 9746# your configure.ac with the minimum required version, such as: 9747# XORG_MACROS_VERSION(1.1) 9748# 9749# To ensure that this macro is defined, also add: 9750# m4_ifndef([XORG_MACROS_VERSION], 9751# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9752# 9753# 9754# See the "minimum version" comment for each macro you use to see what 9755# version you require. 9756m4_defun([XORG_MACROS_VERSION],[ 9757m4_define([vers_have], [1.19.0]) 9758m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9759m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9760m4_if(m4_cmp(maj_have, maj_needed), 0,, 9761 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9762m4_if(m4_version_compare(vers_have, [$1]), -1, 9763 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9764m4_undefine([vers_have]) 9765m4_undefine([maj_have]) 9766m4_undefine([maj_needed]) 9767]) # XORG_MACROS_VERSION 9768 9769# XORG_PROG_RAWCPP() 9770# ------------------ 9771# Minimum version: 1.0.0 9772# 9773# Find cpp program and necessary flags for use in pre-processing text files 9774# such as man pages and config files 9775AC_DEFUN([XORG_PROG_RAWCPP],[ 9776AC_REQUIRE([AC_PROG_CPP]) 9777AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9778 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9779 9780# Check for flag to avoid builtin definitions - assumes unix is predefined, 9781# which is not the best choice for supporting other OS'es, but covers most 9782# of the ones we need for now. 9783AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9784AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9785if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9786 AC_MSG_RESULT([no]) 9787else 9788 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9789 RAWCPPFLAGS=-undef 9790 AC_MSG_RESULT([yes]) 9791 # under Cygwin unix is still defined even with -undef 9792 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9793 RAWCPPFLAGS="-undef -ansi" 9794 AC_MSG_RESULT([yes, with -ansi]) 9795 else 9796 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9797 fi 9798fi 9799rm -f conftest.$ac_ext 9800 9801AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9802AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9803if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9804 AC_MSG_RESULT([no]) 9805else 9806 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9807 TRADITIONALCPPFLAGS="-traditional" 9808 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9809 AC_MSG_RESULT([yes]) 9810 else 9811 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9812 fi 9813fi 9814rm -f conftest.$ac_ext 9815AC_SUBST(RAWCPPFLAGS) 9816AC_SUBST(TRADITIONALCPPFLAGS) 9817]) # XORG_PROG_RAWCPP 9818 9819# XORG_MANPAGE_SECTIONS() 9820# ----------------------- 9821# Minimum version: 1.0.0 9822# 9823# Determine which sections man pages go in for the different man page types 9824# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9825# Not sure if there's any better way than just hardcoding by OS name. 9826# Override default settings by setting environment variables 9827# Added MAN_SUBSTS in version 1.8 9828# Added AC_PROG_SED in version 1.8 9829 9830AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9831AC_REQUIRE([AC_CANONICAL_HOST]) 9832AC_REQUIRE([AC_PROG_SED]) 9833 9834if test x$APP_MAN_SUFFIX = x ; then 9835 APP_MAN_SUFFIX=1 9836fi 9837if test x$APP_MAN_DIR = x ; then 9838 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9839fi 9840 9841if test x$LIB_MAN_SUFFIX = x ; then 9842 LIB_MAN_SUFFIX=3 9843fi 9844if test x$LIB_MAN_DIR = x ; then 9845 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9846fi 9847 9848if test x$FILE_MAN_SUFFIX = x ; then 9849 case $host_os in 9850 # Solaris 2.0 - 11 use SysV man page sections 9851 solaris2.?|solaris2.1[[01]]) FILE_MAN_SUFFIX=4 ;; 9852 *) FILE_MAN_SUFFIX=5 ;; 9853 esac 9854fi 9855if test x$FILE_MAN_DIR = x ; then 9856 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9857fi 9858 9859if test x$MISC_MAN_SUFFIX = x ; then 9860 case $host_os in 9861 # Solaris 2.0 - 11 use SysV man page sections 9862 solaris2.?|solaris2.1[[01]]) MISC_MAN_SUFFIX=5 ;; 9863 *) MISC_MAN_SUFFIX=7 ;; 9864 esac 9865fi 9866if test x$MISC_MAN_DIR = x ; then 9867 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9868fi 9869 9870if test x$DRIVER_MAN_SUFFIX = x ; then 9871 case $host_os in 9872 # Solaris 2.0 - 11 use SysV man page sections 9873 solaris2.?|solaris2.1[[01]]) DRIVER_MAN_SUFFIX=7 ;; 9874 *) DRIVER_MAN_SUFFIX=4 ;; 9875 esac 9876fi 9877if test x$DRIVER_MAN_DIR = x ; then 9878 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9879fi 9880 9881if test x$ADMIN_MAN_SUFFIX = x ; then 9882 case $host_os in 9883 # Solaris 2.0 - 11 use SysV man page sections 9884 solaris2.?|solaris2.1[[01]]) ADMIN_MAN_SUFFIX=1m ;; 9885 *) ADMIN_MAN_SUFFIX=8 ;; 9886 esac 9887fi 9888if test x$ADMIN_MAN_DIR = x ; then 9889 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9890fi 9891 9892 9893AC_SUBST([APP_MAN_SUFFIX]) 9894AC_SUBST([LIB_MAN_SUFFIX]) 9895AC_SUBST([FILE_MAN_SUFFIX]) 9896AC_SUBST([MISC_MAN_SUFFIX]) 9897AC_SUBST([DRIVER_MAN_SUFFIX]) 9898AC_SUBST([ADMIN_MAN_SUFFIX]) 9899AC_SUBST([APP_MAN_DIR]) 9900AC_SUBST([LIB_MAN_DIR]) 9901AC_SUBST([FILE_MAN_DIR]) 9902AC_SUBST([MISC_MAN_DIR]) 9903AC_SUBST([DRIVER_MAN_DIR]) 9904AC_SUBST([ADMIN_MAN_DIR]) 9905 9906XORG_MAN_PAGE="X Version 11" 9907AC_SUBST([XORG_MAN_PAGE]) 9908MAN_SUBSTS="\ 9909 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9910 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9911 -e 's|__xservername__|Xorg|g' \ 9912 -e 's|__xconfigfile__|xorg.conf|g' \ 9913 -e 's|__projectroot__|\$(prefix)|g' \ 9914 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9915 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9916 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9917 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9918 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9919 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9920 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9921AC_SUBST([MAN_SUBSTS]) 9922 9923]) # XORG_MANPAGE_SECTIONS 9924 9925# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9926# ------------------------ 9927# Minimum version: 1.7.0 9928# 9929# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9930# provided by xorg-sgml-doctools, if installed. 9931AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9932AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9933XORG_SGML_PATH= 9934PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9935 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9936 [m4_ifval([$1],[:], 9937 [if test x"$cross_compiling" != x"yes" ; then 9938 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9939 [XORG_SGML_PATH=$prefix/share/sgml]) 9940 fi]) 9941 ]) 9942 9943# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9944# the path and the name of the doc stylesheet 9945if test "x$XORG_SGML_PATH" != "x" ; then 9946 AC_MSG_RESULT([$XORG_SGML_PATH]) 9947 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9948 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9949else 9950 AC_MSG_RESULT([no]) 9951fi 9952 9953AC_SUBST(XORG_SGML_PATH) 9954AC_SUBST(STYLESHEET_SRCDIR) 9955AC_SUBST(XSL_STYLESHEET) 9956AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9957]) # XORG_CHECK_SGML_DOCTOOLS 9958 9959# XORG_CHECK_LINUXDOC 9960# ------------------- 9961# Minimum version: 1.0.0 9962# 9963# Defines the variable MAKE_TEXT if the necessary tools and 9964# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9965# Whether or not the necessary tools and files are found can be checked 9966# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9967AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9968AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9969AC_REQUIRE([XORG_WITH_PS2PDF]) 9970 9971AC_PATH_PROG(LINUXDOC, linuxdoc) 9972 9973AC_MSG_CHECKING([whether to build documentation]) 9974 9975if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9976 BUILDDOC=yes 9977else 9978 BUILDDOC=no 9979fi 9980 9981AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9982 9983AC_MSG_RESULT([$BUILDDOC]) 9984 9985AC_MSG_CHECKING([whether to build pdf documentation]) 9986 9987if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9988 BUILDPDFDOC=yes 9989else 9990 BUILDPDFDOC=no 9991fi 9992 9993AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9994 9995AC_MSG_RESULT([$BUILDPDFDOC]) 9996 9997MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9998MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9999MAKE_PDF="$PS2PDF" 10000MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10001 10002AC_SUBST(MAKE_TEXT) 10003AC_SUBST(MAKE_PS) 10004AC_SUBST(MAKE_PDF) 10005AC_SUBST(MAKE_HTML) 10006]) # XORG_CHECK_LINUXDOC 10007 10008# XORG_CHECK_DOCBOOK 10009# ------------------- 10010# Minimum version: 1.0.0 10011# 10012# Checks for the ability to build output formats from SGML DocBook source. 10013# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10014# indicates whether the necessary tools and files are found and, if set, 10015# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10016AC_DEFUN([XORG_CHECK_DOCBOOK],[ 10017AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10018 10019BUILDTXTDOC=no 10020BUILDPDFDOC=no 10021BUILDPSDOC=no 10022BUILDHTMLDOC=no 10023 10024AC_PATH_PROG(DOCBOOKPS, docbook2ps) 10025AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10026AC_PATH_PROG(DOCBOOKHTML, docbook2html) 10027AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10028 10029AC_MSG_CHECKING([whether to build text documentation]) 10030if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10031 test x$BUILD_TXTDOC != xno; then 10032 BUILDTXTDOC=yes 10033fi 10034AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10035AC_MSG_RESULT([$BUILDTXTDOC]) 10036 10037AC_MSG_CHECKING([whether to build PDF documentation]) 10038if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10039 test x$BUILD_PDFDOC != xno; then 10040 BUILDPDFDOC=yes 10041fi 10042AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10043AC_MSG_RESULT([$BUILDPDFDOC]) 10044 10045AC_MSG_CHECKING([whether to build PostScript documentation]) 10046if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10047 test x$BUILD_PSDOC != xno; then 10048 BUILDPSDOC=yes 10049fi 10050AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10051AC_MSG_RESULT([$BUILDPSDOC]) 10052 10053AC_MSG_CHECKING([whether to build HTML documentation]) 10054if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10055 test x$BUILD_HTMLDOC != xno; then 10056 BUILDHTMLDOC=yes 10057fi 10058AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10059AC_MSG_RESULT([$BUILDHTMLDOC]) 10060 10061MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10062MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10063MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10064MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10065 10066AC_SUBST(MAKE_TEXT) 10067AC_SUBST(MAKE_PS) 10068AC_SUBST(MAKE_PDF) 10069AC_SUBST(MAKE_HTML) 10070]) # XORG_CHECK_DOCBOOK 10071 10072# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10073# ---------------- 10074# Minimum version: 1.5.0 10075# Minimum version for optional DEFAULT argument: 1.11.0 10076# 10077# Documentation tools are not always available on all platforms and sometimes 10078# not at the appropriate level. This macro enables a module to test for the 10079# presence of the tool and obtain it's path in separate variables. Coupled with 10080# the --with-xmlto option, it allows maximum flexibilty in making decisions 10081# as whether or not to use the xmlto package. When DEFAULT is not specified, 10082# --with-xmlto assumes 'auto'. 10083# 10084# Interface to module: 10085# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10086# XMLTO: returns the path of the xmlto program found 10087# returns the path set by the user in the environment 10088# --with-xmlto: 'yes' user instructs the module to use xmlto 10089# 'no' user instructs the module not to use xmlto 10090# 10091# Added in version 1.10.0 10092# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10093# xmlto for text output requires either lynx, links, or w3m browsers 10094# 10095# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10096# 10097AC_DEFUN([XORG_WITH_XMLTO],[ 10098AC_ARG_VAR([XMLTO], [Path to xmlto command]) 10099m4_define([_defopt], m4_default([$2], [auto])) 10100AC_ARG_WITH(xmlto, 10101 AS_HELP_STRING([--with-xmlto], 10102 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10103 [use_xmlto=$withval], [use_xmlto=]_defopt) 10104m4_undefine([_defopt]) 10105 10106if test "x$use_xmlto" = x"auto"; then 10107 AC_PATH_PROG([XMLTO], [xmlto]) 10108 if test "x$XMLTO" = "x"; then 10109 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10110 have_xmlto=no 10111 else 10112 have_xmlto=yes 10113 fi 10114elif test "x$use_xmlto" = x"yes" ; then 10115 AC_PATH_PROG([XMLTO], [xmlto]) 10116 if test "x$XMLTO" = "x"; then 10117 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10118 fi 10119 have_xmlto=yes 10120elif test "x$use_xmlto" = x"no" ; then 10121 if test "x$XMLTO" != "x"; then 10122 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10123 fi 10124 have_xmlto=no 10125else 10126 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10127fi 10128 10129# Test for a minimum version of xmlto, if provided. 10130m4_ifval([$1], 10131[if test "$have_xmlto" = yes; then 10132 # scrape the xmlto version 10133 AC_MSG_CHECKING([the xmlto version]) 10134 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10135 AC_MSG_RESULT([$xmlto_version]) 10136 AS_VERSION_COMPARE([$xmlto_version], [$1], 10137 [if test "x$use_xmlto" = xauto; then 10138 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10139 have_xmlto=no 10140 else 10141 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10142 fi]) 10143fi]) 10144 10145# Test for the ability of xmlto to generate a text target 10146# 10147# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 10148# following test for empty XML docbook files. 10149# For compatibility reasons use the following empty XML docbook file and if 10150# it fails try it again with a non-empty XML file. 10151have_xmlto_text=no 10152cat > conftest.xml << "EOF" 10153EOF 10154AS_IF([test "$have_xmlto" = yes], 10155 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10156 [have_xmlto_text=yes], 10157 [# Try it again with a non-empty XML file. 10158 cat > conftest.xml << "EOF" 10159<x></x> 10160EOF 10161 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10162 [have_xmlto_text=yes], 10163 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 10164rm -f conftest.xml 10165AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10166AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10167]) # XORG_WITH_XMLTO 10168 10169# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10170# -------------------------------------------- 10171# Minimum version: 1.12.0 10172# Minimum version for optional DEFAULT argument: 1.12.0 10173# 10174# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10175# XML-based language used for the transformation of XML documents. 10176# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10177# It is used under the cover by xmlto to generate html files from DocBook/XML. 10178# The XSLT processor is often used as a standalone tool for transformations. 10179# It should not be assumed that this tool is used only to work with documnetation. 10180# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10181# 10182# Interface to module: 10183# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10184# XSLTPROC: returns the path of the xsltproc program found 10185# returns the path set by the user in the environment 10186# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10187# 'no' user instructs the module not to use xsltproc 10188# have_xsltproc: returns yes if xsltproc found in PATH or no 10189# 10190# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10191# 10192AC_DEFUN([XORG_WITH_XSLTPROC],[ 10193AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10194# Preserves the interface, should it be implemented later 10195m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10196m4_define([_defopt], m4_default([$2], [auto])) 10197AC_ARG_WITH(xsltproc, 10198 AS_HELP_STRING([--with-xsltproc], 10199 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10200 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10201m4_undefine([_defopt]) 10202 10203if test "x$use_xsltproc" = x"auto"; then 10204 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10205 if test "x$XSLTPROC" = "x"; then 10206 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10207 have_xsltproc=no 10208 else 10209 have_xsltproc=yes 10210 fi 10211elif test "x$use_xsltproc" = x"yes" ; then 10212 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10213 if test "x$XSLTPROC" = "x"; then 10214 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10215 fi 10216 have_xsltproc=yes 10217elif test "x$use_xsltproc" = x"no" ; then 10218 if test "x$XSLTPROC" != "x"; then 10219 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10220 fi 10221 have_xsltproc=no 10222else 10223 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10224fi 10225 10226AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10227]) # XORG_WITH_XSLTPROC 10228 10229# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10230# ---------------------------------------- 10231# Minimum version: 1.15.0 10232# 10233# PERL (Practical Extraction and Report Language) is a language optimized for 10234# scanning arbitrary text files, extracting information from those text files, 10235# and printing reports based on that information. 10236# 10237# When DEFAULT is not specified, --with-perl assumes 'auto'. 10238# 10239# Interface to module: 10240# HAVE_PERL: used in makefiles to conditionally scan text files 10241# PERL: returns the path of the perl program found 10242# returns the path set by the user in the environment 10243# --with-perl: 'yes' user instructs the module to use perl 10244# 'no' user instructs the module not to use perl 10245# have_perl: returns yes if perl found in PATH or no 10246# 10247# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10248# 10249AC_DEFUN([XORG_WITH_PERL],[ 10250AC_ARG_VAR([PERL], [Path to perl command]) 10251# Preserves the interface, should it be implemented later 10252m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10253m4_define([_defopt], m4_default([$2], [auto])) 10254AC_ARG_WITH(perl, 10255 AS_HELP_STRING([--with-perl], 10256 [Use perl for extracting information from files (default: ]_defopt[)]), 10257 [use_perl=$withval], [use_perl=]_defopt) 10258m4_undefine([_defopt]) 10259 10260if test "x$use_perl" = x"auto"; then 10261 AC_PATH_PROG([PERL], [perl]) 10262 if test "x$PERL" = "x"; then 10263 AC_MSG_WARN([perl not found - cannot extract information and report]) 10264 have_perl=no 10265 else 10266 have_perl=yes 10267 fi 10268elif test "x$use_perl" = x"yes" ; then 10269 AC_PATH_PROG([PERL], [perl]) 10270 if test "x$PERL" = "x"; then 10271 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10272 fi 10273 have_perl=yes 10274elif test "x$use_perl" = x"no" ; then 10275 if test "x$PERL" != "x"; then 10276 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10277 fi 10278 have_perl=no 10279else 10280 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10281fi 10282 10283AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10284]) # XORG_WITH_PERL 10285 10286# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10287# ---------------- 10288# Minimum version: 1.5.0 10289# Minimum version for optional DEFAULT argument: 1.11.0 10290# 10291# Documentation tools are not always available on all platforms and sometimes 10292# not at the appropriate level. This macro enables a module to test for the 10293# presence of the tool and obtain it's path in separate variables. Coupled with 10294# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10295# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10296# --with-asciidoc assumes 'auto'. 10297# 10298# Interface to module: 10299# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10300# ASCIIDOC: returns the path of the asciidoc program found 10301# returns the path set by the user in the environment 10302# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10303# 'no' user instructs the module not to use asciidoc 10304# 10305# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10306# 10307AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10308AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10309m4_define([_defopt], m4_default([$2], [auto])) 10310AC_ARG_WITH(asciidoc, 10311 AS_HELP_STRING([--with-asciidoc], 10312 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10313 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10314m4_undefine([_defopt]) 10315 10316if test "x$use_asciidoc" = x"auto"; then 10317 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10318 if test "x$ASCIIDOC" = "x"; then 10319 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10320 have_asciidoc=no 10321 else 10322 have_asciidoc=yes 10323 fi 10324elif test "x$use_asciidoc" = x"yes" ; then 10325 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10326 if test "x$ASCIIDOC" = "x"; then 10327 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10328 fi 10329 have_asciidoc=yes 10330elif test "x$use_asciidoc" = x"no" ; then 10331 if test "x$ASCIIDOC" != "x"; then 10332 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10333 fi 10334 have_asciidoc=no 10335else 10336 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10337fi 10338m4_ifval([$1], 10339[if test "$have_asciidoc" = yes; then 10340 # scrape the asciidoc version 10341 AC_MSG_CHECKING([the asciidoc version]) 10342 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10343 AC_MSG_RESULT([$asciidoc_version]) 10344 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10345 [if test "x$use_asciidoc" = xauto; then 10346 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10347 have_asciidoc=no 10348 else 10349 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10350 fi]) 10351fi]) 10352AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10353]) # XORG_WITH_ASCIIDOC 10354 10355# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10356# ------------------------------------------- 10357# Minimum version: 1.5.0 10358# Minimum version for optional DEFAULT argument: 1.11.0 10359# Minimum version for optional DOT checking: 1.18.0 10360# 10361# Documentation tools are not always available on all platforms and sometimes 10362# not at the appropriate level. This macro enables a module to test for the 10363# presence of the tool and obtain it's path in separate variables. Coupled with 10364# the --with-doxygen option, it allows maximum flexibilty in making decisions 10365# as whether or not to use the doxygen package. When DEFAULT is not specified, 10366# --with-doxygen assumes 'auto'. 10367# 10368# Interface to module: 10369# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10370# DOXYGEN: returns the path of the doxygen program found 10371# returns the path set by the user in the environment 10372# --with-doxygen: 'yes' user instructs the module to use doxygen 10373# 'no' user instructs the module not to use doxygen 10374# 10375# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10376# 10377AC_DEFUN([XORG_WITH_DOXYGEN],[ 10378AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10379AC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10380m4_define([_defopt], m4_default([$2], [auto])) 10381AC_ARG_WITH(doxygen, 10382 AS_HELP_STRING([--with-doxygen], 10383 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10384 [use_doxygen=$withval], [use_doxygen=]_defopt) 10385m4_undefine([_defopt]) 10386 10387if test "x$use_doxygen" = x"auto"; then 10388 AC_PATH_PROG([DOXYGEN], [doxygen]) 10389 if test "x$DOXYGEN" = "x"; then 10390 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10391 have_doxygen=no 10392 else 10393 have_doxygen=yes 10394 fi 10395elif test "x$use_doxygen" = x"yes" ; then 10396 AC_PATH_PROG([DOXYGEN], [doxygen]) 10397 if test "x$DOXYGEN" = "x"; then 10398 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10399 fi 10400 have_doxygen=yes 10401elif test "x$use_doxygen" = x"no" ; then 10402 if test "x$DOXYGEN" != "x"; then 10403 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10404 fi 10405 have_doxygen=no 10406else 10407 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10408fi 10409m4_ifval([$1], 10410[if test "$have_doxygen" = yes; then 10411 # scrape the doxygen version 10412 AC_MSG_CHECKING([the doxygen version]) 10413 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10414 AC_MSG_RESULT([$doxygen_version]) 10415 AS_VERSION_COMPARE([$doxygen_version], [$1], 10416 [if test "x$use_doxygen" = xauto; then 10417 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10418 have_doxygen=no 10419 else 10420 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10421 fi]) 10422fi]) 10423 10424dnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10425dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10426dnl HAVE_DOT = @HAVE_DOT@ 10427HAVE_DOT=no 10428if test "x$have_doxygen" = "xyes"; then 10429 AC_PATH_PROG([DOT], [dot]) 10430 if test "x$DOT" != "x"; then 10431 HAVE_DOT=yes 10432 fi 10433fi 10434 10435AC_SUBST([HAVE_DOT]) 10436AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10437AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10438]) # XORG_WITH_DOXYGEN 10439 10440# XORG_WITH_GROFF([DEFAULT]) 10441# ---------------- 10442# Minimum version: 1.6.0 10443# Minimum version for optional DEFAULT argument: 1.11.0 10444# 10445# Documentation tools are not always available on all platforms and sometimes 10446# not at the appropriate level. This macro enables a module to test for the 10447# presence of the tool and obtain it's path in separate variables. Coupled with 10448# the --with-groff option, it allows maximum flexibilty in making decisions 10449# as whether or not to use the groff package. When DEFAULT is not specified, 10450# --with-groff assumes 'auto'. 10451# 10452# Interface to module: 10453# HAVE_GROFF: used in makefiles to conditionally generate documentation 10454# HAVE_GROFF_MM: the memorandum macros (-mm) package 10455# HAVE_GROFF_MS: the -ms macros package 10456# GROFF: returns the path of the groff program found 10457# returns the path set by the user in the environment 10458# --with-groff: 'yes' user instructs the module to use groff 10459# 'no' user instructs the module not to use groff 10460# 10461# Added in version 1.9.0: 10462# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10463# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10464# psselect from the psutils package. 10465# the ghostcript package. Refer to the grohtml man pages 10466# 10467# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10468# 10469# OS and distros often splits groff in a basic and full package, the former 10470# having the groff program and the later having devices, fonts and macros 10471# Checking for the groff executable is not enough. 10472# 10473# If macros are missing, we cannot assume that groff is useless, so we don't 10474# unset HAVE_GROFF or GROFF env variables. 10475# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10476# 10477AC_DEFUN([XORG_WITH_GROFF],[ 10478AC_ARG_VAR([GROFF], [Path to groff command]) 10479m4_define([_defopt], m4_default([$1], [auto])) 10480AC_ARG_WITH(groff, 10481 AS_HELP_STRING([--with-groff], 10482 [Use groff to regenerate documentation (default: ]_defopt[)]), 10483 [use_groff=$withval], [use_groff=]_defopt) 10484m4_undefine([_defopt]) 10485 10486if test "x$use_groff" = x"auto"; then 10487 AC_PATH_PROG([GROFF], [groff]) 10488 if test "x$GROFF" = "x"; then 10489 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10490 have_groff=no 10491 else 10492 have_groff=yes 10493 fi 10494elif test "x$use_groff" = x"yes" ; then 10495 AC_PATH_PROG([GROFF], [groff]) 10496 if test "x$GROFF" = "x"; then 10497 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10498 fi 10499 have_groff=yes 10500elif test "x$use_groff" = x"no" ; then 10501 if test "x$GROFF" != "x"; then 10502 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10503 fi 10504 have_groff=no 10505else 10506 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10507fi 10508 10509# We have groff, test for the presence of the macro packages 10510if test "x$have_groff" = x"yes"; then 10511 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10512 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10513 groff_ms_works=yes 10514 else 10515 groff_ms_works=no 10516 fi 10517 AC_MSG_RESULT([$groff_ms_works]) 10518 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10519 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10520 groff_mm_works=yes 10521 else 10522 groff_mm_works=no 10523 fi 10524 AC_MSG_RESULT([$groff_mm_works]) 10525fi 10526 10527# We have groff, test for HTML dependencies, one command per package 10528if test "x$have_groff" = x"yes"; then 10529 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10530 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10531 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10532 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10533 have_groff_html=yes 10534 else 10535 have_groff_html=no 10536 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10537 fi 10538fi 10539 10540# Set Automake conditionals for Makefiles 10541AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10542AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10543AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10544AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10545]) # XORG_WITH_GROFF 10546 10547# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10548# --------------------------------------- 10549# Minimum version: 1.6.0 10550# Minimum version for optional DEFAULT argument: 1.11.0 10551# Minimum version for optional MIN-VERSION argument: 1.15.0 10552# 10553# Documentation tools are not always available on all platforms and sometimes 10554# not at the appropriate level. This macro enables a module to test for the 10555# presence of the tool and obtain it's path in separate variables. Coupled with 10556# the --with-fop option, it allows maximum flexibilty in making decisions 10557# as whether or not to use the fop package. When DEFAULT is not specified, 10558# --with-fop assumes 'auto'. 10559# 10560# Interface to module: 10561# HAVE_FOP: used in makefiles to conditionally generate documentation 10562# FOP: returns the path of the fop program found 10563# returns the path set by the user in the environment 10564# --with-fop: 'yes' user instructs the module to use fop 10565# 'no' user instructs the module not to use fop 10566# 10567# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10568# 10569AC_DEFUN([XORG_WITH_FOP],[ 10570AC_ARG_VAR([FOP], [Path to fop command]) 10571m4_define([_defopt], m4_default([$2], [auto])) 10572AC_ARG_WITH(fop, 10573 AS_HELP_STRING([--with-fop], 10574 [Use fop to regenerate documentation (default: ]_defopt[)]), 10575 [use_fop=$withval], [use_fop=]_defopt) 10576m4_undefine([_defopt]) 10577 10578if test "x$use_fop" = x"auto"; then 10579 AC_PATH_PROG([FOP], [fop]) 10580 if test "x$FOP" = "x"; then 10581 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10582 have_fop=no 10583 else 10584 have_fop=yes 10585 fi 10586elif test "x$use_fop" = x"yes" ; then 10587 AC_PATH_PROG([FOP], [fop]) 10588 if test "x$FOP" = "x"; then 10589 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10590 fi 10591 have_fop=yes 10592elif test "x$use_fop" = x"no" ; then 10593 if test "x$FOP" != "x"; then 10594 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10595 fi 10596 have_fop=no 10597else 10598 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10599fi 10600 10601# Test for a minimum version of fop, if provided. 10602m4_ifval([$1], 10603[if test "$have_fop" = yes; then 10604 # scrape the fop version 10605 AC_MSG_CHECKING([for fop minimum version]) 10606 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10607 AC_MSG_RESULT([$fop_version]) 10608 AS_VERSION_COMPARE([$fop_version], [$1], 10609 [if test "x$use_fop" = xauto; then 10610 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10611 have_fop=no 10612 else 10613 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10614 fi]) 10615fi]) 10616AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10617]) # XORG_WITH_FOP 10618 10619# XORG_WITH_M4([MIN-VERSION]) 10620# --------------------------- 10621# Minimum version: 1.19.0 10622# 10623# This macro attempts to locate an m4 macro processor which supports 10624# -I option and is only useful for modules relying on M4 in order to 10625# expand macros in source code files. 10626# 10627# Interface to module: 10628# M4: returns the path of the m4 program found 10629# returns the path set by the user in the environment 10630# 10631AC_DEFUN([XORG_WITH_M4], [ 10632AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10633 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10634 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10635 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10636 [AC_MSG_ERROR([could not find m4 that supports -I option])], 10637 [$PATH:/usr/gnu/bin])]) 10638 10639AC_SUBST([M4], [$ac_cv_path_M4]) 10640]) # XORG_WITH_M4 10641 10642# XORG_WITH_PS2PDF([DEFAULT]) 10643# ---------------- 10644# Minimum version: 1.6.0 10645# Minimum version for optional DEFAULT argument: 1.11.0 10646# 10647# Documentation tools are not always available on all platforms and sometimes 10648# not at the appropriate level. This macro enables a module to test for the 10649# presence of the tool and obtain it's path in separate variables. Coupled with 10650# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10651# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10652# --with-ps2pdf assumes 'auto'. 10653# 10654# Interface to module: 10655# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10656# PS2PDF: returns the path of the ps2pdf program found 10657# returns the path set by the user in the environment 10658# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10659# 'no' user instructs the module not to use ps2pdf 10660# 10661# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10662# 10663AC_DEFUN([XORG_WITH_PS2PDF],[ 10664AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10665m4_define([_defopt], m4_default([$1], [auto])) 10666AC_ARG_WITH(ps2pdf, 10667 AS_HELP_STRING([--with-ps2pdf], 10668 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10669 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10670m4_undefine([_defopt]) 10671 10672if test "x$use_ps2pdf" = x"auto"; then 10673 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10674 if test "x$PS2PDF" = "x"; then 10675 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10676 have_ps2pdf=no 10677 else 10678 have_ps2pdf=yes 10679 fi 10680elif test "x$use_ps2pdf" = x"yes" ; then 10681 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10682 if test "x$PS2PDF" = "x"; then 10683 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10684 fi 10685 have_ps2pdf=yes 10686elif test "x$use_ps2pdf" = x"no" ; then 10687 if test "x$PS2PDF" != "x"; then 10688 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10689 fi 10690 have_ps2pdf=no 10691else 10692 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10693fi 10694AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10695]) # XORG_WITH_PS2PDF 10696 10697# XORG_ENABLE_DOCS (enable_docs=yes) 10698# ---------------- 10699# Minimum version: 1.6.0 10700# 10701# Documentation tools are not always available on all platforms and sometimes 10702# not at the appropriate level. This macro enables a builder to skip all 10703# documentation targets except traditional man pages. 10704# Combined with the specific tool checking macros XORG_WITH_*, it provides 10705# maximum flexibilty in controlling documentation building. 10706# Refer to: 10707# XORG_WITH_XMLTO --with-xmlto 10708# XORG_WITH_ASCIIDOC --with-asciidoc 10709# XORG_WITH_DOXYGEN --with-doxygen 10710# XORG_WITH_FOP --with-fop 10711# XORG_WITH_GROFF --with-groff 10712# XORG_WITH_PS2PDF --with-ps2pdf 10713# 10714# Interface to module: 10715# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10716# --enable-docs: 'yes' user instructs the module to generate docs 10717# 'no' user instructs the module not to generate docs 10718# parm1: specify the default value, yes or no. 10719# 10720AC_DEFUN([XORG_ENABLE_DOCS],[ 10721m4_define([docs_default], m4_default([$1], [yes])) 10722AC_ARG_ENABLE(docs, 10723 AS_HELP_STRING([--enable-docs], 10724 [Enable building the documentation (default: ]docs_default[)]), 10725 [build_docs=$enableval], [build_docs=]docs_default) 10726m4_undefine([docs_default]) 10727AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10728AC_MSG_CHECKING([whether to build documentation]) 10729AC_MSG_RESULT([$build_docs]) 10730]) # XORG_ENABLE_DOCS 10731 10732# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10733# ---------------- 10734# Minimum version: 1.6.0 10735# 10736# This macro enables a builder to skip all developer documentation. 10737# Combined with the specific tool checking macros XORG_WITH_*, it provides 10738# maximum flexibilty in controlling documentation building. 10739# Refer to: 10740# XORG_WITH_XMLTO --with-xmlto 10741# XORG_WITH_ASCIIDOC --with-asciidoc 10742# XORG_WITH_DOXYGEN --with-doxygen 10743# XORG_WITH_FOP --with-fop 10744# XORG_WITH_GROFF --with-groff 10745# XORG_WITH_PS2PDF --with-ps2pdf 10746# 10747# Interface to module: 10748# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10749# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10750# 'no' user instructs the module not to generate developer docs 10751# parm1: specify the default value, yes or no. 10752# 10753AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10754m4_define([devel_default], m4_default([$1], [yes])) 10755AC_ARG_ENABLE(devel-docs, 10756 AS_HELP_STRING([--enable-devel-docs], 10757 [Enable building the developer documentation (default: ]devel_default[)]), 10758 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10759m4_undefine([devel_default]) 10760AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10761AC_MSG_CHECKING([whether to build developer documentation]) 10762AC_MSG_RESULT([$build_devel_docs]) 10763]) # XORG_ENABLE_DEVEL_DOCS 10764 10765# XORG_ENABLE_SPECS (enable_specs=yes) 10766# ---------------- 10767# Minimum version: 1.6.0 10768# 10769# This macro enables a builder to skip all functional specification targets. 10770# Combined with the specific tool checking macros XORG_WITH_*, it provides 10771# maximum flexibilty in controlling documentation building. 10772# Refer to: 10773# XORG_WITH_XMLTO --with-xmlto 10774# XORG_WITH_ASCIIDOC --with-asciidoc 10775# XORG_WITH_DOXYGEN --with-doxygen 10776# XORG_WITH_FOP --with-fop 10777# XORG_WITH_GROFF --with-groff 10778# XORG_WITH_PS2PDF --with-ps2pdf 10779# 10780# Interface to module: 10781# ENABLE_SPECS: used in makefiles to conditionally generate specs 10782# --enable-specs: 'yes' user instructs the module to generate specs 10783# 'no' user instructs the module not to generate specs 10784# parm1: specify the default value, yes or no. 10785# 10786AC_DEFUN([XORG_ENABLE_SPECS],[ 10787m4_define([spec_default], m4_default([$1], [yes])) 10788AC_ARG_ENABLE(specs, 10789 AS_HELP_STRING([--enable-specs], 10790 [Enable building the specs (default: ]spec_default[)]), 10791 [build_specs=$enableval], [build_specs=]spec_default) 10792m4_undefine([spec_default]) 10793AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10794AC_MSG_CHECKING([whether to build functional specifications]) 10795AC_MSG_RESULT([$build_specs]) 10796]) # XORG_ENABLE_SPECS 10797 10798# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10799# ---------------------------------------------- 10800# Minimum version: 1.13.0 10801# 10802# This macro enables a builder to enable/disable unit testing 10803# It makes no assumption about the test cases implementation 10804# Test cases may or may not use Automake "Support for test suites" 10805# They may or may not use the software utility library GLib 10806# 10807# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10808# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10809# The variable enable_unit_tests is used by other macros in this file. 10810# 10811# Interface to module: 10812# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10813# enable_unit_tests: used in configure.ac for additional configuration 10814# --enable-unit-tests: 'yes' user instructs the module to build tests 10815# 'no' user instructs the module not to build tests 10816# parm1: specify the default value, yes or no. 10817# 10818AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10819AC_BEFORE([$0], [XORG_WITH_GLIB]) 10820AC_BEFORE([$0], [XORG_LD_WRAP]) 10821AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10822m4_define([_defopt], m4_default([$1], [auto])) 10823AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10824 [Enable building unit test cases (default: ]_defopt[)]), 10825 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10826m4_undefine([_defopt]) 10827AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10828AC_MSG_CHECKING([whether to build unit test cases]) 10829AC_MSG_RESULT([$enable_unit_tests]) 10830]) # XORG_ENABLE_UNIT_TESTS 10831 10832# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10833# ------------------------------------------------------ 10834# Minimum version: 1.17.0 10835# 10836# This macro enables a builder to enable/disable integration testing 10837# It makes no assumption about the test cases' implementation 10838# Test cases may or may not use Automake "Support for test suites" 10839# 10840# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10841# usually requires less dependencies and may be built and run under less 10842# stringent environments than integration tests. 10843# 10844# Interface to module: 10845# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10846# enable_integration_tests: used in configure.ac for additional configuration 10847# --enable-integration-tests: 'yes' user instructs the module to build tests 10848# 'no' user instructs the module not to build tests 10849# parm1: specify the default value, yes or no. 10850# 10851AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10852AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10853m4_define([_defopt], m4_default([$1], [auto])) 10854AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10855 [Enable building integration test cases (default: ]_defopt[)]), 10856 [enable_integration_tests=$enableval], 10857 [enable_integration_tests=]_defopt) 10858m4_undefine([_defopt]) 10859AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10860 [test "x$enable_integration_tests" != xno]) 10861AC_MSG_CHECKING([whether to build unit test cases]) 10862AC_MSG_RESULT([$enable_integration_tests]) 10863]) # XORG_ENABLE_INTEGRATION_TESTS 10864 10865# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10866# ---------------------------------------- 10867# Minimum version: 1.13.0 10868# 10869# GLib is a library which provides advanced data structures and functions. 10870# This macro enables a module to test for the presence of Glib. 10871# 10872# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10873# Otherwise the value of $enable_unit_tests is blank. 10874# 10875# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10876# test support usually requires less dependencies and may be built and run under 10877# less stringent environments than integration tests. 10878# 10879# Interface to module: 10880# HAVE_GLIB: used in makefiles to conditionally build targets 10881# with_glib: used in configure.ac to know if GLib has been found 10882# --with-glib: 'yes' user instructs the module to use glib 10883# 'no' user instructs the module not to use glib 10884# 10885AC_DEFUN([XORG_WITH_GLIB],[ 10886AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10887m4_define([_defopt], m4_default([$2], [auto])) 10888AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10889 [Use GLib library for unit testing (default: ]_defopt[)]), 10890 [with_glib=$withval], [with_glib=]_defopt) 10891m4_undefine([_defopt]) 10892 10893have_glib=no 10894# Do not probe GLib if user explicitly disabled unit testing 10895if test "x$enable_unit_tests" != x"no"; then 10896 # Do not probe GLib if user explicitly disabled it 10897 if test "x$with_glib" != x"no"; then 10898 m4_ifval( 10899 [$1], 10900 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10901 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10902 ) 10903 fi 10904fi 10905 10906# Not having GLib when unit testing has been explicitly requested is an error 10907if test "x$enable_unit_tests" = x"yes"; then 10908 if test "x$have_glib" = x"no"; then 10909 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10910 fi 10911fi 10912 10913# Having unit testing disabled when GLib has been explicitly requested is an error 10914if test "x$enable_unit_tests" = x"no"; then 10915 if test "x$with_glib" = x"yes"; then 10916 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10917 fi 10918fi 10919 10920# Not having GLib when it has been explicitly requested is an error 10921if test "x$with_glib" = x"yes"; then 10922 if test "x$have_glib" = x"no"; then 10923 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10924 fi 10925fi 10926 10927AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10928]) # XORG_WITH_GLIB 10929 10930# XORG_LD_WRAP([required|optional]) 10931# --------------------------------- 10932# Minimum version: 1.13.0 10933# 10934# Check if linker supports -wrap, passed via compiler flags 10935# 10936# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10937# Otherwise the value of $enable_unit_tests is blank. 10938# 10939# Argument added in 1.16.0 - default is "required", to match existing behavior 10940# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10941# available, an argument of "optional" allows use when some unit tests require 10942# ld -wrap and others do not. 10943# 10944AC_DEFUN([XORG_LD_WRAP],[ 10945XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10946 [AC_LANG_PROGRAM([#include <stdlib.h> 10947 void __wrap_exit(int status) { return; }], 10948 [exit(0);])]) 10949# Not having ld wrap when unit testing has been explicitly requested is an error 10950if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10951 if test "x$have_ld_wrap" = x"no"; then 10952 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10953 fi 10954fi 10955AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10956# 10957]) # XORG_LD_WRAP 10958 10959# XORG_CHECK_LINKER_FLAGS 10960# ----------------------- 10961# SYNOPSIS 10962# 10963# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10964# 10965# DESCRIPTION 10966# 10967# Check whether the given linker FLAGS work with the current language's 10968# linker, or whether they give an error. 10969# 10970# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10971# success/failure. 10972# 10973# PROGRAM-SOURCE is the program source to link with, if needed 10974# 10975# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10976# 10977# LICENSE 10978# 10979# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10980# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10981# Copyright (c) 2009 Matteo Frigo 10982# 10983# This program is free software: you can redistribute it and/or modify it 10984# under the terms of the GNU General Public License as published by the 10985# Free Software Foundation, either version 3 of the License, or (at your 10986# option) any later version. 10987# 10988# This program is distributed in the hope that it will be useful, but 10989# WITHOUT ANY WARRANTY; without even the implied warranty of 10990# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10991# Public License for more details. 10992# 10993# You should have received a copy of the GNU General Public License along 10994# with this program. If not, see <http://www.gnu.org/licenses/>. 10995# 10996# As a special exception, the respective Autoconf Macro's copyright owner 10997# gives unlimited permission to copy, distribute and modify the configure 10998# scripts that are the output of Autoconf when processing the Macro. You 10999# need not follow the terms of the GNU General Public License when using 11000# or distributing such scripts, even though portions of the text of the 11001# Macro appear in them. The GNU General Public License (GPL) does govern 11002# all other use of the material that constitutes the Autoconf Macro. 11003# 11004# This special exception to the GPL applies to versions of the Autoconf 11005# Macro released by the Autoconf Archive. When you make and distribute a 11006# modified version of the Autoconf Macro, you may extend this special 11007# exception to the GPL to apply to your modified version as well.# 11008AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11009[AC_MSG_CHECKING([whether the linker accepts $1]) 11010dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11011AS_LITERAL_IF([$1], 11012 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11013 ax_save_FLAGS=$LDFLAGS 11014 LDFLAGS="$1" 11015 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11016 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11017 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11018 LDFLAGS=$ax_save_FLAGS])], 11019 [ax_save_FLAGS=$LDFLAGS 11020 LDFLAGS="$1" 11021 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11022 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11023 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11024 LDFLAGS=$ax_save_FLAGS]) 11025eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11026AC_MSG_RESULT($xorg_check_linker_flags) 11027if test "x$xorg_check_linker_flags" = xyes; then 11028 m4_default([$2], :) 11029else 11030 m4_default([$3], :) 11031fi 11032]) # XORG_CHECK_LINKER_FLAGS 11033 11034# XORG_MEMORY_CHECK_FLAGS 11035# ----------------------- 11036# Minimum version: 1.16.0 11037# 11038# This macro attempts to find appropriate memory checking functionality 11039# for various platforms which unit testing code may use to catch various 11040# forms of memory allocation and access errors in testing. 11041# 11042# Interface to module: 11043# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11044# Usually added to TESTS_ENVIRONMENT in Makefile.am 11045# 11046# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11047# 11048AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11049 11050AC_REQUIRE([AC_CANONICAL_HOST]) 11051AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11052 [Environment variables to enable memory checking in tests]) 11053 11054# Check for different types of support on different platforms 11055case $host_os in 11056 solaris*) 11057 AC_CHECK_LIB([umem], [umem_alloc], 11058 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11059 ;; 11060 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11061 # both directly and inverted, so should not be 0 or 255. 11062 malloc_debug_env='MALLOC_PERTURB_=15' 11063 ;; 11064 darwin*) 11065 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11066 ;; 11067 *bsd*) 11068 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11069 ;; 11070esac 11071 11072# User supplied flags override default flags 11073if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11074 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11075fi 11076 11077AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11078]) # XORG_WITH_LINT 11079 11080# XORG_CHECK_MALLOC_ZERO 11081# ---------------------- 11082# Minimum version: 1.0.0 11083# 11084# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11085# malloc(0) returns NULL. Packages should add one of these cflags to 11086# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11087AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11088AC_ARG_ENABLE(malloc0returnsnull, 11089 AS_HELP_STRING([--enable-malloc0returnsnull], 11090 [malloc(0) returns NULL (default: auto)]), 11091 [MALLOC_ZERO_RETURNS_NULL=$enableval], 11092 [MALLOC_ZERO_RETURNS_NULL=auto]) 11093 11094AC_MSG_CHECKING([whether malloc(0) returns NULL]) 11095if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11096AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11097 [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11098#include <stdlib.h> 11099],[ 11100 char *m0, *r0, *c0, *p; 11101 m0 = malloc(0); 11102 p = malloc(10); 11103 r0 = realloc(p,0); 11104 c0 = calloc(0,10); 11105 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11106])], 11107 [xorg_cv_malloc0_returns_null=yes], 11108 [xorg_cv_malloc0_returns_null=no])]) 11109MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11110fi 11111AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11112 11113if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11114 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11115 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11116 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11117else 11118 MALLOC_ZERO_CFLAGS="" 11119 XMALLOC_ZERO_CFLAGS="" 11120 XTMALLOC_ZERO_CFLAGS="" 11121fi 11122 11123AC_SUBST([MALLOC_ZERO_CFLAGS]) 11124AC_SUBST([XMALLOC_ZERO_CFLAGS]) 11125AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11126]) # XORG_CHECK_MALLOC_ZERO 11127 11128# XORG_WITH_LINT() 11129# ---------------- 11130# Minimum version: 1.1.0 11131# 11132# This macro enables the use of a tool that flags some suspicious and 11133# non-portable constructs (likely to be bugs) in C language source code. 11134# It will attempt to locate the tool and use appropriate options. 11135# There are various lint type tools on different platforms. 11136# 11137# Interface to module: 11138# LINT: returns the path to the tool found on the platform 11139# or the value set to LINT on the configure cmd line 11140# also an Automake conditional 11141# LINT_FLAGS: an Automake variable with appropriate flags 11142# 11143# --with-lint: 'yes' user instructs the module to use lint 11144# 'no' user instructs the module not to use lint (default) 11145# 11146# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11147# If the user sets the value of LINT_FLAGS, they are used verbatim. 11148# 11149AC_DEFUN([XORG_WITH_LINT],[ 11150 11151AC_ARG_VAR([LINT], [Path to a lint-style command]) 11152AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11153AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11154 [Use a lint-style source code checker (default: disabled)])], 11155 [use_lint=$withval], [use_lint=no]) 11156 11157# Obtain platform specific info like program name and options 11158# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11159case $host_os in 11160 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11161 lint_name=splint 11162 lint_options="-badflag" 11163 ;; 11164 *freebsd* | *netbsd*) 11165 lint_name=lint 11166 lint_options="-u -b" 11167 ;; 11168 *solaris*) 11169 lint_name=lint 11170 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11171 ;; 11172esac 11173 11174# Test for the presence of the program (either guessed by the code or spelled out by the user) 11175if test "x$use_lint" = x"yes" ; then 11176 AC_PATH_PROG([LINT], [$lint_name]) 11177 if test "x$LINT" = "x"; then 11178 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11179 fi 11180elif test "x$use_lint" = x"no" ; then 11181 if test "x$LINT" != "x"; then 11182 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11183 fi 11184else 11185 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11186fi 11187 11188# User supplied flags override default flags 11189if test "x$LINT_FLAGS" != "x"; then 11190 lint_options=$LINT_FLAGS 11191fi 11192 11193AC_SUBST([LINT_FLAGS],[$lint_options]) 11194AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11195 11196]) # XORG_WITH_LINT 11197 11198# XORG_LINT_LIBRARY(LIBNAME) 11199# -------------------------- 11200# Minimum version: 1.1.0 11201# 11202# Sets up flags for building lint libraries for checking programs that call 11203# functions in the library. 11204# 11205# Interface to module: 11206# LINTLIB - Automake variable with the name of lint library file to make 11207# MAKE_LINT_LIB - Automake conditional 11208# 11209# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11210# - 'no' user instructs the module not to create a lint library (default) 11211 11212AC_DEFUN([XORG_LINT_LIBRARY],[ 11213AC_REQUIRE([XORG_WITH_LINT]) 11214AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11215 [Create lint library (default: disabled)])], 11216 [make_lint_lib=$enableval], [make_lint_lib=no]) 11217 11218if test "x$make_lint_lib" = x"yes" ; then 11219 LINTLIB=llib-l$1.ln 11220 if test "x$LINT" = "x"; then 11221 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11222 fi 11223elif test "x$make_lint_lib" != x"no" ; then 11224 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11225fi 11226 11227AC_SUBST(LINTLIB) 11228AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11229 11230]) # XORG_LINT_LIBRARY 11231 11232# XORG_COMPILER_BRAND 11233# ------------------- 11234# Minimum version: 1.14.0 11235# 11236# Checks for various brands of compilers and sets flags as appropriate: 11237# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11238# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11239# clang compiler - sets CLANGCC to "yes" 11240# Intel compiler - sets INTELCC to "yes" 11241# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11242# 11243AC_DEFUN([XORG_COMPILER_BRAND], [ 11244AC_LANG_CASE( 11245 [C], [ 11246 AC_REQUIRE([AC_PROG_CC_C99]) 11247 ], 11248 [C++], [ 11249 AC_REQUIRE([AC_PROG_CXX]) 11250 ] 11251) 11252AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11253AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11254AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11255]) # XORG_COMPILER_BRAND 11256 11257# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11258# --------------- 11259# Minimum version: 1.16.0 11260# 11261# Test if the compiler works when passed the given flag as a command line argument. 11262# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11263# next flag in the list until there are no more options. 11264# 11265# Note that this does not guarantee that the compiler supports the flag as some 11266# compilers will simply ignore arguments that they do not understand, but we do 11267# attempt to weed out false positives by using -Werror=unknown-warning-option and 11268# -Werror=unused-command-line-argument 11269# 11270AC_DEFUN([XORG_TESTSET_CFLAG], [ 11271m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11272m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11273 11274AC_LANG_COMPILER_REQUIRE 11275 11276AC_LANG_CASE( 11277 [C], [ 11278 AC_REQUIRE([AC_PROG_CC_C99]) 11279 define([PREFIX], [C]) 11280 define([CACHE_PREFIX], [cc]) 11281 define([COMPILER], [$CC]) 11282 ], 11283 [C++], [ 11284 define([PREFIX], [CXX]) 11285 define([CACHE_PREFIX], [cxx]) 11286 define([COMPILER], [$CXX]) 11287 ] 11288) 11289 11290[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11291 11292if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11293 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11294 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11295 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11296 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11297 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11298 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11299 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11300 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11301fi 11302 11303if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11304 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11305 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11306 fi 11307 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11308 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11309 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11310 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11311 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11312 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11313 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11314 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11315fi 11316 11317found="no" 11318m4_foreach([flag], m4_cdr($@), [ 11319 if test $found = "no" ; then 11320 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11321 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11322 fi 11323 11324 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11325 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11326 fi 11327 11328 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11329 11330dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11331 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11332 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11333 AC_CACHE_VAL($cacheid, 11334 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11335 [eval $cacheid=yes], 11336 [eval $cacheid=no])]) 11337 11338 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11339 11340 eval supported=\$$cacheid 11341 AC_MSG_RESULT([$supported]) 11342 if test "$supported" = "yes" ; then 11343 $1="$$1 ]flag[" 11344 found="yes" 11345 fi 11346 fi 11347]) 11348]) # XORG_TESTSET_CFLAG 11349 11350# XORG_COMPILER_FLAGS 11351# --------------- 11352# Minimum version: 1.16.0 11353# 11354# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11355# arguments supported by the selected compiler which do NOT alter the generated 11356# code. These arguments will cause the compiler to print various warnings 11357# during compilation AND turn a conservative set of warnings into errors. 11358# 11359# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11360# future versions of util-macros as options are added to new compilers. 11361# 11362AC_DEFUN([XORG_COMPILER_FLAGS], [ 11363AC_REQUIRE([XORG_COMPILER_BRAND]) 11364 11365AC_ARG_ENABLE(selective-werror, 11366 AS_HELP_STRING([--disable-selective-werror], 11367 [Turn off selective compiler errors. (default: enabled)]), 11368 [SELECTIVE_WERROR=$enableval], 11369 [SELECTIVE_WERROR=yes]) 11370 11371AC_LANG_CASE( 11372 [C], [ 11373 define([PREFIX], [C]) 11374 ], 11375 [C++], [ 11376 define([PREFIX], [CXX]) 11377 ] 11378) 11379# -v is too short to test reliably with XORG_TESTSET_CFLAG 11380if test "x$SUNCC" = "xyes"; then 11381 [BASE_]PREFIX[FLAGS]="-v" 11382else 11383 [BASE_]PREFIX[FLAGS]="" 11384fi 11385 11386# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11387XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11388XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11389XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11390XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11391 11392AC_LANG_CASE( 11393 [C], [ 11394 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11395 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11396 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11397 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11398 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11399 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11400 ] 11401) 11402 11403# This chunk adds additional warnings that could catch undesired effects. 11404XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11405XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11406XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11407XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11408XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11409XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11410XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11411 11412# These are currently disabled because they are noisy. They will be enabled 11413# in the future once the codebase is sufficiently modernized to silence 11414# them. For now, I don't want them to drown out the other warnings. 11415# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11416# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11417# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11418 11419# Turn some warnings into errors, so we don't accidently get successful builds 11420# when there are problems that should be fixed. 11421 11422if test "x$SELECTIVE_WERROR" = "xyes" ; then 11423XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11424XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11425XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11426XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11427XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11428XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11429XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11430XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11431XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11432XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11433XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11434XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11435XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11436else 11437AC_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]) 11438XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11439XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11440XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11441XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11442XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11443XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11444XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11445XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11446XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11447XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11448XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11449XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11450XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11451fi 11452 11453AC_SUBST([BASE_]PREFIX[FLAGS]) 11454]) # XORG_COMPILER_FLAGS 11455 11456# XORG_CWARNFLAGS 11457# --------------- 11458# Minimum version: 1.2.0 11459# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11460# 11461# Defines CWARNFLAGS to enable C compiler warnings. 11462# 11463# This function is deprecated because it defines -fno-strict-aliasing 11464# which alters the code generated by the compiler. If -fno-strict-aliasing 11465# is needed, then it should be added explicitly in the module when 11466# it is updated to use BASE_CFLAGS. 11467# 11468AC_DEFUN([XORG_CWARNFLAGS], [ 11469AC_REQUIRE([XORG_COMPILER_FLAGS]) 11470AC_REQUIRE([XORG_COMPILER_BRAND]) 11471AC_LANG_CASE( 11472 [C], [ 11473 CWARNFLAGS="$BASE_CFLAGS" 11474 if test "x$GCC" = xyes ; then 11475 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11476 fi 11477 AC_SUBST(CWARNFLAGS) 11478 ] 11479) 11480]) # XORG_CWARNFLAGS 11481 11482# XORG_STRICT_OPTION 11483# ----------------------- 11484# Minimum version: 1.3.0 11485# 11486# Add configure option to enable strict compilation flags, such as treating 11487# warnings as fatal errors. 11488# If --enable-strict-compilation is passed to configure, adds strict flags to 11489# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11490# 11491# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11492# when strict compilation is unconditionally desired. 11493AC_DEFUN([XORG_STRICT_OPTION], [ 11494AC_REQUIRE([XORG_CWARNFLAGS]) 11495AC_REQUIRE([XORG_COMPILER_FLAGS]) 11496 11497AC_ARG_ENABLE(strict-compilation, 11498 AS_HELP_STRING([--enable-strict-compilation], 11499 [Enable all warnings from compiler and make them errors (default: disabled)]), 11500 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11501 11502AC_LANG_CASE( 11503 [C], [ 11504 define([PREFIX], [C]) 11505 ], 11506 [C++], [ 11507 define([PREFIX], [CXX]) 11508 ] 11509) 11510 11511[STRICT_]PREFIX[FLAGS]="" 11512XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11513XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11514 11515# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11516# activate it with -Werror, so we add it here explicitly. 11517XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11518 11519if test "x$STRICT_COMPILE" = "xyes"; then 11520 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11521 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11522fi 11523AC_SUBST([STRICT_]PREFIX[FLAGS]) 11524AC_SUBST([BASE_]PREFIX[FLAGS]) 11525AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11526]) # XORG_STRICT_OPTION 11527 11528# XORG_DEFAULT_OPTIONS 11529# -------------------- 11530# Minimum version: 1.3.0 11531# 11532# Defines default options for X.Org modules. 11533# 11534AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11535AC_REQUIRE([AC_PROG_INSTALL]) 11536XORG_COMPILER_FLAGS 11537XORG_CWARNFLAGS 11538XORG_STRICT_OPTION 11539XORG_RELEASE_VERSION 11540XORG_CHANGELOG 11541XORG_INSTALL 11542XORG_MANPAGE_SECTIONS 11543m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11544 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11545]) # XORG_DEFAULT_OPTIONS 11546 11547# XORG_INSTALL() 11548# ---------------- 11549# Minimum version: 1.4.0 11550# 11551# Defines the variable INSTALL_CMD as the command to copy 11552# INSTALL from $prefix/share/util-macros. 11553# 11554AC_DEFUN([XORG_INSTALL], [ 11555AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11556macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11557INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11558mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11559|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11560echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11561AC_SUBST([INSTALL_CMD]) 11562]) # XORG_INSTALL 11563dnl Copyright 2005 Red Hat, Inc 11564dnl 11565dnl Permission to use, copy, modify, distribute, and sell this software and its 11566dnl documentation for any purpose is hereby granted without fee, provided that 11567dnl the above copyright notice appear in all copies and that both that 11568dnl copyright notice and this permission notice appear in supporting 11569dnl documentation. 11570dnl 11571dnl The above copyright notice and this permission notice shall be included 11572dnl in all copies or substantial portions of the Software. 11573dnl 11574dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11575dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11576dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11577dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11578dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11579dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11580dnl OTHER DEALINGS IN THE SOFTWARE. 11581dnl 11582dnl Except as contained in this notice, the name of the copyright holders shall 11583dnl not be used in advertising or otherwise to promote the sale, use or 11584dnl other dealings in this Software without prior written authorization 11585dnl from the copyright holders. 11586dnl 11587 11588# XORG_RELEASE_VERSION 11589# -------------------- 11590# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11591 11592AC_DEFUN([XORG_RELEASE_VERSION],[ 11593 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11594 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11595 [Major version of this package]) 11596 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11597 if test "x$PVM" = "x"; then 11598 PVM="0" 11599 fi 11600 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11601 [$PVM], 11602 [Minor version of this package]) 11603 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11604 if test "x$PVP" = "x"; then 11605 PVP="0" 11606 fi 11607 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11608 [$PVP], 11609 [Patch version of this package]) 11610]) 11611 11612# XORG_CHANGELOG() 11613# ---------------- 11614# Minimum version: 1.2.0 11615# 11616# Defines the variable CHANGELOG_CMD as the command to generate 11617# ChangeLog from git. 11618# 11619# 11620AC_DEFUN([XORG_CHANGELOG], [ 11621CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11622mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11623|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11624echo 'git directory not found: installing possibly empty changelog.' >&2)" 11625AC_SUBST([CHANGELOG_CMD]) 11626]) # XORG_CHANGELOG 11627 11628# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11629# 11630# This file is free software; the Free Software Foundation 11631# gives unlimited permission to copy and/or distribute it, 11632# with or without modifications, as long as this notice is preserved. 11633 11634# AM_AUTOMAKE_VERSION(VERSION) 11635# ---------------------------- 11636# Automake X.Y traces this macro to ensure aclocal.m4 has been 11637# generated from the m4 files accompanying Automake X.Y. 11638# (This private macro should not be called outside this file.) 11639AC_DEFUN([AM_AUTOMAKE_VERSION], 11640[am__api_version='1.15' 11641dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11642dnl require some minimum version. Point them to the right macro. 11643m4_if([$1], [1.15], [], 11644 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11645]) 11646 11647# _AM_AUTOCONF_VERSION(VERSION) 11648# ----------------------------- 11649# aclocal traces this macro to find the Autoconf version. 11650# This is a private macro too. Using m4_define simplifies 11651# the logic in aclocal, which can simply ignore this definition. 11652m4_define([_AM_AUTOCONF_VERSION], []) 11653 11654# AM_SET_CURRENT_AUTOMAKE_VERSION 11655# ------------------------------- 11656# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11657# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11658AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11659[AM_AUTOMAKE_VERSION([1.15])dnl 11660m4_ifndef([AC_AUTOCONF_VERSION], 11661 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11662_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11663 11664# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11665 11666# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11667# 11668# This file is free software; the Free Software Foundation 11669# gives unlimited permission to copy and/or distribute it, 11670# with or without modifications, as long as this notice is preserved. 11671 11672# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11673# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11674# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11675# 11676# Of course, Automake must honor this variable whenever it calls a 11677# tool from the auxiliary directory. The problem is that $srcdir (and 11678# therefore $ac_aux_dir as well) can be either absolute or relative, 11679# depending on how configure is run. This is pretty annoying, since 11680# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11681# source directory, any form will work fine, but in subdirectories a 11682# relative path needs to be adjusted first. 11683# 11684# $ac_aux_dir/missing 11685# fails when called from a subdirectory if $ac_aux_dir is relative 11686# $top_srcdir/$ac_aux_dir/missing 11687# fails if $ac_aux_dir is absolute, 11688# fails when called from a subdirectory in a VPATH build with 11689# a relative $ac_aux_dir 11690# 11691# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11692# are both prefixed by $srcdir. In an in-source build this is usually 11693# harmless because $srcdir is '.', but things will broke when you 11694# start a VPATH build or use an absolute $srcdir. 11695# 11696# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11697# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11698# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11699# and then we would define $MISSING as 11700# MISSING="\${SHELL} $am_aux_dir/missing" 11701# This will work as long as MISSING is not called from configure, because 11702# unfortunately $(top_srcdir) has no meaning in configure. 11703# However there are other variables, like CC, which are often used in 11704# configure, and could therefore not use this "fixed" $ac_aux_dir. 11705# 11706# Another solution, used here, is to always expand $ac_aux_dir to an 11707# absolute PATH. The drawback is that using absolute paths prevent a 11708# configured tree to be moved without reconfiguration. 11709 11710AC_DEFUN([AM_AUX_DIR_EXPAND], 11711[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11712# Expand $ac_aux_dir to an absolute path. 11713am_aux_dir=`cd "$ac_aux_dir" && pwd` 11714]) 11715 11716# AM_CONDITIONAL -*- Autoconf -*- 11717 11718# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11719# 11720# This file is free software; the Free Software Foundation 11721# gives unlimited permission to copy and/or distribute it, 11722# with or without modifications, as long as this notice is preserved. 11723 11724# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11725# ------------------------------------- 11726# Define a conditional. 11727AC_DEFUN([AM_CONDITIONAL], 11728[AC_PREREQ([2.52])dnl 11729 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11730 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11731AC_SUBST([$1_TRUE])dnl 11732AC_SUBST([$1_FALSE])dnl 11733_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11734_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11735m4_define([_AM_COND_VALUE_$1], [$2])dnl 11736if $2; then 11737 $1_TRUE= 11738 $1_FALSE='#' 11739else 11740 $1_TRUE='#' 11741 $1_FALSE= 11742fi 11743AC_CONFIG_COMMANDS_PRE( 11744[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11745 AC_MSG_ERROR([[conditional "$1" was never defined. 11746Usually this means the macro was only invoked conditionally.]]) 11747fi])]) 11748 11749# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11750# 11751# This file is free software; the Free Software Foundation 11752# gives unlimited permission to copy and/or distribute it, 11753# with or without modifications, as long as this notice is preserved. 11754 11755 11756# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11757# written in clear, in which case automake, when reading aclocal.m4, 11758# will think it sees a *use*, and therefore will trigger all it's 11759# C support machinery. Also note that it means that autoscan, seeing 11760# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11761 11762 11763# _AM_DEPENDENCIES(NAME) 11764# ---------------------- 11765# See how the compiler implements dependency checking. 11766# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11767# We try a few techniques and use that to set a single cache variable. 11768# 11769# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11770# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11771# dependency, and given that the user is not expected to run this macro, 11772# just rely on AC_PROG_CC. 11773AC_DEFUN([_AM_DEPENDENCIES], 11774[AC_REQUIRE([AM_SET_DEPDIR])dnl 11775AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11776AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11777AC_REQUIRE([AM_DEP_TRACK])dnl 11778 11779m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11780 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11781 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11782 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11783 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11784 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11785 [depcc="$$1" am_compiler_list=]) 11786 11787AC_CACHE_CHECK([dependency style of $depcc], 11788 [am_cv_$1_dependencies_compiler_type], 11789[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11790 # We make a subdir and do the tests there. Otherwise we can end up 11791 # making bogus files that we don't know about and never remove. For 11792 # instance it was reported that on HP-UX the gcc test will end up 11793 # making a dummy file named 'D' -- because '-MD' means "put the output 11794 # in D". 11795 rm -rf conftest.dir 11796 mkdir conftest.dir 11797 # Copy depcomp to subdir because otherwise we won't find it if we're 11798 # using a relative directory. 11799 cp "$am_depcomp" conftest.dir 11800 cd conftest.dir 11801 # We will build objects and dependencies in a subdirectory because 11802 # it helps to detect inapplicable dependency modes. For instance 11803 # both Tru64's cc and ICC support -MD to output dependencies as a 11804 # side effect of compilation, but ICC will put the dependencies in 11805 # the current directory while Tru64 will put them in the object 11806 # directory. 11807 mkdir sub 11808 11809 am_cv_$1_dependencies_compiler_type=none 11810 if test "$am_compiler_list" = ""; then 11811 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11812 fi 11813 am__universal=false 11814 m4_case([$1], [CC], 11815 [case " $depcc " in #( 11816 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11817 esac], 11818 [CXX], 11819 [case " $depcc " in #( 11820 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11821 esac]) 11822 11823 for depmode in $am_compiler_list; do 11824 # Setup a source with many dependencies, because some compilers 11825 # like to wrap large dependency lists on column 80 (with \), and 11826 # we should not choose a depcomp mode which is confused by this. 11827 # 11828 # We need to recreate these files for each test, as the compiler may 11829 # overwrite some of them when testing with obscure command lines. 11830 # This happens at least with the AIX C compiler. 11831 : > sub/conftest.c 11832 for i in 1 2 3 4 5 6; do 11833 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11834 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11835 # Solaris 10 /bin/sh. 11836 echo '/* dummy */' > sub/conftst$i.h 11837 done 11838 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11839 11840 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11841 # mode. It turns out that the SunPro C++ compiler does not properly 11842 # handle '-M -o', and we need to detect this. Also, some Intel 11843 # versions had trouble with output in subdirs. 11844 am__obj=sub/conftest.${OBJEXT-o} 11845 am__minus_obj="-o $am__obj" 11846 case $depmode in 11847 gcc) 11848 # This depmode causes a compiler race in universal mode. 11849 test "$am__universal" = false || continue 11850 ;; 11851 nosideeffect) 11852 # After this tag, mechanisms are not by side-effect, so they'll 11853 # only be used when explicitly requested. 11854 if test "x$enable_dependency_tracking" = xyes; then 11855 continue 11856 else 11857 break 11858 fi 11859 ;; 11860 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11861 # This compiler won't grok '-c -o', but also, the minuso test has 11862 # not run yet. These depmodes are late enough in the game, and 11863 # so weak that their functioning should not be impacted. 11864 am__obj=conftest.${OBJEXT-o} 11865 am__minus_obj= 11866 ;; 11867 none) break ;; 11868 esac 11869 if depmode=$depmode \ 11870 source=sub/conftest.c object=$am__obj \ 11871 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11872 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11873 >/dev/null 2>conftest.err && 11874 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11875 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11876 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11877 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11878 # icc doesn't choke on unknown options, it will just issue warnings 11879 # or remarks (even with -Werror). So we grep stderr for any message 11880 # that says an option was ignored or not supported. 11881 # When given -MP, icc 7.0 and 7.1 complain thusly: 11882 # icc: Command line warning: ignoring option '-M'; no argument required 11883 # The diagnosis changed in icc 8.0: 11884 # icc: Command line remark: option '-MP' not supported 11885 if (grep 'ignoring option' conftest.err || 11886 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11887 am_cv_$1_dependencies_compiler_type=$depmode 11888 break 11889 fi 11890 fi 11891 done 11892 11893 cd .. 11894 rm -rf conftest.dir 11895else 11896 am_cv_$1_dependencies_compiler_type=none 11897fi 11898]) 11899AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11900AM_CONDITIONAL([am__fastdep$1], [ 11901 test "x$enable_dependency_tracking" != xno \ 11902 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11903]) 11904 11905 11906# AM_SET_DEPDIR 11907# ------------- 11908# Choose a directory name for dependency files. 11909# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11910AC_DEFUN([AM_SET_DEPDIR], 11911[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11912AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11913]) 11914 11915 11916# AM_DEP_TRACK 11917# ------------ 11918AC_DEFUN([AM_DEP_TRACK], 11919[AC_ARG_ENABLE([dependency-tracking], [dnl 11920AS_HELP_STRING( 11921 [--enable-dependency-tracking], 11922 [do not reject slow dependency extractors]) 11923AS_HELP_STRING( 11924 [--disable-dependency-tracking], 11925 [speeds up one-time build])]) 11926if test "x$enable_dependency_tracking" != xno; then 11927 am_depcomp="$ac_aux_dir/depcomp" 11928 AMDEPBACKSLASH='\' 11929 am__nodep='_no' 11930fi 11931AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11932AC_SUBST([AMDEPBACKSLASH])dnl 11933_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11934AC_SUBST([am__nodep])dnl 11935_AM_SUBST_NOTMAKE([am__nodep])dnl 11936]) 11937 11938# Generate code to set up dependency tracking. -*- Autoconf -*- 11939 11940# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11941# 11942# This file is free software; the Free Software Foundation 11943# gives unlimited permission to copy and/or distribute it, 11944# with or without modifications, as long as this notice is preserved. 11945 11946 11947# _AM_OUTPUT_DEPENDENCY_COMMANDS 11948# ------------------------------ 11949AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11950[{ 11951 # Older Autoconf quotes --file arguments for eval, but not when files 11952 # are listed without --file. Let's play safe and only enable the eval 11953 # if we detect the quoting. 11954 case $CONFIG_FILES in 11955 *\'*) eval set x "$CONFIG_FILES" ;; 11956 *) set x $CONFIG_FILES ;; 11957 esac 11958 shift 11959 for mf 11960 do 11961 # Strip MF so we end up with the name of the file. 11962 mf=`echo "$mf" | sed -e 's/:.*$//'` 11963 # Check whether this is an Automake generated Makefile or not. 11964 # We used to match only the files named 'Makefile.in', but 11965 # some people rename them; so instead we look at the file content. 11966 # Grep'ing the first line is not enough: some people post-process 11967 # each Makefile.in and add a new line on top of each file to say so. 11968 # Grep'ing the whole file is not good either: AIX grep has a line 11969 # limit of 2048, but all sed's we know have understand at least 4000. 11970 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11971 dirpart=`AS_DIRNAME("$mf")` 11972 else 11973 continue 11974 fi 11975 # Extract the definition of DEPDIR, am__include, and am__quote 11976 # from the Makefile without running 'make'. 11977 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11978 test -z "$DEPDIR" && continue 11979 am__include=`sed -n 's/^am__include = //p' < "$mf"` 11980 test -z "$am__include" && continue 11981 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11982 # Find all dependency output files, they are included files with 11983 # $(DEPDIR) in their names. We invoke sed twice because it is the 11984 # simplest approach to changing $(DEPDIR) to its actual value in the 11985 # expansion. 11986 for file in `sed -n " 11987 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11988 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11989 # Make sure the directory exists. 11990 test -f "$dirpart/$file" && continue 11991 fdir=`AS_DIRNAME(["$file"])` 11992 AS_MKDIR_P([$dirpart/$fdir]) 11993 # echo "creating $dirpart/$file" 11994 echo '# dummy' > "$dirpart/$file" 11995 done 11996 done 11997} 11998])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11999 12000 12001# AM_OUTPUT_DEPENDENCY_COMMANDS 12002# ----------------------------- 12003# This macro should only be invoked once -- use via AC_REQUIRE. 12004# 12005# This code is only required when automatic dependency tracking 12006# is enabled. FIXME. This creates each '.P' file that we will 12007# need in order to bootstrap the dependency handling code. 12008AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 12009[AC_CONFIG_COMMANDS([depfiles], 12010 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 12011 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 12012]) 12013 12014# Do all the work for Automake. -*- Autoconf -*- 12015 12016# Copyright (C) 1996-2014 Free Software Foundation, Inc. 12017# 12018# This file is free software; the Free Software Foundation 12019# gives unlimited permission to copy and/or distribute it, 12020# with or without modifications, as long as this notice is preserved. 12021 12022# This macro actually does too much. Some checks are only needed if 12023# your package does certain things. But this isn't really a big deal. 12024 12025dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 12026m4_define([AC_PROG_CC], 12027m4_defn([AC_PROG_CC]) 12028[_AM_PROG_CC_C_O 12029]) 12030 12031# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 12032# AM_INIT_AUTOMAKE([OPTIONS]) 12033# ----------------------------------------------- 12034# The call with PACKAGE and VERSION arguments is the old style 12035# call (pre autoconf-2.50), which is being phased out. PACKAGE 12036# and VERSION should now be passed to AC_INIT and removed from 12037# the call to AM_INIT_AUTOMAKE. 12038# We support both call styles for the transition. After 12039# the next Automake release, Autoconf can make the AC_INIT 12040# arguments mandatory, and then we can depend on a new Autoconf 12041# release and drop the old call support. 12042AC_DEFUN([AM_INIT_AUTOMAKE], 12043[AC_PREREQ([2.65])dnl 12044dnl Autoconf wants to disallow AM_ names. We explicitly allow 12045dnl the ones we care about. 12046m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 12047AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 12048AC_REQUIRE([AC_PROG_INSTALL])dnl 12049if test "`cd $srcdir && pwd`" != "`pwd`"; then 12050 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 12051 # is not polluted with repeated "-I." 12052 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 12053 # test to see if srcdir already configured 12054 if test -f $srcdir/config.status; then 12055 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 12056 fi 12057fi 12058 12059# test whether we have cygpath 12060if test -z "$CYGPATH_W"; then 12061 if (cygpath --version) >/dev/null 2>/dev/null; then 12062 CYGPATH_W='cygpath -w' 12063 else 12064 CYGPATH_W=echo 12065 fi 12066fi 12067AC_SUBST([CYGPATH_W]) 12068 12069# Define the identity of the package. 12070dnl Distinguish between old-style and new-style calls. 12071m4_ifval([$2], 12072[AC_DIAGNOSE([obsolete], 12073 [$0: two- and three-arguments forms are deprecated.]) 12074m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 12075 AC_SUBST([PACKAGE], [$1])dnl 12076 AC_SUBST([VERSION], [$2])], 12077[_AM_SET_OPTIONS([$1])dnl 12078dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 12079m4_if( 12080 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 12081 [ok:ok],, 12082 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 12083 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 12084 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 12085 12086_AM_IF_OPTION([no-define],, 12087[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 12088 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 12089 12090# Some tools Automake needs. 12091AC_REQUIRE([AM_SANITY_CHECK])dnl 12092AC_REQUIRE([AC_ARG_PROGRAM])dnl 12093AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 12094AM_MISSING_PROG([AUTOCONF], [autoconf]) 12095AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 12096AM_MISSING_PROG([AUTOHEADER], [autoheader]) 12097AM_MISSING_PROG([MAKEINFO], [makeinfo]) 12098AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12099AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 12100AC_REQUIRE([AC_PROG_MKDIR_P])dnl 12101# For better backward compatibility. To be removed once Automake 1.9.x 12102# dies out for good. For more background, see: 12103# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 12104# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 12105AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 12106# We need awk for the "check" target (and possibly the TAP driver). The 12107# system "awk" is bad on some platforms. 12108AC_REQUIRE([AC_PROG_AWK])dnl 12109AC_REQUIRE([AC_PROG_MAKE_SET])dnl 12110AC_REQUIRE([AM_SET_LEADING_DOT])dnl 12111_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 12112 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 12113 [_AM_PROG_TAR([v7])])]) 12114_AM_IF_OPTION([no-dependencies],, 12115[AC_PROVIDE_IFELSE([AC_PROG_CC], 12116 [_AM_DEPENDENCIES([CC])], 12117 [m4_define([AC_PROG_CC], 12118 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 12119AC_PROVIDE_IFELSE([AC_PROG_CXX], 12120 [_AM_DEPENDENCIES([CXX])], 12121 [m4_define([AC_PROG_CXX], 12122 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 12123AC_PROVIDE_IFELSE([AC_PROG_OBJC], 12124 [_AM_DEPENDENCIES([OBJC])], 12125 [m4_define([AC_PROG_OBJC], 12126 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 12127AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 12128 [_AM_DEPENDENCIES([OBJCXX])], 12129 [m4_define([AC_PROG_OBJCXX], 12130 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 12131]) 12132AC_REQUIRE([AM_SILENT_RULES])dnl 12133dnl The testsuite driver may need to know about EXEEXT, so add the 12134dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 12135dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 12136AC_CONFIG_COMMANDS_PRE(dnl 12137[m4_provide_if([_AM_COMPILER_EXEEXT], 12138 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 12139 12140# POSIX will say in a future version that running "rm -f" with no argument 12141# is OK; and we want to be able to make that assumption in our Makefile 12142# recipes. So use an aggressive probe to check that the usage we want is 12143# actually supported "in the wild" to an acceptable degree. 12144# See automake bug#10828. 12145# To make any issue more visible, cause the running configure to be aborted 12146# by default if the 'rm' program in use doesn't match our expectations; the 12147# user can still override this though. 12148if rm -f && rm -fr && rm -rf; then : OK; else 12149 cat >&2 <<'END' 12150Oops! 12151 12152Your 'rm' program seems unable to run without file operands specified 12153on the command line, even when the '-f' option is present. This is contrary 12154to the behaviour of most rm programs out there, and not conforming with 12155the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 12156 12157Please tell bug-automake@gnu.org about your system, including the value 12158of your $PATH and any error possibly output before this message. This 12159can help us improve future automake versions. 12160 12161END 12162 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 12163 echo 'Configuration will proceed anyway, since you have set the' >&2 12164 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 12165 echo >&2 12166 else 12167 cat >&2 <<'END' 12168Aborting the configuration process, to ensure you take notice of the issue. 12169 12170You can download and install GNU coreutils to get an 'rm' implementation 12171that behaves properly: <http://www.gnu.org/software/coreutils/>. 12172 12173If you want to complete the configuration process using your problematic 12174'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 12175to "yes", and re-run configure. 12176 12177END 12178 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 12179 fi 12180fi 12181dnl The trailing newline in this macro's definition is deliberate, for 12182dnl backward compatibility and to allow trailing 'dnl'-style comments 12183dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 12184]) 12185 12186dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 12187dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 12188dnl mangled by Autoconf and run in a shell conditional statement. 12189m4_define([_AC_COMPILER_EXEEXT], 12190m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 12191 12192# When config.status generates a header, we must update the stamp-h file. 12193# This file resides in the same directory as the config header 12194# that is generated. The stamp files are numbered to have different names. 12195 12196# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 12197# loop where config.status creates the headers, so we can generate 12198# our stamp files there. 12199AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 12200[# Compute $1's index in $config_headers. 12201_am_arg=$1 12202_am_stamp_count=1 12203for _am_header in $config_headers :; do 12204 case $_am_header in 12205 $_am_arg | $_am_arg:* ) 12206 break ;; 12207 * ) 12208 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 12209 esac 12210done 12211echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 12212 12213# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12214# 12215# This file is free software; the Free Software Foundation 12216# gives unlimited permission to copy and/or distribute it, 12217# with or without modifications, as long as this notice is preserved. 12218 12219# AM_PROG_INSTALL_SH 12220# ------------------ 12221# Define $install_sh. 12222AC_DEFUN([AM_PROG_INSTALL_SH], 12223[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12224if test x"${install_sh+set}" != xset; then 12225 case $am_aux_dir in 12226 *\ * | *\ *) 12227 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 12228 *) 12229 install_sh="\${SHELL} $am_aux_dir/install-sh" 12230 esac 12231fi 12232AC_SUBST([install_sh])]) 12233 12234# Copyright (C) 2003-2014 Free Software Foundation, Inc. 12235# 12236# This file is free software; the Free Software Foundation 12237# gives unlimited permission to copy and/or distribute it, 12238# with or without modifications, as long as this notice is preserved. 12239 12240# Check whether the underlying file-system supports filenames 12241# with a leading dot. For instance MS-DOS doesn't. 12242AC_DEFUN([AM_SET_LEADING_DOT], 12243[rm -rf .tst 2>/dev/null 12244mkdir .tst 2>/dev/null 12245if test -d .tst; then 12246 am__leading_dot=. 12247else 12248 am__leading_dot=_ 12249fi 12250rmdir .tst 2>/dev/null 12251AC_SUBST([am__leading_dot])]) 12252 12253# Check to see how 'make' treats includes. -*- Autoconf -*- 12254 12255# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12256# 12257# This file is free software; the Free Software Foundation 12258# gives unlimited permission to copy and/or distribute it, 12259# with or without modifications, as long as this notice is preserved. 12260 12261# AM_MAKE_INCLUDE() 12262# ----------------- 12263# Check to see how make treats includes. 12264AC_DEFUN([AM_MAKE_INCLUDE], 12265[am_make=${MAKE-make} 12266cat > confinc << 'END' 12267am__doit: 12268 @echo this is the am__doit target 12269.PHONY: am__doit 12270END 12271# If we don't find an include directive, just comment out the code. 12272AC_MSG_CHECKING([for style of include used by $am_make]) 12273am__include="#" 12274am__quote= 12275_am_result=none 12276# First try GNU make style include. 12277echo "include confinc" > confmf 12278# Ignore all kinds of additional output from 'make'. 12279case `$am_make -s -f confmf 2> /dev/null` in #( 12280*the\ am__doit\ target*) 12281 am__include=include 12282 am__quote= 12283 _am_result=GNU 12284 ;; 12285esac 12286# Now try BSD make style include. 12287if test "$am__include" = "#"; then 12288 echo '.include "confinc"' > confmf 12289 case `$am_make -s -f confmf 2> /dev/null` in #( 12290 *the\ am__doit\ target*) 12291 am__include=.include 12292 am__quote="\"" 12293 _am_result=BSD 12294 ;; 12295 esac 12296fi 12297AC_SUBST([am__include]) 12298AC_SUBST([am__quote]) 12299AC_MSG_RESULT([$_am_result]) 12300rm -f confinc confmf 12301]) 12302 12303# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12304 12305# Copyright (C) 1997-2014 Free Software Foundation, Inc. 12306# 12307# This file is free software; the Free Software Foundation 12308# gives unlimited permission to copy and/or distribute it, 12309# with or without modifications, as long as this notice is preserved. 12310 12311# AM_MISSING_PROG(NAME, PROGRAM) 12312# ------------------------------ 12313AC_DEFUN([AM_MISSING_PROG], 12314[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12315$1=${$1-"${am_missing_run}$2"} 12316AC_SUBST($1)]) 12317 12318# AM_MISSING_HAS_RUN 12319# ------------------ 12320# Define MISSING if not defined so far and test if it is modern enough. 12321# If it is, set am_missing_run to use it, otherwise, to nothing. 12322AC_DEFUN([AM_MISSING_HAS_RUN], 12323[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12324AC_REQUIRE_AUX_FILE([missing])dnl 12325if test x"${MISSING+set}" != xset; then 12326 case $am_aux_dir in 12327 *\ * | *\ *) 12328 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12329 *) 12330 MISSING="\${SHELL} $am_aux_dir/missing" ;; 12331 esac 12332fi 12333# Use eval to expand $SHELL 12334if eval "$MISSING --is-lightweight"; then 12335 am_missing_run="$MISSING " 12336else 12337 am_missing_run= 12338 AC_MSG_WARN(['missing' script is too old or missing]) 12339fi 12340]) 12341 12342# Helper functions for option handling. -*- Autoconf -*- 12343 12344# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12345# 12346# This file is free software; the Free Software Foundation 12347# gives unlimited permission to copy and/or distribute it, 12348# with or without modifications, as long as this notice is preserved. 12349 12350# _AM_MANGLE_OPTION(NAME) 12351# ----------------------- 12352AC_DEFUN([_AM_MANGLE_OPTION], 12353[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12354 12355# _AM_SET_OPTION(NAME) 12356# -------------------- 12357# Set option NAME. Presently that only means defining a flag for this option. 12358AC_DEFUN([_AM_SET_OPTION], 12359[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12360 12361# _AM_SET_OPTIONS(OPTIONS) 12362# ------------------------ 12363# OPTIONS is a space-separated list of Automake options. 12364AC_DEFUN([_AM_SET_OPTIONS], 12365[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12366 12367# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12368# ------------------------------------------- 12369# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12370AC_DEFUN([_AM_IF_OPTION], 12371[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12372 12373# Copyright (C) 1999-2014 Free Software Foundation, Inc. 12374# 12375# This file is free software; the Free Software Foundation 12376# gives unlimited permission to copy and/or distribute it, 12377# with or without modifications, as long as this notice is preserved. 12378 12379# _AM_PROG_CC_C_O 12380# --------------- 12381# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12382# to automatically call this. 12383AC_DEFUN([_AM_PROG_CC_C_O], 12384[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12385AC_REQUIRE_AUX_FILE([compile])dnl 12386AC_LANG_PUSH([C])dnl 12387AC_CACHE_CHECK( 12388 [whether $CC understands -c and -o together], 12389 [am_cv_prog_cc_c_o], 12390 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12391 # Make sure it works both with $CC and with simple cc. 12392 # Following AC_PROG_CC_C_O, we do the test twice because some 12393 # compilers refuse to overwrite an existing .o file with -o, 12394 # though they will create one. 12395 am_cv_prog_cc_c_o=yes 12396 for am_i in 1 2; do 12397 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12398 && test -f conftest2.$ac_objext; then 12399 : OK 12400 else 12401 am_cv_prog_cc_c_o=no 12402 break 12403 fi 12404 done 12405 rm -f core conftest* 12406 unset am_i]) 12407if test "$am_cv_prog_cc_c_o" != yes; then 12408 # Losing compiler, so override with the script. 12409 # FIXME: It is wrong to rewrite CC. 12410 # But if we don't then we get into trouble of one sort or another. 12411 # A longer-term fix would be to have automake use am__CC in this case, 12412 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12413 CC="$am_aux_dir/compile $CC" 12414fi 12415AC_LANG_POP([C])]) 12416 12417# For backward compatibility. 12418AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12419 12420# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12421# 12422# This file is free software; the Free Software Foundation 12423# gives unlimited permission to copy and/or distribute it, 12424# with or without modifications, as long as this notice is preserved. 12425 12426# AM_RUN_LOG(COMMAND) 12427# ------------------- 12428# Run COMMAND, save the exit status in ac_status, and log it. 12429# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12430AC_DEFUN([AM_RUN_LOG], 12431[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12432 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12433 ac_status=$? 12434 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12435 (exit $ac_status); }]) 12436 12437# Check to make sure that the build environment is sane. -*- Autoconf -*- 12438 12439# Copyright (C) 1996-2014 Free Software Foundation, Inc. 12440# 12441# This file is free software; the Free Software Foundation 12442# gives unlimited permission to copy and/or distribute it, 12443# with or without modifications, as long as this notice is preserved. 12444 12445# AM_SANITY_CHECK 12446# --------------- 12447AC_DEFUN([AM_SANITY_CHECK], 12448[AC_MSG_CHECKING([whether build environment is sane]) 12449# Reject unsafe characters in $srcdir or the absolute working directory 12450# name. Accept space and tab only in the latter. 12451am_lf=' 12452' 12453case `pwd` in 12454 *[[\\\"\#\$\&\'\`$am_lf]]*) 12455 AC_MSG_ERROR([unsafe absolute working directory name]);; 12456esac 12457case $srcdir in 12458 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12459 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12460esac 12461 12462# Do 'set' in a subshell so we don't clobber the current shell's 12463# arguments. Must try -L first in case configure is actually a 12464# symlink; some systems play weird games with the mod time of symlinks 12465# (eg FreeBSD returns the mod time of the symlink's containing 12466# directory). 12467if ( 12468 am_has_slept=no 12469 for am_try in 1 2; do 12470 echo "timestamp, slept: $am_has_slept" > conftest.file 12471 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12472 if test "$[*]" = "X"; then 12473 # -L didn't work. 12474 set X `ls -t "$srcdir/configure" conftest.file` 12475 fi 12476 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12477 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12478 12479 # If neither matched, then we have a broken ls. This can happen 12480 # if, for instance, CONFIG_SHELL is bash and it inherits a 12481 # broken ls alias from the environment. This has actually 12482 # happened. Such a system could not be considered "sane". 12483 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12484 alias in your environment]) 12485 fi 12486 if test "$[2]" = conftest.file || test $am_try -eq 2; then 12487 break 12488 fi 12489 # Just in case. 12490 sleep 1 12491 am_has_slept=yes 12492 done 12493 test "$[2]" = conftest.file 12494 ) 12495then 12496 # Ok. 12497 : 12498else 12499 AC_MSG_ERROR([newly created file is older than distributed files! 12500Check your system clock]) 12501fi 12502AC_MSG_RESULT([yes]) 12503# If we didn't sleep, we still need to ensure time stamps of config.status and 12504# generated files are strictly newer. 12505am_sleep_pid= 12506if grep 'slept: no' conftest.file >/dev/null 2>&1; then 12507 ( sleep 1 ) & 12508 am_sleep_pid=$! 12509fi 12510AC_CONFIG_COMMANDS_PRE( 12511 [AC_MSG_CHECKING([that generated files are newer than configure]) 12512 if test -n "$am_sleep_pid"; then 12513 # Hide warnings about reused PIDs. 12514 wait $am_sleep_pid 2>/dev/null 12515 fi 12516 AC_MSG_RESULT([done])]) 12517rm -f conftest.file 12518]) 12519 12520# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12521# 12522# This file is free software; the Free Software Foundation 12523# gives unlimited permission to copy and/or distribute it, 12524# with or without modifications, as long as this notice is preserved. 12525 12526# AM_SILENT_RULES([DEFAULT]) 12527# -------------------------- 12528# Enable less verbose build rules; with the default set to DEFAULT 12529# ("yes" being less verbose, "no" or empty being verbose). 12530AC_DEFUN([AM_SILENT_RULES], 12531[AC_ARG_ENABLE([silent-rules], [dnl 12532AS_HELP_STRING( 12533 [--enable-silent-rules], 12534 [less verbose build output (undo: "make V=1")]) 12535AS_HELP_STRING( 12536 [--disable-silent-rules], 12537 [verbose build output (undo: "make V=0")])dnl 12538]) 12539case $enable_silent_rules in @%:@ ((( 12540 yes) AM_DEFAULT_VERBOSITY=0;; 12541 no) AM_DEFAULT_VERBOSITY=1;; 12542 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12543esac 12544dnl 12545dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12546dnl do not support nested variable expansions. 12547dnl See automake bug#9928 and bug#10237. 12548am_make=${MAKE-make} 12549AC_CACHE_CHECK([whether $am_make supports nested variables], 12550 [am_cv_make_support_nested_variables], 12551 [if AS_ECHO([['TRUE=$(BAR$(V)) 12552BAR0=false 12553BAR1=true 12554V=1 12555am__doit: 12556 @$(TRUE) 12557.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12558 am_cv_make_support_nested_variables=yes 12559else 12560 am_cv_make_support_nested_variables=no 12561fi]) 12562if test $am_cv_make_support_nested_variables = yes; then 12563 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12564 AM_V='$(V)' 12565 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12566else 12567 AM_V=$AM_DEFAULT_VERBOSITY 12568 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12569fi 12570AC_SUBST([AM_V])dnl 12571AM_SUBST_NOTMAKE([AM_V])dnl 12572AC_SUBST([AM_DEFAULT_V])dnl 12573AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12574AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12575AM_BACKSLASH='\' 12576AC_SUBST([AM_BACKSLASH])dnl 12577_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12578]) 12579 12580# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12581# 12582# This file is free software; the Free Software Foundation 12583# gives unlimited permission to copy and/or distribute it, 12584# with or without modifications, as long as this notice is preserved. 12585 12586# AM_PROG_INSTALL_STRIP 12587# --------------------- 12588# One issue with vendor 'install' (even GNU) is that you can't 12589# specify the program used to strip binaries. This is especially 12590# annoying in cross-compiling environments, where the build's strip 12591# is unlikely to handle the host's binaries. 12592# Fortunately install-sh will honor a STRIPPROG variable, so we 12593# always use install-sh in "make install-strip", and initialize 12594# STRIPPROG with the value of the STRIP variable (set by the user). 12595AC_DEFUN([AM_PROG_INSTALL_STRIP], 12596[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12597# Installed binaries are usually stripped using 'strip' when the user 12598# run "make install-strip". However 'strip' might not be the right 12599# tool to use in cross-compilation environments, therefore Automake 12600# will honor the 'STRIP' environment variable to overrule this program. 12601dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12602if test "$cross_compiling" != no; then 12603 AC_CHECK_TOOL([STRIP], [strip], :) 12604fi 12605INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12606AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12607 12608# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12609# 12610# This file is free software; the Free Software Foundation 12611# gives unlimited permission to copy and/or distribute it, 12612# with or without modifications, as long as this notice is preserved. 12613 12614# _AM_SUBST_NOTMAKE(VARIABLE) 12615# --------------------------- 12616# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12617# This macro is traced by Automake. 12618AC_DEFUN([_AM_SUBST_NOTMAKE]) 12619 12620# AM_SUBST_NOTMAKE(VARIABLE) 12621# -------------------------- 12622# Public sister of _AM_SUBST_NOTMAKE. 12623AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12624 12625# Check how to create a tarball. -*- Autoconf -*- 12626 12627# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12628# 12629# This file is free software; the Free Software Foundation 12630# gives unlimited permission to copy and/or distribute it, 12631# with or without modifications, as long as this notice is preserved. 12632 12633# _AM_PROG_TAR(FORMAT) 12634# -------------------- 12635# Check how to create a tarball in format FORMAT. 12636# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12637# 12638# Substitute a variable $(am__tar) that is a command 12639# writing to stdout a FORMAT-tarball containing the directory 12640# $tardir. 12641# tardir=directory && $(am__tar) > result.tar 12642# 12643# Substitute a variable $(am__untar) that extract such 12644# a tarball read from stdin. 12645# $(am__untar) < result.tar 12646# 12647AC_DEFUN([_AM_PROG_TAR], 12648[# Always define AMTAR for backward compatibility. Yes, it's still used 12649# in the wild :-( We should find a proper way to deprecate it ... 12650AC_SUBST([AMTAR], ['$${TAR-tar}']) 12651 12652# We'll loop over all known methods to create a tar archive until one works. 12653_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12654 12655m4_if([$1], [v7], 12656 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12657 12658 [m4_case([$1], 12659 [ustar], 12660 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12661 # There is notably a 21 bits limit for the UID and the GID. In fact, 12662 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12663 # and bug#13588). 12664 am_max_uid=2097151 # 2^21 - 1 12665 am_max_gid=$am_max_uid 12666 # The $UID and $GID variables are not portable, so we need to resort 12667 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12668 # below are definitely unexpected, so allow the users to see them 12669 # (that is, avoid stderr redirection). 12670 am_uid=`id -u || echo unknown` 12671 am_gid=`id -g || echo unknown` 12672 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12673 if test $am_uid -le $am_max_uid; then 12674 AC_MSG_RESULT([yes]) 12675 else 12676 AC_MSG_RESULT([no]) 12677 _am_tools=none 12678 fi 12679 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12680 if test $am_gid -le $am_max_gid; then 12681 AC_MSG_RESULT([yes]) 12682 else 12683 AC_MSG_RESULT([no]) 12684 _am_tools=none 12685 fi], 12686 12687 [pax], 12688 [], 12689 12690 [m4_fatal([Unknown tar format])]) 12691 12692 AC_MSG_CHECKING([how to create a $1 tar archive]) 12693 12694 # Go ahead even if we have the value already cached. We do so because we 12695 # need to set the values for the 'am__tar' and 'am__untar' variables. 12696 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12697 12698 for _am_tool in $_am_tools; do 12699 case $_am_tool in 12700 gnutar) 12701 for _am_tar in tar gnutar gtar; do 12702 AM_RUN_LOG([$_am_tar --version]) && break 12703 done 12704 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12705 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12706 am__untar="$_am_tar -xf -" 12707 ;; 12708 plaintar) 12709 # Must skip GNU tar: if it does not support --format= it doesn't create 12710 # ustar tarball either. 12711 (tar --version) >/dev/null 2>&1 && continue 12712 am__tar='tar chf - "$$tardir"' 12713 am__tar_='tar chf - "$tardir"' 12714 am__untar='tar xf -' 12715 ;; 12716 pax) 12717 am__tar='pax -L -x $1 -w "$$tardir"' 12718 am__tar_='pax -L -x $1 -w "$tardir"' 12719 am__untar='pax -r' 12720 ;; 12721 cpio) 12722 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12723 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12724 am__untar='cpio -i -H $1 -d' 12725 ;; 12726 none) 12727 am__tar=false 12728 am__tar_=false 12729 am__untar=false 12730 ;; 12731 esac 12732 12733 # If the value was cached, stop now. We just wanted to have am__tar 12734 # and am__untar set. 12735 test -n "${am_cv_prog_tar_$1}" && break 12736 12737 # tar/untar a dummy directory, and stop if the command works. 12738 rm -rf conftest.dir 12739 mkdir conftest.dir 12740 echo GrepMe > conftest.dir/file 12741 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12742 rm -rf conftest.dir 12743 if test -s conftest.tar; then 12744 AM_RUN_LOG([$am__untar <conftest.tar]) 12745 AM_RUN_LOG([cat conftest.dir/file]) 12746 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12747 fi 12748 done 12749 rm -rf conftest.dir 12750 12751 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12752 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12753 12754AC_SUBST([am__tar]) 12755AC_SUBST([am__untar]) 12756]) # _AM_PROG_TAR 12757 12758